From 29d5921774c6d60772d9096d5e57474f745d6d75 Mon Sep 17 00:00:00 2001 From: lindsay Date: Wed, 28 Feb 2024 15:34:51 +0100 Subject: [PATCH] Rebuild --- dist/xeokit-sdk.cjs.js | 45 +++++-- dist/xeokit-sdk.es.js | 45 +++++-- dist/xeokit-sdk.es5.js | 234 +++++++++++++++++++------------------ dist/xeokit-sdk.min.cjs.js | 4 +- dist/xeokit-sdk.min.es.js | 4 +- dist/xeokit-sdk.min.es5.js | 4 +- 6 files changed, 191 insertions(+), 145 deletions(-) diff --git a/dist/xeokit-sdk.cjs.js b/dist/xeokit-sdk.cjs.js index da9ae81cbf..917bcc1893 100644 --- a/dist/xeokit-sdk.cjs.js +++ b/dist/xeokit-sdk.cjs.js @@ -20753,7 +20753,7 @@ class Perspective extends Component { inverseMatrix: math.mat4(), transposedMatrix: math.mat4(), near: 0.1, - far: 2000.0 + far: 10000.0 }); this._inverseMatrixDirty = true; @@ -20903,10 +20903,12 @@ class Perspective extends Component { * * Fires a "far" event on change. * + * Default value is ````10000.0````. + * * @param {Number} value New Perspective far plane position. */ set far(value) { - const far = (value !== undefined && value !== null) ? value : 2000.0; + const far = (value !== undefined && value !== null) ? value : 10000.0; if (this._state.far === far) { return; } @@ -20918,6 +20920,8 @@ class Perspective extends Component { /** * Gets the position of this Perspective's far plane on the positive View-space Z-axis. * + * Default value is ````10000.0````. + * * @return {Number} The Perspective's far plane position. */ get far() { @@ -21054,7 +21058,7 @@ class Ortho extends Component { inverseMatrix: math.mat4(), transposedMatrix: math.mat4(), near: 0.1, - far: 2000.0 + far: 10000.0 }); this._inverseMatrixDirty = true; @@ -21180,12 +21184,12 @@ class Ortho extends Component { * * Fires a "far" event on change. * - * Default value is ````2000.0````. + * Default value is ````10000.0````. * * @param {Number} value New far ortho plane position. */ set far(value) { - const far = (value !== undefined && value !== null) ? value : 2000.0; + const far = (value !== undefined && value !== null) ? value : 10000.0; if (this._state.far === far) { return; } @@ -81908,6 +81912,10 @@ class SceneModel extends Component { this.error("[createGeometry] Param expected: `uvDecodeMatrix` (required for `uvCompressed')"); return null; } + if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) { + const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3; + cfg.indices = this._createDefaultIndices(numPositions); + } if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") { this.error(`[createGeometry] Param expected: indices (required for '${cfg.primitive}' primitive type)`); return null; @@ -82342,7 +82350,12 @@ class SceneModel extends Component { this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"); return false; } + if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) { + const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3; + cfg.indices = this._createDefaultIndices(numPositions); + } if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") { + cfg.indices = this._createDefaultIndices(numIndices); this.error(`Param expected: indices (required for '${cfg.primitive}' primitive type)`); return false; } @@ -82352,9 +82365,9 @@ class SceneModel extends Component { } const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles" - || cfg.primitive === "solid" - || cfg.primitive === "surface")) - && (!cfg.textureSetId); + || cfg.primitive === "solid" + || cfg.primitive === "surface")) + && (!cfg.textureSetId); cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin; @@ -82570,9 +82583,9 @@ class SceneModel extends Component { } const useDTX = (!!this._dtxEnabled - && (cfg.geometry.primitive === "triangles" - || cfg.geometry.primitive === "solid" - || cfg.geometry.primitive === "surface")) + && (cfg.geometry.primitive === "triangles" + || cfg.geometry.primitive === "solid" + || cfg.geometry.primitive === "surface")) && (!cfg.textureSetId); if (useDTX) { @@ -82627,6 +82640,14 @@ class SceneModel extends Component { return true; } + _createDefaultIndices(numIndices) { + const indices = []; + for (let i = 0; i < numIndices; i++) { + indices.push(i); + } + return indices; + } + _createMesh(cfg) { const mesh = new SceneModelMesh(this, cfg.id, cfg.color, cfg.opacity, cfg.transform, cfg.textureSet); mesh.pickId = this.scene._renderer.getPickID(mesh); @@ -83229,7 +83250,7 @@ class SceneModel extends Component { for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) { const layerIndex = renderFlags.visibleLayers[i]; this.layerList[layerIndex].drawColorOpaque(renderFlags, frameCtx); - } + } } /** @private */ diff --git a/dist/xeokit-sdk.es.js b/dist/xeokit-sdk.es.js index 08fc2b205e..ebb1c053a4 100644 --- a/dist/xeokit-sdk.es.js +++ b/dist/xeokit-sdk.es.js @@ -20749,7 +20749,7 @@ class Perspective extends Component { inverseMatrix: math.mat4(), transposedMatrix: math.mat4(), near: 0.1, - far: 2000.0 + far: 10000.0 }); this._inverseMatrixDirty = true; @@ -20899,10 +20899,12 @@ class Perspective extends Component { * * Fires a "far" event on change. * + * Default value is ````10000.0````. + * * @param {Number} value New Perspective far plane position. */ set far(value) { - const far = (value !== undefined && value !== null) ? value : 2000.0; + const far = (value !== undefined && value !== null) ? value : 10000.0; if (this._state.far === far) { return; } @@ -20914,6 +20916,8 @@ class Perspective extends Component { /** * Gets the position of this Perspective's far plane on the positive View-space Z-axis. * + * Default value is ````10000.0````. + * * @return {Number} The Perspective's far plane position. */ get far() { @@ -21050,7 +21054,7 @@ class Ortho extends Component { inverseMatrix: math.mat4(), transposedMatrix: math.mat4(), near: 0.1, - far: 2000.0 + far: 10000.0 }); this._inverseMatrixDirty = true; @@ -21176,12 +21180,12 @@ class Ortho extends Component { * * Fires a "far" event on change. * - * Default value is ````2000.0````. + * Default value is ````10000.0````. * * @param {Number} value New far ortho plane position. */ set far(value) { - const far = (value !== undefined && value !== null) ? value : 2000.0; + const far = (value !== undefined && value !== null) ? value : 10000.0; if (this._state.far === far) { return; } @@ -81904,6 +81908,10 @@ class SceneModel extends Component { this.error("[createGeometry] Param expected: `uvDecodeMatrix` (required for `uvCompressed')"); return null; } + if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) { + const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3; + cfg.indices = this._createDefaultIndices(numPositions); + } if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") { this.error(`[createGeometry] Param expected: indices (required for '${cfg.primitive}' primitive type)`); return null; @@ -82338,7 +82346,12 @@ class SceneModel extends Component { this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"); return false; } + if (!cfg.buckets && !cfg.indices && (cfg.primitive === "triangles" || cfg.primitive === "solid" || cfg.primitive === "surface")) { + const numPositions = (cfg.positions || cfg.positionsCompressed).length / 3; + cfg.indices = this._createDefaultIndices(numPositions); + } if (!cfg.buckets && !cfg.indices && cfg.primitive !== "points") { + cfg.indices = this._createDefaultIndices(numIndices); this.error(`Param expected: indices (required for '${cfg.primitive}' primitive type)`); return false; } @@ -82348,9 +82361,9 @@ class SceneModel extends Component { } const useDTX = (!!this._dtxEnabled && (cfg.primitive === "triangles" - || cfg.primitive === "solid" - || cfg.primitive === "surface")) - && (!cfg.textureSetId); + || cfg.primitive === "solid" + || cfg.primitive === "surface")) + && (!cfg.textureSetId); cfg.origin = cfg.origin ? math.addVec3(this._origin, cfg.origin, math.vec3()) : this._origin; @@ -82566,9 +82579,9 @@ class SceneModel extends Component { } const useDTX = (!!this._dtxEnabled - && (cfg.geometry.primitive === "triangles" - || cfg.geometry.primitive === "solid" - || cfg.geometry.primitive === "surface")) + && (cfg.geometry.primitive === "triangles" + || cfg.geometry.primitive === "solid" + || cfg.geometry.primitive === "surface")) && (!cfg.textureSetId); if (useDTX) { @@ -82623,6 +82636,14 @@ class SceneModel extends Component { return true; } + _createDefaultIndices(numIndices) { + const indices = []; + for (let i = 0; i < numIndices; i++) { + indices.push(i); + } + return indices; + } + _createMesh(cfg) { const mesh = new SceneModelMesh(this, cfg.id, cfg.color, cfg.opacity, cfg.transform, cfg.textureSet); mesh.pickId = this.scene._renderer.getPickID(mesh); @@ -83225,7 +83246,7 @@ class SceneModel extends Component { for (let i = 0, len = renderFlags.visibleLayers.length; i < len; i++) { const layerIndex = renderFlags.visibleLayers[i]; this.layerList[layerIndex].drawColorOpaque(renderFlags, frameCtx); - } + } } /** @private */ diff --git a/dist/xeokit-sdk.es5.js b/dist/xeokit-sdk.es5.js index 8554b93f0b..afe2ffb287 100644 --- a/dist/xeokit-sdk.es5.js +++ b/dist/xeokit-sdk.es5.js @@ -5593,7 +5593,7 @@ var tolerance=2;this.on("mousedown",function(params){downX=params[0];downY=param * @property camera * @type {Camera} * @final - */_this35.camera=camera;_this35._state=new RenderState({matrix:math.mat4(),inverseMatrix:math.mat4(),transposedMatrix:math.mat4(),near:0.1,far:2000.0});_this35._inverseMatrixDirty=true;_this35._transposedMatrixDirty=true;_this35._fov=60.0;// Recompute aspect from change in canvas size + */_this35.camera=camera;_this35._state=new RenderState({matrix:math.mat4(),inverseMatrix:math.mat4(),transposedMatrix:math.mat4(),near:0.1,far:10000.0});_this35._inverseMatrixDirty=true;_this35._transposedMatrixDirty=true;_this35._fov=60.0;// Recompute aspect from change in canvas size _this35._canvasResized=_this35.scene.canvas.on("boundary",_this35._needUpdate,_assertThisInitialized(_this35));_this35.fov=cfg.fov;_this35.fovAxis=cfg.fovAxis;_this35.near=cfg.near;_this35.far=cfg.far;return _this35;}_createClass(Perspective,[{key:"type",get:/** @private */function get(){return"Perspective";}},{key:"_update",value:function _update(){var WIDTH_INDEX=2;var HEIGHT_INDEX=3;var boundary=this.scene.canvas.boundary;var aspect=boundary[WIDTH_INDEX]/boundary[HEIGHT_INDEX];var fovAxis=this._fovAxis;var fov=this._fov;if(fovAxis==="x"||fovAxis==="min"&&aspect<1||fovAxis==="max"&&aspect>1){fov=fov/aspect;}fov=Math.min(fov,120);math.perspectiveMat4(fov*(Math.PI/180.0),aspect,this._state.near,this._state.far,this._state.matrix);this._inverseMatrixDirty=true;this._transposedMatrixDirty=true;this.glRedraw();this.camera._updateScheduled=true;this.fire("matrix",this._state.matrix);}/** @@ -5653,11 +5653,15 @@ this.fire("fovAxis",this._fovAxis);}},{key:"near",get:/** * * Fires a "far" event on change. * + * Default value is ````10000.0````. + * * @param {Number} value New Perspective far plane position. */,set:function set(value){var near=value!==undefined&&value!==null?value:0.1;if(this._state.near===near){return;}this._state.near=near;this._needUpdate(0);// Ensure matrix built on next "tick" this.fire("near",this._state.near);}},{key:"far",get:/** * Gets the position of this Perspective's far plane on the positive View-space Z-axis. * + * Default value is ````10000.0````. + * * @return {Number} The Perspective's far plane position. */function get(){return this._state.far;}/** * Gets the Perspective's projection transform matrix. @@ -5667,7 +5671,7 @@ this.fire("near",this._state.near);}},{key:"far",get:/** * Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````. * * @returns {Number[]} The Perspective's projection matrix. - */,set:function set(value){var far=value!==undefined&&value!==null?value:2000.0;if(this._state.far===far){return;}this._state.far=far;this._needUpdate(0);// Ensure matrix built on next "tick" + */,set:function set(value){var far=value!==undefined&&value!==null?value:10000.0;if(this._state.far===far){return;}this._state.far=far;this._needUpdate(0);// Ensure matrix built on next "tick" this.fire("far",this._state.far);}},{key:"matrix",get:function get(){if(this._updateScheduled){this._doUpdate();}return this._state.matrix;}/** * Gets the inverse of {@link Perspective#matrix}. * @@ -5703,7 +5707,7 @@ this.fire("far",this._state.far);}},{key:"matrix",get:function get(){if(this._up * @property camera * @type {Camera} * @final - */_this36.camera=camera;_this36._state=new RenderState({matrix:math.mat4(),inverseMatrix:math.mat4(),transposedMatrix:math.mat4(),near:0.1,far:2000.0});_this36._inverseMatrixDirty=true;_this36._transposedMatrixDirty=true;_this36.scale=cfg.scale;_this36.near=cfg.near;_this36.far=cfg.far;_this36._onCanvasBoundary=_this36.scene.canvas.on("boundary",_this36._needUpdate,_assertThisInitialized(_this36));return _this36;}_createClass(Ortho,[{key:"type",get:/** + */_this36.camera=camera;_this36._state=new RenderState({matrix:math.mat4(),inverseMatrix:math.mat4(),transposedMatrix:math.mat4(),near:0.1,far:10000.0});_this36._inverseMatrixDirty=true;_this36._transposedMatrixDirty=true;_this36.scale=cfg.scale;_this36.near=cfg.near;_this36.far=cfg.far;_this36._onCanvasBoundary=_this36.scene.canvas.on("boundary",_this36._needUpdate,_assertThisInitialized(_this36));return _this36;}_createClass(Ortho,[{key:"type",get:/** @private */function get(){return"Ortho";}},{key:"_update",value:function _update(){var WIDTH_INDEX=2;var HEIGHT_INDEX=3;var scene=this.scene;var scale=this._scale;var halfSize=0.5*scale;var boundary=scene.canvas.boundary;var boundaryWidth=boundary[WIDTH_INDEX];var boundaryHeight=boundary[HEIGHT_INDEX];var aspect=boundaryWidth/boundaryHeight;var left;var right;var top;var bottom;if(boundaryWidth>boundaryHeight){left=-halfSize;right=halfSize;top=halfSize/aspect;bottom=-halfSize/aspect;}else{left=-halfSize*aspect;right=halfSize*aspect;top=halfSize;bottom=-halfSize;}math.orthoMat4c(left,right,bottom,top,this._state.near,this._state.far,this._state.matrix);this._inverseMatrixDirty=true;this._transposedMatrixDirty=true;this.glRedraw();this.fire("matrix",this._state.matrix);}/** * Sets scale factor for this Ortho's extents on X and Y axis. @@ -5741,7 +5745,7 @@ this.fire("far",this._state.far);}},{key:"matrix",get:function get(){if(this._up * * Fires a "far" event on change. * - * Default value is ````2000.0````. + * Default value is ````10000.0````. * * @param {Number} value New far ortho plane position. */,set:function set(value){var near=value!==undefined&&value!==null?value:0.1;if(this._state.near===near){return;}this._state.near=near;this._needUpdate(0);this.fire("near",this._state.near);}},{key:"far",get:/** @@ -5758,7 +5762,7 @@ this.fire("far",this._state.far);}},{key:"matrix",get:function get(){if(this._up * Default value is ````[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]````. * * @returns {Number[]} The Ortho's projection matrix. - */,set:function set(value){var far=value!==undefined&&value!==null?value:2000.0;if(this._state.far===far){return;}this._state.far=far;this._needUpdate(0);this.fire("far",this._state.far);}},{key:"matrix",get:function get(){if(this._updateScheduled){this._doUpdate();}return this._state.matrix;}/** + */,set:function set(value){var far=value!==undefined&&value!==null?value:10000.0;if(this._state.far===far){return;}this._state.far=far;this._needUpdate(0);this.fire("far",this._state.far);}},{key:"matrix",get:function get(){if(this._updateScheduled){this._doUpdate();}return this._state.matrix;}/** * Gets the inverse of {@link Ortho#matrix}. * * @returns {Number[]} The inverse of {@link Ortho#matrix}. @@ -15464,11 +15468,11 @@ texArray.set(positionDecodeMatrices[_i310],_i310*16);}var texture=gl.createTextu this.layerIndex=cfg.layerIndex;// Index of this DTXLinesLayer in {@link SceneModel#_layerList}. this._renderers=getRenderers$1(model.scene);this.model=model;this._buffer=new DTXLinesBuffer();this._dataTextureState=new DTXLinesState();this._dataTextureGenerator=new DTXLinesTextureFactory();this._state=new RenderState({origin:math.vec3(cfg.origin),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numVertices:0});this._numPortions=0;// These counts are used to avoid unnecessary render passes this._numVisibleLayerPortions=0;this._numTransparentLayerPortions=0;this._numXRayedLayerPortions=0;this._numSelectedLayerPortions=0;this._numHighlightedLayerPortions=0;this._numClippableLayerPortions=0;this._numPickableLayerPortions=0;this._numCulledLayerPortions=0;this._subPortions=[];this._portionToSubPortionsMap=[];this._bucketGeometries={};this._meshes=[];this._aabb=math.collapseAABB3();this.aabbDirty=true;this._numUpdatesInFrame=0;this._finalized=false;}_createClass(DTXLinesLayer,[{key:"aabb",get:function get(){if(this.aabbDirty){math.collapseAABB3(this._aabb);for(var _i315=0,len=this._meshes.length;_i315MAX_NUMBER_OF_OBJECTS_IN_LAYER$1){dataTextureRamStats$1.cannotCreatePortion.because10BitsObjectId++;}var retVal=this._numPortions+numNewPortions<=MAX_NUMBER_OF_OBJECTS_IN_LAYER$1;var bucketIndex=0;// TODO: Is this a bug? -var bucketGeometryId=portionCfg.geometryId!==undefined&&portionCfg.geometryId!==null?"".concat(portionCfg.geometryId,"#").concat(bucketIndex):"".concat(portionCfg.id,"#").concat(bucketIndex);var alreadyHasPortionGeometry=this._bucketGeometries[bucketGeometryId];if(!alreadyHasPortionGeometry){var maxIndicesOfAnyBits=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);var numVertices=0;var numIndices=0;portionCfg.buckets.forEach(function(bucket){numVertices+=bucket.positionsCompressed.length/3;numIndices+=bucket.indices.length/2;});if(this._state.numVertices+numVertices>MAX_DATA_TEXTURE_HEIGHT$1*4096||maxIndicesOfAnyBits+numIndices>MAX_DATA_TEXTURE_HEIGHT$1*4096){dataTextureRamStats$1.cannotCreatePortion.becauseTextureSize++;}retVal&&(retVal=this._state.numVertices+numVertices<=MAX_DATA_TEXTURE_HEIGHT$1*4096&&maxIndicesOfAnyBits+numIndices<=MAX_DATA_TEXTURE_HEIGHT$1*4096);}return retVal;}},{key:"createPortion",value:function createPortion(mesh,portionCfg){var _this66=this;if(this._finalized){throw"Already finalized";}var subPortionIds=[];// const portionAABB = portionCfg.worldAABB; +var bucketGeometryId=portionCfg.geometryId!==undefined&&portionCfg.geometryId!==null?"".concat(portionCfg.geometryId,"#").concat(bucketIndex):"".concat(portionCfg.id,"#").concat(bucketIndex);var alreadyHasPortionGeometry=this._bucketGeometries[bucketGeometryId];if(!alreadyHasPortionGeometry){var maxIndicesOfAnyBits=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);var numVertices=0;var _numIndices=0;portionCfg.buckets.forEach(function(bucket){numVertices+=bucket.positionsCompressed.length/3;_numIndices+=bucket.indices.length/2;});if(this._state.numVertices+numVertices>MAX_DATA_TEXTURE_HEIGHT$1*4096||maxIndicesOfAnyBits+_numIndices>MAX_DATA_TEXTURE_HEIGHT$1*4096){dataTextureRamStats$1.cannotCreatePortion.becauseTextureSize++;}retVal&&(retVal=this._state.numVertices+numVertices<=MAX_DATA_TEXTURE_HEIGHT$1*4096&&maxIndicesOfAnyBits+_numIndices<=MAX_DATA_TEXTURE_HEIGHT$1*4096);}return retVal;}},{key:"createPortion",value:function createPortion(mesh,portionCfg){var _this66=this;if(this._finalized){throw"Already finalized";}var subPortionIds=[];// const portionAABB = portionCfg.worldAABB; portionCfg.buckets.forEach(function(bucket,bucketIndex){var bucketGeometryId=portionCfg.geometryId!==undefined&&portionCfg.geometryId!==null?"".concat(portionCfg.geometryId,"#").concat(bucketIndex):"".concat(portionCfg.id,"#").concat(bucketIndex);var bucketGeometry=_this66._bucketGeometries[bucketGeometryId];if(!bucketGeometry){bucketGeometry=_this66._createBucketGeometry(portionCfg,bucket);_this66._bucketGeometries[bucketGeometryId]=bucketGeometry;}// const subPortionAABB = math.collapseAABB3(tempAABB3b); var subPortionId=_this66._createSubPortion(portionCfg,bucketGeometry,bucket);//math.expandAABB3(portionAABB, subPortionAABB); subPortionIds.push(subPortionId);});var portionId=this._portionToSubPortionsMap.length;this._portionToSubPortionsMap.push(subPortionIds);this.model.numPortions++;this._meshes.push(mesh);return portionId;}},{key:"_createBucketGeometry",value:function _createBucketGeometry(portionCfg,bucket){if(bucket.indices){var alignedIndicesLen=Math.ceil(bucket.indices.length/2/INDICES_EDGE_INDICES_ALIGNEMENT_SIZE$1)*INDICES_EDGE_INDICES_ALIGNEMENT_SIZE$1*2;dataTextureRamStats$1.overheadSizeAlignementIndices+=2*(alignedIndicesLen-bucket.indices.length);var alignedIndices=new Uint32Array(alignedIndicesLen);alignedIndices.fill(0);alignedIndices.set(bucket.indices);bucket.indices=alignedIndices;}var positionsCompressed=bucket.positionsCompressed;var indices=bucket.indices;var buffer=this._buffer;buffer.positionsCompressed.push(positionsCompressed);var vertexBase=buffer.lenPositionsCompressed/3;var numVertices=positionsCompressed.length/3;buffer.lenPositionsCompressed+=positionsCompressed.length;var indicesBase;var numLines=0;if(indices){numLines=indices.length/2;var indicesBuffer;if(numVertices<=1<<8){indicesBuffer=buffer.indices8Bits;indicesBase=buffer.lenIndices8Bits/2;buffer.lenIndices8Bits+=indices.length;}else if(numVertices<=1<<16){indicesBuffer=buffer.indices16Bits;indicesBase=buffer.lenIndices16Bits/2;buffer.lenIndices16Bits+=indices.length;}else{indicesBuffer=buffer.indices32Bits;indicesBase=buffer.lenIndices32Bits/2;buffer.lenIndices32Bits+=indices.length;}indicesBuffer.push(indices);}this._state.numVertices+=numVertices;dataTextureRamStats$1.numberOfGeometries++;var bucketGeometry={vertexBase:vertexBase,numVertices:numVertices,numLines:numLines,indicesBase:indicesBase};return bucketGeometry;}},{key:"_createSubPortion",value:function _createSubPortion(portionCfg,bucketGeometry){var color=portionCfg.color;var colors=portionCfg.colors;var opacity=portionCfg.opacity;var meshMatrix=portionCfg.meshMatrix;var pickColor=portionCfg.pickColor;var buffer=this._buffer;var state=this._state;buffer.perObjectPositionsDecodeMatrices.push(portionCfg.positionsDecodeMatrix);buffer.perObjectInstancePositioningMatrices.push(meshMatrix||DEFAULT_MATRIX$2);buffer.perObjectSolid.push(!!portionCfg.solid);if(colors){buffer.perObjectColors.push([colors[0]*255,colors[1]*255,colors[2]*255,255]);}else if(color){// Color is pre-quantized by SceneModel -buffer.perObjectColors.push([color[0],color[1],color[2],opacity]);}buffer.perObjectPickColors.push(pickColor);buffer.perObjectVertexBases.push(bucketGeometry.vertexBase);{var currentNumIndices;if(bucketGeometry.numVertices<=1<<8){currentNumIndices=state.numIndices8Bits;}else if(bucketGeometry.numVertices<=1<<16){currentNumIndices=state.numIndices16Bits;}else{currentNumIndices=state.numIndices32Bits;}buffer.perObjectIndexBaseOffsets.push(currentNumIndices/2-bucketGeometry.indicesBase);}var subPortionId=this._subPortions.length;if(bucketGeometry.numLines>0){var numIndices=bucketGeometry.numLines*2;var indicesPortionIdBuffer;if(bucketGeometry.numVertices<=1<<8){indicesPortionIdBuffer=buffer.perLineNumberPortionId8Bits;state.numIndices8Bits+=numIndices;dataTextureRamStats$1.totalLines8Bits+=bucketGeometry.numLines;}else if(bucketGeometry.numVertices<=1<<16){indicesPortionIdBuffer=buffer.perLineNumberPortionId16Bits;state.numIndices16Bits+=numIndices;dataTextureRamStats$1.totalLines16Bits+=bucketGeometry.numLines;}else{indicesPortionIdBuffer=buffer.perLineNumberPortionId32Bits;state.numIndices32Bits+=numIndices;dataTextureRamStats$1.totalLines32Bits+=bucketGeometry.numLines;}dataTextureRamStats$1.totalLines+=bucketGeometry.numLines;for(var _i316=0;_i3160){var _numIndices2=bucketGeometry.numLines*2;var indicesPortionIdBuffer;if(bucketGeometry.numVertices<=1<<8){indicesPortionIdBuffer=buffer.perLineNumberPortionId8Bits;state.numIndices8Bits+=_numIndices2;dataTextureRamStats$1.totalLines8Bits+=bucketGeometry.numLines;}else if(bucketGeometry.numVertices<=1<<16){indicesPortionIdBuffer=buffer.perLineNumberPortionId16Bits;state.numIndices16Bits+=_numIndices2;dataTextureRamStats$1.totalLines16Bits+=bucketGeometry.numLines;}else{indicesPortionIdBuffer=buffer.perLineNumberPortionId32Bits;state.numIndices32Bits+=_numIndices2;dataTextureRamStats$1.totalLines32Bits+=bucketGeometry.numLines;}dataTextureRamStats$1.totalLines+=bucketGeometry.numLines;for(var _i316=0;_i316MAX_NUMBER_OF_OBJECTS_IN_LAYER){dataTextureRamStats.cannotCreatePortion.because10BitsObjectId++;}var retVal=this._numPortions+numNewPortions<=MAX_NUMBER_OF_OBJECTS_IN_LAYER;var bucketIndex=0;// TODO: Is this a bug? -var bucketGeometryId=portionCfg.geometryId!==undefined&&portionCfg.geometryId!==null?"".concat(portionCfg.geometryId,"#").concat(bucketIndex):"".concat(portionCfg.id,"#").concat(bucketIndex);var alreadyHasPortionGeometry=this._bucketGeometries[bucketGeometryId];if(!alreadyHasPortionGeometry){var maxIndicesOfAnyBits=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);var numVertices=0;var numIndices=0;portionCfg.buckets.forEach(function(bucket){numVertices+=bucket.positionsCompressed.length/3;numIndices+=bucket.indices.length/3;});if(this._state.numVertices+numVertices>MAX_DATA_TEXTURE_HEIGHT*4096||maxIndicesOfAnyBits+numIndices>MAX_DATA_TEXTURE_HEIGHT*4096){dataTextureRamStats.cannotCreatePortion.becauseTextureSize++;}retVal&&(retVal=this._state.numVertices+numVertices<=MAX_DATA_TEXTURE_HEIGHT*4096&&maxIndicesOfAnyBits+numIndices<=MAX_DATA_TEXTURE_HEIGHT*4096);}return retVal;}/** +var bucketGeometryId=portionCfg.geometryId!==undefined&&portionCfg.geometryId!==null?"".concat(portionCfg.geometryId,"#").concat(bucketIndex):"".concat(portionCfg.id,"#").concat(bucketIndex);var alreadyHasPortionGeometry=this._bucketGeometries[bucketGeometryId];if(!alreadyHasPortionGeometry){var maxIndicesOfAnyBits=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);var numVertices=0;var _numIndices3=0;portionCfg.buckets.forEach(function(bucket){numVertices+=bucket.positionsCompressed.length/3;_numIndices3+=bucket.indices.length/3;});if(this._state.numVertices+numVertices>MAX_DATA_TEXTURE_HEIGHT*4096||maxIndicesOfAnyBits+_numIndices3>MAX_DATA_TEXTURE_HEIGHT*4096){dataTextureRamStats.cannotCreatePortion.becauseTextureSize++;}retVal&&(retVal=this._state.numVertices+numVertices<=MAX_DATA_TEXTURE_HEIGHT*4096&&maxIndicesOfAnyBits+_numIndices3<=MAX_DATA_TEXTURE_HEIGHT*4096);}return retVal;}/** * Creates a new portion within this TrianglesDataTextureLayer, returns the new portion ID. * * Gives the portion the specified geometry, color and matrix. @@ -16141,7 +16145,7 @@ if(bucket.indices){var alignedIndicesLen=Math.ceil(bucket.indices.length/3/INDIC // - in exchange for a small RAM overhead // (by adding some padding until a size that is multiple of INDICES_EDGE_INDICES_ALIGNEMENT_SIZE) if(bucket.edgeIndices){var alignedEdgeIndicesLen=Math.ceil(bucket.edgeIndices.length/2/INDICES_EDGE_INDICES_ALIGNEMENT_SIZE)*INDICES_EDGE_INDICES_ALIGNEMENT_SIZE*2;dataTextureRamStats.overheadSizeAlignementEdgeIndices+=2*(alignedEdgeIndicesLen-bucket.edgeIndices.length);var alignedEdgeIndices=new Uint32Array(alignedEdgeIndicesLen);alignedEdgeIndices.fill(0);alignedEdgeIndices.set(bucket.edgeIndices);bucket.edgeIndices=alignedEdgeIndices;}var positionsCompressed=bucket.positionsCompressed;var indices=bucket.indices;var edgeIndices=bucket.edgeIndices;var buffer=this._buffer;buffer.positionsCompressed.push(positionsCompressed);var vertexBase=buffer.lenPositionsCompressed/3;var numVertices=positionsCompressed.length/3;buffer.lenPositionsCompressed+=positionsCompressed.length;var indicesBase;var numTriangles=0;if(indices){numTriangles=indices.length/3;var indicesBuffer;if(numVertices<=1<<8){indicesBuffer=buffer.indices8Bits;indicesBase=buffer.lenIndices8Bits/3;buffer.lenIndices8Bits+=indices.length;}else if(numVertices<=1<<16){indicesBuffer=buffer.indices16Bits;indicesBase=buffer.lenIndices16Bits/3;buffer.lenIndices16Bits+=indices.length;}else{indicesBuffer=buffer.indices32Bits;indicesBase=buffer.lenIndices32Bits/3;buffer.lenIndices32Bits+=indices.length;}indicesBuffer.push(indices);}var edgeIndicesBase;var numEdges=0;if(edgeIndices){numEdges=edgeIndices.length/2;var edgeIndicesBuffer;if(numVertices<=1<<8){edgeIndicesBuffer=buffer.edgeIndices8Bits;edgeIndicesBase=buffer.lenEdgeIndices8Bits/2;buffer.lenEdgeIndices8Bits+=edgeIndices.length;}else if(numVertices<=1<<16){edgeIndicesBuffer=buffer.edgeIndices16Bits;edgeIndicesBase=buffer.lenEdgeIndices16Bits/2;buffer.lenEdgeIndices16Bits+=edgeIndices.length;}else{edgeIndicesBuffer=buffer.edgeIndices32Bits;edgeIndicesBase=buffer.lenEdgeIndices32Bits/2;buffer.lenEdgeIndices32Bits+=edgeIndices.length;}edgeIndicesBuffer.push(edgeIndices);}this._state.numVertices+=numVertices;dataTextureRamStats.numberOfGeometries++;var bucketGeometry={vertexBase:vertexBase,numVertices:numVertices,numTriangles:numTriangles,numEdges:numEdges,indicesBase:indicesBase,edgeIndicesBase:edgeIndicesBase};return bucketGeometry;}},{key:"_createSubPortion",value:function _createSubPortion(portionCfg,bucketGeometry,bucket,subPortionAABB){var color=portionCfg.color;portionCfg.metallic;portionCfg.roughness;var colors=portionCfg.colors;var opacity=portionCfg.opacity;var meshMatrix=portionCfg.meshMatrix;var pickColor=portionCfg.pickColor;var buffer=this._buffer;var state=this._state;buffer.perObjectPositionsDecodeMatrices.push(portionCfg.positionsDecodeMatrix);buffer.perObjectInstancePositioningMatrices.push(meshMatrix||DEFAULT_MATRIX$1);buffer.perObjectSolid.push(!!portionCfg.solid);if(colors){buffer.perObjectColors.push([colors[0]*255,colors[1]*255,colors[2]*255,255]);}else if(color){// Color is pre-quantized by SceneModel -buffer.perObjectColors.push([color[0],color[1],color[2],opacity]);}buffer.perObjectPickColors.push(pickColor);buffer.perObjectVertexBases.push(bucketGeometry.vertexBase);{var currentNumIndices;if(bucketGeometry.numVertices<=1<<8){currentNumIndices=state.numIndices8Bits;}else if(bucketGeometry.numVertices<=1<<16){currentNumIndices=state.numIndices16Bits;}else{currentNumIndices=state.numIndices32Bits;}buffer.perObjectIndexBaseOffsets.push(currentNumIndices/3-bucketGeometry.indicesBase);}{var currentNumEdgeIndices;if(bucketGeometry.numVertices<=1<<8){currentNumEdgeIndices=state.numEdgeIndices8Bits;}else if(bucketGeometry.numVertices<=1<<16){currentNumEdgeIndices=state.numEdgeIndices16Bits;}else{currentNumEdgeIndices=state.numEdgeIndices32Bits;}buffer.perObjectEdgeIndexBaseOffsets.push(currentNumEdgeIndices/2-bucketGeometry.edgeIndicesBase);}var subPortionId=this._subPortions.length;if(bucketGeometry.numTriangles>0){var numIndices=bucketGeometry.numTriangles*3;var indicesPortionIdBuffer;if(bucketGeometry.numVertices<=1<<8){indicesPortionIdBuffer=buffer.perTriangleNumberPortionId8Bits;state.numIndices8Bits+=numIndices;dataTextureRamStats.totalPolygons8Bits+=bucketGeometry.numTriangles;}else if(bucketGeometry.numVertices<=1<<16){indicesPortionIdBuffer=buffer.perTriangleNumberPortionId16Bits;state.numIndices16Bits+=numIndices;dataTextureRamStats.totalPolygons16Bits+=bucketGeometry.numTriangles;}else{indicesPortionIdBuffer=buffer.perTriangleNumberPortionId32Bits;state.numIndices32Bits+=numIndices;dataTextureRamStats.totalPolygons32Bits+=bucketGeometry.numTriangles;}dataTextureRamStats.totalPolygons+=bucketGeometry.numTriangles;for(var _i366=0;_i3660){var numEdgeIndices=bucketGeometry.numEdges*2;var edgeIndicesPortionIdBuffer;if(bucketGeometry.numVertices<=1<<8){edgeIndicesPortionIdBuffer=buffer.perEdgeNumberPortionId8Bits;state.numEdgeIndices8Bits+=numEdgeIndices;dataTextureRamStats.totalEdges8Bits+=bucketGeometry.numEdges;}else if(bucketGeometry.numVertices<=1<<16){edgeIndicesPortionIdBuffer=buffer.perEdgeNumberPortionId16Bits;state.numEdgeIndices16Bits+=numEdgeIndices;dataTextureRamStats.totalEdges16Bits+=bucketGeometry.numEdges;}else{edgeIndicesPortionIdBuffer=buffer.perEdgeNumberPortionId32Bits;state.numEdgeIndices32Bits+=numEdgeIndices;dataTextureRamStats.totalEdges32Bits+=bucketGeometry.numEdges;}dataTextureRamStats.totalEdges+=bucketGeometry.numEdges;for(var _i367=0;_i3670){var _numIndices4=bucketGeometry.numTriangles*3;var indicesPortionIdBuffer;if(bucketGeometry.numVertices<=1<<8){indicesPortionIdBuffer=buffer.perTriangleNumberPortionId8Bits;state.numIndices8Bits+=_numIndices4;dataTextureRamStats.totalPolygons8Bits+=bucketGeometry.numTriangles;}else if(bucketGeometry.numVertices<=1<<16){indicesPortionIdBuffer=buffer.perTriangleNumberPortionId16Bits;state.numIndices16Bits+=_numIndices4;dataTextureRamStats.totalPolygons16Bits+=bucketGeometry.numTriangles;}else{indicesPortionIdBuffer=buffer.perTriangleNumberPortionId32Bits;state.numIndices32Bits+=_numIndices4;dataTextureRamStats.totalPolygons32Bits+=bucketGeometry.numTriangles;}dataTextureRamStats.totalPolygons+=bucketGeometry.numTriangles;for(var _i366=0;_i3660){var numEdgeIndices=bucketGeometry.numEdges*2;var edgeIndicesPortionIdBuffer;if(bucketGeometry.numVertices<=1<<8){edgeIndicesPortionIdBuffer=buffer.perEdgeNumberPortionId8Bits;state.numEdgeIndices8Bits+=numEdgeIndices;dataTextureRamStats.totalEdges8Bits+=bucketGeometry.numEdges;}else if(bucketGeometry.numVertices<=1<<16){edgeIndicesPortionIdBuffer=buffer.perEdgeNumberPortionId16Bits;state.numEdgeIndices16Bits+=numEdgeIndices;dataTextureRamStats.totalEdges16Bits+=bucketGeometry.numEdges;}else{edgeIndicesPortionIdBuffer=buffer.perEdgeNumberPortionId32Bits;state.numEdgeIndices32Bits+=numEdgeIndices;dataTextureRamStats.totalEdges32Bits+=bucketGeometry.numEdges;}dataTextureRamStats.totalEdges+=bucketGeometry.numEdges;for(var _i367=0;_i3670){cfg.colorsCompressed=new Uint8Array(cfg.colorsCompressed);}else if(cfg.colors&&cfg.colors.length>0){var colors=cfg.colors;var colorsCompressed=new Uint8Array(colors.length);for(var _i413=0,_len85=colors.length;_i413<_len85;_i413++){colorsCompressed[_i413]=colors[_i413]*255;}cfg.colorsCompressed=colorsCompressed;}if(!cfg.buckets&&!cfg.edgeIndices&&(cfg.primitive==="triangles"||cfg.primitive==="solid"||cfg.primitive==="surface")){if(cfg.positions){cfg.edgeIndices=buildEdgeIndices(cfg.positions,cfg.indices,null,5.0);}else{cfg.edgeIndices=buildEdgeIndices(cfg.positionsCompressed,cfg.indices,cfg.positionsDecodeMatrix,2.0);}}if(cfg.uv){var bounds=geometryCompressionUtils.getUVBounds(cfg.uv);var result=geometryCompressionUtils.compressUVs(cfg.uv,bounds.min,bounds.max);cfg.uvCompressed=result.quantized;cfg.uvDecodeMatrix=result.decodeMatrix;}else if(cfg.uvCompressed){cfg.uvCompressed=new Uint16Array(cfg.uvCompressed);cfg.uvDecodeMatrix=new Float64Array(cfg.uvDecodeMatrix);}if(cfg.normals){// HACK + */},{key:"createGeometry",value:function createGeometry(cfg){if(cfg.id===undefined||cfg.id===null){this.error("[createGeometry] Config missing: id");return;}if(this._geometries[cfg.id]){this.error("[createGeometry] Geometry already created: "+cfg.id);return;}if(cfg.primitive===undefined||cfg.primitive===null){cfg.primitive="triangles";}if(cfg.primitive!=="points"&&cfg.primitive!=="lines"&&cfg.primitive!=="triangles"&&cfg.primitive!=="solid"&&cfg.primitive!=="surface"){this.error("[createGeometry] Unsupported value for 'primitive': '".concat(cfg.primitive,"' - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'. Defaulting to 'triangles'."));return;}if(!cfg.positions&&!cfg.positionsCompressed&&!cfg.buckets){this.error("[createGeometry] Param expected: `positions`, `positionsCompressed' or 'buckets");return null;}if(cfg.positionsCompressed&&!cfg.positionsDecodeMatrix&&!cfg.positionsDecodeBoundary){this.error("[createGeometry] Param expected: `positionsDecodeMatrix` or 'positionsDecodeBoundary' (required for `positionsCompressed')");return null;}if(cfg.positionsDecodeMatrix&&cfg.positionsDecodeBoundary){this.error("[createGeometry] Only one of these params expected: `positionsDecodeMatrix` or 'positionsDecodeBoundary' (required for `positionsCompressed')");return null;}if(cfg.uvCompressed&&!cfg.uvDecodeMatrix){this.error("[createGeometry] Param expected: `uvDecodeMatrix` (required for `uvCompressed')");return null;}if(!cfg.buckets&&!cfg.indices&&(cfg.primitive==="triangles"||cfg.primitive==="solid"||cfg.primitive==="surface")){var numPositions=(cfg.positions||cfg.positionsCompressed).length/3;cfg.indices=this._createDefaultIndices(numPositions);}if(!cfg.buckets&&!cfg.indices&&cfg.primitive!=="points"){this.error("[createGeometry] Param expected: indices (required for '".concat(cfg.primitive,"' primitive type)"));return null;}if(cfg.positionsDecodeBoundary){cfg.positionsDecodeMatrix=createPositionsDecodeMatrix(cfg.positionsDecodeBoundary,math.mat4());}if(cfg.positions){var aabb=math.collapseAABB3();cfg.positionsDecodeMatrix=math.mat4();math.expandAABB3Points3(aabb,cfg.positions);cfg.positionsCompressed=quantizePositions(cfg.positions,aabb,cfg.positionsDecodeMatrix);cfg.aabb=aabb;}else if(cfg.positionsCompressed){var _aabb=math.collapseAABB3();cfg.positionsDecodeMatrix=new Float64Array(cfg.positionsDecodeMatrix);cfg.positionsCompressed=new Uint16Array(cfg.positionsCompressed);math.expandAABB3Points3(_aabb,cfg.positionsCompressed);geometryCompressionUtils.decompressAABB(_aabb,cfg.positionsDecodeMatrix);cfg.aabb=_aabb;}else if(cfg.buckets){var _aabb2=math.collapseAABB3();this._dtxBuckets[cfg.id]=cfg.buckets;for(var _i412=0,len=cfg.buckets.length;_i4120){cfg.colorsCompressed=new Uint8Array(cfg.colorsCompressed);}else if(cfg.colors&&cfg.colors.length>0){var colors=cfg.colors;var colorsCompressed=new Uint8Array(colors.length);for(var _i413=0,_len85=colors.length;_i413<_len85;_i413++){colorsCompressed[_i413]=colors[_i413]*255;}cfg.colorsCompressed=colorsCompressed;}if(!cfg.buckets&&!cfg.edgeIndices&&(cfg.primitive==="triangles"||cfg.primitive==="solid"||cfg.primitive==="surface")){if(cfg.positions){cfg.edgeIndices=buildEdgeIndices(cfg.positions,cfg.indices,null,5.0);}else{cfg.edgeIndices=buildEdgeIndices(cfg.positionsCompressed,cfg.indices,cfg.positionsDecodeMatrix,2.0);}}if(cfg.uv){var bounds=geometryCompressionUtils.getUVBounds(cfg.uv);var result=geometryCompressionUtils.compressUVs(cfg.uv,bounds.min,bounds.max);cfg.uvCompressed=result.quantized;cfg.uvDecodeMatrix=result.decodeMatrix;}else if(cfg.uvCompressed){cfg.uvCompressed=new Uint16Array(cfg.uvCompressed);cfg.uvDecodeMatrix=new Float64Array(cfg.uvDecodeMatrix);}if(cfg.normals){// HACK cfg.normals=null;}this._geometries[cfg.id]=cfg;this._numTriangles+=cfg.indices?Math.round(cfg.indices.length/3):0;this.numGeometries++;}/** * Creates a texture within this SceneModel. * @@ -18360,7 +18364,7 @@ if(!this._textureTranscoder){this.error("[createTexture] Can't create texture fr * @param {Number} [cfg.roughness=1] Roughness factor in range ````[0..1]````. Overridden by texture set ````metallicRoughnessTexture````. * @returns {Boolean} True = successfully mesh was created. False = error during creation of a mesh. */},{key:"createMesh",value:function createMesh(cfg){if(cfg.id===undefined||cfg.id===null){this.error("[createMesh] SceneModel.createMesh() config missing: id");return false;}if(this._scheduledMeshes[cfg.id]){this.error("[createMesh] SceneModel already has a mesh with this ID: ".concat(cfg.id));return false;}var instancing=cfg.geometryId!==undefined;var batching=!instancing;if(batching){// Batched geometry -if(cfg.primitive===undefined||cfg.primitive===null){cfg.primitive="triangles";}if(cfg.primitive!=="points"&&cfg.primitive!=="lines"&&cfg.primitive!=="triangles"&&cfg.primitive!=="solid"&&cfg.primitive!=="surface"){this.error("Unsupported value for 'primitive': '".concat(primitive,"' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'."));return false;}if(!cfg.positions&&!cfg.positionsCompressed&&!cfg.buckets){this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)");return false;}if(cfg.positions&&(cfg.positionsDecodeMatrix||cfg.positionsDecodeBoundary)){this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");return false;}if(cfg.positionsCompressed&&!cfg.positionsDecodeMatrix&&!cfg.positionsDecodeBoundary){this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");return false;}if(cfg.uvCompressed&&!cfg.uvDecodeMatrix){this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)");return false;}if(!cfg.buckets&&!cfg.indices&&cfg.primitive!=="points"){this.error("Param expected: indices (required for '".concat(cfg.primitive,"' primitive type)"));return false;}if((cfg.matrix||cfg.position||cfg.rotation||cfg.scale)&&(cfg.positionsCompressed||cfg.positionsDecodeBoundary)){this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'");return false;}var useDTX=!!this._dtxEnabled&&(cfg.primitive==="triangles"||cfg.primitive==="solid"||cfg.primitive==="surface")&&!cfg.textureSetId;cfg.origin=cfg.origin?math.addVec3(this._origin,cfg.origin,math.vec3()):this._origin;// MATRIX - optional for batching +if(cfg.primitive===undefined||cfg.primitive===null){cfg.primitive="triangles";}if(cfg.primitive!=="points"&&cfg.primitive!=="lines"&&cfg.primitive!=="triangles"&&cfg.primitive!=="solid"&&cfg.primitive!=="surface"){this.error("Unsupported value for 'primitive': '".concat(primitive,"' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'."));return false;}if(!cfg.positions&&!cfg.positionsCompressed&&!cfg.buckets){this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)");return false;}if(cfg.positions&&(cfg.positionsDecodeMatrix||cfg.positionsDecodeBoundary)){this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");return false;}if(cfg.positionsCompressed&&!cfg.positionsDecodeMatrix&&!cfg.positionsDecodeBoundary){this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)");return false;}if(cfg.uvCompressed&&!cfg.uvDecodeMatrix){this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)");return false;}if(!cfg.buckets&&!cfg.indices&&(cfg.primitive==="triangles"||cfg.primitive==="solid"||cfg.primitive==="surface")){var numPositions=(cfg.positions||cfg.positionsCompressed).length/3;cfg.indices=this._createDefaultIndices(numPositions);}if(!cfg.buckets&&!cfg.indices&&cfg.primitive!=="points"){cfg.indices=this._createDefaultIndices(numIndices);this.error("Param expected: indices (required for '".concat(cfg.primitive,"' primitive type)"));return false;}if((cfg.matrix||cfg.position||cfg.rotation||cfg.scale)&&(cfg.positionsCompressed||cfg.positionsDecodeBoundary)){this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'");return false;}var useDTX=!!this._dtxEnabled&&(cfg.primitive==="triangles"||cfg.primitive==="solid"||cfg.primitive==="surface")&&!cfg.textureSetId;cfg.origin=cfg.origin?math.addVec3(this._origin,cfg.origin,math.vec3()):this._origin;// MATRIX - optional for batching if(cfg.matrix){cfg.meshMatrix=cfg.matrix;}else if(cfg.scale||cfg.rotation||cfg.position){var _scale3=cfg.scale||DEFAULT_SCALE;var _position=cfg.position||DEFAULT_POSITION;var rotation=cfg.rotation||DEFAULT_ROTATION;math.eulerToQuaternion(rotation,"XYZ",DEFAULT_QUATERNION);cfg.meshMatrix=math.composeMat4(_position,DEFAULT_QUATERNION,_scale3,math.mat4());}if(cfg.positionsDecodeBoundary){cfg.positionsDecodeMatrix=createPositionsDecodeMatrix(cfg.positionsDecodeBoundary,math.mat4());}if(useDTX){// DTX cfg.type=DTX;// NPR cfg.color=cfg.color?new Uint8Array([Math.floor(cfg.color[0]*255),Math.floor(cfg.color[1]*255),Math.floor(cfg.color[2]*255)]):defaultCompressedColor;cfg.opacity=cfg.opacity!==undefined&&cfg.opacity!==null?Math.floor(cfg.opacity*255):255;// RTC @@ -18388,8 +18392,8 @@ if(cfg.textureSetId){cfg.textureSet=this._textureSets[cfg.textureSetId];// if (! // this.error(`[createMesh] Texture set not found: ${cfg.textureSetId} - ensure that you create it first with createTextureSet()`); // return false; // } -}}}cfg.numPrimitives=this._getNumPrimitives(cfg);this._meshesCfgsBeforeMeshCreation[cfg.id]=cfg;return true;}},{key:"_createMesh",value:function _createMesh(cfg){var mesh=new SceneModelMesh(this,cfg.id,cfg.color,cfg.opacity,cfg.transform,cfg.textureSet);mesh.pickId=this.scene._renderer.getPickID(mesh);var pickId=mesh.pickId;var a=pickId>>24&0xFF;var b=pickId>>16&0xFF;var g=pickId>>8&0xFF;var r=pickId&0xFF;cfg.pickColor=new Uint8Array([r,g,b,a]);// Quantized pick color -cfg.solid=cfg.primitive==="solid";mesh.origin=math.vec3(cfg.origin);switch(cfg.type){case DTX:mesh.layer=this._getDTXLayer(cfg);mesh.aabb=cfg.aabb;break;case VBO_BATCHED:mesh.layer=this._getVBOBatchingLayer(cfg);mesh.aabb=cfg.aabb;break;case VBO_INSTANCED:mesh.layer=this._getVBOInstancingLayer(cfg);mesh.aabb=cfg.aabb;break;}if(cfg.transform){cfg.meshMatrix=cfg.transform.worldMatrix;}mesh.portionId=mesh.layer.createPortion(mesh,cfg);return mesh;}},{key:"_getNumPrimitives",value:function _getNumPrimitives(cfg){var countIndices=0;var primitive=cfg.geometry?cfg.geometry.primitive:cfg.primitive;switch(primitive){case"triangles":case"solid":case"surface":switch(cfg.type){case DTX:for(var _i415=0,len=cfg.buckets.length;_i415>24&0xFF;var b=pickId>>16&0xFF;var g=pickId>>8&0xFF;var r=pickId&0xFF;cfg.pickColor=new Uint8Array([r,g,b,a]);// Quantized pick color +cfg.solid=cfg.primitive==="solid";mesh.origin=math.vec3(cfg.origin);switch(cfg.type){case DTX:mesh.layer=this._getDTXLayer(cfg);mesh.aabb=cfg.aabb;break;case VBO_BATCHED:mesh.layer=this._getVBOBatchingLayer(cfg);mesh.aabb=cfg.aabb;break;case VBO_INSTANCED:mesh.layer=this._getVBOInstancingLayer(cfg);mesh.aabb=cfg.aabb;break;}if(cfg.transform){cfg.meshMatrix=cfg.transform.worldMatrix;}mesh.portionId=mesh.layer.createPortion(mesh,cfg);return mesh;}},{key:"_getNumPrimitives",value:function _getNumPrimitives(cfg){var countIndices=0;var primitive=cfg.geometry?cfg.geometry.primitive:cfg.primitive;switch(primitive){case"triangles":case"solid":case"surface":switch(cfg.type){case DTX:for(var _i416=0,len=cfg.buckets.length;_i416>>0).toString(16);return hashString;}},{key:"_getVBOInstancingLayer",value:function _getVBOInstancingLayer(cfg){var model=this;var origin=cfg.origin;var textureSetId=cfg.textureSetId||"-";var geometryId=cfg.geometryId;var layerId="".concat(Math.round(origin[0]),".").concat(Math.round(origin[1]),".").concat(Math.round(origin[2]),".").concat(textureSetId,".").concat(geometryId);var vboInstancingLayer=this._vboInstancingLayers[layerId];if(vboInstancingLayer){return vboInstancingLayer;}var textureSet=cfg.textureSet;var geometry=cfg.geometry;while(!vboInstancingLayer){switch(geometry.primitive){case"triangles":// console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`); vboInstancingLayer=new VBOInstancingTrianglesLayer({model:model,textureSet:textureSet,geometry:geometry,origin:origin,layerIndex:0,solid:false});break;case"solid":// console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`); vboInstancingLayer=new VBOInstancingTrianglesLayer({model:model,textureSet:textureSet,geometry:geometry,origin:origin,layerIndex:0,solid:true});break;case"surface":// console.info(`[SceneModel ${this.id}]: creating TrianglesInstancingLayer`); @@ -18450,7 +18454,7 @@ vboInstancingLayer=new VBOInstancingPointsLayer({model:model,textureSet:textureS * @param {Boolean} [cfg.selected=false] Indicates if the SceneModelEntity is initially selected. Selected appearance is configured by {@link SceneModel#selectedMaterial}. * @param {Boolean} [cfg.edges=false] Indicates if the SceneModelEntity's edges are initially emphasized. Edges appearance is configured by {@link SceneModel#edgeMaterial}. * @returns {SceneModelEntity} The new SceneModelEntity. - */},{key:"createEntity",value:function createEntity(cfg){if(cfg.id===undefined){cfg.id=math.createUUID();}else if(this.scene.components[cfg.id]){this.error("Scene already has a Component with this ID: ".concat(cfg.id," - will assign random ID"));cfg.id=math.createUUID();}if(cfg.meshIds===undefined){this.error("Config missing: meshIds");return;}var flags=0;if(this._visible&&cfg.visible!==false){flags=flags|ENTITY_FLAGS.VISIBLE;}if(this._pickable&&cfg.pickable!==false){flags=flags|ENTITY_FLAGS.PICKABLE;}if(this._culled&&cfg.culled!==false){flags=flags|ENTITY_FLAGS.CULLED;}if(this._clippable&&cfg.clippable!==false){flags=flags|ENTITY_FLAGS.CLIPPABLE;}if(this._collidable&&cfg.collidable!==false){flags=flags|ENTITY_FLAGS.COLLIDABLE;}if(this._edges&&cfg.edges!==false){flags=flags|ENTITY_FLAGS.EDGES;}if(this._xrayed&&cfg.xrayed!==false){flags=flags|ENTITY_FLAGS.XRAYED;}if(this._highlighted&&cfg.highlighted!==false){flags=flags|ENTITY_FLAGS.HIGHLIGHTED;}if(this._selected&&cfg.selected!==false){flags=flags|ENTITY_FLAGS.SELECTED;}cfg.flags=flags;this._createEntity(cfg);}},{key:"_createEntity",value:function _createEntity(cfg){var meshes=[];for(var _i419=0,len=cfg.meshIds.length;_i419b.sortId){return 1;}return 0;});for(var _i423=0,_len90=this.layerList.length;_i423<_len90;_i423++){var _layer=this.layerList[_i423];_layer.layerIndex=_i423;}this.glRedraw();this.scene._aabbDirty=true;this._viewMatrixDirty=true;this._matrixDirty=true;this._aabbDirty=true;this._setWorldMatrixDirty();this._sceneModelDirty();this.position=this._position;}/** @private */},{key:"stateSortCompare",value:function stateSortCompare(drawable1,drawable2){}/** @private */},{key:"rebuildRenderFlags",value:function rebuildRenderFlags(){this.renderFlags.reset();this._updateRenderFlagsVisibleLayers();if(this.renderFlags.numLayers>0&&this.renderFlags.numVisibleLayers===0){this.renderFlags.culled=true;return;}this._updateRenderFlags();}/** + */},{key:"finalize",value:function finalize(){if(this.destroyed){return;}for(var _i421=0,len=this.layerList.length;_i421b.sortId){return 1;}return 0;});for(var _i424=0,_len90=this.layerList.length;_i424<_len90;_i424++){var _layer=this.layerList[_i424];_layer.layerIndex=_i424;}this.glRedraw();this.scene._aabbDirty=true;this._viewMatrixDirty=true;this._matrixDirty=true;this._aabbDirty=true;this._setWorldMatrixDirty();this._sceneModelDirty();this.position=this._position;}/** @private */},{key:"stateSortCompare",value:function stateSortCompare(drawable1,drawable2){}/** @private */},{key:"rebuildRenderFlags",value:function rebuildRenderFlags(){this.renderFlags.reset();this._updateRenderFlagsVisibleLayers();if(this.renderFlags.numLayers>0&&this.renderFlags.numVisibleLayers===0){this.renderFlags.culled=true;return;}this._updateRenderFlags();}/** * @private - */},{key:"_updateRenderFlagsVisibleLayers",value:function _updateRenderFlagsVisibleLayers(){var renderFlags=this.renderFlags;renderFlags.numLayers=this.layerList.length;renderFlags.numVisibleLayers=0;for(var layerIndex=0,len=this.layerList.length;layerIndex0){for(var _i424=0;_i4240){renderFlags.colorTransparent=true;}if(this.numXRayedLayerPortions>0){var xrayMaterial=this.scene.xrayMaterial._state;if(xrayMaterial.fill){if(xrayMaterial.fillAlpha<1.0){renderFlags.xrayedSilhouetteTransparent=true;}else{renderFlags.xrayedSilhouetteOpaque=true;}}if(xrayMaterial.edges){if(xrayMaterial.edgeAlpha<1.0){renderFlags.xrayedEdgesTransparent=true;}else{renderFlags.xrayedEdgesOpaque=true;}}}if(this.numEdgesLayerPortions>0){var edgeMaterial=this.scene.edgeMaterial._state;if(edgeMaterial.edges){renderFlags.edgesOpaque=this.numTransparentLayerPortions0){renderFlags.edgesTransparent=true;}}}if(this.numSelectedLayerPortions>0){var selectedMaterial=this.scene.selectedMaterial._state;if(selectedMaterial.fill){if(selectedMaterial.fillAlpha<1.0){renderFlags.selectedSilhouetteTransparent=true;}else{renderFlags.selectedSilhouetteOpaque=true;}}if(selectedMaterial.edges){if(selectedMaterial.edgeAlpha<1.0){renderFlags.selectedEdgesTransparent=true;}else{renderFlags.selectedEdgesOpaque=true;}}}if(this.numHighlightedLayerPortions>0){var highlightMaterial=this.scene.highlightMaterial._state;if(highlightMaterial.fill){if(highlightMaterial.fillAlpha<1.0){renderFlags.highlightedSilhouetteTransparent=true;}else{renderFlags.highlightedSilhouetteOpaque=true;}}if(highlightMaterial.edges){if(highlightMaterial.edgeAlpha<1.0){renderFlags.highlightedEdgesTransparent=true;}else{renderFlags.highlightedEdgesOpaque=true;}}}}// -------------- RENDERING --------------------------------------------------------------------------------------- -/** @private */},{key:"drawColorOpaque",value:function drawColorOpaque(frameCtx){var renderFlags=this.renderFlags;for(var _i425=0,len=renderFlags.visibleLayers.length;_i4250){for(var _i425=0;_i4250){renderFlags.colorTransparent=true;}if(this.numXRayedLayerPortions>0){var xrayMaterial=this.scene.xrayMaterial._state;if(xrayMaterial.fill){if(xrayMaterial.fillAlpha<1.0){renderFlags.xrayedSilhouetteTransparent=true;}else{renderFlags.xrayedSilhouetteOpaque=true;}}if(xrayMaterial.edges){if(xrayMaterial.edgeAlpha<1.0){renderFlags.xrayedEdgesTransparent=true;}else{renderFlags.xrayedEdgesOpaque=true;}}}if(this.numEdgesLayerPortions>0){var edgeMaterial=this.scene.edgeMaterial._state;if(edgeMaterial.edges){renderFlags.edgesOpaque=this.numTransparentLayerPortions0){renderFlags.edgesTransparent=true;}}}if(this.numSelectedLayerPortions>0){var selectedMaterial=this.scene.selectedMaterial._state;if(selectedMaterial.fill){if(selectedMaterial.fillAlpha<1.0){renderFlags.selectedSilhouetteTransparent=true;}else{renderFlags.selectedSilhouetteOpaque=true;}}if(selectedMaterial.edges){if(selectedMaterial.edgeAlpha<1.0){renderFlags.selectedEdgesTransparent=true;}else{renderFlags.selectedEdgesOpaque=true;}}}if(this.numHighlightedLayerPortions>0){var highlightMaterial=this.scene.highlightMaterial._state;if(highlightMaterial.fill){if(highlightMaterial.fillAlpha<1.0){renderFlags.highlightedSilhouetteTransparent=true;}else{renderFlags.highlightedSilhouetteOpaque=true;}}if(highlightMaterial.edges){if(highlightMaterial.edgeAlpha<1.0){renderFlags.highlightedEdgesTransparent=true;}else{renderFlags.highlightedEdgesOpaque=true;}}}}// -------------- RENDERING --------------------------------------------------------------------------------------- +/** @private */},{key:"drawColorOpaque",value:function drawColorOpaque(frameCtx){var renderFlags=this.renderFlags;for(var _i426=0,len=renderFlags.visibleLayers.length;_i426 { + */},{key:"destroy",value:function destroy(){for(var layerId in this._vboBatchingLayers){if(this._vboBatchingLayers.hasOwnProperty(layerId)){this._vboBatchingLayers[layerId].destroy();}}this._vboBatchingLayers={};for(var _layerId in this._vboInstancingLayers){if(this._vboInstancingLayers.hasOwnProperty(_layerId)){this._vboInstancingLayers[_layerId].destroy();}}this._vboInstancingLayers={};this.scene.camera.off(this._onCameraViewMatrix);this.scene.off(this._onTick);for(var _i446=0,len=this.layerList.length;_i446 { // geometry.destroy(); // }); this._geometries={};this._dtxBuckets={};this._textures={};this._textureSets={};this._meshes={};this._entities={};this.scene._aabbDirty=true;if(this._isModel){this.scene._deregisterModel(this);}putScratchMemory();_get(_getPrototypeOf(SceneModel.prototype),"destroy",this).call(this);}}]);return SceneModel;}(Component);/** @@ -18576,7 +18580,7 @@ var _uniquifyPositions=uniquifyPositions({positionsCompressed:geometry.positions * @param {Number[]} [cfg.color=[0,0,0]] The color of this ````LineSet````. This is both emissive and diffuse. * @param {Boolean} [cfg.visible=true] Indicates whether or not this ````LineSet```` is visible. * @param {Number} [cfg.opacity=1.0] ````LineSet````'s initial opacity factor. - */function LineSet(owner){var _this76;var cfg=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,LineSet);_this76=_super113.call(this,owner,cfg);_this76._positions=cfg.positions||[];if(cfg.indices){_this76._indices=cfg.indices;}else{_this76._indices=[];for(var _i447=0,len=_this76._positions.length/3-1;_i4471&&arguments[1]!==undefined?arguments[1]:{};_classCallCheck(this,LineSet);_this76=_super113.call(this,owner,cfg);_this76._positions=cfg.positions||[];if(cfg.indices){_this76._indices=cfg.indices;}else{_this76._indices=[];for(var _i448=0,len=_this76._positions.length/3-1;_i4481&&arguments[1]!==undefined?arguments[1]:{};if(!bcfViewpoint){return;}var viewer=this.viewer;var scene=viewer.scene;var camera=scene.camera;var rayCast=options.rayCast!==false;var immediate=options.immediate!==false;var reset=options.reset!==false;var realWorldOffset=scene.realWorldOffset;var reverseClippingPlanes=options.reverseClippingPlanes===true;scene.clearSectionPlanes();if(bcfViewpoint.clipping_planes&&bcfViewpoint.clipping_planes.length>0){bcfViewpoint.clipping_planes.forEach(function(e){var pos=xyzObjectToArray(e.location,tempVec3$5);var dir=xyzObjectToArray(e.direction,tempVec3$5);if(reverseClippingPlanes){math.negateVec3(dir);}math.subVec3(pos,realWorldOffset);if(camera.yUp){pos=ZToY(pos);dir=ZToY(dir);}new SectionPlane(scene,{pos:pos,dir:dir});});}scene.clearLines();if(bcfViewpoint.lines&&bcfViewpoint.lines.length>0){var positions=[];var indices=[];var _i450=0;bcfViewpoint.lines.forEach(function(e){if(!e.start_point){return;}if(!e.end_point){return;}positions.push(e.start_point.x);positions.push(e.start_point.y);positions.push(e.start_point.z);positions.push(e.end_point.x);positions.push(e.end_point.y);positions.push(e.end_point.z);indices.push(_i450++);indices.push(_i450++);});new LineSet(scene,{positions:positions,indices:indices,clippable:false,collidable:true});}scene.clearBitmaps();if(bcfViewpoint.bitmaps&&bcfViewpoint.bitmaps.length>0){bcfViewpoint.bitmaps.forEach(function(e){var bitmap_type=e.bitmap_type||"jpg";// "jpg" | "png" + */},{key:"setViewpoint",value:function setViewpoint(bcfViewpoint){var _this79=this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!bcfViewpoint){return;}var viewer=this.viewer;var scene=viewer.scene;var camera=scene.camera;var rayCast=options.rayCast!==false;var immediate=options.immediate!==false;var reset=options.reset!==false;var realWorldOffset=scene.realWorldOffset;var reverseClippingPlanes=options.reverseClippingPlanes===true;scene.clearSectionPlanes();if(bcfViewpoint.clipping_planes&&bcfViewpoint.clipping_planes.length>0){bcfViewpoint.clipping_planes.forEach(function(e){var pos=xyzObjectToArray(e.location,tempVec3$5);var dir=xyzObjectToArray(e.direction,tempVec3$5);if(reverseClippingPlanes){math.negateVec3(dir);}math.subVec3(pos,realWorldOffset);if(camera.yUp){pos=ZToY(pos);dir=ZToY(dir);}new SectionPlane(scene,{pos:pos,dir:dir});});}scene.clearLines();if(bcfViewpoint.lines&&bcfViewpoint.lines.length>0){var positions=[];var indices=[];var _i451=0;bcfViewpoint.lines.forEach(function(e){if(!e.start_point){return;}if(!e.end_point){return;}positions.push(e.start_point.x);positions.push(e.start_point.y);positions.push(e.start_point.z);positions.push(e.end_point.x);positions.push(e.end_point.y);positions.push(e.end_point.z);indices.push(_i451++);indices.push(_i451++);});new LineSet(scene,{positions:positions,indices:indices,clippable:false,collidable:true});}scene.clearBitmaps();if(bcfViewpoint.bitmaps&&bcfViewpoint.bitmaps.length>0){bcfViewpoint.bitmaps.forEach(function(e){var bitmap_type=e.bitmap_type||"jpg";// "jpg" | "png" var bitmap_data=e.bitmap_data;// base64 var location=xyzObjectToArray(e.location,tempVec3a$9);var normal=xyzObjectToArray(e.normal,tempVec3b$6);var up=xyzObjectToArray(e.up,tempVec3c$4);var height=e.height||1;if(!bitmap_type){return;}if(!bitmap_data){return;}if(!location){return;}if(!normal){return;}if(!up){return;}if(camera.yUp){location=ZToY(location);normal=ZToY(normal);up=ZToY(up);}new Bitmap(scene,{src:bitmap_data,type:bitmap_type,pos:location,normal:normal,up:up,clippable:false,collidable:true,height:height});});}if(reset){scene.setObjectsXRayed(scene.xrayedObjectIds,false);scene.setObjectsHighlighted(scene.highlightedObjectIds,false);scene.setObjectsSelected(scene.selectedObjectIds,false);}if(bcfViewpoint.components){if(bcfViewpoint.components.visibility){if(!bcfViewpoint.components.visibility.default_visibility){scene.setObjectsVisible(scene.objectIds,false);if(bcfViewpoint.components.visibility.exceptions){bcfViewpoint.components.visibility.exceptions.forEach(function(component){return _this79._withBCFComponent(options,component,function(entity){return entity.visible=true;});});}}else{scene.setObjectsVisible(scene.objectIds,true);if(bcfViewpoint.components.visibility.exceptions){bcfViewpoint.components.visibility.exceptions.forEach(function(component){return _this79._withBCFComponent(options,component,function(entity){return entity.visible=false;});});}}var view_setup_hints=bcfViewpoint.components.visibility.view_setup_hints;if(view_setup_hints){if(view_setup_hints.spaces_visible===false){scene.setObjectsVisible(viewer.metaScene.getObjectIDsByType("IfcSpace"),true);}if(view_setup_hints.spaces_translucent!==undefined){scene.setObjectsXRayed(viewer.metaScene.getObjectIDsByType("IfcSpace"),true);}if(view_setup_hints.space_boundaries_visible!==undefined);if(view_setup_hints.openings_visible===false){scene.setObjectsVisible(viewer.metaScene.getObjectIDsByType("IfcOpening"),true);}if(view_setup_hints.space_boundaries_translucent!==undefined);if(view_setup_hints.openings_translucent!==undefined){scene.setObjectsXRayed(viewer.metaScene.getObjectIDsByType("IfcOpening"),true);}}}if(bcfViewpoint.components.selection){scene.setObjectsSelected(scene.selectedObjectIds,false);bcfViewpoint.components.selection.forEach(function(component){return _this79._withBCFComponent(options,component,function(entity){return entity.selected=true;});});}if(bcfViewpoint.components.translucency){scene.setObjectsXRayed(scene.xrayedObjectIds,false);bcfViewpoint.components.translucency.forEach(function(component){return _this79._withBCFComponent(options,component,function(entity){return entity.xrayed=true;});});}if(bcfViewpoint.components.coloring){bcfViewpoint.components.coloring.forEach(function(coloring){var color=coloring.color;var alpha=0;var alphaDefined=false;if(color.length===8){alpha=parseInt(color.substring(0,2),16)/256;if(alpha<=1.0&&alpha>=0.95){alpha=1.0;}color=color.substring(2);alphaDefined=true;}var colorize=[parseInt(color.substring(0,2),16)/256,parseInt(color.substring(2,4),16)/256,parseInt(color.substring(4,6),16)/256];coloring.components.map(function(component){return _this79._withBCFComponent(options,component,function(entity){entity.colorize=colorize;if(alphaDefined){entity.opacity=alpha;}});});});}}if(bcfViewpoint.perspective_camera||bcfViewpoint.orthogonal_camera){var eye;var look;var up;var projection;if(bcfViewpoint.perspective_camera){eye=xyzObjectToArray(bcfViewpoint.perspective_camera.camera_view_point,tempVec3$5);look=xyzObjectToArray(bcfViewpoint.perspective_camera.camera_direction,tempVec3$5);up=xyzObjectToArray(bcfViewpoint.perspective_camera.camera_up_vector,tempVec3$5);camera.perspective.fov=bcfViewpoint.perspective_camera.field_of_view;projection="perspective";}else{eye=xyzObjectToArray(bcfViewpoint.orthogonal_camera.camera_view_point,tempVec3$5);look=xyzObjectToArray(bcfViewpoint.orthogonal_camera.camera_direction,tempVec3$5);up=xyzObjectToArray(bcfViewpoint.orthogonal_camera.camera_up_vector,tempVec3$5);camera.ortho.scale=bcfViewpoint.orthogonal_camera.view_to_world_scale;projection="ortho";}math.subVec3(eye,realWorldOffset);if(camera.yUp){eye=ZToY(eye);look=ZToY(look);up=ZToY(up);}if(rayCast){var hit=scene.pick({pickSurface:true,// <<------ This causes picking to find the intersection point on the entity origin:eye,direction:look});look=hit?hit.worldPos:math.addVec3(eye,look,tempVec3$5);}else{look=math.addVec3(eye,look,tempVec3$5);}if(immediate){camera.eye=eye;camera.look=look;camera.up=up;camera.projection=projection;}else{viewer.cameraFlight.flyTo({eye:eye,look:look,up:up,duration:options.duration,projection:projection});}}}},{key:"_withBCFComponent",value:function _withBCFComponent(options,component,callback){var viewer=this.viewer;var scene=viewer.scene;if(component.authoring_tool_id&&component.originating_system===this.originatingSystem){var id=component.authoring_tool_id;var entity=scene.objects[id];if(entity){callback(entity);return;}if(options.updateCompositeObjects){var metaObject=viewer.metaScene.metaObjects[id];if(metaObject){scene.withObjects(viewer.metaScene.getObjectIDsInSubtree(id),callback);return;}}}if(component.ifc_guid){var originalSystemId=component.ifc_guid;var _entity2=scene.objects[originalSystemId];if(_entity2){callback(_entity2);return;}if(options.updateCompositeObjects){var _metaObject=viewer.metaScene.metaObjects[originalSystemId];if(_metaObject){scene.withObjects(viewer.metaScene.getObjectIDsInSubtree(originalSystemId),callback);return;}}Object.keys(scene.models).forEach(function(modelId){var id=math.globalizeObjectId(modelId,originalSystemId);var entity=scene.objects[id];if(entity){callback(entity);return;}if(options.updateCompositeObjects){var _metaObject2=viewer.metaScene.metaObjects[id];if(_metaObject2){scene.withObjects(viewer.metaScene.getObjectIDsInSubtree(id),callback);}}});}}/** @@ -18985,7 +18989,7 @@ origin:eye,direction:look});look=hit?hit.worldPos:math.addVec3(eye,look,tempVec3 // this._yAxisLabel.setVisible(this.axisVisible && this.yAxisVisible); // this._zAxisLabel.setVisible(this.axisVisible && this.zAxisVisible); // this._lengthLabel.setVisible(false); -this._originDot.setVisible(this._visible&&this._originVisible);this._targetDot.setVisible(this._visible&&this._targetVisible);this._xAxisWire.setVisible(this.axisVisible&&this.xAxisVisible);this._yAxisWire.setVisible(this.axisVisible&&this.yAxisVisible);this._zAxisWire.setVisible(this.axisVisible&&this.zAxisVisible);this._lengthWire.setVisible(this.wireVisible);this._lengthLabel.setCulled(!this.wireVisible);this._cpDirty=false;}}},{key:"_isSliced",value:function _isSliced(positions){var sectionPlanes=this.scene._sectionPlanesState.sectionPlanes;for(var _i451=0,len=sectionPlanes.length;_i4511&&arguments[1]!==undefined?arguments[1]:[];return msg.replace(/\{\{|\}\}|\{(\d+)\}/g,function(m,n){if(m==="{{"){return"{";}if(m==="}}"){return"}";}return args[n];});}/** +}}}]);return LocaleService;}();function resolvePath$1(key,json){if(json[key]){return json[key];}var parts=key.split(".");var obj=json;for(var _i455=0,len=parts.length;obj&&_i4551&&arguments[1]!==undefined?arguments[1]:[];return msg.replace(/\{\{|\}\}|\{(\d+)\}/g,function(m,n){if(m==="{{"){return"{";}if(m==="}}"){return"}";}return args[n];});}/** * @desc Abstract base class for curve classes. */var Curve=/*#__PURE__*/function(_Component31){_inherits(Curve,_Component31);var _super120=_createSuper(Curve);/** * @constructor @@ -20273,7 +20277,7 @@ comparison=arcLengths[i]-targetArcLength;if(comparison<0){low=i+1;}else if(compa * Adds multiple frames to this CameraPath, each frame specified as a set of values for eye, look and up vectors at a given time instant. * * @param {{t:Number, eye:Object, look:Object, up: Object}[]} frames Frames to add to this CameraPath. - */},{key:"addFrames",value:function addFrames(frames){var frame;for(var _i455=0,len=frames.length;_i455>_i458;}return x+1;}/** + */,set:function set(castsShadow){castsShadow=!!castsShadow;if(this._state.castsShadow===castsShadow){return;}this._state.castsShadow=castsShadow;this._shadowViewMatrixDirty=true;this.glRedraw();}},{key:"destroy",value:function destroy(){var camera=this.scene.camera;var canvas=this.scene.canvas;camera.off(this._onCameraViewMatrix);camera.off(this._onCameraProjMatrix);canvas.off(this._onCanvasBoundary);_get(_getPrototypeOf(PointLight.prototype),"destroy",this).call(this);this._state.destroy();if(this._shadowRenderBuf){this._shadowRenderBuf.destroy();}this.scene._lightDestroyed(this);this.glRedraw();}}]);return PointLight;}(Light);function ensureImageSizePowerOfTwo(image){if(!isPowerOfTwo(image.width)||!isPowerOfTwo(image.height)){var _canvas5=document.createElement("canvas");_canvas5.width=nextHighestPowerOfTwo(image.width);_canvas5.height=nextHighestPowerOfTwo(image.height);var ctx=_canvas5.getContext("2d");ctx.drawImage(image,0,0,image.width,image.height,0,0,_canvas5.width,_canvas5.height);image=_canvas5;}return image;}function isPowerOfTwo(x){return(x&x-1)===0;}function nextHighestPowerOfTwo(x){--x;for(var _i459=1;_i459<32;_i459<<=1){x=x|x>>_i459;}return x+1;}/** * @desc A cube texture map. */var CubeTexture=/*#__PURE__*/function(_Component36){_inherits(CubeTexture,_Component36);var _super127=_createSuper(CubeTexture);/** * @constructor @@ -21125,7 +21129,7 @@ if(!self._shadowProjMatrix){self._shadowProjMatrix=math.identityMat4();}var _can // this._state.texture.setImage(this._images, this._state); // this._state.texture.setProps(this._state); // } else -if(this._src){this._loadSrc(this._src);}}},{key:"_loadSrc",value:function _loadSrc(src){var self=this;var gl=this.scene.canvas.gl;this._images=[];var loadFailed=false;var numLoaded=0;var _loop3=function _loop3(_i459){var image=new Image();image.onload=function(){var _image=image;var index=_i459;return function(){if(loadFailed){return;}_image=ensureImageSizePowerOfTwo(_image);self._images[index]=_image;numLoaded++;if(numLoaded===6){var texture=self._state.texture;if(!texture){texture=new Texture2D({gl:gl,target:gl.TEXTURE_CUBE_MAP});self._state.texture=texture;}texture.setImage(self._images,self._state);self.fire("loaded",self._src,false);self.glRedraw();}};}();image.onerror=function(){loadFailed=true;};image.src=src[_i459];};for(var _i459=0;_i459look dist var camera=scene.camera;math.subVec3(camera.eye,camera.look,[]);controllers.cameraFlight.flyTo({aabb:aabb});// TODO: Option to back off to fit AABB in view }else{// Fly to fit target boundary in view controllers.cameraFlight.flyTo({aabb:aabb});}};canvas.addEventListener("touchstart",this._canvasTouchStartHandler=function(e){if(!(configs.active&&configs.pointerEnabled)){return;}if(states.longTouchTimeout!==null){clearTimeout(states.longTouchTimeout);states.longTouchTimeout=null;}var touches=e.touches;var changedTouches=e.changedTouches;touchStartTime=Date.now();if(touches.length===1&&changedTouches.length===1){tapStartTime=touchStartTime;getCanvasPosFromEvent(touches[0],tapStartPos);var rightClickClientX=tapStartPos[0];var rightClickClientY=tapStartPos[1];var rightClickPageX=touches[0].pageX;var rightClickPageY=touches[0].pageY;states.longTouchTimeout=setTimeout(function(){controllers.cameraControl.fire("rightClick",{// For context menus -pagePos:[Math.round(rightClickPageX),Math.round(rightClickPageY)],canvasPos:[Math.round(rightClickClientX),Math.round(rightClickClientY)],event:e},true);states.longTouchTimeout=null;},configs.longTapTimeout);}else{tapStartTime=-1;}while(activeTouches.length-1&¤tTime-tapStartTime-1&&tapStartTime-lastTapTime1&&arguments[1]!==undefined?arguments[1]:{};if(this.finalized){throw"MetaScene already finalized - can't add more data";}this._globalizeIDs(metaModelData,options);var metaScene=this.metaScene;var propertyLookup=metaModelData.properties;// Create global Property Sets -if(metaModelData.propertySets){for(var _i472=0,len=metaModelData.propertySets.length;_i4720&&arguments[0]!==undefined?arguments[0]:{};var needFinishSnapshot=!this._snapshotBegun;var resize=params.width!==undefined&¶ms.height!==undefined;var canvas=this.scene.canvas.canvas;var saveWidth=canvas.clientWidth;var saveHeight=canvas.clientHeight;var width=params.width?Math.floor(params.width):canvas.width;var height=params.height?Math.floor(params.height):canvas.height;if(resize){canvas.width=width;canvas.height=height;}if(!this._snapshotBegun){this.beginSnapshot({width:width,height:height});}if(!params.includeGizmos){this.sendToPlugins("snapshotStarting");// Tells plugins to hide things that shouldn't be in snapshot -}var captured={};for(var _i489=0,len=this._plugins.length;_i4890&&_args[0]!==undefined?_args[0]:{};// We use gl.readPixels to get the WebGL canvas snapshot in a new + */},{key:"getSnapshotWithPlugins",value:function(){var _getSnapshotWithPlugins=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var params,needFinishSnapshot,resize,canvas,saveWidth,saveHeight,snapshotWidth,snapshotHeight,snapshotCanvas,pluginToCapture,pluginContainerElements,_i491,len,plugin,containerElement,_i492,_len100,_containerElement,format,_args=arguments;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1){switch(_context2.prev=_context2.next){case 0:params=_args.length>0&&_args[0]!==undefined?_args[0]:{};// We use gl.readPixels to get the WebGL canvas snapshot in a new // HTMLCanvas element, scaled to the target snapshot size, then // use html2canvas to render each plugin's container element into // that HTMLCanvas. Finally, we save the HTMLCanvas to a bitmap. @@ -24154,22 +24158,22 @@ doublePickFlyTo:true});this._plugins=[];/** // canvas ourselves, in order to allow the Viewer to render the // right amount of pixels, for a sharper image. needFinishSnapshot=!this._snapshotBegun;resize=params.width!==undefined&¶ms.height!==undefined;canvas=this.scene.canvas.canvas;saveWidth=canvas.clientWidth;saveHeight=canvas.clientHeight;snapshotWidth=params.width?Math.floor(params.width):canvas.width;snapshotHeight=params.height?Math.floor(params.height):canvas.height;if(resize){canvas.width=snapshotWidth;canvas.height=snapshotHeight;}if(!this._snapshotBegun){this.beginSnapshot();}if(!params.includeGizmos){this.sendToPlugins("snapshotStarting");// Tells plugins to hide things that shouldn't be in snapshot -}this.scene._renderer.renderSnapshot();snapshotCanvas=this.scene._renderer.readSnapshotAsCanvas();if(resize){canvas.width=saveWidth;canvas.height=saveHeight;this.scene.glRedraw();}pluginToCapture={};pluginContainerElements=[];for(_i490=0,len=this._plugins.length;_i4901&&arguments[1]!==undefined?arguments[1]:true;var transfers=arguments.length>2?arguments[2]:undefined;var transfersSet=transfers||new Set();if(!object);else if(isTransferable(object)){transfersSet.add(object);}else if(isTransferable(object.buffer)){transfersSet.add(object.buffer);}else if(ArrayBuffer.isView(object));else if(recursive&&_typeof(object)==='object'){for(var key in object){getTransferList(object[key],recursive,transfersSet);}}return transfers===undefined?Array.from(transfersSet):[];}function isTransferable(object){if(!object){return false;}if(object instanceof ArrayBuffer){return true;}if(typeof MessagePort!=='undefined'&&object instanceof MessagePort){return true;}if(typeof ImageBitmap!=='undefined'&&object instanceof ImageBitmap){return true;}if(typeof OffscreenCanvas!=='undefined'&&object instanceof OffscreenCanvas){return true;}return false;}var NOOP=function NOOP(){};var WorkerThread=/*#__PURE__*/function(){function WorkerThread(props){_classCallCheck(this,WorkerThread);_defineProperty(this,"name",void 0);_defineProperty(this,"source",void 0);_defineProperty(this,"url",void 0);_defineProperty(this,"terminated",false);_defineProperty(this,"worker",void 0);_defineProperty(this,"onMessage",void 0);_defineProperty(this,"onError",void 0);_defineProperty(this,"_loadableURL",'');var name=props.name,source=props.source,url=props.url;assert$4(source||url);this.name=name;this.source=source;this.url=url;this.onMessage=NOOP;this.onError=function(error){return console.log(error);};this.worker=isBrowser$3?this._createBrowserWorker():this._createNodeWorker();}_createClass(WorkerThread,[{key:"destroy",value:function destroy(){this.onMessage=NOOP;this.onError=NOOP;this.worker.terminate();this.terminated=true;}},{key:"isRunning",get:function get(){return Boolean(this.onMessage);}},{key:"postMessage",value:function postMessage(data,transferList){transferList=transferList||getTransferList(data);this.worker.postMessage(data,transferList);}},{key:"_getErrorFromErrorEvent",value:function _getErrorFromErrorEvent(event){var message='Failed to load ';message+="worker ".concat(this.name," from ").concat(this.url,". ");if(event.message){message+="".concat(event.message," in ");}if(event.lineno){message+=":".concat(event.lineno,":").concat(event.colno);}return new Error(message);}},{key:"_createBrowserWorker",value:function _createBrowserWorker(){var _this107=this;this._loadableURL=getLoadableWorkerURL({source:this.source,url:this.url});var worker=new Worker(this._loadableURL,{name:this.name});worker.onmessage=function(event){if(!event.data){_this107.onError(new Error('No data received'));}else{_this107.onMessage(event.data);}};worker.onerror=function(error){_this107.onError(_this107._getErrorFromErrorEvent(error));_this107.terminated=true;};worker.onmessageerror=function(event){return console.error(event);};return worker;}},{key:"_createNodeWorker",value:function _createNodeWorker(){var _this108=this;var worker;if(this.url){var absolute=this.url.includes(':/')||this.url.startsWith('/');var url=absolute?this.url:"./".concat(this.url);worker=new Worker$1(url,{eval:false});}else if(this.source){worker=new Worker$1(this.source,{eval:true});}else{throw new Error('no worker');}worker.on('message',function(data){_this108.onMessage(data);});worker.on('error',function(error){_this108.onError(error);});worker.on('exit',function(code){});return worker;}}],[{key:"isSupported",value:function isSupported(){return typeof Worker!=='undefined'&&isBrowser$3||_typeof(Worker$1)!==undefined;}}]);return WorkerThread;}();var WorkerPool=/*#__PURE__*/function(){function WorkerPool(props){_classCallCheck(this,WorkerPool);_defineProperty(this,"name",'unnamed');_defineProperty(this,"source",void 0);_defineProperty(this,"url",void 0);_defineProperty(this,"maxConcurrency",1);_defineProperty(this,"maxMobileConcurrency",1);_defineProperty(this,"onDebug",function(){});_defineProperty(this,"reuseWorkers",true);_defineProperty(this,"props",{});_defineProperty(this,"jobQueue",[]);_defineProperty(this,"idleQueue",[]);_defineProperty(this,"count",0);_defineProperty(this,"isDestroyed",false);this.source=props.source;this.url=props.url;this.setProps(props);}_createClass(WorkerPool,[{key:"destroy",value:function destroy(){this.idleQueue.forEach(function(worker){return worker.destroy();});this.isDestroyed=true;}},{key:"setProps",value:function setProps(props){this.props=_objectSpread(_objectSpread({},this.props),props);if(props.name!==undefined){this.name=props.name;}if(props.maxConcurrency!==undefined){this.maxConcurrency=props.maxConcurrency;}if(props.maxMobileConcurrency!==undefined){this.maxMobileConcurrency=props.maxMobileConcurrency;}if(props.reuseWorkers!==undefined){this.reuseWorkers=props.reuseWorkers;}if(props.onDebug!==undefined){this.onDebug=props.onDebug;}}},{key:"startJob",value:function(){var _startJob=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name){var _this109=this;var onMessage,onError,startPromise,_args2=arguments;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:onMessage=_args2.length>1&&_args2[1]!==undefined?_args2[1]:function(job,type,data){return job.done(data);};onError=_args2.length>2&&_args2[2]!==undefined?_args2[2]:function(job,error){return job.error(error);};startPromise=new Promise(function(onStart){_this109.jobQueue.push({name:name,onMessage:onMessage,onError:onError,onStart:onStart});return _this109;});this._startQueuedJob();_context3.next=6;return startPromise;case 6:return _context3.abrupt("return",_context3.sent);case 7:case"end":return _context3.stop();}}},_callee2,this);}));function startJob(_x7){return _startJob.apply(this,arguments);}return startJob;}()},{key:"_startQueuedJob",value:function(){var _startQueuedJob2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var workerThread,queuedJob,job;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:if(this.jobQueue.length){_context4.next=2;break;}return _context4.abrupt("return");case 2:workerThread=this._getAvailableWorker();if(workerThread){_context4.next=5;break;}return _context4.abrupt("return");case 5:queuedJob=this.jobQueue.shift();if(!queuedJob){_context4.next=18;break;}this.onDebug({message:'Starting job',name:queuedJob.name,workerThread:workerThread,backlog:this.jobQueue.length});job=new WorkerJob(queuedJob.name,workerThread);workerThread.onMessage=function(data){return queuedJob.onMessage(job,data.type,data.payload);};workerThread.onError=function(error){return queuedJob.onError(job,error);};queuedJob.onStart(job);_context4.prev=12;_context4.next=15;return job.result;case 15:_context4.prev=15;this.returnWorkerToQueue(workerThread);return _context4.finish(15);case 18:case"end":return _context4.stop();}}},_callee3,this,[[12,,15,18]]);}));function _startQueuedJob(){return _startQueuedJob2.apply(this,arguments);}return _startQueuedJob;}()},{key:"returnWorkerToQueue",value:function returnWorkerToQueue(worker){var shouldDestroyWorker=this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency();if(shouldDestroyWorker){worker.destroy();this.count--;}else{this.idleQueue.push(worker);}if(!this.isDestroyed){this._startQueuedJob();}}},{key:"_getAvailableWorker",value:function _getAvailableWorker(){if(this.idleQueue.length>0){return this.idleQueue.shift()||null;}if(this.count0&&arguments[0]!==undefined?arguments[0]:{};WorkerFarm._workerFarm=WorkerFarm._workerFarm||new WorkerFarm({});WorkerFarm._workerFarm.setProps(props);return WorkerFarm._workerFarm;}}]);return WorkerFarm;}();_defineProperty(WorkerFarm,"_workerFarm",void 0);var NPM_TAG='latest';function getWorkerURL(worker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var workerOptions=options[worker.id]||{};var workerFile="".concat(worker.id,"-worker.js");var url=workerOptions.workerUrl;if(!url&&worker.id==='compression'){url=options.workerUrl;}if(options._workerType==='test'){url="modules/".concat(worker.module,"/dist/").concat(workerFile);}if(!url){var version=worker.version;if(version==='latest'){version=NPM_TAG;}var versionTag=version?"@".concat(version):'';url="https://unpkg.com/@loaders.gl/".concat(worker.module).concat(versionTag,"/dist/").concat(workerFile);}assert$4(url);return url;}function validateWorkerVersion(worker){var coreVersion=arguments.length>1&&arguments[1]!==undefined?arguments[1]:VERSION$9;assert$4(worker,'no worker provided');var workerVersion=worker.version;if(!coreVersion||!workerVersion){return false;}return true;}var ChildProcessProxy={};var node=/*#__PURE__*/Object.freeze({__proto__:null,'default':ChildProcessProxy});var VERSION$8="3.2.6";var loadLibraryPromises={};function loadLibrary(_x8){return _loadLibrary.apply(this,arguments);}function _loadLibrary(){_loadLibrary=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(libraryUrl){var moduleName,options,_args19=arguments;return _regeneratorRuntime().wrap(function _callee21$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:moduleName=_args19.length>1&&_args19[1]!==undefined?_args19[1]:null;options=_args19.length>2&&_args19[2]!==undefined?_args19[2]:{};if(moduleName){libraryUrl=getLibraryUrl(libraryUrl,moduleName,options);}loadLibraryPromises[libraryUrl]=loadLibraryPromises[libraryUrl]||loadLibraryFromFile(libraryUrl);_context25.next=6;return loadLibraryPromises[libraryUrl];case 6:return _context25.abrupt("return",_context25.sent);case 7:case"end":return _context25.stop();}}},_callee21);}));return _loadLibrary.apply(this,arguments);}function getLibraryUrl(library,moduleName,options){if(library.startsWith('http')){return library;}var modules=options.modules||{};if(modules[library]){return modules[library];}if(!isBrowser$3){return"modules/".concat(moduleName,"/dist/libs/").concat(library);}if(options.CDN){assert$4(options.CDN.startsWith('http'));return"".concat(options.CDN,"/").concat(moduleName,"@").concat(VERSION$8,"/dist/libs/").concat(library);}if(isWorker){return"../src/libs/".concat(library);}return"modules/".concat(moduleName,"/src/libs/").concat(library);}function loadLibraryFromFile(_x9){return _loadLibraryFromFile.apply(this,arguments);}function _loadLibraryFromFile(){_loadLibraryFromFile=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(libraryUrl){var _response,response,scriptSource;return _regeneratorRuntime().wrap(function _callee22$(_context26){while(1){switch(_context26.prev=_context26.next){case 0:if(!libraryUrl.endsWith('wasm')){_context26.next=7;break;}_context26.next=3;return fetch(libraryUrl);case 3:_response=_context26.sent;_context26.next=6;return _response.arrayBuffer();case 6:return _context26.abrupt("return",_context26.sent);case 7:if(isBrowser$3){_context26.next=20;break;}_context26.prev=8;_context26.t0=node&&undefined;if(!_context26.t0){_context26.next=14;break;}_context26.next=13;return undefined(libraryUrl);case 13:_context26.t0=_context26.sent;case 14:return _context26.abrupt("return",_context26.t0);case 17:_context26.prev=17;_context26.t1=_context26["catch"](8);return _context26.abrupt("return",null);case 20:if(!isWorker){_context26.next=22;break;}return _context26.abrupt("return",importScripts(libraryUrl));case 22:_context26.next=24;return fetch(libraryUrl);case 24:response=_context26.sent;_context26.next=27;return response.text();case 27:scriptSource=_context26.sent;return _context26.abrupt("return",loadLibraryFromString(scriptSource,libraryUrl));case 29:case"end":return _context26.stop();}}},_callee22,null,[[8,17]]);}));return _loadLibraryFromFile.apply(this,arguments);}function loadLibraryFromString(scriptSource,id){if(!isBrowser$3){return undefined&&undefined(scriptSource,id);}if(isWorker){eval.call(global_,scriptSource);return null;}var script=document.createElement('script');script.id=id;try{script.appendChild(document.createTextNode(scriptSource));}catch(e){script.text=scriptSource;}document.body.appendChild(script);return null;}function canParseWithWorker(loader,options){if(!WorkerFarm.isSupported()){return false;}if(!isBrowser$3&&!(options!==null&&options!==void 0&&options._nodeWorkers)){return false;}return loader.worker&&(options===null||options===void 0?void 0:options.worker);}function parseWithWorker(_x10,_x11,_x12,_x13,_x14){return _parseWithWorker.apply(this,arguments);}function _parseWithWorker(){_parseWithWorker=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(loader,data,options,context,parseOnMainThread){var name,url,workerFarm,workerPool,job,result;return _regeneratorRuntime().wrap(function _callee23$(_context27){while(1){switch(_context27.prev=_context27.next){case 0:name=loader.id;url=getWorkerURL(loader,options);workerFarm=WorkerFarm.getWorkerFarm(options);workerPool=workerFarm.getWorkerPool({name:name,url:url});options=JSON.parse(JSON.stringify(options));context=JSON.parse(JSON.stringify(context||{}));_context27.next=8;return workerPool.startJob('process-on-worker',onMessage.bind(null,parseOnMainThread));case 8:job=_context27.sent;job.postMessage('process',{input:data,options:options,context:context});_context27.next=12;return job.result;case 12:result=_context27.sent;_context27.next=15;return result.result;case 15:return _context27.abrupt("return",_context27.sent);case 16:case"end":return _context27.stop();}}},_callee23);}));return _parseWithWorker.apply(this,arguments);}function onMessage(_x15,_x16,_x17,_x18){return _onMessage2.apply(this,arguments);}function _onMessage2(){_onMessage2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee24(parseOnMainThread,job,type,payload){var id,input,options,result,message;return _regeneratorRuntime().wrap(function _callee24$(_context28){while(1){switch(_context28.prev=_context28.next){case 0:_context28.t0=type;_context28.next=_context28.t0==='done'?3:_context28.t0==='error'?5:_context28.t0==='process'?7:20;break;case 3:job.done(payload);return _context28.abrupt("break",21);case 5:job.error(new Error(payload.error));return _context28.abrupt("break",21);case 7:id=payload.id,input=payload.input,options=payload.options;_context28.prev=8;_context28.next=11;return parseOnMainThread(input,options);case 11:result=_context28.sent;job.postMessage('done',{id:id,result:result});_context28.next=19;break;case 15:_context28.prev=15;_context28.t1=_context28["catch"](8);message=_context28.t1 instanceof Error?_context28.t1.message:'unknown error';job.postMessage('error',{id:id,error:message});case 19:return _context28.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(type));case 21:case"end":return _context28.stop();}}},_callee24,null,[[8,15]]);}));return _onMessage2.apply(this,arguments);}function getFirstCharacters$1(data){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:5;if(typeof data==='string'){return data.slice(0,length);}else if(ArrayBuffer.isView(data)){return getMagicString$2(data.buffer,data.byteOffset,length);}else if(data instanceof ArrayBuffer){var byteOffset=0;return getMagicString$2(data,byteOffset,length);}return'';}function getMagicString$2(arrayBuffer,byteOffset,length){if(arrayBuffer.byteLength<=byteOffset+length){return'';}var dataView=new DataView(arrayBuffer);var magic='';for(var _i493=0;_i493=0);assert$5(padding>0);return byteLength+(padding-1)&~(padding-1);}function copyToArray(source,target,targetOffset){var sourceArray;if(source instanceof ArrayBuffer){sourceArray=new Uint8Array(source);}else{var srcByteOffset=source.byteOffset;var srcByteLength=source.byteLength;sourceArray=new Uint8Array(source.buffer||source.arrayBuffer,srcByteOffset,srcByteLength);}target.set(sourceArray,targetOffset);return targetOffset+padToNBytes(sourceArray.byteLength,4);}function concatenateArrayBuffersAsync(_x19){return _concatenateArrayBuffersAsync.apply(this,arguments);}function _concatenateArrayBuffersAsync(){_concatenateArrayBuffersAsync=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee25(asyncIterator){var arrayBuffers,_iteratorAbruptCompletion,_didIteratorError,_iteratorError,_iterator,_step,chunk;return _regeneratorRuntime().wrap(function _callee25$(_context29){while(1){switch(_context29.prev=_context29.next){case 0:arrayBuffers=[];_iteratorAbruptCompletion=false;_didIteratorError=false;_context29.prev=3;_iterator=_asyncIterator(asyncIterator);case 5:_context29.next=7;return _iterator.next();case 7:if(!(_iteratorAbruptCompletion=!(_step=_context29.sent).done)){_context29.next=13;break;}chunk=_step.value;arrayBuffers.push(chunk);case 10:_iteratorAbruptCompletion=false;_context29.next=5;break;case 13:_context29.next=19;break;case 15:_context29.prev=15;_context29.t0=_context29["catch"](3);_didIteratorError=true;_iteratorError=_context29.t0;case 19:_context29.prev=19;_context29.prev=20;if(!(_iteratorAbruptCompletion&&_iterator["return"]!=null)){_context29.next=24;break;}_context29.next=24;return _iterator["return"]();case 24:_context29.prev=24;if(!_didIteratorError){_context29.next=27;break;}throw _iteratorError;case 27:return _context29.finish(24);case 28:return _context29.finish(19);case 29:return _context29.abrupt("return",concatenateArrayBuffers.apply(void 0,arrayBuffers));case 30:case"end":return _context29.stop();}}},_callee25,null,[[3,15,19,29],[20,,24,28]]);}));return _concatenateArrayBuffersAsync.apply(this,arguments);}var pathPrefix='';var fileAliases={};function resolvePath(filename){for(var alias in fileAliases){if(filename.startsWith(alias)){var replacement=fileAliases[alias];filename=filename.replace(alias,replacement);}}if(!filename.startsWith('http://')&&!filename.startsWith('https://')){filename="".concat(pathPrefix).concat(filename);}return filename;}function filename(url){var slashIndex=url&&url.lastIndexOf('/');return slashIndex>=0?url.substr(slashIndex+1):'';}var isBoolean=function isBoolean(x){return typeof x==='boolean';};var isFunction=function isFunction(x){return typeof x==='function';};var isObject=function isObject(x){return x!==null&&_typeof(x)==='object';};var isPureObject=function isPureObject(x){return isObject(x)&&x.constructor==={}.constructor;};var isIterable=function isIterable(x){return x&&typeof x[Symbol.iterator]==='function';};var isAsyncIterable=function isAsyncIterable(x){return x&&typeof x[Symbol.asyncIterator]==='function';};var isResponse=function isResponse(x){return typeof Response!=='undefined'&&x instanceof Response||x&&x.arrayBuffer&&x.text&&x.json;};var isBlob=function isBlob(x){return typeof Blob!=='undefined'&&x instanceof Blob;};var isBuffer=function isBuffer(x){return x&&_typeof(x)==='object'&&x.isBuffer;};var isReadableDOMStream=function isReadableDOMStream(x){return typeof ReadableStream!=='undefined'&&x instanceof ReadableStream||isObject(x)&&isFunction(x.tee)&&isFunction(x.cancel)&&isFunction(x.getReader);};var isReadableNodeStream=function isReadableNodeStream(x){return isObject(x)&&isFunction(x.read)&&isFunction(x.pipe)&&isBoolean(x.readable);};var isReadableStream=function isReadableStream(x){return isReadableDOMStream(x)||isReadableNodeStream(x);};var DATA_URL_PATTERN=/^data:([-\w.]+\/[-\w.+]+)(;|,)/;var MIME_TYPE_PATTERN=/^([-\w.]+\/[-\w.+]+)/;function parseMIMEType(mimeString){var matches=MIME_TYPE_PATTERN.exec(mimeString);if(matches){return matches[1];}return mimeString;}function parseMIMETypeFromURL(url){var matches=DATA_URL_PATTERN.exec(url);if(matches){return matches[1];}return'';}var QUERY_STRING_PATTERN=/\?.*/;function getResourceUrlAndType(resource){if(isResponse(resource)){var url=stripQueryString(resource.url||'');var contentTypeHeader=resource.headers.get('content-type')||'';return{url:url,type:parseMIMEType(contentTypeHeader)||parseMIMETypeFromURL(url)};}if(isBlob(resource)){return{url:stripQueryString(resource.name||''),type:resource.type||''};}if(typeof resource==='string'){return{url:stripQueryString(resource),type:parseMIMETypeFromURL(resource)};}return{url:'',type:''};}function getResourceContentLength(resource){if(isResponse(resource)){return resource.headers['content-length']||-1;}if(isBlob(resource)){return resource.size;}if(typeof resource==='string'){return resource.length;}if(resource instanceof ArrayBuffer){return resource.byteLength;}if(ArrayBuffer.isView(resource)){return resource.byteLength;}return-1;}function stripQueryString(url){return url.replace(QUERY_STRING_PATTERN,'');}function makeResponse(_x20){return _makeResponse.apply(this,arguments);}function _makeResponse(){_makeResponse=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26(resource){var headers,contentLength,_getResourceUrlAndTyp3,url,type,initialDataUrl,response;return _regeneratorRuntime().wrap(function _callee26$(_context30){while(1){switch(_context30.prev=_context30.next){case 0:if(!isResponse(resource)){_context30.next=2;break;}return _context30.abrupt("return",resource);case 2:headers={};contentLength=getResourceContentLength(resource);if(contentLength>=0){headers['content-length']=String(contentLength);}_getResourceUrlAndTyp3=getResourceUrlAndType(resource),url=_getResourceUrlAndTyp3.url,type=_getResourceUrlAndTyp3.type;if(type){headers['content-type']=type;}_context30.next=9;return getInitialDataUrl(resource);case 9:initialDataUrl=_context30.sent;if(initialDataUrl){headers['x-first-bytes']=initialDataUrl;}if(typeof resource==='string'){resource=new TextEncoder().encode(resource);}response=new Response(resource,{headers:headers});Object.defineProperty(response,'url',{value:url});return _context30.abrupt("return",response);case 15:case"end":return _context30.stop();}}},_callee26);}));return _makeResponse.apply(this,arguments);}function checkResponse(_x21){return _checkResponse.apply(this,arguments);}function _checkResponse(){_checkResponse=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee27(response){var message;return _regeneratorRuntime().wrap(function _callee27$(_context31){while(1){switch(_context31.prev=_context31.next){case 0:if(response.ok){_context31.next=5;break;}_context31.next=3;return getResponseError(response);case 3:message=_context31.sent;throw new Error(message);case 5:case"end":return _context31.stop();}}},_callee27);}));return _checkResponse.apply(this,arguments);}function getResponseError(_x22){return _getResponseError.apply(this,arguments);}function _getResponseError(){_getResponseError=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee28(response){var message,contentType,text;return _regeneratorRuntime().wrap(function _callee28$(_context32){while(1){switch(_context32.prev=_context32.next){case 0:message="Failed to fetch resource ".concat(response.url," (").concat(response.status,"): ");_context32.prev=1;contentType=response.headers.get('Content-Type');text=response.statusText;if(!contentType.includes('application/json')){_context32.next=11;break;}_context32.t0=text;_context32.t1=" ";_context32.next=9;return response.text();case 9:_context32.t2=_context32.sent;text=_context32.t0+=_context32.t1.concat.call(_context32.t1,_context32.t2);case 11:message+=text;message=message.length>60?"".concat(message.slice(0,60),"..."):message;_context32.next=17;break;case 15:_context32.prev=15;_context32.t3=_context32["catch"](1);case 17:return _context32.abrupt("return",message);case 18:case"end":return _context32.stop();}}},_callee28,null,[[1,15]]);}));return _getResponseError.apply(this,arguments);}function getInitialDataUrl(_x23){return _getInitialDataUrl.apply(this,arguments);}function _getInitialDataUrl(){_getInitialDataUrl=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee29(resource){var INITIAL_DATA_LENGTH,blobSlice,slice,_base;return _regeneratorRuntime().wrap(function _callee29$(_context33){while(1){switch(_context33.prev=_context33.next){case 0:INITIAL_DATA_LENGTH=5;if(!(typeof resource==='string')){_context33.next=3;break;}return _context33.abrupt("return","data:,".concat(resource.slice(0,INITIAL_DATA_LENGTH)));case 3:if(!(resource instanceof Blob)){_context33.next=8;break;}blobSlice=resource.slice(0,5);_context33.next=7;return new Promise(function(resolve){var reader=new FileReader();reader.onload=function(event){var _event$target;return resolve(event===null||event===void 0?void 0:(_event$target=event.target)===null||_event$target===void 0?void 0:_event$target.result);};reader.readAsDataURL(blobSlice);});case 7:return _context33.abrupt("return",_context33.sent);case 8:if(!(resource instanceof ArrayBuffer)){_context33.next=12;break;}slice=resource.slice(0,INITIAL_DATA_LENGTH);_base=arrayBufferToBase64(slice);return _context33.abrupt("return","data:base64,".concat(_base));case 12:return _context33.abrupt("return",null);case 13:case"end":return _context33.stop();}}},_callee29);}));return _getInitialDataUrl.apply(this,arguments);}function arrayBufferToBase64(buffer){var binary='';var bytes=new Uint8Array(buffer);for(var _i495=0;_i495=0){return true;}return false;}function isBrowser$2(){var isNode=(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&String(process)==='[object process]'&&!process.browser;return!isNode||isElectron$1();}var globals$1={self:typeof self!=='undefined'&&self,window:typeof window!=='undefined'&&window,global:typeof global!=='undefined'&&global,document:typeof document!=='undefined'&&document,process:(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&process};var window_$1=globals$1.window||globals$1.self||globals$1.global;var process_$1=globals$1.process||{};var VERSION$7=typeof __VERSION__!=='undefined'?__VERSION__:'untranspiled source';var isBrowser$1=isBrowser$2();function getStorage$1(type){try{var storage=window[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return storage;}catch(e){return null;}}var LocalStorage$1=/*#__PURE__*/function(){function LocalStorage$1(id,defaultSettings){var type=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'sessionStorage';_classCallCheck(this,LocalStorage$1);this.storage=getStorage$1(type);this.id=id;this.config={};Object.assign(this.config,defaultSettings);this._loadConfiguration();}_createClass(LocalStorage$1,[{key:"getConfiguration",value:function getConfiguration(){return this.config;}},{key:"setConfiguration",value:function setConfiguration(configuration){this.config={};return this.updateConfiguration(configuration);}},{key:"updateConfiguration",value:function updateConfiguration(configuration){Object.assign(this.config,configuration);if(this.storage){var serialized=JSON.stringify(this.config);this.storage.setItem(this.id,serialized);}return this;}},{key:"_loadConfiguration",value:function _loadConfiguration(){var configuration={};if(this.storage){var serializedConfiguration=this.storage.getItem(this.id);configuration=serializedConfiguration?JSON.parse(serializedConfiguration):{};}Object.assign(this.config,configuration);return this;}}]);return LocalStorage$1;}();function formatTime$1(ms){var formatted;if(ms<10){formatted="".concat(ms.toFixed(2),"ms");}else if(ms<100){formatted="".concat(ms.toFixed(1),"ms");}else if(ms<1000){formatted="".concat(ms.toFixed(0),"ms");}else{formatted="".concat((ms/1000).toFixed(2),"s");}return formatted;}function leftPad$1(string){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:8;var padLength=Math.max(length-string.length,0);return"".concat(' '.repeat(padLength)).concat(string);}function formatImage$1(image,message,scale){var maxWidth=arguments.length>3&&arguments[3]!==undefined?arguments[3]:600;var imageUrl=image.src.replace(/\(/g,'%28').replace(/\)/g,'%29');if(image.width>maxWidth){scale=Math.min(scale,maxWidth/image.width);}var width=image.width*scale;var height=image.height*scale;var style=['font-size:1px;',"padding:".concat(Math.floor(height/2),"px ").concat(Math.floor(width/2),"px;"),"line-height:".concat(height,"px;"),"background:url(".concat(imageUrl,");"),"background-size:".concat(width,"px ").concat(height,"px;"),'color:transparent;'].join('');return["".concat(message," %c+"),style];}var COLOR$1={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function getColor$1(color){return typeof color==='string'?COLOR$1[color.toUpperCase()]||COLOR$1.WHITE:color;}function addColor$1(string,color,background){if(!isBrowser$1&&typeof string==='string'){if(color){color=getColor$1(color);string="\x1B[".concat(color,"m").concat(string,"\x1B[39m");}if(background){color=getColor$1(background);string="\x1B[".concat(background+10,"m").concat(string,"\x1B[49m");}}return string;}function autobind$1(obj){var predefined=arguments.length>1&&arguments[1]!==undefined?arguments[1]:['constructor'];var proto=Object.getPrototypeOf(obj);var propNames=Object.getOwnPropertyNames(proto);var _iterator7=_createForOfIteratorHelper(propNames),_step7;try{var _loop4=function _loop4(){var key=_step7.value;if(typeof obj[key]==='function'){if(!predefined.find(function(name){return key===name;})){obj[key]=obj[key].bind(obj);}}};for(_iterator7.s();!(_step7=_iterator7.n()).done;){_loop4();}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}}function assert$3(condition,message){if(!condition){throw new Error(message||'Assertion failed');}}function getHiResTimestamp$1(){var timestamp;if(isBrowser$1&&window_$1.performance){timestamp=window_$1.performance.now();}else if(process_$1.hrtime){var timeParts=process_$1.hrtime();timestamp=timeParts[0]*1000+timeParts[1]/1e6;}else{timestamp=Date.now();}return timestamp;}var originalConsole$1={debug:isBrowser$1?console.debug||console.log:console.log,log:console.log,info:console.info,warn:console.warn,error:console.error};var DEFAULT_SETTINGS$1={enabled:true,level:0};function noop$1(){}var cache$1={};var ONCE$1={once:true};function getTableHeader$1(table){for(var key in table){for(var title in table[key]){return title||'untitled';}}return'empty';}var Log$2=/*#__PURE__*/function(){function Log$2(){var _ref16=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{id:''},id=_ref16.id;_classCallCheck(this,Log$2);this.id=id;this.VERSION=VERSION$7;this._startTs=getHiResTimestamp$1();this._deltaTs=getHiResTimestamp$1();this.LOG_THROTTLE_TIMEOUT=0;this._storage=new LocalStorage$1("__probe-".concat(this.id,"__"),DEFAULT_SETTINGS$1);this.userData={};this.timeStamp("".concat(this.id," started"));autobind$1(this);Object.seal(this);}_createClass(Log$2,[{key:"level",get:function get(){return this.getLevel();},set:function set(newLevel){this.setLevel(newLevel);}},{key:"isEnabled",value:function isEnabled(){return this._storage.config.enabled;}},{key:"getLevel",value:function getLevel(){return this._storage.config.level;}},{key:"getTotal",value:function getTotal(){return Number((getHiResTimestamp$1()-this._startTs).toPrecision(10));}},{key:"getDelta",value:function getDelta(){return Number((getHiResTimestamp$1()-this._deltaTs).toPrecision(10));}},{key:"priority",get:function get(){return this.level;},set:function set(newPriority){this.level=newPriority;}},{key:"getPriority",value:function getPriority(){return this.level;}},{key:"enable",value:function enable(){var enabled=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this._storage.updateConfiguration({enabled:enabled});return this;}},{key:"setLevel",value:function setLevel(level){this._storage.updateConfiguration({level:level});return this;}},{key:"assert",value:function assert(condition,message){assert$3(condition,message);}},{key:"warn",value:function warn(message){return this._getLogFunction(0,message,originalConsole$1.warn,arguments,ONCE$1);}},{key:"error",value:function error(message){return this._getLogFunction(0,message,originalConsole$1.error,arguments);}},{key:"deprecated",value:function deprecated(oldUsage,newUsage){return this.warn("`".concat(oldUsage,"` is deprecated and will be removed in a later version. Use `").concat(newUsage,"` instead"));}},{key:"removed",value:function removed(oldUsage,newUsage){return this.error("`".concat(oldUsage,"` has been removed. Use `").concat(newUsage,"` instead"));}},{key:"probe",value:function probe(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole$1.log,arguments,{time:true,once:true});}},{key:"log",value:function log(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole$1.debug,arguments);}},{key:"info",value:function info(logLevel,message){return this._getLogFunction(logLevel,message,console.info,arguments);}},{key:"once",value:function once(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole$1.debug||originalConsole$1.info,arguments,ONCE$1);}},{key:"table",value:function table(logLevel,_table,columns){if(_table){return this._getLogFunction(logLevel,_table,console.table||noop$1,columns&&[columns],{tag:getTableHeader$1(_table)});}return noop$1;}},{key:"image",value:function(_image6){function image(_x26){return _image6.apply(this,arguments);}image.toString=function(){return _image6.toString();};return image;}(function(_ref17){var logLevel=_ref17.logLevel,priority=_ref17.priority,image=_ref17.image,_ref17$message=_ref17.message,message=_ref17$message===void 0?'':_ref17$message,_ref17$scale=_ref17.scale,scale=_ref17$scale===void 0?1:_ref17$scale;if(!this._shouldLog(logLevel||priority)){return noop$1;}return isBrowser$1?logImageInBrowser$1({image:image,message:message,scale:scale}):logImageInNode$1({image:image,message:message,scale:scale});})},{key:"settings",value:function settings(){if(console.table){console.table(this._storage.config);}else{console.log(this._storage.config);}}},{key:"get",value:function get(setting){return this._storage.config[setting];}},{key:"set",value:function set(setting,value){this._storage.updateConfiguration(_defineProperty2({},setting,value));}},{key:"time",value:function time(logLevel,message){return this._getLogFunction(logLevel,message,console.time?console.time:console.info);}},{key:"timeEnd",value:function timeEnd(logLevel,message){return this._getLogFunction(logLevel,message,console.timeEnd?console.timeEnd:console.info);}},{key:"timeStamp",value:function timeStamp(logLevel,message){return this._getLogFunction(logLevel,message,console.timeStamp||noop$1);}},{key:"group",value:function group(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{collapsed:false};opts=normalizeArguments$1({logLevel:logLevel,message:message,opts:opts});var _opts=opts,collapsed=_opts.collapsed;opts.method=(collapsed?console.groupCollapsed:console.group)||console.info;return this._getLogFunction(opts);}},{key:"groupCollapsed",value:function groupCollapsed(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.group(logLevel,message,Object.assign({},opts,{collapsed:true}));}},{key:"groupEnd",value:function groupEnd(logLevel){return this._getLogFunction(logLevel,'',console.groupEnd||noop$1);}},{key:"withGroup",value:function withGroup(logLevel,message,func){this.group(logLevel,message)();try{func();}finally{this.groupEnd(logLevel)();}}},{key:"trace",value:function trace(){if(console.trace){console.trace();}}},{key:"_shouldLog",value:function _shouldLog(logLevel){return this.isEnabled()&&this.getLevel()>=normalizeLogLevel$1(logLevel);}},{key:"_getLogFunction",value:function _getLogFunction(logLevel,message,method){var args=arguments.length>3&&arguments[3]!==undefined?arguments[3]:[];var opts=arguments.length>4?arguments[4]:undefined;if(this._shouldLog(logLevel)){var _method;opts=normalizeArguments$1({logLevel:logLevel,message:message,args:args,opts:opts});method=method||opts.method;assert$3(method);opts.total=this.getTotal();opts.delta=this.getDelta();this._deltaTs=getHiResTimestamp$1();var tag=opts.tag||opts.message;if(opts.once){if(!cache$1[tag]){cache$1[tag]=getHiResTimestamp$1();}else{return noop$1;}}message=decorateMessage$1(this.id,opts.message,opts);return(_method=method).bind.apply(_method,[console,message].concat(_toConsumableArray(opts.args)));}return noop$1;}}]);return Log$2;}();Log$2.VERSION=VERSION$7;function normalizeLogLevel$1(logLevel){if(!logLevel){return 0;}var resolvedLevel;switch(_typeof(logLevel)){case'number':resolvedLevel=logLevel;break;case'object':resolvedLevel=logLevel.logLevel||logLevel.priority||0;break;default:return 0;}assert$3(Number.isFinite(resolvedLevel)&&resolvedLevel>=0);return resolvedLevel;}function normalizeArguments$1(opts){var logLevel=opts.logLevel,message=opts.message;opts.logLevel=normalizeLogLevel$1(logLevel);var args=opts.args?Array.from(opts.args):[];while(args.length&&args.shift()!==message){}opts.args=args;switch(_typeof(logLevel)){case'string':case'function':if(message!==undefined){args.unshift(message);}opts.message=logLevel;break;case'object':Object.assign(opts,logLevel);break;}if(typeof opts.message==='function'){opts.message=opts.message();}var messageType=_typeof(opts.message);assert$3(messageType==='string'||messageType==='object');return Object.assign(opts,opts.opts);}function decorateMessage$1(id,message,opts){if(typeof message==='string'){var _time=opts.time?leftPad$1(formatTime$1(opts.total)):'';message=opts.time?"".concat(id,": ").concat(_time," ").concat(message):"".concat(id,": ").concat(message);message=addColor$1(message,opts.color,opts.background);}return message;}function logImageInNode$1(_ref18){var image=_ref18.image,_ref18$message=_ref18.message,message=_ref18$message===void 0?'':_ref18$message,_ref18$scale=_ref18.scale,scale=_ref18$scale===void 0?1:_ref18$scale;var asciify=null;try{asciify=module.require('asciify-image');}catch(error){}if(asciify){return function(){return asciify(image,{fit:'box',width:"".concat(Math.round(80*scale),"%")}).then(function(data){return console.log(data);});};}return noop$1;}function logImageInBrowser$1(_ref19){var image=_ref19.image,_ref19$message=_ref19.message,message=_ref19$message===void 0?'':_ref19$message,_ref19$scale=_ref19.scale,scale=_ref19$scale===void 0?1:_ref19$scale;if(typeof image==='string'){var img=new Image();img.onload=function(){var _console;var args=formatImage$1(img,message,scale);(_console=console).log.apply(_console,_toConsumableArray(args));};img.src=image;return noop$1;}var element=image.nodeName||'';if(element.toLowerCase()==='img'){var _console2;(_console2=console).log.apply(_console2,_toConsumableArray(formatImage$1(image,message,scale)));return noop$1;}if(element.toLowerCase()==='canvas'){var _img=new Image();_img.onload=function(){var _console3;return(_console3=console).log.apply(_console3,_toConsumableArray(formatImage$1(_img,message,scale)));};_img.src=image.toDataURL();return noop$1;}return noop$1;}var probeLog=new Log$2({id:'loaders.gl'});var NullLog=/*#__PURE__*/function(){function NullLog(){_classCallCheck(this,NullLog);}_createClass(NullLog,[{key:"log",value:function log(){return function(){};}},{key:"info",value:function info(){return function(){};}},{key:"warn",value:function warn(){return function(){};}},{key:"error",value:function error(){return function(){};}}]);return NullLog;}();var ConsoleLog=/*#__PURE__*/function(){function ConsoleLog(){_classCallCheck(this,ConsoleLog);_defineProperty(this,"console",void 0);this.console=console;}_createClass(ConsoleLog,[{key:"log",value:function log(){var _this$console$log;for(var _len102=arguments.length,args=new Array(_len102),_key7=0;_key7<_len102;_key7++){args[_key7]=arguments[_key7];}return(_this$console$log=this.console.log).bind.apply(_this$console$log,[this.console].concat(args));}},{key:"info",value:function info(){var _this$console$info;for(var _len103=arguments.length,args=new Array(_len103),_key8=0;_key8<_len103;_key8++){args[_key8]=arguments[_key8];}return(_this$console$info=this.console.info).bind.apply(_this$console$info,[this.console].concat(args));}},{key:"warn",value:function warn(){var _this$console$warn;for(var _len104=arguments.length,args=new Array(_len104),_key9=0;_key9<_len104;_key9++){args[_key9]=arguments[_key9];}return(_this$console$warn=this.console.warn).bind.apply(_this$console$warn,[this.console].concat(args));}},{key:"error",value:function error(){var _this$console$error;for(var _len105=arguments.length,args=new Array(_len105),_key10=0;_key10<_len105;_key10++){args[_key10]=arguments[_key10];}return(_this$console$error=this.console.error).bind.apply(_this$console$error,[this.console].concat(args));}}]);return ConsoleLog;}();var DEFAULT_LOADER_OPTIONS={fetch:null,mimeType:undefined,nothrow:false,log:new ConsoleLog(),CDN:'https://unpkg.com/@loaders.gl',worker:true,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:isBrowser$4,_nodeWorkers:false,_workerType:'',limit:0,_limitMB:0,batchSize:'auto',batchDebounceMs:0,metadata:false,transforms:[]};var REMOVED_LOADER_OPTIONS={"throws":'nothrow',dataType:'(no longer used)',uri:'baseUri',method:'fetch.method',headers:'fetch.headers',body:'fetch.body',mode:'fetch.mode',credentials:'fetch.credentials',cache:'fetch.cache',redirect:'fetch.redirect',referrer:'fetch.referrer',referrerPolicy:'fetch.referrerPolicy',integrity:'fetch.integrity',keepalive:'fetch.keepalive',signal:'fetch.signal'};function getGlobalLoaderState(){globalThis.loaders=globalThis.loaders||{};var loaders=globalThis.loaders;loaders._state=loaders._state||{};return loaders._state;}var getGlobalLoaderOptions=function getGlobalLoaderOptions(){var state=getGlobalLoaderState();state.globalOptions=state.globalOptions||_objectSpread({},DEFAULT_LOADER_OPTIONS);return state.globalOptions;};function normalizeOptions(options,loader,loaders,url){loaders=loaders||[];loaders=Array.isArray(loaders)?loaders:[loaders];validateOptions(options,loaders);return normalizeOptionsInternal(loader,options,url);}function getFetchFunction(options,context){var globalOptions=getGlobalLoaderOptions();var fetchOptions=options||globalOptions;if(typeof fetchOptions.fetch==='function'){return fetchOptions.fetch;}if(isObject(fetchOptions.fetch)){return function(url){return fetchFile(url,fetchOptions);};}if(context!==null&&context!==void 0&&context.fetch){return context===null||context===void 0?void 0:context.fetch;}return fetchFile;}function validateOptions(options,loaders){validateOptionsObject(options,null,DEFAULT_LOADER_OPTIONS,REMOVED_LOADER_OPTIONS,loaders);var _iterator8=_createForOfIteratorHelper(loaders),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var loader=_step8.value;var idOptions=options&&options[loader.id]||{};var loaderOptions=loader.options&&loader.options[loader.id]||{};var deprecatedOptions=loader.deprecatedOptions&&loader.deprecatedOptions[loader.id]||{};validateOptionsObject(idOptions,loader.id,loaderOptions,deprecatedOptions,loaders);}}catch(err){_iterator8.e(err);}finally{_iterator8.f();}}function validateOptionsObject(options,id,defaultOptions,deprecatedOptions,loaders){var loaderName=id||'Top level';var prefix=id?"".concat(id,"."):'';for(var key in options){var isSubOptions=!id&&isObject(options[key]);var isBaseUriOption=key==='baseUri'&&!id;var isWorkerUrlOption=key==='workerUrl'&&id;if(!(key in defaultOptions)&&!isBaseUriOption&&!isWorkerUrlOption){if(key in deprecatedOptions){probeLog.warn("".concat(loaderName," loader option '").concat(prefix).concat(key,"' no longer supported, use '").concat(deprecatedOptions[key],"'"))();}else if(!isSubOptions){var suggestion=findSimilarOption(key,loaders);probeLog.warn("".concat(loaderName," loader option '").concat(prefix).concat(key,"' not recognized. ").concat(suggestion))();}}}}function findSimilarOption(optionKey,loaders){var lowerCaseOptionKey=optionKey.toLowerCase();var bestSuggestion='';var _iterator9=_createForOfIteratorHelper(loaders),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var loader=_step9.value;for(var key in loader.options){if(optionKey===key){return"Did you mean '".concat(loader.id,".").concat(key,"'?");}var lowerCaseKey=key.toLowerCase();var isPartialMatch=lowerCaseOptionKey.startsWith(lowerCaseKey)||lowerCaseKey.startsWith(lowerCaseOptionKey);if(isPartialMatch){bestSuggestion=bestSuggestion||"Did you mean '".concat(loader.id,".").concat(key,"'?");}}}}catch(err){_iterator9.e(err);}finally{_iterator9.f();}return bestSuggestion;}function normalizeOptionsInternal(loader,options,url){var loaderDefaultOptions=loader.options||{};var mergedOptions=_objectSpread({},loaderDefaultOptions);addUrlOptions(mergedOptions,url);if(mergedOptions.log===null){mergedOptions.log=new NullLog();}mergeNestedFields(mergedOptions,getGlobalLoaderOptions());mergeNestedFields(mergedOptions,options);return mergedOptions;}function mergeNestedFields(mergedOptions,options){for(var key in options){if(key in options){var value=options[key];if(isPureObject(value)&&isPureObject(mergedOptions[key])){mergedOptions[key]=_objectSpread(_objectSpread({},mergedOptions[key]),options[key]);}else{mergedOptions[key]=options[key];}}}}function addUrlOptions(options,url){if(url&&!('baseUri'in options)){options.baseUri=url;}}function isLoaderObject(loader){var _loader;if(!loader){return false;}if(Array.isArray(loader)){loader=loader[0];}var hasExtensions=Array.isArray((_loader=loader)===null||_loader===void 0?void 0:_loader.extensions);return hasExtensions;}function normalizeLoader(loader){var _loader2,_loader3;assert$5(loader,'null loader');assert$5(isLoaderObject(loader),'invalid loader');var options;if(Array.isArray(loader)){options=loader[1];loader=loader[0];loader=_objectSpread(_objectSpread({},loader),{},{options:_objectSpread(_objectSpread({},loader.options),options)});}if((_loader2=loader)!==null&&_loader2!==void 0&&_loader2.parseTextSync||(_loader3=loader)!==null&&_loader3!==void 0&&_loader3.parseText){loader.text=true;}if(!loader.text){loader.binary=true;}return loader;}var getGlobalLoaderRegistry=function getGlobalLoaderRegistry(){var state=getGlobalLoaderState();state.loaderRegistry=state.loaderRegistry||[];return state.loaderRegistry;};function getRegisteredLoaders(){return getGlobalLoaderRegistry();}function isElectron(mockUserAgent){if(typeof window!=='undefined'&&_typeof(window.process)==='object'&&window.process.type==='renderer'){return true;}if(typeof process!=='undefined'&&_typeof(process.versions)==='object'&&Boolean(process.versions.electron)){return true;}var realUserAgent=(typeof navigator==="undefined"?"undefined":_typeof(navigator))==='object'&&typeof navigator.userAgent==='string'&&navigator.userAgent;var userAgent=mockUserAgent||realUserAgent;if(userAgent&&userAgent.indexOf('Electron')>=0){return true;}return false;}function isBrowser(){var isNode=(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&String(process)==='[object process]'&&!process.browser;return!isNode||isElectron();}var globals={self:typeof self!=='undefined'&&self,window:typeof window!=='undefined'&&window,global:typeof global!=='undefined'&&global,document:typeof document!=='undefined'&&document,process:(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&process};var window_=globals.window||globals.self||globals.global;var process_=globals.process||{};var VERSION$6=typeof __VERSION__!=='undefined'?__VERSION__:'untranspiled source';isBrowser();function getStorage(type){try{var storage=window[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return storage;}catch(e){return null;}}var LocalStorage=/*#__PURE__*/function(){function LocalStorage(id){_classCallCheck(this,LocalStorage);var defaultSettings=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var type=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'sessionStorage';_defineProperty(this,"storage",void 0);_defineProperty(this,"id",void 0);_defineProperty(this,"config",{});this.storage=getStorage(type);this.id=id;this.config={};Object.assign(this.config,defaultSettings);this._loadConfiguration();}_createClass(LocalStorage,[{key:"getConfiguration",value:function getConfiguration(){return this.config;}},{key:"setConfiguration",value:function setConfiguration(configuration){this.config={};return this.updateConfiguration(configuration);}},{key:"updateConfiguration",value:function updateConfiguration(configuration){Object.assign(this.config,configuration);if(this.storage){var serialized=JSON.stringify(this.config);this.storage.setItem(this.id,serialized);}return this;}},{key:"_loadConfiguration",value:function _loadConfiguration(){var configuration={};if(this.storage){var serializedConfiguration=this.storage.getItem(this.id);configuration=serializedConfiguration?JSON.parse(serializedConfiguration):{};}Object.assign(this.config,configuration);return this;}}]);return LocalStorage;}();function formatTime(ms){var formatted;if(ms<10){formatted="".concat(ms.toFixed(2),"ms");}else if(ms<100){formatted="".concat(ms.toFixed(1),"ms");}else if(ms<1000){formatted="".concat(ms.toFixed(0),"ms");}else{formatted="".concat((ms/1000).toFixed(2),"s");}return formatted;}function leftPad(string){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:8;var padLength=Math.max(length-string.length,0);return"".concat(' '.repeat(padLength)).concat(string);}function formatImage(image,message,scale){var maxWidth=arguments.length>3&&arguments[3]!==undefined?arguments[3]:600;var imageUrl=image.src.replace(/\(/g,'%28').replace(/\)/g,'%29');if(image.width>maxWidth){scale=Math.min(scale,maxWidth/image.width);}var width=image.width*scale;var height=image.height*scale;var style=['font-size:1px;',"padding:".concat(Math.floor(height/2),"px ").concat(Math.floor(width/2),"px;"),"line-height:".concat(height,"px;"),"background:url(".concat(imageUrl,");"),"background-size:".concat(width,"px ").concat(height,"px;"),'color:transparent;'].join('');return["".concat(message," %c+"),style];}var COLOR;(function(COLOR){COLOR[COLOR["BLACK"]=30]="BLACK";COLOR[COLOR["RED"]=31]="RED";COLOR[COLOR["GREEN"]=32]="GREEN";COLOR[COLOR["YELLOW"]=33]="YELLOW";COLOR[COLOR["BLUE"]=34]="BLUE";COLOR[COLOR["MAGENTA"]=35]="MAGENTA";COLOR[COLOR["CYAN"]=36]="CYAN";COLOR[COLOR["WHITE"]=37]="WHITE";COLOR[COLOR["BRIGHT_BLACK"]=90]="BRIGHT_BLACK";COLOR[COLOR["BRIGHT_RED"]=91]="BRIGHT_RED";COLOR[COLOR["BRIGHT_GREEN"]=92]="BRIGHT_GREEN";COLOR[COLOR["BRIGHT_YELLOW"]=93]="BRIGHT_YELLOW";COLOR[COLOR["BRIGHT_BLUE"]=94]="BRIGHT_BLUE";COLOR[COLOR["BRIGHT_MAGENTA"]=95]="BRIGHT_MAGENTA";COLOR[COLOR["BRIGHT_CYAN"]=96]="BRIGHT_CYAN";COLOR[COLOR["BRIGHT_WHITE"]=97]="BRIGHT_WHITE";})(COLOR||(COLOR={}));function getColor(color){return typeof color==='string'?COLOR[color.toUpperCase()]||COLOR.WHITE:color;}function addColor(string,color,background){if(!isBrowser&&typeof string==='string'){if(color){color=getColor(color);string="\x1B[".concat(color,"m").concat(string,"\x1B[39m");}if(background){color=getColor(background);string="\x1B[".concat(background+10,"m").concat(string,"\x1B[49m");}}return string;}function autobind(obj){var predefined=arguments.length>1&&arguments[1]!==undefined?arguments[1]:['constructor'];var proto=Object.getPrototypeOf(obj);var propNames=Object.getOwnPropertyNames(proto);var _iterator10=_createForOfIteratorHelper(propNames),_step10;try{var _loop5=function _loop5(){var key=_step10.value;if(typeof obj[key]==='function'){if(!predefined.find(function(name){return key===name;})){obj[key]=obj[key].bind(obj);}}};for(_iterator10.s();!(_step10=_iterator10.n()).done;){_loop5();}}catch(err){_iterator10.e(err);}finally{_iterator10.f();}}function assert$2(condition,message){if(!condition){throw new Error(message||'Assertion failed');}}function getHiResTimestamp(){var timestamp;if(isBrowser&&'performance'in window_){var _window$performance,_window$performance$n;timestamp=window_===null||window_===void 0?void 0:(_window$performance=window_.performance)===null||_window$performance===void 0?void 0:(_window$performance$n=_window$performance.now)===null||_window$performance$n===void 0?void 0:_window$performance$n.call(_window$performance);}else if('hrtime'in process_){var _process$hrtime;var timeParts=process_===null||process_===void 0?void 0:(_process$hrtime=process_.hrtime)===null||_process$hrtime===void 0?void 0:_process$hrtime.call(process_);timestamp=timeParts[0]*1000+timeParts[1]/1e6;}else{timestamp=Date.now();}return timestamp;}var originalConsole={debug:isBrowser?console.debug||console.log:console.log,log:console.log,info:console.info,warn:console.warn,error:console.error};var DEFAULT_SETTINGS={enabled:true,level:0};function noop(){}var cache={};var ONCE={once:true};var Log$1=/*#__PURE__*/function(){function Log$1(){_classCallCheck(this,Log$1);var _ref20=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{id:''},id=_ref20.id;_defineProperty(this,"id",void 0);_defineProperty(this,"VERSION",VERSION$6);_defineProperty(this,"_startTs",getHiResTimestamp());_defineProperty(this,"_deltaTs",getHiResTimestamp());_defineProperty(this,"_storage",void 0);_defineProperty(this,"userData",{});_defineProperty(this,"LOG_THROTTLE_TIMEOUT",0);this.id=id;this._storage=new LocalStorage("__probe-".concat(this.id,"__"),DEFAULT_SETTINGS);this.userData={};this.timeStamp("".concat(this.id," started"));autobind(this);Object.seal(this);}_createClass(Log$1,[{key:"level",get:function get(){return this.getLevel();},set:function set(newLevel){this.setLevel(newLevel);}},{key:"isEnabled",value:function isEnabled(){return this._storage.config.enabled;}},{key:"getLevel",value:function getLevel(){return this._storage.config.level;}},{key:"getTotal",value:function getTotal(){return Number((getHiResTimestamp()-this._startTs).toPrecision(10));}},{key:"getDelta",value:function getDelta(){return Number((getHiResTimestamp()-this._deltaTs).toPrecision(10));}},{key:"priority",get:function get(){return this.level;},set:function set(newPriority){this.level=newPriority;}},{key:"getPriority",value:function getPriority(){return this.level;}},{key:"enable",value:function enable(){var enabled=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this._storage.updateConfiguration({enabled:enabled});return this;}},{key:"setLevel",value:function setLevel(level){this._storage.updateConfiguration({level:level});return this;}},{key:"get",value:function get(setting){return this._storage.config[setting];}},{key:"set",value:function set(setting,value){this._storage.updateConfiguration(_defineProperty2({},setting,value));}},{key:"settings",value:function settings(){if(console.table){console.table(this._storage.config);}else{console.log(this._storage.config);}}},{key:"assert",value:function assert(condition,message){assert$2(condition,message);}},{key:"warn",value:function warn(message){return this._getLogFunction(0,message,originalConsole.warn,arguments,ONCE);}},{key:"error",value:function error(message){return this._getLogFunction(0,message,originalConsole.error,arguments);}},{key:"deprecated",value:function deprecated(oldUsage,newUsage){return this.warn("`".concat(oldUsage,"` is deprecated and will be removed in a later version. Use `").concat(newUsage,"` instead"));}},{key:"removed",value:function removed(oldUsage,newUsage){return this.error("`".concat(oldUsage,"` has been removed. Use `").concat(newUsage,"` instead"));}},{key:"probe",value:function probe(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole.log,arguments,{time:true,once:true});}},{key:"log",value:function log(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole.debug,arguments);}},{key:"info",value:function info(logLevel,message){return this._getLogFunction(logLevel,message,console.info,arguments);}},{key:"once",value:function once(logLevel,message){for(var _len=arguments.length,args=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key];}return this._getLogFunction(logLevel,message,originalConsole.debug||originalConsole.info,arguments,ONCE);}},{key:"table",value:function table(logLevel,_table2,columns){if(_table2){return this._getLogFunction(logLevel,_table2,console.table||noop,columns&&[columns],{tag:getTableHeader(_table2)});}return noop;}},{key:"image",value:function image(_ref){var logLevel=_ref.logLevel,priority=_ref.priority,image=_ref.image,_ref$message=_ref.message,message=_ref$message===void 0?'':_ref$message,_ref$scale=_ref.scale,scale=_ref$scale===void 0?1:_ref$scale;if(!this._shouldLog(logLevel||priority)){return noop;}return isBrowser?logImageInBrowser({image:image,message:message,scale:scale}):logImageInNode({image:image,message:message,scale:scale});}},{key:"time",value:function time(logLevel,message){return this._getLogFunction(logLevel,message,console.time?console.time:console.info);}},{key:"timeEnd",value:function timeEnd(logLevel,message){return this._getLogFunction(logLevel,message,console.timeEnd?console.timeEnd:console.info);}},{key:"timeStamp",value:function timeStamp(logLevel,message){return this._getLogFunction(logLevel,message,console.timeStamp||noop);}},{key:"group",value:function group(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{collapsed:false};var options=normalizeArguments({logLevel:logLevel,message:message,opts:opts});var collapsed=opts.collapsed;options.method=(collapsed?console.groupCollapsed:console.group)||console.info;return this._getLogFunction(options);}},{key:"groupCollapsed",value:function groupCollapsed(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.group(logLevel,message,Object.assign({},opts,{collapsed:true}));}},{key:"groupEnd",value:function groupEnd(logLevel){return this._getLogFunction(logLevel,'',console.groupEnd||noop);}},{key:"withGroup",value:function withGroup(logLevel,message,func){this.group(logLevel,message)();try{func();}finally{this.groupEnd(logLevel)();}}},{key:"trace",value:function trace(){if(console.trace){console.trace();}}},{key:"_shouldLog",value:function _shouldLog(logLevel){return this.isEnabled()&&this.getLevel()>=normalizeLogLevel(logLevel);}},{key:"_getLogFunction",value:function _getLogFunction(logLevel,message,method,args,opts){if(this._shouldLog(logLevel)){var _method2;opts=normalizeArguments({logLevel:logLevel,message:message,args:args,opts:opts});method=method||opts.method;assert$2(method);opts.total=this.getTotal();opts.delta=this.getDelta();this._deltaTs=getHiResTimestamp();var tag=opts.tag||opts.message;if(opts.once){if(!cache[tag]){cache[tag]=getHiResTimestamp();}else{return noop;}}message=decorateMessage(this.id,opts.message,opts);return(_method2=method).bind.apply(_method2,[console,message].concat(_toConsumableArray(opts.args)));}return noop;}}]);return Log$1;}();_defineProperty(Log$1,"VERSION",VERSION$6);function normalizeLogLevel(logLevel){if(!logLevel){return 0;}var resolvedLevel;switch(_typeof(logLevel)){case'number':resolvedLevel=logLevel;break;case'object':resolvedLevel=logLevel.logLevel||logLevel.priority||0;break;default:return 0;}assert$2(Number.isFinite(resolvedLevel)&&resolvedLevel>=0);return resolvedLevel;}function normalizeArguments(opts){var logLevel=opts.logLevel,message=opts.message;opts.logLevel=normalizeLogLevel(logLevel);var args=opts.args?Array.from(opts.args):[];while(args.length&&args.shift()!==message){}switch(_typeof(logLevel)){case'string':case'function':if(message!==undefined){args.unshift(message);}opts.message=logLevel;break;case'object':Object.assign(opts,logLevel);break;}if(typeof opts.message==='function'){opts.message=opts.message();}var messageType=_typeof(opts.message);assert$2(messageType==='string'||messageType==='object');return Object.assign(opts,{args:args},opts.opts);}function decorateMessage(id,message,opts){if(typeof message==='string'){var _time2=opts.time?leftPad(formatTime(opts.total)):'';message=opts.time?"".concat(id,": ").concat(_time2," ").concat(message):"".concat(id,": ").concat(message);message=addColor(message,opts.color,opts.background);}return message;}function logImageInNode(_ref2){var image=_ref2.image,_ref2$message=_ref2.message,message=_ref2$message===void 0?'':_ref2$message,_ref2$scale=_ref2.scale,scale=_ref2$scale===void 0?1:_ref2$scale;var asciify=null;try{asciify=module.require('asciify-image');}catch(error){}if(asciify){return function(){return asciify(image,{fit:'box',width:"".concat(Math.round(80*scale),"%")}).then(function(data){return console.log(data);});};}return noop;}function logImageInBrowser(_ref3){var image=_ref3.image,_ref3$message=_ref3.message,message=_ref3$message===void 0?'':_ref3$message,_ref3$scale=_ref3.scale,scale=_ref3$scale===void 0?1:_ref3$scale;if(typeof image==='string'){var img=new Image();img.onload=function(){var _console4;var args=formatImage(img,message,scale);(_console4=console).log.apply(_console4,_toConsumableArray(args));};img.src=image;return noop;}var element=image.nodeName||'';if(element.toLowerCase()==='img'){var _console5;(_console5=console).log.apply(_console5,_toConsumableArray(formatImage(image,message,scale)));return noop;}if(element.toLowerCase()==='canvas'){var _img2=new Image();_img2.onload=function(){var _console6;return(_console6=console).log.apply(_console6,_toConsumableArray(formatImage(_img2,message,scale)));};_img2.src=image.toDataURL();return noop;}return noop;}function getTableHeader(table){for(var key in table){for(var title in table[key]){return title||'untitled';}}return'empty';}var log=new Log$1({id:'loaders.gl'});var EXT_PATTERN=/\.([^.]+)$/;function selectLoader(_x27){return _selectLoader.apply(this,arguments);}function _selectLoader(){_selectLoader=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee31(data){var loaders,options,context,loader,_args29=arguments;return _regeneratorRuntime().wrap(function _callee31$(_context35){while(1){switch(_context35.prev=_context35.next){case 0:loaders=_args29.length>1&&_args29[1]!==undefined?_args29[1]:[];options=_args29.length>2?_args29[2]:undefined;context=_args29.length>3?_args29[3]:undefined;if(validHTTPResponse(data)){_context35.next=5;break;}return _context35.abrupt("return",null);case 5:loader=selectLoaderSync(data,loaders,_objectSpread(_objectSpread({},options),{},{nothrow:true}),context);if(!loader){_context35.next=8;break;}return _context35.abrupt("return",loader);case 8:if(!isBlob(data)){_context35.next=13;break;}_context35.next=11;return data.slice(0,10).arrayBuffer();case 11:data=_context35.sent;loader=selectLoaderSync(data,loaders,options,context);case 13:if(!(!loader&&!(options!==null&&options!==void 0&&options.nothrow))){_context35.next=15;break;}throw new Error(getNoValidLoaderMessage(data));case 15:return _context35.abrupt("return",loader);case 16:case"end":return _context35.stop();}}},_callee31);}));return _selectLoader.apply(this,arguments);}function selectLoaderSync(data){var loaders=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var options=arguments.length>2?arguments[2]:undefined;var context=arguments.length>3?arguments[3]:undefined;if(!validHTTPResponse(data)){return null;}if(loaders&&!Array.isArray(loaders)){return normalizeLoader(loaders);}var candidateLoaders=[];if(loaders){candidateLoaders=candidateLoaders.concat(loaders);}if(!(options!==null&&options!==void 0&&options.ignoreRegisteredLoaders)){var _candidateLoaders;(_candidateLoaders=candidateLoaders).push.apply(_candidateLoaders,_toConsumableArray(getRegisteredLoaders()));}normalizeLoaders(candidateLoaders);var loader=selectLoaderInternal(data,candidateLoaders,options,context);if(!loader&&!(options!==null&&options!==void 0&&options.nothrow)){throw new Error(getNoValidLoaderMessage(data));}return loader;}function selectLoaderInternal(data,loaders,options,context){var _getResourceUrlAndTyp=getResourceUrlAndType(data),url=_getResourceUrlAndTyp.url,type=_getResourceUrlAndTyp.type;var testUrl=url||(context===null||context===void 0?void 0:context.url);var loader=null;var reason='';if(options!==null&&options!==void 0&&options.mimeType){loader=findLoaderByMIMEType(loaders,options===null||options===void 0?void 0:options.mimeType);reason="match forced by supplied MIME type ".concat(options===null||options===void 0?void 0:options.mimeType);}loader=loader||findLoaderByUrl(loaders,testUrl);reason=reason||(loader?"matched url ".concat(testUrl):'');loader=loader||findLoaderByMIMEType(loaders,type);reason=reason||(loader?"matched MIME type ".concat(type):'');loader=loader||findLoaderByInitialBytes(loaders,data);reason=reason||(loader?"matched initial data ".concat(getFirstCharacters(data)):'');loader=loader||findLoaderByMIMEType(loaders,options===null||options===void 0?void 0:options.fallbackMimeType);reason=reason||(loader?"matched fallback MIME type ".concat(type):'');if(reason){var _loader;log.log(1,"selectLoader selected ".concat((_loader=loader)===null||_loader===void 0?void 0:_loader.name,": ").concat(reason,"."));}return loader;}function validHTTPResponse(data){if(data instanceof Response){if(data.status===204){return false;}}return true;}function getNoValidLoaderMessage(data){var _getResourceUrlAndTyp2=getResourceUrlAndType(data),url=_getResourceUrlAndTyp2.url,type=_getResourceUrlAndTyp2.type;var message='No valid loader found (';message+=url?"".concat(filename(url),", "):'no url provided, ';message+="MIME type: ".concat(type?"\"".concat(type,"\""):'not provided',", ");var firstCharacters=data?getFirstCharacters(data):'';message+=firstCharacters?" first bytes: \"".concat(firstCharacters,"\""):'first bytes: not available';message+=')';return message;}function normalizeLoaders(loaders){var _iterator11=_createForOfIteratorHelper(loaders),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var loader=_step11.value;normalizeLoader(loader);}}catch(err){_iterator11.e(err);}finally{_iterator11.f();}}function findLoaderByUrl(loaders,url){var match=url&&EXT_PATTERN.exec(url);var extension=match&&match[1];return extension?findLoaderByExtension(loaders,extension):null;}function findLoaderByExtension(loaders,extension){extension=extension.toLowerCase();var _iterator12=_createForOfIteratorHelper(loaders),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var loader=_step12.value;var _iterator13=_createForOfIteratorHelper(loader.extensions),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var loaderExtension=_step13.value;if(loaderExtension.toLowerCase()===extension){return loader;}}}catch(err){_iterator13.e(err);}finally{_iterator13.f();}}}catch(err){_iterator12.e(err);}finally{_iterator12.f();}return null;}function findLoaderByMIMEType(loaders,mimeType){var _iterator14=_createForOfIteratorHelper(loaders),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var loader=_step14.value;if(loader.mimeTypes&&loader.mimeTypes.includes(mimeType)){return loader;}if(mimeType==="application/x.".concat(loader.id)){return loader;}}}catch(err){_iterator14.e(err);}finally{_iterator14.f();}return null;}function findLoaderByInitialBytes(loaders,data){if(!data){return null;}var _iterator15=_createForOfIteratorHelper(loaders),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var loader=_step15.value;if(typeof data==='string'){if(testDataAgainstText(data,loader)){return loader;}}else if(ArrayBuffer.isView(data)){if(testDataAgainstBinary(data.buffer,data.byteOffset,loader)){return loader;}}else if(data instanceof ArrayBuffer){var byteOffset=0;if(testDataAgainstBinary(data,byteOffset,loader)){return loader;}}}}catch(err){_iterator15.e(err);}finally{_iterator15.f();}return null;}function testDataAgainstText(data,loader){if(loader.testText){return loader.testText(data);}var tests=Array.isArray(loader.tests)?loader.tests:[loader.tests];return tests.some(function(test){return data.startsWith(test);});}function testDataAgainstBinary(data,byteOffset,loader){var tests=Array.isArray(loader.tests)?loader.tests:[loader.tests];return tests.some(function(test){return testBinary(data,byteOffset,loader,test);});}function testBinary(data,byteOffset,loader,test){if(test instanceof ArrayBuffer){return compareArrayBuffers(test,data,test.byteLength);}switch(_typeof(test)){case'function':return test(data,loader);case'string':var magic=getMagicString$1(data,byteOffset,test.length);return test===magic;default:return false;}}function getFirstCharacters(data){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:5;if(typeof data==='string'){return data.slice(0,length);}else if(ArrayBuffer.isView(data)){return getMagicString$1(data.buffer,data.byteOffset,length);}else if(data instanceof ArrayBuffer){var byteOffset=0;return getMagicString$1(data,byteOffset,length);}return'';}function getMagicString$1(arrayBuffer,byteOffset,length){if(arrayBuffer.byteLength1&&_args5[1]!==undefined?_args5[1]:{};_options$chunkSize=options.chunkSize,chunkSize=_options$chunkSize===void 0?DEFAULT_CHUNK_SIZE$1:_options$chunkSize;byteOffset=0;case 3:if(!(byteOffset2&&arguments[2]!==undefined?arguments[2]:null;if(previousContext){return previousContext;}var resolvedContext=_objectSpread({fetch:getFetchFunction(options,context)},context);if(!Array.isArray(resolvedContext.loaders)){resolvedContext.loaders=null;}return resolvedContext;}function getLoadersFromContext(loaders,context){if(!context&&loaders&&!Array.isArray(loaders)){return loaders;}var candidateLoaders;if(loaders){candidateLoaders=Array.isArray(loaders)?loaders:[loaders];}if(context&&context.loaders){var contextLoaders=Array.isArray(context.loaders)?context.loaders:[context.loaders];candidateLoaders=candidateLoaders?[].concat(_toConsumableArray(candidateLoaders),_toConsumableArray(contextLoaders)):contextLoaders;}return candidateLoaders&&candidateLoaders.length?candidateLoaders:null;}function parse$3(_x31,_x32,_x33,_x34){return _parse$.apply(this,arguments);}function _parse$(){_parse$=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee33(data,loaders,options,context){var _getResourceUrlAndTyp4,url,typedLoaders,candidateLoaders,loader;return _regeneratorRuntime().wrap(function _callee33$(_context37){while(1){switch(_context37.prev=_context37.next){case 0:assert$4(!context||_typeof(context)==='object');if(loaders&&!Array.isArray(loaders)&&!isLoaderObject(loaders)){context=undefined;options=loaders;loaders=undefined;}_context37.next=4;return data;case 4:data=_context37.sent;options=options||{};_getResourceUrlAndTyp4=getResourceUrlAndType(data),url=_getResourceUrlAndTyp4.url;typedLoaders=loaders;candidateLoaders=getLoadersFromContext(typedLoaders,context);_context37.next=11;return selectLoader(data,candidateLoaders,options);case 11:loader=_context37.sent;if(loader){_context37.next=14;break;}return _context37.abrupt("return",null);case 14:options=normalizeOptions(options,loader,candidateLoaders,url);context=getLoaderContext({url:url,parse:parse$3,loaders:candidateLoaders},options,context);_context37.next=18;return parseWithLoader(loader,data,options,context);case 18:return _context37.abrupt("return",_context37.sent);case 19:case"end":return _context37.stop();}}},_callee33);}));return _parse$.apply(this,arguments);}function parseWithLoader(_x35,_x36,_x37,_x38){return _parseWithLoader.apply(this,arguments);}function _parseWithLoader(){_parseWithLoader=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee34(loader,data,options,context){var response,ok,redirected,status,statusText,type,url,headers;return _regeneratorRuntime().wrap(function _callee34$(_context38){while(1){switch(_context38.prev=_context38.next){case 0:validateWorkerVersion(loader);if(isResponse(data)){response=data;ok=response.ok,redirected=response.redirected,status=response.status,statusText=response.statusText,type=response.type,url=response.url;headers=Object.fromEntries(response.headers.entries());context.response={headers:headers,ok:ok,redirected:redirected,status:status,statusText:statusText,type:type,url:url};}_context38.next=4;return getArrayBufferOrStringFromData(data,loader,options);case 4:data=_context38.sent;if(!(loader.parseTextSync&&typeof data==='string')){_context38.next=8;break;}options.dataType='text';return _context38.abrupt("return",loader.parseTextSync(data,options,context,loader));case 8:if(!canParseWithWorker(loader,options)){_context38.next=12;break;}_context38.next=11;return parseWithWorker(loader,data,options,context,parse$3);case 11:return _context38.abrupt("return",_context38.sent);case 12:if(!(loader.parseText&&typeof data==='string')){_context38.next=16;break;}_context38.next=15;return loader.parseText(data,options,context,loader);case 15:return _context38.abrupt("return",_context38.sent);case 16:if(!loader.parse){_context38.next=20;break;}_context38.next=19;return loader.parse(data,options,context,loader);case 19:return _context38.abrupt("return",_context38.sent);case 20:assert$4(!loader.parseSync);throw new Error("".concat(loader.id," loader - no parser found and worker is disabled"));case 22:case"end":return _context38.stop();}}},_callee34);}));return _parseWithLoader.apply(this,arguments);}var VERSION$5="3.2.6";var VERSION$4="3.2.6";var VERSION$3="3.2.6";var BASIS_CDN_ENCODER_WASM="https://unpkg.com/@loaders.gl/textures@".concat(VERSION$3,"/dist/libs/basis_encoder.wasm");var BASIS_CDN_ENCODER_JS="https://unpkg.com/@loaders.gl/textures@".concat(VERSION$3,"/dist/libs/basis_encoder.js");var loadBasisTranscoderPromise;function loadBasisTrascoderModule(_x39){return _loadBasisTrascoderModule.apply(this,arguments);}function _loadBasisTrascoderModule(){_loadBasisTrascoderModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee35(options){var modules;return _regeneratorRuntime().wrap(function _callee35$(_context39){while(1){switch(_context39.prev=_context39.next){case 0:modules=options.modules||{};if(!modules.basis){_context39.next=3;break;}return _context39.abrupt("return",modules.basis);case 3:loadBasisTranscoderPromise=loadBasisTranscoderPromise||loadBasisTrascoder(options);_context39.next=6;return loadBasisTranscoderPromise;case 6:return _context39.abrupt("return",_context39.sent);case 7:case"end":return _context39.stop();}}},_callee35);}));return _loadBasisTrascoderModule.apply(this,arguments);}function loadBasisTrascoder(_x40){return _loadBasisTrascoder.apply(this,arguments);}function _loadBasisTrascoder(){_loadBasisTrascoder=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee36(options){var BASIS,wasmBinary,_yield$Promise$all,_yield$Promise$all2;return _regeneratorRuntime().wrap(function _callee36$(_context40){while(1){switch(_context40.prev=_context40.next){case 0:BASIS=null;wasmBinary=null;_context40.t0=Promise;_context40.next=5;return loadLibrary('basis_transcoder.js','textures',options);case 5:_context40.t1=_context40.sent;_context40.next=8;return loadLibrary('basis_transcoder.wasm','textures',options);case 8:_context40.t2=_context40.sent;_context40.t3=[_context40.t1,_context40.t2];_context40.next=12;return _context40.t0.all.call(_context40.t0,_context40.t3);case 12:_yield$Promise$all=_context40.sent;_yield$Promise$all2=_slicedToArray(_yield$Promise$all,2);BASIS=_yield$Promise$all2[0];wasmBinary=_yield$Promise$all2[1];BASIS=BASIS||globalThis.BASIS;_context40.next=19;return initializeBasisTrascoderModule(BASIS,wasmBinary);case 19:return _context40.abrupt("return",_context40.sent);case 20:case"end":return _context40.stop();}}},_callee36);}));return _loadBasisTrascoder.apply(this,arguments);}function initializeBasisTrascoderModule(BasisModule,wasmBinary){var options={};if(wasmBinary){options.wasmBinary=wasmBinary;}return new Promise(function(resolve){BasisModule(options).then(function(module){var BasisFile=module.BasisFile,initializeBasis=module.initializeBasis;initializeBasis();resolve({BasisFile:BasisFile});});});}var loadBasisEncoderPromise;function loadBasisEncoderModule(_x41){return _loadBasisEncoderModule.apply(this,arguments);}function _loadBasisEncoderModule(){_loadBasisEncoderModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee37(options){var modules;return _regeneratorRuntime().wrap(function _callee37$(_context41){while(1){switch(_context41.prev=_context41.next){case 0:modules=options.modules||{};if(!modules.basisEncoder){_context41.next=3;break;}return _context41.abrupt("return",modules.basisEncoder);case 3:loadBasisEncoderPromise=loadBasisEncoderPromise||loadBasisEncoder(options);_context41.next=6;return loadBasisEncoderPromise;case 6:return _context41.abrupt("return",_context41.sent);case 7:case"end":return _context41.stop();}}},_callee37);}));return _loadBasisEncoderModule.apply(this,arguments);}function loadBasisEncoder(_x42){return _loadBasisEncoder.apply(this,arguments);}function _loadBasisEncoder(){_loadBasisEncoder=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee38(options){var BASIS_ENCODER,wasmBinary,_yield$Promise$all3,_yield$Promise$all4;return _regeneratorRuntime().wrap(function _callee38$(_context42){while(1){switch(_context42.prev=_context42.next){case 0:BASIS_ENCODER=null;wasmBinary=null;_context42.t0=Promise;_context42.next=5;return loadLibrary(BASIS_CDN_ENCODER_JS,'textures',options);case 5:_context42.t1=_context42.sent;_context42.next=8;return loadLibrary(BASIS_CDN_ENCODER_WASM,'textures',options);case 8:_context42.t2=_context42.sent;_context42.t3=[_context42.t1,_context42.t2];_context42.next=12;return _context42.t0.all.call(_context42.t0,_context42.t3);case 12:_yield$Promise$all3=_context42.sent;_yield$Promise$all4=_slicedToArray(_yield$Promise$all3,2);BASIS_ENCODER=_yield$Promise$all4[0];wasmBinary=_yield$Promise$all4[1];BASIS_ENCODER=BASIS_ENCODER||globalThis.BASIS;_context42.next=19;return initializeBasisEncoderModule(BASIS_ENCODER,wasmBinary);case 19:return _context42.abrupt("return",_context42.sent);case 20:case"end":return _context42.stop();}}},_callee38);}));return _loadBasisEncoder.apply(this,arguments);}function initializeBasisEncoderModule(BasisEncoderModule,wasmBinary){var options={};if(wasmBinary){options.wasmBinary=wasmBinary;}return new Promise(function(resolve){BasisEncoderModule(options).then(function(module){var BasisFile=module.BasisFile,KTX2File=module.KTX2File,initializeBasis=module.initializeBasis,BasisEncoder=module.BasisEncoder;initializeBasis();resolve({BasisFile:BasisFile,KTX2File:KTX2File,BasisEncoder:BasisEncoder});});});}var GL_EXTENSIONS_CONSTANTS={COMPRESSED_RGB_S3TC_DXT1_EXT:0x83f0,COMPRESSED_RGBA_S3TC_DXT1_EXT:0x83f1,COMPRESSED_RGBA_S3TC_DXT3_EXT:0x83f2,COMPRESSED_RGBA_S3TC_DXT5_EXT:0x83f3,COMPRESSED_R11_EAC:0x9270,COMPRESSED_SIGNED_R11_EAC:0x9271,COMPRESSED_RG11_EAC:0x9272,COMPRESSED_SIGNED_RG11_EAC:0x9273,COMPRESSED_RGB8_ETC2:0x9274,COMPRESSED_RGBA8_ETC2_EAC:0x9275,COMPRESSED_SRGB8_ETC2:0x9276,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:0x9277,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:0x9278,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:0x9279,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:0x8c00,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:0x8c02,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:0x8c01,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:0x8c03,COMPRESSED_RGB_ETC1_WEBGL:0x8d64,COMPRESSED_RGB_ATC_WEBGL:0x8c92,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:0x8c93,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:0x87ee,COMPRESSED_RGBA_ASTC_4X4_KHR:0x93b0,COMPRESSED_RGBA_ASTC_5X4_KHR:0x93b1,COMPRESSED_RGBA_ASTC_5X5_KHR:0x93b2,COMPRESSED_RGBA_ASTC_6X5_KHR:0x93b3,COMPRESSED_RGBA_ASTC_6X6_KHR:0x93b4,COMPRESSED_RGBA_ASTC_8X5_KHR:0x93b5,COMPRESSED_RGBA_ASTC_8X6_KHR:0x93b6,COMPRESSED_RGBA_ASTC_8X8_KHR:0x93b7,COMPRESSED_RGBA_ASTC_10X5_KHR:0x93b8,COMPRESSED_RGBA_ASTC_10X6_KHR:0x93b9,COMPRESSED_RGBA_ASTC_10X8_KHR:0x93ba,COMPRESSED_RGBA_ASTC_10X10_KHR:0x93bb,COMPRESSED_RGBA_ASTC_12X10_KHR:0x93bc,COMPRESSED_RGBA_ASTC_12X12_KHR:0x93bd,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:0x93d0,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:0x93d1,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:0x93d2,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:0x93d3,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:0x93d4,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:0x93d5,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:0x93d6,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:0x93d7,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:0x93d8,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:0x93d9,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:0x93da,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:0x93db,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:0x93dc,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:0x93dd,COMPRESSED_RED_RGTC1_EXT:0x8dbb,COMPRESSED_SIGNED_RED_RGTC1_EXT:0x8dbc,COMPRESSED_RED_GREEN_RGTC2_EXT:0x8dbd,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:0x8dbe,COMPRESSED_SRGB_S3TC_DXT1_EXT:0x8c4c,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:0x8c4d,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:0x8c4e,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:0x8c4f};var BROWSER_PREFIXES=['','WEBKIT_','MOZ_'];var WEBGL_EXTENSIONS={WEBGL_compressed_texture_s3tc:'dxt',WEBGL_compressed_texture_s3tc_srgb:'dxt-srgb',WEBGL_compressed_texture_etc1:'etc1',WEBGL_compressed_texture_etc:'etc2',WEBGL_compressed_texture_pvrtc:'pvrtc',WEBGL_compressed_texture_atc:'atc',WEBGL_compressed_texture_astc:'astc',EXT_texture_compression_rgtc:'rgtc'};var formats=null;function getSupportedGPUTextureFormats(gl){if(!formats){gl=gl||getWebGLContext()||undefined;formats=new Set();var _iterator16=_createForOfIteratorHelper(BROWSER_PREFIXES),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var prefix=_step16.value;for(var extension in WEBGL_EXTENSIONS){if(gl&&gl.getExtension("".concat(prefix).concat(extension))){var gpuTextureFormat=WEBGL_EXTENSIONS[extension];formats.add(gpuTextureFormat);}}}}catch(err){_iterator16.e(err);}finally{_iterator16.f();}}return formats;}function getWebGLContext(){try{var _canvas6=document.createElement('canvas');return _canvas6.getContext('webgl');}catch(error){return null;}}var n,i,s,a,r,o,l,f;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB";}(n||(n={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT";}(i||(i={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC";}(s||(s={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB";}(a||(a={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2";}(r||(r={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED";}(o||(o={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA";}(l||(l={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG";}(f||(f={}));var KTX2_ID=[0xab,0x4b,0x54,0x58,0x20,0x32,0x30,0xbb,0x0d,0x0a,0x1a,0x0a];function isKTX(data){var id=new Uint8Array(data);var notKTX=id.byteLength1&&_args41[1]!==undefined?_args41[1]:null;if(isEmptyObject(imagebitmapOptions)||!imagebitmapOptionsSupported){imagebitmapOptions=null;}if(!imagebitmapOptions){_context47.next=13;break;}_context47.prev=3;_context47.next=6;return createImageBitmap(blob,imagebitmapOptions);case 6:return _context47.abrupt("return",_context47.sent);case 9:_context47.prev=9;_context47.t0=_context47["catch"](3);console.warn(_context47.t0);imagebitmapOptionsSupported=false;case 13:_context47.next=15;return createImageBitmap(blob);case 15:return _context47.abrupt("return",_context47.sent);case 16:case"end":return _context47.stop();}}},_callee43,null,[[3,9]]);}));return _safeCreateImageBitmap.apply(this,arguments);}function isEmptyObject(object){for(var key in object||EMPTY_OBJECT){return false;}return true;}var BIG_ENDIAN=false;var LITTLE_ENDIAN=true;function getBinaryImageMetadata(binaryData){var dataView=toDataView(binaryData);return getPngMetadata(dataView)||getJpegMetadata(dataView)||getGifMetadata(dataView)||getBmpMetadata(dataView);}function getPngMetadata(binaryData){var dataView=toDataView(binaryData);var isPng=dataView.byteLength>=24&&dataView.getUint32(0,BIG_ENDIAN)===0x89504e47;if(!isPng){return null;}return{mimeType:'image/png',width:dataView.getUint32(16,BIG_ENDIAN),height:dataView.getUint32(20,BIG_ENDIAN)};}function getGifMetadata(binaryData){var dataView=toDataView(binaryData);var isGif=dataView.byteLength>=10&&dataView.getUint32(0,BIG_ENDIAN)===0x47494638;if(!isGif){return null;}return{mimeType:'image/gif',width:dataView.getUint16(6,LITTLE_ENDIAN),height:dataView.getUint16(8,LITTLE_ENDIAN)};}function getBmpMetadata(binaryData){var dataView=toDataView(binaryData);var isBmp=dataView.byteLength>=14&&dataView.getUint16(0,BIG_ENDIAN)===0x424d&&dataView.getUint32(2,LITTLE_ENDIAN)===dataView.byteLength;if(!isBmp){return null;}return{mimeType:'image/bmp',width:dataView.getUint32(18,LITTLE_ENDIAN),height:dataView.getUint32(22,LITTLE_ENDIAN)};}function getJpegMetadata(binaryData){var dataView=toDataView(binaryData);var isJpeg=dataView.byteLength>=3&&dataView.getUint16(0,BIG_ENDIAN)===0xffd8&&dataView.getUint8(2)===0xff;if(!isJpeg){return null;}var _getJpegMarkers=getJpegMarkers(),tableMarkers=_getJpegMarkers.tableMarkers,sofMarkers=_getJpegMarkers.sofMarkers;var i=2;while(i+9=0&&byteLength<=bufferView.byteLength);return{ArrayType:ArrayType,length:length,byteLength:byteLength};}var DEFAULT_GLTF_JSON={asset:{version:'2.0',generator:'loaders.gl'},buffers:[]};var GLTFScenegraph=/*#__PURE__*/function(){function GLTFScenegraph(gltf){_classCallCheck(this,GLTFScenegraph);_defineProperty(this,"gltf",void 0);_defineProperty(this,"sourceBuffers",void 0);_defineProperty(this,"byteLength",void 0);this.gltf=gltf||{json:_objectSpread({},DEFAULT_GLTF_JSON),buffers:[]};this.sourceBuffers=[];this.byteLength=0;if(this.gltf.buffers&&this.gltf.buffers[0]){this.byteLength=this.gltf.buffers[0].byteLength;this.sourceBuffers=[this.gltf.buffers[0]];}}_createClass(GLTFScenegraph,[{key:"json",get:function get(){return this.gltf.json;}},{key:"getApplicationData",value:function getApplicationData(key){var data=this.json[key];return data;}},{key:"getExtraData",value:function getExtraData(key){var extras=this.json.extras||{};return extras[key];}},{key:"getExtension",value:function getExtension(extensionName){var isExtension=this.getUsedExtensions().find(function(name){return name===extensionName;});var extensions=this.json.extensions||{};return isExtension?extensions[extensionName]||true:null;}},{key:"getRequiredExtension",value:function getRequiredExtension(extensionName){var isRequired=this.getRequiredExtensions().find(function(name){return name===extensionName;});return isRequired?this.getExtension(extensionName):null;}},{key:"getRequiredExtensions",value:function getRequiredExtensions(){return this.json.extensionsRequired||[];}},{key:"getUsedExtensions",value:function getUsedExtensions(){return this.json.extensionsUsed||[];}},{key:"getObjectExtension",value:function getObjectExtension(object,extensionName){var extensions=object.extensions||{};return extensions[extensionName];}},{key:"getScene",value:function getScene(index){return this.getObject('scenes',index);}},{key:"getNode",value:function getNode(index){return this.getObject('nodes',index);}},{key:"getSkin",value:function getSkin(index){return this.getObject('skins',index);}},{key:"getMesh",value:function getMesh(index){return this.getObject('meshes',index);}},{key:"getMaterial",value:function getMaterial(index){return this.getObject('materials',index);}},{key:"getAccessor",value:function getAccessor(index){return this.getObject('accessors',index);}},{key:"getTexture",value:function getTexture(index){return this.getObject('textures',index);}},{key:"getSampler",value:function getSampler(index){return this.getObject('samplers',index);}},{key:"getImage",value:function getImage(index){return this.getObject('images',index);}},{key:"getBufferView",value:function getBufferView(index){return this.getObject('bufferViews',index);}},{key:"getBuffer",value:function getBuffer(index){return this.getObject('buffers',index);}},{key:"getObject",value:function getObject(array,index){if(_typeof(index)==='object'){return index;}var object=this.json[array]&&this.json[array][index];if(!object){throw new Error("glTF file error: Could not find ".concat(array,"[").concat(index,"]"));}return object;}},{key:"getTypedArrayForBufferView",value:function getTypedArrayForBufferView(bufferView){bufferView=this.getBufferView(bufferView);var bufferIndex=bufferView.buffer;var binChunk=this.gltf.buffers[bufferIndex];assert$1(binChunk);var byteOffset=(bufferView.byteOffset||0)+binChunk.byteOffset;return new Uint8Array(binChunk.arrayBuffer,byteOffset,bufferView.byteLength);}},{key:"getTypedArrayForAccessor",value:function getTypedArrayForAccessor(accessor){accessor=this.getAccessor(accessor);var bufferView=this.getBufferView(accessor.bufferView);var buffer=this.getBuffer(bufferView.buffer);var arrayBuffer=buffer.data;var _getAccessorArrayType=getAccessorArrayTypeAndLength(accessor,bufferView),ArrayType=_getAccessorArrayType.ArrayType,length=_getAccessorArrayType.length;var byteOffset=bufferView.byteOffset+accessor.byteOffset;return new ArrayType(arrayBuffer,byteOffset,length);}},{key:"getTypedArrayForImageData",value:function getTypedArrayForImageData(image){image=this.getAccessor(image);var bufferView=this.getBufferView(image.bufferView);var buffer=this.getBuffer(bufferView.buffer);var arrayBuffer=buffer.data;var byteOffset=bufferView.byteOffset||0;return new Uint8Array(arrayBuffer,byteOffset,bufferView.byteLength);}},{key:"addApplicationData",value:function addApplicationData(key,data){this.json[key]=data;return this;}},{key:"addExtraData",value:function addExtraData(key,data){this.json.extras=this.json.extras||{};this.json.extras[key]=data;return this;}},{key:"addObjectExtension",value:function addObjectExtension(object,extensionName,data){object.extensions=object.extensions||{};object.extensions[extensionName]=data;this.registerUsedExtension(extensionName);return this;}},{key:"setObjectExtension",value:function setObjectExtension(object,extensionName,data){var extensions=object.extensions||{};extensions[extensionName]=data;}},{key:"removeObjectExtension",value:function removeObjectExtension(object,extensionName){var extensions=object.extensions||{};var extension=extensions[extensionName];delete extensions[extensionName];return extension;}},{key:"addExtension",value:function addExtension(extensionName){var extensionData=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};assert$1(extensionData);this.json.extensions=this.json.extensions||{};this.json.extensions[extensionName]=extensionData;this.registerUsedExtension(extensionName);return extensionData;}},{key:"addRequiredExtension",value:function addRequiredExtension(extensionName){var extensionData=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};assert$1(extensionData);this.addExtension(extensionName,extensionData);this.registerRequiredExtension(extensionName);return extensionData;}},{key:"registerUsedExtension",value:function registerUsedExtension(extensionName){this.json.extensionsUsed=this.json.extensionsUsed||[];if(!this.json.extensionsUsed.find(function(ext){return ext===extensionName;})){this.json.extensionsUsed.push(extensionName);}}},{key:"registerRequiredExtension",value:function registerRequiredExtension(extensionName){this.registerUsedExtension(extensionName);this.json.extensionsRequired=this.json.extensionsRequired||[];if(!this.json.extensionsRequired.find(function(ext){return ext===extensionName;})){this.json.extensionsRequired.push(extensionName);}}},{key:"removeExtension",value:function removeExtension(extensionName){if(this.json.extensionsRequired){this._removeStringFromArray(this.json.extensionsRequired,extensionName);}if(this.json.extensionsUsed){this._removeStringFromArray(this.json.extensionsUsed,extensionName);}if(this.json.extensions){delete this.json.extensions[extensionName];}}},{key:"setDefaultScene",value:function setDefaultScene(sceneIndex){this.json.scene=sceneIndex;}},{key:"addScene",value:function addScene(scene){var nodeIndices=scene.nodeIndices;this.json.scenes=this.json.scenes||[];this.json.scenes.push({nodes:nodeIndices});return this.json.scenes.length-1;}},{key:"addNode",value:function addNode(node){var meshIndex=node.meshIndex,matrix=node.matrix;this.json.nodes=this.json.nodes||[];var nodeData={mesh:meshIndex};if(matrix){nodeData.matrix=matrix;}this.json.nodes.push(nodeData);return this.json.nodes.length-1;}},{key:"addMesh",value:function addMesh(mesh){var attributes=mesh.attributes,indices=mesh.indices,material=mesh.material,_mesh$mode=mesh.mode,mode=_mesh$mode===void 0?4:_mesh$mode;var accessors=this._addAttributes(attributes);var glTFMesh={primitives:[{attributes:accessors,mode:mode}]};if(indices){var indicesAccessor=this._addIndices(indices);glTFMesh.primitives[0].indices=indicesAccessor;}if(Number.isFinite(material)){glTFMesh.primitives[0].material=material;}this.json.meshes=this.json.meshes||[];this.json.meshes.push(glTFMesh);return this.json.meshes.length-1;}},{key:"addPointCloud",value:function addPointCloud(attributes){var accessorIndices=this._addAttributes(attributes);var glTFMesh={primitives:[{attributes:accessorIndices,mode:0}]};this.json.meshes=this.json.meshes||[];this.json.meshes.push(glTFMesh);return this.json.meshes.length-1;}},{key:"addImage",value:function addImage(imageData,mimeTypeOpt){var metadata=getBinaryImageMetadata(imageData);var mimeType=mimeTypeOpt||(metadata===null||metadata===void 0?void 0:metadata.mimeType);var bufferViewIndex=this.addBufferView(imageData);var glTFImage={bufferView:bufferViewIndex,mimeType:mimeType};this.json.images=this.json.images||[];this.json.images.push(glTFImage);return this.json.images.length-1;}},{key:"addBufferView",value:function addBufferView(buffer){var byteLength=buffer.byteLength;assert$1(Number.isFinite(byteLength));this.sourceBuffers=this.sourceBuffers||[];this.sourceBuffers.push(buffer);var glTFBufferView={buffer:0,byteOffset:this.byteLength,byteLength:byteLength};this.byteLength+=padToNBytes(byteLength,4);this.json.bufferViews=this.json.bufferViews||[];this.json.bufferViews.push(glTFBufferView);return this.json.bufferViews.length-1;}},{key:"addAccessor",value:function addAccessor(bufferViewIndex,accessor){var glTFAccessor={bufferView:bufferViewIndex,type:getAccessorTypeFromSize(accessor.size),componentType:accessor.componentType,count:accessor.count,max:accessor.max,min:accessor.min};this.json.accessors=this.json.accessors||[];this.json.accessors.push(glTFAccessor);return this.json.accessors.length-1;}},{key:"addBinaryBuffer",value:function addBinaryBuffer(sourceBuffer){var accessor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{size:3};var bufferViewIndex=this.addBufferView(sourceBuffer);var minMax={min:accessor.min,max:accessor.max};if(!minMax.min||!minMax.max){minMax=this._getAccessorMinMax(sourceBuffer,accessor.size);}var accessorDefaults={size:accessor.size,componentType:getComponentTypeFromArray(sourceBuffer),count:Math.round(sourceBuffer.length/accessor.size),min:minMax.min,max:minMax.max};return this.addAccessor(bufferViewIndex,Object.assign(accessorDefaults,accessor));}},{key:"addTexture",value:function addTexture(texture){var imageIndex=texture.imageIndex;var glTFTexture={source:imageIndex};this.json.textures=this.json.textures||[];this.json.textures.push(glTFTexture);return this.json.textures.length-1;}},{key:"addMaterial",value:function addMaterial(pbrMaterialInfo){this.json.materials=this.json.materials||[];this.json.materials.push(pbrMaterialInfo);return this.json.materials.length-1;}},{key:"createBinaryChunk",value:function createBinaryChunk(){var _this$json,_this$json$buffers;this.gltf.buffers=[];var totalByteLength=this.byteLength;var arrayBuffer=new ArrayBuffer(totalByteLength);var targetArray=new Uint8Array(arrayBuffer);var dstByteOffset=0;var _iterator17=_createForOfIteratorHelper(this.sourceBuffers||[]),_step17;try{for(_iterator17.s();!(_step17=_iterator17.n()).done;){var sourceBuffer=_step17.value;dstByteOffset=copyToArray(sourceBuffer,targetArray,dstByteOffset);}}catch(err){_iterator17.e(err);}finally{_iterator17.f();}if((_this$json=this.json)!==null&&_this$json!==void 0&&(_this$json$buffers=_this$json.buffers)!==null&&_this$json$buffers!==void 0&&_this$json$buffers[0]){this.json.buffers[0].byteLength=totalByteLength;}else{this.json.buffers=[{byteLength:totalByteLength}];}this.gltf.binary=arrayBuffer;this.sourceBuffers=[arrayBuffer];}},{key:"_removeStringFromArray",value:function _removeStringFromArray(array,string){var found=true;while(found){var index=array.indexOf(string);if(index>-1){array.splice(index,1);}else{found=false;}}}},{key:"_addAttributes",value:function _addAttributes(){var attributes=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var result={};for(var attributeKey in attributes){var attributeData=attributes[attributeKey];var attrName=this._getGltfAttributeName(attributeKey);var accessor=this.addBinaryBuffer(attributeData.value,attributeData);result[attrName]=accessor;}return result;}},{key:"_addIndices",value:function _addIndices(indices){return this.addBinaryBuffer(indices,{size:1});}},{key:"_getGltfAttributeName",value:function _getGltfAttributeName(attributeName){switch(attributeName.toLowerCase()){case'position':case'positions':case'vertices':return'POSITION';case'normal':case'normals':return'NORMAL';case'color':case'colors':return'COLOR_0';case'texcoord':case'texcoords':return'TEXCOORD_0';default:return attributeName;}}},{key:"_getAccessorMinMax",value:function _getAccessorMinMax(buffer,size){var result={min:null,max:null};if(buffer.length5&&_args44[5]!==undefined?_args44[5]:'NONE';_context50.next=3;return loadWasmInstance();case 3:instance=_context50.sent;decode$5(instance,instance.exports[DECODERS[mode]],target,count,size,source,instance.exports[FILTERS[filter||'NONE']]);case 5:case"end":return _context50.stop();}}},_callee46);}));return _meshoptDecodeGltfBuffer.apply(this,arguments);}var wasmPromise;function loadWasmInstance(){return _loadWasmInstance.apply(this,arguments);}function _loadWasmInstance(){_loadWasmInstance=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee47(){return _regeneratorRuntime().wrap(function _callee47$(_context51){while(1){switch(_context51.prev=_context51.next){case 0:if(!wasmPromise){wasmPromise=loadWasmModule();}return _context51.abrupt("return",wasmPromise);case 2:case"end":return _context51.stop();}}},_callee47);}));return _loadWasmInstance.apply(this,arguments);}function loadWasmModule(){return _loadWasmModule.apply(this,arguments);}function _loadWasmModule(){_loadWasmModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee48(){var wasm,result;return _regeneratorRuntime().wrap(function _callee48$(_context52){while(1){switch(_context52.prev=_context52.next){case 0:wasm=wasm_base;if(WebAssembly.validate(detector)){wasm=wasm_simd;console.log('Warning: meshopt_decoder is using experimental SIMD support');}_context52.next=4;return WebAssembly.instantiate(unpack(wasm),{});case 4:result=_context52.sent;_context52.next=7;return result.instance.exports.__wasm_call_ctors();case 7:return _context52.abrupt("return",result.instance);case 8:case"end":return _context52.stop();}}},_callee48);}));return _loadWasmModule.apply(this,arguments);}function unpack(data){var result=new Uint8Array(data.length);for(var _i498=0;_i49896?ch-71:ch>64?ch-65:ch>47?ch+4:ch>46?63:62;}var write=0;for(var _i499=0;_i499maxX?x:maxX;maxY=y>maxY?y:maxY;maxZ=_z4>maxZ?_z4:maxZ;}return[[minX,minY,minZ],[maxX,maxY,maxZ]];}function assert(condition,message){if(!condition){throw new Error(message||'loader assertion failed.');}}var Schema=/*#__PURE__*/function(){function Schema(fields,metadata){_classCallCheck(this,Schema);_defineProperty(this,"fields",void 0);_defineProperty(this,"metadata",void 0);assert(Array.isArray(fields));checkNames(fields);this.fields=fields;this.metadata=metadata||new Map();}_createClass(Schema,[{key:"compareTo",value:function compareTo(other){if(this.metadata!==other.metadata){return false;}if(this.fields.length!==other.fields.length){return false;}for(var _i501=0;_i5012&&arguments[2]!==undefined?arguments[2]:false;var metadata=arguments.length>3&&arguments[3]!==undefined?arguments[3]:new Map();_classCallCheck(this,Field);_defineProperty(this,"name",void 0);_defineProperty(this,"type",void 0);_defineProperty(this,"nullable",void 0);_defineProperty(this,"metadata",void 0);this.name=name;this.type=type;this.nullable=nullable;this.metadata=metadata;}_createClass(Field,[{key:"typeId",get:function get(){return this.type&&this.type.typeId;}},{key:"clone",value:function clone(){return new Field(this.name,this.type,this.nullable,this.metadata);}},{key:"compareTo",value:function compareTo(other){return this.name===other.name&&this.type===other.type&&this.nullable===other.nullable&&this.metadata===other.metadata;}},{key:"toString",value:function toString(){return"".concat(this.type).concat(this.nullable?', nullable':'').concat(this.metadata?", metadata: ".concat(this.metadata):'');}}]);return Field;}();var Type;(function(Type){Type[Type["NONE"]=0]="NONE";Type[Type["Null"]=1]="Null";Type[Type["Int"]=2]="Int";Type[Type["Float"]=3]="Float";Type[Type["Binary"]=4]="Binary";Type[Type["Utf8"]=5]="Utf8";Type[Type["Bool"]=6]="Bool";Type[Type["Decimal"]=7]="Decimal";Type[Type["Date"]=8]="Date";Type[Type["Time"]=9]="Time";Type[Type["Timestamp"]=10]="Timestamp";Type[Type["Interval"]=11]="Interval";Type[Type["List"]=12]="List";Type[Type["Struct"]=13]="Struct";Type[Type["Union"]=14]="Union";Type[Type["FixedSizeBinary"]=15]="FixedSizeBinary";Type[Type["FixedSizeList"]=16]="FixedSizeList";Type[Type["Map"]=17]="Map";Type[Type["Dictionary"]=-1]="Dictionary";Type[Type["Int8"]=-2]="Int8";Type[Type["Int16"]=-3]="Int16";Type[Type["Int32"]=-4]="Int32";Type[Type["Int64"]=-5]="Int64";Type[Type["Uint8"]=-6]="Uint8";Type[Type["Uint16"]=-7]="Uint16";Type[Type["Uint32"]=-8]="Uint32";Type[Type["Uint64"]=-9]="Uint64";Type[Type["Float16"]=-10]="Float16";Type[Type["Float32"]=-11]="Float32";Type[Type["Float64"]=-12]="Float64";Type[Type["DateDay"]=-13]="DateDay";Type[Type["DateMillisecond"]=-14]="DateMillisecond";Type[Type["TimestampSecond"]=-15]="TimestampSecond";Type[Type["TimestampMillisecond"]=-16]="TimestampMillisecond";Type[Type["TimestampMicrosecond"]=-17]="TimestampMicrosecond";Type[Type["TimestampNanosecond"]=-18]="TimestampNanosecond";Type[Type["TimeSecond"]=-19]="TimeSecond";Type[Type["TimeMillisecond"]=-20]="TimeMillisecond";Type[Type["TimeMicrosecond"]=-21]="TimeMicrosecond";Type[Type["TimeNanosecond"]=-22]="TimeNanosecond";Type[Type["DenseUnion"]=-23]="DenseUnion";Type[Type["SparseUnion"]=-24]="SparseUnion";Type[Type["IntervalDayTime"]=-25]="IntervalDayTime";Type[Type["IntervalYearMonth"]=-26]="IntervalYearMonth";})(Type||(Type={}));var _Symbol$toStringTag,_Symbol$toStringTag2,_Symbol$toStringTag7;var DataType=/*#__PURE__*/function(){function DataType(){_classCallCheck(this,DataType);}_createClass(DataType,[{key:"typeId",get:function get(){return Type.NONE;}},{key:"compareTo",value:function compareTo(other){return this===other;}}],[{key:"isNull",value:function isNull(x){return x&&x.typeId===Type.Null;}},{key:"isInt",value:function isInt(x){return x&&x.typeId===Type.Int;}},{key:"isFloat",value:function isFloat(x){return x&&x.typeId===Type.Float;}},{key:"isBinary",value:function isBinary(x){return x&&x.typeId===Type.Binary;}},{key:"isUtf8",value:function isUtf8(x){return x&&x.typeId===Type.Utf8;}},{key:"isBool",value:function isBool(x){return x&&x.typeId===Type.Bool;}},{key:"isDecimal",value:function isDecimal(x){return x&&x.typeId===Type.Decimal;}},{key:"isDate",value:function isDate(x){return x&&x.typeId===Type.Date;}},{key:"isTime",value:function isTime(x){return x&&x.typeId===Type.Time;}},{key:"isTimestamp",value:function isTimestamp(x){return x&&x.typeId===Type.Timestamp;}},{key:"isInterval",value:function isInterval(x){return x&&x.typeId===Type.Interval;}},{key:"isList",value:function isList(x){return x&&x.typeId===Type.List;}},{key:"isStruct",value:function isStruct(x){return x&&x.typeId===Type.Struct;}},{key:"isUnion",value:function isUnion(x){return x&&x.typeId===Type.Union;}},{key:"isFixedSizeBinary",value:function isFixedSizeBinary(x){return x&&x.typeId===Type.FixedSizeBinary;}},{key:"isFixedSizeList",value:function isFixedSizeList(x){return x&&x.typeId===Type.FixedSizeList;}},{key:"isMap",value:function isMap(x){return x&&x.typeId===Type.Map;}},{key:"isDictionary",value:function isDictionary(x){return x&&x.typeId===Type.Dictionary;}}]);return DataType;}();_Symbol$toStringTag=Symbol.toStringTag;var Int=/*#__PURE__*/function(_DataType,_Symbol$toStringTag3){_inherits(Int,_DataType);var _super137=_createSuper(Int);function Int(isSigned,bitWidth){var _this111;_classCallCheck(this,Int);_this111=_super137.call(this);_defineProperty(_assertThisInitialized(_this111),"isSigned",void 0);_defineProperty(_assertThisInitialized(_this111),"bitWidth",void 0);_this111.isSigned=isSigned;_this111.bitWidth=bitWidth;return _this111;}_createClass(Int,[{key:"typeId",get:function get(){return Type.Int;}},{key:_Symbol$toStringTag3,get:function get(){return'Int';}},{key:"toString",value:function toString(){return"".concat(this.isSigned?'I':'Ui',"nt").concat(this.bitWidth);}}]);return Int;}(DataType,_Symbol$toStringTag);var Int8=/*#__PURE__*/function(_Int){_inherits(Int8,_Int);var _super138=_createSuper(Int8);function Int8(){_classCallCheck(this,Int8);return _super138.call(this,true,8);}return _createClass(Int8);}(Int);var Int16=/*#__PURE__*/function(_Int2){_inherits(Int16,_Int2);var _super139=_createSuper(Int16);function Int16(){_classCallCheck(this,Int16);return _super139.call(this,true,16);}return _createClass(Int16);}(Int);var Int32=/*#__PURE__*/function(_Int3){_inherits(Int32,_Int3);var _super140=_createSuper(Int32);function Int32(){_classCallCheck(this,Int32);return _super140.call(this,true,32);}return _createClass(Int32);}(Int);var Uint8=/*#__PURE__*/function(_Int4){_inherits(Uint8,_Int4);var _super141=_createSuper(Uint8);function Uint8(){_classCallCheck(this,Uint8);return _super141.call(this,false,8);}return _createClass(Uint8);}(Int);var Uint16=/*#__PURE__*/function(_Int5){_inherits(Uint16,_Int5);var _super142=_createSuper(Uint16);function Uint16(){_classCallCheck(this,Uint16);return _super142.call(this,false,16);}return _createClass(Uint16);}(Int);var Uint32=/*#__PURE__*/function(_Int6){_inherits(Uint32,_Int6);var _super143=_createSuper(Uint32);function Uint32(){_classCallCheck(this,Uint32);return _super143.call(this,false,32);}return _createClass(Uint32);}(Int);var Precision={HALF:16,SINGLE:32,DOUBLE:64};_Symbol$toStringTag2=Symbol.toStringTag;var Float=/*#__PURE__*/function(_DataType2,_Symbol$toStringTag4){_inherits(Float,_DataType2);var _super144=_createSuper(Float);function Float(precision){var _this112;_classCallCheck(this,Float);_this112=_super144.call(this);_defineProperty(_assertThisInitialized(_this112),"precision",void 0);_this112.precision=precision;return _this112;}_createClass(Float,[{key:"typeId",get:function get(){return Type.Float;}},{key:_Symbol$toStringTag4,get:function get(){return'Float';}},{key:"toString",value:function toString(){return"Float".concat(this.precision);}}]);return Float;}(DataType,_Symbol$toStringTag2);var Float32=/*#__PURE__*/function(_Float){_inherits(Float32,_Float);var _super145=_createSuper(Float32);function Float32(){_classCallCheck(this,Float32);return _super145.call(this,Precision.SINGLE);}return _createClass(Float32);}(Float);var Float64=/*#__PURE__*/function(_Float2){_inherits(Float64,_Float2);var _super146=_createSuper(Float64);function Float64(){_classCallCheck(this,Float64);return _super146.call(this,Precision.DOUBLE);}return _createClass(Float64);}(Float);_Symbol$toStringTag7=Symbol.toStringTag;var FixedSizeList=/*#__PURE__*/function(_DataType3,_Symbol$toStringTag5){_inherits(FixedSizeList,_DataType3);var _super147=_createSuper(FixedSizeList);function FixedSizeList(listSize,child){var _this113;_classCallCheck(this,FixedSizeList);_this113=_super147.call(this);_defineProperty(_assertThisInitialized(_this113),"listSize",void 0);_defineProperty(_assertThisInitialized(_this113),"children",void 0);_this113.listSize=listSize;_this113.children=[child];return _this113;}_createClass(FixedSizeList,[{key:"typeId",get:function get(){return Type.FixedSizeList;}},{key:"valueType",get:function get(){return this.children[0].type;}},{key:"valueField",get:function get(){return this.children[0];}},{key:_Symbol$toStringTag5,get:function get(){return'FixedSizeList';}},{key:"toString",value:function toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">");}}]);return FixedSizeList;}(DataType,_Symbol$toStringTag7);function getArrowTypeFromTypedArray(array){switch(array.constructor){case Int8Array:return new Int8();case Uint8Array:return new Uint8();case Int16Array:return new Int16();case Uint16Array:return new Uint16();case Int32Array:return new Int32();case Uint32Array:return new Uint32();case Float32Array:return new Float32();case Float64Array:return new Float64();default:throw new Error('array type not supported');}}function deduceMeshField(attributeName,attribute,optionalMetadata){var type=getArrowTypeFromTypedArray(attribute.value);var metadata=optionalMetadata?optionalMetadata:makeMeshAttributeMetadata(attribute);var field=new Field(attributeName,new FixedSizeList(attribute.size,new Field('value',type)),false,metadata);return field;}function makeMeshAttributeMetadata(attribute){var result=new Map();if('byteOffset'in attribute){result.set('byteOffset',attribute.byteOffset.toString(10));}if('byteStride'in attribute){result.set('byteStride',attribute.byteStride.toString(10));}if('normalized'in attribute){result.set('normalized',attribute.normalized.toString());}return result;}function getDracoSchema(attributes,loaderData,indices){var metadataMap=makeMetadata(loaderData.metadata);var fields=[];var namedLoaderDataAttributes=transformAttributesLoaderData(loaderData.attributes);for(var attributeName in attributes){var attribute=attributes[attributeName];var field=getArrowFieldFromAttribute(attributeName,attribute,namedLoaderDataAttributes[attributeName]);fields.push(field);}if(indices){var indicesField=getArrowFieldFromAttribute('indices',indices);fields.push(indicesField);}return new Schema(fields,metadataMap);}function transformAttributesLoaderData(loaderData){var result={};for(var key in loaderData){var dracoAttribute=loaderData[key];result[dracoAttribute.name||'undefined']=dracoAttribute;}return result;}function getArrowFieldFromAttribute(attributeName,attribute,loaderData){var metadataMap=loaderData?makeMetadata(loaderData.metadata):undefined;var field=deduceMeshField(attributeName,attribute,metadataMap);return field;}function makeMetadata(metadata){var metadataMap=new Map();for(var key in metadata){metadataMap.set("".concat(key,".string"),JSON.stringify(metadata[key]));}return metadataMap;}var DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP={POSITION:'POSITION',NORMAL:'NORMAL',COLOR:'COLOR_0',TEX_COORD:'TEXCOORD_0'};var DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};var INDEX_ITEM_SIZE=4;var DracoParser=/*#__PURE__*/function(){function DracoParser(draco){_classCallCheck(this,DracoParser);_defineProperty(this,"draco",void 0);_defineProperty(this,"decoder",void 0);_defineProperty(this,"metadataQuerier",void 0);this.draco=draco;this.decoder=new this.draco.Decoder();this.metadataQuerier=new this.draco.MetadataQuerier();}_createClass(DracoParser,[{key:"destroy",value:function destroy(){this.draco.destroy(this.decoder);this.draco.destroy(this.metadataQuerier);}},{key:"parseSync",value:function parseSync(arrayBuffer){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var buffer=new this.draco.DecoderBuffer();buffer.Init(new Int8Array(arrayBuffer),arrayBuffer.byteLength);this._disableAttributeTransforms(options);var geometry_type=this.decoder.GetEncodedGeometryType(buffer);var dracoGeometry=geometry_type===this.draco.TRIANGULAR_MESH?new this.draco.Mesh():new this.draco.PointCloud();try{var dracoStatus;switch(geometry_type){case this.draco.TRIANGULAR_MESH:dracoStatus=this.decoder.DecodeBufferToMesh(buffer,dracoGeometry);break;case this.draco.POINT_CLOUD:dracoStatus=this.decoder.DecodeBufferToPointCloud(buffer,dracoGeometry);break;default:throw new Error('DRACO: Unknown geometry type.');}if(!dracoStatus.ok()||!dracoGeometry.ptr){var message="DRACO decompression failed: ".concat(dracoStatus.error_msg());throw new Error(message);}var loaderData=this._getDracoLoaderData(dracoGeometry,geometry_type,options);var geometry=this._getMeshData(dracoGeometry,loaderData,options);var boundingBox=getMeshBoundingBox(geometry.attributes);var schema=getDracoSchema(geometry.attributes,loaderData,geometry.indices);var data=_objectSpread(_objectSpread({loader:'draco',loaderData:loaderData,header:{vertexCount:dracoGeometry.num_points(),boundingBox:boundingBox}},geometry),{},{schema:schema});return data;}finally{this.draco.destroy(buffer);if(dracoGeometry){this.draco.destroy(dracoGeometry);}}}},{key:"_getDracoLoaderData",value:function _getDracoLoaderData(dracoGeometry,geometry_type,options){var metadata=this._getTopLevelMetadata(dracoGeometry);var attributes=this._getDracoAttributes(dracoGeometry,options);return{geometry_type:geometry_type,num_attributes:dracoGeometry.num_attributes(),num_points:dracoGeometry.num_points(),num_faces:dracoGeometry instanceof this.draco.Mesh?dracoGeometry.num_faces():0,metadata:metadata,attributes:attributes};}},{key:"_getDracoAttributes",value:function _getDracoAttributes(dracoGeometry,options){var dracoAttributes={};for(var attributeId=0;attributeId2&&arguments[2]!==undefined?arguments[2]:false;if(!array){return null;}if(Array.isArray(array)){return new ArrayType(array);}if(convertTypedArrays&&!(array instanceof ArrayType)){return new ArrayType(array);}return array;}var KHR_DRACO_MESH_COMPRESSION='KHR_draco_mesh_compression';var name$3=KHR_DRACO_MESH_COMPRESSION;function preprocess$1(gltfData,options,context){var scenegraph=new GLTFScenegraph(gltfData);var _iterator25=_createForOfIteratorHelper(makeMeshPrimitiveIterator(scenegraph)),_step25;try{for(_iterator25.s();!(_step25=_iterator25.n()).done;){var _primitive=_step25.value;if(scenegraph.getObjectExtension(_primitive,KHR_DRACO_MESH_COMPRESSION));}}catch(err){_iterator25.e(err);}finally{_iterator25.f();}}function decode$3(_x72,_x73,_x74){return _decode$2.apply(this,arguments);}function _decode$2(){_decode$2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee54(gltfData,options,context){var _options$gltf,scenegraph,promises,_iterator49,_step49,_primitive5;return _regeneratorRuntime().wrap(function _callee54$(_context58){while(1){switch(_context58.prev=_context58.next){case 0:if(options!==null&&options!==void 0&&(_options$gltf=options.gltf)!==null&&_options$gltf!==void 0&&_options$gltf.decompressMeshes){_context58.next=2;break;}return _context58.abrupt("return");case 2:scenegraph=new GLTFScenegraph(gltfData);promises=[];_iterator49=_createForOfIteratorHelper(makeMeshPrimitiveIterator(scenegraph));try{for(_iterator49.s();!(_step49=_iterator49.n()).done;){_primitive5=_step49.value;if(scenegraph.getObjectExtension(_primitive5,KHR_DRACO_MESH_COMPRESSION)){promises.push(decompressPrimitive(scenegraph,_primitive5,options,context));}}}catch(err){_iterator49.e(err);}finally{_iterator49.f();}_context58.next=8;return Promise.all(promises);case 8:scenegraph.removeExtension(KHR_DRACO_MESH_COMPRESSION);case 9:case"end":return _context58.stop();}}},_callee54);}));return _decode$2.apply(this,arguments);}function encode$3(gltfData){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var scenegraph=new GLTFScenegraph(gltfData);var _iterator26=_createForOfIteratorHelper(scenegraph.json.meshes||[]),_step26;try{for(_iterator26.s();!(_step26=_iterator26.n()).done;){var _mesh3=_step26.value;compressMesh(_mesh3);scenegraph.addRequiredExtension(KHR_DRACO_MESH_COMPRESSION);}}catch(err){_iterator26.e(err);}finally{_iterator26.f();}}function decompressPrimitive(_x75,_x76,_x77,_x78){return _decompressPrimitive.apply(this,arguments);}function _decompressPrimitive(){_decompressPrimitive=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee55(scenegraph,primitive,options,context){var dracoExtension,buffer,bufferCopy,parse,dracoOptions,decodedData,decodedAttributes,_i601,_Object$entries5,_Object$entries5$_i,attributeName,decodedAttribute,accessorIndex,accessor;return _regeneratorRuntime().wrap(function _callee55$(_context59){while(1){switch(_context59.prev=_context59.next){case 0:dracoExtension=scenegraph.getObjectExtension(primitive,KHR_DRACO_MESH_COMPRESSION);if(dracoExtension){_context59.next=3;break;}return _context59.abrupt("return");case 3:buffer=scenegraph.getTypedArrayForBufferView(dracoExtension.bufferView);bufferCopy=sliceArrayBuffer(buffer.buffer,buffer.byteOffset);parse=context.parse;dracoOptions=_objectSpread({},options);delete dracoOptions['3d-tiles'];_context59.next=10;return parse(bufferCopy,DracoLoader,dracoOptions,context);case 10:decodedData=_context59.sent;decodedAttributes=getGLTFAccessors(decodedData.attributes);for(_i601=0,_Object$entries5=Object.entries(decodedAttributes);_i601<_Object$entries5.length;_i601++){_Object$entries5$_i=_slicedToArray(_Object$entries5[_i601],2),attributeName=_Object$entries5$_i[0],decodedAttribute=_Object$entries5$_i[1];if(attributeName in primitive.attributes){accessorIndex=primitive.attributes[attributeName];accessor=scenegraph.getAccessor(accessorIndex);if(accessor!==null&&accessor!==void 0&&accessor.min&&accessor!==null&&accessor!==void 0&&accessor.max){decodedAttribute.min=accessor.min;decodedAttribute.max=accessor.max;}}}primitive.attributes=decodedAttributes;if(decodedData.indices){primitive.indices=getGLTFAccessor(decodedData.indices);}checkPrimitive(primitive);case 16:case"end":return _context59.stop();}}},_callee55);}));return _decompressPrimitive.apply(this,arguments);}function compressMesh(attributes,indices){var mode=arguments.length>2&&arguments[2]!==undefined?arguments[2]:4;var options=arguments.length>3?arguments[3]:undefined;var context=arguments.length>4?arguments[4]:undefined;var _context$parseSync;if(!options.DracoWriter){throw new Error('options.gltf.DracoWriter not provided');}var compressedData=options.DracoWriter.encodeSync({attributes:attributes});var decodedData=context===null||context===void 0?void 0:(_context$parseSync=context.parseSync)===null||_context$parseSync===void 0?void 0:_context$parseSync.call(context,{attributes:attributes});var fauxAccessors=options._addFauxAttributes(decodedData.attributes);var bufferViewIndex=options.addBufferView(compressedData);var glTFMesh={primitives:[{attributes:fauxAccessors,mode:mode,extensions:_defineProperty2({},KHR_DRACO_MESH_COMPRESSION,{bufferView:bufferViewIndex,attributes:fauxAccessors})}]};return glTFMesh;}function checkPrimitive(primitive){if(!primitive.attributes&&Object.keys(primitive.attributes).length>0){throw new Error('glTF: Empty primitive detected: Draco decompression failure?');}}function makeMeshPrimitiveIterator(scenegraph){var _iterator27,_step27,_mesh4,_iterator28,_step28,_primitive2;return _regeneratorRuntime().wrap(function makeMeshPrimitiveIterator$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:_iterator27=_createForOfIteratorHelper(scenegraph.json.meshes||[]);_context10.prev=1;_iterator27.s();case 3:if((_step27=_iterator27.n()).done){_context10.next=24;break;}_mesh4=_step27.value;_iterator28=_createForOfIteratorHelper(_mesh4.primitives);_context10.prev=6;_iterator28.s();case 8:if((_step28=_iterator28.n()).done){_context10.next=14;break;}_primitive2=_step28.value;_context10.next=12;return _primitive2;case 12:_context10.next=8;break;case 14:_context10.next=19;break;case 16:_context10.prev=16;_context10.t0=_context10["catch"](6);_iterator28.e(_context10.t0);case 19:_context10.prev=19;_iterator28.f();return _context10.finish(19);case 22:_context10.next=3;break;case 24:_context10.next=29;break;case 26:_context10.prev=26;_context10.t1=_context10["catch"](1);_iterator27.e(_context10.t1);case 29:_context10.prev=29;_iterator27.f();return _context10.finish(29);case 32:case"end":return _context10.stop();}}},_marked3,null,[[1,26,29,32],[6,16,19,22]]);}var KHR_draco_mesh_compression=/*#__PURE__*/Object.freeze({__proto__:null,name:name$3,preprocess:preprocess$1,decode:decode$3,encode:encode$3});var KHR_LIGHTS_PUNCTUAL='KHR_lights_punctual';var name$2=KHR_LIGHTS_PUNCTUAL;function decode$2(_x79){return _decode$3.apply(this,arguments);}function _decode$3(){_decode$3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee56(gltfData){var gltfScenegraph,json,extension,_iterator50,_step50,_node12,nodeExtension;return _regeneratorRuntime().wrap(function _callee56$(_context60){while(1){switch(_context60.prev=_context60.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;extension=gltfScenegraph.getExtension(KHR_LIGHTS_PUNCTUAL);if(extension){gltfScenegraph.json.lights=extension.lights;gltfScenegraph.removeExtension(KHR_LIGHTS_PUNCTUAL);}_iterator50=_createForOfIteratorHelper(json.nodes||[]);try{for(_iterator50.s();!(_step50=_iterator50.n()).done;){_node12=_step50.value;nodeExtension=gltfScenegraph.getObjectExtension(_node12,KHR_LIGHTS_PUNCTUAL);if(nodeExtension){_node12.light=nodeExtension.light;}gltfScenegraph.removeObjectExtension(_node12,KHR_LIGHTS_PUNCTUAL);}}catch(err){_iterator50.e(err);}finally{_iterator50.f();}case 6:case"end":return _context60.stop();}}},_callee56);}));return _decode$3.apply(this,arguments);}function encode$2(_x80){return _encode$.apply(this,arguments);}function _encode$(){_encode$=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee57(gltfData){var gltfScenegraph,json,extension,_iterator51,_step51,light,_node13;return _regeneratorRuntime().wrap(function _callee57$(_context61){while(1){switch(_context61.prev=_context61.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;if(json.lights){extension=gltfScenegraph.addExtension(KHR_LIGHTS_PUNCTUAL);assert$1(!extension.lights);extension.lights=json.lights;delete json.lights;}if(gltfScenegraph.json.lights){_iterator51=_createForOfIteratorHelper(gltfScenegraph.json.lights);try{for(_iterator51.s();!(_step51=_iterator51.n()).done;){light=_step51.value;_node13=light.node;gltfScenegraph.addObjectExtension(_node13,KHR_LIGHTS_PUNCTUAL,light);}}catch(err){_iterator51.e(err);}finally{_iterator51.f();}delete gltfScenegraph.json.lights;}case 4:case"end":return _context61.stop();}}},_callee57);}));return _encode$.apply(this,arguments);}var KHR_lights_punctual=/*#__PURE__*/Object.freeze({__proto__:null,name:name$2,decode:decode$2,encode:encode$2});var KHR_MATERIALS_UNLIT='KHR_materials_unlit';var name$1=KHR_MATERIALS_UNLIT;function decode$1(_x81){return _decode$4.apply(this,arguments);}function _decode$4(){_decode$4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee58(gltfData){var gltfScenegraph,json,_iterator52,_step52,material,extension;return _regeneratorRuntime().wrap(function _callee58$(_context62){while(1){switch(_context62.prev=_context62.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;gltfScenegraph.removeExtension(KHR_MATERIALS_UNLIT);_iterator52=_createForOfIteratorHelper(json.materials||[]);try{for(_iterator52.s();!(_step52=_iterator52.n()).done;){material=_step52.value;extension=material.extensions&&material.extensions.KHR_materials_unlit;if(extension){material.unlit=true;}gltfScenegraph.removeObjectExtension(material,KHR_MATERIALS_UNLIT);}}catch(err){_iterator52.e(err);}finally{_iterator52.f();}case 5:case"end":return _context62.stop();}}},_callee58);}));return _decode$4.apply(this,arguments);}function encode$1(gltfData){var gltfScenegraph=new GLTFScenegraph(gltfData);var json=gltfScenegraph.json;if(gltfScenegraph.materials){var _iterator29=_createForOfIteratorHelper(json.materials||[]),_step29;try{for(_iterator29.s();!(_step29=_iterator29.n()).done;){var material=_step29.value;if(material.unlit){delete material.unlit;gltfScenegraph.addObjectExtension(material,KHR_MATERIALS_UNLIT,{});gltfScenegraph.addExtension(KHR_MATERIALS_UNLIT);}}}catch(err){_iterator29.e(err);}finally{_iterator29.f();}}}var KHR_materials_unlit=/*#__PURE__*/Object.freeze({__proto__:null,name:name$1,decode:decode$1,encode:encode$1});var KHR_TECHNIQUES_WEBGL='KHR_techniques_webgl';var name=KHR_TECHNIQUES_WEBGL;function decode(_x82){return _decode.apply(this,arguments);}function _decode(){_decode=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee59(gltfData){var gltfScenegraph,json,extension,techniques,_iterator53,_step53,material,materialExtension;return _regeneratorRuntime().wrap(function _callee59$(_context63){while(1){switch(_context63.prev=_context63.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;extension=gltfScenegraph.getExtension(KHR_TECHNIQUES_WEBGL);if(extension){techniques=resolveTechniques(extension,gltfScenegraph);_iterator53=_createForOfIteratorHelper(json.materials||[]);try{for(_iterator53.s();!(_step53=_iterator53.n()).done;){material=_step53.value;materialExtension=gltfScenegraph.getObjectExtension(material,KHR_TECHNIQUES_WEBGL);if(materialExtension){material.technique=Object.assign({},materialExtension,techniques[materialExtension.technique]);material.technique.values=resolveValues(material.technique,gltfScenegraph);}gltfScenegraph.removeObjectExtension(material,KHR_TECHNIQUES_WEBGL);}}catch(err){_iterator53.e(err);}finally{_iterator53.f();}gltfScenegraph.removeExtension(KHR_TECHNIQUES_WEBGL);}case 4:case"end":return _context63.stop();}}},_callee59);}));return _decode.apply(this,arguments);}function encode(_x83,_x84){return _encode.apply(this,arguments);}function _encode(){_encode=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee60(gltfData,options){return _regeneratorRuntime().wrap(function _callee60$(_context64){while(1){switch(_context64.prev=_context64.next){case 0:case"end":return _context64.stop();}}},_callee60);}));return _encode.apply(this,arguments);}function resolveTechniques(techniquesExtension,gltfScenegraph){var _techniquesExtension$=techniquesExtension.programs,programs=_techniquesExtension$===void 0?[]:_techniquesExtension$,_techniquesExtension$2=techniquesExtension.shaders,shaders=_techniquesExtension$2===void 0?[]:_techniquesExtension$2,_techniquesExtension$3=techniquesExtension.techniques,techniques=_techniquesExtension$3===void 0?[]:_techniquesExtension$3;var textDecoder=new TextDecoder();shaders.forEach(function(shader){if(Number.isFinite(shader.bufferView)){shader.code=textDecoder.decode(gltfScenegraph.getTypedArrayForBufferView(shader.bufferView));}else{throw new Error('KHR_techniques_webgl: no shader code');}});programs.forEach(function(program){program.fragmentShader=shaders[program.fragmentShader];program.vertexShader=shaders[program.vertexShader];});techniques.forEach(function(technique){technique.program=programs[technique.program];});return techniques;}function resolveValues(technique,gltfScenegraph){var values=Object.assign({},technique.values);Object.keys(technique.uniforms||{}).forEach(function(uniform){if(technique.uniforms[uniform].value&&!(uniform in values)){values[uniform]=technique.uniforms[uniform].value;}});Object.keys(values).forEach(function(uniform){if(_typeof(values[uniform])==='object'&&values[uniform].index!==undefined){values[uniform].texture=gltfScenegraph.getTexture(values[uniform].index);}});return values;}var KHR_techniques_webgl=/*#__PURE__*/Object.freeze({__proto__:null,name:name,decode:decode,encode:encode});var EXTENSIONS=[EXT_meshopt_compression,EXT_texture_webp,KHR_texture_basisu,KHR_draco_mesh_compression,KHR_lights_punctual,KHR_materials_unlit,KHR_techniques_webgl];function preprocessExtensions(gltf){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var context=arguments.length>2?arguments[2]:undefined;var extensions=EXTENSIONS.filter(function(extension){return useExtension(extension.name,options);});var _iterator30=_createForOfIteratorHelper(extensions),_step30;try{for(_iterator30.s();!(_step30=_iterator30.n()).done;){var extension=_step30.value;var _extension$preprocess;(_extension$preprocess=extension.preprocess)===null||_extension$preprocess===void 0?void 0:_extension$preprocess.call(extension,gltf,options,context);}}catch(err){_iterator30.e(err);}finally{_iterator30.f();}}function decodeExtensions(_x85){return _decodeExtensions.apply(this,arguments);}function _decodeExtensions(){_decodeExtensions=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee61(gltf){var options,context,extensions,_iterator54,_step54,extension,_extension$decode,_args59=arguments;return _regeneratorRuntime().wrap(function _callee61$(_context65){while(1){switch(_context65.prev=_context65.next){case 0:options=_args59.length>1&&_args59[1]!==undefined?_args59[1]:{};context=_args59.length>2?_args59[2]:undefined;extensions=EXTENSIONS.filter(function(extension){return useExtension(extension.name,options);});_iterator54=_createForOfIteratorHelper(extensions);_context65.prev=4;_iterator54.s();case 6:if((_step54=_iterator54.n()).done){_context65.next=12;break;}extension=_step54.value;_context65.next=10;return(_extension$decode=extension.decode)===null||_extension$decode===void 0?void 0:_extension$decode.call(extension,gltf,options,context);case 10:_context65.next=6;break;case 12:_context65.next=17;break;case 14:_context65.prev=14;_context65.t0=_context65["catch"](4);_iterator54.e(_context65.t0);case 17:_context65.prev=17;_iterator54.f();return _context65.finish(17);case 20:case"end":return _context65.stop();}}},_callee61,null,[[4,14,17,20]]);}));return _decodeExtensions.apply(this,arguments);}function useExtension(extensionName,options){var _options$gltf;var excludes=(options===null||options===void 0?void 0:(_options$gltf=options.gltf)===null||_options$gltf===void 0?void 0:_options$gltf.excludeExtensions)||{};var exclude=extensionName in excludes&&!excludes[extensionName];return!exclude;}var KHR_BINARY_GLTF='KHR_binary_glTF';function preprocess(gltfData){var gltfScenegraph=new GLTFScenegraph(gltfData);var json=gltfScenegraph.json;var _iterator31=_createForOfIteratorHelper(json.images||[]),_step31;try{for(_iterator31.s();!(_step31=_iterator31.n()).done;){var _image7=_step31.value;var extension=gltfScenegraph.getObjectExtension(_image7,KHR_BINARY_GLTF);if(extension){Object.assign(_image7,extension);}gltfScenegraph.removeObjectExtension(_image7,KHR_BINARY_GLTF);}}catch(err){_iterator31.e(err);}finally{_iterator31.f();}if(json.buffers&&json.buffers[0]){delete json.buffers[0].uri;}gltfScenegraph.removeExtension(KHR_BINARY_GLTF);}var GLTF_ARRAYS={accessors:'accessor',animations:'animation',buffers:'buffer',bufferViews:'bufferView',images:'image',materials:'material',meshes:'mesh',nodes:'node',samplers:'sampler',scenes:'scene',skins:'skin',textures:'texture'};var GLTF_KEYS={accessor:'accessors',animations:'animation',buffer:'buffers',bufferView:'bufferViews',image:'images',material:'materials',mesh:'meshes',node:'nodes',sampler:'samplers',scene:'scenes',skin:'skins',texture:'textures'};var GLTFV1Normalizer=/*#__PURE__*/function(){function GLTFV1Normalizer(){_classCallCheck(this,GLTFV1Normalizer);_defineProperty(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}});_defineProperty(this,"json",void 0);}_createClass(GLTFV1Normalizer,[{key:"normalize",value:function normalize(gltf,options){this.json=gltf.json;var json=gltf.json;switch(json.asset&&json.asset.version){case'2.0':return;case undefined:case'1.0':break;default:console.warn("glTF: Unknown version ".concat(json.asset.version));return;}if(!options.normalize){throw new Error('glTF v1 is not supported.');}console.warn('Converting glTF v1 to glTF v2 format. This is experimental and may fail.');this._addAsset(json);this._convertTopLevelObjectsToArrays(json);preprocess(gltf);this._convertObjectIdsToArrayIndices(json);this._updateObjects(json);this._updateMaterial(json);}},{key:"_addAsset",value:function _addAsset(json){json.asset=json.asset||{};json.asset.version='2.0';json.asset.generator=json.asset.generator||'Normalized to glTF 2.0 by loaders.gl';}},{key:"_convertTopLevelObjectsToArrays",value:function _convertTopLevelObjectsToArrays(json){for(var arrayName in GLTF_ARRAYS){this._convertTopLevelObjectToArray(json,arrayName);}}},{key:"_convertTopLevelObjectToArray",value:function _convertTopLevelObjectToArray(json,mapName){var objectMap=json[mapName];if(!objectMap||Array.isArray(objectMap)){return;}json[mapName]=[];for(var id in objectMap){var object=objectMap[id];object.id=object.id||id;var index=json[mapName].length;json[mapName].push(object);this.idToIndexMap[mapName][id]=index;}}},{key:"_convertObjectIdsToArrayIndices",value:function _convertObjectIdsToArrayIndices(json){for(var arrayName in GLTF_ARRAYS){this._convertIdsToIndices(json,arrayName);}if('scene'in json){json.scene=this._convertIdToIndex(json.scene,'scene');}var _iterator32=_createForOfIteratorHelper(json.textures),_step32;try{for(_iterator32.s();!(_step32=_iterator32.n()).done;){var texture=_step32.value;this._convertTextureIds(texture);}}catch(err){_iterator32.e(err);}finally{_iterator32.f();}var _iterator33=_createForOfIteratorHelper(json.meshes),_step33;try{for(_iterator33.s();!(_step33=_iterator33.n()).done;){var _mesh5=_step33.value;this._convertMeshIds(_mesh5);}}catch(err){_iterator33.e(err);}finally{_iterator33.f();}var _iterator34=_createForOfIteratorHelper(json.nodes),_step34;try{for(_iterator34.s();!(_step34=_iterator34.n()).done;){var _node4=_step34.value;this._convertNodeIds(_node4);}}catch(err){_iterator34.e(err);}finally{_iterator34.f();}var _iterator35=_createForOfIteratorHelper(json.scenes),_step35;try{for(_iterator35.s();!(_step35=_iterator35.n()).done;){var _node5=_step35.value;this._convertSceneIds(_node5);}}catch(err){_iterator35.e(err);}finally{_iterator35.f();}}},{key:"_convertTextureIds",value:function _convertTextureIds(texture){if(texture.source){texture.source=this._convertIdToIndex(texture.source,'image');}}},{key:"_convertMeshIds",value:function _convertMeshIds(mesh){var _iterator36=_createForOfIteratorHelper(mesh.primitives),_step36;try{for(_iterator36.s();!(_step36=_iterator36.n()).done;){var _primitive3=_step36.value;var attributes=_primitive3.attributes,indices=_primitive3.indices,material=_primitive3.material;for(var attributeName in attributes){attributes[attributeName]=this._convertIdToIndex(attributes[attributeName],'accessor');}if(indices){_primitive3.indices=this._convertIdToIndex(indices,'accessor');}if(material){_primitive3.material=this._convertIdToIndex(material,'material');}}}catch(err){_iterator36.e(err);}finally{_iterator36.f();}}},{key:"_convertNodeIds",value:function _convertNodeIds(node){var _this116=this;if(node.children){node.children=node.children.map(function(child){return _this116._convertIdToIndex(child,'node');});}if(node.meshes){node.meshes=node.meshes.map(function(mesh){return _this116._convertIdToIndex(mesh,'mesh');});}}},{key:"_convertSceneIds",value:function _convertSceneIds(scene){var _this117=this;if(scene.nodes){scene.nodes=scene.nodes.map(function(node){return _this117._convertIdToIndex(node,'node');});}}},{key:"_convertIdsToIndices",value:function _convertIdsToIndices(json,topLevelArrayName){if(!json[topLevelArrayName]){console.warn("gltf v1: json doesn't contain attribute ".concat(topLevelArrayName));json[topLevelArrayName]=[];}var _iterator37=_createForOfIteratorHelper(json[topLevelArrayName]),_step37;try{for(_iterator37.s();!(_step37=_iterator37.n()).done;){var object=_step37.value;for(var key in object){var id=object[key];var index=this._convertIdToIndex(id,key);object[key]=index;}}}catch(err){_iterator37.e(err);}finally{_iterator37.f();}}},{key:"_convertIdToIndex",value:function _convertIdToIndex(id,key){var arrayName=GLTF_KEYS[key];if(arrayName in this.idToIndexMap){var index=this.idToIndexMap[arrayName][id];if(!Number.isFinite(index)){throw new Error("gltf v1: failed to resolve ".concat(key," with id ").concat(id));}return index;}return id;}},{key:"_updateObjects",value:function _updateObjects(json){var _iterator38=_createForOfIteratorHelper(this.json.buffers),_step38;try{for(_iterator38.s();!(_step38=_iterator38.n()).done;){var buffer=_step38.value;delete buffer.type;}}catch(err){_iterator38.e(err);}finally{_iterator38.f();}}},{key:"_updateMaterial",value:function _updateMaterial(json){var _iterator39=_createForOfIteratorHelper(json.materials),_step39;try{var _loop6=function _loop6(){var material=_step39.value;material.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};var textureId=((_material$values=material.values)===null||_material$values===void 0?void 0:_material$values.tex)||((_material$values2=material.values)===null||_material$values2===void 0?void 0:_material$values2.texture2d_0);var textureIndex=json.textures.findIndex(function(texture){return texture.id===textureId;});if(textureIndex!==-1){material.pbrMetallicRoughness.baseColorTexture={index:textureIndex};}};for(_iterator39.s();!(_step39=_iterator39.n()).done;){var _material$values,_material$values2;_loop6();}}catch(err){_iterator39.e(err);}finally{_iterator39.f();}}}]);return GLTFV1Normalizer;}();function normalizeGLTFV1(gltf){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new GLTFV1Normalizer().normalize(gltf,options);}var COMPONENTS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16};var BYTES={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4};var GL_SAMPLER={TEXTURE_MAG_FILTER:0x2800,TEXTURE_MIN_FILTER:0x2801,TEXTURE_WRAP_S:0x2802,TEXTURE_WRAP_T:0x2803,REPEAT:0x2901,LINEAR:0x2601,NEAREST_MIPMAP_LINEAR:0x2702};var SAMPLER_PARAMETER_GLTF_TO_GL={magFilter:GL_SAMPLER.TEXTURE_MAG_FILTER,minFilter:GL_SAMPLER.TEXTURE_MIN_FILTER,wrapS:GL_SAMPLER.TEXTURE_WRAP_S,wrapT:GL_SAMPLER.TEXTURE_WRAP_T};var DEFAULT_SAMPLER=(_DEFAULT_SAMPLER={},_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_MAG_FILTER,GL_SAMPLER.LINEAR),_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_MIN_FILTER,GL_SAMPLER.NEAREST_MIPMAP_LINEAR),_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_WRAP_S,GL_SAMPLER.REPEAT),_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_WRAP_T,GL_SAMPLER.REPEAT),_DEFAULT_SAMPLER);function getBytesFromComponentType(componentType){return BYTES[componentType];}function getSizeFromAccessorType(type){return COMPONENTS[type];}var GLTFPostProcessor=/*#__PURE__*/function(){function GLTFPostProcessor(){_classCallCheck(this,GLTFPostProcessor);_defineProperty(this,"baseUri",'');_defineProperty(this,"json",{});_defineProperty(this,"buffers",[]);_defineProperty(this,"images",[]);}_createClass(GLTFPostProcessor,[{key:"postProcess",value:function postProcess(gltf){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var json=gltf.json,_gltf$buffers=gltf.buffers,buffers=_gltf$buffers===void 0?[]:_gltf$buffers,_gltf$images=gltf.images,images=_gltf$images===void 0?[]:_gltf$images,_gltf$baseUri=gltf.baseUri,baseUri=_gltf$baseUri===void 0?'':_gltf$baseUri;assert$1(json);this.baseUri=baseUri;this.json=json;this.buffers=buffers;this.images=images;this._resolveTree(this.json,options);return this.json;}},{key:"_resolveTree",value:function _resolveTree(json){var _this118=this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(json.bufferViews){json.bufferViews=json.bufferViews.map(function(bufView,i){return _this118._resolveBufferView(bufView,i);});}if(json.images){json.images=json.images.map(function(image,i){return _this118._resolveImage(image,i);});}if(json.samplers){json.samplers=json.samplers.map(function(sampler,i){return _this118._resolveSampler(sampler,i);});}if(json.textures){json.textures=json.textures.map(function(texture,i){return _this118._resolveTexture(texture,i);});}if(json.accessors){json.accessors=json.accessors.map(function(accessor,i){return _this118._resolveAccessor(accessor,i);});}if(json.materials){json.materials=json.materials.map(function(material,i){return _this118._resolveMaterial(material,i);});}if(json.meshes){json.meshes=json.meshes.map(function(mesh,i){return _this118._resolveMesh(mesh,i);});}if(json.nodes){json.nodes=json.nodes.map(function(node,i){return _this118._resolveNode(node,i);});}if(json.skins){json.skins=json.skins.map(function(skin,i){return _this118._resolveSkin(skin,i);});}if(json.scenes){json.scenes=json.scenes.map(function(scene,i){return _this118._resolveScene(scene,i);});}if(json.scene!==undefined){json.scene=json.scenes[this.json.scene];}}},{key:"getScene",value:function getScene(index){return this._get('scenes',index);}},{key:"getNode",value:function getNode(index){return this._get('nodes',index);}},{key:"getSkin",value:function getSkin(index){return this._get('skins',index);}},{key:"getMesh",value:function getMesh(index){return this._get('meshes',index);}},{key:"getMaterial",value:function getMaterial(index){return this._get('materials',index);}},{key:"getAccessor",value:function getAccessor(index){return this._get('accessors',index);}},{key:"getCamera",value:function getCamera(index){return null;}},{key:"getTexture",value:function getTexture(index){return this._get('textures',index);}},{key:"getSampler",value:function getSampler(index){return this._get('samplers',index);}},{key:"getImage",value:function getImage(index){return this._get('images',index);}},{key:"getBufferView",value:function getBufferView(index){return this._get('bufferViews',index);}},{key:"getBuffer",value:function getBuffer(index){return this._get('buffers',index);}},{key:"_get",value:function _get(array,index){if(_typeof(index)==='object'){return index;}var object=this.json[array]&&this.json[array][index];if(!object){console.warn("glTF file error: Could not find ".concat(array,"[").concat(index,"]"));}return object;}},{key:"_resolveScene",value:function _resolveScene(scene,index){var _this119=this;scene.id=scene.id||"scene-".concat(index);scene.nodes=(scene.nodes||[]).map(function(node){return _this119.getNode(node);});return scene;}},{key:"_resolveNode",value:function _resolveNode(node,index){var _this120=this;node.id=node.id||"node-".concat(index);if(node.children){node.children=node.children.map(function(child){return _this120.getNode(child);});}if(node.mesh!==undefined){node.mesh=this.getMesh(node.mesh);}else if(node.meshes!==undefined&&node.meshes.length){node.mesh=node.meshes.reduce(function(accum,meshIndex){var mesh=_this120.getMesh(meshIndex);accum.id=mesh.id;accum.primitives=accum.primitives.concat(mesh.primitives);return accum;},{primitives:[]});}if(node.camera!==undefined){node.camera=this.getCamera(node.camera);}if(node.skin!==undefined){node.skin=this.getSkin(node.skin);}return node;}},{key:"_resolveSkin",value:function _resolveSkin(skin,index){skin.id=skin.id||"skin-".concat(index);skin.inverseBindMatrices=this.getAccessor(skin.inverseBindMatrices);return skin;}},{key:"_resolveMesh",value:function _resolveMesh(mesh,index){var _this121=this;mesh.id=mesh.id||"mesh-".concat(index);if(mesh.primitives){mesh.primitives=mesh.primitives.map(function(primitive){primitive=_objectSpread({},primitive);var attributes=primitive.attributes;primitive.attributes={};for(var attribute in attributes){primitive.attributes[attribute]=_this121.getAccessor(attributes[attribute]);}if(primitive.indices!==undefined){primitive.indices=_this121.getAccessor(primitive.indices);}if(primitive.material!==undefined){primitive.material=_this121.getMaterial(primitive.material);}return primitive;});}return mesh;}},{key:"_resolveMaterial",value:function _resolveMaterial(material,index){material.id=material.id||"material-".concat(index);if(material.normalTexture){material.normalTexture=_objectSpread({},material.normalTexture);material.normalTexture.texture=this.getTexture(material.normalTexture.index);}if(material.occlusionTexture){material.occlustionTexture=_objectSpread({},material.occlustionTexture);material.occlusionTexture.texture=this.getTexture(material.occlusionTexture.index);}if(material.emissiveTexture){material.emmisiveTexture=_objectSpread({},material.emmisiveTexture);material.emissiveTexture.texture=this.getTexture(material.emissiveTexture.index);}if(!material.emissiveFactor){material.emissiveFactor=material.emmisiveTexture?[1,1,1]:[0,0,0];}if(material.pbrMetallicRoughness){material.pbrMetallicRoughness=_objectSpread({},material.pbrMetallicRoughness);var mr=material.pbrMetallicRoughness;if(mr.baseColorTexture){mr.baseColorTexture=_objectSpread({},mr.baseColorTexture);mr.baseColorTexture.texture=this.getTexture(mr.baseColorTexture.index);}if(mr.metallicRoughnessTexture){mr.metallicRoughnessTexture=_objectSpread({},mr.metallicRoughnessTexture);mr.metallicRoughnessTexture.texture=this.getTexture(mr.metallicRoughnessTexture.index);}}return material;}},{key:"_resolveAccessor",value:function _resolveAccessor(accessor,index){accessor.id=accessor.id||"accessor-".concat(index);if(accessor.bufferView!==undefined){accessor.bufferView=this.getBufferView(accessor.bufferView);}accessor.bytesPerComponent=getBytesFromComponentType(accessor.componentType);accessor.components=getSizeFromAccessorType(accessor.type);accessor.bytesPerElement=accessor.bytesPerComponent*accessor.components;if(accessor.bufferView){var buffer=accessor.bufferView.buffer;var _getAccessorArrayType2=getAccessorArrayTypeAndLength(accessor,accessor.bufferView),ArrayType=_getAccessorArrayType2.ArrayType,byteLength=_getAccessorArrayType2.byteLength;var byteOffset=(accessor.bufferView.byteOffset||0)+(accessor.byteOffset||0)+buffer.byteOffset;var cutBuffer=buffer.arrayBuffer.slice(byteOffset,byteOffset+byteLength);if(accessor.bufferView.byteStride){cutBuffer=this._getValueFromInterleavedBuffer(buffer,byteOffset,accessor.bufferView.byteStride,accessor.bytesPerElement,accessor.count);}accessor.value=new ArrayType(cutBuffer);}return accessor;}},{key:"_getValueFromInterleavedBuffer",value:function _getValueFromInterleavedBuffer(buffer,byteOffset,byteStride,bytesPerElement,count){var result=new Uint8Array(count*bytesPerElement);for(var _i507=0;_i5071&&arguments[1]!==undefined?arguments[1]:0;return"".concat(String.fromCharCode(dataView.getUint8(byteOffset+0))).concat(String.fromCharCode(dataView.getUint8(byteOffset+1))).concat(String.fromCharCode(dataView.getUint8(byteOffset+2))).concat(String.fromCharCode(dataView.getUint8(byteOffset+3)));}function isGLB(arrayBuffer){var byteOffset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var dataView=new DataView(arrayBuffer);var _options$magic=options.magic,magic=_options$magic===void 0?MAGIC_glTF:_options$magic;var magic1=dataView.getUint32(byteOffset,false);return magic1===magic||magic1===MAGIC_glTF;}function parseGLBSync(glb,arrayBuffer){var byteOffset=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var options=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var dataView=new DataView(arrayBuffer);var type=getMagicString(dataView,byteOffset+0);var version=dataView.getUint32(byteOffset+4,LE);var byteLength=dataView.getUint32(byteOffset+8,LE);Object.assign(glb,{header:{byteOffset:byteOffset,byteLength:byteLength,hasBinChunk:false},type:type,version:version,json:{},binChunks:[]});byteOffset+=GLB_FILE_HEADER_SIZE;switch(glb.version){case 1:return parseGLBV1(glb,dataView,byteOffset);case 2:return parseGLBV2(glb,dataView,byteOffset,options={});default:throw new Error("Invalid GLB version ".concat(glb.version,". Only supports v1 and v2."));}}function parseGLBV1(glb,dataView,byteOffset){assert$5(glb.header.byteLength>GLB_FILE_HEADER_SIZE+GLB_CHUNK_HEADER_SIZE);var contentLength=dataView.getUint32(byteOffset+0,LE);var contentFormat=dataView.getUint32(byteOffset+4,LE);byteOffset+=GLB_CHUNK_HEADER_SIZE;assert$5(contentFormat===GLB_V1_CONTENT_FORMAT_JSON);parseJSONChunk(glb,dataView,byteOffset,contentLength);byteOffset+=contentLength;byteOffset+=parseBINChunk(glb,dataView,byteOffset,glb.header.byteLength);return byteOffset;}function parseGLBV2(glb,dataView,byteOffset,options){assert$5(glb.header.byteLength>GLB_FILE_HEADER_SIZE+GLB_CHUNK_HEADER_SIZE);parseGLBChunksSync(glb,dataView,byteOffset,options);return byteOffset+glb.header.byteLength;}function parseGLBChunksSync(glb,dataView,byteOffset,options){while(byteOffset+8<=glb.header.byteLength){var chunkLength=dataView.getUint32(byteOffset+0,LE);var chunkFormat=dataView.getUint32(byteOffset+4,LE);byteOffset+=GLB_CHUNK_HEADER_SIZE;switch(chunkFormat){case GLB_CHUNK_TYPE_JSON:parseJSONChunk(glb,dataView,byteOffset,chunkLength);break;case GLB_CHUNK_TYPE_BIN:parseBINChunk(glb,dataView,byteOffset,chunkLength);break;case GLB_CHUNK_TYPE_JSON_XVIZ_DEPRECATED:if(!options.strict){parseJSONChunk(glb,dataView,byteOffset,chunkLength);}break;case GLB_CHUNK_TYPE_BIX_XVIZ_DEPRECATED:if(!options.strict){parseBINChunk(glb,dataView,byteOffset,chunkLength);}break;}byteOffset+=padToNBytes(chunkLength,4);}return byteOffset;}function parseJSONChunk(glb,dataView,byteOffset,chunkLength){var jsonChunk=new Uint8Array(dataView.buffer,byteOffset,chunkLength);var textDecoder=new TextDecoder('utf8');var jsonText=textDecoder.decode(jsonChunk);glb.json=JSON.parse(jsonText);return padToNBytes(chunkLength,4);}function parseBINChunk(glb,dataView,byteOffset,chunkLength){glb.header.hasBinChunk=true;glb.binChunks.push({byteOffset:byteOffset,byteLength:chunkLength,arrayBuffer:dataView.buffer});return padToNBytes(chunkLength,4);}function parseGLTF$1(_x86,_x87){return _parseGLTF$.apply(this,arguments);}function _parseGLTF$(){_parseGLTF$=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee62(gltf,arrayBufferOrString){var byteOffset,options,context,_options$gltf,_options$gltf2,_options$gltf3,_options$gltf4,promises,_promise,promise,_args60=arguments;return _regeneratorRuntime().wrap(function _callee62$(_context66){while(1){switch(_context66.prev=_context66.next){case 0:byteOffset=_args60.length>2&&_args60[2]!==undefined?_args60[2]:0;options=_args60.length>3?_args60[3]:undefined;context=_args60.length>4?_args60[4]:undefined;parseGLTFContainerSync(gltf,arrayBufferOrString,byteOffset,options);normalizeGLTFV1(gltf,{normalize:options===null||options===void 0?void 0:(_options$gltf=options.gltf)===null||_options$gltf===void 0?void 0:_options$gltf.normalize});preprocessExtensions(gltf,options,context);promises=[];if(!(options!==null&&options!==void 0&&(_options$gltf2=options.gltf)!==null&&_options$gltf2!==void 0&&_options$gltf2.loadBuffers&&gltf.json.buffers)){_context66.next=10;break;}_context66.next=10;return loadBuffers(gltf,options,context);case 10:if(options!==null&&options!==void 0&&(_options$gltf3=options.gltf)!==null&&_options$gltf3!==void 0&&_options$gltf3.loadImages){_promise=loadImages(gltf,options,context);promises.push(_promise);}promise=decodeExtensions(gltf,options,context);promises.push(promise);_context66.next=15;return Promise.all(promises);case 15:return _context66.abrupt("return",options!==null&&options!==void 0&&(_options$gltf4=options.gltf)!==null&&_options$gltf4!==void 0&&_options$gltf4.postProcess?postProcessGLTF(gltf,options):gltf);case 16:case"end":return _context66.stop();}}},_callee62);}));return _parseGLTF$.apply(this,arguments);}function parseGLTFContainerSync(gltf,data,byteOffset,options){if(options.uri){gltf.baseUri=options.uri;}if(data instanceof ArrayBuffer&&!isGLB(data,byteOffset,options)){var textDecoder=new TextDecoder();data=textDecoder.decode(data);}if(typeof data==='string'){gltf.json=parseJSON(data);}else if(data instanceof ArrayBuffer){var glb={};byteOffset=parseGLBSync(glb,data,byteOffset,options.glb);assert$1(glb.type==='glTF',"Invalid GLB magic string ".concat(glb.type));gltf._glb=glb;gltf.json=glb.json;}else{assert$1(false,'GLTF: must be ArrayBuffer or string');}var buffers=gltf.json.buffers||[];gltf.buffers=new Array(buffers.length).fill(null);if(gltf._glb&&gltf._glb.header.hasBinChunk){var binChunks=gltf._glb.binChunks;gltf.buffers[0]={arrayBuffer:binChunks[0].arrayBuffer,byteOffset:binChunks[0].byteOffset,byteLength:binChunks[0].byteLength};}var images=gltf.json.images||[];gltf.images=new Array(images.length).fill({});}function loadBuffers(_x88,_x89,_x90){return _loadBuffers.apply(this,arguments);}function _loadBuffers(){_loadBuffers=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee63(gltf,options,context){var buffers,_i602,buffer,_context$fetch,_response$arrayBuffer,_fetch,uri,response,arrayBuffer;return _regeneratorRuntime().wrap(function _callee63$(_context67){while(1){switch(_context67.prev=_context67.next){case 0:buffers=gltf.json.buffers||[];_i602=0;case 2:if(!(_i6021&&arguments[1]!==undefined?arguments[1]:true;var transfers=arguments.length>2?arguments[2]:undefined;var transfersSet=transfers||new Set();if(!object);else if(isTransferable(object)){transfersSet.add(object);}else if(isTransferable(object.buffer)){transfersSet.add(object.buffer);}else if(ArrayBuffer.isView(object));else if(recursive&&_typeof(object)==='object'){for(var key in object){getTransferList(object[key],recursive,transfersSet);}}return transfers===undefined?Array.from(transfersSet):[];}function isTransferable(object){if(!object){return false;}if(object instanceof ArrayBuffer){return true;}if(typeof MessagePort!=='undefined'&&object instanceof MessagePort){return true;}if(typeof ImageBitmap!=='undefined'&&object instanceof ImageBitmap){return true;}if(typeof OffscreenCanvas!=='undefined'&&object instanceof OffscreenCanvas){return true;}return false;}var NOOP=function NOOP(){};var WorkerThread=/*#__PURE__*/function(){function WorkerThread(props){_classCallCheck(this,WorkerThread);_defineProperty(this,"name",void 0);_defineProperty(this,"source",void 0);_defineProperty(this,"url",void 0);_defineProperty(this,"terminated",false);_defineProperty(this,"worker",void 0);_defineProperty(this,"onMessage",void 0);_defineProperty(this,"onError",void 0);_defineProperty(this,"_loadableURL",'');var name=props.name,source=props.source,url=props.url;assert$4(source||url);this.name=name;this.source=source;this.url=url;this.onMessage=NOOP;this.onError=function(error){return console.log(error);};this.worker=isBrowser$3?this._createBrowserWorker():this._createNodeWorker();}_createClass(WorkerThread,[{key:"destroy",value:function destroy(){this.onMessage=NOOP;this.onError=NOOP;this.worker.terminate();this.terminated=true;}},{key:"isRunning",get:function get(){return Boolean(this.onMessage);}},{key:"postMessage",value:function postMessage(data,transferList){transferList=transferList||getTransferList(data);this.worker.postMessage(data,transferList);}},{key:"_getErrorFromErrorEvent",value:function _getErrorFromErrorEvent(event){var message='Failed to load ';message+="worker ".concat(this.name," from ").concat(this.url,". ");if(event.message){message+="".concat(event.message," in ");}if(event.lineno){message+=":".concat(event.lineno,":").concat(event.colno);}return new Error(message);}},{key:"_createBrowserWorker",value:function _createBrowserWorker(){var _this107=this;this._loadableURL=getLoadableWorkerURL({source:this.source,url:this.url});var worker=new Worker(this._loadableURL,{name:this.name});worker.onmessage=function(event){if(!event.data){_this107.onError(new Error('No data received'));}else{_this107.onMessage(event.data);}};worker.onerror=function(error){_this107.onError(_this107._getErrorFromErrorEvent(error));_this107.terminated=true;};worker.onmessageerror=function(event){return console.error(event);};return worker;}},{key:"_createNodeWorker",value:function _createNodeWorker(){var _this108=this;var worker;if(this.url){var absolute=this.url.includes(':/')||this.url.startsWith('/');var url=absolute?this.url:"./".concat(this.url);worker=new Worker$1(url,{eval:false});}else if(this.source){worker=new Worker$1(this.source,{eval:true});}else{throw new Error('no worker');}worker.on('message',function(data){_this108.onMessage(data);});worker.on('error',function(error){_this108.onError(error);});worker.on('exit',function(code){});return worker;}}],[{key:"isSupported",value:function isSupported(){return typeof Worker!=='undefined'&&isBrowser$3||_typeof(Worker$1)!==undefined;}}]);return WorkerThread;}();var WorkerPool=/*#__PURE__*/function(){function WorkerPool(props){_classCallCheck(this,WorkerPool);_defineProperty(this,"name",'unnamed');_defineProperty(this,"source",void 0);_defineProperty(this,"url",void 0);_defineProperty(this,"maxConcurrency",1);_defineProperty(this,"maxMobileConcurrency",1);_defineProperty(this,"onDebug",function(){});_defineProperty(this,"reuseWorkers",true);_defineProperty(this,"props",{});_defineProperty(this,"jobQueue",[]);_defineProperty(this,"idleQueue",[]);_defineProperty(this,"count",0);_defineProperty(this,"isDestroyed",false);this.source=props.source;this.url=props.url;this.setProps(props);}_createClass(WorkerPool,[{key:"destroy",value:function destroy(){this.idleQueue.forEach(function(worker){return worker.destroy();});this.isDestroyed=true;}},{key:"setProps",value:function setProps(props){this.props=_objectSpread(_objectSpread({},this.props),props);if(props.name!==undefined){this.name=props.name;}if(props.maxConcurrency!==undefined){this.maxConcurrency=props.maxConcurrency;}if(props.maxMobileConcurrency!==undefined){this.maxMobileConcurrency=props.maxMobileConcurrency;}if(props.reuseWorkers!==undefined){this.reuseWorkers=props.reuseWorkers;}if(props.onDebug!==undefined){this.onDebug=props.onDebug;}}},{key:"startJob",value:function(){var _startJob=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(name){var _this109=this;var onMessage,onError,startPromise,_args2=arguments;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:onMessage=_args2.length>1&&_args2[1]!==undefined?_args2[1]:function(job,type,data){return job.done(data);};onError=_args2.length>2&&_args2[2]!==undefined?_args2[2]:function(job,error){return job.error(error);};startPromise=new Promise(function(onStart){_this109.jobQueue.push({name:name,onMessage:onMessage,onError:onError,onStart:onStart});return _this109;});this._startQueuedJob();_context3.next=6;return startPromise;case 6:return _context3.abrupt("return",_context3.sent);case 7:case"end":return _context3.stop();}}},_callee2,this);}));function startJob(_x7){return _startJob.apply(this,arguments);}return startJob;}()},{key:"_startQueuedJob",value:function(){var _startQueuedJob2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var workerThread,queuedJob,job;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1){switch(_context4.prev=_context4.next){case 0:if(this.jobQueue.length){_context4.next=2;break;}return _context4.abrupt("return");case 2:workerThread=this._getAvailableWorker();if(workerThread){_context4.next=5;break;}return _context4.abrupt("return");case 5:queuedJob=this.jobQueue.shift();if(!queuedJob){_context4.next=18;break;}this.onDebug({message:'Starting job',name:queuedJob.name,workerThread:workerThread,backlog:this.jobQueue.length});job=new WorkerJob(queuedJob.name,workerThread);workerThread.onMessage=function(data){return queuedJob.onMessage(job,data.type,data.payload);};workerThread.onError=function(error){return queuedJob.onError(job,error);};queuedJob.onStart(job);_context4.prev=12;_context4.next=15;return job.result;case 15:_context4.prev=15;this.returnWorkerToQueue(workerThread);return _context4.finish(15);case 18:case"end":return _context4.stop();}}},_callee3,this,[[12,,15,18]]);}));function _startQueuedJob(){return _startQueuedJob2.apply(this,arguments);}return _startQueuedJob;}()},{key:"returnWorkerToQueue",value:function returnWorkerToQueue(worker){var shouldDestroyWorker=this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency();if(shouldDestroyWorker){worker.destroy();this.count--;}else{this.idleQueue.push(worker);}if(!this.isDestroyed){this._startQueuedJob();}}},{key:"_getAvailableWorker",value:function _getAvailableWorker(){if(this.idleQueue.length>0){return this.idleQueue.shift()||null;}if(this.count0&&arguments[0]!==undefined?arguments[0]:{};WorkerFarm._workerFarm=WorkerFarm._workerFarm||new WorkerFarm({});WorkerFarm._workerFarm.setProps(props);return WorkerFarm._workerFarm;}}]);return WorkerFarm;}();_defineProperty(WorkerFarm,"_workerFarm",void 0);var NPM_TAG='latest';function getWorkerURL(worker){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var workerOptions=options[worker.id]||{};var workerFile="".concat(worker.id,"-worker.js");var url=workerOptions.workerUrl;if(!url&&worker.id==='compression'){url=options.workerUrl;}if(options._workerType==='test'){url="modules/".concat(worker.module,"/dist/").concat(workerFile);}if(!url){var version=worker.version;if(version==='latest'){version=NPM_TAG;}var versionTag=version?"@".concat(version):'';url="https://unpkg.com/@loaders.gl/".concat(worker.module).concat(versionTag,"/dist/").concat(workerFile);}assert$4(url);return url;}function validateWorkerVersion(worker){var coreVersion=arguments.length>1&&arguments[1]!==undefined?arguments[1]:VERSION$9;assert$4(worker,'no worker provided');var workerVersion=worker.version;if(!coreVersion||!workerVersion){return false;}return true;}var ChildProcessProxy={};var node=/*#__PURE__*/Object.freeze({__proto__:null,'default':ChildProcessProxy});var VERSION$8="3.2.6";var loadLibraryPromises={};function loadLibrary(_x8){return _loadLibrary.apply(this,arguments);}function _loadLibrary(){_loadLibrary=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee21(libraryUrl){var moduleName,options,_args19=arguments;return _regeneratorRuntime().wrap(function _callee21$(_context25){while(1){switch(_context25.prev=_context25.next){case 0:moduleName=_args19.length>1&&_args19[1]!==undefined?_args19[1]:null;options=_args19.length>2&&_args19[2]!==undefined?_args19[2]:{};if(moduleName){libraryUrl=getLibraryUrl(libraryUrl,moduleName,options);}loadLibraryPromises[libraryUrl]=loadLibraryPromises[libraryUrl]||loadLibraryFromFile(libraryUrl);_context25.next=6;return loadLibraryPromises[libraryUrl];case 6:return _context25.abrupt("return",_context25.sent);case 7:case"end":return _context25.stop();}}},_callee21);}));return _loadLibrary.apply(this,arguments);}function getLibraryUrl(library,moduleName,options){if(library.startsWith('http')){return library;}var modules=options.modules||{};if(modules[library]){return modules[library];}if(!isBrowser$3){return"modules/".concat(moduleName,"/dist/libs/").concat(library);}if(options.CDN){assert$4(options.CDN.startsWith('http'));return"".concat(options.CDN,"/").concat(moduleName,"@").concat(VERSION$8,"/dist/libs/").concat(library);}if(isWorker){return"../src/libs/".concat(library);}return"modules/".concat(moduleName,"/src/libs/").concat(library);}function loadLibraryFromFile(_x9){return _loadLibraryFromFile.apply(this,arguments);}function _loadLibraryFromFile(){_loadLibraryFromFile=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee22(libraryUrl){var _response,response,scriptSource;return _regeneratorRuntime().wrap(function _callee22$(_context26){while(1){switch(_context26.prev=_context26.next){case 0:if(!libraryUrl.endsWith('wasm')){_context26.next=7;break;}_context26.next=3;return fetch(libraryUrl);case 3:_response=_context26.sent;_context26.next=6;return _response.arrayBuffer();case 6:return _context26.abrupt("return",_context26.sent);case 7:if(isBrowser$3){_context26.next=20;break;}_context26.prev=8;_context26.t0=node&&undefined;if(!_context26.t0){_context26.next=14;break;}_context26.next=13;return undefined(libraryUrl);case 13:_context26.t0=_context26.sent;case 14:return _context26.abrupt("return",_context26.t0);case 17:_context26.prev=17;_context26.t1=_context26["catch"](8);return _context26.abrupt("return",null);case 20:if(!isWorker){_context26.next=22;break;}return _context26.abrupt("return",importScripts(libraryUrl));case 22:_context26.next=24;return fetch(libraryUrl);case 24:response=_context26.sent;_context26.next=27;return response.text();case 27:scriptSource=_context26.sent;return _context26.abrupt("return",loadLibraryFromString(scriptSource,libraryUrl));case 29:case"end":return _context26.stop();}}},_callee22,null,[[8,17]]);}));return _loadLibraryFromFile.apply(this,arguments);}function loadLibraryFromString(scriptSource,id){if(!isBrowser$3){return undefined&&undefined(scriptSource,id);}if(isWorker){eval.call(global_,scriptSource);return null;}var script=document.createElement('script');script.id=id;try{script.appendChild(document.createTextNode(scriptSource));}catch(e){script.text=scriptSource;}document.body.appendChild(script);return null;}function canParseWithWorker(loader,options){if(!WorkerFarm.isSupported()){return false;}if(!isBrowser$3&&!(options!==null&&options!==void 0&&options._nodeWorkers)){return false;}return loader.worker&&(options===null||options===void 0?void 0:options.worker);}function parseWithWorker(_x10,_x11,_x12,_x13,_x14){return _parseWithWorker.apply(this,arguments);}function _parseWithWorker(){_parseWithWorker=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee23(loader,data,options,context,parseOnMainThread){var name,url,workerFarm,workerPool,job,result;return _regeneratorRuntime().wrap(function _callee23$(_context27){while(1){switch(_context27.prev=_context27.next){case 0:name=loader.id;url=getWorkerURL(loader,options);workerFarm=WorkerFarm.getWorkerFarm(options);workerPool=workerFarm.getWorkerPool({name:name,url:url});options=JSON.parse(JSON.stringify(options));context=JSON.parse(JSON.stringify(context||{}));_context27.next=8;return workerPool.startJob('process-on-worker',onMessage.bind(null,parseOnMainThread));case 8:job=_context27.sent;job.postMessage('process',{input:data,options:options,context:context});_context27.next=12;return job.result;case 12:result=_context27.sent;_context27.next=15;return result.result;case 15:return _context27.abrupt("return",_context27.sent);case 16:case"end":return _context27.stop();}}},_callee23);}));return _parseWithWorker.apply(this,arguments);}function onMessage(_x15,_x16,_x17,_x18){return _onMessage2.apply(this,arguments);}function _onMessage2(){_onMessage2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee24(parseOnMainThread,job,type,payload){var id,input,options,result,message;return _regeneratorRuntime().wrap(function _callee24$(_context28){while(1){switch(_context28.prev=_context28.next){case 0:_context28.t0=type;_context28.next=_context28.t0==='done'?3:_context28.t0==='error'?5:_context28.t0==='process'?7:20;break;case 3:job.done(payload);return _context28.abrupt("break",21);case 5:job.error(new Error(payload.error));return _context28.abrupt("break",21);case 7:id=payload.id,input=payload.input,options=payload.options;_context28.prev=8;_context28.next=11;return parseOnMainThread(input,options);case 11:result=_context28.sent;job.postMessage('done',{id:id,result:result});_context28.next=19;break;case 15:_context28.prev=15;_context28.t1=_context28["catch"](8);message=_context28.t1 instanceof Error?_context28.t1.message:'unknown error';job.postMessage('error',{id:id,error:message});case 19:return _context28.abrupt("break",21);case 20:console.warn("parse-with-worker unknown message ".concat(type));case 21:case"end":return _context28.stop();}}},_callee24,null,[[8,15]]);}));return _onMessage2.apply(this,arguments);}function getFirstCharacters$1(data){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:5;if(typeof data==='string'){return data.slice(0,length);}else if(ArrayBuffer.isView(data)){return getMagicString$2(data.buffer,data.byteOffset,length);}else if(data instanceof ArrayBuffer){var byteOffset=0;return getMagicString$2(data,byteOffset,length);}return'';}function getMagicString$2(arrayBuffer,byteOffset,length){if(arrayBuffer.byteLength<=byteOffset+length){return'';}var dataView=new DataView(arrayBuffer);var magic='';for(var _i494=0;_i494=0);assert$5(padding>0);return byteLength+(padding-1)&~(padding-1);}function copyToArray(source,target,targetOffset){var sourceArray;if(source instanceof ArrayBuffer){sourceArray=new Uint8Array(source);}else{var srcByteOffset=source.byteOffset;var srcByteLength=source.byteLength;sourceArray=new Uint8Array(source.buffer||source.arrayBuffer,srcByteOffset,srcByteLength);}target.set(sourceArray,targetOffset);return targetOffset+padToNBytes(sourceArray.byteLength,4);}function concatenateArrayBuffersAsync(_x19){return _concatenateArrayBuffersAsync.apply(this,arguments);}function _concatenateArrayBuffersAsync(){_concatenateArrayBuffersAsync=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee25(asyncIterator){var arrayBuffers,_iteratorAbruptCompletion,_didIteratorError,_iteratorError,_iterator,_step,chunk;return _regeneratorRuntime().wrap(function _callee25$(_context29){while(1){switch(_context29.prev=_context29.next){case 0:arrayBuffers=[];_iteratorAbruptCompletion=false;_didIteratorError=false;_context29.prev=3;_iterator=_asyncIterator(asyncIterator);case 5:_context29.next=7;return _iterator.next();case 7:if(!(_iteratorAbruptCompletion=!(_step=_context29.sent).done)){_context29.next=13;break;}chunk=_step.value;arrayBuffers.push(chunk);case 10:_iteratorAbruptCompletion=false;_context29.next=5;break;case 13:_context29.next=19;break;case 15:_context29.prev=15;_context29.t0=_context29["catch"](3);_didIteratorError=true;_iteratorError=_context29.t0;case 19:_context29.prev=19;_context29.prev=20;if(!(_iteratorAbruptCompletion&&_iterator["return"]!=null)){_context29.next=24;break;}_context29.next=24;return _iterator["return"]();case 24:_context29.prev=24;if(!_didIteratorError){_context29.next=27;break;}throw _iteratorError;case 27:return _context29.finish(24);case 28:return _context29.finish(19);case 29:return _context29.abrupt("return",concatenateArrayBuffers.apply(void 0,arrayBuffers));case 30:case"end":return _context29.stop();}}},_callee25,null,[[3,15,19,29],[20,,24,28]]);}));return _concatenateArrayBuffersAsync.apply(this,arguments);}var pathPrefix='';var fileAliases={};function resolvePath(filename){for(var alias in fileAliases){if(filename.startsWith(alias)){var replacement=fileAliases[alias];filename=filename.replace(alias,replacement);}}if(!filename.startsWith('http://')&&!filename.startsWith('https://')){filename="".concat(pathPrefix).concat(filename);}return filename;}function filename(url){var slashIndex=url&&url.lastIndexOf('/');return slashIndex>=0?url.substr(slashIndex+1):'';}var isBoolean=function isBoolean(x){return typeof x==='boolean';};var isFunction=function isFunction(x){return typeof x==='function';};var isObject=function isObject(x){return x!==null&&_typeof(x)==='object';};var isPureObject=function isPureObject(x){return isObject(x)&&x.constructor==={}.constructor;};var isIterable=function isIterable(x){return x&&typeof x[Symbol.iterator]==='function';};var isAsyncIterable=function isAsyncIterable(x){return x&&typeof x[Symbol.asyncIterator]==='function';};var isResponse=function isResponse(x){return typeof Response!=='undefined'&&x instanceof Response||x&&x.arrayBuffer&&x.text&&x.json;};var isBlob=function isBlob(x){return typeof Blob!=='undefined'&&x instanceof Blob;};var isBuffer=function isBuffer(x){return x&&_typeof(x)==='object'&&x.isBuffer;};var isReadableDOMStream=function isReadableDOMStream(x){return typeof ReadableStream!=='undefined'&&x instanceof ReadableStream||isObject(x)&&isFunction(x.tee)&&isFunction(x.cancel)&&isFunction(x.getReader);};var isReadableNodeStream=function isReadableNodeStream(x){return isObject(x)&&isFunction(x.read)&&isFunction(x.pipe)&&isBoolean(x.readable);};var isReadableStream=function isReadableStream(x){return isReadableDOMStream(x)||isReadableNodeStream(x);};var DATA_URL_PATTERN=/^data:([-\w.]+\/[-\w.+]+)(;|,)/;var MIME_TYPE_PATTERN=/^([-\w.]+\/[-\w.+]+)/;function parseMIMEType(mimeString){var matches=MIME_TYPE_PATTERN.exec(mimeString);if(matches){return matches[1];}return mimeString;}function parseMIMETypeFromURL(url){var matches=DATA_URL_PATTERN.exec(url);if(matches){return matches[1];}return'';}var QUERY_STRING_PATTERN=/\?.*/;function getResourceUrlAndType(resource){if(isResponse(resource)){var url=stripQueryString(resource.url||'');var contentTypeHeader=resource.headers.get('content-type')||'';return{url:url,type:parseMIMEType(contentTypeHeader)||parseMIMETypeFromURL(url)};}if(isBlob(resource)){return{url:stripQueryString(resource.name||''),type:resource.type||''};}if(typeof resource==='string'){return{url:stripQueryString(resource),type:parseMIMETypeFromURL(resource)};}return{url:'',type:''};}function getResourceContentLength(resource){if(isResponse(resource)){return resource.headers['content-length']||-1;}if(isBlob(resource)){return resource.size;}if(typeof resource==='string'){return resource.length;}if(resource instanceof ArrayBuffer){return resource.byteLength;}if(ArrayBuffer.isView(resource)){return resource.byteLength;}return-1;}function stripQueryString(url){return url.replace(QUERY_STRING_PATTERN,'');}function makeResponse(_x20){return _makeResponse.apply(this,arguments);}function _makeResponse(){_makeResponse=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee26(resource){var headers,contentLength,_getResourceUrlAndTyp3,url,type,initialDataUrl,response;return _regeneratorRuntime().wrap(function _callee26$(_context30){while(1){switch(_context30.prev=_context30.next){case 0:if(!isResponse(resource)){_context30.next=2;break;}return _context30.abrupt("return",resource);case 2:headers={};contentLength=getResourceContentLength(resource);if(contentLength>=0){headers['content-length']=String(contentLength);}_getResourceUrlAndTyp3=getResourceUrlAndType(resource),url=_getResourceUrlAndTyp3.url,type=_getResourceUrlAndTyp3.type;if(type){headers['content-type']=type;}_context30.next=9;return getInitialDataUrl(resource);case 9:initialDataUrl=_context30.sent;if(initialDataUrl){headers['x-first-bytes']=initialDataUrl;}if(typeof resource==='string'){resource=new TextEncoder().encode(resource);}response=new Response(resource,{headers:headers});Object.defineProperty(response,'url',{value:url});return _context30.abrupt("return",response);case 15:case"end":return _context30.stop();}}},_callee26);}));return _makeResponse.apply(this,arguments);}function checkResponse(_x21){return _checkResponse.apply(this,arguments);}function _checkResponse(){_checkResponse=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee27(response){var message;return _regeneratorRuntime().wrap(function _callee27$(_context31){while(1){switch(_context31.prev=_context31.next){case 0:if(response.ok){_context31.next=5;break;}_context31.next=3;return getResponseError(response);case 3:message=_context31.sent;throw new Error(message);case 5:case"end":return _context31.stop();}}},_callee27);}));return _checkResponse.apply(this,arguments);}function getResponseError(_x22){return _getResponseError.apply(this,arguments);}function _getResponseError(){_getResponseError=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee28(response){var message,contentType,text;return _regeneratorRuntime().wrap(function _callee28$(_context32){while(1){switch(_context32.prev=_context32.next){case 0:message="Failed to fetch resource ".concat(response.url," (").concat(response.status,"): ");_context32.prev=1;contentType=response.headers.get('Content-Type');text=response.statusText;if(!contentType.includes('application/json')){_context32.next=11;break;}_context32.t0=text;_context32.t1=" ";_context32.next=9;return response.text();case 9:_context32.t2=_context32.sent;text=_context32.t0+=_context32.t1.concat.call(_context32.t1,_context32.t2);case 11:message+=text;message=message.length>60?"".concat(message.slice(0,60),"..."):message;_context32.next=17;break;case 15:_context32.prev=15;_context32.t3=_context32["catch"](1);case 17:return _context32.abrupt("return",message);case 18:case"end":return _context32.stop();}}},_callee28,null,[[1,15]]);}));return _getResponseError.apply(this,arguments);}function getInitialDataUrl(_x23){return _getInitialDataUrl.apply(this,arguments);}function _getInitialDataUrl(){_getInitialDataUrl=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee29(resource){var INITIAL_DATA_LENGTH,blobSlice,slice,_base;return _regeneratorRuntime().wrap(function _callee29$(_context33){while(1){switch(_context33.prev=_context33.next){case 0:INITIAL_DATA_LENGTH=5;if(!(typeof resource==='string')){_context33.next=3;break;}return _context33.abrupt("return","data:,".concat(resource.slice(0,INITIAL_DATA_LENGTH)));case 3:if(!(resource instanceof Blob)){_context33.next=8;break;}blobSlice=resource.slice(0,5);_context33.next=7;return new Promise(function(resolve){var reader=new FileReader();reader.onload=function(event){var _event$target;return resolve(event===null||event===void 0?void 0:(_event$target=event.target)===null||_event$target===void 0?void 0:_event$target.result);};reader.readAsDataURL(blobSlice);});case 7:return _context33.abrupt("return",_context33.sent);case 8:if(!(resource instanceof ArrayBuffer)){_context33.next=12;break;}slice=resource.slice(0,INITIAL_DATA_LENGTH);_base=arrayBufferToBase64(slice);return _context33.abrupt("return","data:base64,".concat(_base));case 12:return _context33.abrupt("return",null);case 13:case"end":return _context33.stop();}}},_callee29);}));return _getInitialDataUrl.apply(this,arguments);}function arrayBufferToBase64(buffer){var binary='';var bytes=new Uint8Array(buffer);for(var _i496=0;_i496=0){return true;}return false;}function isBrowser$2(){var isNode=(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&String(process)==='[object process]'&&!process.browser;return!isNode||isElectron$1();}var globals$1={self:typeof self!=='undefined'&&self,window:typeof window!=='undefined'&&window,global:typeof global!=='undefined'&&global,document:typeof document!=='undefined'&&document,process:(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&process};var window_$1=globals$1.window||globals$1.self||globals$1.global;var process_$1=globals$1.process||{};var VERSION$7=typeof __VERSION__!=='undefined'?__VERSION__:'untranspiled source';var isBrowser$1=isBrowser$2();function getStorage$1(type){try{var storage=window[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return storage;}catch(e){return null;}}var LocalStorage$1=/*#__PURE__*/function(){function LocalStorage$1(id,defaultSettings){var type=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'sessionStorage';_classCallCheck(this,LocalStorage$1);this.storage=getStorage$1(type);this.id=id;this.config={};Object.assign(this.config,defaultSettings);this._loadConfiguration();}_createClass(LocalStorage$1,[{key:"getConfiguration",value:function getConfiguration(){return this.config;}},{key:"setConfiguration",value:function setConfiguration(configuration){this.config={};return this.updateConfiguration(configuration);}},{key:"updateConfiguration",value:function updateConfiguration(configuration){Object.assign(this.config,configuration);if(this.storage){var serialized=JSON.stringify(this.config);this.storage.setItem(this.id,serialized);}return this;}},{key:"_loadConfiguration",value:function _loadConfiguration(){var configuration={};if(this.storage){var serializedConfiguration=this.storage.getItem(this.id);configuration=serializedConfiguration?JSON.parse(serializedConfiguration):{};}Object.assign(this.config,configuration);return this;}}]);return LocalStorage$1;}();function formatTime$1(ms){var formatted;if(ms<10){formatted="".concat(ms.toFixed(2),"ms");}else if(ms<100){formatted="".concat(ms.toFixed(1),"ms");}else if(ms<1000){formatted="".concat(ms.toFixed(0),"ms");}else{formatted="".concat((ms/1000).toFixed(2),"s");}return formatted;}function leftPad$1(string){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:8;var padLength=Math.max(length-string.length,0);return"".concat(' '.repeat(padLength)).concat(string);}function formatImage$1(image,message,scale){var maxWidth=arguments.length>3&&arguments[3]!==undefined?arguments[3]:600;var imageUrl=image.src.replace(/\(/g,'%28').replace(/\)/g,'%29');if(image.width>maxWidth){scale=Math.min(scale,maxWidth/image.width);}var width=image.width*scale;var height=image.height*scale;var style=['font-size:1px;',"padding:".concat(Math.floor(height/2),"px ").concat(Math.floor(width/2),"px;"),"line-height:".concat(height,"px;"),"background:url(".concat(imageUrl,");"),"background-size:".concat(width,"px ").concat(height,"px;"),'color:transparent;'].join('');return["".concat(message," %c+"),style];}var COLOR$1={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function getColor$1(color){return typeof color==='string'?COLOR$1[color.toUpperCase()]||COLOR$1.WHITE:color;}function addColor$1(string,color,background){if(!isBrowser$1&&typeof string==='string'){if(color){color=getColor$1(color);string="\x1B[".concat(color,"m").concat(string,"\x1B[39m");}if(background){color=getColor$1(background);string="\x1B[".concat(background+10,"m").concat(string,"\x1B[49m");}}return string;}function autobind$1(obj){var predefined=arguments.length>1&&arguments[1]!==undefined?arguments[1]:['constructor'];var proto=Object.getPrototypeOf(obj);var propNames=Object.getOwnPropertyNames(proto);var _iterator7=_createForOfIteratorHelper(propNames),_step7;try{var _loop4=function _loop4(){var key=_step7.value;if(typeof obj[key]==='function'){if(!predefined.find(function(name){return key===name;})){obj[key]=obj[key].bind(obj);}}};for(_iterator7.s();!(_step7=_iterator7.n()).done;){_loop4();}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}}function assert$3(condition,message){if(!condition){throw new Error(message||'Assertion failed');}}function getHiResTimestamp$1(){var timestamp;if(isBrowser$1&&window_$1.performance){timestamp=window_$1.performance.now();}else if(process_$1.hrtime){var timeParts=process_$1.hrtime();timestamp=timeParts[0]*1000+timeParts[1]/1e6;}else{timestamp=Date.now();}return timestamp;}var originalConsole$1={debug:isBrowser$1?console.debug||console.log:console.log,log:console.log,info:console.info,warn:console.warn,error:console.error};var DEFAULT_SETTINGS$1={enabled:true,level:0};function noop$1(){}var cache$1={};var ONCE$1={once:true};function getTableHeader$1(table){for(var key in table){for(var title in table[key]){return title||'untitled';}}return'empty';}var Log$2=/*#__PURE__*/function(){function Log$2(){var _ref16=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{id:''},id=_ref16.id;_classCallCheck(this,Log$2);this.id=id;this.VERSION=VERSION$7;this._startTs=getHiResTimestamp$1();this._deltaTs=getHiResTimestamp$1();this.LOG_THROTTLE_TIMEOUT=0;this._storage=new LocalStorage$1("__probe-".concat(this.id,"__"),DEFAULT_SETTINGS$1);this.userData={};this.timeStamp("".concat(this.id," started"));autobind$1(this);Object.seal(this);}_createClass(Log$2,[{key:"level",get:function get(){return this.getLevel();},set:function set(newLevel){this.setLevel(newLevel);}},{key:"isEnabled",value:function isEnabled(){return this._storage.config.enabled;}},{key:"getLevel",value:function getLevel(){return this._storage.config.level;}},{key:"getTotal",value:function getTotal(){return Number((getHiResTimestamp$1()-this._startTs).toPrecision(10));}},{key:"getDelta",value:function getDelta(){return Number((getHiResTimestamp$1()-this._deltaTs).toPrecision(10));}},{key:"priority",get:function get(){return this.level;},set:function set(newPriority){this.level=newPriority;}},{key:"getPriority",value:function getPriority(){return this.level;}},{key:"enable",value:function enable(){var enabled=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this._storage.updateConfiguration({enabled:enabled});return this;}},{key:"setLevel",value:function setLevel(level){this._storage.updateConfiguration({level:level});return this;}},{key:"assert",value:function assert(condition,message){assert$3(condition,message);}},{key:"warn",value:function warn(message){return this._getLogFunction(0,message,originalConsole$1.warn,arguments,ONCE$1);}},{key:"error",value:function error(message){return this._getLogFunction(0,message,originalConsole$1.error,arguments);}},{key:"deprecated",value:function deprecated(oldUsage,newUsage){return this.warn("`".concat(oldUsage,"` is deprecated and will be removed in a later version. Use `").concat(newUsage,"` instead"));}},{key:"removed",value:function removed(oldUsage,newUsage){return this.error("`".concat(oldUsage,"` has been removed. Use `").concat(newUsage,"` instead"));}},{key:"probe",value:function probe(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole$1.log,arguments,{time:true,once:true});}},{key:"log",value:function log(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole$1.debug,arguments);}},{key:"info",value:function info(logLevel,message){return this._getLogFunction(logLevel,message,console.info,arguments);}},{key:"once",value:function once(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole$1.debug||originalConsole$1.info,arguments,ONCE$1);}},{key:"table",value:function table(logLevel,_table,columns){if(_table){return this._getLogFunction(logLevel,_table,console.table||noop$1,columns&&[columns],{tag:getTableHeader$1(_table)});}return noop$1;}},{key:"image",value:function(_image6){function image(_x26){return _image6.apply(this,arguments);}image.toString=function(){return _image6.toString();};return image;}(function(_ref17){var logLevel=_ref17.logLevel,priority=_ref17.priority,image=_ref17.image,_ref17$message=_ref17.message,message=_ref17$message===void 0?'':_ref17$message,_ref17$scale=_ref17.scale,scale=_ref17$scale===void 0?1:_ref17$scale;if(!this._shouldLog(logLevel||priority)){return noop$1;}return isBrowser$1?logImageInBrowser$1({image:image,message:message,scale:scale}):logImageInNode$1({image:image,message:message,scale:scale});})},{key:"settings",value:function settings(){if(console.table){console.table(this._storage.config);}else{console.log(this._storage.config);}}},{key:"get",value:function get(setting){return this._storage.config[setting];}},{key:"set",value:function set(setting,value){this._storage.updateConfiguration(_defineProperty2({},setting,value));}},{key:"time",value:function time(logLevel,message){return this._getLogFunction(logLevel,message,console.time?console.time:console.info);}},{key:"timeEnd",value:function timeEnd(logLevel,message){return this._getLogFunction(logLevel,message,console.timeEnd?console.timeEnd:console.info);}},{key:"timeStamp",value:function timeStamp(logLevel,message){return this._getLogFunction(logLevel,message,console.timeStamp||noop$1);}},{key:"group",value:function group(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{collapsed:false};opts=normalizeArguments$1({logLevel:logLevel,message:message,opts:opts});var _opts=opts,collapsed=_opts.collapsed;opts.method=(collapsed?console.groupCollapsed:console.group)||console.info;return this._getLogFunction(opts);}},{key:"groupCollapsed",value:function groupCollapsed(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.group(logLevel,message,Object.assign({},opts,{collapsed:true}));}},{key:"groupEnd",value:function groupEnd(logLevel){return this._getLogFunction(logLevel,'',console.groupEnd||noop$1);}},{key:"withGroup",value:function withGroup(logLevel,message,func){this.group(logLevel,message)();try{func();}finally{this.groupEnd(logLevel)();}}},{key:"trace",value:function trace(){if(console.trace){console.trace();}}},{key:"_shouldLog",value:function _shouldLog(logLevel){return this.isEnabled()&&this.getLevel()>=normalizeLogLevel$1(logLevel);}},{key:"_getLogFunction",value:function _getLogFunction(logLevel,message,method){var args=arguments.length>3&&arguments[3]!==undefined?arguments[3]:[];var opts=arguments.length>4?arguments[4]:undefined;if(this._shouldLog(logLevel)){var _method;opts=normalizeArguments$1({logLevel:logLevel,message:message,args:args,opts:opts});method=method||opts.method;assert$3(method);opts.total=this.getTotal();opts.delta=this.getDelta();this._deltaTs=getHiResTimestamp$1();var tag=opts.tag||opts.message;if(opts.once){if(!cache$1[tag]){cache$1[tag]=getHiResTimestamp$1();}else{return noop$1;}}message=decorateMessage$1(this.id,opts.message,opts);return(_method=method).bind.apply(_method,[console,message].concat(_toConsumableArray(opts.args)));}return noop$1;}}]);return Log$2;}();Log$2.VERSION=VERSION$7;function normalizeLogLevel$1(logLevel){if(!logLevel){return 0;}var resolvedLevel;switch(_typeof(logLevel)){case'number':resolvedLevel=logLevel;break;case'object':resolvedLevel=logLevel.logLevel||logLevel.priority||0;break;default:return 0;}assert$3(Number.isFinite(resolvedLevel)&&resolvedLevel>=0);return resolvedLevel;}function normalizeArguments$1(opts){var logLevel=opts.logLevel,message=opts.message;opts.logLevel=normalizeLogLevel$1(logLevel);var args=opts.args?Array.from(opts.args):[];while(args.length&&args.shift()!==message){}opts.args=args;switch(_typeof(logLevel)){case'string':case'function':if(message!==undefined){args.unshift(message);}opts.message=logLevel;break;case'object':Object.assign(opts,logLevel);break;}if(typeof opts.message==='function'){opts.message=opts.message();}var messageType=_typeof(opts.message);assert$3(messageType==='string'||messageType==='object');return Object.assign(opts,opts.opts);}function decorateMessage$1(id,message,opts){if(typeof message==='string'){var _time=opts.time?leftPad$1(formatTime$1(opts.total)):'';message=opts.time?"".concat(id,": ").concat(_time," ").concat(message):"".concat(id,": ").concat(message);message=addColor$1(message,opts.color,opts.background);}return message;}function logImageInNode$1(_ref18){var image=_ref18.image,_ref18$message=_ref18.message,message=_ref18$message===void 0?'':_ref18$message,_ref18$scale=_ref18.scale,scale=_ref18$scale===void 0?1:_ref18$scale;var asciify=null;try{asciify=module.require('asciify-image');}catch(error){}if(asciify){return function(){return asciify(image,{fit:'box',width:"".concat(Math.round(80*scale),"%")}).then(function(data){return console.log(data);});};}return noop$1;}function logImageInBrowser$1(_ref19){var image=_ref19.image,_ref19$message=_ref19.message,message=_ref19$message===void 0?'':_ref19$message,_ref19$scale=_ref19.scale,scale=_ref19$scale===void 0?1:_ref19$scale;if(typeof image==='string'){var img=new Image();img.onload=function(){var _console;var args=formatImage$1(img,message,scale);(_console=console).log.apply(_console,_toConsumableArray(args));};img.src=image;return noop$1;}var element=image.nodeName||'';if(element.toLowerCase()==='img'){var _console2;(_console2=console).log.apply(_console2,_toConsumableArray(formatImage$1(image,message,scale)));return noop$1;}if(element.toLowerCase()==='canvas'){var _img=new Image();_img.onload=function(){var _console3;return(_console3=console).log.apply(_console3,_toConsumableArray(formatImage$1(_img,message,scale)));};_img.src=image.toDataURL();return noop$1;}return noop$1;}var probeLog=new Log$2({id:'loaders.gl'});var NullLog=/*#__PURE__*/function(){function NullLog(){_classCallCheck(this,NullLog);}_createClass(NullLog,[{key:"log",value:function log(){return function(){};}},{key:"info",value:function info(){return function(){};}},{key:"warn",value:function warn(){return function(){};}},{key:"error",value:function error(){return function(){};}}]);return NullLog;}();var ConsoleLog=/*#__PURE__*/function(){function ConsoleLog(){_classCallCheck(this,ConsoleLog);_defineProperty(this,"console",void 0);this.console=console;}_createClass(ConsoleLog,[{key:"log",value:function log(){var _this$console$log;for(var _len102=arguments.length,args=new Array(_len102),_key7=0;_key7<_len102;_key7++){args[_key7]=arguments[_key7];}return(_this$console$log=this.console.log).bind.apply(_this$console$log,[this.console].concat(args));}},{key:"info",value:function info(){var _this$console$info;for(var _len103=arguments.length,args=new Array(_len103),_key8=0;_key8<_len103;_key8++){args[_key8]=arguments[_key8];}return(_this$console$info=this.console.info).bind.apply(_this$console$info,[this.console].concat(args));}},{key:"warn",value:function warn(){var _this$console$warn;for(var _len104=arguments.length,args=new Array(_len104),_key9=0;_key9<_len104;_key9++){args[_key9]=arguments[_key9];}return(_this$console$warn=this.console.warn).bind.apply(_this$console$warn,[this.console].concat(args));}},{key:"error",value:function error(){var _this$console$error;for(var _len105=arguments.length,args=new Array(_len105),_key10=0;_key10<_len105;_key10++){args[_key10]=arguments[_key10];}return(_this$console$error=this.console.error).bind.apply(_this$console$error,[this.console].concat(args));}}]);return ConsoleLog;}();var DEFAULT_LOADER_OPTIONS={fetch:null,mimeType:undefined,nothrow:false,log:new ConsoleLog(),CDN:'https://unpkg.com/@loaders.gl',worker:true,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:isBrowser$4,_nodeWorkers:false,_workerType:'',limit:0,_limitMB:0,batchSize:'auto',batchDebounceMs:0,metadata:false,transforms:[]};var REMOVED_LOADER_OPTIONS={"throws":'nothrow',dataType:'(no longer used)',uri:'baseUri',method:'fetch.method',headers:'fetch.headers',body:'fetch.body',mode:'fetch.mode',credentials:'fetch.credentials',cache:'fetch.cache',redirect:'fetch.redirect',referrer:'fetch.referrer',referrerPolicy:'fetch.referrerPolicy',integrity:'fetch.integrity',keepalive:'fetch.keepalive',signal:'fetch.signal'};function getGlobalLoaderState(){globalThis.loaders=globalThis.loaders||{};var loaders=globalThis.loaders;loaders._state=loaders._state||{};return loaders._state;}var getGlobalLoaderOptions=function getGlobalLoaderOptions(){var state=getGlobalLoaderState();state.globalOptions=state.globalOptions||_objectSpread({},DEFAULT_LOADER_OPTIONS);return state.globalOptions;};function normalizeOptions(options,loader,loaders,url){loaders=loaders||[];loaders=Array.isArray(loaders)?loaders:[loaders];validateOptions(options,loaders);return normalizeOptionsInternal(loader,options,url);}function getFetchFunction(options,context){var globalOptions=getGlobalLoaderOptions();var fetchOptions=options||globalOptions;if(typeof fetchOptions.fetch==='function'){return fetchOptions.fetch;}if(isObject(fetchOptions.fetch)){return function(url){return fetchFile(url,fetchOptions);};}if(context!==null&&context!==void 0&&context.fetch){return context===null||context===void 0?void 0:context.fetch;}return fetchFile;}function validateOptions(options,loaders){validateOptionsObject(options,null,DEFAULT_LOADER_OPTIONS,REMOVED_LOADER_OPTIONS,loaders);var _iterator8=_createForOfIteratorHelper(loaders),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var loader=_step8.value;var idOptions=options&&options[loader.id]||{};var loaderOptions=loader.options&&loader.options[loader.id]||{};var deprecatedOptions=loader.deprecatedOptions&&loader.deprecatedOptions[loader.id]||{};validateOptionsObject(idOptions,loader.id,loaderOptions,deprecatedOptions,loaders);}}catch(err){_iterator8.e(err);}finally{_iterator8.f();}}function validateOptionsObject(options,id,defaultOptions,deprecatedOptions,loaders){var loaderName=id||'Top level';var prefix=id?"".concat(id,"."):'';for(var key in options){var isSubOptions=!id&&isObject(options[key]);var isBaseUriOption=key==='baseUri'&&!id;var isWorkerUrlOption=key==='workerUrl'&&id;if(!(key in defaultOptions)&&!isBaseUriOption&&!isWorkerUrlOption){if(key in deprecatedOptions){probeLog.warn("".concat(loaderName," loader option '").concat(prefix).concat(key,"' no longer supported, use '").concat(deprecatedOptions[key],"'"))();}else if(!isSubOptions){var suggestion=findSimilarOption(key,loaders);probeLog.warn("".concat(loaderName," loader option '").concat(prefix).concat(key,"' not recognized. ").concat(suggestion))();}}}}function findSimilarOption(optionKey,loaders){var lowerCaseOptionKey=optionKey.toLowerCase();var bestSuggestion='';var _iterator9=_createForOfIteratorHelper(loaders),_step9;try{for(_iterator9.s();!(_step9=_iterator9.n()).done;){var loader=_step9.value;for(var key in loader.options){if(optionKey===key){return"Did you mean '".concat(loader.id,".").concat(key,"'?");}var lowerCaseKey=key.toLowerCase();var isPartialMatch=lowerCaseOptionKey.startsWith(lowerCaseKey)||lowerCaseKey.startsWith(lowerCaseOptionKey);if(isPartialMatch){bestSuggestion=bestSuggestion||"Did you mean '".concat(loader.id,".").concat(key,"'?");}}}}catch(err){_iterator9.e(err);}finally{_iterator9.f();}return bestSuggestion;}function normalizeOptionsInternal(loader,options,url){var loaderDefaultOptions=loader.options||{};var mergedOptions=_objectSpread({},loaderDefaultOptions);addUrlOptions(mergedOptions,url);if(mergedOptions.log===null){mergedOptions.log=new NullLog();}mergeNestedFields(mergedOptions,getGlobalLoaderOptions());mergeNestedFields(mergedOptions,options);return mergedOptions;}function mergeNestedFields(mergedOptions,options){for(var key in options){if(key in options){var value=options[key];if(isPureObject(value)&&isPureObject(mergedOptions[key])){mergedOptions[key]=_objectSpread(_objectSpread({},mergedOptions[key]),options[key]);}else{mergedOptions[key]=options[key];}}}}function addUrlOptions(options,url){if(url&&!('baseUri'in options)){options.baseUri=url;}}function isLoaderObject(loader){var _loader;if(!loader){return false;}if(Array.isArray(loader)){loader=loader[0];}var hasExtensions=Array.isArray((_loader=loader)===null||_loader===void 0?void 0:_loader.extensions);return hasExtensions;}function normalizeLoader(loader){var _loader2,_loader3;assert$5(loader,'null loader');assert$5(isLoaderObject(loader),'invalid loader');var options;if(Array.isArray(loader)){options=loader[1];loader=loader[0];loader=_objectSpread(_objectSpread({},loader),{},{options:_objectSpread(_objectSpread({},loader.options),options)});}if((_loader2=loader)!==null&&_loader2!==void 0&&_loader2.parseTextSync||(_loader3=loader)!==null&&_loader3!==void 0&&_loader3.parseText){loader.text=true;}if(!loader.text){loader.binary=true;}return loader;}var getGlobalLoaderRegistry=function getGlobalLoaderRegistry(){var state=getGlobalLoaderState();state.loaderRegistry=state.loaderRegistry||[];return state.loaderRegistry;};function getRegisteredLoaders(){return getGlobalLoaderRegistry();}function isElectron(mockUserAgent){if(typeof window!=='undefined'&&_typeof(window.process)==='object'&&window.process.type==='renderer'){return true;}if(typeof process!=='undefined'&&_typeof(process.versions)==='object'&&Boolean(process.versions.electron)){return true;}var realUserAgent=(typeof navigator==="undefined"?"undefined":_typeof(navigator))==='object'&&typeof navigator.userAgent==='string'&&navigator.userAgent;var userAgent=mockUserAgent||realUserAgent;if(userAgent&&userAgent.indexOf('Electron')>=0){return true;}return false;}function isBrowser(){var isNode=(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&String(process)==='[object process]'&&!process.browser;return!isNode||isElectron();}var globals={self:typeof self!=='undefined'&&self,window:typeof window!=='undefined'&&window,global:typeof global!=='undefined'&&global,document:typeof document!=='undefined'&&document,process:(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&process};var window_=globals.window||globals.self||globals.global;var process_=globals.process||{};var VERSION$6=typeof __VERSION__!=='undefined'?__VERSION__:'untranspiled source';isBrowser();function getStorage(type){try{var storage=window[type];var x='__storage_test__';storage.setItem(x,x);storage.removeItem(x);return storage;}catch(e){return null;}}var LocalStorage=/*#__PURE__*/function(){function LocalStorage(id){_classCallCheck(this,LocalStorage);var defaultSettings=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var type=arguments.length>2&&arguments[2]!==undefined?arguments[2]:'sessionStorage';_defineProperty(this,"storage",void 0);_defineProperty(this,"id",void 0);_defineProperty(this,"config",{});this.storage=getStorage(type);this.id=id;this.config={};Object.assign(this.config,defaultSettings);this._loadConfiguration();}_createClass(LocalStorage,[{key:"getConfiguration",value:function getConfiguration(){return this.config;}},{key:"setConfiguration",value:function setConfiguration(configuration){this.config={};return this.updateConfiguration(configuration);}},{key:"updateConfiguration",value:function updateConfiguration(configuration){Object.assign(this.config,configuration);if(this.storage){var serialized=JSON.stringify(this.config);this.storage.setItem(this.id,serialized);}return this;}},{key:"_loadConfiguration",value:function _loadConfiguration(){var configuration={};if(this.storage){var serializedConfiguration=this.storage.getItem(this.id);configuration=serializedConfiguration?JSON.parse(serializedConfiguration):{};}Object.assign(this.config,configuration);return this;}}]);return LocalStorage;}();function formatTime(ms){var formatted;if(ms<10){formatted="".concat(ms.toFixed(2),"ms");}else if(ms<100){formatted="".concat(ms.toFixed(1),"ms");}else if(ms<1000){formatted="".concat(ms.toFixed(0),"ms");}else{formatted="".concat((ms/1000).toFixed(2),"s");}return formatted;}function leftPad(string){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:8;var padLength=Math.max(length-string.length,0);return"".concat(' '.repeat(padLength)).concat(string);}function formatImage(image,message,scale){var maxWidth=arguments.length>3&&arguments[3]!==undefined?arguments[3]:600;var imageUrl=image.src.replace(/\(/g,'%28').replace(/\)/g,'%29');if(image.width>maxWidth){scale=Math.min(scale,maxWidth/image.width);}var width=image.width*scale;var height=image.height*scale;var style=['font-size:1px;',"padding:".concat(Math.floor(height/2),"px ").concat(Math.floor(width/2),"px;"),"line-height:".concat(height,"px;"),"background:url(".concat(imageUrl,");"),"background-size:".concat(width,"px ").concat(height,"px;"),'color:transparent;'].join('');return["".concat(message," %c+"),style];}var COLOR;(function(COLOR){COLOR[COLOR["BLACK"]=30]="BLACK";COLOR[COLOR["RED"]=31]="RED";COLOR[COLOR["GREEN"]=32]="GREEN";COLOR[COLOR["YELLOW"]=33]="YELLOW";COLOR[COLOR["BLUE"]=34]="BLUE";COLOR[COLOR["MAGENTA"]=35]="MAGENTA";COLOR[COLOR["CYAN"]=36]="CYAN";COLOR[COLOR["WHITE"]=37]="WHITE";COLOR[COLOR["BRIGHT_BLACK"]=90]="BRIGHT_BLACK";COLOR[COLOR["BRIGHT_RED"]=91]="BRIGHT_RED";COLOR[COLOR["BRIGHT_GREEN"]=92]="BRIGHT_GREEN";COLOR[COLOR["BRIGHT_YELLOW"]=93]="BRIGHT_YELLOW";COLOR[COLOR["BRIGHT_BLUE"]=94]="BRIGHT_BLUE";COLOR[COLOR["BRIGHT_MAGENTA"]=95]="BRIGHT_MAGENTA";COLOR[COLOR["BRIGHT_CYAN"]=96]="BRIGHT_CYAN";COLOR[COLOR["BRIGHT_WHITE"]=97]="BRIGHT_WHITE";})(COLOR||(COLOR={}));function getColor(color){return typeof color==='string'?COLOR[color.toUpperCase()]||COLOR.WHITE:color;}function addColor(string,color,background){if(!isBrowser&&typeof string==='string'){if(color){color=getColor(color);string="\x1B[".concat(color,"m").concat(string,"\x1B[39m");}if(background){color=getColor(background);string="\x1B[".concat(background+10,"m").concat(string,"\x1B[49m");}}return string;}function autobind(obj){var predefined=arguments.length>1&&arguments[1]!==undefined?arguments[1]:['constructor'];var proto=Object.getPrototypeOf(obj);var propNames=Object.getOwnPropertyNames(proto);var _iterator10=_createForOfIteratorHelper(propNames),_step10;try{var _loop5=function _loop5(){var key=_step10.value;if(typeof obj[key]==='function'){if(!predefined.find(function(name){return key===name;})){obj[key]=obj[key].bind(obj);}}};for(_iterator10.s();!(_step10=_iterator10.n()).done;){_loop5();}}catch(err){_iterator10.e(err);}finally{_iterator10.f();}}function assert$2(condition,message){if(!condition){throw new Error(message||'Assertion failed');}}function getHiResTimestamp(){var timestamp;if(isBrowser&&'performance'in window_){var _window$performance,_window$performance$n;timestamp=window_===null||window_===void 0?void 0:(_window$performance=window_.performance)===null||_window$performance===void 0?void 0:(_window$performance$n=_window$performance.now)===null||_window$performance$n===void 0?void 0:_window$performance$n.call(_window$performance);}else if('hrtime'in process_){var _process$hrtime;var timeParts=process_===null||process_===void 0?void 0:(_process$hrtime=process_.hrtime)===null||_process$hrtime===void 0?void 0:_process$hrtime.call(process_);timestamp=timeParts[0]*1000+timeParts[1]/1e6;}else{timestamp=Date.now();}return timestamp;}var originalConsole={debug:isBrowser?console.debug||console.log:console.log,log:console.log,info:console.info,warn:console.warn,error:console.error};var DEFAULT_SETTINGS={enabled:true,level:0};function noop(){}var cache={};var ONCE={once:true};var Log$1=/*#__PURE__*/function(){function Log$1(){_classCallCheck(this,Log$1);var _ref20=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{id:''},id=_ref20.id;_defineProperty(this,"id",void 0);_defineProperty(this,"VERSION",VERSION$6);_defineProperty(this,"_startTs",getHiResTimestamp());_defineProperty(this,"_deltaTs",getHiResTimestamp());_defineProperty(this,"_storage",void 0);_defineProperty(this,"userData",{});_defineProperty(this,"LOG_THROTTLE_TIMEOUT",0);this.id=id;this._storage=new LocalStorage("__probe-".concat(this.id,"__"),DEFAULT_SETTINGS);this.userData={};this.timeStamp("".concat(this.id," started"));autobind(this);Object.seal(this);}_createClass(Log$1,[{key:"level",get:function get(){return this.getLevel();},set:function set(newLevel){this.setLevel(newLevel);}},{key:"isEnabled",value:function isEnabled(){return this._storage.config.enabled;}},{key:"getLevel",value:function getLevel(){return this._storage.config.level;}},{key:"getTotal",value:function getTotal(){return Number((getHiResTimestamp()-this._startTs).toPrecision(10));}},{key:"getDelta",value:function getDelta(){return Number((getHiResTimestamp()-this._deltaTs).toPrecision(10));}},{key:"priority",get:function get(){return this.level;},set:function set(newPriority){this.level=newPriority;}},{key:"getPriority",value:function getPriority(){return this.level;}},{key:"enable",value:function enable(){var enabled=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;this._storage.updateConfiguration({enabled:enabled});return this;}},{key:"setLevel",value:function setLevel(level){this._storage.updateConfiguration({level:level});return this;}},{key:"get",value:function get(setting){return this._storage.config[setting];}},{key:"set",value:function set(setting,value){this._storage.updateConfiguration(_defineProperty2({},setting,value));}},{key:"settings",value:function settings(){if(console.table){console.table(this._storage.config);}else{console.log(this._storage.config);}}},{key:"assert",value:function assert(condition,message){assert$2(condition,message);}},{key:"warn",value:function warn(message){return this._getLogFunction(0,message,originalConsole.warn,arguments,ONCE);}},{key:"error",value:function error(message){return this._getLogFunction(0,message,originalConsole.error,arguments);}},{key:"deprecated",value:function deprecated(oldUsage,newUsage){return this.warn("`".concat(oldUsage,"` is deprecated and will be removed in a later version. Use `").concat(newUsage,"` instead"));}},{key:"removed",value:function removed(oldUsage,newUsage){return this.error("`".concat(oldUsage,"` has been removed. Use `").concat(newUsage,"` instead"));}},{key:"probe",value:function probe(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole.log,arguments,{time:true,once:true});}},{key:"log",value:function log(logLevel,message){return this._getLogFunction(logLevel,message,originalConsole.debug,arguments);}},{key:"info",value:function info(logLevel,message){return this._getLogFunction(logLevel,message,console.info,arguments);}},{key:"once",value:function once(logLevel,message){for(var _len=arguments.length,args=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key];}return this._getLogFunction(logLevel,message,originalConsole.debug||originalConsole.info,arguments,ONCE);}},{key:"table",value:function table(logLevel,_table2,columns){if(_table2){return this._getLogFunction(logLevel,_table2,console.table||noop,columns&&[columns],{tag:getTableHeader(_table2)});}return noop;}},{key:"image",value:function image(_ref){var logLevel=_ref.logLevel,priority=_ref.priority,image=_ref.image,_ref$message=_ref.message,message=_ref$message===void 0?'':_ref$message,_ref$scale=_ref.scale,scale=_ref$scale===void 0?1:_ref$scale;if(!this._shouldLog(logLevel||priority)){return noop;}return isBrowser?logImageInBrowser({image:image,message:message,scale:scale}):logImageInNode({image:image,message:message,scale:scale});}},{key:"time",value:function time(logLevel,message){return this._getLogFunction(logLevel,message,console.time?console.time:console.info);}},{key:"timeEnd",value:function timeEnd(logLevel,message){return this._getLogFunction(logLevel,message,console.timeEnd?console.timeEnd:console.info);}},{key:"timeStamp",value:function timeStamp(logLevel,message){return this._getLogFunction(logLevel,message,console.timeStamp||noop);}},{key:"group",value:function group(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{collapsed:false};var options=normalizeArguments({logLevel:logLevel,message:message,opts:opts});var collapsed=opts.collapsed;options.method=(collapsed?console.groupCollapsed:console.group)||console.info;return this._getLogFunction(options);}},{key:"groupCollapsed",value:function groupCollapsed(logLevel,message){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return this.group(logLevel,message,Object.assign({},opts,{collapsed:true}));}},{key:"groupEnd",value:function groupEnd(logLevel){return this._getLogFunction(logLevel,'',console.groupEnd||noop);}},{key:"withGroup",value:function withGroup(logLevel,message,func){this.group(logLevel,message)();try{func();}finally{this.groupEnd(logLevel)();}}},{key:"trace",value:function trace(){if(console.trace){console.trace();}}},{key:"_shouldLog",value:function _shouldLog(logLevel){return this.isEnabled()&&this.getLevel()>=normalizeLogLevel(logLevel);}},{key:"_getLogFunction",value:function _getLogFunction(logLevel,message,method,args,opts){if(this._shouldLog(logLevel)){var _method2;opts=normalizeArguments({logLevel:logLevel,message:message,args:args,opts:opts});method=method||opts.method;assert$2(method);opts.total=this.getTotal();opts.delta=this.getDelta();this._deltaTs=getHiResTimestamp();var tag=opts.tag||opts.message;if(opts.once){if(!cache[tag]){cache[tag]=getHiResTimestamp();}else{return noop;}}message=decorateMessage(this.id,opts.message,opts);return(_method2=method).bind.apply(_method2,[console,message].concat(_toConsumableArray(opts.args)));}return noop;}}]);return Log$1;}();_defineProperty(Log$1,"VERSION",VERSION$6);function normalizeLogLevel(logLevel){if(!logLevel){return 0;}var resolvedLevel;switch(_typeof(logLevel)){case'number':resolvedLevel=logLevel;break;case'object':resolvedLevel=logLevel.logLevel||logLevel.priority||0;break;default:return 0;}assert$2(Number.isFinite(resolvedLevel)&&resolvedLevel>=0);return resolvedLevel;}function normalizeArguments(opts){var logLevel=opts.logLevel,message=opts.message;opts.logLevel=normalizeLogLevel(logLevel);var args=opts.args?Array.from(opts.args):[];while(args.length&&args.shift()!==message){}switch(_typeof(logLevel)){case'string':case'function':if(message!==undefined){args.unshift(message);}opts.message=logLevel;break;case'object':Object.assign(opts,logLevel);break;}if(typeof opts.message==='function'){opts.message=opts.message();}var messageType=_typeof(opts.message);assert$2(messageType==='string'||messageType==='object');return Object.assign(opts,{args:args},opts.opts);}function decorateMessage(id,message,opts){if(typeof message==='string'){var _time2=opts.time?leftPad(formatTime(opts.total)):'';message=opts.time?"".concat(id,": ").concat(_time2," ").concat(message):"".concat(id,": ").concat(message);message=addColor(message,opts.color,opts.background);}return message;}function logImageInNode(_ref2){var image=_ref2.image,_ref2$message=_ref2.message,message=_ref2$message===void 0?'':_ref2$message,_ref2$scale=_ref2.scale,scale=_ref2$scale===void 0?1:_ref2$scale;var asciify=null;try{asciify=module.require('asciify-image');}catch(error){}if(asciify){return function(){return asciify(image,{fit:'box',width:"".concat(Math.round(80*scale),"%")}).then(function(data){return console.log(data);});};}return noop;}function logImageInBrowser(_ref3){var image=_ref3.image,_ref3$message=_ref3.message,message=_ref3$message===void 0?'':_ref3$message,_ref3$scale=_ref3.scale,scale=_ref3$scale===void 0?1:_ref3$scale;if(typeof image==='string'){var img=new Image();img.onload=function(){var _console4;var args=formatImage(img,message,scale);(_console4=console).log.apply(_console4,_toConsumableArray(args));};img.src=image;return noop;}var element=image.nodeName||'';if(element.toLowerCase()==='img'){var _console5;(_console5=console).log.apply(_console5,_toConsumableArray(formatImage(image,message,scale)));return noop;}if(element.toLowerCase()==='canvas'){var _img2=new Image();_img2.onload=function(){var _console6;return(_console6=console).log.apply(_console6,_toConsumableArray(formatImage(_img2,message,scale)));};_img2.src=image.toDataURL();return noop;}return noop;}function getTableHeader(table){for(var key in table){for(var title in table[key]){return title||'untitled';}}return'empty';}var log=new Log$1({id:'loaders.gl'});var EXT_PATTERN=/\.([^.]+)$/;function selectLoader(_x27){return _selectLoader.apply(this,arguments);}function _selectLoader(){_selectLoader=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee31(data){var loaders,options,context,loader,_args29=arguments;return _regeneratorRuntime().wrap(function _callee31$(_context35){while(1){switch(_context35.prev=_context35.next){case 0:loaders=_args29.length>1&&_args29[1]!==undefined?_args29[1]:[];options=_args29.length>2?_args29[2]:undefined;context=_args29.length>3?_args29[3]:undefined;if(validHTTPResponse(data)){_context35.next=5;break;}return _context35.abrupt("return",null);case 5:loader=selectLoaderSync(data,loaders,_objectSpread(_objectSpread({},options),{},{nothrow:true}),context);if(!loader){_context35.next=8;break;}return _context35.abrupt("return",loader);case 8:if(!isBlob(data)){_context35.next=13;break;}_context35.next=11;return data.slice(0,10).arrayBuffer();case 11:data=_context35.sent;loader=selectLoaderSync(data,loaders,options,context);case 13:if(!(!loader&&!(options!==null&&options!==void 0&&options.nothrow))){_context35.next=15;break;}throw new Error(getNoValidLoaderMessage(data));case 15:return _context35.abrupt("return",loader);case 16:case"end":return _context35.stop();}}},_callee31);}));return _selectLoader.apply(this,arguments);}function selectLoaderSync(data){var loaders=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];var options=arguments.length>2?arguments[2]:undefined;var context=arguments.length>3?arguments[3]:undefined;if(!validHTTPResponse(data)){return null;}if(loaders&&!Array.isArray(loaders)){return normalizeLoader(loaders);}var candidateLoaders=[];if(loaders){candidateLoaders=candidateLoaders.concat(loaders);}if(!(options!==null&&options!==void 0&&options.ignoreRegisteredLoaders)){var _candidateLoaders;(_candidateLoaders=candidateLoaders).push.apply(_candidateLoaders,_toConsumableArray(getRegisteredLoaders()));}normalizeLoaders(candidateLoaders);var loader=selectLoaderInternal(data,candidateLoaders,options,context);if(!loader&&!(options!==null&&options!==void 0&&options.nothrow)){throw new Error(getNoValidLoaderMessage(data));}return loader;}function selectLoaderInternal(data,loaders,options,context){var _getResourceUrlAndTyp=getResourceUrlAndType(data),url=_getResourceUrlAndTyp.url,type=_getResourceUrlAndTyp.type;var testUrl=url||(context===null||context===void 0?void 0:context.url);var loader=null;var reason='';if(options!==null&&options!==void 0&&options.mimeType){loader=findLoaderByMIMEType(loaders,options===null||options===void 0?void 0:options.mimeType);reason="match forced by supplied MIME type ".concat(options===null||options===void 0?void 0:options.mimeType);}loader=loader||findLoaderByUrl(loaders,testUrl);reason=reason||(loader?"matched url ".concat(testUrl):'');loader=loader||findLoaderByMIMEType(loaders,type);reason=reason||(loader?"matched MIME type ".concat(type):'');loader=loader||findLoaderByInitialBytes(loaders,data);reason=reason||(loader?"matched initial data ".concat(getFirstCharacters(data)):'');loader=loader||findLoaderByMIMEType(loaders,options===null||options===void 0?void 0:options.fallbackMimeType);reason=reason||(loader?"matched fallback MIME type ".concat(type):'');if(reason){var _loader;log.log(1,"selectLoader selected ".concat((_loader=loader)===null||_loader===void 0?void 0:_loader.name,": ").concat(reason,"."));}return loader;}function validHTTPResponse(data){if(data instanceof Response){if(data.status===204){return false;}}return true;}function getNoValidLoaderMessage(data){var _getResourceUrlAndTyp2=getResourceUrlAndType(data),url=_getResourceUrlAndTyp2.url,type=_getResourceUrlAndTyp2.type;var message='No valid loader found (';message+=url?"".concat(filename(url),", "):'no url provided, ';message+="MIME type: ".concat(type?"\"".concat(type,"\""):'not provided',", ");var firstCharacters=data?getFirstCharacters(data):'';message+=firstCharacters?" first bytes: \"".concat(firstCharacters,"\""):'first bytes: not available';message+=')';return message;}function normalizeLoaders(loaders){var _iterator11=_createForOfIteratorHelper(loaders),_step11;try{for(_iterator11.s();!(_step11=_iterator11.n()).done;){var loader=_step11.value;normalizeLoader(loader);}}catch(err){_iterator11.e(err);}finally{_iterator11.f();}}function findLoaderByUrl(loaders,url){var match=url&&EXT_PATTERN.exec(url);var extension=match&&match[1];return extension?findLoaderByExtension(loaders,extension):null;}function findLoaderByExtension(loaders,extension){extension=extension.toLowerCase();var _iterator12=_createForOfIteratorHelper(loaders),_step12;try{for(_iterator12.s();!(_step12=_iterator12.n()).done;){var loader=_step12.value;var _iterator13=_createForOfIteratorHelper(loader.extensions),_step13;try{for(_iterator13.s();!(_step13=_iterator13.n()).done;){var loaderExtension=_step13.value;if(loaderExtension.toLowerCase()===extension){return loader;}}}catch(err){_iterator13.e(err);}finally{_iterator13.f();}}}catch(err){_iterator12.e(err);}finally{_iterator12.f();}return null;}function findLoaderByMIMEType(loaders,mimeType){var _iterator14=_createForOfIteratorHelper(loaders),_step14;try{for(_iterator14.s();!(_step14=_iterator14.n()).done;){var loader=_step14.value;if(loader.mimeTypes&&loader.mimeTypes.includes(mimeType)){return loader;}if(mimeType==="application/x.".concat(loader.id)){return loader;}}}catch(err){_iterator14.e(err);}finally{_iterator14.f();}return null;}function findLoaderByInitialBytes(loaders,data){if(!data){return null;}var _iterator15=_createForOfIteratorHelper(loaders),_step15;try{for(_iterator15.s();!(_step15=_iterator15.n()).done;){var loader=_step15.value;if(typeof data==='string'){if(testDataAgainstText(data,loader)){return loader;}}else if(ArrayBuffer.isView(data)){if(testDataAgainstBinary(data.buffer,data.byteOffset,loader)){return loader;}}else if(data instanceof ArrayBuffer){var byteOffset=0;if(testDataAgainstBinary(data,byteOffset,loader)){return loader;}}}}catch(err){_iterator15.e(err);}finally{_iterator15.f();}return null;}function testDataAgainstText(data,loader){if(loader.testText){return loader.testText(data);}var tests=Array.isArray(loader.tests)?loader.tests:[loader.tests];return tests.some(function(test){return data.startsWith(test);});}function testDataAgainstBinary(data,byteOffset,loader){var tests=Array.isArray(loader.tests)?loader.tests:[loader.tests];return tests.some(function(test){return testBinary(data,byteOffset,loader,test);});}function testBinary(data,byteOffset,loader,test){if(test instanceof ArrayBuffer){return compareArrayBuffers(test,data,test.byteLength);}switch(_typeof(test)){case'function':return test(data,loader);case'string':var magic=getMagicString$1(data,byteOffset,test.length);return test===magic;default:return false;}}function getFirstCharacters(data){var length=arguments.length>1&&arguments[1]!==undefined?arguments[1]:5;if(typeof data==='string'){return data.slice(0,length);}else if(ArrayBuffer.isView(data)){return getMagicString$1(data.buffer,data.byteOffset,length);}else if(data instanceof ArrayBuffer){var byteOffset=0;return getMagicString$1(data,byteOffset,length);}return'';}function getMagicString$1(arrayBuffer,byteOffset,length){if(arrayBuffer.byteLength1&&_args5[1]!==undefined?_args5[1]:{};_options$chunkSize=options.chunkSize,chunkSize=_options$chunkSize===void 0?DEFAULT_CHUNK_SIZE$1:_options$chunkSize;byteOffset=0;case 3:if(!(byteOffset2&&arguments[2]!==undefined?arguments[2]:null;if(previousContext){return previousContext;}var resolvedContext=_objectSpread({fetch:getFetchFunction(options,context)},context);if(!Array.isArray(resolvedContext.loaders)){resolvedContext.loaders=null;}return resolvedContext;}function getLoadersFromContext(loaders,context){if(!context&&loaders&&!Array.isArray(loaders)){return loaders;}var candidateLoaders;if(loaders){candidateLoaders=Array.isArray(loaders)?loaders:[loaders];}if(context&&context.loaders){var contextLoaders=Array.isArray(context.loaders)?context.loaders:[context.loaders];candidateLoaders=candidateLoaders?[].concat(_toConsumableArray(candidateLoaders),_toConsumableArray(contextLoaders)):contextLoaders;}return candidateLoaders&&candidateLoaders.length?candidateLoaders:null;}function parse$3(_x31,_x32,_x33,_x34){return _parse$.apply(this,arguments);}function _parse$(){_parse$=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee33(data,loaders,options,context){var _getResourceUrlAndTyp4,url,typedLoaders,candidateLoaders,loader;return _regeneratorRuntime().wrap(function _callee33$(_context37){while(1){switch(_context37.prev=_context37.next){case 0:assert$4(!context||_typeof(context)==='object');if(loaders&&!Array.isArray(loaders)&&!isLoaderObject(loaders)){context=undefined;options=loaders;loaders=undefined;}_context37.next=4;return data;case 4:data=_context37.sent;options=options||{};_getResourceUrlAndTyp4=getResourceUrlAndType(data),url=_getResourceUrlAndTyp4.url;typedLoaders=loaders;candidateLoaders=getLoadersFromContext(typedLoaders,context);_context37.next=11;return selectLoader(data,candidateLoaders,options);case 11:loader=_context37.sent;if(loader){_context37.next=14;break;}return _context37.abrupt("return",null);case 14:options=normalizeOptions(options,loader,candidateLoaders,url);context=getLoaderContext({url:url,parse:parse$3,loaders:candidateLoaders},options,context);_context37.next=18;return parseWithLoader(loader,data,options,context);case 18:return _context37.abrupt("return",_context37.sent);case 19:case"end":return _context37.stop();}}},_callee33);}));return _parse$.apply(this,arguments);}function parseWithLoader(_x35,_x36,_x37,_x38){return _parseWithLoader.apply(this,arguments);}function _parseWithLoader(){_parseWithLoader=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee34(loader,data,options,context){var response,ok,redirected,status,statusText,type,url,headers;return _regeneratorRuntime().wrap(function _callee34$(_context38){while(1){switch(_context38.prev=_context38.next){case 0:validateWorkerVersion(loader);if(isResponse(data)){response=data;ok=response.ok,redirected=response.redirected,status=response.status,statusText=response.statusText,type=response.type,url=response.url;headers=Object.fromEntries(response.headers.entries());context.response={headers:headers,ok:ok,redirected:redirected,status:status,statusText:statusText,type:type,url:url};}_context38.next=4;return getArrayBufferOrStringFromData(data,loader,options);case 4:data=_context38.sent;if(!(loader.parseTextSync&&typeof data==='string')){_context38.next=8;break;}options.dataType='text';return _context38.abrupt("return",loader.parseTextSync(data,options,context,loader));case 8:if(!canParseWithWorker(loader,options)){_context38.next=12;break;}_context38.next=11;return parseWithWorker(loader,data,options,context,parse$3);case 11:return _context38.abrupt("return",_context38.sent);case 12:if(!(loader.parseText&&typeof data==='string')){_context38.next=16;break;}_context38.next=15;return loader.parseText(data,options,context,loader);case 15:return _context38.abrupt("return",_context38.sent);case 16:if(!loader.parse){_context38.next=20;break;}_context38.next=19;return loader.parse(data,options,context,loader);case 19:return _context38.abrupt("return",_context38.sent);case 20:assert$4(!loader.parseSync);throw new Error("".concat(loader.id," loader - no parser found and worker is disabled"));case 22:case"end":return _context38.stop();}}},_callee34);}));return _parseWithLoader.apply(this,arguments);}var VERSION$5="3.2.6";var VERSION$4="3.2.6";var VERSION$3="3.2.6";var BASIS_CDN_ENCODER_WASM="https://unpkg.com/@loaders.gl/textures@".concat(VERSION$3,"/dist/libs/basis_encoder.wasm");var BASIS_CDN_ENCODER_JS="https://unpkg.com/@loaders.gl/textures@".concat(VERSION$3,"/dist/libs/basis_encoder.js");var loadBasisTranscoderPromise;function loadBasisTrascoderModule(_x39){return _loadBasisTrascoderModule.apply(this,arguments);}function _loadBasisTrascoderModule(){_loadBasisTrascoderModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee35(options){var modules;return _regeneratorRuntime().wrap(function _callee35$(_context39){while(1){switch(_context39.prev=_context39.next){case 0:modules=options.modules||{};if(!modules.basis){_context39.next=3;break;}return _context39.abrupt("return",modules.basis);case 3:loadBasisTranscoderPromise=loadBasisTranscoderPromise||loadBasisTrascoder(options);_context39.next=6;return loadBasisTranscoderPromise;case 6:return _context39.abrupt("return",_context39.sent);case 7:case"end":return _context39.stop();}}},_callee35);}));return _loadBasisTrascoderModule.apply(this,arguments);}function loadBasisTrascoder(_x40){return _loadBasisTrascoder.apply(this,arguments);}function _loadBasisTrascoder(){_loadBasisTrascoder=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee36(options){var BASIS,wasmBinary,_yield$Promise$all,_yield$Promise$all2;return _regeneratorRuntime().wrap(function _callee36$(_context40){while(1){switch(_context40.prev=_context40.next){case 0:BASIS=null;wasmBinary=null;_context40.t0=Promise;_context40.next=5;return loadLibrary('basis_transcoder.js','textures',options);case 5:_context40.t1=_context40.sent;_context40.next=8;return loadLibrary('basis_transcoder.wasm','textures',options);case 8:_context40.t2=_context40.sent;_context40.t3=[_context40.t1,_context40.t2];_context40.next=12;return _context40.t0.all.call(_context40.t0,_context40.t3);case 12:_yield$Promise$all=_context40.sent;_yield$Promise$all2=_slicedToArray(_yield$Promise$all,2);BASIS=_yield$Promise$all2[0];wasmBinary=_yield$Promise$all2[1];BASIS=BASIS||globalThis.BASIS;_context40.next=19;return initializeBasisTrascoderModule(BASIS,wasmBinary);case 19:return _context40.abrupt("return",_context40.sent);case 20:case"end":return _context40.stop();}}},_callee36);}));return _loadBasisTrascoder.apply(this,arguments);}function initializeBasisTrascoderModule(BasisModule,wasmBinary){var options={};if(wasmBinary){options.wasmBinary=wasmBinary;}return new Promise(function(resolve){BasisModule(options).then(function(module){var BasisFile=module.BasisFile,initializeBasis=module.initializeBasis;initializeBasis();resolve({BasisFile:BasisFile});});});}var loadBasisEncoderPromise;function loadBasisEncoderModule(_x41){return _loadBasisEncoderModule.apply(this,arguments);}function _loadBasisEncoderModule(){_loadBasisEncoderModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee37(options){var modules;return _regeneratorRuntime().wrap(function _callee37$(_context41){while(1){switch(_context41.prev=_context41.next){case 0:modules=options.modules||{};if(!modules.basisEncoder){_context41.next=3;break;}return _context41.abrupt("return",modules.basisEncoder);case 3:loadBasisEncoderPromise=loadBasisEncoderPromise||loadBasisEncoder(options);_context41.next=6;return loadBasisEncoderPromise;case 6:return _context41.abrupt("return",_context41.sent);case 7:case"end":return _context41.stop();}}},_callee37);}));return _loadBasisEncoderModule.apply(this,arguments);}function loadBasisEncoder(_x42){return _loadBasisEncoder.apply(this,arguments);}function _loadBasisEncoder(){_loadBasisEncoder=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee38(options){var BASIS_ENCODER,wasmBinary,_yield$Promise$all3,_yield$Promise$all4;return _regeneratorRuntime().wrap(function _callee38$(_context42){while(1){switch(_context42.prev=_context42.next){case 0:BASIS_ENCODER=null;wasmBinary=null;_context42.t0=Promise;_context42.next=5;return loadLibrary(BASIS_CDN_ENCODER_JS,'textures',options);case 5:_context42.t1=_context42.sent;_context42.next=8;return loadLibrary(BASIS_CDN_ENCODER_WASM,'textures',options);case 8:_context42.t2=_context42.sent;_context42.t3=[_context42.t1,_context42.t2];_context42.next=12;return _context42.t0.all.call(_context42.t0,_context42.t3);case 12:_yield$Promise$all3=_context42.sent;_yield$Promise$all4=_slicedToArray(_yield$Promise$all3,2);BASIS_ENCODER=_yield$Promise$all4[0];wasmBinary=_yield$Promise$all4[1];BASIS_ENCODER=BASIS_ENCODER||globalThis.BASIS;_context42.next=19;return initializeBasisEncoderModule(BASIS_ENCODER,wasmBinary);case 19:return _context42.abrupt("return",_context42.sent);case 20:case"end":return _context42.stop();}}},_callee38);}));return _loadBasisEncoder.apply(this,arguments);}function initializeBasisEncoderModule(BasisEncoderModule,wasmBinary){var options={};if(wasmBinary){options.wasmBinary=wasmBinary;}return new Promise(function(resolve){BasisEncoderModule(options).then(function(module){var BasisFile=module.BasisFile,KTX2File=module.KTX2File,initializeBasis=module.initializeBasis,BasisEncoder=module.BasisEncoder;initializeBasis();resolve({BasisFile:BasisFile,KTX2File:KTX2File,BasisEncoder:BasisEncoder});});});}var GL_EXTENSIONS_CONSTANTS={COMPRESSED_RGB_S3TC_DXT1_EXT:0x83f0,COMPRESSED_RGBA_S3TC_DXT1_EXT:0x83f1,COMPRESSED_RGBA_S3TC_DXT3_EXT:0x83f2,COMPRESSED_RGBA_S3TC_DXT5_EXT:0x83f3,COMPRESSED_R11_EAC:0x9270,COMPRESSED_SIGNED_R11_EAC:0x9271,COMPRESSED_RG11_EAC:0x9272,COMPRESSED_SIGNED_RG11_EAC:0x9273,COMPRESSED_RGB8_ETC2:0x9274,COMPRESSED_RGBA8_ETC2_EAC:0x9275,COMPRESSED_SRGB8_ETC2:0x9276,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:0x9277,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:0x9278,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:0x9279,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:0x8c00,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:0x8c02,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:0x8c01,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:0x8c03,COMPRESSED_RGB_ETC1_WEBGL:0x8d64,COMPRESSED_RGB_ATC_WEBGL:0x8c92,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:0x8c93,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:0x87ee,COMPRESSED_RGBA_ASTC_4X4_KHR:0x93b0,COMPRESSED_RGBA_ASTC_5X4_KHR:0x93b1,COMPRESSED_RGBA_ASTC_5X5_KHR:0x93b2,COMPRESSED_RGBA_ASTC_6X5_KHR:0x93b3,COMPRESSED_RGBA_ASTC_6X6_KHR:0x93b4,COMPRESSED_RGBA_ASTC_8X5_KHR:0x93b5,COMPRESSED_RGBA_ASTC_8X6_KHR:0x93b6,COMPRESSED_RGBA_ASTC_8X8_KHR:0x93b7,COMPRESSED_RGBA_ASTC_10X5_KHR:0x93b8,COMPRESSED_RGBA_ASTC_10X6_KHR:0x93b9,COMPRESSED_RGBA_ASTC_10X8_KHR:0x93ba,COMPRESSED_RGBA_ASTC_10X10_KHR:0x93bb,COMPRESSED_RGBA_ASTC_12X10_KHR:0x93bc,COMPRESSED_RGBA_ASTC_12X12_KHR:0x93bd,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:0x93d0,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:0x93d1,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:0x93d2,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:0x93d3,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:0x93d4,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:0x93d5,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:0x93d6,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:0x93d7,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:0x93d8,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:0x93d9,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:0x93da,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:0x93db,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:0x93dc,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:0x93dd,COMPRESSED_RED_RGTC1_EXT:0x8dbb,COMPRESSED_SIGNED_RED_RGTC1_EXT:0x8dbc,COMPRESSED_RED_GREEN_RGTC2_EXT:0x8dbd,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:0x8dbe,COMPRESSED_SRGB_S3TC_DXT1_EXT:0x8c4c,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:0x8c4d,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:0x8c4e,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:0x8c4f};var BROWSER_PREFIXES=['','WEBKIT_','MOZ_'];var WEBGL_EXTENSIONS={WEBGL_compressed_texture_s3tc:'dxt',WEBGL_compressed_texture_s3tc_srgb:'dxt-srgb',WEBGL_compressed_texture_etc1:'etc1',WEBGL_compressed_texture_etc:'etc2',WEBGL_compressed_texture_pvrtc:'pvrtc',WEBGL_compressed_texture_atc:'atc',WEBGL_compressed_texture_astc:'astc',EXT_texture_compression_rgtc:'rgtc'};var formats=null;function getSupportedGPUTextureFormats(gl){if(!formats){gl=gl||getWebGLContext()||undefined;formats=new Set();var _iterator16=_createForOfIteratorHelper(BROWSER_PREFIXES),_step16;try{for(_iterator16.s();!(_step16=_iterator16.n()).done;){var prefix=_step16.value;for(var extension in WEBGL_EXTENSIONS){if(gl&&gl.getExtension("".concat(prefix).concat(extension))){var gpuTextureFormat=WEBGL_EXTENSIONS[extension];formats.add(gpuTextureFormat);}}}}catch(err){_iterator16.e(err);}finally{_iterator16.f();}}return formats;}function getWebGLContext(){try{var _canvas6=document.createElement('canvas');return _canvas6.getContext('webgl');}catch(error){return null;}}var n,i,s,a,r,o,l,f;!function(t){t[t.NONE=0]="NONE",t[t.BASISLZ=1]="BASISLZ",t[t.ZSTD=2]="ZSTD",t[t.ZLIB=3]="ZLIB";}(n||(n={})),function(t){t[t.BASICFORMAT=0]="BASICFORMAT";}(i||(i={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC";}(s||(s={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB";}(a||(a={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2";}(r||(r={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED";}(o||(o={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA";}(l||(l={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG";}(f||(f={}));var KTX2_ID=[0xab,0x4b,0x54,0x58,0x20,0x32,0x30,0xbb,0x0d,0x0a,0x1a,0x0a];function isKTX(data){var id=new Uint8Array(data);var notKTX=id.byteLength1&&_args41[1]!==undefined?_args41[1]:null;if(isEmptyObject(imagebitmapOptions)||!imagebitmapOptionsSupported){imagebitmapOptions=null;}if(!imagebitmapOptions){_context47.next=13;break;}_context47.prev=3;_context47.next=6;return createImageBitmap(blob,imagebitmapOptions);case 6:return _context47.abrupt("return",_context47.sent);case 9:_context47.prev=9;_context47.t0=_context47["catch"](3);console.warn(_context47.t0);imagebitmapOptionsSupported=false;case 13:_context47.next=15;return createImageBitmap(blob);case 15:return _context47.abrupt("return",_context47.sent);case 16:case"end":return _context47.stop();}}},_callee43,null,[[3,9]]);}));return _safeCreateImageBitmap.apply(this,arguments);}function isEmptyObject(object){for(var key in object||EMPTY_OBJECT){return false;}return true;}var BIG_ENDIAN=false;var LITTLE_ENDIAN=true;function getBinaryImageMetadata(binaryData){var dataView=toDataView(binaryData);return getPngMetadata(dataView)||getJpegMetadata(dataView)||getGifMetadata(dataView)||getBmpMetadata(dataView);}function getPngMetadata(binaryData){var dataView=toDataView(binaryData);var isPng=dataView.byteLength>=24&&dataView.getUint32(0,BIG_ENDIAN)===0x89504e47;if(!isPng){return null;}return{mimeType:'image/png',width:dataView.getUint32(16,BIG_ENDIAN),height:dataView.getUint32(20,BIG_ENDIAN)};}function getGifMetadata(binaryData){var dataView=toDataView(binaryData);var isGif=dataView.byteLength>=10&&dataView.getUint32(0,BIG_ENDIAN)===0x47494638;if(!isGif){return null;}return{mimeType:'image/gif',width:dataView.getUint16(6,LITTLE_ENDIAN),height:dataView.getUint16(8,LITTLE_ENDIAN)};}function getBmpMetadata(binaryData){var dataView=toDataView(binaryData);var isBmp=dataView.byteLength>=14&&dataView.getUint16(0,BIG_ENDIAN)===0x424d&&dataView.getUint32(2,LITTLE_ENDIAN)===dataView.byteLength;if(!isBmp){return null;}return{mimeType:'image/bmp',width:dataView.getUint32(18,LITTLE_ENDIAN),height:dataView.getUint32(22,LITTLE_ENDIAN)};}function getJpegMetadata(binaryData){var dataView=toDataView(binaryData);var isJpeg=dataView.byteLength>=3&&dataView.getUint16(0,BIG_ENDIAN)===0xffd8&&dataView.getUint8(2)===0xff;if(!isJpeg){return null;}var _getJpegMarkers=getJpegMarkers(),tableMarkers=_getJpegMarkers.tableMarkers,sofMarkers=_getJpegMarkers.sofMarkers;var i=2;while(i+9=0&&byteLength<=bufferView.byteLength);return{ArrayType:ArrayType,length:length,byteLength:byteLength};}var DEFAULT_GLTF_JSON={asset:{version:'2.0',generator:'loaders.gl'},buffers:[]};var GLTFScenegraph=/*#__PURE__*/function(){function GLTFScenegraph(gltf){_classCallCheck(this,GLTFScenegraph);_defineProperty(this,"gltf",void 0);_defineProperty(this,"sourceBuffers",void 0);_defineProperty(this,"byteLength",void 0);this.gltf=gltf||{json:_objectSpread({},DEFAULT_GLTF_JSON),buffers:[]};this.sourceBuffers=[];this.byteLength=0;if(this.gltf.buffers&&this.gltf.buffers[0]){this.byteLength=this.gltf.buffers[0].byteLength;this.sourceBuffers=[this.gltf.buffers[0]];}}_createClass(GLTFScenegraph,[{key:"json",get:function get(){return this.gltf.json;}},{key:"getApplicationData",value:function getApplicationData(key){var data=this.json[key];return data;}},{key:"getExtraData",value:function getExtraData(key){var extras=this.json.extras||{};return extras[key];}},{key:"getExtension",value:function getExtension(extensionName){var isExtension=this.getUsedExtensions().find(function(name){return name===extensionName;});var extensions=this.json.extensions||{};return isExtension?extensions[extensionName]||true:null;}},{key:"getRequiredExtension",value:function getRequiredExtension(extensionName){var isRequired=this.getRequiredExtensions().find(function(name){return name===extensionName;});return isRequired?this.getExtension(extensionName):null;}},{key:"getRequiredExtensions",value:function getRequiredExtensions(){return this.json.extensionsRequired||[];}},{key:"getUsedExtensions",value:function getUsedExtensions(){return this.json.extensionsUsed||[];}},{key:"getObjectExtension",value:function getObjectExtension(object,extensionName){var extensions=object.extensions||{};return extensions[extensionName];}},{key:"getScene",value:function getScene(index){return this.getObject('scenes',index);}},{key:"getNode",value:function getNode(index){return this.getObject('nodes',index);}},{key:"getSkin",value:function getSkin(index){return this.getObject('skins',index);}},{key:"getMesh",value:function getMesh(index){return this.getObject('meshes',index);}},{key:"getMaterial",value:function getMaterial(index){return this.getObject('materials',index);}},{key:"getAccessor",value:function getAccessor(index){return this.getObject('accessors',index);}},{key:"getTexture",value:function getTexture(index){return this.getObject('textures',index);}},{key:"getSampler",value:function getSampler(index){return this.getObject('samplers',index);}},{key:"getImage",value:function getImage(index){return this.getObject('images',index);}},{key:"getBufferView",value:function getBufferView(index){return this.getObject('bufferViews',index);}},{key:"getBuffer",value:function getBuffer(index){return this.getObject('buffers',index);}},{key:"getObject",value:function getObject(array,index){if(_typeof(index)==='object'){return index;}var object=this.json[array]&&this.json[array][index];if(!object){throw new Error("glTF file error: Could not find ".concat(array,"[").concat(index,"]"));}return object;}},{key:"getTypedArrayForBufferView",value:function getTypedArrayForBufferView(bufferView){bufferView=this.getBufferView(bufferView);var bufferIndex=bufferView.buffer;var binChunk=this.gltf.buffers[bufferIndex];assert$1(binChunk);var byteOffset=(bufferView.byteOffset||0)+binChunk.byteOffset;return new Uint8Array(binChunk.arrayBuffer,byteOffset,bufferView.byteLength);}},{key:"getTypedArrayForAccessor",value:function getTypedArrayForAccessor(accessor){accessor=this.getAccessor(accessor);var bufferView=this.getBufferView(accessor.bufferView);var buffer=this.getBuffer(bufferView.buffer);var arrayBuffer=buffer.data;var _getAccessorArrayType=getAccessorArrayTypeAndLength(accessor,bufferView),ArrayType=_getAccessorArrayType.ArrayType,length=_getAccessorArrayType.length;var byteOffset=bufferView.byteOffset+accessor.byteOffset;return new ArrayType(arrayBuffer,byteOffset,length);}},{key:"getTypedArrayForImageData",value:function getTypedArrayForImageData(image){image=this.getAccessor(image);var bufferView=this.getBufferView(image.bufferView);var buffer=this.getBuffer(bufferView.buffer);var arrayBuffer=buffer.data;var byteOffset=bufferView.byteOffset||0;return new Uint8Array(arrayBuffer,byteOffset,bufferView.byteLength);}},{key:"addApplicationData",value:function addApplicationData(key,data){this.json[key]=data;return this;}},{key:"addExtraData",value:function addExtraData(key,data){this.json.extras=this.json.extras||{};this.json.extras[key]=data;return this;}},{key:"addObjectExtension",value:function addObjectExtension(object,extensionName,data){object.extensions=object.extensions||{};object.extensions[extensionName]=data;this.registerUsedExtension(extensionName);return this;}},{key:"setObjectExtension",value:function setObjectExtension(object,extensionName,data){var extensions=object.extensions||{};extensions[extensionName]=data;}},{key:"removeObjectExtension",value:function removeObjectExtension(object,extensionName){var extensions=object.extensions||{};var extension=extensions[extensionName];delete extensions[extensionName];return extension;}},{key:"addExtension",value:function addExtension(extensionName){var extensionData=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};assert$1(extensionData);this.json.extensions=this.json.extensions||{};this.json.extensions[extensionName]=extensionData;this.registerUsedExtension(extensionName);return extensionData;}},{key:"addRequiredExtension",value:function addRequiredExtension(extensionName){var extensionData=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};assert$1(extensionData);this.addExtension(extensionName,extensionData);this.registerRequiredExtension(extensionName);return extensionData;}},{key:"registerUsedExtension",value:function registerUsedExtension(extensionName){this.json.extensionsUsed=this.json.extensionsUsed||[];if(!this.json.extensionsUsed.find(function(ext){return ext===extensionName;})){this.json.extensionsUsed.push(extensionName);}}},{key:"registerRequiredExtension",value:function registerRequiredExtension(extensionName){this.registerUsedExtension(extensionName);this.json.extensionsRequired=this.json.extensionsRequired||[];if(!this.json.extensionsRequired.find(function(ext){return ext===extensionName;})){this.json.extensionsRequired.push(extensionName);}}},{key:"removeExtension",value:function removeExtension(extensionName){if(this.json.extensionsRequired){this._removeStringFromArray(this.json.extensionsRequired,extensionName);}if(this.json.extensionsUsed){this._removeStringFromArray(this.json.extensionsUsed,extensionName);}if(this.json.extensions){delete this.json.extensions[extensionName];}}},{key:"setDefaultScene",value:function setDefaultScene(sceneIndex){this.json.scene=sceneIndex;}},{key:"addScene",value:function addScene(scene){var nodeIndices=scene.nodeIndices;this.json.scenes=this.json.scenes||[];this.json.scenes.push({nodes:nodeIndices});return this.json.scenes.length-1;}},{key:"addNode",value:function addNode(node){var meshIndex=node.meshIndex,matrix=node.matrix;this.json.nodes=this.json.nodes||[];var nodeData={mesh:meshIndex};if(matrix){nodeData.matrix=matrix;}this.json.nodes.push(nodeData);return this.json.nodes.length-1;}},{key:"addMesh",value:function addMesh(mesh){var attributes=mesh.attributes,indices=mesh.indices,material=mesh.material,_mesh$mode=mesh.mode,mode=_mesh$mode===void 0?4:_mesh$mode;var accessors=this._addAttributes(attributes);var glTFMesh={primitives:[{attributes:accessors,mode:mode}]};if(indices){var indicesAccessor=this._addIndices(indices);glTFMesh.primitives[0].indices=indicesAccessor;}if(Number.isFinite(material)){glTFMesh.primitives[0].material=material;}this.json.meshes=this.json.meshes||[];this.json.meshes.push(glTFMesh);return this.json.meshes.length-1;}},{key:"addPointCloud",value:function addPointCloud(attributes){var accessorIndices=this._addAttributes(attributes);var glTFMesh={primitives:[{attributes:accessorIndices,mode:0}]};this.json.meshes=this.json.meshes||[];this.json.meshes.push(glTFMesh);return this.json.meshes.length-1;}},{key:"addImage",value:function addImage(imageData,mimeTypeOpt){var metadata=getBinaryImageMetadata(imageData);var mimeType=mimeTypeOpt||(metadata===null||metadata===void 0?void 0:metadata.mimeType);var bufferViewIndex=this.addBufferView(imageData);var glTFImage={bufferView:bufferViewIndex,mimeType:mimeType};this.json.images=this.json.images||[];this.json.images.push(glTFImage);return this.json.images.length-1;}},{key:"addBufferView",value:function addBufferView(buffer){var byteLength=buffer.byteLength;assert$1(Number.isFinite(byteLength));this.sourceBuffers=this.sourceBuffers||[];this.sourceBuffers.push(buffer);var glTFBufferView={buffer:0,byteOffset:this.byteLength,byteLength:byteLength};this.byteLength+=padToNBytes(byteLength,4);this.json.bufferViews=this.json.bufferViews||[];this.json.bufferViews.push(glTFBufferView);return this.json.bufferViews.length-1;}},{key:"addAccessor",value:function addAccessor(bufferViewIndex,accessor){var glTFAccessor={bufferView:bufferViewIndex,type:getAccessorTypeFromSize(accessor.size),componentType:accessor.componentType,count:accessor.count,max:accessor.max,min:accessor.min};this.json.accessors=this.json.accessors||[];this.json.accessors.push(glTFAccessor);return this.json.accessors.length-1;}},{key:"addBinaryBuffer",value:function addBinaryBuffer(sourceBuffer){var accessor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{size:3};var bufferViewIndex=this.addBufferView(sourceBuffer);var minMax={min:accessor.min,max:accessor.max};if(!minMax.min||!minMax.max){minMax=this._getAccessorMinMax(sourceBuffer,accessor.size);}var accessorDefaults={size:accessor.size,componentType:getComponentTypeFromArray(sourceBuffer),count:Math.round(sourceBuffer.length/accessor.size),min:minMax.min,max:minMax.max};return this.addAccessor(bufferViewIndex,Object.assign(accessorDefaults,accessor));}},{key:"addTexture",value:function addTexture(texture){var imageIndex=texture.imageIndex;var glTFTexture={source:imageIndex};this.json.textures=this.json.textures||[];this.json.textures.push(glTFTexture);return this.json.textures.length-1;}},{key:"addMaterial",value:function addMaterial(pbrMaterialInfo){this.json.materials=this.json.materials||[];this.json.materials.push(pbrMaterialInfo);return this.json.materials.length-1;}},{key:"createBinaryChunk",value:function createBinaryChunk(){var _this$json,_this$json$buffers;this.gltf.buffers=[];var totalByteLength=this.byteLength;var arrayBuffer=new ArrayBuffer(totalByteLength);var targetArray=new Uint8Array(arrayBuffer);var dstByteOffset=0;var _iterator17=_createForOfIteratorHelper(this.sourceBuffers||[]),_step17;try{for(_iterator17.s();!(_step17=_iterator17.n()).done;){var sourceBuffer=_step17.value;dstByteOffset=copyToArray(sourceBuffer,targetArray,dstByteOffset);}}catch(err){_iterator17.e(err);}finally{_iterator17.f();}if((_this$json=this.json)!==null&&_this$json!==void 0&&(_this$json$buffers=_this$json.buffers)!==null&&_this$json$buffers!==void 0&&_this$json$buffers[0]){this.json.buffers[0].byteLength=totalByteLength;}else{this.json.buffers=[{byteLength:totalByteLength}];}this.gltf.binary=arrayBuffer;this.sourceBuffers=[arrayBuffer];}},{key:"_removeStringFromArray",value:function _removeStringFromArray(array,string){var found=true;while(found){var index=array.indexOf(string);if(index>-1){array.splice(index,1);}else{found=false;}}}},{key:"_addAttributes",value:function _addAttributes(){var attributes=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var result={};for(var attributeKey in attributes){var attributeData=attributes[attributeKey];var attrName=this._getGltfAttributeName(attributeKey);var accessor=this.addBinaryBuffer(attributeData.value,attributeData);result[attrName]=accessor;}return result;}},{key:"_addIndices",value:function _addIndices(indices){return this.addBinaryBuffer(indices,{size:1});}},{key:"_getGltfAttributeName",value:function _getGltfAttributeName(attributeName){switch(attributeName.toLowerCase()){case'position':case'positions':case'vertices':return'POSITION';case'normal':case'normals':return'NORMAL';case'color':case'colors':return'COLOR_0';case'texcoord':case'texcoords':return'TEXCOORD_0';default:return attributeName;}}},{key:"_getAccessorMinMax",value:function _getAccessorMinMax(buffer,size){var result={min:null,max:null};if(buffer.length5&&_args44[5]!==undefined?_args44[5]:'NONE';_context50.next=3;return loadWasmInstance();case 3:instance=_context50.sent;decode$5(instance,instance.exports[DECODERS[mode]],target,count,size,source,instance.exports[FILTERS[filter||'NONE']]);case 5:case"end":return _context50.stop();}}},_callee46);}));return _meshoptDecodeGltfBuffer.apply(this,arguments);}var wasmPromise;function loadWasmInstance(){return _loadWasmInstance.apply(this,arguments);}function _loadWasmInstance(){_loadWasmInstance=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee47(){return _regeneratorRuntime().wrap(function _callee47$(_context51){while(1){switch(_context51.prev=_context51.next){case 0:if(!wasmPromise){wasmPromise=loadWasmModule();}return _context51.abrupt("return",wasmPromise);case 2:case"end":return _context51.stop();}}},_callee47);}));return _loadWasmInstance.apply(this,arguments);}function loadWasmModule(){return _loadWasmModule.apply(this,arguments);}function _loadWasmModule(){_loadWasmModule=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee48(){var wasm,result;return _regeneratorRuntime().wrap(function _callee48$(_context52){while(1){switch(_context52.prev=_context52.next){case 0:wasm=wasm_base;if(WebAssembly.validate(detector)){wasm=wasm_simd;console.log('Warning: meshopt_decoder is using experimental SIMD support');}_context52.next=4;return WebAssembly.instantiate(unpack(wasm),{});case 4:result=_context52.sent;_context52.next=7;return result.instance.exports.__wasm_call_ctors();case 7:return _context52.abrupt("return",result.instance);case 8:case"end":return _context52.stop();}}},_callee48);}));return _loadWasmModule.apply(this,arguments);}function unpack(data){var result=new Uint8Array(data.length);for(var _i499=0;_i49996?ch-71:ch>64?ch-65:ch>47?ch+4:ch>46?63:62;}var write=0;for(var _i500=0;_i500maxX?x:maxX;maxY=y>maxY?y:maxY;maxZ=_z4>maxZ?_z4:maxZ;}return[[minX,minY,minZ],[maxX,maxY,maxZ]];}function assert(condition,message){if(!condition){throw new Error(message||'loader assertion failed.');}}var Schema=/*#__PURE__*/function(){function Schema(fields,metadata){_classCallCheck(this,Schema);_defineProperty(this,"fields",void 0);_defineProperty(this,"metadata",void 0);assert(Array.isArray(fields));checkNames(fields);this.fields=fields;this.metadata=metadata||new Map();}_createClass(Schema,[{key:"compareTo",value:function compareTo(other){if(this.metadata!==other.metadata){return false;}if(this.fields.length!==other.fields.length){return false;}for(var _i502=0;_i5022&&arguments[2]!==undefined?arguments[2]:false;var metadata=arguments.length>3&&arguments[3]!==undefined?arguments[3]:new Map();_classCallCheck(this,Field);_defineProperty(this,"name",void 0);_defineProperty(this,"type",void 0);_defineProperty(this,"nullable",void 0);_defineProperty(this,"metadata",void 0);this.name=name;this.type=type;this.nullable=nullable;this.metadata=metadata;}_createClass(Field,[{key:"typeId",get:function get(){return this.type&&this.type.typeId;}},{key:"clone",value:function clone(){return new Field(this.name,this.type,this.nullable,this.metadata);}},{key:"compareTo",value:function compareTo(other){return this.name===other.name&&this.type===other.type&&this.nullable===other.nullable&&this.metadata===other.metadata;}},{key:"toString",value:function toString(){return"".concat(this.type).concat(this.nullable?', nullable':'').concat(this.metadata?", metadata: ".concat(this.metadata):'');}}]);return Field;}();var Type;(function(Type){Type[Type["NONE"]=0]="NONE";Type[Type["Null"]=1]="Null";Type[Type["Int"]=2]="Int";Type[Type["Float"]=3]="Float";Type[Type["Binary"]=4]="Binary";Type[Type["Utf8"]=5]="Utf8";Type[Type["Bool"]=6]="Bool";Type[Type["Decimal"]=7]="Decimal";Type[Type["Date"]=8]="Date";Type[Type["Time"]=9]="Time";Type[Type["Timestamp"]=10]="Timestamp";Type[Type["Interval"]=11]="Interval";Type[Type["List"]=12]="List";Type[Type["Struct"]=13]="Struct";Type[Type["Union"]=14]="Union";Type[Type["FixedSizeBinary"]=15]="FixedSizeBinary";Type[Type["FixedSizeList"]=16]="FixedSizeList";Type[Type["Map"]=17]="Map";Type[Type["Dictionary"]=-1]="Dictionary";Type[Type["Int8"]=-2]="Int8";Type[Type["Int16"]=-3]="Int16";Type[Type["Int32"]=-4]="Int32";Type[Type["Int64"]=-5]="Int64";Type[Type["Uint8"]=-6]="Uint8";Type[Type["Uint16"]=-7]="Uint16";Type[Type["Uint32"]=-8]="Uint32";Type[Type["Uint64"]=-9]="Uint64";Type[Type["Float16"]=-10]="Float16";Type[Type["Float32"]=-11]="Float32";Type[Type["Float64"]=-12]="Float64";Type[Type["DateDay"]=-13]="DateDay";Type[Type["DateMillisecond"]=-14]="DateMillisecond";Type[Type["TimestampSecond"]=-15]="TimestampSecond";Type[Type["TimestampMillisecond"]=-16]="TimestampMillisecond";Type[Type["TimestampMicrosecond"]=-17]="TimestampMicrosecond";Type[Type["TimestampNanosecond"]=-18]="TimestampNanosecond";Type[Type["TimeSecond"]=-19]="TimeSecond";Type[Type["TimeMillisecond"]=-20]="TimeMillisecond";Type[Type["TimeMicrosecond"]=-21]="TimeMicrosecond";Type[Type["TimeNanosecond"]=-22]="TimeNanosecond";Type[Type["DenseUnion"]=-23]="DenseUnion";Type[Type["SparseUnion"]=-24]="SparseUnion";Type[Type["IntervalDayTime"]=-25]="IntervalDayTime";Type[Type["IntervalYearMonth"]=-26]="IntervalYearMonth";})(Type||(Type={}));var _Symbol$toStringTag,_Symbol$toStringTag2,_Symbol$toStringTag7;var DataType=/*#__PURE__*/function(){function DataType(){_classCallCheck(this,DataType);}_createClass(DataType,[{key:"typeId",get:function get(){return Type.NONE;}},{key:"compareTo",value:function compareTo(other){return this===other;}}],[{key:"isNull",value:function isNull(x){return x&&x.typeId===Type.Null;}},{key:"isInt",value:function isInt(x){return x&&x.typeId===Type.Int;}},{key:"isFloat",value:function isFloat(x){return x&&x.typeId===Type.Float;}},{key:"isBinary",value:function isBinary(x){return x&&x.typeId===Type.Binary;}},{key:"isUtf8",value:function isUtf8(x){return x&&x.typeId===Type.Utf8;}},{key:"isBool",value:function isBool(x){return x&&x.typeId===Type.Bool;}},{key:"isDecimal",value:function isDecimal(x){return x&&x.typeId===Type.Decimal;}},{key:"isDate",value:function isDate(x){return x&&x.typeId===Type.Date;}},{key:"isTime",value:function isTime(x){return x&&x.typeId===Type.Time;}},{key:"isTimestamp",value:function isTimestamp(x){return x&&x.typeId===Type.Timestamp;}},{key:"isInterval",value:function isInterval(x){return x&&x.typeId===Type.Interval;}},{key:"isList",value:function isList(x){return x&&x.typeId===Type.List;}},{key:"isStruct",value:function isStruct(x){return x&&x.typeId===Type.Struct;}},{key:"isUnion",value:function isUnion(x){return x&&x.typeId===Type.Union;}},{key:"isFixedSizeBinary",value:function isFixedSizeBinary(x){return x&&x.typeId===Type.FixedSizeBinary;}},{key:"isFixedSizeList",value:function isFixedSizeList(x){return x&&x.typeId===Type.FixedSizeList;}},{key:"isMap",value:function isMap(x){return x&&x.typeId===Type.Map;}},{key:"isDictionary",value:function isDictionary(x){return x&&x.typeId===Type.Dictionary;}}]);return DataType;}();_Symbol$toStringTag=Symbol.toStringTag;var Int=/*#__PURE__*/function(_DataType,_Symbol$toStringTag3){_inherits(Int,_DataType);var _super137=_createSuper(Int);function Int(isSigned,bitWidth){var _this111;_classCallCheck(this,Int);_this111=_super137.call(this);_defineProperty(_assertThisInitialized(_this111),"isSigned",void 0);_defineProperty(_assertThisInitialized(_this111),"bitWidth",void 0);_this111.isSigned=isSigned;_this111.bitWidth=bitWidth;return _this111;}_createClass(Int,[{key:"typeId",get:function get(){return Type.Int;}},{key:_Symbol$toStringTag3,get:function get(){return'Int';}},{key:"toString",value:function toString(){return"".concat(this.isSigned?'I':'Ui',"nt").concat(this.bitWidth);}}]);return Int;}(DataType,_Symbol$toStringTag);var Int8=/*#__PURE__*/function(_Int){_inherits(Int8,_Int);var _super138=_createSuper(Int8);function Int8(){_classCallCheck(this,Int8);return _super138.call(this,true,8);}return _createClass(Int8);}(Int);var Int16=/*#__PURE__*/function(_Int2){_inherits(Int16,_Int2);var _super139=_createSuper(Int16);function Int16(){_classCallCheck(this,Int16);return _super139.call(this,true,16);}return _createClass(Int16);}(Int);var Int32=/*#__PURE__*/function(_Int3){_inherits(Int32,_Int3);var _super140=_createSuper(Int32);function Int32(){_classCallCheck(this,Int32);return _super140.call(this,true,32);}return _createClass(Int32);}(Int);var Uint8=/*#__PURE__*/function(_Int4){_inherits(Uint8,_Int4);var _super141=_createSuper(Uint8);function Uint8(){_classCallCheck(this,Uint8);return _super141.call(this,false,8);}return _createClass(Uint8);}(Int);var Uint16=/*#__PURE__*/function(_Int5){_inherits(Uint16,_Int5);var _super142=_createSuper(Uint16);function Uint16(){_classCallCheck(this,Uint16);return _super142.call(this,false,16);}return _createClass(Uint16);}(Int);var Uint32=/*#__PURE__*/function(_Int6){_inherits(Uint32,_Int6);var _super143=_createSuper(Uint32);function Uint32(){_classCallCheck(this,Uint32);return _super143.call(this,false,32);}return _createClass(Uint32);}(Int);var Precision={HALF:16,SINGLE:32,DOUBLE:64};_Symbol$toStringTag2=Symbol.toStringTag;var Float=/*#__PURE__*/function(_DataType2,_Symbol$toStringTag4){_inherits(Float,_DataType2);var _super144=_createSuper(Float);function Float(precision){var _this112;_classCallCheck(this,Float);_this112=_super144.call(this);_defineProperty(_assertThisInitialized(_this112),"precision",void 0);_this112.precision=precision;return _this112;}_createClass(Float,[{key:"typeId",get:function get(){return Type.Float;}},{key:_Symbol$toStringTag4,get:function get(){return'Float';}},{key:"toString",value:function toString(){return"Float".concat(this.precision);}}]);return Float;}(DataType,_Symbol$toStringTag2);var Float32=/*#__PURE__*/function(_Float){_inherits(Float32,_Float);var _super145=_createSuper(Float32);function Float32(){_classCallCheck(this,Float32);return _super145.call(this,Precision.SINGLE);}return _createClass(Float32);}(Float);var Float64=/*#__PURE__*/function(_Float2){_inherits(Float64,_Float2);var _super146=_createSuper(Float64);function Float64(){_classCallCheck(this,Float64);return _super146.call(this,Precision.DOUBLE);}return _createClass(Float64);}(Float);_Symbol$toStringTag7=Symbol.toStringTag;var FixedSizeList=/*#__PURE__*/function(_DataType3,_Symbol$toStringTag5){_inherits(FixedSizeList,_DataType3);var _super147=_createSuper(FixedSizeList);function FixedSizeList(listSize,child){var _this113;_classCallCheck(this,FixedSizeList);_this113=_super147.call(this);_defineProperty(_assertThisInitialized(_this113),"listSize",void 0);_defineProperty(_assertThisInitialized(_this113),"children",void 0);_this113.listSize=listSize;_this113.children=[child];return _this113;}_createClass(FixedSizeList,[{key:"typeId",get:function get(){return Type.FixedSizeList;}},{key:"valueType",get:function get(){return this.children[0].type;}},{key:"valueField",get:function get(){return this.children[0];}},{key:_Symbol$toStringTag5,get:function get(){return'FixedSizeList';}},{key:"toString",value:function toString(){return"FixedSizeList[".concat(this.listSize,"]<").concat(this.valueType,">");}}]);return FixedSizeList;}(DataType,_Symbol$toStringTag7);function getArrowTypeFromTypedArray(array){switch(array.constructor){case Int8Array:return new Int8();case Uint8Array:return new Uint8();case Int16Array:return new Int16();case Uint16Array:return new Uint16();case Int32Array:return new Int32();case Uint32Array:return new Uint32();case Float32Array:return new Float32();case Float64Array:return new Float64();default:throw new Error('array type not supported');}}function deduceMeshField(attributeName,attribute,optionalMetadata){var type=getArrowTypeFromTypedArray(attribute.value);var metadata=optionalMetadata?optionalMetadata:makeMeshAttributeMetadata(attribute);var field=new Field(attributeName,new FixedSizeList(attribute.size,new Field('value',type)),false,metadata);return field;}function makeMeshAttributeMetadata(attribute){var result=new Map();if('byteOffset'in attribute){result.set('byteOffset',attribute.byteOffset.toString(10));}if('byteStride'in attribute){result.set('byteStride',attribute.byteStride.toString(10));}if('normalized'in attribute){result.set('normalized',attribute.normalized.toString());}return result;}function getDracoSchema(attributes,loaderData,indices){var metadataMap=makeMetadata(loaderData.metadata);var fields=[];var namedLoaderDataAttributes=transformAttributesLoaderData(loaderData.attributes);for(var attributeName in attributes){var attribute=attributes[attributeName];var field=getArrowFieldFromAttribute(attributeName,attribute,namedLoaderDataAttributes[attributeName]);fields.push(field);}if(indices){var indicesField=getArrowFieldFromAttribute('indices',indices);fields.push(indicesField);}return new Schema(fields,metadataMap);}function transformAttributesLoaderData(loaderData){var result={};for(var key in loaderData){var dracoAttribute=loaderData[key];result[dracoAttribute.name||'undefined']=dracoAttribute;}return result;}function getArrowFieldFromAttribute(attributeName,attribute,loaderData){var metadataMap=loaderData?makeMetadata(loaderData.metadata):undefined;var field=deduceMeshField(attributeName,attribute,metadataMap);return field;}function makeMetadata(metadata){var metadataMap=new Map();for(var key in metadata){metadataMap.set("".concat(key,".string"),JSON.stringify(metadata[key]));}return metadataMap;}var DRACO_TO_GLTF_ATTRIBUTE_NAME_MAP={POSITION:'POSITION',NORMAL:'NORMAL',COLOR:'COLOR_0',TEX_COORD:'TEXCOORD_0'};var DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};var INDEX_ITEM_SIZE=4;var DracoParser=/*#__PURE__*/function(){function DracoParser(draco){_classCallCheck(this,DracoParser);_defineProperty(this,"draco",void 0);_defineProperty(this,"decoder",void 0);_defineProperty(this,"metadataQuerier",void 0);this.draco=draco;this.decoder=new this.draco.Decoder();this.metadataQuerier=new this.draco.MetadataQuerier();}_createClass(DracoParser,[{key:"destroy",value:function destroy(){this.draco.destroy(this.decoder);this.draco.destroy(this.metadataQuerier);}},{key:"parseSync",value:function parseSync(arrayBuffer){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var buffer=new this.draco.DecoderBuffer();buffer.Init(new Int8Array(arrayBuffer),arrayBuffer.byteLength);this._disableAttributeTransforms(options);var geometry_type=this.decoder.GetEncodedGeometryType(buffer);var dracoGeometry=geometry_type===this.draco.TRIANGULAR_MESH?new this.draco.Mesh():new this.draco.PointCloud();try{var dracoStatus;switch(geometry_type){case this.draco.TRIANGULAR_MESH:dracoStatus=this.decoder.DecodeBufferToMesh(buffer,dracoGeometry);break;case this.draco.POINT_CLOUD:dracoStatus=this.decoder.DecodeBufferToPointCloud(buffer,dracoGeometry);break;default:throw new Error('DRACO: Unknown geometry type.');}if(!dracoStatus.ok()||!dracoGeometry.ptr){var message="DRACO decompression failed: ".concat(dracoStatus.error_msg());throw new Error(message);}var loaderData=this._getDracoLoaderData(dracoGeometry,geometry_type,options);var geometry=this._getMeshData(dracoGeometry,loaderData,options);var boundingBox=getMeshBoundingBox(geometry.attributes);var schema=getDracoSchema(geometry.attributes,loaderData,geometry.indices);var data=_objectSpread(_objectSpread({loader:'draco',loaderData:loaderData,header:{vertexCount:dracoGeometry.num_points(),boundingBox:boundingBox}},geometry),{},{schema:schema});return data;}finally{this.draco.destroy(buffer);if(dracoGeometry){this.draco.destroy(dracoGeometry);}}}},{key:"_getDracoLoaderData",value:function _getDracoLoaderData(dracoGeometry,geometry_type,options){var metadata=this._getTopLevelMetadata(dracoGeometry);var attributes=this._getDracoAttributes(dracoGeometry,options);return{geometry_type:geometry_type,num_attributes:dracoGeometry.num_attributes(),num_points:dracoGeometry.num_points(),num_faces:dracoGeometry instanceof this.draco.Mesh?dracoGeometry.num_faces():0,metadata:metadata,attributes:attributes};}},{key:"_getDracoAttributes",value:function _getDracoAttributes(dracoGeometry,options){var dracoAttributes={};for(var attributeId=0;attributeId2&&arguments[2]!==undefined?arguments[2]:false;if(!array){return null;}if(Array.isArray(array)){return new ArrayType(array);}if(convertTypedArrays&&!(array instanceof ArrayType)){return new ArrayType(array);}return array;}var KHR_DRACO_MESH_COMPRESSION='KHR_draco_mesh_compression';var name$3=KHR_DRACO_MESH_COMPRESSION;function preprocess$1(gltfData,options,context){var scenegraph=new GLTFScenegraph(gltfData);var _iterator25=_createForOfIteratorHelper(makeMeshPrimitiveIterator(scenegraph)),_step25;try{for(_iterator25.s();!(_step25=_iterator25.n()).done;){var _primitive=_step25.value;if(scenegraph.getObjectExtension(_primitive,KHR_DRACO_MESH_COMPRESSION));}}catch(err){_iterator25.e(err);}finally{_iterator25.f();}}function decode$3(_x72,_x73,_x74){return _decode$2.apply(this,arguments);}function _decode$2(){_decode$2=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee54(gltfData,options,context){var _options$gltf,scenegraph,promises,_iterator49,_step49,_primitive5;return _regeneratorRuntime().wrap(function _callee54$(_context58){while(1){switch(_context58.prev=_context58.next){case 0:if(options!==null&&options!==void 0&&(_options$gltf=options.gltf)!==null&&_options$gltf!==void 0&&_options$gltf.decompressMeshes){_context58.next=2;break;}return _context58.abrupt("return");case 2:scenegraph=new GLTFScenegraph(gltfData);promises=[];_iterator49=_createForOfIteratorHelper(makeMeshPrimitiveIterator(scenegraph));try{for(_iterator49.s();!(_step49=_iterator49.n()).done;){_primitive5=_step49.value;if(scenegraph.getObjectExtension(_primitive5,KHR_DRACO_MESH_COMPRESSION)){promises.push(decompressPrimitive(scenegraph,_primitive5,options,context));}}}catch(err){_iterator49.e(err);}finally{_iterator49.f();}_context58.next=8;return Promise.all(promises);case 8:scenegraph.removeExtension(KHR_DRACO_MESH_COMPRESSION);case 9:case"end":return _context58.stop();}}},_callee54);}));return _decode$2.apply(this,arguments);}function encode$3(gltfData){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var scenegraph=new GLTFScenegraph(gltfData);var _iterator26=_createForOfIteratorHelper(scenegraph.json.meshes||[]),_step26;try{for(_iterator26.s();!(_step26=_iterator26.n()).done;){var _mesh3=_step26.value;compressMesh(_mesh3);scenegraph.addRequiredExtension(KHR_DRACO_MESH_COMPRESSION);}}catch(err){_iterator26.e(err);}finally{_iterator26.f();}}function decompressPrimitive(_x75,_x76,_x77,_x78){return _decompressPrimitive.apply(this,arguments);}function _decompressPrimitive(){_decompressPrimitive=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee55(scenegraph,primitive,options,context){var dracoExtension,buffer,bufferCopy,parse,dracoOptions,decodedData,decodedAttributes,_i602,_Object$entries5,_Object$entries5$_i,attributeName,decodedAttribute,accessorIndex,accessor;return _regeneratorRuntime().wrap(function _callee55$(_context59){while(1){switch(_context59.prev=_context59.next){case 0:dracoExtension=scenegraph.getObjectExtension(primitive,KHR_DRACO_MESH_COMPRESSION);if(dracoExtension){_context59.next=3;break;}return _context59.abrupt("return");case 3:buffer=scenegraph.getTypedArrayForBufferView(dracoExtension.bufferView);bufferCopy=sliceArrayBuffer(buffer.buffer,buffer.byteOffset);parse=context.parse;dracoOptions=_objectSpread({},options);delete dracoOptions['3d-tiles'];_context59.next=10;return parse(bufferCopy,DracoLoader,dracoOptions,context);case 10:decodedData=_context59.sent;decodedAttributes=getGLTFAccessors(decodedData.attributes);for(_i602=0,_Object$entries5=Object.entries(decodedAttributes);_i602<_Object$entries5.length;_i602++){_Object$entries5$_i=_slicedToArray(_Object$entries5[_i602],2),attributeName=_Object$entries5$_i[0],decodedAttribute=_Object$entries5$_i[1];if(attributeName in primitive.attributes){accessorIndex=primitive.attributes[attributeName];accessor=scenegraph.getAccessor(accessorIndex);if(accessor!==null&&accessor!==void 0&&accessor.min&&accessor!==null&&accessor!==void 0&&accessor.max){decodedAttribute.min=accessor.min;decodedAttribute.max=accessor.max;}}}primitive.attributes=decodedAttributes;if(decodedData.indices){primitive.indices=getGLTFAccessor(decodedData.indices);}checkPrimitive(primitive);case 16:case"end":return _context59.stop();}}},_callee55);}));return _decompressPrimitive.apply(this,arguments);}function compressMesh(attributes,indices){var mode=arguments.length>2&&arguments[2]!==undefined?arguments[2]:4;var options=arguments.length>3?arguments[3]:undefined;var context=arguments.length>4?arguments[4]:undefined;var _context$parseSync;if(!options.DracoWriter){throw new Error('options.gltf.DracoWriter not provided');}var compressedData=options.DracoWriter.encodeSync({attributes:attributes});var decodedData=context===null||context===void 0?void 0:(_context$parseSync=context.parseSync)===null||_context$parseSync===void 0?void 0:_context$parseSync.call(context,{attributes:attributes});var fauxAccessors=options._addFauxAttributes(decodedData.attributes);var bufferViewIndex=options.addBufferView(compressedData);var glTFMesh={primitives:[{attributes:fauxAccessors,mode:mode,extensions:_defineProperty2({},KHR_DRACO_MESH_COMPRESSION,{bufferView:bufferViewIndex,attributes:fauxAccessors})}]};return glTFMesh;}function checkPrimitive(primitive){if(!primitive.attributes&&Object.keys(primitive.attributes).length>0){throw new Error('glTF: Empty primitive detected: Draco decompression failure?');}}function makeMeshPrimitiveIterator(scenegraph){var _iterator27,_step27,_mesh4,_iterator28,_step28,_primitive2;return _regeneratorRuntime().wrap(function makeMeshPrimitiveIterator$(_context10){while(1){switch(_context10.prev=_context10.next){case 0:_iterator27=_createForOfIteratorHelper(scenegraph.json.meshes||[]);_context10.prev=1;_iterator27.s();case 3:if((_step27=_iterator27.n()).done){_context10.next=24;break;}_mesh4=_step27.value;_iterator28=_createForOfIteratorHelper(_mesh4.primitives);_context10.prev=6;_iterator28.s();case 8:if((_step28=_iterator28.n()).done){_context10.next=14;break;}_primitive2=_step28.value;_context10.next=12;return _primitive2;case 12:_context10.next=8;break;case 14:_context10.next=19;break;case 16:_context10.prev=16;_context10.t0=_context10["catch"](6);_iterator28.e(_context10.t0);case 19:_context10.prev=19;_iterator28.f();return _context10.finish(19);case 22:_context10.next=3;break;case 24:_context10.next=29;break;case 26:_context10.prev=26;_context10.t1=_context10["catch"](1);_iterator27.e(_context10.t1);case 29:_context10.prev=29;_iterator27.f();return _context10.finish(29);case 32:case"end":return _context10.stop();}}},_marked3,null,[[1,26,29,32],[6,16,19,22]]);}var KHR_draco_mesh_compression=/*#__PURE__*/Object.freeze({__proto__:null,name:name$3,preprocess:preprocess$1,decode:decode$3,encode:encode$3});var KHR_LIGHTS_PUNCTUAL='KHR_lights_punctual';var name$2=KHR_LIGHTS_PUNCTUAL;function decode$2(_x79){return _decode$3.apply(this,arguments);}function _decode$3(){_decode$3=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee56(gltfData){var gltfScenegraph,json,extension,_iterator50,_step50,_node12,nodeExtension;return _regeneratorRuntime().wrap(function _callee56$(_context60){while(1){switch(_context60.prev=_context60.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;extension=gltfScenegraph.getExtension(KHR_LIGHTS_PUNCTUAL);if(extension){gltfScenegraph.json.lights=extension.lights;gltfScenegraph.removeExtension(KHR_LIGHTS_PUNCTUAL);}_iterator50=_createForOfIteratorHelper(json.nodes||[]);try{for(_iterator50.s();!(_step50=_iterator50.n()).done;){_node12=_step50.value;nodeExtension=gltfScenegraph.getObjectExtension(_node12,KHR_LIGHTS_PUNCTUAL);if(nodeExtension){_node12.light=nodeExtension.light;}gltfScenegraph.removeObjectExtension(_node12,KHR_LIGHTS_PUNCTUAL);}}catch(err){_iterator50.e(err);}finally{_iterator50.f();}case 6:case"end":return _context60.stop();}}},_callee56);}));return _decode$3.apply(this,arguments);}function encode$2(_x80){return _encode$.apply(this,arguments);}function _encode$(){_encode$=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee57(gltfData){var gltfScenegraph,json,extension,_iterator51,_step51,light,_node13;return _regeneratorRuntime().wrap(function _callee57$(_context61){while(1){switch(_context61.prev=_context61.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;if(json.lights){extension=gltfScenegraph.addExtension(KHR_LIGHTS_PUNCTUAL);assert$1(!extension.lights);extension.lights=json.lights;delete json.lights;}if(gltfScenegraph.json.lights){_iterator51=_createForOfIteratorHelper(gltfScenegraph.json.lights);try{for(_iterator51.s();!(_step51=_iterator51.n()).done;){light=_step51.value;_node13=light.node;gltfScenegraph.addObjectExtension(_node13,KHR_LIGHTS_PUNCTUAL,light);}}catch(err){_iterator51.e(err);}finally{_iterator51.f();}delete gltfScenegraph.json.lights;}case 4:case"end":return _context61.stop();}}},_callee57);}));return _encode$.apply(this,arguments);}var KHR_lights_punctual=/*#__PURE__*/Object.freeze({__proto__:null,name:name$2,decode:decode$2,encode:encode$2});var KHR_MATERIALS_UNLIT='KHR_materials_unlit';var name$1=KHR_MATERIALS_UNLIT;function decode$1(_x81){return _decode$4.apply(this,arguments);}function _decode$4(){_decode$4=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee58(gltfData){var gltfScenegraph,json,_iterator52,_step52,material,extension;return _regeneratorRuntime().wrap(function _callee58$(_context62){while(1){switch(_context62.prev=_context62.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;gltfScenegraph.removeExtension(KHR_MATERIALS_UNLIT);_iterator52=_createForOfIteratorHelper(json.materials||[]);try{for(_iterator52.s();!(_step52=_iterator52.n()).done;){material=_step52.value;extension=material.extensions&&material.extensions.KHR_materials_unlit;if(extension){material.unlit=true;}gltfScenegraph.removeObjectExtension(material,KHR_MATERIALS_UNLIT);}}catch(err){_iterator52.e(err);}finally{_iterator52.f();}case 5:case"end":return _context62.stop();}}},_callee58);}));return _decode$4.apply(this,arguments);}function encode$1(gltfData){var gltfScenegraph=new GLTFScenegraph(gltfData);var json=gltfScenegraph.json;if(gltfScenegraph.materials){var _iterator29=_createForOfIteratorHelper(json.materials||[]),_step29;try{for(_iterator29.s();!(_step29=_iterator29.n()).done;){var material=_step29.value;if(material.unlit){delete material.unlit;gltfScenegraph.addObjectExtension(material,KHR_MATERIALS_UNLIT,{});gltfScenegraph.addExtension(KHR_MATERIALS_UNLIT);}}}catch(err){_iterator29.e(err);}finally{_iterator29.f();}}}var KHR_materials_unlit=/*#__PURE__*/Object.freeze({__proto__:null,name:name$1,decode:decode$1,encode:encode$1});var KHR_TECHNIQUES_WEBGL='KHR_techniques_webgl';var name=KHR_TECHNIQUES_WEBGL;function decode(_x82){return _decode.apply(this,arguments);}function _decode(){_decode=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee59(gltfData){var gltfScenegraph,json,extension,techniques,_iterator53,_step53,material,materialExtension;return _regeneratorRuntime().wrap(function _callee59$(_context63){while(1){switch(_context63.prev=_context63.next){case 0:gltfScenegraph=new GLTFScenegraph(gltfData);json=gltfScenegraph.json;extension=gltfScenegraph.getExtension(KHR_TECHNIQUES_WEBGL);if(extension){techniques=resolveTechniques(extension,gltfScenegraph);_iterator53=_createForOfIteratorHelper(json.materials||[]);try{for(_iterator53.s();!(_step53=_iterator53.n()).done;){material=_step53.value;materialExtension=gltfScenegraph.getObjectExtension(material,KHR_TECHNIQUES_WEBGL);if(materialExtension){material.technique=Object.assign({},materialExtension,techniques[materialExtension.technique]);material.technique.values=resolveValues(material.technique,gltfScenegraph);}gltfScenegraph.removeObjectExtension(material,KHR_TECHNIQUES_WEBGL);}}catch(err){_iterator53.e(err);}finally{_iterator53.f();}gltfScenegraph.removeExtension(KHR_TECHNIQUES_WEBGL);}case 4:case"end":return _context63.stop();}}},_callee59);}));return _decode.apply(this,arguments);}function encode(_x83,_x84){return _encode.apply(this,arguments);}function _encode(){_encode=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee60(gltfData,options){return _regeneratorRuntime().wrap(function _callee60$(_context64){while(1){switch(_context64.prev=_context64.next){case 0:case"end":return _context64.stop();}}},_callee60);}));return _encode.apply(this,arguments);}function resolveTechniques(techniquesExtension,gltfScenegraph){var _techniquesExtension$=techniquesExtension.programs,programs=_techniquesExtension$===void 0?[]:_techniquesExtension$,_techniquesExtension$2=techniquesExtension.shaders,shaders=_techniquesExtension$2===void 0?[]:_techniquesExtension$2,_techniquesExtension$3=techniquesExtension.techniques,techniques=_techniquesExtension$3===void 0?[]:_techniquesExtension$3;var textDecoder=new TextDecoder();shaders.forEach(function(shader){if(Number.isFinite(shader.bufferView)){shader.code=textDecoder.decode(gltfScenegraph.getTypedArrayForBufferView(shader.bufferView));}else{throw new Error('KHR_techniques_webgl: no shader code');}});programs.forEach(function(program){program.fragmentShader=shaders[program.fragmentShader];program.vertexShader=shaders[program.vertexShader];});techniques.forEach(function(technique){technique.program=programs[technique.program];});return techniques;}function resolveValues(technique,gltfScenegraph){var values=Object.assign({},technique.values);Object.keys(technique.uniforms||{}).forEach(function(uniform){if(technique.uniforms[uniform].value&&!(uniform in values)){values[uniform]=technique.uniforms[uniform].value;}});Object.keys(values).forEach(function(uniform){if(_typeof(values[uniform])==='object'&&values[uniform].index!==undefined){values[uniform].texture=gltfScenegraph.getTexture(values[uniform].index);}});return values;}var KHR_techniques_webgl=/*#__PURE__*/Object.freeze({__proto__:null,name:name,decode:decode,encode:encode});var EXTENSIONS=[EXT_meshopt_compression,EXT_texture_webp,KHR_texture_basisu,KHR_draco_mesh_compression,KHR_lights_punctual,KHR_materials_unlit,KHR_techniques_webgl];function preprocessExtensions(gltf){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var context=arguments.length>2?arguments[2]:undefined;var extensions=EXTENSIONS.filter(function(extension){return useExtension(extension.name,options);});var _iterator30=_createForOfIteratorHelper(extensions),_step30;try{for(_iterator30.s();!(_step30=_iterator30.n()).done;){var extension=_step30.value;var _extension$preprocess;(_extension$preprocess=extension.preprocess)===null||_extension$preprocess===void 0?void 0:_extension$preprocess.call(extension,gltf,options,context);}}catch(err){_iterator30.e(err);}finally{_iterator30.f();}}function decodeExtensions(_x85){return _decodeExtensions.apply(this,arguments);}function _decodeExtensions(){_decodeExtensions=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee61(gltf){var options,context,extensions,_iterator54,_step54,extension,_extension$decode,_args59=arguments;return _regeneratorRuntime().wrap(function _callee61$(_context65){while(1){switch(_context65.prev=_context65.next){case 0:options=_args59.length>1&&_args59[1]!==undefined?_args59[1]:{};context=_args59.length>2?_args59[2]:undefined;extensions=EXTENSIONS.filter(function(extension){return useExtension(extension.name,options);});_iterator54=_createForOfIteratorHelper(extensions);_context65.prev=4;_iterator54.s();case 6:if((_step54=_iterator54.n()).done){_context65.next=12;break;}extension=_step54.value;_context65.next=10;return(_extension$decode=extension.decode)===null||_extension$decode===void 0?void 0:_extension$decode.call(extension,gltf,options,context);case 10:_context65.next=6;break;case 12:_context65.next=17;break;case 14:_context65.prev=14;_context65.t0=_context65["catch"](4);_iterator54.e(_context65.t0);case 17:_context65.prev=17;_iterator54.f();return _context65.finish(17);case 20:case"end":return _context65.stop();}}},_callee61,null,[[4,14,17,20]]);}));return _decodeExtensions.apply(this,arguments);}function useExtension(extensionName,options){var _options$gltf;var excludes=(options===null||options===void 0?void 0:(_options$gltf=options.gltf)===null||_options$gltf===void 0?void 0:_options$gltf.excludeExtensions)||{};var exclude=extensionName in excludes&&!excludes[extensionName];return!exclude;}var KHR_BINARY_GLTF='KHR_binary_glTF';function preprocess(gltfData){var gltfScenegraph=new GLTFScenegraph(gltfData);var json=gltfScenegraph.json;var _iterator31=_createForOfIteratorHelper(json.images||[]),_step31;try{for(_iterator31.s();!(_step31=_iterator31.n()).done;){var _image7=_step31.value;var extension=gltfScenegraph.getObjectExtension(_image7,KHR_BINARY_GLTF);if(extension){Object.assign(_image7,extension);}gltfScenegraph.removeObjectExtension(_image7,KHR_BINARY_GLTF);}}catch(err){_iterator31.e(err);}finally{_iterator31.f();}if(json.buffers&&json.buffers[0]){delete json.buffers[0].uri;}gltfScenegraph.removeExtension(KHR_BINARY_GLTF);}var GLTF_ARRAYS={accessors:'accessor',animations:'animation',buffers:'buffer',bufferViews:'bufferView',images:'image',materials:'material',meshes:'mesh',nodes:'node',samplers:'sampler',scenes:'scene',skins:'skin',textures:'texture'};var GLTF_KEYS={accessor:'accessors',animations:'animation',buffer:'buffers',bufferView:'bufferViews',image:'images',material:'materials',mesh:'meshes',node:'nodes',sampler:'samplers',scene:'scenes',skin:'skins',texture:'textures'};var GLTFV1Normalizer=/*#__PURE__*/function(){function GLTFV1Normalizer(){_classCallCheck(this,GLTFV1Normalizer);_defineProperty(this,"idToIndexMap",{animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}});_defineProperty(this,"json",void 0);}_createClass(GLTFV1Normalizer,[{key:"normalize",value:function normalize(gltf,options){this.json=gltf.json;var json=gltf.json;switch(json.asset&&json.asset.version){case'2.0':return;case undefined:case'1.0':break;default:console.warn("glTF: Unknown version ".concat(json.asset.version));return;}if(!options.normalize){throw new Error('glTF v1 is not supported.');}console.warn('Converting glTF v1 to glTF v2 format. This is experimental and may fail.');this._addAsset(json);this._convertTopLevelObjectsToArrays(json);preprocess(gltf);this._convertObjectIdsToArrayIndices(json);this._updateObjects(json);this._updateMaterial(json);}},{key:"_addAsset",value:function _addAsset(json){json.asset=json.asset||{};json.asset.version='2.0';json.asset.generator=json.asset.generator||'Normalized to glTF 2.0 by loaders.gl';}},{key:"_convertTopLevelObjectsToArrays",value:function _convertTopLevelObjectsToArrays(json){for(var arrayName in GLTF_ARRAYS){this._convertTopLevelObjectToArray(json,arrayName);}}},{key:"_convertTopLevelObjectToArray",value:function _convertTopLevelObjectToArray(json,mapName){var objectMap=json[mapName];if(!objectMap||Array.isArray(objectMap)){return;}json[mapName]=[];for(var id in objectMap){var object=objectMap[id];object.id=object.id||id;var index=json[mapName].length;json[mapName].push(object);this.idToIndexMap[mapName][id]=index;}}},{key:"_convertObjectIdsToArrayIndices",value:function _convertObjectIdsToArrayIndices(json){for(var arrayName in GLTF_ARRAYS){this._convertIdsToIndices(json,arrayName);}if('scene'in json){json.scene=this._convertIdToIndex(json.scene,'scene');}var _iterator32=_createForOfIteratorHelper(json.textures),_step32;try{for(_iterator32.s();!(_step32=_iterator32.n()).done;){var texture=_step32.value;this._convertTextureIds(texture);}}catch(err){_iterator32.e(err);}finally{_iterator32.f();}var _iterator33=_createForOfIteratorHelper(json.meshes),_step33;try{for(_iterator33.s();!(_step33=_iterator33.n()).done;){var _mesh5=_step33.value;this._convertMeshIds(_mesh5);}}catch(err){_iterator33.e(err);}finally{_iterator33.f();}var _iterator34=_createForOfIteratorHelper(json.nodes),_step34;try{for(_iterator34.s();!(_step34=_iterator34.n()).done;){var _node4=_step34.value;this._convertNodeIds(_node4);}}catch(err){_iterator34.e(err);}finally{_iterator34.f();}var _iterator35=_createForOfIteratorHelper(json.scenes),_step35;try{for(_iterator35.s();!(_step35=_iterator35.n()).done;){var _node5=_step35.value;this._convertSceneIds(_node5);}}catch(err){_iterator35.e(err);}finally{_iterator35.f();}}},{key:"_convertTextureIds",value:function _convertTextureIds(texture){if(texture.source){texture.source=this._convertIdToIndex(texture.source,'image');}}},{key:"_convertMeshIds",value:function _convertMeshIds(mesh){var _iterator36=_createForOfIteratorHelper(mesh.primitives),_step36;try{for(_iterator36.s();!(_step36=_iterator36.n()).done;){var _primitive3=_step36.value;var attributes=_primitive3.attributes,indices=_primitive3.indices,material=_primitive3.material;for(var attributeName in attributes){attributes[attributeName]=this._convertIdToIndex(attributes[attributeName],'accessor');}if(indices){_primitive3.indices=this._convertIdToIndex(indices,'accessor');}if(material){_primitive3.material=this._convertIdToIndex(material,'material');}}}catch(err){_iterator36.e(err);}finally{_iterator36.f();}}},{key:"_convertNodeIds",value:function _convertNodeIds(node){var _this116=this;if(node.children){node.children=node.children.map(function(child){return _this116._convertIdToIndex(child,'node');});}if(node.meshes){node.meshes=node.meshes.map(function(mesh){return _this116._convertIdToIndex(mesh,'mesh');});}}},{key:"_convertSceneIds",value:function _convertSceneIds(scene){var _this117=this;if(scene.nodes){scene.nodes=scene.nodes.map(function(node){return _this117._convertIdToIndex(node,'node');});}}},{key:"_convertIdsToIndices",value:function _convertIdsToIndices(json,topLevelArrayName){if(!json[topLevelArrayName]){console.warn("gltf v1: json doesn't contain attribute ".concat(topLevelArrayName));json[topLevelArrayName]=[];}var _iterator37=_createForOfIteratorHelper(json[topLevelArrayName]),_step37;try{for(_iterator37.s();!(_step37=_iterator37.n()).done;){var object=_step37.value;for(var key in object){var id=object[key];var index=this._convertIdToIndex(id,key);object[key]=index;}}}catch(err){_iterator37.e(err);}finally{_iterator37.f();}}},{key:"_convertIdToIndex",value:function _convertIdToIndex(id,key){var arrayName=GLTF_KEYS[key];if(arrayName in this.idToIndexMap){var index=this.idToIndexMap[arrayName][id];if(!Number.isFinite(index)){throw new Error("gltf v1: failed to resolve ".concat(key," with id ").concat(id));}return index;}return id;}},{key:"_updateObjects",value:function _updateObjects(json){var _iterator38=_createForOfIteratorHelper(this.json.buffers),_step38;try{for(_iterator38.s();!(_step38=_iterator38.n()).done;){var buffer=_step38.value;delete buffer.type;}}catch(err){_iterator38.e(err);}finally{_iterator38.f();}}},{key:"_updateMaterial",value:function _updateMaterial(json){var _iterator39=_createForOfIteratorHelper(json.materials),_step39;try{var _loop6=function _loop6(){var material=_step39.value;material.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};var textureId=((_material$values=material.values)===null||_material$values===void 0?void 0:_material$values.tex)||((_material$values2=material.values)===null||_material$values2===void 0?void 0:_material$values2.texture2d_0);var textureIndex=json.textures.findIndex(function(texture){return texture.id===textureId;});if(textureIndex!==-1){material.pbrMetallicRoughness.baseColorTexture={index:textureIndex};}};for(_iterator39.s();!(_step39=_iterator39.n()).done;){var _material$values,_material$values2;_loop6();}}catch(err){_iterator39.e(err);}finally{_iterator39.f();}}}]);return GLTFV1Normalizer;}();function normalizeGLTFV1(gltf){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};return new GLTFV1Normalizer().normalize(gltf,options);}var COMPONENTS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16};var BYTES={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4};var GL_SAMPLER={TEXTURE_MAG_FILTER:0x2800,TEXTURE_MIN_FILTER:0x2801,TEXTURE_WRAP_S:0x2802,TEXTURE_WRAP_T:0x2803,REPEAT:0x2901,LINEAR:0x2601,NEAREST_MIPMAP_LINEAR:0x2702};var SAMPLER_PARAMETER_GLTF_TO_GL={magFilter:GL_SAMPLER.TEXTURE_MAG_FILTER,minFilter:GL_SAMPLER.TEXTURE_MIN_FILTER,wrapS:GL_SAMPLER.TEXTURE_WRAP_S,wrapT:GL_SAMPLER.TEXTURE_WRAP_T};var DEFAULT_SAMPLER=(_DEFAULT_SAMPLER={},_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_MAG_FILTER,GL_SAMPLER.LINEAR),_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_MIN_FILTER,GL_SAMPLER.NEAREST_MIPMAP_LINEAR),_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_WRAP_S,GL_SAMPLER.REPEAT),_defineProperty2(_DEFAULT_SAMPLER,GL_SAMPLER.TEXTURE_WRAP_T,GL_SAMPLER.REPEAT),_DEFAULT_SAMPLER);function getBytesFromComponentType(componentType){return BYTES[componentType];}function getSizeFromAccessorType(type){return COMPONENTS[type];}var GLTFPostProcessor=/*#__PURE__*/function(){function GLTFPostProcessor(){_classCallCheck(this,GLTFPostProcessor);_defineProperty(this,"baseUri",'');_defineProperty(this,"json",{});_defineProperty(this,"buffers",[]);_defineProperty(this,"images",[]);}_createClass(GLTFPostProcessor,[{key:"postProcess",value:function postProcess(gltf){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var json=gltf.json,_gltf$buffers=gltf.buffers,buffers=_gltf$buffers===void 0?[]:_gltf$buffers,_gltf$images=gltf.images,images=_gltf$images===void 0?[]:_gltf$images,_gltf$baseUri=gltf.baseUri,baseUri=_gltf$baseUri===void 0?'':_gltf$baseUri;assert$1(json);this.baseUri=baseUri;this.json=json;this.buffers=buffers;this.images=images;this._resolveTree(this.json,options);return this.json;}},{key:"_resolveTree",value:function _resolveTree(json){var _this118=this;var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(json.bufferViews){json.bufferViews=json.bufferViews.map(function(bufView,i){return _this118._resolveBufferView(bufView,i);});}if(json.images){json.images=json.images.map(function(image,i){return _this118._resolveImage(image,i);});}if(json.samplers){json.samplers=json.samplers.map(function(sampler,i){return _this118._resolveSampler(sampler,i);});}if(json.textures){json.textures=json.textures.map(function(texture,i){return _this118._resolveTexture(texture,i);});}if(json.accessors){json.accessors=json.accessors.map(function(accessor,i){return _this118._resolveAccessor(accessor,i);});}if(json.materials){json.materials=json.materials.map(function(material,i){return _this118._resolveMaterial(material,i);});}if(json.meshes){json.meshes=json.meshes.map(function(mesh,i){return _this118._resolveMesh(mesh,i);});}if(json.nodes){json.nodes=json.nodes.map(function(node,i){return _this118._resolveNode(node,i);});}if(json.skins){json.skins=json.skins.map(function(skin,i){return _this118._resolveSkin(skin,i);});}if(json.scenes){json.scenes=json.scenes.map(function(scene,i){return _this118._resolveScene(scene,i);});}if(json.scene!==undefined){json.scene=json.scenes[this.json.scene];}}},{key:"getScene",value:function getScene(index){return this._get('scenes',index);}},{key:"getNode",value:function getNode(index){return this._get('nodes',index);}},{key:"getSkin",value:function getSkin(index){return this._get('skins',index);}},{key:"getMesh",value:function getMesh(index){return this._get('meshes',index);}},{key:"getMaterial",value:function getMaterial(index){return this._get('materials',index);}},{key:"getAccessor",value:function getAccessor(index){return this._get('accessors',index);}},{key:"getCamera",value:function getCamera(index){return null;}},{key:"getTexture",value:function getTexture(index){return this._get('textures',index);}},{key:"getSampler",value:function getSampler(index){return this._get('samplers',index);}},{key:"getImage",value:function getImage(index){return this._get('images',index);}},{key:"getBufferView",value:function getBufferView(index){return this._get('bufferViews',index);}},{key:"getBuffer",value:function getBuffer(index){return this._get('buffers',index);}},{key:"_get",value:function _get(array,index){if(_typeof(index)==='object'){return index;}var object=this.json[array]&&this.json[array][index];if(!object){console.warn("glTF file error: Could not find ".concat(array,"[").concat(index,"]"));}return object;}},{key:"_resolveScene",value:function _resolveScene(scene,index){var _this119=this;scene.id=scene.id||"scene-".concat(index);scene.nodes=(scene.nodes||[]).map(function(node){return _this119.getNode(node);});return scene;}},{key:"_resolveNode",value:function _resolveNode(node,index){var _this120=this;node.id=node.id||"node-".concat(index);if(node.children){node.children=node.children.map(function(child){return _this120.getNode(child);});}if(node.mesh!==undefined){node.mesh=this.getMesh(node.mesh);}else if(node.meshes!==undefined&&node.meshes.length){node.mesh=node.meshes.reduce(function(accum,meshIndex){var mesh=_this120.getMesh(meshIndex);accum.id=mesh.id;accum.primitives=accum.primitives.concat(mesh.primitives);return accum;},{primitives:[]});}if(node.camera!==undefined){node.camera=this.getCamera(node.camera);}if(node.skin!==undefined){node.skin=this.getSkin(node.skin);}return node;}},{key:"_resolveSkin",value:function _resolveSkin(skin,index){skin.id=skin.id||"skin-".concat(index);skin.inverseBindMatrices=this.getAccessor(skin.inverseBindMatrices);return skin;}},{key:"_resolveMesh",value:function _resolveMesh(mesh,index){var _this121=this;mesh.id=mesh.id||"mesh-".concat(index);if(mesh.primitives){mesh.primitives=mesh.primitives.map(function(primitive){primitive=_objectSpread({},primitive);var attributes=primitive.attributes;primitive.attributes={};for(var attribute in attributes){primitive.attributes[attribute]=_this121.getAccessor(attributes[attribute]);}if(primitive.indices!==undefined){primitive.indices=_this121.getAccessor(primitive.indices);}if(primitive.material!==undefined){primitive.material=_this121.getMaterial(primitive.material);}return primitive;});}return mesh;}},{key:"_resolveMaterial",value:function _resolveMaterial(material,index){material.id=material.id||"material-".concat(index);if(material.normalTexture){material.normalTexture=_objectSpread({},material.normalTexture);material.normalTexture.texture=this.getTexture(material.normalTexture.index);}if(material.occlusionTexture){material.occlustionTexture=_objectSpread({},material.occlustionTexture);material.occlusionTexture.texture=this.getTexture(material.occlusionTexture.index);}if(material.emissiveTexture){material.emmisiveTexture=_objectSpread({},material.emmisiveTexture);material.emissiveTexture.texture=this.getTexture(material.emissiveTexture.index);}if(!material.emissiveFactor){material.emissiveFactor=material.emmisiveTexture?[1,1,1]:[0,0,0];}if(material.pbrMetallicRoughness){material.pbrMetallicRoughness=_objectSpread({},material.pbrMetallicRoughness);var mr=material.pbrMetallicRoughness;if(mr.baseColorTexture){mr.baseColorTexture=_objectSpread({},mr.baseColorTexture);mr.baseColorTexture.texture=this.getTexture(mr.baseColorTexture.index);}if(mr.metallicRoughnessTexture){mr.metallicRoughnessTexture=_objectSpread({},mr.metallicRoughnessTexture);mr.metallicRoughnessTexture.texture=this.getTexture(mr.metallicRoughnessTexture.index);}}return material;}},{key:"_resolveAccessor",value:function _resolveAccessor(accessor,index){accessor.id=accessor.id||"accessor-".concat(index);if(accessor.bufferView!==undefined){accessor.bufferView=this.getBufferView(accessor.bufferView);}accessor.bytesPerComponent=getBytesFromComponentType(accessor.componentType);accessor.components=getSizeFromAccessorType(accessor.type);accessor.bytesPerElement=accessor.bytesPerComponent*accessor.components;if(accessor.bufferView){var buffer=accessor.bufferView.buffer;var _getAccessorArrayType2=getAccessorArrayTypeAndLength(accessor,accessor.bufferView),ArrayType=_getAccessorArrayType2.ArrayType,byteLength=_getAccessorArrayType2.byteLength;var byteOffset=(accessor.bufferView.byteOffset||0)+(accessor.byteOffset||0)+buffer.byteOffset;var cutBuffer=buffer.arrayBuffer.slice(byteOffset,byteOffset+byteLength);if(accessor.bufferView.byteStride){cutBuffer=this._getValueFromInterleavedBuffer(buffer,byteOffset,accessor.bufferView.byteStride,accessor.bytesPerElement,accessor.count);}accessor.value=new ArrayType(cutBuffer);}return accessor;}},{key:"_getValueFromInterleavedBuffer",value:function _getValueFromInterleavedBuffer(buffer,byteOffset,byteStride,bytesPerElement,count){var result=new Uint8Array(count*bytesPerElement);for(var _i508=0;_i5081&&arguments[1]!==undefined?arguments[1]:0;return"".concat(String.fromCharCode(dataView.getUint8(byteOffset+0))).concat(String.fromCharCode(dataView.getUint8(byteOffset+1))).concat(String.fromCharCode(dataView.getUint8(byteOffset+2))).concat(String.fromCharCode(dataView.getUint8(byteOffset+3)));}function isGLB(arrayBuffer){var byteOffset=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var dataView=new DataView(arrayBuffer);var _options$magic=options.magic,magic=_options$magic===void 0?MAGIC_glTF:_options$magic;var magic1=dataView.getUint32(byteOffset,false);return magic1===magic||magic1===MAGIC_glTF;}function parseGLBSync(glb,arrayBuffer){var byteOffset=arguments.length>2&&arguments[2]!==undefined?arguments[2]:0;var options=arguments.length>3&&arguments[3]!==undefined?arguments[3]:{};var dataView=new DataView(arrayBuffer);var type=getMagicString(dataView,byteOffset+0);var version=dataView.getUint32(byteOffset+4,LE);var byteLength=dataView.getUint32(byteOffset+8,LE);Object.assign(glb,{header:{byteOffset:byteOffset,byteLength:byteLength,hasBinChunk:false},type:type,version:version,json:{},binChunks:[]});byteOffset+=GLB_FILE_HEADER_SIZE;switch(glb.version){case 1:return parseGLBV1(glb,dataView,byteOffset);case 2:return parseGLBV2(glb,dataView,byteOffset,options={});default:throw new Error("Invalid GLB version ".concat(glb.version,". Only supports v1 and v2."));}}function parseGLBV1(glb,dataView,byteOffset){assert$5(glb.header.byteLength>GLB_FILE_HEADER_SIZE+GLB_CHUNK_HEADER_SIZE);var contentLength=dataView.getUint32(byteOffset+0,LE);var contentFormat=dataView.getUint32(byteOffset+4,LE);byteOffset+=GLB_CHUNK_HEADER_SIZE;assert$5(contentFormat===GLB_V1_CONTENT_FORMAT_JSON);parseJSONChunk(glb,dataView,byteOffset,contentLength);byteOffset+=contentLength;byteOffset+=parseBINChunk(glb,dataView,byteOffset,glb.header.byteLength);return byteOffset;}function parseGLBV2(glb,dataView,byteOffset,options){assert$5(glb.header.byteLength>GLB_FILE_HEADER_SIZE+GLB_CHUNK_HEADER_SIZE);parseGLBChunksSync(glb,dataView,byteOffset,options);return byteOffset+glb.header.byteLength;}function parseGLBChunksSync(glb,dataView,byteOffset,options){while(byteOffset+8<=glb.header.byteLength){var chunkLength=dataView.getUint32(byteOffset+0,LE);var chunkFormat=dataView.getUint32(byteOffset+4,LE);byteOffset+=GLB_CHUNK_HEADER_SIZE;switch(chunkFormat){case GLB_CHUNK_TYPE_JSON:parseJSONChunk(glb,dataView,byteOffset,chunkLength);break;case GLB_CHUNK_TYPE_BIN:parseBINChunk(glb,dataView,byteOffset,chunkLength);break;case GLB_CHUNK_TYPE_JSON_XVIZ_DEPRECATED:if(!options.strict){parseJSONChunk(glb,dataView,byteOffset,chunkLength);}break;case GLB_CHUNK_TYPE_BIX_XVIZ_DEPRECATED:if(!options.strict){parseBINChunk(glb,dataView,byteOffset,chunkLength);}break;}byteOffset+=padToNBytes(chunkLength,4);}return byteOffset;}function parseJSONChunk(glb,dataView,byteOffset,chunkLength){var jsonChunk=new Uint8Array(dataView.buffer,byteOffset,chunkLength);var textDecoder=new TextDecoder('utf8');var jsonText=textDecoder.decode(jsonChunk);glb.json=JSON.parse(jsonText);return padToNBytes(chunkLength,4);}function parseBINChunk(glb,dataView,byteOffset,chunkLength){glb.header.hasBinChunk=true;glb.binChunks.push({byteOffset:byteOffset,byteLength:chunkLength,arrayBuffer:dataView.buffer});return padToNBytes(chunkLength,4);}function parseGLTF$1(_x86,_x87){return _parseGLTF$.apply(this,arguments);}function _parseGLTF$(){_parseGLTF$=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee62(gltf,arrayBufferOrString){var byteOffset,options,context,_options$gltf,_options$gltf2,_options$gltf3,_options$gltf4,promises,_promise,promise,_args60=arguments;return _regeneratorRuntime().wrap(function _callee62$(_context66){while(1){switch(_context66.prev=_context66.next){case 0:byteOffset=_args60.length>2&&_args60[2]!==undefined?_args60[2]:0;options=_args60.length>3?_args60[3]:undefined;context=_args60.length>4?_args60[4]:undefined;parseGLTFContainerSync(gltf,arrayBufferOrString,byteOffset,options);normalizeGLTFV1(gltf,{normalize:options===null||options===void 0?void 0:(_options$gltf=options.gltf)===null||_options$gltf===void 0?void 0:_options$gltf.normalize});preprocessExtensions(gltf,options,context);promises=[];if(!(options!==null&&options!==void 0&&(_options$gltf2=options.gltf)!==null&&_options$gltf2!==void 0&&_options$gltf2.loadBuffers&&gltf.json.buffers)){_context66.next=10;break;}_context66.next=10;return loadBuffers(gltf,options,context);case 10:if(options!==null&&options!==void 0&&(_options$gltf3=options.gltf)!==null&&_options$gltf3!==void 0&&_options$gltf3.loadImages){_promise=loadImages(gltf,options,context);promises.push(_promise);}promise=decodeExtensions(gltf,options,context);promises.push(promise);_context66.next=15;return Promise.all(promises);case 15:return _context66.abrupt("return",options!==null&&options!==void 0&&(_options$gltf4=options.gltf)!==null&&_options$gltf4!==void 0&&_options$gltf4.postProcess?postProcessGLTF(gltf,options):gltf);case 16:case"end":return _context66.stop();}}},_callee62);}));return _parseGLTF$.apply(this,arguments);}function parseGLTFContainerSync(gltf,data,byteOffset,options){if(options.uri){gltf.baseUri=options.uri;}if(data instanceof ArrayBuffer&&!isGLB(data,byteOffset,options)){var textDecoder=new TextDecoder();data=textDecoder.decode(data);}if(typeof data==='string'){gltf.json=parseJSON(data);}else if(data instanceof ArrayBuffer){var glb={};byteOffset=parseGLBSync(glb,data,byteOffset,options.glb);assert$1(glb.type==='glTF',"Invalid GLB magic string ".concat(glb.type));gltf._glb=glb;gltf.json=glb.json;}else{assert$1(false,'GLTF: must be ArrayBuffer or string');}var buffers=gltf.json.buffers||[];gltf.buffers=new Array(buffers.length).fill(null);if(gltf._glb&&gltf._glb.header.hasBinChunk){var binChunks=gltf._glb.binChunks;gltf.buffers[0]={arrayBuffer:binChunks[0].arrayBuffer,byteOffset:binChunks[0].byteOffset,byteLength:binChunks[0].byteLength};}var images=gltf.json.images||[];gltf.images=new Array(images.length).fill({});}function loadBuffers(_x88,_x89,_x90){return _loadBuffers.apply(this,arguments);}function _loadBuffers(){_loadBuffers=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee63(gltf,options,context){var buffers,_i603,buffer,_context$fetch,_response$arrayBuffer,_fetch,uri,response,arrayBuffer;return _regeneratorRuntime().wrap(function _callee63$(_context67){while(1){switch(_context67.prev=_context67.next){case 0:buffers=gltf.json.buffers||[];_i603=0;case 2:if(!(_i6031&&_args64[1]!==undefined?_args64[1]:{};context=_args64.length>2?_args64[2]:undefined;options=_objectSpread(_objectSpread({},GLTFLoader.options),options);options.gltf=_objectSpread(_objectSpread({},GLTFLoader.options.gltf),options.gltf);_options2=options,_options2$byteOffset=_options2.byteOffset,byteOffset=_options2$byteOffset===void 0?0:_options2$byteOffset;gltf={};_context70.next=8;return parseGLTF$1(gltf,arrayBuffer,byteOffset,options,context);case 8:return _context70.abrupt("return",_context70.sent);case 9:case"end":return _context70.stop();}}},_callee66);}));return _parse$3.apply(this,arguments);}var GLTFSceneModelLoader=/*#__PURE__*/function(){function GLTFSceneModelLoader(cfg){_classCallCheck(this,GLTFSceneModelLoader);}_createClass(GLTFSceneModelLoader,[{key:"load",value:function load(plugin,src,metaModelJSON,options,sceneModel,ok,error){options=options||{};loadGLTF(plugin,src,metaModelJSON,options,sceneModel,function(){core.scheduleTask(function(){sceneModel.scene.fire("modelLoaded",sceneModel.id);// FIXME: Assumes listeners know order of these two events sceneModel.fire("loaded",true,false);});if(ok){ok();}},function(msg){plugin.error(msg);if(error){error(msg);}sceneModel.fire("error",msg);});}},{key:"parse",value:function parse(plugin,gltf,metaModelJSON,options,sceneModel,ok,error){options=options||{};parseGLTF(plugin,"",gltf,metaModelJSON,options,sceneModel,function(){sceneModel.scene.fire("modelLoaded",sceneModel.id);// FIXME: Assumes listeners know order of these two events -sceneModel.fire("loaded",true,false);if(ok){ok();}});}}]);return GLTFSceneModelLoader;}();function getMetaModelCorrections(metaModelJSON){var eachRootStats={};var eachChildRoot={};var metaObjects=metaModelJSON.metaObjects||[];var metaObjectsMap={};for(var _i508=0,len=metaObjects.length;_i5080){for(var _i515=0;_i5150){for(var _i516=0;_i5160){if(nodeName===undefined||nodeName===null){ctx.log("Warning: 'name' properties not found on glTF scene nodes - will randomly-generate object IDs in XKT");}var entityId=nodeName;// Fall back on generated ID when `name` not found on glTF scene node(s) // if (!!entityId && sceneModel.entities[entityId]) { // ctx.log(`Warning: Two or more glTF nodes found with same 'name' attribute: '${nodeName} - will randomly-generating an object ID in XKT`); @@ -24448,7 +24452,7 @@ sceneModel.createEntity({id:entityId,meshIds:deferredMeshIds});deferredMeshIds.l * @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models} */,set:function set(value){this._objectDefaults=value||IFCObjectDefaults;}},{key:"load",value:function load(){var _this123=this;var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(params.id&&this.viewer.scene.components[params.id]){this.error("Component with this ID already exists in viewer: "+params.id+" - will autogenerate this ID");delete params.id;}var sceneModel=new SceneModel(this.viewer.scene,utils.apply(params,{isModel:true,dtxEnabled:params.dtxEnabled}));var modelId=sceneModel.id;// In case ID was auto-generated if(!params.src&&!params.gltf){this.error("load() param expected: src or gltf");return sceneModel;// Return new empty model -}if(params.metaModelSrc||params.metaModelJSON){var objectDefaults=params.objectDefaults||this._objectDefaults||IFCObjectDefaults;var processMetaModelJSON=function processMetaModelJSON(metaModelJSON){_this123.viewer.metaScene.createMetaModel(modelId,metaModelJSON,{includeTypes:params.includeTypes,excludeTypes:params.excludeTypes});_this123.viewer.scene.canvas.spinner.processes--;var includeTypes;if(params.includeTypes){includeTypes={};for(var _i517=0,len=params.includeTypes.length;_i517=boundary[0]*scale&&s<=(boundary[0]+boundary[2])*scale&&t>=boundary[1]*scale&&t<=(boundary[1]+boundary[3])*scale){return i;}}}return-1;};this.setAreaHighlighted=function(areaId,highlighted){var area=areas[areaId];if(!area){throw"Area not found: "+areaId;}area.highlighted=!!highlighted;paint();};this.getAreaDir=function(areaId){var area=areas[areaId];if(!area){throw"Unknown area: "+areaId;}return area.dir;};this.getAreaUp=function(areaId){var area=areas[areaId];if(!area){throw"Unknown area: "+areaId;}return area.up;};this.getImage=function(){return this._textureCanvas;};this.destroy=function(){if(this._textureCanvas){this._textureCanvas.parentNode.removeChild(this._textureCanvas);this._textureCanvas=null;}};}var tempVec3a$4=math.vec3();var tempVec3b$1=math.vec3();math.mat4();/** * {@link Viewer} plugin that lets us look at the entire {@link Scene} from along a chosen axis or diagonal. * @@ -25485,7 +25489,7 @@ for(var _id4 in this._controls){if(this._controls.hasOwnProperty(_id4)){this._co * These are created and destroyed automatically as models are loaded and destroyed. * * @type {{String: {String:Storey}}} - */_this133.modelStoreys={};_this133._fitStoreyMaps=!!cfg.fitStoreyMaps;_this133._onModelLoaded=_this133.viewer.scene.on("modelLoaded",function(modelId){_this133._registerModelStoreys(modelId);_this133.fire("storeys",_this133.storeys);});return _this133;}_createClass(StoreyViewsPlugin,[{key:"_registerModelStoreys",value:function _registerModelStoreys(modelId){var _this134=this;var viewer=this.viewer;var scene=viewer.scene;var metaScene=viewer.metaScene;var metaModel=metaScene.metaModels[modelId];var model=scene.models[modelId];if(!metaModel||!metaModel.rootMetaObjects){return;}var rootMetaObjects=metaModel.rootMetaObjects;for(var j=0,lenj=rootMetaObjects.length;j0.5?childObjectIds.length:0;var storey=new Storey(this,model.aabb,storeyAABB,modelId,storeyId,numObjects);storey._onModelDestroyed=model.once("destroyed",function(){_this134._deregisterModelStoreys(modelId);_this134.fire("storeys",_this134.storeys);});this.storeys[storeyId]=storey;if(!this.modelStoreys[modelId]){this.modelStoreys[modelId]={};}this.modelStoreys[modelId][storeyId]=storey;}}}},{key:"_deregisterModelStoreys",value:function _deregisterModelStoreys(modelId){var storeys=this.modelStoreys[modelId];if(storeys){var scene=this.viewer.scene;for(var storyObjectId in storeys){if(storeys.hasOwnProperty(storyObjectId)){var storey=storeys[storyObjectId];var model=scene.models[storey.modelId];if(model){model.off(storey._onModelDestroyed);}delete this.storeys[storyObjectId];}}delete this.modelStoreys[modelId];}}/** + */_this133.modelStoreys={};_this133._fitStoreyMaps=!!cfg.fitStoreyMaps;_this133._onModelLoaded=_this133.viewer.scene.on("modelLoaded",function(modelId){_this133._registerModelStoreys(modelId);_this133.fire("storeys",_this133.storeys);});return _this133;}_createClass(StoreyViewsPlugin,[{key:"_registerModelStoreys",value:function _registerModelStoreys(modelId){var _this134=this;var viewer=this.viewer;var scene=viewer.scene;var metaScene=viewer.metaScene;var metaModel=metaScene.metaModels[modelId];var model=scene.models[modelId];if(!metaModel||!metaModel.rootMetaObjects){return;}var rootMetaObjects=metaModel.rootMetaObjects;for(var j=0,lenj=rootMetaObjects.length;j0.5?childObjectIds.length:0;var storey=new Storey(this,model.aabb,storeyAABB,modelId,storeyId,numObjects);storey._onModelDestroyed=model.once("destroyed",function(){_this134._deregisterModelStoreys(modelId);_this134.fire("storeys",_this134.storeys);});this.storeys[storeyId]=storey;if(!this.modelStoreys[modelId]){this.modelStoreys[modelId]={};}this.modelStoreys[modelId][storeyId]=storey;}}}},{key:"_deregisterModelStoreys",value:function _deregisterModelStoreys(modelId){var storeys=this.modelStoreys[modelId];if(storeys){var scene=this.viewer.scene;for(var storyObjectId in storeys){if(storeys.hasOwnProperty(storyObjectId)){var storey=storeys[storyObjectId];var model=scene.models[storey.modelId];if(model){model.off(storey._onModelDestroyed);}delete this.storeys[storyObjectId];}}delete this.modelStoreys[modelId];}}/** * When true, the elements of each floor map image will be proportionally resized to encompass the entire image. This leads to varying scales among different * floor map images. If false, each floor map image will display the model's extents, ensuring a consistent scale across all images. * @returns {*|boolean} @@ -25855,7 +25859,7 @@ var sectionPlane=new SectionPlane(this.viewer.scene,{id:params.id,pos:params.pos * @param {String} id ID of the {@link SectionPlane}. */},{key:"destroySectionPlane",value:function destroySectionPlane(id){var sectionPlane=this.viewer.scene.sectionPlanes[id];if(!sectionPlane){this.error("SectionPlane not found: "+id);return;}this._sectionPlaneDestroyed(sectionPlane);sectionPlane.destroy();if(id===this._shownControlId){this._shownControlId=null;}}},{key:"_sectionPlaneDestroyed",value:function _sectionPlaneDestroyed(sectionPlane){if(this._overview){this._overview.removeSectionPlane(sectionPlane);}var control=this._controls[sectionPlane.id];if(!control){return;}control.setVisible(false);control._setSectionPlane(null);delete this._controls[sectionPlane.id];this._freeControls.push(control);}/** * Destroys all {@link SectionPlane}s created by this FaceAlignedSectionPlanesPlugin. - */},{key:"clear",value:function clear(){var ids=Object.keys(this._sectionPlanes);for(var _i524=0,len=ids.length;_i524>5&0x1F)/31;b=(packedColor>>10&0x1F)/31;}else{r=defaultR;g=defaultG;b=defaultB;}if(splitMeshes&&r!==lastR||g!==lastG||b!==lastB){if(lastR!==null){newMesh=true;}lastR=r;lastG=g;lastB=b;}}for(var _i525=1;_i525<=3;_i525++){var vertexstart=start+_i525*12;positions.push(reader.getFloat32(vertexstart,true));positions.push(reader.getFloat32(vertexstart+4,true));positions.push(reader.getFloat32(vertexstart+8,true));normals.push(normalX,normalY,normalZ);if(hasColors){colors.push(r,g,b,1);// TODO: handle alpha +var dataOffset=84;var faceLength=12*4+2;var positions=[];var normals=[];var splitMeshes=options.splitMeshes;for(var face=0;face>5&0x1F)/31;b=(packedColor>>10&0x1F)/31;}else{r=defaultR;g=defaultG;b=defaultB;}if(splitMeshes&&r!==lastR||g!==lastG||b!==lastB){if(lastR!==null){newMesh=true;}lastR=r;lastG=g;lastB=b;}}for(var _i526=1;_i526<=3;_i526++){var vertexstart=start+_i526*12;positions.push(reader.getFloat32(vertexstart,true));positions.push(reader.getFloat32(vertexstart+4,true));positions.push(reader.getFloat32(vertexstart+8,true));normals.push(normalX,normalY,normalZ);if(hasColors){colors.push(r,g,b,1);// TODO: handle alpha }}if(splitMeshes&&newMesh){addMesh(modelNode,positions,normals,colors,material,options);positions=[];normals=[];colors=colors?[]:null;newMesh=false;}}if(positions.length>0){addMesh(modelNode,positions,normals,colors,material,options);}}function parseASCII(plugin,data,modelNode,options){var faceRegex=/facet([\s\S]*?)endfacet/g;var faceCounter=0;var floatRegex=/[\s]+([+-]?(?:\d+.\d+|\d+.|\d+|.\d+)(?:[eE][+-]?\d+)?)/.source;var vertexRegex=new RegExp('vertex'+floatRegex+floatRegex+floatRegex,'g');var normalRegex=new RegExp('normal'+floatRegex+floatRegex+floatRegex,'g');var positions=[];var normals=[];var colors=null;var normalx;var normaly;var normalz;var result;var verticesPerFace;var normalsPerFace;var text;while((result=faceRegex.exec(data))!==null){verticesPerFace=0;normalsPerFace=0;text=result[0];while((result=normalRegex.exec(text))!==null){normalx=parseFloat(result[1]);normaly=parseFloat(result[2]);normalz=parseFloat(result[3]);normalsPerFace++;}while((result=vertexRegex.exec(text))!==null){positions.push(parseFloat(result[1]),parseFloat(result[2]),parseFloat(result[3]));normals.push(normalx,normaly,normalz);verticesPerFace++;}if(normalsPerFace!==1){plugin.error("Error in normal of face "+faceCounter);}if(verticesPerFace!==3){plugin.error("Error in positions of face "+faceCounter);}faceCounter++;}var material=new MetallicMaterial(modelNode,{roughness:0.5});// var material = new PhongMaterial(modelNode, { // diffuse: [0.4, 0.4, 0.4], // reflectivity: 1, // specular: [0.5, 0.5, 1.0] // }); -addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(modelNode,positions,normals,colors,material,options){var indices=new Int32Array(positions.length/3);for(var ni=0,len=indices.length;ni0?normals:null;colors=colors&&colors.length>0?colors:null;if(options.smoothNormals){math.faceToVertexNormals(positions,normals,options);}var origin=tempVec3a$1;worldToRTCPositions(positions,positions,origin);var geometry=new ReadableGeometry(modelNode,{primitive:"triangles",positions:positions,normals:normals,colors:colors,indices:indices});var mesh=new Mesh(modelNode,{origin:origin[0]!==0||origin[1]!==0||origin[2]!==0?origin:null,geometry:geometry,material:material,edges:options.edges});modelNode.addChild(mesh);}function ensureString(buffer){if(typeof buffer!=='string'){return decodeText(new Uint8Array(buffer));}return buffer;}function ensureBinary(buffer){if(typeof buffer==='string'){var arrayBuffer=new Uint8Array(buffer.length);for(var _i526=0;_i5260?normals:null;colors=colors&&colors.length>0?colors:null;if(options.smoothNormals){math.faceToVertexNormals(positions,normals,options);}var origin=tempVec3a$1;worldToRTCPositions(positions,positions,origin);var geometry=new ReadableGeometry(modelNode,{primitive:"triangles",positions:positions,normals:normals,colors:colors,indices:indices});var mesh=new Mesh(modelNode,{origin:origin[0]!==0||origin[1]!==0||origin[2]!==0?origin:null,geometry:geometry,material:material,edges:options.edges});modelNode.addChild(mesh);}function ensureString(buffer){if(typeof buffer!=='string'){return decodeText(new Uint8Array(buffer));}return buffer;}function ensureBinary(buffer){if(typeof buffer==='string'){var arrayBuffer=new Uint8Array(buffer.length);for(var _i527=0;_i527STL files. * @@ -26548,12 +26552,12 @@ addMesh(modelNode,positions,normals,colors,material,options);}function addMesh(m */_this143.errors=[];/** * True if errors were found generating this TreeView. * @type {boolean} - */_this143.valid=true;var containerElement=cfg.containerElement||document.getElementById(cfg.containerElementId);if(!(containerElement instanceof HTMLElement)){_this143.error("Mandatory config expected: valid containerElementId or containerElement");return _possibleConstructorReturn(_this143);}for(var _i528=0;;_i528++){if(!treeViews[_i528]){treeViews[_i528]=_assertThisInitialized(_this143);_this143._index=_i528;_this143._id="tree-".concat(_i528);break;}}_this143._containerElement=containerElement;_this143._metaModels={};_this143._autoAddModels=cfg.autoAddModels!==false;_this143._autoExpandDepth=cfg.autoExpandDepth||0;_this143._sortNodes=cfg.sortNodes!==false;_this143._viewer=viewer;_this143._rootElement=null;_this143._muteSceneEvents=false;_this143._muteTreeEvents=false;_this143._rootNodes=[];_this143._objectNodes={};// Object ID -> Node + */_this143.valid=true;var containerElement=cfg.containerElement||document.getElementById(cfg.containerElementId);if(!(containerElement instanceof HTMLElement)){_this143.error("Mandatory config expected: valid containerElementId or containerElement");return _possibleConstructorReturn(_this143);}for(var _i529=0;;_i529++){if(!treeViews[_i529]){treeViews[_i529]=_assertThisInitialized(_this143);_this143._index=_i529;_this143._id="tree-".concat(_i529);break;}}_this143._containerElement=containerElement;_this143._metaModels={};_this143._autoAddModels=cfg.autoAddModels!==false;_this143._autoExpandDepth=cfg.autoExpandDepth||0;_this143._sortNodes=cfg.sortNodes!==false;_this143._viewer=viewer;_this143._rootElement=null;_this143._muteSceneEvents=false;_this143._muteTreeEvents=false;_this143._rootNodes=[];_this143._objectNodes={};// Object ID -> Node _this143._nodeNodes={};// Node ID -> Node _this143._rootNames={};// Node ID -> Root name _this143._sortNodes=cfg.sortNodes;_this143._pruneEmptyNodes=cfg.pruneEmptyNodes;_this143._showListItemElementId=null;_this143._renderService=cfg.renderService||new RenderService();if(!_this143._renderService){throw new Error('TreeViewPlugin: no render service set');}_this143._containerElement.oncontextmenu=function(e){e.preventDefault();};_this143._onObjectVisibility=_this143._viewer.scene.on("objectVisibility",function(entity){if(_this143._muteSceneEvents){return;}var objectId=entity.id;var node=_this143._objectNodes[objectId];if(!node){return;// Not in this tree }var visible=entity.visible;var updated=visible!==node.checked;if(!updated){return;}_this143._muteTreeEvents=true;node.checked=visible;if(visible){node.numVisibleEntities++;}else{node.numVisibleEntities--;}_this143._renderService.setCheckbox(node.nodeId,visible);var parent=node.parent;while(parent){parent.checked=visible;if(visible){parent.numVisibleEntities++;}else{parent.numVisibleEntities--;}_this143._renderService.setCheckbox(parent.nodeId,parent.numVisibleEntities>0);parent=parent.parent;}_this143._muteTreeEvents=false;});_this143._onObjectXrayed=_this143._viewer.scene.on('objectXRayed',function(entity){if(_this143._muteSceneEvents){return;}var objectId=entity.id;var node=_this143._objectNodes[objectId];if(!node){return;// Not in this tree -}_this143._muteTreeEvents=true;var xrayed=entity.xrayed;var updated=xrayed!==node.xrayed;if(!updated){return;}node.xrayed=xrayed;_this143._renderService.setXRayed(node.nodeId,xrayed);_this143._muteTreeEvents=false;});_this143._switchExpandHandler=function(event){event.preventDefault();event.stopPropagation();var switchElement=event.target;_this143._expandSwitchElement(switchElement);};_this143._switchCollapseHandler=function(event){event.preventDefault();event.stopPropagation();var switchElement=event.target;_this143._collapseSwitchElement(switchElement);};_this143._checkboxChangeHandler=function(event){if(_this143._muteTreeEvents){return;}_this143._muteSceneEvents=true;var checkbox=event.target;var visible=_this143._renderService.isChecked(checkbox);var nodeId=_this143._renderService.getIdFromCheckbox(checkbox);var checkedNode=_this143._nodeNodes[nodeId];var objects=_this143._viewer.scene.objects;var numUpdated=0;_this143._withNodeTree(checkedNode,function(node){var objectId=node.objectId;var entity=objects[objectId];var isLeaf=node.children.length===0;node.numVisibleEntities=visible?node.numEntities:0;if(isLeaf&&visible!==node.checked){numUpdated++;}node.checked=visible;_this143._renderService.setCheckbox(node.nodeId,visible);if(entity){entity.visible=visible;}});var parent=checkedNode.parent;while(parent){parent.checked=visible;if(visible){parent.numVisibleEntities+=numUpdated;}else{parent.numVisibleEntities-=numUpdated;}_this143._renderService.setCheckbox(parent.nodeId,parent.numVisibleEntities>0);parent=parent.parent;}_this143._muteSceneEvents=false;};_this143._hierarchy=cfg.hierarchy||"containment";_this143._autoExpandDepth=cfg.autoExpandDepth||0;if(_this143._autoAddModels){var modelIds=Object.keys(_this143.viewer.metaScene.metaModels);for(var _i529=0,len=modelIds.length;_i5290);parent=parent.parent;}_this143._muteSceneEvents=false;};_this143._hierarchy=cfg.hierarchy||"containment";_this143._autoExpandDepth=cfg.autoExpandDepth||0;if(_this143._autoAddModels){var modelIds=Object.keys(_this143.viewer.metaScene.metaModels);for(var _i530=0,len=modelIds.length;_i5300;break;case"containment":default:this.valid=this._rootNodes.length>0;break;}return this.valid;}},{key:"_validateMetaModelForStoreysHierarchy",value:function _validateMetaModelForStoreysHierarchy(){var level=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var ctx=arguments.length>1?arguments[1]:undefined;var buildingNode=arguments.length>2?arguments[2]:undefined;// ctx = ctx || { // foundIFCBuildingStoreys: false @@ -26656,12 +26660,12 @@ _this143._sortNodes=cfg.sortNodes;_this143._pruneEmptyNodes=cfg.pruneEmptyNodes; // // errors.push("Can't build storeys hierarchy: no IfcBuildingStoreys found"); // } // } -return true;}},{key:"_createEnabledNodes",value:function _createEnabledNodes(){if(this._pruneEmptyNodes){this._findEmptyNodes();}switch(this._hierarchy){case"storeys":this._createStoreysNodes();if(this._rootNodes.length===0){this.error("Failed to build storeys hierarchy");}break;case"types":this._createTypesNodes();break;case"containment":default:this._createContainmentNodes();}if(this._sortNodes){this._doSortNodes();}this._synchNodesToEntities();this._createTrees();this.expandToDepth(this._autoExpandDepth);}},{key:"_createDisabledNodes",value:function _createDisabledNodes(){var rootNode=this._renderService.createRootNode();this._rootElement=rootNode;this._containerElement.appendChild(rootNode);var rootMetaObjects=this._viewer.metaScene.rootMetaObjects;for(var objectId in rootMetaObjects){var rootMetaObject=rootMetaObjects[objectId];var metaObjectType=rootMetaObject.type;var metaObjectName=rootMetaObject.name;var rootName=metaObjectName&&metaObjectName!==""&&metaObjectName!=="Undefined"&&metaObjectName!=="Default"?metaObjectName:metaObjectType;var childNode=this._renderService.createDisabledNodeElement(rootName);rootNode.appendChild(childNode);}}},{key:"_findEmptyNodes",value:function _findEmptyNodes(){var rootMetaObjects=this._viewer.metaScene.rootMetaObjects;for(var objectId in rootMetaObjects){this._findEmptyNodes2(rootMetaObjects[objectId]);}}},{key:"_findEmptyNodes2",value:function _findEmptyNodes2(metaObject){var countEntities=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var viewer=this.viewer;var scene=viewer.scene;var children=metaObject.children;var objectId=metaObject.id;var entity=scene.objects[objectId];metaObject._countEntities=0;if(entity){metaObject._countEntities++;}if(children){for(var _i534=0,len=children.length;_i5341&&arguments[1]!==undefined?arguments[1]:0;var viewer=this.viewer;var scene=viewer.scene;var children=metaObject.children;var objectId=metaObject.id;var entity=scene.objects[objectId];metaObject._countEntities=0;if(entity){metaObject._countEntities++;}if(children){for(var _i535=0,len=children.length;_i535node2.aabb[idx]){return-1;}if(node1.aabb[idx]title2){return 1;}return 0;}},{key:"_synchNodesToEntities",value:function _synchNodesToEntities(){var objectIds=Object.keys(this.viewer.metaScene.metaObjects);var metaObjects=this._viewer.metaScene.metaObjects;var objects=this._viewer.scene.objects;for(var _i540=0,len=objectIds.length;_i540title2){return 1;}return 0;}},{key:"_synchNodesToEntities",value:function _synchNodesToEntities(){var objectIds=Object.keys(this.viewer.metaScene.metaObjects);var metaObjects=this._viewer.metaScene.metaObjects;var objects=this._viewer.scene.objects;for(var _i541=0,len=objectIds.length;_i5410){for(var _i543=0;_i5430){for(var _i544=0;_i544=this._maxTreeDepth){kdNode.objects=kdNode.objects||[];kdNode.objects.push(objectIdx);math.expandAABB3(kdNode.aabb,entityAABB);return;}if(kdNode.left){if(math.containsAABB3(kdNode.left.aabb,entityAABB)){this._insertEntityIntoKDTree(kdNode.left,entity,objectIdx,depth+1);return;}}if(kdNode.right){if(math.containsAABB3(kdNode.right.aabb,entityAABB)){this._insertEntityIntoKDTree(kdNode.right,entity,objectIdx,depth+1);return;}}var nodeAABB=kdNode.aabb;kdTreeDimLength[0]=nodeAABB[3]-nodeAABB[0];kdTreeDimLength[1]=nodeAABB[4]-nodeAABB[1];kdTreeDimLength[2]=nodeAABB[5]-nodeAABB[2];var dim=0;if(kdTreeDimLength[1]>kdTreeDimLength[dim]){dim=1;}if(kdTreeDimLength[2]>kdTreeDimLength[dim]){dim=2;}if(!kdNode.left){var aabbLeft=nodeAABB.slice();aabbLeft[dim+3]=(nodeAABB[dim]+nodeAABB[dim+3])/2.0;kdNode.left={aabb:aabbLeft,intersection:Frustum$1.INTERSECT};if(math.containsAABB3(aabbLeft,entityAABB)){this._insertEntityIntoKDTree(kdNode.left,entity,objectIdx,depth+1);return;}}if(!kdNode.right){var aabbRight=nodeAABB.slice();aabbRight[dim]=(nodeAABB[dim]+nodeAABB[dim+3])/2.0;kdNode.right={aabb:aabbRight,intersection:Frustum$1.INTERSECT};if(math.containsAABB3(aabbRight,entityAABB)){this._insertEntityIntoKDTree(kdNode.right,entity,objectIdx,depth+1);return;}}kdNode.objects=kdNode.objects||[];kdNode.objects.push(objectIdx);math.expandAABB3(kdNode.aabb,entityAABB);}},{key:"_visitKDNode",value:function _visitKDNode(kdNode){var intersects=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Frustum$1.INTERSECT;if(intersects!==Frustum$1.INTERSECT&&kdNode.intersects===intersects){return;}if(intersects===Frustum$1.INTERSECT){intersects=frustumIntersectsAABB3(this._frustum,kdNode.aabb);kdNode.intersects=intersects;}var culled=intersects===Frustum$1.OUTSIDE;var objects=kdNode.objects;if(objects&&objects.length>0){for(var _i544=0,len=objects.length;_i544=this._maxTreeDepth){kdNode.objects=kdNode.objects||[];kdNode.objects.push(objectIdx);math.expandAABB3(kdNode.aabb,entityAABB);return;}if(kdNode.left){if(math.containsAABB3(kdNode.left.aabb,entityAABB)){this._insertEntityIntoKDTree(kdNode.left,entity,objectIdx,depth+1);return;}}if(kdNode.right){if(math.containsAABB3(kdNode.right.aabb,entityAABB)){this._insertEntityIntoKDTree(kdNode.right,entity,objectIdx,depth+1);return;}}var nodeAABB=kdNode.aabb;kdTreeDimLength[0]=nodeAABB[3]-nodeAABB[0];kdTreeDimLength[1]=nodeAABB[4]-nodeAABB[1];kdTreeDimLength[2]=nodeAABB[5]-nodeAABB[2];var dim=0;if(kdTreeDimLength[1]>kdTreeDimLength[dim]){dim=1;}if(kdTreeDimLength[2]>kdTreeDimLength[dim]){dim=2;}if(!kdNode.left){var aabbLeft=nodeAABB.slice();aabbLeft[dim+3]=(nodeAABB[dim]+nodeAABB[dim+3])/2.0;kdNode.left={aabb:aabbLeft,intersection:Frustum$1.INTERSECT};if(math.containsAABB3(aabbLeft,entityAABB)){this._insertEntityIntoKDTree(kdNode.left,entity,objectIdx,depth+1);return;}}if(!kdNode.right){var aabbRight=nodeAABB.slice();aabbRight[dim]=(nodeAABB[dim]+nodeAABB[dim+3])/2.0;kdNode.right={aabb:aabbRight,intersection:Frustum$1.INTERSECT};if(math.containsAABB3(aabbRight,entityAABB)){this._insertEntityIntoKDTree(kdNode.right,entity,objectIdx,depth+1);return;}}kdNode.objects=kdNode.objects||[];kdNode.objects.push(objectIdx);math.expandAABB3(kdNode.aabb,entityAABB);}},{key:"_visitKDNode",value:function _visitKDNode(kdNode){var intersects=arguments.length>1&&arguments[1]!==undefined?arguments[1]:Frustum$1.INTERSECT;if(intersects!==Frustum$1.INTERSECT&&kdNode.intersects===intersects){return;}if(intersects===Frustum$1.INTERSECT){intersects=frustumIntersectsAABB3(this._frustum,kdNode.aabb);kdNode.intersects=intersects;}var culled=intersects===Frustum$1.OUTSIDE;var objects=kdNode.objects;if(objects&&objects.length>0){for(var _i545=0,len=objects.length;_i545=0;){t[e]=0;}}var a=256,i=286,n=30,s=15,r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);var _=new Array(60);e(_);var f=new Array(512);e(f);var c=new Array(256);e(c);var u=new Array(29);e(u);var w=new Array(n);function m(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length;}var b,g,p;function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e;}e(w);var v=function v(t){return t<256?f[t]:f[256+(t>>>7)];},y=function y(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255;},x=function x(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<>>=1,a<<=1;}while(--e>0);return a>>>1;},E=function E(t,e,a){var i=new Array(16);var n,r,o=0;for(n=1;n<=s;n++){o=o+a[n-1]<<1,i[n]=o;}for(r=0;r<=e;r++){var _e2=t[2*r+1];0!==_e2&&(t[2*r]=A(i[_e2]++,_e2));}},R=function R(t){var e;for(e=0;e8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0;},U=function U(t,e,a,i){var n=2*e,s=2*a;return t[n]>1;o>=1;o--){S(t,a,o);}h=r;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),l=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=l,a[2*h]=a[2*o]+a[2*l],t.depth[h]=(t.depth[o]>=t.depth[l]?t.depth[o]:t.depth[l])+1,a[2*o+1]=a[2*l+1]=h,t.heap[1]=h++,S(t,a,1);}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,r=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,h=e.stat_desc.max_length;var d,_,f,c,u,w,m=0;for(c=0;c<=s;c++){t.bl_count[c]=0;}for(a[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d<573;d++){_=t.heap[d],c=a[2*a[2*_+1]+1]+1,c>h&&(c=h,m++),a[2*_+1]=c,_>i||(t.bl_count[c]++,u=0,_>=l&&(u=o[_-l]),w=a[2*_],t.opt_len+=w*(c+u),r&&(t.static_len+=w*(n[2*_+1]+u)));}if(0!==m){do{for(c=h-1;0===t.bl_count[c];){c--;}t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,m-=2;}while(m>0);for(c=h;0!==c;c--){for(_=t.bl_count[c];0!==_;){f=t.heap[--d],f>i||(a[2*f+1]!==c&&(t.opt_len+=(c-a[2*f+1])*a[2*f],a[2*f+1]=c),_--);}}}}(t,e),E(a,d,t.bl_count);},O=function O(t,e,a){var i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++){n=r,r=e[2*(i+1)+1],++o0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,i=4093624447;for(e=0;e<=31;e++,i>>>=1){if(1&i&&0!==t.dyn_ltree[2*e])return 0;}if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*h[e]+1];e--){;}return t.opt_len+=3*(e+1)+5+5+4,e;}(t),s=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=s&&(s=r)):s=r=i+5,i+4<=s&&-1!==e?L(t,e,i,n):4===t.strategy||r===s?(x(t,2+(n?1:0),3),D(t,d,_)):(x(t,4+(n?1:0),3),function(t,e,a,i){var n;for(x(t,e-257,5),x(t,a-1,5),x(t,i-4,4),n=0;n>=7;h>8,t.pending_buf[t.sym_buf+t.sym_next++]=i,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(c[i]+a+1)]++,t.dyn_dtree[2*v(e)]++),t.sym_next===t.sym_end;},_tr_align:function _tr_align(t){x(t,2,3),z(t,256,d),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8);}(t);}};var C=function C(t,e,a,i){var n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0;}while(--r);n%=65521,s%=65521;}return n|s<<16|0;};var M=new Uint32Array(function(){var t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++){t=1&t?3988292384^t>>>1:t>>>1;}e[a]=t;}return e;}());var H=function H(t,e,a,i){var n=M,s=i+a;t^=-1;for(var _a6=i;_a6>>8^n[255&(t^e[_a6])];}return-1^t;},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};var P=B._tr_init,Y=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,it=K.Z_DATA_ERROR,nt=K.Z_BUF_ERROR,st=K.Z_DEFAULT_COMPRESSION,rt=K.Z_FILTERED,ot=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,ht=K.Z_FIXED,dt=K.Z_DEFAULT_STRATEGY,_t=K.Z_UNKNOWN,ft=K.Z_DEFLATED,ct=258,ut=262,wt=42,mt=113,bt=666,gt=function gt(t,e){return t.msg=j[e],e;},pt=function pt(t){return 2*t-(t>4?9:0);},kt=function kt(t){var e=t.length;for(;--e>=0;){t[e]=0;}},vt=function vt(t){var e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0;}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0;}while(--e);};var yt=function yt(t,e,a){return(e<t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0));},zt=function zt(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm);},At=function At(t,e){t.pending_buf[t.pending++]=e;},Et=function Et(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e;},Rt=function Rt(t,e,a,i){var n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=C(t.adler,e,n,a):2===t.state.wrap&&(t.adler=H(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n);},Zt=function Zt(t,e){var a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;var l=t.strstart>t.w_size-ut?t.strstart-(t.w_size-ut):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ct;var c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r];}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead;},Ut=function Ut(t){var e=t.w_size;var a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ut)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),vt(t),i+=e),0===t.strm.avail_in)break;if(a=Rt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=yt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3));){;}}while(t.lookaheadt.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_outi+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a);}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_watern&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(Rt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===V)&&e!==q&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===V&&0===t.strm.avail_in&&a===i?1:0,Y(t,t.block_start,a,r),t.block_start+=a,xt(t.strm)),r?3:1);},Dt=function Dt(t,e){var a,i;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ut&&(t.match_length=Zt(t,a)),t.match_length>=3){if(i=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;}while(0!=--t.match_length);t.strstart++;}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);}else i=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(zt(t,!1),0===t.strm.avail_out))return 1;}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;},Tt=function Tt(t,e){var a,i,n;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(zt(t,!1),0===t.strm.avail_out))return 1;}else if(t.match_available){if(i=X(t,0,t.window[t.strstart-1]),i&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1;}else t.match_available=1,t.strstart++,t.lookahead--;}return t.match_available&&(i=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;};function Ot(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n;}var It=[new Ot(0,0,0,0,St),new Ot(4,4,8,4,Dt),new Ot(4,5,16,8,Dt),new Ot(4,6,32,32,Dt),new Ot(4,4,16,16,Tt),new Ot(8,16,32,32,Tt),new Ot(8,16,128,128,Tt),new Ot(8,32,128,256,Tt),new Ot(32,128,258,1024,Tt),new Ot(32,258,258,4096,Tt)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),kt(this.dyn_ltree),kt(this.dyn_dtree),kt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),kt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),kt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0;}var Lt=function Lt(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==wt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==bt?1:0;},Nt=function Nt(t){if(Lt(t))return gt(t,at);t.total_in=t.total_out=0,t.data_type=_t;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?wt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,P(e),tt;},Bt=function Bt(t){var e=Nt(t);var a;return e===tt&&((a=t.state).window_size=2*a.w_size,kt(a.head),a.max_lazy_match=It[a.level].max_lazy,a.good_match=It[a.level].good_length,a.nice_match=It[a.level].nice_length,a.max_chain_length=It[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e;},Ct=function Ct(t,e,a,i,n,s){if(!t)return at;var r=1;if(e===st&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ft||i<8||i>15||e<0||e>9||s<0||s>ht||8===i&&1!==r)return gt(t,at);8===i&&(i=9);var o=new Ft();return t.state=o,o.strm=t,o.status=wt,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<$||e<0)return t?gt(t,at):at;var a=t.state;if(!t.output||0!==t.avail_in&&!t.input||a.status===bt&&e!==V)return gt(t,0===t.avail_out?nt:at);var i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(xt(t),0===t.avail_out)return a.last_flush=-1,tt;}else if(0===t.avail_in&&pt(e)<=pt(i)&&e!==V)return gt(t,nt);if(a.status===bt&&0!==t.avail_in)return gt(t,nt);if(a.status===wt&&0===a.wrap&&(a.status=mt),a.status===wt){var _e3=ft+(a.w_bits-8<<4)<<8,_i545=-1;if(_i545=a.strategy>=ot||a.level<2?0:a.level<6?1:6===a.level?2:3,_e3|=_i545<<6,0!==a.strstart&&(_e3|=32),_e3+=31-_e3%31,Et(a,_e3),0!==a.strstart&&(Et(a,t.adler>>>16),Et(a,65535&t.adler)),t.adler=1,a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;}if(57===a.status)if(t.adler=0,At(a,31),At(a,139),At(a,8),a.gzhead)At(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),At(a,255&a.gzhead.time),At(a,a.gzhead.time>>8&255),At(a,a.gzhead.time>>16&255),At(a,a.gzhead.time>>24&255),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(At(a,255&a.gzhead.extra.length),At(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=H(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(At(a,0),At(a,0),At(a,0),At(a,0),At(a,0),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,3),a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;if(69===a.status){if(a.gzhead.extra){var _e4=a.pending,_i546=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+_i546>a.pending_buf_size;){var _n3=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+_n3),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>_e4&&(t.adler=H(t.adler,a.pending_buf,a.pending-_e4,_e4)),a.gzindex+=_n3,xt(t),0!==a.pending)return a.last_flush=-1,tt;_e4=0,_i546-=_n3;}var _n2=new Uint8Array(a.gzhead.extra);a.pending_buf.set(_n2.subarray(a.gzindex,a.gzindex+_i546),a.pending),a.pending+=_i546,a.gzhead.hcrc&&a.pending>_e4&&(t.adler=H(t.adler,a.pending_buf,a.pending-_e4,_e4)),a.gzindex=0;}a.status=73;}if(73===a.status){if(a.gzhead.name){var _e5,_i547=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>_i547&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i547,_i547)),xt(t),0!==a.pending)return a.last_flush=-1,tt;_i547=0;}_e5=a.gzindex_i547&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i547,_i547)),a.gzindex=0;}a.status=91;}if(91===a.status){if(a.gzhead.comment){var _e6,_i548=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>_i548&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i548,_i548)),xt(t),0!==a.pending)return a.last_flush=-1,tt;_i548=0;}_e6=a.gzindex_i548&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i548,_i548));}a.status=103;}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(xt(t),0!==a.pending))return a.last_flush=-1,tt;At(a,255&t.adler),At(a,t.adler>>8&255),t.adler=0;}if(a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;}if(0!==t.avail_in||0!==a.lookahead||e!==q&&a.status!==bt){var _i549=0===a.level?St(a,e):a.strategy===ot?function(t,e){var a;for(;;){if(0===t.lookahead&&(Ut(t),0===t.lookahead)){if(e===q)return 1;break;}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1;}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;}(a,e):a.strategy===lt?function(t,e){var a,i,n,s;var r=t.window;for(;;){if(t.lookahead<=ct){if(Ut(t),t.lookahead<=ct&&e===q)return 1;if(0===t.lookahead)break;}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+ct;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead);}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1;}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;}(a,e):It[a.level].func(a,e);if(3!==_i549&&4!==_i549||(a.status=bt),1===_i549||3===_i549)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===_i549&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(kt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt;}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et);},deflateEnd:function deflateEnd(t){if(Lt(t))return at;var e=t.state.status;return t.state=null,e===mt?gt(t,it):tt;},deflateSetDictionary:function deflateSetDictionary(t,e){var a=e.length;if(Lt(t))return at;var i=t.state,n=i.wrap;if(2===n||1===n&&i.status!==wt||i.lookahead)return at;if(1===n&&(t.adler=C(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(kt(i.head),i.strstart=0,i.block_start=0,i.insert=0);var _t2=new Uint8Array(i.w_size);_t2.set(e.subarray(a-i.w_size,a),0),e=_t2,a=i.w_size;}var s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Ut(i);i.lookahead>=3;){var _t3=i.strstart,_e7=i.lookahead-2;do{i.ins_h=yt(i,i.ins_h,i.window[_t3+3-1]),i.prev[_t3&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=_t3,_t3++;}while(--_e7);i.strstart=_t3,i.lookahead=2,Ut(i);}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,tt;},deflateInfo:"pako deflate (from Nodeca project)"};var Ht=function Ht(t,e){return Object.prototype.hasOwnProperty.call(t,e);};var jt=function jt(t){var e=Array.prototype.slice.call(arguments,1);for(;e.length;){var _a7=e.shift();if(_a7){if("object"!=_typeof(_a7))throw new TypeError(_a7+"must be non-object");for(var _e8 in _a7){Ht(_a7,_e8)&&(t[_e8]=_a7[_e8]);}}}return t;},Kt=function Kt(t){var e=0;for(var _a8=0,_i550=t.length;_a8<_i550;_a8++){e+=t[_a8].length;}var a=new Uint8Array(e);for(var _e9=0,_i551=0,_n4=t.length;_e9<_n4;_e9++){var _n5=t[_e9];a.set(_n5,_i551),_i551+=_n5.length;}return a;};var Pt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1));}catch(t){Pt=!1;}var Yt=new Uint8Array(256);for(var _t4=0;_t4<256;_t4++){Yt[_t4]=_t4>=252?6:_t4>=248?5:_t4>=240?4:_t4>=224?3:_t4>=192?2:1;}Yt[254]=Yt[254]=1;var Gt=function Gt(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);var e,a,i,n,s,r=t.length,o=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);}return e;},Xt=function Xt(t,e){var a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));var i,n;var s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=_r6-1;else{for(_e10&=2===_r6?31:3===_r6?15:7;_r6>1&&i1?s[n++]=65533:_e10<65536?s[n++]=_e10:(_e10-=65536,s[n++]=55296|_e10>>10&1023,s[n++]=56320|1023&_e10);}}return function(t,e){if(e<65534&&t.subarray&&Pt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));var a="";for(var _i552=0;_i552t.length&&(e=t.length);var a=e-1;for(;a>=0&&128==(192&t[a]);){a--;}return a<0||0===a?e:a+Yt[t[a]]>e?a:e;};var qt=function qt(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0;};var Jt=Object.prototype.toString,Qt=K.Z_NO_FLUSH,Vt=K.Z_SYNC_FLUSH,$t=K.Z_FULL_FLUSH,te=K.Z_FINISH,ee=K.Z_OK,ae=K.Z_STREAM_END,ie=K.Z_DEFAULT_COMPRESSION,ne=K.Z_DEFAULT_STRATEGY,se=K.Z_DEFLATED;function re(t){this.options=jt({level:ie,method:se,chunkSize:16384,windowBits:15,memLevel:8,strategy:ne},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qt(),this.strm.avail_out=0;var a=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ee)throw new Error(j[a]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var _t5;if(_t5="string"==typeof e.dictionary?Gt(e.dictionary):"[object ArrayBuffer]"===Jt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=Mt.deflateSetDictionary(this.strm,_t5),a!==ee)throw new Error(j[a]);this._dict_set=!0;}}function oe(t,e){var a=new re(e);if(a.push(t,!0),a.err)throw a.msg||j[a.err];return a.result;}re.prototype.push=function(t,e){var a=this.strm,i=this.options.chunkSize;var n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?te:Qt,"string"==typeof t?a.input=Gt(t):"[object ArrayBuffer]"===Jt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===Vt||s===$t)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=Mt.deflate(a,s),n===ae)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=Mt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===ee;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break;}else this.onData(a.output);}}return!0;},re.prototype.onData=function(t){this.chunks.push(t);},re.prototype.onEnd=function(t){t===ee&&(this.result=Kt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;};var le={Deflate:re,deflate:oe,deflateRaw:function deflateRaw(t,e){return(e=e||{}).raw=!0,oe(t,e);},gzip:function gzip(t,e){return(e=e||{}).gzip=!0,oe(t,e);},constants:K};var he=16209;var de=function de(t,e){var a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;var E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<>>=p,c-=p),c<15&&(f+=z[a++]<>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<o){t.msg="invalid distance too far back",E.mode=he;break t;}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=he;break t;}if(y=0,x=_,0===d){if(y+=l-p,p2;){A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;}k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]));}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3;}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]));}break;}}break;}}while(a>3,a-=k,c-=k<<3,f&=(1<=1&&0===E[g];g--){;}if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<_e;w++){R[w+1]=R[w]+E[w];}for(m=0;m852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<>v)+d]=Z<<24|U<<16|S|0;}while(0!==d);for(h=1<>=1;}if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]];}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0;}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0;};var be=K.Z_FINISH,ge=K.Z_BLOCK,pe=K.Z_TREES,ke=K.Z_OK,ve=K.Z_STREAM_END,ye=K.Z_NEED_DICT,xe=K.Z_STREAM_ERROR,ze=K.Z_DATA_ERROR,Ae=K.Z_MEM_ERROR,Ee=K.Z_BUF_ERROR,Re=K.Z_DEFLATED,Ze=16180,Ue=16190,Se=16191,De=16192,Te=16194,Oe=16199,Ie=16200,Fe=16206,Le=16209,Ne=function Ne(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);};function Be(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}var Ce=function Ce(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode16211?1:0;},Me=function Me(t){if(Ce(t))return xe;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ze,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ke;},He=function He(t){if(Ce(t))return xe;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Me(t);},je=function je(t,e){var a;if(Ce(t))return xe;var i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?xe:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,He(t));},Ke=function Ke(t,e){if(!t)return xe;var a=new Be();t.state=a,a.strm=t,a.window=null,a.mode=Ze;var i=je(t,e);return i!==ke&&(t.state=null),i;};var Pe,Ye,Ge=!0;var Xe=function Xe(t){if(Ge){Pe=new Int32Array(512),Ye=new Int32Array(32);var _e11=0;for(;_e11<144;){t.lens[_e11++]=8;}for(;_e11<256;){t.lens[_e11++]=9;}for(;_e11<280;){t.lens[_e11++]=7;}for(;_e11<288;){t.lens[_e11++]=8;}for(me(1,t.lens,0,288,Pe,0,t.work,{bits:9}),_e11=0;_e11<32;){t.lens[_e11++]=5;}me(2,t.lens,0,32,Ye,0,t.work,{bits:5}),Ge=!1;}t.lencode=Pe,t.lenbits=9,t.distcode=Ye,t.distbits=5;},We=function We(t,e,a,i){var n;var s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,a.check=H(a.check,A,2,0),h=0,d=0,a.mode=16181;break;}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=Le;break;}if((15&h)!==Re){t.msg="unknown compression method",a.mode=Le;break;}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=Le;break;}a.dmax=1<>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=H(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=H(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=H(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=H(a.check,A,2,0)),h=0,d=0;}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=H(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y));}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=Se;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=Fe;break;}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Xe(a),a.mode=Oe,e===pe){h>>>=2,d-=2;break t;}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=Le;}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=Le;break;}if(a.length=65535&h,h=0,d=0,a.mode=Te,e===pe)break t;case Te:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break;}a.mode=Se;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Le;break;}a.have=0,a.mode=16197;case 16197:for(;a.have>>=3,d-=3;}for(;a.have<19;){a.lens[Z[a.have++]]=0;}if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=me(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=Le;break;}a.have=0,a.mode=16198;case 16198:for(;a.have>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=Le;break;}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2;}else if(17===g){for(R=m+3;d>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3;}else{for(R=m+7;d>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7;}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Le;break;}for(;c--;){a.lens[a.have++]=y;}}}if(a.mode===Le)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Le;break;}if(a.lenbits=9,E={bits:a.lenbits},x=me(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=Le;break;}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=me(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=Le;break;}if(a.mode=Oe,e===pe)break t;case Oe:a.mode=Ie;case Ie:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,a.mode===Se&&(a.back=-1);break;}for(a.back=0;z=a.lencode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p;}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break;}if(32&b){a.back=-1,a.mode=Se;break;}if(64&b){t.msg="invalid literal/length code",a.mode=Le;break;}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra;}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p;}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=Le;break;}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra;}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Le;break;}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Le;break;}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window;}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++];}while(--c);0===a.length&&(a.mode=Ie);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=Ie;break;case Fe:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qt(),this.strm.avail_out=0;var a=qe.inflateInit2(this.strm,e.windowBits);if(a!==ta)throw new Error(j[a]);if(this.header=new Je(),qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Gt(e.dictionary):"[object ArrayBuffer]"===Qe.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=qe.inflateSetDictionary(this.strm,e.dictionary),a!==ta)))throw new Error(j[a]);}function oa(t,e){var a=new ra(e);if(a.push(t),a.err)throw a.msg||j[a.err];return a.result;}ra.prototype.push=function(t,e){var a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;var s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?$e:Ve,"[object ArrayBuffer]"===Qe.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=qe.inflate(a,r),s===aa&&n&&(s=qe.inflateSetDictionary(a,n),s===ta?s=qe.inflate(a,r):s===na&&(s=aa));a.avail_in>0&&s===ea&&a.state.wrap>0&&0!==t[a.next_in];){qe.inflateReset(a),s=qe.inflate(a,r);}switch(s){case ia:case na:case aa:case sa:return this.onEnd(s),this.ended=!0,!1;}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===ea))if("string"===this.options.to){var _t6=Wt(a.output,a.next_out),_e12=a.next_out-_t6,_n6=Xt(a.output,_t6);a.next_out=_e12,a.avail_out=i-_e12,_e12&&a.output.set(a.output.subarray(_t6,_t6+_e12),0),this.onData(_n6);}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==ta||0!==o){if(s===ea)return s=qe.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break;}}return!0;},ra.prototype.onData=function(t){this.chunks.push(t);},ra.prototype.onEnd=function(t){t===ta&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Kt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;};var la={Inflate:ra,inflate:oa,inflateRaw:function inflateRaw(t,e){return(e=e||{}).raw=!0,oa(t,e);},ungzip:oa,constants:K};var ha=le.Deflate,da=le.deflate,_a=le.deflateRaw,fa=le.gzip,ca=la.Inflate,ua=la.inflate,wa=la.inflateRaw,ma=la.ungzip;var ba=ha,ga=da,pa=_a,ka=fa,va=ca,ya=ua,xa=wa,za=ma,Aa=K,Ea={Deflate:ba,deflate:ga,deflateRaw:pa,gzip:ka,Inflate:va,inflate:ya,inflateRaw:xa,ungzip:za,constants:Aa};t.Deflate=ba,t.Inflate=va,t.constants=Aa,t["default"]=Ea,t.deflate=ga,t.deflateRaw=pa,t.gzip=ka,t.inflate=ya,t.inflateRaw=xa,t.ungzip=za,Object.defineProperty(t,"__esModule",{value:!0});});var p=/*#__PURE__*/Object.freeze({__proto__:null});/* +var isBase64=!!dataUriRegexResult[2];var data=dataUriRegexResult[3];data=window.decodeURIComponent(data);if(isBase64){data=window.atob(data);}try{var buffer=new ArrayBuffer(data.length);var view=new Uint8Array(buffer);for(var i=0;i=0;){t[e]=0;}}var a=256,i=286,n=30,s=15,r=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),o=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),h=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),d=new Array(576);e(d);var _=new Array(60);e(_);var f=new Array(512);e(f);var c=new Array(256);e(c);var u=new Array(29);e(u);var w=new Array(n);function m(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length;}var b,g,p;function k(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e;}e(w);var v=function v(t){return t<256?f[t]:f[256+(t>>>7)];},y=function y(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255;},x=function x(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<>>=1,a<<=1;}while(--e>0);return a>>>1;},E=function E(t,e,a){var i=new Array(16);var n,r,o=0;for(n=1;n<=s;n++){o=o+a[n-1]<<1,i[n]=o;}for(r=0;r<=e;r++){var _e2=t[2*r+1];0!==_e2&&(t[2*r]=A(i[_e2]++,_e2));}},R=function R(t){var e;for(e=0;e8?y(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0;},U=function U(t,e,a,i){var n=2*e,s=2*a;return t[n]>1;o>=1;o--){S(t,a,o);}h=r;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,a,1),l=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=l,a[2*h]=a[2*o]+a[2*l],t.depth[h]=(t.depth[o]>=t.depth[l]?t.depth[o]:t.depth[l])+1,a[2*o+1]=a[2*l+1]=h,t.heap[1]=h++,S(t,a,1);}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,r=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,l=e.stat_desc.extra_base,h=e.stat_desc.max_length;var d,_,f,c,u,w,m=0;for(c=0;c<=s;c++){t.bl_count[c]=0;}for(a[2*t.heap[t.heap_max]+1]=0,d=t.heap_max+1;d<573;d++){_=t.heap[d],c=a[2*a[2*_+1]+1]+1,c>h&&(c=h,m++),a[2*_+1]=c,_>i||(t.bl_count[c]++,u=0,_>=l&&(u=o[_-l]),w=a[2*_],t.opt_len+=w*(c+u),r&&(t.static_len+=w*(n[2*_+1]+u)));}if(0!==m){do{for(c=h-1;0===t.bl_count[c];){c--;}t.bl_count[c]--,t.bl_count[c+1]+=2,t.bl_count[h]--,m-=2;}while(m>0);for(c=h;0!==c;c--){for(_=t.bl_count[c];0!==_;){f=t.heap[--d],f>i||(a[2*f+1]!==c&&(t.opt_len+=(c-a[2*f+1])*a[2*f],a[2*f+1]=c),_--);}}}}(t,e),E(a,d,t.bl_count);},O=function O(t,e,a){var i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++){n=r,r=e[2*(i+1)+1],++o0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,i=4093624447;for(e=0;e<=31;e++,i>>>=1){if(1&i&&0!==t.dyn_ltree[2*e])return 0;}if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e=3&&0===t.bl_tree[2*h[e]+1];e--){;}return t.opt_len+=3*(e+1)+5+5+4,e;}(t),s=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=s&&(s=r)):s=r=i+5,i+4<=s&&-1!==e?L(t,e,i,n):4===t.strategy||r===s?(x(t,2+(n?1:0),3),D(t,d,_)):(x(t,4+(n?1:0),3),function(t,e,a,i){var n;for(x(t,e-257,5),x(t,a-1,5),x(t,i-4,4),n=0;n>=7;h>8,t.pending_buf[t.sym_buf+t.sym_next++]=i,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(c[i]+a+1)]++,t.dyn_dtree[2*v(e)]++),t.sym_next===t.sym_end;},_tr_align:function _tr_align(t){x(t,2,3),z(t,256,d),function(t){16===t.bi_valid?(y(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8);}(t);}};var C=function C(t,e,a,i){var n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0;}while(--r);n%=65521,s%=65521;}return n|s<<16|0;};var M=new Uint32Array(function(){var t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++){t=1&t?3988292384^t>>>1:t>>>1;}e[a]=t;}return e;}());var H=function H(t,e,a,i){var n=M,s=i+a;t^=-1;for(var _a6=i;_a6>>8^n[255&(t^e[_a6])];}return-1^t;},j={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};var P=B._tr_init,Y=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,it=K.Z_DATA_ERROR,nt=K.Z_BUF_ERROR,st=K.Z_DEFAULT_COMPRESSION,rt=K.Z_FILTERED,ot=K.Z_HUFFMAN_ONLY,lt=K.Z_RLE,ht=K.Z_FIXED,dt=K.Z_DEFAULT_STRATEGY,_t=K.Z_UNKNOWN,ft=K.Z_DEFLATED,ct=258,ut=262,wt=42,mt=113,bt=666,gt=function gt(t,e){return t.msg=j[e],e;},pt=function pt(t){return 2*t-(t>4?9:0);},kt=function kt(t){var e=t.length;for(;--e>=0;){t[e]=0;}},vt=function vt(t){var e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0;}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0;}while(--e);};var yt=function yt(t,e,a){return(e<t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0));},zt=function zt(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,xt(t.strm);},At=function At(t,e){t.pending_buf[t.pending++]=e;},Et=function Et(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e;},Rt=function Rt(t,e,a,i){var n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=C(t.adler,e,n,a):2===t.state.wrap&&(t.adler=H(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n);},Zt=function Zt(t,e){var a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;var l=t.strstart>t.w_size-ut?t.strstart-(t.w_size-ut):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+ct;var c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&sr){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r];}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead;},Ut=function Ut(t){var e=t.w_size;var a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-ut)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),vt(t),i+=e),0===t.strm.avail_in)break;if(a=Rt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=yt(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3));){;}}while(t.lookaheadt.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_outi+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,xt(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(Rt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a);}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_watern&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(Rt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===V)&&e!==q&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===V&&0===t.strm.avail_in&&a===i?1:0,Y(t,t.block_start,a,r),t.block_start+=a,xt(t.strm)),r?3:1);},Dt=function Dt(t,e){var a,i;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ut&&(t.match_length=Zt(t,a)),t.match_length>=3){if(i=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;}while(0!=--t.match_length);t.strstart++;}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);}else i=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(zt(t,!1),0===t.strm.avail_out))return 1;}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;},Tt=function Tt(t,e){var a,i,n;for(;;){if(t.lookahead=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(zt(t,!1),0===t.strm.avail_out))return 1;}else if(t.match_available){if(i=X(t,0,t.window[t.strstart-1]),i&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1;}else t.match_available=1,t.strstart++,t.lookahead--;}return t.match_available&&(i=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;};function Ot(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n;}var It=[new Ot(0,0,0,0,St),new Ot(4,4,8,4,Dt),new Ot(4,5,16,8,Dt),new Ot(4,6,32,32,Dt),new Ot(4,4,16,16,Tt),new Ot(8,16,32,32,Tt),new Ot(8,16,128,128,Tt),new Ot(8,32,128,256,Tt),new Ot(32,128,258,1024,Tt),new Ot(32,258,258,4096,Tt)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ft,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),kt(this.dyn_ltree),kt(this.dyn_dtree),kt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),kt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),kt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0;}var Lt=function Lt(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.status!==wt&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==mt&&e.status!==bt?1:0;},Nt=function Nt(t){if(Lt(t))return gt(t,at);t.total_in=t.total_out=0,t.data_type=_t;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?wt:mt,t.adler=2===e.wrap?0:1,e.last_flush=-2,P(e),tt;},Bt=function Bt(t){var e=Nt(t);var a;return e===tt&&((a=t.state).window_size=2*a.w_size,kt(a.head),a.max_lazy_match=It[a.level].max_lazy,a.good_match=It[a.level].good_length,a.nice_match=It[a.level].nice_length,a.max_chain_length=It[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e;},Ct=function Ct(t,e,a,i,n,s){if(!t)return at;var r=1;if(e===st&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ft||i<8||i>15||e<0||e>9||s<0||s>ht||8===i&&1!==r)return gt(t,at);8===i&&(i=9);var o=new Ft();return t.state=o,o.strm=t,o.status=wt,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<$||e<0)return t?gt(t,at):at;var a=t.state;if(!t.output||0!==t.avail_in&&!t.input||a.status===bt&&e!==V)return gt(t,0===t.avail_out?nt:at);var i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(xt(t),0===t.avail_out)return a.last_flush=-1,tt;}else if(0===t.avail_in&&pt(e)<=pt(i)&&e!==V)return gt(t,nt);if(a.status===bt&&0!==t.avail_in)return gt(t,nt);if(a.status===wt&&0===a.wrap&&(a.status=mt),a.status===wt){var _e3=ft+(a.w_bits-8<<4)<<8,_i546=-1;if(_i546=a.strategy>=ot||a.level<2?0:a.level<6?1:6===a.level?2:3,_e3|=_i546<<6,0!==a.strstart&&(_e3|=32),_e3+=31-_e3%31,Et(a,_e3),0!==a.strstart&&(Et(a,t.adler>>>16),Et(a,65535&t.adler)),t.adler=1,a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;}if(57===a.status)if(t.adler=0,At(a,31),At(a,139),At(a,8),a.gzhead)At(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),At(a,255&a.gzhead.time),At(a,a.gzhead.time>>8&255),At(a,a.gzhead.time>>16&255),At(a,a.gzhead.time>>24&255),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(At(a,255&a.gzhead.extra.length),At(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=H(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(At(a,0),At(a,0),At(a,0),At(a,0),At(a,0),At(a,9===a.level?2:a.strategy>=ot||a.level<2?4:0),At(a,3),a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;if(69===a.status){if(a.gzhead.extra){var _e4=a.pending,_i547=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+_i547>a.pending_buf_size;){var _n3=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+_n3),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>_e4&&(t.adler=H(t.adler,a.pending_buf,a.pending-_e4,_e4)),a.gzindex+=_n3,xt(t),0!==a.pending)return a.last_flush=-1,tt;_e4=0,_i547-=_n3;}var _n2=new Uint8Array(a.gzhead.extra);a.pending_buf.set(_n2.subarray(a.gzindex,a.gzindex+_i547),a.pending),a.pending+=_i547,a.gzhead.hcrc&&a.pending>_e4&&(t.adler=H(t.adler,a.pending_buf,a.pending-_e4,_e4)),a.gzindex=0;}a.status=73;}if(73===a.status){if(a.gzhead.name){var _e5,_i548=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>_i548&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i548,_i548)),xt(t),0!==a.pending)return a.last_flush=-1,tt;_i548=0;}_e5=a.gzindex_i548&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i548,_i548)),a.gzindex=0;}a.status=91;}if(91===a.status){if(a.gzhead.comment){var _e6,_i549=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>_i549&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i549,_i549)),xt(t),0!==a.pending)return a.last_flush=-1,tt;_i549=0;}_e6=a.gzindex_i549&&(t.adler=H(t.adler,a.pending_buf,a.pending-_i549,_i549));}a.status=103;}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(xt(t),0!==a.pending))return a.last_flush=-1,tt;At(a,255&t.adler),At(a,t.adler>>8&255),t.adler=0;}if(a.status=mt,xt(t),0!==a.pending)return a.last_flush=-1,tt;}if(0!==t.avail_in||0!==a.lookahead||e!==q&&a.status!==bt){var _i550=0===a.level?St(a,e):a.strategy===ot?function(t,e){var a;for(;;){if(0===t.lookahead&&(Ut(t),0===t.lookahead)){if(e===q)return 1;break;}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1;}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;}(a,e):a.strategy===lt?function(t,e){var a,i,n,s;var r=t.window;for(;;){if(t.lookahead<=ct){if(Ut(t),t.lookahead<=ct&&e===q)return 1;if(0===t.lookahead)break;}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+ct;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&nt.lookahead&&(t.match_length=t.lookahead);}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1;}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(zt(t,!1),0===t.strm.avail_out)?1:2;}(a,e):It[a.level].func(a,e);if(3!==_i550&&4!==_i550||(a.status=bt),1===_i550||3===_i550)return 0===t.avail_out&&(a.last_flush=-1),tt;if(2===_i550&&(e===J?W(a):e!==$&&(Y(a,0,0,!1),e===Q&&(kt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),xt(t),0===t.avail_out))return a.last_flush=-1,tt;}return e!==V?tt:a.wrap<=0?et:(2===a.wrap?(At(a,255&t.adler),At(a,t.adler>>8&255),At(a,t.adler>>16&255),At(a,t.adler>>24&255),At(a,255&t.total_in),At(a,t.total_in>>8&255),At(a,t.total_in>>16&255),At(a,t.total_in>>24&255)):(Et(a,t.adler>>>16),Et(a,65535&t.adler)),xt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?tt:et);},deflateEnd:function deflateEnd(t){if(Lt(t))return at;var e=t.state.status;return t.state=null,e===mt?gt(t,it):tt;},deflateSetDictionary:function deflateSetDictionary(t,e){var a=e.length;if(Lt(t))return at;var i=t.state,n=i.wrap;if(2===n||1===n&&i.status!==wt||i.lookahead)return at;if(1===n&&(t.adler=C(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(kt(i.head),i.strstart=0,i.block_start=0,i.insert=0);var _t2=new Uint8Array(i.w_size);_t2.set(e.subarray(a-i.w_size,a),0),e=_t2,a=i.w_size;}var s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Ut(i);i.lookahead>=3;){var _t3=i.strstart,_e7=i.lookahead-2;do{i.ins_h=yt(i,i.ins_h,i.window[_t3+3-1]),i.prev[_t3&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=_t3,_t3++;}while(--_e7);i.strstart=_t3,i.lookahead=2,Ut(i);}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,tt;},deflateInfo:"pako deflate (from Nodeca project)"};var Ht=function Ht(t,e){return Object.prototype.hasOwnProperty.call(t,e);};var jt=function jt(t){var e=Array.prototype.slice.call(arguments,1);for(;e.length;){var _a7=e.shift();if(_a7){if("object"!=_typeof(_a7))throw new TypeError(_a7+"must be non-object");for(var _e8 in _a7){Ht(_a7,_e8)&&(t[_e8]=_a7[_e8]);}}}return t;},Kt=function Kt(t){var e=0;for(var _a8=0,_i551=t.length;_a8<_i551;_a8++){e+=t[_a8].length;}var a=new Uint8Array(e);for(var _e9=0,_i552=0,_n4=t.length;_e9<_n4;_e9++){var _n5=t[_e9];a.set(_n5,_i552),_i552+=_n5.length;}return a;};var Pt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1));}catch(t){Pt=!1;}var Yt=new Uint8Array(256);for(var _t4=0;_t4<256;_t4++){Yt[_t4]=_t4>=252?6:_t4>=248?5:_t4>=240?4:_t4>=224?3:_t4>=192?2:1;}Yt[254]=Yt[254]=1;var Gt=function Gt(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);var e,a,i,n,s,r=t.length,o=0;for(n=0;n>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);}return e;},Xt=function Xt(t,e){var a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));var i,n;var s=new Array(2*a);for(n=0,i=0;i4)s[n++]=65533,i+=_r6-1;else{for(_e10&=2===_r6?31:3===_r6?15:7;_r6>1&&i1?s[n++]=65533:_e10<65536?s[n++]=_e10:(_e10-=65536,s[n++]=55296|_e10>>10&1023,s[n++]=56320|1023&_e10);}}return function(t,e){if(e<65534&&t.subarray&&Pt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));var a="";for(var _i553=0;_i553t.length&&(e=t.length);var a=e-1;for(;a>=0&&128==(192&t[a]);){a--;}return a<0||0===a?e:a+Yt[t[a]]>e?a:e;};var qt=function qt(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0;};var Jt=Object.prototype.toString,Qt=K.Z_NO_FLUSH,Vt=K.Z_SYNC_FLUSH,$t=K.Z_FULL_FLUSH,te=K.Z_FINISH,ee=K.Z_OK,ae=K.Z_STREAM_END,ie=K.Z_DEFAULT_COMPRESSION,ne=K.Z_DEFAULT_STRATEGY,se=K.Z_DEFLATED;function re(t){this.options=jt({level:ie,method:se,chunkSize:16384,windowBits:15,memLevel:8,strategy:ne},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qt(),this.strm.avail_out=0;var a=Mt.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==ee)throw new Error(j[a]);if(e.header&&Mt.deflateSetHeader(this.strm,e.header),e.dictionary){var _t5;if(_t5="string"==typeof e.dictionary?Gt(e.dictionary):"[object ArrayBuffer]"===Jt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=Mt.deflateSetDictionary(this.strm,_t5),a!==ee)throw new Error(j[a]);this._dict_set=!0;}}function oe(t,e){var a=new re(e);if(a.push(t,!0),a.err)throw a.msg||j[a.err];return a.result;}re.prototype.push=function(t,e){var a=this.strm,i=this.options.chunkSize;var n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?te:Qt,"string"==typeof t?a.input=Gt(t):"[object ArrayBuffer]"===Jt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===Vt||s===$t)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=Mt.deflate(a,s),n===ae)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=Mt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===ee;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break;}else this.onData(a.output);}}return!0;},re.prototype.onData=function(t){this.chunks.push(t);},re.prototype.onEnd=function(t){t===ee&&(this.result=Kt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;};var le={Deflate:re,deflate:oe,deflateRaw:function deflateRaw(t,e){return(e=e||{}).raw=!0,oe(t,e);},gzip:function gzip(t,e){return(e=e||{}).gzip=!0,oe(t,e);},constants:K};var he=16209;var de=function de(t,e){var a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;var E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<>>=p,c-=p),c<15&&(f+=z[a++]<>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<o){t.msg="invalid distance too far back",E.mode=he;break t;}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=he;break t;}if(y=0,x=_,0===d){if(y+=l-p,p2;){A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;}k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]));}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3;}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]));}break;}}break;}}while(a>3,a-=k,c-=k<<3,f&=(1<=1&&0===E[g];g--){;}if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<_e;w++){R[w+1]=R[w]+E[w];}for(m=0;m852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<>v)+d]=Z<<24|U<<16|S|0;}while(0!==d);for(h=1<>=1;}if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]];}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0;}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0;};var be=K.Z_FINISH,ge=K.Z_BLOCK,pe=K.Z_TREES,ke=K.Z_OK,ve=K.Z_STREAM_END,ye=K.Z_NEED_DICT,xe=K.Z_STREAM_ERROR,ze=K.Z_DATA_ERROR,Ae=K.Z_MEM_ERROR,Ee=K.Z_BUF_ERROR,Re=K.Z_DEFLATED,Ze=16180,Ue=16190,Se=16191,De=16192,Te=16194,Oe=16199,Ie=16200,Fe=16206,Le=16209,Ne=function Ne(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);};function Be(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0;}var Ce=function Ce(t){if(!t)return 1;var e=t.state;return!e||e.strm!==t||e.mode16211?1:0;},Me=function Me(t){if(Ce(t))return xe;var e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=Ze,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,ke;},He=function He(t){if(Ce(t))return xe;var e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,Me(t);},je=function je(t,e){var a;if(Ce(t))return xe;var i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?xe:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,He(t));},Ke=function Ke(t,e){if(!t)return xe;var a=new Be();t.state=a,a.strm=t,a.window=null,a.mode=Ze;var i=je(t,e);return i!==ke&&(t.state=null),i;};var Pe,Ye,Ge=!0;var Xe=function Xe(t){if(Ge){Pe=new Int32Array(512),Ye=new Int32Array(32);var _e11=0;for(;_e11<144;){t.lens[_e11++]=8;}for(;_e11<256;){t.lens[_e11++]=9;}for(;_e11<280;){t.lens[_e11++]=7;}for(;_e11<288;){t.lens[_e11++]=8;}for(me(1,t.lens,0,288,Pe,0,t.work,{bits:9}),_e11=0;_e11<32;){t.lens[_e11++]=5;}me(2,t.lens,0,32,Ye,0,t.work,{bits:5}),Ge=!1;}t.lencode=Pe,t.lenbits=9,t.distcode=Ye,t.distbits=5;},We=function We(t,e,a,i){var n;var s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,a.check=H(a.check,A,2,0),h=0,d=0,a.mode=16181;break;}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=Le;break;}if((15&h)!==Re){t.msg="unknown compression method",a.mode=Le;break;}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=Le;break;}a.dmax=1<>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=H(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=H(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=H(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<>>8&255,a.check=H(a.check,A,2,0)),h=0,d=0;}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=H(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y));}while(y&&c>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=Se;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<>>=7&d,d-=7&d,a.mode=Fe;break;}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Xe(a),a.mode=Oe,e===pe){h>>>=2,d-=2;break t;}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=Le;}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<>>16^65535)){t.msg="invalid stored block lengths",a.mode=Le;break;}if(a.length=65535&h,h=0,d=0,a.mode=Te,e===pe)break t;case Te:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break;}a.mode=Se;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=Le;break;}a.have=0,a.mode=16197;case 16197:for(;a.have>>=3,d-=3;}for(;a.have<19;){a.lens[Z[a.have++]]=0;}if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=me(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=Le;break;}a.have=0,a.mode=16198;case 16198:for(;a.have>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=Le;break;}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2;}else if(17===g){for(R=m+3;d>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3;}else{for(R=m+7;d>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7;}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=Le;break;}for(;c--;){a.lens[a.have++]=y;}}}if(a.mode===Le)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=Le;break;}if(a.lenbits=9,E={bits:a.lenbits},x=me(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=Le;break;}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=me(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=Le;break;}if(a.mode=Oe,e===pe)break t;case Oe:a.mode=Ie;case Ie:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,a.mode===Se&&(a.back=-1);break;}for(a.back=0;z=a.lencode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p;}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break;}if(32&b){a.back=-1,a.mode=Se;break;}if(64&b){t.msg="invalid literal/length code",a.mode=Le;break;}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra;}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<>>=p,d-=p,a.back+=p;}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=Le;break;}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d>>=a.extra,d-=a.extra,a.back+=a.extra;}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=Le;break;}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=Le;break;}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window;}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++];}while(--c);0===a.length&&(a.mode=Ie);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=Ie;break;case Fe:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new qt(),this.strm.avail_out=0;var a=qe.inflateInit2(this.strm,e.windowBits);if(a!==ta)throw new Error(j[a]);if(this.header=new Je(),qe.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Gt(e.dictionary):"[object ArrayBuffer]"===Qe.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=qe.inflateSetDictionary(this.strm,e.dictionary),a!==ta)))throw new Error(j[a]);}function oa(t,e){var a=new ra(e);if(a.push(t),a.err)throw a.msg||j[a.err];return a.result;}ra.prototype.push=function(t,e){var a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;var s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?$e:Ve,"[object ArrayBuffer]"===Qe.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=qe.inflate(a,r),s===aa&&n&&(s=qe.inflateSetDictionary(a,n),s===ta?s=qe.inflate(a,r):s===na&&(s=aa));a.avail_in>0&&s===ea&&a.state.wrap>0&&0!==t[a.next_in];){qe.inflateReset(a),s=qe.inflate(a,r);}switch(s){case ia:case na:case aa:case sa:return this.onEnd(s),this.ended=!0,!1;}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===ea))if("string"===this.options.to){var _t6=Wt(a.output,a.next_out),_e12=a.next_out-_t6,_n6=Xt(a.output,_t6);a.next_out=_e12,a.avail_out=i-_e12,_e12&&a.output.set(a.output.subarray(_t6,_t6+_e12),0),this.onData(_n6);}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==ta||0!==o){if(s===ea)return s=qe.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break;}}return!0;},ra.prototype.onData=function(t){this.chunks.push(t);},ra.prototype.onEnd=function(t){t===ta&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Kt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg;};var la={Inflate:ra,inflate:oa,inflateRaw:function inflateRaw(t,e){return(e=e||{}).raw=!0,oa(t,e);},ungzip:oa,constants:K};var ha=le.Deflate,da=le.deflate,_a=le.deflateRaw,fa=le.gzip,ca=la.Inflate,ua=la.inflate,wa=la.inflateRaw,ma=la.ungzip;var ba=ha,ga=da,pa=_a,ka=fa,va=ca,ya=ua,xa=wa,za=ma,Aa=K,Ea={Deflate:ba,deflate:ga,deflateRaw:pa,gzip:ka,Inflate:va,inflate:ya,inflateRaw:xa,ungzip:za,constants:Aa};t.Deflate=ba,t.Inflate=va,t.constants=Aa,t["default"]=Ea,t.deflate=ga,t.deflateRaw=pa,t.gzip=ka,t.inflate=ya,t.inflateRaw=xa,t.ungzip=za,Object.defineProperty(t,"__esModule",{value:!0});});var p=/*#__PURE__*/Object.freeze({__proto__:null});/* Parser for .XKT Format V1 @@ -26788,7 +26792,7 @@ var isBase64=!!dataUriRegexResult[2];var data=dataUriRegexResult[3];data=window. DEPRECATED */var pako$9=window.pako||p;if(!pako$9.inflate){// See https://github.com/nodeca/pako/issues/97 -pako$9=pako$9["default"];}var decompressColor$9=function(){var color2=new Float32Array(3);return function(color){color2[0]=color[0]/255.0;color2[1]=color[1]/255.0;color2[2]=color[2]/255.0;return color2;};}();function extract$9(elements){return{positions:elements[0],normals:elements[1],indices:elements[2],edgeIndices:elements[3],meshPositions:elements[4],meshIndices:elements[5],meshEdgesIndices:elements[6],meshColors:elements[7],entityIDs:elements[8],entityMeshes:elements[9],entityIsObjects:elements[10],positionsDecodeMatrix:elements[11]};}function inflate$9(deflatedData){return{positions:new Uint16Array(pako$9.inflate(deflatedData.positions).buffer),normals:new Int8Array(pako$9.inflate(deflatedData.normals).buffer),indices:new Uint32Array(pako$9.inflate(deflatedData.indices).buffer),edgeIndices:new Uint32Array(pako$9.inflate(deflatedData.edgeIndices).buffer),meshPositions:new Uint32Array(pako$9.inflate(deflatedData.meshPositions).buffer),meshIndices:new Uint32Array(pako$9.inflate(deflatedData.meshIndices).buffer),meshEdgesIndices:new Uint32Array(pako$9.inflate(deflatedData.meshEdgesIndices).buffer),meshColors:new Uint8Array(pako$9.inflate(deflatedData.meshColors).buffer),entityIDs:pako$9.inflate(deflatedData.entityIDs,{to:'string'}),entityMeshes:new Uint32Array(pako$9.inflate(deflatedData.entityMeshes).buffer),entityIsObjects:new Uint8Array(pako$9.inflate(deflatedData.entityIsObjects).buffer),positionsDecodeMatrix:new Float32Array(pako$9.inflate(deflatedData.positionsDecodeMatrix).buffer)};}function load$9(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx){manifestCtx.getNextId();sceneModel.positionsCompression="precompressed";sceneModel.normalsCompression="precompressed";var positions=inflatedData.positions;var normals=inflatedData.normals;var indices=inflatedData.indices;var edgeIndices=inflatedData.edgeIndices;var meshPositions=inflatedData.meshPositions;var meshIndices=inflatedData.meshIndices;var meshEdgesIndices=inflatedData.meshEdgesIndices;var meshColors=inflatedData.meshColors;var entityIDs=JSON.parse(inflatedData.entityIDs);var entityMeshes=inflatedData.entityMeshes;var entityIsObjects=inflatedData.entityIsObjects;var numMeshes=meshPositions.length;var numEntities=entityMeshes.length;for(var _i553=0;_i5531;var atLastGeometry=_geometryIndex2===numGeometries-1;var meshColor=decompressColor$2(eachMeshMaterial.subarray(_meshIndex2*6,_meshIndex2*6+3));var meshOpacity=eachMeshMaterial[_meshIndex2*6+3]/255.0;var meshMetallic=eachMeshMaterial[_meshIndex2*6+4]/255.0;var meshRoughness=eachMeshMaterial[_meshIndex2*6+5]/255.0;var meshId=manifestCtx.getNextId();if(isReusedGeometry){// Create mesh for multi-use geometry - create (or reuse) geometry, create mesh using that geometry var meshMatrixIndex=eachMeshMatricesPortion[_meshIndex2];var meshMatrix=matrices.slice(meshMatrixIndex,meshMatrixIndex+16);var geometryId="".concat(modelPartId,"-geometry.").concat(tileIndex,".").concat(_geometryIndex2);// These IDs are local to the SceneModel -var geometryArrays=geometryArraysCache[geometryId];if(!geometryArrays){geometryArrays={batchThisMesh:!options.reuseGeometries};var primitiveType=eachGeometryPrimitiveType[_geometryIndex2];var geometryValid=false;switch(primitiveType){case 0:geometryArrays.primitiveName="solid";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex2],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex2+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex2],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex2+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 1:geometryArrays.primitiveName="surface";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex2],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex2+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex2],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex2+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 2:geometryArrays.primitiveName="points";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryColors=convertColorsRGBToRGBA(colors.subarray(eachGeometryColorsPortion[_geometryIndex2],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex2+1]));geometryValid=geometryArrays.geometryPositions.length>0;break;case 3:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;default:continue;}if(!geometryValid){geometryArrays=null;}if(geometryArrays){if(geometryArrays.geometryPositions.length>1000);if(geometryArrays.batchThisMesh){geometryArrays.decompressedPositions=new Float32Array(geometryArrays.geometryPositions.length);var geometryPositions=geometryArrays.geometryPositions;var decompressedPositions=geometryArrays.decompressedPositions;for(var _i558=0,len=geometryPositions.length;_i5580&&geometryIndices.length>0;break;case 1:primitiveName="surface";_geometryPositions2=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex2],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex2+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex2],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex2+1]);_geometryValid=_geometryPositions2.length>0&&geometryIndices.length>0;break;case 2:primitiveName="points";_geometryPositions2=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryColors=convertColorsRGBToRGBA(colors.subarray(eachGeometryColorsPortion[_geometryIndex2],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex2+1]));_geometryValid=_geometryPositions2.length>0;break;case 3:primitiveName="lines";_geometryPositions2=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);_geometryValid=_geometryPositions2.length>0&&geometryIndices.length>0;break;default:continue;}if(_geometryValid){sceneModel.createMesh(utils.apply(meshDefaults,{id:meshId,origin:tileCenter,primitive:primitiveName,positionsCompressed:_geometryPositions2,normalsCompressed:geometryNormals,colorsCompressed:geometryColors,indices:geometryIndices,edgeIndices:geometryEdgeIndices,positionsDecodeMatrix:tileDecodeMatrix,color:meshColor,metallic:meshMetallic,roughness:meshRoughness,opacity:meshOpacity}));meshIds.push(meshId);}}}if(meshIds.length>0){sceneModel.createEntity(utils.apply(entityDefaults,{id:entityId,isObject:true,meshIds:meshIds}));}}}}/** @private */var ParserV8={version:8,parse:function parse(viewer,options,elements,sceneModel,metaModel,manifestCtx){var deflatedData=extract$2(elements);var inflatedData=inflate$2(deflatedData);load$2(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx);}};/* +var geometryArrays=geometryArraysCache[geometryId];if(!geometryArrays){geometryArrays={batchThisMesh:!options.reuseGeometries};var primitiveType=eachGeometryPrimitiveType[_geometryIndex2];var geometryValid=false;switch(primitiveType){case 0:geometryArrays.primitiveName="solid";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex2],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex2+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex2],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex2+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 1:geometryArrays.primitiveName="surface";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex2],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex2+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex2],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex2+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 2:geometryArrays.primitiveName="points";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryColors=convertColorsRGBToRGBA(colors.subarray(eachGeometryColorsPortion[_geometryIndex2],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex2+1]));geometryValid=geometryArrays.geometryPositions.length>0;break;case 3:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;default:continue;}if(!geometryValid){geometryArrays=null;}if(geometryArrays){if(geometryArrays.geometryPositions.length>1000);if(geometryArrays.batchThisMesh){geometryArrays.decompressedPositions=new Float32Array(geometryArrays.geometryPositions.length);var geometryPositions=geometryArrays.geometryPositions;var decompressedPositions=geometryArrays.decompressedPositions;for(var _i559=0,len=geometryPositions.length;_i5590&&geometryIndices.length>0;break;case 1:primitiveName="surface";_geometryPositions2=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex2],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex2+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex2],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex2+1]);_geometryValid=_geometryPositions2.length>0&&geometryIndices.length>0;break;case 2:primitiveName="points";_geometryPositions2=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryColors=convertColorsRGBToRGBA(colors.subarray(eachGeometryColorsPortion[_geometryIndex2],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex2+1]));_geometryValid=_geometryPositions2.length>0;break;case 3:primitiveName="lines";_geometryPositions2=positions.subarray(eachGeometryPositionsPortion[_geometryIndex2],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex2+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex2],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex2+1]);_geometryValid=_geometryPositions2.length>0&&geometryIndices.length>0;break;default:continue;}if(_geometryValid){sceneModel.createMesh(utils.apply(meshDefaults,{id:meshId,origin:tileCenter,primitive:primitiveName,positionsCompressed:_geometryPositions2,normalsCompressed:geometryNormals,colorsCompressed:geometryColors,indices:geometryIndices,edgeIndices:geometryEdgeIndices,positionsDecodeMatrix:tileDecodeMatrix,color:meshColor,metallic:meshMetallic,roughness:meshRoughness,opacity:meshOpacity}));meshIds.push(meshId);}}}if(meshIds.length>0){sceneModel.createEntity(utils.apply(entityDefaults,{id:entityId,isObject:true,meshIds:meshIds}));}}}}/** @private */var ParserV8={version:8,parse:function parse(viewer,options,elements,sceneModel,metaModel,manifestCtx){var deflatedData=extract$2(elements);var inflatedData=inflate$2(deflatedData);load$2(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx);}};/* Parser for .XKT Format V9 @@ -26922,7 +26926,7 @@ if(options.excludeTypesMap&&metaObject.type&&options.excludeTypesMap[metaObject. var props=options.objectDefaults?options.objectDefaults[metaObject.type]||options.objectDefaults["DEFAULT"]:null;if(props){if(props.visible===false){entityDefaults.visible=false;}if(props.pickable===false){entityDefaults.pickable=false;}if(props.colorize){meshDefaults.color=props.colorize;}if(props.opacity!==undefined&&props.opacity!==null){meshDefaults.opacity=props.opacity;}if(props.metallic!==undefined&&props.metallic!==null){meshDefaults.metallic=props.metallic;}if(props.roughness!==undefined&&props.roughness!==null){meshDefaults.roughness=props.roughness;}}}else{if(options.excludeUnclassifiedObjects){continue;}}// Iterate each entity's meshes for(var _meshIndex3=firstMeshIndex;_meshIndex3<=lastMeshIndex;_meshIndex3++){var _geometryIndex3=eachMeshGeometriesPortion[_meshIndex3];var geometryReuseCount=geometryReuseCounts[_geometryIndex3];var isReusedGeometry=geometryReuseCount>1;var atLastGeometry=_geometryIndex3===numGeometries-1;var meshColor=decompressColor$1(eachMeshMaterial.subarray(_meshIndex3*6,_meshIndex3*6+3));var meshOpacity=eachMeshMaterial[_meshIndex3*6+3]/255.0;var meshMetallic=eachMeshMaterial[_meshIndex3*6+4]/255.0;var meshRoughness=eachMeshMaterial[_meshIndex3*6+5]/255.0;var meshId=manifestCtx.getNextId();if(isReusedGeometry){// Create mesh for multi-use geometry - create (or reuse) geometry, create mesh using that geometry var meshMatrixIndex=eachMeshMatricesPortion[_meshIndex3];var meshMatrix=matrices.slice(meshMatrixIndex,meshMatrixIndex+16);var geometryId="".concat(modelPartId,"-geometry.").concat(tileIndex,".").concat(_geometryIndex3);// These IDs are local to the SceneModel -var geometryArrays=geometryArraysCache[geometryId];if(!geometryArrays){geometryArrays={batchThisMesh:!options.reuseGeometries};var primitiveType=eachGeometryPrimitiveType[_geometryIndex3];var geometryValid=false;switch(primitiveType){case 0:geometryArrays.primitiveName="solid";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex3],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex3+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex3],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 1:geometryArrays.primitiveName="surface";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex3],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex3+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex3],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 2:geometryArrays.primitiveName="points";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex3],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0;break;case 3:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;default:continue;}if(!geometryValid){geometryArrays=null;}if(geometryArrays){if(geometryArrays.geometryPositions.length>1000);if(geometryArrays.batchThisMesh){geometryArrays.decompressedPositions=new Float32Array(geometryArrays.geometryPositions.length);geometryArrays.transformedAndRecompressedPositions=new Uint16Array(geometryArrays.geometryPositions.length);var geometryPositions=geometryArrays.geometryPositions;var decompressedPositions=geometryArrays.decompressedPositions;for(var _i560=0,len=geometryPositions.length;_i5600&&geometryIndices.length>0;break;case 1:primitiveName="surface";_geometryPositions3=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex3],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex3+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex3],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex3+1]);_geometryValid2=_geometryPositions3.length>0&&geometryIndices.length>0;break;case 2:primitiveName="points";_geometryPositions3=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex3],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex3+1]);_geometryValid2=_geometryPositions3.length>0;break;case 3:primitiveName="lines";_geometryPositions3=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);_geometryValid2=_geometryPositions3.length>0&&geometryIndices.length>0;break;default:continue;}if(_geometryValid2){sceneModel.createMesh(utils.apply(meshDefaults,{id:meshId,origin:tileCenter,primitive:primitiveName,positionsCompressed:_geometryPositions3,normalsCompressed:geometryNormals,colorsCompressed:geometryColors,indices:geometryIndices,edgeIndices:geometryEdgeIndices,positionsDecodeMatrix:tileDecodeMatrix,color:meshColor,metallic:meshMetallic,roughness:meshRoughness,opacity:meshOpacity}));meshIds.push(meshId);}}}if(meshIds.length>0){sceneModel.createEntity(utils.apply(entityDefaults,{id:entityId,isObject:true,meshIds:meshIds}));}}}}/** @private */var ParserV9={version:9,parse:function parse(viewer,options,elements,sceneModel,metaModel,manifestCtx){var deflatedData=extract$1(elements);var inflatedData=inflate$1(deflatedData);load$1(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx);}};/* +var geometryArrays=geometryArraysCache[geometryId];if(!geometryArrays){geometryArrays={batchThisMesh:!options.reuseGeometries};var primitiveType=eachGeometryPrimitiveType[_geometryIndex3];var geometryValid=false;switch(primitiveType){case 0:geometryArrays.primitiveName="solid";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex3],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex3+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex3],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 1:geometryArrays.primitiveName="surface";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex3],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex3+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex3],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 2:geometryArrays.primitiveName="points";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex3],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0;break;case 3:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;default:continue;}if(!geometryValid){geometryArrays=null;}if(geometryArrays){if(geometryArrays.geometryPositions.length>1000);if(geometryArrays.batchThisMesh){geometryArrays.decompressedPositions=new Float32Array(geometryArrays.geometryPositions.length);geometryArrays.transformedAndRecompressedPositions=new Uint16Array(geometryArrays.geometryPositions.length);var geometryPositions=geometryArrays.geometryPositions;var decompressedPositions=geometryArrays.decompressedPositions;for(var _i561=0,len=geometryPositions.length;_i5610&&geometryIndices.length>0;break;case 1:primitiveName="surface";_geometryPositions3=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex3],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex3+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex3],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex3+1]);_geometryValid2=_geometryPositions3.length>0&&geometryIndices.length>0;break;case 2:primitiveName="points";_geometryPositions3=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex3],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex3+1]);_geometryValid2=_geometryPositions3.length>0;break;case 3:primitiveName="lines";_geometryPositions3=positions.subarray(eachGeometryPositionsPortion[_geometryIndex3],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex3+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex3],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex3+1]);_geometryValid2=_geometryPositions3.length>0&&geometryIndices.length>0;break;default:continue;}if(_geometryValid2){sceneModel.createMesh(utils.apply(meshDefaults,{id:meshId,origin:tileCenter,primitive:primitiveName,positionsCompressed:_geometryPositions3,normalsCompressed:geometryNormals,colorsCompressed:geometryColors,indices:geometryIndices,edgeIndices:geometryEdgeIndices,positionsDecodeMatrix:tileDecodeMatrix,color:meshColor,metallic:meshMetallic,roughness:meshRoughness,opacity:meshOpacity}));meshIds.push(meshId);}}}if(meshIds.length>0){sceneModel.createEntity(utils.apply(entityDefaults,{id:entityId,isObject:true,meshIds:meshIds}));}}}}/** @private */var ParserV9={version:9,parse:function parse(viewer,options,elements,sceneModel,metaModel,manifestCtx){var deflatedData=extract$1(elements);var inflatedData=inflate$1(deflatedData);load$1(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx);}};/* Parser for .XKT Format V10 */var pako=window.pako||p;if(!pako.inflate){// See https://github.com/nodeca/pako/issues/97 pako=pako["default"];}var tempVec4a=math.vec4();var tempVec4b=math.vec4();var NUM_TEXTURE_ATTRIBUTES=9;function extract(elements){var i=0;return{metadata:elements[i++],textureData:elements[i++],eachTextureDataPortion:elements[i++],eachTextureAttributes:elements[i++],positions:elements[i++],normals:elements[i++],colors:elements[i++],uvs:elements[i++],indices:elements[i++],edgeIndices:elements[i++],eachTextureSetTextures:elements[i++],matrices:elements[i++],reusedGeometriesDecodeMatrix:elements[i++],eachGeometryPrimitiveType:elements[i++],eachGeometryPositionsPortion:elements[i++],eachGeometryNormalsPortion:elements[i++],eachGeometryColorsPortion:elements[i++],eachGeometryUVsPortion:elements[i++],eachGeometryIndicesPortion:elements[i++],eachGeometryEdgeIndicesPortion:elements[i++],eachMeshGeometriesPortion:elements[i++],eachMeshMatricesPortion:elements[i++],eachMeshTextureSet:elements[i++],eachMeshMaterialAttributes:elements[i++],eachEntityId:elements[i++],eachEntityMeshesPortion:elements[i++],eachTileAABB:elements[i++],eachTileEntitiesPortion:elements[i++]};}function inflate(deflatedData){function inflate(array,options){return array.length===0?[]:pako.inflate(array,options).buffer;}return{metadata:JSON.parse(pako.inflate(deflatedData.metadata,{to:'string'})),textureData:new Uint8Array(inflate(deflatedData.textureData)),// <<----------------------------- ??? ZIPPing to blame? @@ -26943,8 +26947,8 @@ if(options.excludeTypesMap&&metaObject.type&&options.excludeTypesMap[metaObject. var props=options.objectDefaults?options.objectDefaults[metaObject.type]||options.objectDefaults["DEFAULT"]:null;if(props){if(props.visible===false){entityDefaults.visible=false;}if(props.pickable===false){entityDefaults.pickable=false;}if(props.colorize){meshDefaults.color=props.colorize;}if(props.opacity!==undefined&&props.opacity!==null){meshDefaults.opacity=props.opacity;}if(props.metallic!==undefined&&props.metallic!==null){meshDefaults.metallic=props.metallic;}if(props.roughness!==undefined&&props.roughness!==null){meshDefaults.roughness=props.roughness;}}}else{if(options.excludeUnclassifiedObjects){continue;}}// Iterate each entity's meshes for(var _meshIndex4=firstMeshIndex;_meshIndex4<=lastMeshIndex;_meshIndex4++){var _geometryIndex4=eachMeshGeometriesPortion[_meshIndex4];var geometryReuseCount=geometryReuseCounts[_geometryIndex4];var isReusedGeometry=geometryReuseCount>1;var atLastGeometry=_geometryIndex4===numGeometries-1;var _textureSetIndex=eachMeshTextureSet[_meshIndex4];var _textureSetId=_textureSetIndex>=0?"".concat(modelPartId,"-textureSet-").concat(_textureSetIndex):null;var meshColor=decompressColor(eachMeshMaterialAttributes.subarray(_meshIndex4*6,_meshIndex4*6+3));var meshOpacity=eachMeshMaterialAttributes[_meshIndex4*6+3]/255.0;var meshMetallic=eachMeshMaterialAttributes[_meshIndex4*6+4]/255.0;var meshRoughness=eachMeshMaterialAttributes[_meshIndex4*6+5]/255.0;var meshId=manifestCtx.getNextId();if(isReusedGeometry){// Create mesh for multi-use geometry - create (or reuse) geometry, create mesh using that geometry var meshMatrixIndex=eachMeshMatricesPortion[_meshIndex4];var meshMatrix=matrices.slice(meshMatrixIndex,meshMatrixIndex+16);var geometryId="".concat(modelPartId,"-geometry.").concat(tileIndex,".").concat(_geometryIndex4);// These IDs are local to the SceneModel -var geometryArrays=geometryArraysCache[geometryId];if(!geometryArrays){geometryArrays={batchThisMesh:!options.reuseGeometries};var primitiveType=eachGeometryPrimitiveType[_geometryIndex4];var geometryValid=false;switch(primitiveType){case 0:geometryArrays.primitiveName="solid";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryArrays.geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 1:geometryArrays.primitiveName="surface";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryArrays.geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 2:geometryArrays.primitiveName="points";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex4],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0;break;case 3:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 4:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=lineStripToLines(geometryArrays.geometryPositions,indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]));geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;default:continue;}if(!geometryValid){geometryArrays=null;}if(geometryArrays){if(geometryArrays.geometryPositions.length>1000);if(geometryArrays.batchThisMesh){geometryArrays.decompressedPositions=new Float32Array(geometryArrays.geometryPositions.length);geometryArrays.transformedAndRecompressedPositions=new Uint16Array(geometryArrays.geometryPositions.length);var geometryPositions=geometryArrays.geometryPositions;var decompressedPositions=geometryArrays.decompressedPositions;for(var _i562=0,len=geometryPositions.length;_i5620&&geometryIndices.length>0;break;case 1:primitiveName="surface";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;case 2:primitiveName="points";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex4],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0;break;case 3:primitiveName="lines";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;case 4:primitiveName="lines";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryIndices=lineStripToLines(_geometryPositions4,indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]));_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;default:continue;}if(_geometryValid3){sceneModel.createMesh(utils.apply(meshDefaults,{id:meshId,textureSetId:_textureSetId,origin:tileCenter,primitive:primitiveName,positionsCompressed:_geometryPositions4,normalsCompressed:geometryNormals,uv:geometryUVs&&geometryUVs.length>0?geometryUVs:null,colorsCompressed:geometryColors,indices:geometryIndices,edgeIndices:geometryEdgeIndices,positionsDecodeMatrix:tileDecodeMatrix,color:meshColor,metallic:meshMetallic,roughness:meshRoughness,opacity:meshOpacity}));meshIds.push(meshId);}}}if(meshIds.length>0){sceneModel.createEntity(utils.apply(entityDefaults,{id:entityId,isObject:true,meshIds:meshIds}));}}}}function lineStripToLines(positions,indices){var linesIndices=[];if(indices.length>1){for(var _i564=0,len=indices.length-1;_i5641){for(var _i565=0,_len117=positions.length/3-1;_i565<_len117;_i565++){linesIndices.push(_i565);linesIndices.push(_i565+1);}}return linesIndices;}/** @private */var ParserV10={version:10,parse:function parse(viewer,options,elements,sceneModel,metaModel,manifestCtx){var deflatedData=extract(elements);var inflatedData=inflate(deflatedData);load(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx);}};var parsers={};parsers[ParserV1.version]=ParserV1;parsers[ParserV2.version]=ParserV2;parsers[ParserV3.version]=ParserV3;parsers[ParserV4.version]=ParserV4;parsers[ParserV5.version]=ParserV5;parsers[ParserV6.version]=ParserV6;parsers[ParserV7.version]=ParserV7;parsers[ParserV8.version]=ParserV8;parsers[ParserV9.version]=ParserV9;parsers[ParserV10.version]=ParserV10;/** +var geometryArrays=geometryArraysCache[geometryId];if(!geometryArrays){geometryArrays={batchThisMesh:!options.reuseGeometries};var primitiveType=eachGeometryPrimitiveType[_geometryIndex4];var geometryValid=false;switch(primitiveType){case 0:geometryArrays.primitiveName="solid";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryArrays.geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 1:geometryArrays.primitiveName="surface";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryArrays.geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryArrays.geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 2:geometryArrays.primitiveName="points";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex4],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0;break;case 3:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;case 4:geometryArrays.primitiveName="lines";geometryArrays.geometryPositions=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryArrays.geometryIndices=lineStripToLines(geometryArrays.geometryPositions,indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]));geometryValid=geometryArrays.geometryPositions.length>0&&geometryArrays.geometryIndices.length>0;break;default:continue;}if(!geometryValid){geometryArrays=null;}if(geometryArrays){if(geometryArrays.geometryPositions.length>1000);if(geometryArrays.batchThisMesh){geometryArrays.decompressedPositions=new Float32Array(geometryArrays.geometryPositions.length);geometryArrays.transformedAndRecompressedPositions=new Uint16Array(geometryArrays.geometryPositions.length);var geometryPositions=geometryArrays.geometryPositions;var decompressedPositions=geometryArrays.decompressedPositions;for(var _i563=0,len=geometryPositions.length;_i5630&&geometryIndices.length>0;break;case 1:primitiveName="surface";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryNormals=normals.subarray(eachGeometryNormalsPortion[_geometryIndex4],atLastGeometry?normals.length:eachGeometryNormalsPortion[_geometryIndex4+1]);geometryUVs=uvs.subarray(eachGeometryUVsPortion[_geometryIndex4],atLastGeometry?uvs.length:eachGeometryUVsPortion[_geometryIndex4+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);geometryEdgeIndices=edgeIndices.subarray(eachGeometryEdgeIndicesPortion[_geometryIndex4],atLastGeometry?edgeIndices.length:eachGeometryEdgeIndicesPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;case 2:primitiveName="points";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryColors=colors.subarray(eachGeometryColorsPortion[_geometryIndex4],atLastGeometry?colors.length:eachGeometryColorsPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0;break;case 3:primitiveName="lines";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryIndices=indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]);_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;case 4:primitiveName="lines";_geometryPositions4=positions.subarray(eachGeometryPositionsPortion[_geometryIndex4],atLastGeometry?positions.length:eachGeometryPositionsPortion[_geometryIndex4+1]);geometryIndices=lineStripToLines(_geometryPositions4,indices.subarray(eachGeometryIndicesPortion[_geometryIndex4],atLastGeometry?indices.length:eachGeometryIndicesPortion[_geometryIndex4+1]));_geometryValid3=_geometryPositions4.length>0&&geometryIndices.length>0;break;default:continue;}if(_geometryValid3){sceneModel.createMesh(utils.apply(meshDefaults,{id:meshId,textureSetId:_textureSetId,origin:tileCenter,primitive:primitiveName,positionsCompressed:_geometryPositions4,normalsCompressed:geometryNormals,uv:geometryUVs&&geometryUVs.length>0?geometryUVs:null,colorsCompressed:geometryColors,indices:geometryIndices,edgeIndices:geometryEdgeIndices,positionsDecodeMatrix:tileDecodeMatrix,color:meshColor,metallic:meshMetallic,roughness:meshRoughness,opacity:meshOpacity}));meshIds.push(meshId);}}}if(meshIds.length>0){sceneModel.createEntity(utils.apply(entityDefaults,{id:entityId,isObject:true,meshIds:meshIds}));}}}}function lineStripToLines(positions,indices){var linesIndices=[];if(indices.length>1){for(var _i565=0,len=indices.length-1;_i5651){for(var _i566=0,_len117=positions.length/3-1;_i566<_len117;_i566++){linesIndices.push(_i566);linesIndices.push(_i566+1);}}return linesIndices;}/** @private */var ParserV10={version:10,parse:function parse(viewer,options,elements,sceneModel,metaModel,manifestCtx){var deflatedData=extract(elements);var inflatedData=inflate(deflatedData);load(viewer,options,inflatedData,sceneModel,metaModel,manifestCtx);}};var parsers={};parsers[ParserV1.version]=ParserV1;parsers[ParserV2.version]=ParserV2;parsers[ParserV3.version]=ParserV3;parsers[ParserV4.version]=ParserV4;parsers[ParserV5.version]=ParserV5;parsers[ParserV6.version]=ParserV6;parsers[ParserV7.version]=ParserV7;parsers[ParserV8.version]=ParserV8;parsers[ParserV9.version]=ParserV9;parsers[ParserV10.version]=ParserV10;/** * {@link Viewer} plugin that loads models from xeokit's optimized *````.XKT````* format. * * @@ -27700,11 +27704,11 @@ var _primitiveType4=eachGeometryPrimitiveType[_geometryIndex4];var primitiveName * primitives. Only works while {@link DTX#enabled} is also ````true````. * @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}. */},{key:"load",value:function load(){var _this154=this;var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(params.id&&this.viewer.scene.components[params.id]){this.error("Component with this ID already exists in viewer: "+params.id+" - will autogenerate this ID");delete params.id;}if(!params.src&&!params.xkt&&!params.manifestSrc&&!params.manifest){this.error("load() param expected: src, xkt, manifestSrc or manifestData");return sceneModel;// Return new empty model -}var options={};var includeTypes=params.includeTypes||this._includeTypes;var excludeTypes=params.excludeTypes||this._excludeTypes;var objectDefaults=params.objectDefaults||this._objectDefaults;options.reuseGeometries=params.reuseGeometries!==null&¶ms.reuseGeometries!==undefined?params.reuseGeometries:this._reuseGeometries!==false;if(includeTypes){options.includeTypesMap={};for(var _i566=0,len=includeTypes.length;_i566=metaDataFiles.length){done();}else{_this154._dataSource.getMetaModel("".concat(baseDir).concat(metaDataFiles[i]),function(metaModelData){metaModel.loadData(metaModelData,{includeTypes:includeTypes,excludeTypes:excludeTypes,globalizeObjectIds:options.globalizeObjectIds});i++;_this154.scheduleTask(loadNext,100);},error);}};loadNext();};var loadXKTs=function loadXKTs(xktFiles,done,error){var i=0;var loadNext=function loadNext(){if(i>=xktFiles.length){done();}else{_this154._dataSource.getXKT("".concat(baseDir).concat(xktFiles[i]),function(arrayBuffer){_this154._parseModel(arrayBuffer,params,options,sceneModel,metaModel,manifestCtx);i++;_this154.scheduleTask(loadNext,100);},error);}};loadNext();};if(params.manifest){var manifestData=params.manifest;var xktFiles=manifestData.xktFiles;if(!xktFiles||xktFiles.length===0){error("load(): Failed to load model manifest - manifest not valid");return;}var metaModelFiles=manifestData.metaModelFiles;if(metaModelFiles){loadJSONs(metaModelFiles,function(){loadXKTs(xktFiles,finish,error);},error);}else{loadXKTs(xktFiles,finish,error);}}else{this._dataSource.getManifest(params.manifestSrc,function(manifestData){if(sceneModel.destroyed){return;}var xktFiles=manifestData.xktFiles;if(!xktFiles||xktFiles.length===0){error("load(): Failed to load model manifest - manifest not valid");return;}var metaModelFiles=manifestData.metaModelFiles;if(metaModelFiles){loadJSONs(metaModelFiles,function(){loadXKTs(xktFiles,finish,error);},error);}else{loadXKTs(xktFiles,finish,error);}},error);}}}return sceneModel;}},{key:"_loadModel",value:function _loadModel(src,params,options,sceneModel,metaModel,manifestCtx,done,error){var _this155=this;this._dataSource.getXKT(params.src,function(arrayBuffer){_this155._parseModel(arrayBuffer,params,options,sceneModel,metaModel,manifestCtx);done();},error);}},{key:"_parseModel",value:function _parseModel(arrayBuffer,params,options,sceneModel,metaModel,manifestCtx){if(sceneModel.destroyed){return;}var dataView=new DataView(arrayBuffer);var dataArray=new Uint8Array(arrayBuffer);var xktVersion=dataView.getUint32(0,true);var parser=parsers[xktVersion];if(!parser){this.error("Unsupported .XKT file version: "+xktVersion+" - this XKTLoaderPlugin supports versions "+Object.keys(parsers));return;}this.log("Loading .xkt V"+xktVersion);var numElements=dataView.getUint32(4,true);var elements=[];var byteOffset=(numElements+2)*4;for(var _i568=0;_i568=metaDataFiles.length){done();}else{_this154._dataSource.getMetaModel("".concat(baseDir).concat(metaDataFiles[i]),function(metaModelData){metaModel.loadData(metaModelData,{includeTypes:includeTypes,excludeTypes:excludeTypes,globalizeObjectIds:options.globalizeObjectIds});i++;_this154.scheduleTask(loadNext,100);},error);}};loadNext();};var loadXKTs=function loadXKTs(xktFiles,done,error){var i=0;var loadNext=function loadNext(){if(i>=xktFiles.length){done();}else{_this154._dataSource.getXKT("".concat(baseDir).concat(xktFiles[i]),function(arrayBuffer){_this154._parseModel(arrayBuffer,params,options,sceneModel,metaModel,manifestCtx);i++;_this154.scheduleTask(loadNext,100);},error);}};loadNext();};if(params.manifest){var manifestData=params.manifest;var xktFiles=manifestData.xktFiles;if(!xktFiles||xktFiles.length===0){error("load(): Failed to load model manifest - manifest not valid");return;}var metaModelFiles=manifestData.metaModelFiles;if(metaModelFiles){loadJSONs(metaModelFiles,function(){loadXKTs(xktFiles,finish,error);},error);}else{loadXKTs(xktFiles,finish,error);}}else{this._dataSource.getManifest(params.manifestSrc,function(manifestData){if(sceneModel.destroyed){return;}var xktFiles=manifestData.xktFiles;if(!xktFiles||xktFiles.length===0){error("load(): Failed to load model manifest - manifest not valid");return;}var metaModelFiles=manifestData.metaModelFiles;if(metaModelFiles){loadJSONs(metaModelFiles,function(){loadXKTs(xktFiles,finish,error);},error);}else{loadXKTs(xktFiles,finish,error);}},error);}}}return sceneModel;}},{key:"_loadModel",value:function _loadModel(src,params,options,sceneModel,metaModel,manifestCtx,done,error){var _this155=this;this._dataSource.getXKT(params.src,function(arrayBuffer){_this155._parseModel(arrayBuffer,params,options,sceneModel,metaModel,manifestCtx);done();},error);}},{key:"_parseModel",value:function _parseModel(arrayBuffer,params,options,sceneModel,metaModel,manifestCtx){if(sceneModel.destroyed){return;}var dataView=new DataView(arrayBuffer);var dataArray=new Uint8Array(arrayBuffer);var xktVersion=dataView.getUint32(0,true);var parser=parsers[xktVersion];if(!parser){this.error("Unsupported .XKT file version: "+xktVersion+" - this XKTLoaderPlugin supports versions "+Object.keys(parsers));return;}this.log("Loading .xkt V"+xktVersion);var numElements=dataView.getUint32(4,true);var elements=[];var byteOffset=(numElements+2)*4;for(var _i569=0;_i5690&&arguments[0]!==undefined?arguments[0]:{};params.workerScriptsPath=this._workerScriptsPath;if(params.id&&this.viewer.scene.components[params.id]){this.error("Component with this ID already exists in viewer: "+params.id+" - will autogenerate this ID");delete params.id;}var modelNode=new Node$2(this.viewer.scene,utils.apply(params,{isModel:true}));var src=params.src;if(!src){this.error("load() param expected: src");return modelNode;// Return new empty model }this._loader.load(this,modelNode,src,params);return modelNode;}}]);return XML3DLoaderPlugin;}(Plugin);var __defProp=Object.defineProperty;var __defProps=Object.defineProperties;var __getOwnPropDescs=Object.getOwnPropertyDescriptors;var __getOwnPropSymbols=Object.getOwnPropertySymbols;var __hasOwnProp=Object.prototype.hasOwnProperty;var __propIsEnum=Object.prototype.propertyIsEnumerable;var __defNormalProp=function __defNormalProp(obj,key,value){return key in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value:value}):obj[key]=value;};var __spreadValues=function __spreadValues(a,b){for(var prop in b||(b={})){if(__hasOwnProp.call(b,prop))__defNormalProp(a,prop,b[prop]);}if(__getOwnPropSymbols){var _iterator41=_createForOfIteratorHelper(__getOwnPropSymbols(b)),_step41;try{for(_iterator41.s();!(_step41=_iterator41.n()).done;){var prop=_step41.value;if(__propIsEnum.call(b,prop))__defNormalProp(a,prop,b[prop]);}}catch(err){_iterator41.e(err);}finally{_iterator41.f();}}return a;};var __spreadProps=function __spreadProps(a,b){return __defProps(a,__getOwnPropDescs(b));};var __commonJS=function __commonJS(cb,mod){return function __require(){return mod||(0,cb[Object.keys(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports;};};var __async=function __async(__this,__arguments,generator){return new Promise(function(resolve,reject){var fulfilled=function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}};var rejected=function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}};var step=function step(x){return x.done?resolve(x.value):Promise.resolve(x.value).then(fulfilled,rejected);};step((generator=generator.apply(__this,__arguments)).next());});};// dist/web-ifc-mt.js -var require_web_ifc_mt=__commonJS({"dist/web-ifc-mt.js":function distWebIfcMtJs(exports,module){var WebIFCWasm2=function(){var _scriptDir=typeof document!=="undefined"&&document.currentScript?document.currentScript.src:void 0;return function(){var WebIFCWasm3=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};function GROWABLE_HEAP_I8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAP8;}function GROWABLE_HEAP_U8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPU8;}function GROWABLE_HEAP_I16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAP16;}function GROWABLE_HEAP_U16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPU16;}function GROWABLE_HEAP_I32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAP32;}function GROWABLE_HEAP_U32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPU32;}function GROWABLE_HEAP_F32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPF32;}function GROWABLE_HEAP_F64(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPF64;}var Module=typeof WebIFCWasm3!="undefined"?WebIFCWasm3:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject;});var moduleOverrides=Object.assign({},Module);var thisProgram="./this.program";var quit_=function quit_(status,toThrow){throw toThrow;};var ENVIRONMENT_IS_WEB=(typeof window==="undefined"?"undefined":_typeof(window))=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=(typeof process==="undefined"?"undefined":_typeof(process))=="object"&&_typeof(process.versions)=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_PTHREAD=Module["ENVIRONMENT_IS_PTHREAD"]||false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory);}return scriptDirectory+path;}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href;}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src;}if(_scriptDir){scriptDirectory=_scriptDir;}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1);}else{scriptDirectory="";}{read_=function read_(url){var xhr=new XMLHttpRequest();xhr.open("GET",url,false);xhr.send(null);return xhr.responseText;};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest();xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response);};}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest();xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return;}onerror();};xhr.onerror=onerror;xhr.send(null);};}}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"]);if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if((typeof WebAssembly==="undefined"?"undefined":_typeof(WebAssembly))!="object"){abort("no native wasm support detected");}var wasmMemory;var wasmModule;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text);}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){idx>>>=0;var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx)){++endPtr;}if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer?heapOrArray.slice(idx,endPtr):heapOrArray.subarray(idx,endPtr));}var str="";while(idx>10,56320|ch&1023);}}return str;}function UTF8ToString(ptr,maxBytesToRead){ptr>>>=0;return ptr?UTF8ArrayToString(GROWABLE_HEAP_U8(),ptr,maxBytesToRead):"";}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){outIdx>>>=0;if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023;}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++>>>0]=u;}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++>>>0]=192|u>>6;heap[outIdx++>>>0]=128|u&63;}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++>>>0]=224|u>>12;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63;}else{if(outIdx+3>=endIdx)break;heap[outIdx++>>>0]=240|u>>18;heap[outIdx++>>>0]=128|u>>12&63;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63;}}heap[outIdx>>>0]=0;return outIdx-startIdx;}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,GROWABLE_HEAP_U8(),outPtr,maxBytesToWrite);}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i;}else{len+=3;}}return len;}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;assert(INITIAL_MEMORY>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+5242880+")");if(ENVIRONMENT_IS_PTHREAD){wasmMemory=Module["wasmMemory"];}else{if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"];}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":4294967296/65536,"shared":true});if(!(wasmMemory.buffer instanceof SharedArrayBuffer)){err("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag");if(ENVIRONMENT_IS_NODE){err("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)");}throw Error("bad memory");}}}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];function keepRuntimeAlive(){return noExitRuntime;}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift());}}callRuntimeCallbacks(__ATPRERUN__);}function initRuntime(){if(ENVIRONMENT_IS_PTHREAD)return;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;callRuntimeCallbacks(__ATINIT__);}function postRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift());}}callRuntimeCallbacks(__ATPOSTRUN__);}function addOnPreRun(cb){__ATPRERUN__.unshift(cb);}function addOnInit(cb){__ATINIT__.unshift(cb);}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb);}var runDependencies=0;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id;}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback();}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what);}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e;}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix);}var wasmBinaryFile;wasmBinaryFile="web-ifc-mt.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile);}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary);}if(readBinary){return readBinary(file);}throw"both async and sync fetching of the wasm failed";}catch(err2){abort(err2);}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";}return response["arrayBuffer"]();})["catch"](function(){return getBinary(wasmBinaryFile);});}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile);});}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module2){var exports3=instance.exports;Module["asm"]=exports3;registerTLSInit(Module["asm"]["ka"]);wasmTable=Module["asm"]["ia"];addOnInit(Module["asm"]["ha"]);wasmModule=module2;PThread.loadWasmModuleToAllWorkers(function(){return removeRunDependency();});}addRunDependency();function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"]);}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info);}).then(function(instance){return instance;}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason);});}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult);});});}else{return instantiateArrayBuffer(receiveInstantiationResult);}}if(Module["instantiateWasm"]){try{var exports2=Module["instantiateWasm"](info,receiveInstance);return exports2;}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e);}}instantiateAsync()["catch"](readyPromiseReject);return{};}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status;}function killThread(pthread_ptr){var worker=PThread.pthreads[pthread_ptr];delete PThread.pthreads[pthread_ptr];worker.terminate();_emscripten_thread_free_data(pthread_ptr);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;}function cancelThread(pthread_ptr){var worker=PThread.pthreads[pthread_ptr];worker.postMessage({"cmd":"cancel"});}function cleanupThread(pthread_ptr){var worker=PThread.pthreads[pthread_ptr];assert(worker);PThread.returnWorkerToPool(worker);}function spawnThread(threadParams){var worker=PThread.getNewWorker();if(!worker){return 6;}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={"cmd":"run","start_routine":threadParams.startRoutine,"arg":threadParams.arg,"pthread_ptr":threadParams.pthread_ptr};worker.postMessage(msg,threadParams.transferList);return 0;}var PATH={isAbs:function isAbs(path){return path.charAt(0)==="/";},splitPath:function splitPath(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1);},normalizeArray:function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1);}else if(last===".."){parts.splice(i,1);up++;}else if(up){parts.splice(i,1);up--;}}if(allowAboveRoot){for(;up;up--){parts.unshift("..");}}return parts;},normalize:function normalize(path){var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p;}),!isAbsolute).join("/");if(!path&&!isAbsolute){path=".";}if(path&&trailingSlash){path+="/";}return(isAbsolute?"/":"")+path;},dirname:function dirname(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return".";}if(dir){dir=dir.substr(0,dir.length-1);}return root+dir;},basename:function basename(path){if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1);},join:function join(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"));},join2:function join2(l,r){return PATH.normalize(l+"/"+r);}};function getRandomDevice(){if((typeof crypto==="undefined"?"undefined":_typeof(crypto))=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0];};}else return function(){return abort("randomDevice");};}var PATH_FS={resolve:function resolve(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings");}else if(!path){return"";}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path);}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p;}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||".";},relative:function relative(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break;}if(start>end)return[];return arr.slice(start,end-start+1);}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array;}var TTY={ttys:[],init:function init(){},shutdown:function shutdown(){},register:function register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops);},stream_ops:{open:function open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43);}stream.tty=tty;stream.seekable=false;},close:function close(stream){stream.tty.ops.fsync(stream.tty);},fsync:function fsync(stream){stream.tty.ops.fsync(stream.tty);},read:function read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60);}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[];}}},default_tty1_ops:{put_char:function put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[];}else{if(val!=0)tty.output.push(val);}},fsync:function fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[];}}}};function mmapAlloc(size){abort();}var MEMFS={ops_table:null,mount:function mount(_mount){return MEMFS.createNode(null,"/",16384|511,0);},createNode:function createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63);}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={};}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null;}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream;}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream;}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp;}return node;},getFileDataAsTypedArray:function getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents);},expandFileStorage:function expandFileStorage(node,newCapacity){newCapacity>>>=0;var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);},resizeFileStorage:function resizeFileStorage(node,newSize){newSize>>>=0;if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)));}node.usedBytes=newSize;}},node_ops:{getattr:function getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096;}else if(FS.isFile(node.mode)){attr.size=node.usedBytes;}else if(FS.isLink(node.mode)){attr.size=node.link.length;}else{attr.size=0;}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr;},setattr:function setattr(node,attr){if(attr.mode!==void 0){node.mode=attr.mode;}if(attr.timestamp!==void 0){node.timestamp=attr.timestamp;}if(attr.size!==void 0){MEMFS.resizeFileStorage(node,attr.size);}},lookup:function lookup(parent,name){throw FS.genericErrors[44];},mknod:function mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev);},rename:function rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name);}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55);}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir;},unlink:function unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now();},rmdir:function rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55);}delete parent.contents[name];parent.timestamp=Date.now();},readdir:function readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue;}entries.push(key);}return entries;},symlink:function symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node;},readlink:function readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28);}return node.link;}},stream_ops:{read:function read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset);}else{for(var i=0;i0||position+length>>=0;GROWABLE_HEAP_I8().set(contents,ptr>>>0);}return{ptr:ptr,allocated:allocated};},msync:function msync(stream,buffer,offset,length,mmapFlags){MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0;}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency();},function(event){if(onerror){onerror();}else{throw'Loading data file "'+url+'" failed.';}});if(dep)addRunDependency();}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function lookupPath(path){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32);}var parts=path.split("/").filter(function(p){return!!p;});var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32);}}}}return{path:current_path,node:current};},getPath:function getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path;}path=path?node.name+"/"+path:node.name;node=node.parent;}},hashName:function hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length;},hashAddNode:function hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node;},hashRemoveNode:function hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next;}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break;}current=current.name_next;}}},lookupNode:function lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent);}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node;}}return FS.lookup(parent,name);},createNode:function createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node;},destroyNode:function destroyNode(node){FS.hashRemoveNode(node);},isRoot:function isRoot(node){return node===node.parent;},isMountpoint:function isMountpoint(node){return!!node.mounted;},isFile:function isFile(mode){return(mode&61440)===32768;},isDir:function isDir(mode){return(mode&61440)===16384;},isLink:function isLink(mode){return(mode&61440)===40960;},isChrdev:function isChrdev(mode){return(mode&61440)===8192;},isBlkdev:function isBlkdev(mode){return(mode&61440)===24576;},isFIFO:function isFIFO(mode){return(mode&61440)===4096;},isSocket:function isSocket(mode){return(mode&49152)===49152;},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:function modeStringToFlags(str){var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str);}return flags;},flagsToPermissionString:function flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w";}return perms;},nodePermissions:function nodePermissions(node,perms){if(FS.ignorePermissions){return 0;}if(perms.includes("r")&&!(node.mode&292)){return 2;}else if(perms.includes("w")&&!(node.mode&146)){return 2;}else if(perms.includes("x")&&!(node.mode&73)){return 2;}return 0;},mayLookup:function mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0;},mayCreate:function mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20;}catch(e){}return FS.nodePermissions(dir,"wx");},mayDelete:function mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name);}catch(e){return e.errno;}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode;}if(isdir){if(!FS.isDir(node.mode)){return 54;}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10;}}else{if(FS.isDir(node.mode)){return 31;}}return 0;},mayOpen:function mayOpen(node,flags){if(!node){return 44;}if(FS.isLink(node.mode)){return 32;}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31;}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags));},MAX_OPEN_FDS:4096,nextfd:function nextfd(){var fd_start=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var fd_end=arguments.length>1&&arguments[1]!==undefined?arguments[1]:FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd;}}throw new FS.ErrnoError(33);},getStream:function getStream(fd){return FS.streams[fd];},createStream:function createStream(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){this.shared={};};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function get(){return this.node;},set:function set(val){this.node=val;}},isRead:{get:function get(){return(this.flags&2097155)!==1;}},isWrite:{get:function get(){return(this.flags&2097155)!==0;}},isAppend:{get:function get(){return this.flags&1024;}},flags:{get:function get(){return this.shared.flags;},set:function set(val){this.shared.flags=val;}},position:{get:function get(){return this.shared.position;},set:function set(val){this.shared.position=val;}}});}stream=Object.assign(new FS.FSStream(),stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream;},closeStream:function closeStream(fd){FS.streams[fd]=null;},chrdev_stream_ops:{open:function open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream);}},llseek:function llseek(){throw new FS.ErrnoError(70);}},major:function major(dev){return dev>>8;},minor:function minor(dev){return dev&255;},makedev:function makedev(ma,mi){return ma<<8|mi;},registerDevice:function registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops};},getDevice:function getDevice(dev){return FS.devices[dev];},getMounts:function getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts);}return mounts;},syncfs:function syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false;}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode);}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode);}return;}if(++completed>=mounts.length){doCallback(null);}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null);}mount.type.syncfs(mount,populate,done);});},mount:function mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10);}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10);}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54);}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot;}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount);}}return mountRoot;},unmount:function unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28);}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current);}current=next;}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1);},lookup:function lookup(parent,name){return parent.node_ops.lookup(parent,name);},mknod:function mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28);}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode);}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63);}return parent.node_ops.mknod(parent,name,mode,dev);},create:function create(path,mode){mode=mode!==void 0?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0);},mkdir:function mkdir(path,mode){mode=mode!==void 0?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0);},mkdirTree:function mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i>>=0;if(length<0||position<0){throw new FS.ErrnoError(28);}if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31);}if(!stream.stream_ops.read){throw new FS.ErrnoError(28);}var seeking=typeof position!="undefined";if(!seeking){position=stream.position;}else if(!stream.seekable){throw new FS.ErrnoError(70);}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead;},write:function write(stream,buffer,offset,length,position,canOwn){offset>>>=0;if(length<0||position<0){throw new FS.ErrnoError(28);}if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31);}if(!stream.stream_ops.write){throw new FS.ErrnoError(28);}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2);}var seeking=typeof position!="undefined";if(!seeking){position=stream.position;}else if(!stream.seekable){throw new FS.ErrnoError(70);}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten;},allocate:function allocate(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if(offset<0||length<=0){throw new FS.ErrnoError(28);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8);}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43);}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138);}stream.stream_ops.allocate(stream,offset,length);},mmap:function mmap(stream,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2);}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43);}return stream.stream_ops.mmap(stream,length,position,prot,flags);},msync:function msync(stream,buffer,offset,length,mmapFlags){offset>>>=0;if(!stream.stream_ops.msync){return 0;}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags);},munmap:function munmap(stream){return 0;},ioctl:function ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59);}return stream.stream_ops.ioctl(stream,cmd,arg);},readFile:function readFile(path){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"');}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0);}else if(opts.encoding==="binary"){ret=buf;}FS.close(stream);return ret;},writeFile:function writeFile(path,data){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,void 0,opts.canOwn);}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,void 0,opts.canOwn);}else{throw new Error("Unsupported data type");}FS.close(stream);},cwd:function cwd(){return FS.currentPath;},chdir:function chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44);}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54);}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode);}FS.currentPath=lookup.path;},createDefaultDirectories:function createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user");},createDefaultDevices:function createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:function read(){return 0;},write:function write(stream,buffer,offset,length,pos){return length;}});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp");},createSpecialDirectories:function createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:function mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:function lookup(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function readlink(){return stream.path;}}};ret.parent=ret;return ret;}};return node;}},{},"/proc/self/fd");},createStandardStreams:function createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"]);}else{FS.symlink("/dev/tty","/dev/stdin");}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"]);}else{FS.symlink("/dev/tty","/dev/stdout");}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"]);}else{FS.symlink("/dev/tty1","/dev/stderr");}FS.open("/dev/stdin",0);FS.open("/dev/stdout",1);FS.open("/dev/stderr",1);},ensureErrnoError:function ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno2){this.errno=errno2;};this.setErrno(errno);this.message="FS error";};FS.ErrnoError.prototype=new Error();FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack="";});},staticInit:function staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS};},init:function init(input,output,error){FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams();},quit:function quit(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return void 0;}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset];};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter;};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest();xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function doXHR(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr2=new XMLHttpRequest();xhr2.open("GET",url,false);if(datalength!==chunkSize)xhr2.setRequestHeader("Range","bytes="+from+"-"+to);xhr2.responseType="arraybuffer";if(xhr2.overrideMimeType){xhr2.overrideMimeType("text/plain; charset=x-user-defined");}xhr2.send(null);if(!(xhr2.status>=200&&xhr2.status<300||xhr2.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr2.status);if(xhr2.response!==void 0){return new Uint8Array(xhr2.response||[]);}return intArrayFromString(xhr2.responseText||"",true);};var lazyArray2=this;lazyArray2.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray2.chunks[chunkNum]=="undefined"){lazyArray2.chunks[chunkNum]=doXHR(start,end);}if(typeof lazyArray2.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray2.chunks[chunkNum];});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed");}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true;};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array();Object.defineProperties(lazyArray,{length:{get:function get(){if(!this.lengthKnown){this.cacheLength();}return this._length;}},chunkSize:{get:function get(){if(!this.lengthKnown){this.cacheLength();}return this._chunkSize;}}});var properties={isDevice:false,contents:lazyArray};}else{var properties={isDevice:false,url:url};}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents;}else if(properties.url){node.contents=null;node.url=properties.url;}Object.defineProperties(node,{usedBytes:{get:function get(){return this.contents.length;}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments);};});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:function(){};var onerror=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION);}catch(e){return onerror(e);}openRequest.onupgradeneeded=function(){out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME);};openRequest.onsuccess=function(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror();}paths.forEach(function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function(){ok++;if(ok+fail==total)finish();};putRequest.onerror=function(){fail++;if(ok+fail==total)finish();};});transaction.onerror=onerror;};openRequest.onerror=onerror;},loadFilesFromDB:function loadFilesFromDB(paths){var onload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};var onerror=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION);}catch(e){return onerror(e);}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly");}catch(e){onerror(e);return;}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror();}paths.forEach(function(path){var getRequest=files.get(path);getRequest.onsuccess=function(){if(FS.analyzePath(path).exists){FS.unlink(path);}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish();};getRequest.onerror=function(){fail++;if(ok+fail==total)finish();};});transaction.onerror=onerror;};openRequest.onerror=onerror;}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path;}var dir;if(dirfd===-100){dir=FS.cwd();}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path;}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44);}return dir;}return PATH.join2(dir,path);},doStat:function doStat(func,path,buf){try{var stat=func(path);}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54;}throw e;}GROWABLE_HEAP_I32()[buf>>>2]=stat.dev;GROWABLE_HEAP_I32()[buf+8>>>2]=stat.ino;GROWABLE_HEAP_I32()[buf+12>>>2]=stat.mode;GROWABLE_HEAP_U32()[buf+16>>>2]=stat.nlink;GROWABLE_HEAP_I32()[buf+20>>>2]=stat.uid;GROWABLE_HEAP_I32()[buf+24>>>2]=stat.gid;GROWABLE_HEAP_I32()[buf+28>>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+40>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+44>>>2]=tempI64[1];GROWABLE_HEAP_I32()[buf+48>>>2]=4096;GROWABLE_HEAP_I32()[buf+52>>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+56>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+60>>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+64>>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+72>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+76>>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+80>>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+88>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+92>>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+96>>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+104>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+108>>>2]=tempI64[1];return 0;},doMsync:function doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43);}if(flags&2){return 0;}addr>>>=0;var buffer=GROWABLE_HEAP_U8().slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags);},varargs:void 0,get:function get(){SYSCALLS.varargs+=4;var ret=GROWABLE_HEAP_I32()[SYSCALLS.varargs-4>>>2];return ret;},getStr:function getStr(ptr){var ret=UTF8ToString(ptr);return ret;},getStreamFromFD:function getStreamFromFD(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream;}};function _proc_exit(code){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(1,1,code);EXITSTATUS=code;if(!keepRuntimeAlive()){PThread.terminateAllThreads();if(Module["onExit"])Module["onExit"](code);ABORT=true;}quit_(code,new ExitStatus(code));}function exitJS(status,implicit){EXITSTATUS=status;if(!implicit){if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind";}}_proc_exit(status);}var _exit=exitJS;function handleException(e){if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS;}quit_(1,e);}var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function init(){if(ENVIRONMENT_IS_PTHREAD){PThread.initWorker();}else{PThread.initMainThread();}},initMainThread:function initMainThread(){var pthreadPoolSize=navigator.hardwareConcurrency;while(pthreadPoolSize--){PThread.allocateUnusedWorker();}},initWorker:function initWorker(){noExitRuntime=false;},setExitStatus:function setExitStatus(status){EXITSTATUS=status;},terminateAllThreads:function terminateAllThreads(){for(var _i569=0,_Object$values2=Object.values(PThread.pthreads);_i569<_Object$values2.length;_i569++){var worker=_Object$values2[_i569];PThread.returnWorkerToPool(worker);}var _iterator42=_createForOfIteratorHelper(PThread.unusedWorkers),_step42;try{for(_iterator42.s();!(_step42=_iterator42.n()).done;){var worker=_step42.value;worker.terminate();}}catch(err){_iterator42.e(err);}finally{_iterator42.f();}PThread.unusedWorkers=[];},returnWorkerToPool:function returnWorkerToPool(worker){var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;_emscripten_thread_free_data(pthread_ptr);},receiveObjectTransfer:function receiveObjectTransfer(data){},threadInitTLS:function threadInitTLS(){PThread.tlsInitFunctions.forEach(function(f){return f();});},loadWasmModuleToWorker:function loadWasmModuleToWorker(worker){return new Promise(function(onFinishedLoading){worker.onmessage=function(e){var d=e["data"];var cmd=d["cmd"];if(worker.pthread_ptr)PThread.currentProxiedOperationCallerThread=worker.pthread_ptr;if(d["targetThread"]&&d["targetThread"]!=_pthread_self()){var targetWorker=PThread.pthreads[d.targetThread];if(targetWorker){targetWorker.postMessage(d,d["transferList"]);}else{err('Internal error! Worker sent a message "'+cmd+'" to target pthread '+d["targetThread"]+", but that thread no longer exists!");}PThread.currentProxiedOperationCallerThread=void 0;return;}if(cmd==="processProxyingQueue"){executeNotifiedProxyingQueue(d["queue"]);}else if(cmd==="spawnThread"){spawnThread(d);}else if(cmd==="cleanupThread"){cleanupThread(d["thread"]);}else if(cmd==="killThread"){killThread(d["thread"]);}else if(cmd==="cancelThread"){cancelThread(d["thread"]);}else if(cmd==="loaded"){worker.loaded=true;onFinishedLoading(worker);}else if(cmd==="print"){out("Thread "+d["threadId"]+": "+d["text"]);}else if(cmd==="printErr"){err("Thread "+d["threadId"]+": "+d["text"]);}else if(cmd==="alert"){alert("Thread "+d["threadId"]+": "+d["text"]);}else if(d.target==="setimmediate"){worker.postMessage(d);}else if(cmd==="callHandler"){Module[d["handler"]].apply(Module,_toConsumableArray(d["args"]));}else if(cmd){err("worker sent an unknown command "+cmd);}PThread.currentProxiedOperationCallerThread=void 0;};worker.onerror=function(e){var message="worker sent an error!";err(message+" "+e.filename+":"+e.lineno+": "+e.message);throw e;};var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var _i570=0,_knownHandlers=knownHandlers;_i570<_knownHandlers.length;_i570++){var handler=_knownHandlers[_i570];if(Module.hasOwnProperty(handler)){handlers.push(handler);}}worker.postMessage({"cmd":"load","handlers":handlers,"urlOrBlob":Module["mainScriptUrlOrBlob"]||_scriptDir,"wasmMemory":wasmMemory,"wasmModule":wasmModule});});},loadWasmModuleToAllWorkers:function loadWasmModuleToAllWorkers(onMaybeReady){if(ENVIRONMENT_IS_PTHREAD){return onMaybeReady();}var pthreadPoolReady=Promise.all(PThread.unusedWorkers.map(PThread.loadWasmModuleToWorker));pthreadPoolReady.then(onMaybeReady);},allocateUnusedWorker:function allocateUnusedWorker(){var worker;var pthreadMainJs=locateFile("web-ifc-mt.worker.js");worker=new Worker(pthreadMainJs);PThread.unusedWorkers.push(worker);},getNewWorker:function getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0]);}return PThread.unusedWorkers.pop();}};Module["PThread"]=PThread;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module);}}function establishStackSpace(){var pthread_ptr=_pthread_self();var stackTop=GROWABLE_HEAP_I32()[pthread_ptr+52>>>2];var stackSize=GROWABLE_HEAP_I32()[pthread_ptr+56>>>2];var stackMax=stackTop-stackSize;_emscripten_stack_set_limits2(stackTop,stackMax);_stackRestore(stackTop);}Module["establishStackSpace"]=establishStackSpace;function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(2,0,returnCode);try{_exit(returnCode);}catch(e){handleException(e);}}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr);}return func;}function invokeEntryPoint(ptr,arg){var result=getWasmTableEntry(ptr)(arg);if(keepRuntimeAlive()){PThread.setExitStatus(result);}else{__emscripten_thread_exit(result);}}Module["invokeEntryPoint"]=invokeEntryPoint;function registerTLSInit(tlsInitFunc){PThread.tlsInitFunctions.push(tlsInitFunc);}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){GROWABLE_HEAP_U32()[this.ptr+4>>>2]=type;};this.get_type=function(){return GROWABLE_HEAP_U32()[this.ptr+4>>>2];};this.set_destructor=function(destructor){GROWABLE_HEAP_U32()[this.ptr+8>>>2]=destructor;};this.get_destructor=function(){return GROWABLE_HEAP_U32()[this.ptr+8>>>2];};this.set_refcount=function(refcount){GROWABLE_HEAP_I32()[this.ptr>>>2]=refcount;};this.set_caught=function(caught){caught=caught?1:0;GROWABLE_HEAP_I8()[this.ptr+12>>>0]=caught;};this.get_caught=function(){return GROWABLE_HEAP_I8()[this.ptr+12>>>0]!=0;};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;GROWABLE_HEAP_I8()[this.ptr+13>>>0]=rethrown;};this.get_rethrown=function(){return GROWABLE_HEAP_I8()[this.ptr+13>>>0]!=0;};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false);};this.add_ref=function(){Atomics.add(GROWABLE_HEAP_I32(),this.ptr+0>>2,1);};this.release_ref=function(){var prev=Atomics.sub(GROWABLE_HEAP_I32(),this.ptr+0>>2,1);return prev===1;};this.set_adjusted_ptr=function(adjustedPtr){GROWABLE_HEAP_U32()[this.ptr+16>>>2]=adjustedPtr;};this.get_adjusted_ptr=function(){return GROWABLE_HEAP_U32()[this.ptr+16>>>2];};this.get_exception_ptr=function(){var isPointer=_cxa_is_pointer_type(this.get_type());if(isPointer){return GROWABLE_HEAP_U32()[this.excPtr>>>2];}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr;};}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);throw ptr;}function ___emscripten_init_main_thread_js(tb){__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB);PThread.threadInitTLS();}function ___emscripten_thread_cleanup(thread){if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({"cmd":"cleanupThread","thread":thread});}function __dlinit(main_dso_handle){}var dlopenMissingError="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function __dlopen_js(handle){abort(dlopenMissingError);}function __dlsym_catchup_js(handle,symbolIndex){abort(dlopenMissingError);}var tupleRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr);}}function simpleReadValueFromPointer(pointer){return this["fromWireType"](GROWABLE_HEAP_I32()[pointer>>>2]);}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(name===void 0){return"_unknown";}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name;}return name;}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(body);}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==void 0){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"");}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===void 0){return this.name;}else{return this.name+": "+this.message;}};return errorClass;}var InternalError=void 0;function throwInternalError(message){throw new InternalError(message);}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes;});function onComplete(typeConverters2){var myTypeConverters=getTypeConverters(typeConverters2);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count");}for(var i=0;i>>0]){ret+=embind_charCodes[GROWABLE_HEAP_U8()[c++>>>0]];}return ret;}var BindingError=void 0;function throwBindingError(message){throw new BindingError(message);}function registerType(rawType,registeredInstance){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance");}var name=registeredInstance.name;if(!rawType){throwBindingError('type "'+name+'" must have a positive integer typeid pointer');}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return;}else{throwBindingError("Cannot register type '"+name+"' twice");}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(function(cb){return cb();});}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function fromWireType(wt){return!!wt;},"toWireType":function toWireType(destructors,o){return o?trueValue:falseValue;},"argPackAdvance":8,"readValueFromPointer":function readValueFromPointer(pointer){var heap;if(size===1){heap=GROWABLE_HEAP_I8();}else if(size===2){heap=GROWABLE_HEAP_I16();}else if(size===4){heap=GROWABLE_HEAP_I32();}else{throw new TypeError("Unknown boolean type size: "+name);}return this["fromWireType"](heap[pointer>>>shift]);},destructorFunction:null});}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false;}if(!(other instanceof ClassHandle)){return false;}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass;}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass;}return leftClass===rightClass&&left===right;}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType};}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name;}throwBindingError(getInstanceTypeName(obj)+" instance already deleted");}var finalizationRegistry=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr);}else{$$.ptrType.registeredClass.rawDestructor($$.ptr);}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=$$.count.value===0;if(toDelete){runDestructor($$);}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr;}if(desiredClass.baseClass===void 0){return null;}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null;}return desiredClass.downcast(rv);}var registeredPointers={};function getInheritedInstanceCount(){return Object.keys(registeredInstances).length;}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k]);}}return rv;}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]();}}var delayFunction=void 0;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes);}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction;}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===void 0){throwBindingError("ptr should not be undefined");}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass;}return ptr;}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr];}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType");}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified");}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}));}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null;}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(registeredInstance!==void 0){if(registeredInstance.$$.count.value===0){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]();}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv;}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr});}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr});}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this);}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType;}else{toType=registeredPointerRecord.pointerType;}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this);}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr});}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp});}}function attachFinalizer(handle){if(typeof FinalizationRegistry==="undefined"){attachFinalizer=function attachFinalizer(handle2){return handle2;};return handle;}finalizationRegistry=new FinalizationRegistry(function(info){releaseClassHandle(info.$$);});attachFinalizer=function attachFinalizer(handle2){var $$=handle2.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle2,info,handle2);}return handle2;};detachFinalizer=function detachFinalizer(handle2){return finalizationRegistry.unregister(handle2);};return attachFinalizer(handle);}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this;}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone;}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion");}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=void 0;this.$$.ptr=void 0;}}function ClassHandle_isDeleted(){return!this.$$.ptr;}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion");}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes);}this.$$.deleteScheduled=true;return this;}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater;}function ClassHandle(){}function ensureOverloadTable(proto,methodName,humanName){if(proto[methodName].overloadTable===void 0){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!");}return proto[methodName].overloadTable[arguments.length].apply(this,arguments);};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc;}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(numArguments===void 0||Module[name].overloadTable!==void 0&&Module[name].overloadTable[numArguments]!==void 0){throwBindingError("Cannot register public name '"+name+"' twice");}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!");}Module[name].overloadTable[numArguments]=value;}else{Module[name]=value;if(numArguments!==void 0){Module[name].numArguments=numArguments;}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[];}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name);}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass;}return ptr;}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}return 0;}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr;}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr);}return ptr;}else{return 0;}}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(handle.$$.smartPtr===void 0){throwBindingError("Passing raw pointer to smart pointer is illegal");}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr;}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name);}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr;}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]();}));if(destructors!==null){destructors.push(this.rawDestructor,ptr);}}break;default:throwBindingError("Unsupporting sharing policy");}}return ptr;}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}return 0;}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr;}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr);}return ptr;}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr);}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]();}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType;}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===void 0){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null;}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null;}}else{this["toWireType"]=genericPointerToWireType;}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol");}if(Module[name].overloadTable!==void 0&&numArguments!==void 0){Module[name].overloadTable[numArguments]=value;}else{Module[name]=value;Module[name].argCount=numArguments;}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr);}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args);}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn;}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache);};}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction);}return getWasmTableEntry(rawFunction);}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError("unknown function pointer with signature "+signature+": "+rawFunction);}return fp;}var UnboundTypeError=void 0;function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free2(ptr);return rv;}function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return;}if(registeredTypes[type]){return;}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return;}unboundTypes.push(type);seen[type]=true;}types.forEach(visit);throw new UnboundTypeError(message+": "+unboundTypes.map(getTypeName).join([", "]));}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast);}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast);}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError("Cannot construct "+name+" due to unbound types",[baseClassRawType]);});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype;}else{basePrototype=ClassHandle.prototype;}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name);}if(registeredClass.constructor_body===void 0){throw new BindingError(name+" has no accessible constructor");}var body=registeredClass.constructor_body[arguments.length];if(body===void 0){throw new BindingError("Tried to invoke ctor of "+name+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(registeredClass.constructor_body).toString()+") parameters instead!");}return body.apply(this,arguments);});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter];});}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i>>2]);}return array;}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError("new_ called with constructor type "+_typeof(constructor)+" which is not a function");}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy();var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj;}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired;}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n";}else{for(var i=isClassMethodFunc?1:2;i0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(classType.registeredClass.constructor_body===void 0){classType.registeredClass.constructor_body=[];}if(classType.registeredClass.constructor_body[argCount-1]!==void 0){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");}classType.registeredClass.constructor_body[argCount-1]=function(){throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes);};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[];});return[];});}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)];}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName);}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes);}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(method===void 0||method.overloadTable===void 0&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler;}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler;}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(proto[methodName].overloadTable===void 0){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction;}else{proto[methodName].overloadTable[argCount-2]=memberFunction;}return[];});return[];});}var emval_free_list=[];var emval_handle_array=[{},{value:void 0},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&--emval_handle_array[handle].refcount===0){emval_handle_array[handle]=void 0;emval_free_list.push(handle);}}function count_emval_handles(){var count=0;for(var i=5;i>>0]);};case 1:return function(pointer){var heap=signed?GROWABLE_HEAP_I16():GROWABLE_HEAP_U16();return this["fromWireType"](heap[pointer>>>1]);};case 2:return function(pointer){var heap=signed?GROWABLE_HEAP_I32():GROWABLE_HEAP_U32();return this["fromWireType"](heap[pointer>>>2]);};default:throw new TypeError("Unknown integer type: "+name);}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function fromWireType(c){return this.constructor.values[c];},"toWireType":function toWireType(destructors,c){return c.value;},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor);}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(impl===void 0){throwBindingError(humanName+" has unknown type "+getTypeName(rawType));}return impl;}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value;}function embindRepr(v){if(v===null){return"null";}var t=_typeof(v);if(t==="object"||t==="array"||t==="function"){return v.toString();}else{return""+v;}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F32()[pointer>>>2]);};case 3:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F64()[pointer>>>3]);};default:throw new TypeError("Unknown float type: "+name);}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function fromWireType(value){return value;},"toWireType":function toWireType(destructors,value){return value;},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null});}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes);},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes2){var invokerArgsArray=[argTypes2[0],null].concat(argTypes2.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[];});}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return GROWABLE_HEAP_I8()[pointer>>>0];}:function readU8FromPointer(pointer){return GROWABLE_HEAP_U8()[pointer>>>0];};case 1:return signed?function readS16FromPointer(pointer){return GROWABLE_HEAP_I16()[pointer>>>1];}:function readU16FromPointer(pointer){return GROWABLE_HEAP_U16()[pointer>>>1];};case 2:return signed?function readS32FromPointer(pointer){return GROWABLE_HEAP_I32()[pointer>>>2];}:function readU32FromPointer(pointer){return GROWABLE_HEAP_U32()[pointer>>>2];};default:throw new TypeError("Unknown integer type: "+name);}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);var shift=getShiftFromSize(size);var fromWireType=function fromWireType(value){return value;};if(minRange===0){var bitshift=32-8*size;fromWireType=function fromWireType(value){return value<>>bitshift;};}var isUnsignedType=name.includes("unsigned");var checkAssertions=function checkAssertions(value,toTypeName){};var toWireType;if(isUnsignedType){toWireType=function toWireType(destructors,value){checkAssertions(value,this.name);return value>>>0;};}else{toWireType=function toWireType(destructors,value){checkAssertions(value,this.name);return value;};}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null});}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=GROWABLE_HEAP_U32();var size=heap[handle>>>0];var data=heap[handle+1>>>0];return new TA(heap.buffer,data,size);}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true});}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function fromWireType(value){var length=GROWABLE_HEAP_U32()[value>>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||GROWABLE_HEAP_U8()[currentBytePtr>>>0]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===void 0){str=stringSegment;}else{str+=String.fromCharCode(0);str+=stringSegment;}decodeStartPtr=currentBytePtr+1;}}}else{var a=new Array(length);for(var i=0;i>>0]);}str=a.join("");}_free2(value);return str;},"toWireType":function toWireType(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value);}var length;var valueIsOfTypeString=typeof value=="string";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError("Cannot pass non-string to std::string");}if(stdStringIsUTF8&&valueIsOfTypeString){length=lengthBytesUTF8(value);}else{length=value.length;}var base=_malloc2(4+length+1);var ptr=base+4;ptr>>>=0;GROWABLE_HEAP_U32()[base>>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1);}else{if(valueIsOfTypeString){for(var i=0;i255){_free2(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits");}GROWABLE_HEAP_U8()[ptr+i>>>0]=charCode;}}else{for(var i=0;i>>0]=value[i];}}}if(destructors!==null){destructors.push(_free2,base);}return base;},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function destructorFunction(ptr){_free2(ptr);}});}var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&GROWABLE_HEAP_U16()[idx>>>0]){++idx;}endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(GROWABLE_HEAP_U8().slice(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=GROWABLE_HEAP_I16()[ptr+i*2>>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit);}return str;}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===void 0){maxBytesToWrite=2147483647;}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>>1]=codeUnit;outPtr+=2;}GROWABLE_HEAP_I16()[outPtr>>>1]=0;return outPtr-startPtr;}function lengthBytesUTF16(str){return str.length*2;}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=GROWABLE_HEAP_I32()[ptr+i*4>>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023);}else{str+=String.fromCharCode(utf32);}}return str;}function stringToUTF32(str,outPtr,maxBytesToWrite){outPtr>>>=0;if(maxBytesToWrite===void 0){maxBytesToWrite=2147483647;}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023;}GROWABLE_HEAP_I32()[outPtr>>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break;}GROWABLE_HEAP_I32()[outPtr>>>2]=0;return outPtr-startPtr;}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4;}return len;}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=function getHeap(){return GROWABLE_HEAP_U16();};shift=1;}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function getHeap(){return GROWABLE_HEAP_U32();};shift=2;}registerType(rawType,{name:name,"fromWireType":function fromWireType(value){var length=GROWABLE_HEAP_U32()[value>>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===void 0){str=stringSegment;}else{str+=String.fromCharCode(0);str+=stringSegment;}decodeStartPtr=currentBytePtr+charSize;}}_free2(value);return str;},"toWireType":function toWireType(destructors,value){if(!(typeof value=="string")){throwBindingError("Cannot pass non-string to C++ string type "+name);}var length=lengthBytesUTF(value);var ptr=_malloc2(4+length+charSize);ptr>>>=0;GROWABLE_HEAP_U32()[ptr>>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free2,ptr);}return ptr;},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function destructorFunction(ptr){_free2(ptr);}});}function __embind_register_value_array(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){tupleRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),elements:[]};}function __embind_register_value_array_element(rawTupleType,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){tupleRegistrations[rawTupleType].elements.push({getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext});}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]};}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext});}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function fromWireType(){return void 0;},"toWireType":function toWireType(destructors,o){return void 0;}});}function __emscripten_err(str){err(UTF8ToString(str));}function executeNotifiedProxyingQueue(queue){Atomics.store(GROWABLE_HEAP_I32(),queue>>2,1);if(_pthread_self()){__emscripten_proxy_execute_task_queue(queue);}Atomics.compareExchange(GROWABLE_HEAP_I32(),queue>>2,1,0);}Module["executeNotifiedProxyingQueue"]=executeNotifiedProxyingQueue;function __emscripten_notify_task_queue(targetThreadId,currThreadId,mainThreadId,queue){if(targetThreadId==currThreadId){setTimeout(function(){return executeNotifiedProxyingQueue(queue);});}else if(ENVIRONMENT_IS_PTHREAD){postMessage({"targetThread":targetThreadId,"cmd":"processProxyingQueue","queue":queue});}else{var worker=PThread.pthreads[targetThreadId];if(!worker){return;}worker.postMessage({"cmd":"processProxyingQueue","queue":queue});}return 1;}function __emscripten_set_offscreencanvas_size(target,width,height){return-1;}function __emval_as(handle,returnType,destructorsRef){handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=Emval.toHandle(destructors);GROWABLE_HEAP_U32()[destructorsRef>>>2]=rd;return returnType["toWireType"](destructors,handle);}function emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>>2],"parameter "+i);}return a;}function __emval_call(handle,argCount,argTypes,argv){handle=Emval.toValue(handle);var types=emval_lookupTypes(argCount,argTypes);var args=new Array(argCount);for(var i=0;i4){emval_handle_array[handle].refcount+=1;}}function __emval_instanceof(object,constructor){object=Emval.toValue(object);constructor=Emval.toValue(constructor);return object instanceof constructor;}function __emval_is_number(handle){handle=Emval.toValue(handle);return typeof handle=="number";}function __emval_is_string(handle){handle=Emval.toValue(handle);return typeof handle=="string";}function __emval_new_array(){return Emval.toHandle([]);}function __emval_new_cstring(v){return Emval.toHandle(getStringOrSymbol(v));}function __emval_new_object(){return Emval.toHandle({});}function __emval_run_destructors(handle){var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle);}function __emval_set_property(handle,key,value){handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value;}function __emval_take_value(type,arg){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v);}function _abort(){abort("");}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text);}}function _emscripten_check_blocking_allowed(){if(ENVIRONMENT_IS_WORKER)return;warnOnce("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread");}var _emscripten_get_now;_emscripten_get_now=function _emscripten_get_now(){return performance.timeOrigin+performance.now();};function _emscripten_memcpy_big(dest,src,num){GROWABLE_HEAP_U8().copyWithin(dest>>>0,src>>>0,src+num>>>0);}function withStackSave(f){var stack=_stackSave();var ret=f();_stackRestore(stack);return ret;}function _emscripten_proxy_to_main_thread_js(index,sync){var numCallArgs=arguments.length-2;var outerArgs=arguments;return withStackSave(function(){var serializedNumCallArgs=numCallArgs;var args=_stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i>>0]=arg;}return _emscripten_run_in_main_runtime_thread_js2(index,serializedNumCallArgs,args,sync);});}var _emscripten_receive_on_main_thread_js_callArgs=[];function _emscripten_receive_on_main_thread_js(index,numCallArgs,args){_emscripten_receive_on_main_thread_js_callArgs.length=numCallArgs;var b=args>>3;for(var i=0;i>>0];}var func=proxiedFunctionTable[index];return func.apply(null,_emscripten_receive_on_main_thread_js_callArgs);}function getHeapMax(){return 4294901760;}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1;}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=GROWABLE_HEAP_U8().length;requestedSize=requestedSize>>>0;if(requestedSize<=oldSize){return false;}var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false;}var alignUp=function alignUp(x,multiple){return x+(multiple-x%multiple)%multiple;};for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+0.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true;}}return false;}function _emscripten_unwind_to_js_event_loop(){throw"unwind";}var ENV={};function getExecutableName(){return thisProgram||"./this.program";}function getEnvStrings(){if(!getEnvStrings.strings){var lang=((typeof navigator==="undefined"?"undefined":_typeof(navigator))=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===void 0)delete env[x];else env[x]=ENV[x];}var strings=[];for(var x in env){strings.push(x+"="+env[x]);}getEnvStrings.strings=strings;}return getEnvStrings.strings;}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>>0]=str.charCodeAt(i);}if(!dontAddNull)GROWABLE_HEAP_I8()[buffer>>>0]=0;}function _environ_get(__environ,environ_buf){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(3,1,__environ,environ_buf);var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;GROWABLE_HEAP_U32()[__environ+i*4>>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1;});return 0;}function _environ_sizes_get(penviron_count,penviron_buf_size){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(4,1,penviron_count,penviron_buf_size);var strings=getEnvStrings();GROWABLE_HEAP_U32()[penviron_count>>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1;});GROWABLE_HEAP_U32()[penviron_buf_size>>>2]=bufSize;return 0;}function _fd_close(fd){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(5,1,fd);try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>>2];var len=GROWABLE_HEAP_U32()[iov+4>>>2];iov+=8;var curr=FS.read(stream,GROWABLE_HEAP_I8(),ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>>2]=num;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(7,1,fd,offset_low,offset_high,whence,newOffset);try{var offset=convertI32PairToI53Checked(offset_low,offset_high);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[newOffset>>>2]=tempI64[0],GROWABLE_HEAP_I32()[newOffset+4>>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>>2];var len=GROWABLE_HEAP_U32()[iov+4>>>2];iov+=8;var curr=FS.write(stream,GROWABLE_HEAP_I8(),ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr;}}return ret;}function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(8,1,fd,iov,iovcnt,pnum);try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);GROWABLE_HEAP_U32()[pnum>>>2]=num;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0);}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum;}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1);}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1);}}else{newDate.setDate(newDate.getDate()+days);return newDate;}}return newDate;}function writeArrayToMemory(array,buffer){GROWABLE_HEAP_I8().set(array,buffer>>>0);}function _strftime(s,maxsize,format,tm){var tm_zone=GROWABLE_HEAP_I32()[tm+40>>>2];var date={tm_sec:GROWABLE_HEAP_I32()[tm>>>2],tm_min:GROWABLE_HEAP_I32()[tm+4>>>2],tm_hour:GROWABLE_HEAP_I32()[tm+8>>>2],tm_mday:GROWABLE_HEAP_I32()[tm+12>>>2],tm_mon:GROWABLE_HEAP_I32()[tm+16>>>2],tm_year:GROWABLE_HEAP_I32()[tm+20>>>2],tm_wday:GROWABLE_HEAP_I32()[tm+24>>>2],tm_yday:GROWABLE_HEAP_I32()[tm+28>>>2],tm_isdst:GROWABLE_HEAP_I32()[tm+32>>>2],tm_gmtoff:GROWABLE_HEAP_I32()[tm+36>>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule]);}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0;}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate());}}return compare;}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30);}}function getWeekBasedYear(date2){var thisDate=__addDays(new Date(date2.tm_year+1900,0,1),date2.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1;}return thisDate.getFullYear();}return thisDate.getFullYear()-1;}var EXPANSION_RULES_2={"%a":function a(date2){return WEEKDAYS[date2.tm_wday].substring(0,3);},"%A":function A(date2){return WEEKDAYS[date2.tm_wday];},"%b":function b(date2){return MONTHS[date2.tm_mon].substring(0,3);},"%B":function B(date2){return MONTHS[date2.tm_mon];},"%C":function C(date2){var year=date2.tm_year+1900;return leadingNulls(year/100|0,2);},"%d":function d(date2){return leadingNulls(date2.tm_mday,2);},"%e":function e(date2){return leadingSomething(date2.tm_mday,2," ");},"%g":function g(date2){return getWeekBasedYear(date2).toString().substring(2);},"%G":function G(date2){return getWeekBasedYear(date2);},"%H":function H(date2){return leadingNulls(date2.tm_hour,2);},"%I":function I(date2){var twelveHour=date2.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2);},"%j":function j(date2){return leadingNulls(date2.tm_mday+__arraySum(__isLeapYear(date2.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date2.tm_mon-1),3);},"%m":function m(date2){return leadingNulls(date2.tm_mon+1,2);},"%M":function M(date2){return leadingNulls(date2.tm_min,2);},"%n":function n(){return"\n";},"%p":function p(date2){if(date2.tm_hour>=0&&date2.tm_hour<12){return"AM";}return"PM";},"%S":function S(date2){return leadingNulls(date2.tm_sec,2);},"%t":function t(){return" ";},"%u":function u(date2){return date2.tm_wday||7;},"%U":function U(date2){var days=date2.tm_yday+7-date2.tm_wday;return leadingNulls(Math.floor(days/7),2);},"%V":function V(date2){var val=Math.floor((date2.tm_yday+7-(date2.tm_wday+6)%7)/7);if((date2.tm_wday+371-date2.tm_yday-2)%7<=2){val++;}if(!val){val=52;var dec31=(date2.tm_wday+7-date2.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date2.tm_year%400-1)){val++;}}else if(val==53){var jan1=(date2.tm_wday+371-date2.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date2.tm_year)))val=1;}return leadingNulls(val,2);},"%w":function w(date2){return date2.tm_wday;},"%W":function W(date2){var days=date2.tm_yday+7-(date2.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2);},"%y":function y(date2){return(date2.tm_year+1900).toString().substring(2);},"%Y":function Y(date2){return date2.tm_year+1900;},"%z":function z(date2){var off=date2.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4);},"%Z":function Z(date2){return date2.tm_zone;},"%%":function _(){return"%";}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date));}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0;}writeArrayToMemory(bytes,s);return bytes.length-1;}function _strftime_l(s,maxsize,format,tm,loc){return _strftime(s,maxsize,format,tm);}PThread.init();var FSNode=function FSNode(parent,name,mode,rdev){if(!parent){parent=this;}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev;};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function get(){return(this.mode&readMode)===readMode;},set:function set(val){val?this.mode|=readMode:this.mode&=~readMode;}},write:{get:function get(){return(this.mode&writeMode)===writeMode;},set:function set(val){val?this.mode|=writeMode:this.mode&=~writeMode;}},isFolder:{get:function get(){return FS.isDir(this.mode);}},isDevice:{get:function get(){return FS.isChrdev(this.mode);}}});FS.FSNode=FSNode;FS.staticInit();InternalError=Module["InternalError"]=extendError(Error,"InternalError");embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var proxiedFunctionTable=[null,_proc_exit,exitOnMainThread,_environ_get,_environ_sizes_get,_fd_close,_fd_read,_fd_seek,_fd_write];var wasmImports={"g":___cxa_throw,"T":___emscripten_init_main_thread_js,"J":___emscripten_thread_cleanup,"X":__dlinit,"_":__dlopen_js,"Z":__dlsym_catchup_js,"da":__embind_finalize_value_array,"q":__embind_finalize_value_object,"H":__embind_register_bigint,"ba":__embind_register_bool,"p":__embind_register_class,"o":__embind_register_class_constructor,"c":__embind_register_class_function,"aa":__embind_register_emval,"D":__embind_register_enum,"t":__embind_register_enum_value,"B":__embind_register_float,"d":__embind_register_function,"s":__embind_register_integer,"i":__embind_register_memory_view,"C":__embind_register_std_string,"x":__embind_register_std_wstring,"ea":__embind_register_value_array,"j":__embind_register_value_array_element,"r":__embind_register_value_object,"f":__embind_register_value_object_field,"ca":__embind_register_void,"Y":__emscripten_err,"V":__emscripten_notify_task_queue,"S":__emscripten_set_offscreencanvas_size,"n":__emval_as,"z":__emval_call,"b":__emval_decref,"F":__emval_get_global,"l":__emval_get_property,"u":__emval_incref,"ga":__emval_instanceof,"y":__emval_is_number,"E":__emval_is_string,"fa":__emval_new_array,"h":__emval_new_cstring,"w":__emval_new_object,"m":__emval_run_destructors,"k":__emval_set_property,"e":__emval_take_value,"A":_abort,"U":_emscripten_check_blocking_allowed,"v":_emscripten_get_now,"W":_emscripten_memcpy_big,"R":_emscripten_receive_on_main_thread_js,"P":_emscripten_resize_heap,"$":_emscripten_unwind_to_js_event_loop,"L":_environ_get,"M":_environ_sizes_get,"I":_exit,"N":_fd_close,"O":_fd_read,"G":_fd_seek,"Q":_fd_write,"a":wasmMemory||Module["wasmMemory"],"K":_strftime_l};createWasm();var _malloc2=function _malloc(){return(_malloc2=Module["asm"]["ja"]).apply(null,arguments);};Module["__emscripten_tls_init"]=function(){return(Module["__emscripten_tls_init"]=Module["asm"]["ka"]).apply(null,arguments);};var _pthread_self=Module["_pthread_self"]=function(){return(_pthread_self=Module["_pthread_self"]=Module["asm"]["la"]).apply(null,arguments);};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["ma"]).apply(null,arguments);};Module["__embind_initialize_bindings"]=function(){return(Module["__embind_initialize_bindings"]=Module["asm"]["na"]).apply(null,arguments);};var __emscripten_thread_init=Module["__emscripten_thread_init"]=function(){return(__emscripten_thread_init=Module["__emscripten_thread_init"]=Module["asm"]["oa"]).apply(null,arguments);};Module["__emscripten_thread_crashed"]=function(){return(Module["__emscripten_thread_crashed"]=Module["asm"]["pa"]).apply(null,arguments);};var _emscripten_run_in_main_runtime_thread_js2=function _emscripten_run_in_main_runtime_thread_js(){return(_emscripten_run_in_main_runtime_thread_js2=Module["asm"]["qa"]).apply(null,arguments);};var __emscripten_proxy_execute_task_queue=Module["__emscripten_proxy_execute_task_queue"]=function(){return(__emscripten_proxy_execute_task_queue=Module["__emscripten_proxy_execute_task_queue"]=Module["asm"]["ra"]).apply(null,arguments);};var _emscripten_thread_free_data=function __emscripten_thread_free_data(){return(_emscripten_thread_free_data=Module["asm"]["sa"]).apply(null,arguments);};var __emscripten_thread_exit=Module["__emscripten_thread_exit"]=function(){return(__emscripten_thread_exit=Module["__emscripten_thread_exit"]=Module["asm"]["ta"]).apply(null,arguments);};var _free2=function _free(){return(_free2=Module["asm"]["ua"]).apply(null,arguments);};var _emscripten_stack_set_limits2=function _emscripten_stack_set_limits(){return(_emscripten_stack_set_limits2=Module["asm"]["va"]).apply(null,arguments);};var _stackSave=function stackSave(){return(_stackSave=Module["asm"]["wa"]).apply(null,arguments);};var _stackRestore=function stackRestore(){return(_stackRestore=Module["asm"]["xa"]).apply(null,arguments);};var _stackAlloc=function stackAlloc(){return(_stackAlloc=Module["asm"]["ya"]).apply(null,arguments);};var _cxa_is_pointer_type=function ___cxa_is_pointer_type(){return(_cxa_is_pointer_type=Module["asm"]["za"]).apply(null,arguments);};Module["dynCall_jiji"]=function(){return(Module["dynCall_jiji"]=Module["asm"]["Aa"]).apply(null,arguments);};Module["dynCall_viijii"]=function(){return(Module["dynCall_viijii"]=Module["asm"]["Ba"]).apply(null,arguments);};Module["dynCall_iiiiij"]=function(){return(Module["dynCall_iiiiij"]=Module["asm"]["Ca"]).apply(null,arguments);};Module["dynCall_iiiiijj"]=function(){return(Module["dynCall_iiiiijj"]=Module["asm"]["Da"]).apply(null,arguments);};Module["dynCall_iiiiiijj"]=function(){return(Module["dynCall_iiiiiijj"]=Module["asm"]["Ea"]).apply(null,arguments);};Module["keepRuntimeAlive"]=keepRuntimeAlive;Module["wasmMemory"]=wasmMemory;Module["ExitStatus"]=ExitStatus;Module["PThread"]=PThread;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller;};function run(){if(runDependencies>0){return;}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve(Module);initRuntime();startWorker(Module);return;}preRun();if(runDependencies>0){return;}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun();}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("");},1);doRun();},1);}else{doRun();}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()();}}run();return WebIFCWasm3.ready;};}();if(_typeof(exports)==="object"&&_typeof(module)==="object")module.exports=WebIFCWasm2;else if(typeof define==="function"&&define["amd"])define([],function(){return WebIFCWasm2;});else if(_typeof(exports)==="object")exports["WebIFCWasm"]=WebIFCWasm2;}});// dist/web-ifc.js +var require_web_ifc_mt=__commonJS({"dist/web-ifc-mt.js":function distWebIfcMtJs(exports,module){var WebIFCWasm2=function(){var _scriptDir=typeof document!=="undefined"&&document.currentScript?document.currentScript.src:void 0;return function(){var WebIFCWasm3=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};function GROWABLE_HEAP_I8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAP8;}function GROWABLE_HEAP_U8(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPU8;}function GROWABLE_HEAP_I16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAP16;}function GROWABLE_HEAP_U16(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPU16;}function GROWABLE_HEAP_I32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAP32;}function GROWABLE_HEAP_U32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPU32;}function GROWABLE_HEAP_F32(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPF32;}function GROWABLE_HEAP_F64(){if(wasmMemory.buffer!=HEAP8.buffer){updateMemoryViews();}return HEAPF64;}var Module=typeof WebIFCWasm3!="undefined"?WebIFCWasm3:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject;});var moduleOverrides=Object.assign({},Module);var thisProgram="./this.program";var quit_=function quit_(status,toThrow){throw toThrow;};var ENVIRONMENT_IS_WEB=(typeof window==="undefined"?"undefined":_typeof(window))=="object";var ENVIRONMENT_IS_WORKER=typeof importScripts=="function";var ENVIRONMENT_IS_NODE=(typeof process==="undefined"?"undefined":_typeof(process))=="object"&&_typeof(process.versions)=="object"&&typeof process.versions.node=="string";var ENVIRONMENT_IS_PTHREAD=Module["ENVIRONMENT_IS_PTHREAD"]||false;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory);}return scriptDirectory+path;}var read_,readAsync,readBinary;if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(ENVIRONMENT_IS_WORKER){scriptDirectory=self.location.href;}else if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src;}if(_scriptDir){scriptDirectory=_scriptDir;}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1);}else{scriptDirectory="";}{read_=function read_(url){var xhr=new XMLHttpRequest();xhr.open("GET",url,false);xhr.send(null);return xhr.responseText;};if(ENVIRONMENT_IS_WORKER){readBinary=function readBinary(url){var xhr=new XMLHttpRequest();xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response);};}readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest();xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return;}onerror();};xhr.onerror=onerror;xhr.send(null);};}}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"]);if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"])quit_=Module["quit"];var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];var noExitRuntime=Module["noExitRuntime"]||true;if((typeof WebAssembly==="undefined"?"undefined":_typeof(WebAssembly))!="object"){abort("no native wasm support detected");}var wasmMemory;var wasmModule;var ABORT=false;var EXITSTATUS;function assert(condition,text){if(!condition){abort(text);}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){idx>>>=0;var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx)){++endPtr;}if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.buffer instanceof SharedArrayBuffer?heapOrArray.slice(idx,endPtr):heapOrArray.subarray(idx,endPtr));}var str="";while(idx>10,56320|ch&1023);}}return str;}function UTF8ToString(ptr,maxBytesToRead){ptr>>>=0;return ptr?UTF8ArrayToString(GROWABLE_HEAP_U8(),ptr,maxBytesToRead):"";}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){outIdx>>>=0;if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023;}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++>>>0]=u;}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++>>>0]=192|u>>6;heap[outIdx++>>>0]=128|u&63;}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++>>>0]=224|u>>12;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63;}else{if(outIdx+3>=endIdx)break;heap[outIdx++>>>0]=240|u>>18;heap[outIdx++>>>0]=128|u>>12&63;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63;}}heap[outIdx>>>0]=0;return outIdx-startIdx;}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,GROWABLE_HEAP_U8(),outPtr,maxBytesToWrite);}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i;}else{len+=3;}}return len;}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);}var INITIAL_MEMORY=Module["INITIAL_MEMORY"]||16777216;assert(INITIAL_MEMORY>=5242880,"INITIAL_MEMORY should be larger than STACK_SIZE, was "+INITIAL_MEMORY+"! (STACK_SIZE="+5242880+")");if(ENVIRONMENT_IS_PTHREAD){wasmMemory=Module["wasmMemory"];}else{if(Module["wasmMemory"]){wasmMemory=Module["wasmMemory"];}else{wasmMemory=new WebAssembly.Memory({"initial":INITIAL_MEMORY/65536,"maximum":4294967296/65536,"shared":true});if(!(wasmMemory.buffer instanceof SharedArrayBuffer)){err("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag");if(ENVIRONMENT_IS_NODE){err("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)");}throw Error("bad memory");}}}updateMemoryViews();INITIAL_MEMORY=wasmMemory.buffer.byteLength;var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];function keepRuntimeAlive(){return noExitRuntime;}function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift());}}callRuntimeCallbacks(__ATPRERUN__);}function initRuntime(){if(ENVIRONMENT_IS_PTHREAD)return;if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;callRuntimeCallbacks(__ATINIT__);}function postRun(){if(ENVIRONMENT_IS_PTHREAD)return;if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift());}}callRuntimeCallbacks(__ATPOSTRUN__);}function addOnPreRun(cb){__ATPRERUN__.unshift(cb);}function addOnInit(cb){__ATINIT__.unshift(cb);}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb);}var runDependencies=0;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id;}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback();}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what);}what="Aborted("+what+")";err(what);ABORT=true;EXITSTATUS=1;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e;}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix);}var wasmBinaryFile;wasmBinaryFile="web-ifc-mt.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile);}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary);}if(readBinary){return readBinary(file);}throw"both async and sync fetching of the wasm failed";}catch(err2){abort(err2);}}function getBinaryPromise(){if(!wasmBinary&&(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)){if(typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";}return response["arrayBuffer"]();})["catch"](function(){return getBinary(wasmBinaryFile);});}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile);});}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module2){var exports3=instance.exports;Module["asm"]=exports3;registerTLSInit(Module["asm"]["ka"]);wasmTable=Module["asm"]["ia"];addOnInit(Module["asm"]["ha"]);wasmModule=module2;PThread.loadWasmModuleToAllWorkers(function(){return removeRunDependency();});}addRunDependency();function receiveInstantiationResult(result){receiveInstance(result["instance"],result["module"]);}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info);}).then(function(instance){return instance;}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason);});}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult);});});}else{return instantiateArrayBuffer(receiveInstantiationResult);}}if(Module["instantiateWasm"]){try{var exports2=Module["instantiateWasm"](info,receiveInstance);return exports2;}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e);}}instantiateAsync()["catch"](readyPromiseReject);return{};}var tempDouble;var tempI64;function ExitStatus(status){this.name="ExitStatus";this.message="Program terminated with exit("+status+")";this.status=status;}function killThread(pthread_ptr){var worker=PThread.pthreads[pthread_ptr];delete PThread.pthreads[pthread_ptr];worker.terminate();_emscripten_thread_free_data(pthread_ptr);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;}function cancelThread(pthread_ptr){var worker=PThread.pthreads[pthread_ptr];worker.postMessage({"cmd":"cancel"});}function cleanupThread(pthread_ptr){var worker=PThread.pthreads[pthread_ptr];assert(worker);PThread.returnWorkerToPool(worker);}function spawnThread(threadParams){var worker=PThread.getNewWorker();if(!worker){return 6;}PThread.runningWorkers.push(worker);PThread.pthreads[threadParams.pthread_ptr]=worker;worker.pthread_ptr=threadParams.pthread_ptr;var msg={"cmd":"run","start_routine":threadParams.startRoutine,"arg":threadParams.arg,"pthread_ptr":threadParams.pthread_ptr};worker.postMessage(msg,threadParams.transferList);return 0;}var PATH={isAbs:function isAbs(path){return path.charAt(0)==="/";},splitPath:function splitPath(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1);},normalizeArray:function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1);}else if(last===".."){parts.splice(i,1);up++;}else if(up){parts.splice(i,1);up--;}}if(allowAboveRoot){for(;up;up--){parts.unshift("..");}}return parts;},normalize:function normalize(path){var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p;}),!isAbsolute).join("/");if(!path&&!isAbsolute){path=".";}if(path&&trailingSlash){path+="/";}return(isAbsolute?"/":"")+path;},dirname:function dirname(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return".";}if(dir){dir=dir.substr(0,dir.length-1);}return root+dir;},basename:function basename(path){if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1);},join:function join(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"));},join2:function join2(l,r){return PATH.normalize(l+"/"+r);}};function getRandomDevice(){if((typeof crypto==="undefined"?"undefined":_typeof(crypto))=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0];};}else return function(){return abort("randomDevice");};}var PATH_FS={resolve:function resolve(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings");}else if(!path){return"";}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path);}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p;}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||".";},relative:function relative(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break;}if(start>end)return[];return arr.slice(start,end-start+1);}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array;}var TTY={ttys:[],init:function init(){},shutdown:function shutdown(){},register:function register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops);},stream_ops:{open:function open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43);}stream.tty=tty;stream.seekable=false;},close:function close(stream){stream.tty.ops.fsync(stream.tty);},fsync:function fsync(stream){stream.tty.ops.fsync(stream.tty);},read:function read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60);}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[];}}},default_tty1_ops:{put_char:function put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[];}else{if(val!=0)tty.output.push(val);}},fsync:function fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[];}}}};function mmapAlloc(size){abort();}var MEMFS={ops_table:null,mount:function mount(_mount){return MEMFS.createNode(null,"/",16384|511,0);},createNode:function createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63);}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={};}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null;}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream;}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream;}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp;}return node;},getFileDataAsTypedArray:function getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents);},expandFileStorage:function expandFileStorage(node,newCapacity){newCapacity>>>=0;var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);},resizeFileStorage:function resizeFileStorage(node,newSize){newSize>>>=0;if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)));}node.usedBytes=newSize;}},node_ops:{getattr:function getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096;}else if(FS.isFile(node.mode)){attr.size=node.usedBytes;}else if(FS.isLink(node.mode)){attr.size=node.link.length;}else{attr.size=0;}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr;},setattr:function setattr(node,attr){if(attr.mode!==void 0){node.mode=attr.mode;}if(attr.timestamp!==void 0){node.timestamp=attr.timestamp;}if(attr.size!==void 0){MEMFS.resizeFileStorage(node,attr.size);}},lookup:function lookup(parent,name){throw FS.genericErrors[44];},mknod:function mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev);},rename:function rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name);}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55);}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir;},unlink:function unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now();},rmdir:function rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55);}delete parent.contents[name];parent.timestamp=Date.now();},readdir:function readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue;}entries.push(key);}return entries;},symlink:function symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node;},readlink:function readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28);}return node.link;}},stream_ops:{read:function read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset);}else{for(var i=0;i0||position+length>>=0;GROWABLE_HEAP_I8().set(contents,ptr>>>0);}return{ptr:ptr,allocated:allocated};},msync:function msync(stream,buffer,offset,length,mmapFlags){MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0;}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency();},function(event){if(onerror){onerror();}else{throw'Loading data file "'+url+'" failed.';}});if(dep)addRunDependency();}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function lookupPath(path){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32);}var parts=path.split("/").filter(function(p){return!!p;});var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32);}}}}return{path:current_path,node:current};},getPath:function getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path;}path=path?node.name+"/"+path:node.name;node=node.parent;}},hashName:function hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length;},hashAddNode:function hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node;},hashRemoveNode:function hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next;}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break;}current=current.name_next;}}},lookupNode:function lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent);}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node;}}return FS.lookup(parent,name);},createNode:function createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node;},destroyNode:function destroyNode(node){FS.hashRemoveNode(node);},isRoot:function isRoot(node){return node===node.parent;},isMountpoint:function isMountpoint(node){return!!node.mounted;},isFile:function isFile(mode){return(mode&61440)===32768;},isDir:function isDir(mode){return(mode&61440)===16384;},isLink:function isLink(mode){return(mode&61440)===40960;},isChrdev:function isChrdev(mode){return(mode&61440)===8192;},isBlkdev:function isBlkdev(mode){return(mode&61440)===24576;},isFIFO:function isFIFO(mode){return(mode&61440)===4096;},isSocket:function isSocket(mode){return(mode&49152)===49152;},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:function modeStringToFlags(str){var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str);}return flags;},flagsToPermissionString:function flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w";}return perms;},nodePermissions:function nodePermissions(node,perms){if(FS.ignorePermissions){return 0;}if(perms.includes("r")&&!(node.mode&292)){return 2;}else if(perms.includes("w")&&!(node.mode&146)){return 2;}else if(perms.includes("x")&&!(node.mode&73)){return 2;}return 0;},mayLookup:function mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0;},mayCreate:function mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20;}catch(e){}return FS.nodePermissions(dir,"wx");},mayDelete:function mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name);}catch(e){return e.errno;}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode;}if(isdir){if(!FS.isDir(node.mode)){return 54;}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10;}}else{if(FS.isDir(node.mode)){return 31;}}return 0;},mayOpen:function mayOpen(node,flags){if(!node){return 44;}if(FS.isLink(node.mode)){return 32;}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31;}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags));},MAX_OPEN_FDS:4096,nextfd:function nextfd(){var fd_start=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var fd_end=arguments.length>1&&arguments[1]!==undefined?arguments[1]:FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd;}}throw new FS.ErrnoError(33);},getStream:function getStream(fd){return FS.streams[fd];},createStream:function createStream(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){this.shared={};};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function get(){return this.node;},set:function set(val){this.node=val;}},isRead:{get:function get(){return(this.flags&2097155)!==1;}},isWrite:{get:function get(){return(this.flags&2097155)!==0;}},isAppend:{get:function get(){return this.flags&1024;}},flags:{get:function get(){return this.shared.flags;},set:function set(val){this.shared.flags=val;}},position:{get:function get(){return this.shared.position;},set:function set(val){this.shared.position=val;}}});}stream=Object.assign(new FS.FSStream(),stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream;},closeStream:function closeStream(fd){FS.streams[fd]=null;},chrdev_stream_ops:{open:function open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream);}},llseek:function llseek(){throw new FS.ErrnoError(70);}},major:function major(dev){return dev>>8;},minor:function minor(dev){return dev&255;},makedev:function makedev(ma,mi){return ma<<8|mi;},registerDevice:function registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops};},getDevice:function getDevice(dev){return FS.devices[dev];},getMounts:function getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts);}return mounts;},syncfs:function syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false;}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode);}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode);}return;}if(++completed>=mounts.length){doCallback(null);}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null);}mount.type.syncfs(mount,populate,done);});},mount:function mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10);}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10);}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54);}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot;}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount);}}return mountRoot;},unmount:function unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28);}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current);}current=next;}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1);},lookup:function lookup(parent,name){return parent.node_ops.lookup(parent,name);},mknod:function mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28);}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode);}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63);}return parent.node_ops.mknod(parent,name,mode,dev);},create:function create(path,mode){mode=mode!==void 0?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0);},mkdir:function mkdir(path,mode){mode=mode!==void 0?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0);},mkdirTree:function mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i>>=0;if(length<0||position<0){throw new FS.ErrnoError(28);}if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31);}if(!stream.stream_ops.read){throw new FS.ErrnoError(28);}var seeking=typeof position!="undefined";if(!seeking){position=stream.position;}else if(!stream.seekable){throw new FS.ErrnoError(70);}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead;},write:function write(stream,buffer,offset,length,position,canOwn){offset>>>=0;if(length<0||position<0){throw new FS.ErrnoError(28);}if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31);}if(!stream.stream_ops.write){throw new FS.ErrnoError(28);}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2);}var seeking=typeof position!="undefined";if(!seeking){position=stream.position;}else if(!stream.seekable){throw new FS.ErrnoError(70);}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten;},allocate:function allocate(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if(offset<0||length<=0){throw new FS.ErrnoError(28);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8);}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43);}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138);}stream.stream_ops.allocate(stream,offset,length);},mmap:function mmap(stream,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2);}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43);}return stream.stream_ops.mmap(stream,length,position,prot,flags);},msync:function msync(stream,buffer,offset,length,mmapFlags){offset>>>=0;if(!stream.stream_ops.msync){return 0;}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags);},munmap:function munmap(stream){return 0;},ioctl:function ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59);}return stream.stream_ops.ioctl(stream,cmd,arg);},readFile:function readFile(path){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"');}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0);}else if(opts.encoding==="binary"){ret=buf;}FS.close(stream);return ret;},writeFile:function writeFile(path,data){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,void 0,opts.canOwn);}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,void 0,opts.canOwn);}else{throw new Error("Unsupported data type");}FS.close(stream);},cwd:function cwd(){return FS.currentPath;},chdir:function chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44);}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54);}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode);}FS.currentPath=lookup.path;},createDefaultDirectories:function createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user");},createDefaultDevices:function createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:function read(){return 0;},write:function write(stream,buffer,offset,length,pos){return length;}});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp");},createSpecialDirectories:function createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:function mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:function lookup(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function readlink(){return stream.path;}}};ret.parent=ret;return ret;}};return node;}},{},"/proc/self/fd");},createStandardStreams:function createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"]);}else{FS.symlink("/dev/tty","/dev/stdin");}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"]);}else{FS.symlink("/dev/tty","/dev/stdout");}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"]);}else{FS.symlink("/dev/tty1","/dev/stderr");}FS.open("/dev/stdin",0);FS.open("/dev/stdout",1);FS.open("/dev/stderr",1);},ensureErrnoError:function ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno2){this.errno=errno2;};this.setErrno(errno);this.message="FS error";};FS.ErrnoError.prototype=new Error();FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack="";});},staticInit:function staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS};},init:function init(input,output,error){FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams();},quit:function quit(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return void 0;}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset];};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter;};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest();xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function doXHR(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr2=new XMLHttpRequest();xhr2.open("GET",url,false);if(datalength!==chunkSize)xhr2.setRequestHeader("Range","bytes="+from+"-"+to);xhr2.responseType="arraybuffer";if(xhr2.overrideMimeType){xhr2.overrideMimeType("text/plain; charset=x-user-defined");}xhr2.send(null);if(!(xhr2.status>=200&&xhr2.status<300||xhr2.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr2.status);if(xhr2.response!==void 0){return new Uint8Array(xhr2.response||[]);}return intArrayFromString(xhr2.responseText||"",true);};var lazyArray2=this;lazyArray2.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray2.chunks[chunkNum]=="undefined"){lazyArray2.chunks[chunkNum]=doXHR(start,end);}if(typeof lazyArray2.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray2.chunks[chunkNum];});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed");}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true;};if(typeof XMLHttpRequest!="undefined"){if(!ENVIRONMENT_IS_WORKER)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array();Object.defineProperties(lazyArray,{length:{get:function get(){if(!this.lengthKnown){this.cacheLength();}return this._length;}},chunkSize:{get:function get(){if(!this.lengthKnown){this.cacheLength();}return this._chunkSize;}}});var properties={isDevice:false,contents:lazyArray};}else{var properties={isDevice:false,url:url};}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents;}else if(properties.url){node.contents=null;node.url=properties.url;}Object.defineProperties(node,{usedBytes:{get:function get(){return this.contents.length;}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments);};});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:function(){};var onerror=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION);}catch(e){return onerror(e);}openRequest.onupgradeneeded=function(){out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME);};openRequest.onsuccess=function(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror();}paths.forEach(function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function(){ok++;if(ok+fail==total)finish();};putRequest.onerror=function(){fail++;if(ok+fail==total)finish();};});transaction.onerror=onerror;};openRequest.onerror=onerror;},loadFilesFromDB:function loadFilesFromDB(paths){var onload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};var onerror=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION);}catch(e){return onerror(e);}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly");}catch(e){onerror(e);return;}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror();}paths.forEach(function(path){var getRequest=files.get(path);getRequest.onsuccess=function(){if(FS.analyzePath(path).exists){FS.unlink(path);}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish();};getRequest.onerror=function(){fail++;if(ok+fail==total)finish();};});transaction.onerror=onerror;};openRequest.onerror=onerror;}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path;}var dir;if(dirfd===-100){dir=FS.cwd();}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path;}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44);}return dir;}return PATH.join2(dir,path);},doStat:function doStat(func,path,buf){try{var stat=func(path);}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54;}throw e;}GROWABLE_HEAP_I32()[buf>>>2]=stat.dev;GROWABLE_HEAP_I32()[buf+8>>>2]=stat.ino;GROWABLE_HEAP_I32()[buf+12>>>2]=stat.mode;GROWABLE_HEAP_U32()[buf+16>>>2]=stat.nlink;GROWABLE_HEAP_I32()[buf+20>>>2]=stat.uid;GROWABLE_HEAP_I32()[buf+24>>>2]=stat.gid;GROWABLE_HEAP_I32()[buf+28>>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+40>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+44>>>2]=tempI64[1];GROWABLE_HEAP_I32()[buf+48>>>2]=4096;GROWABLE_HEAP_I32()[buf+52>>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+56>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+60>>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+64>>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+72>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+76>>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+80>>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+88>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+92>>>2]=tempI64[1];GROWABLE_HEAP_U32()[buf+96>>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[buf+104>>>2]=tempI64[0],GROWABLE_HEAP_I32()[buf+108>>>2]=tempI64[1];return 0;},doMsync:function doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43);}if(flags&2){return 0;}addr>>>=0;var buffer=GROWABLE_HEAP_U8().slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags);},varargs:void 0,get:function get(){SYSCALLS.varargs+=4;var ret=GROWABLE_HEAP_I32()[SYSCALLS.varargs-4>>>2];return ret;},getStr:function getStr(ptr){var ret=UTF8ToString(ptr);return ret;},getStreamFromFD:function getStreamFromFD(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream;}};function _proc_exit(code){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(1,1,code);EXITSTATUS=code;if(!keepRuntimeAlive()){PThread.terminateAllThreads();if(Module["onExit"])Module["onExit"](code);ABORT=true;}quit_(code,new ExitStatus(code));}function exitJS(status,implicit){EXITSTATUS=status;if(!implicit){if(ENVIRONMENT_IS_PTHREAD){exitOnMainThread(status);throw"unwind";}}_proc_exit(status);}var _exit=exitJS;function handleException(e){if(e instanceof ExitStatus||e=="unwind"){return EXITSTATUS;}quit_(1,e);}var PThread={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function init(){if(ENVIRONMENT_IS_PTHREAD){PThread.initWorker();}else{PThread.initMainThread();}},initMainThread:function initMainThread(){var pthreadPoolSize=navigator.hardwareConcurrency;while(pthreadPoolSize--){PThread.allocateUnusedWorker();}},initWorker:function initWorker(){noExitRuntime=false;},setExitStatus:function setExitStatus(status){EXITSTATUS=status;},terminateAllThreads:function terminateAllThreads(){for(var _i570=0,_Object$values2=Object.values(PThread.pthreads);_i570<_Object$values2.length;_i570++){var worker=_Object$values2[_i570];PThread.returnWorkerToPool(worker);}var _iterator42=_createForOfIteratorHelper(PThread.unusedWorkers),_step42;try{for(_iterator42.s();!(_step42=_iterator42.n()).done;){var worker=_step42.value;worker.terminate();}}catch(err){_iterator42.e(err);}finally{_iterator42.f();}PThread.unusedWorkers=[];},returnWorkerToPool:function returnWorkerToPool(worker){var pthread_ptr=worker.pthread_ptr;delete PThread.pthreads[pthread_ptr];PThread.unusedWorkers.push(worker);PThread.runningWorkers.splice(PThread.runningWorkers.indexOf(worker),1);worker.pthread_ptr=0;_emscripten_thread_free_data(pthread_ptr);},receiveObjectTransfer:function receiveObjectTransfer(data){},threadInitTLS:function threadInitTLS(){PThread.tlsInitFunctions.forEach(function(f){return f();});},loadWasmModuleToWorker:function loadWasmModuleToWorker(worker){return new Promise(function(onFinishedLoading){worker.onmessage=function(e){var d=e["data"];var cmd=d["cmd"];if(worker.pthread_ptr)PThread.currentProxiedOperationCallerThread=worker.pthread_ptr;if(d["targetThread"]&&d["targetThread"]!=_pthread_self()){var targetWorker=PThread.pthreads[d.targetThread];if(targetWorker){targetWorker.postMessage(d,d["transferList"]);}else{err('Internal error! Worker sent a message "'+cmd+'" to target pthread '+d["targetThread"]+", but that thread no longer exists!");}PThread.currentProxiedOperationCallerThread=void 0;return;}if(cmd==="processProxyingQueue"){executeNotifiedProxyingQueue(d["queue"]);}else if(cmd==="spawnThread"){spawnThread(d);}else if(cmd==="cleanupThread"){cleanupThread(d["thread"]);}else if(cmd==="killThread"){killThread(d["thread"]);}else if(cmd==="cancelThread"){cancelThread(d["thread"]);}else if(cmd==="loaded"){worker.loaded=true;onFinishedLoading(worker);}else if(cmd==="print"){out("Thread "+d["threadId"]+": "+d["text"]);}else if(cmd==="printErr"){err("Thread "+d["threadId"]+": "+d["text"]);}else if(cmd==="alert"){alert("Thread "+d["threadId"]+": "+d["text"]);}else if(d.target==="setimmediate"){worker.postMessage(d);}else if(cmd==="callHandler"){Module[d["handler"]].apply(Module,_toConsumableArray(d["args"]));}else if(cmd){err("worker sent an unknown command "+cmd);}PThread.currentProxiedOperationCallerThread=void 0;};worker.onerror=function(e){var message="worker sent an error!";err(message+" "+e.filename+":"+e.lineno+": "+e.message);throw e;};var handlers=[];var knownHandlers=["onExit","onAbort","print","printErr"];for(var _i571=0,_knownHandlers=knownHandlers;_i571<_knownHandlers.length;_i571++){var handler=_knownHandlers[_i571];if(Module.hasOwnProperty(handler)){handlers.push(handler);}}worker.postMessage({"cmd":"load","handlers":handlers,"urlOrBlob":Module["mainScriptUrlOrBlob"]||_scriptDir,"wasmMemory":wasmMemory,"wasmModule":wasmModule});});},loadWasmModuleToAllWorkers:function loadWasmModuleToAllWorkers(onMaybeReady){if(ENVIRONMENT_IS_PTHREAD){return onMaybeReady();}var pthreadPoolReady=Promise.all(PThread.unusedWorkers.map(PThread.loadWasmModuleToWorker));pthreadPoolReady.then(onMaybeReady);},allocateUnusedWorker:function allocateUnusedWorker(){var worker;var pthreadMainJs=locateFile("web-ifc-mt.worker.js");worker=new Worker(pthreadMainJs);PThread.unusedWorkers.push(worker);},getNewWorker:function getNewWorker(){if(PThread.unusedWorkers.length==0){PThread.allocateUnusedWorker();PThread.loadWasmModuleToWorker(PThread.unusedWorkers[0]);}return PThread.unusedWorkers.pop();}};Module["PThread"]=PThread;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module);}}function establishStackSpace(){var pthread_ptr=_pthread_self();var stackTop=GROWABLE_HEAP_I32()[pthread_ptr+52>>>2];var stackSize=GROWABLE_HEAP_I32()[pthread_ptr+56>>>2];var stackMax=stackTop-stackSize;_emscripten_stack_set_limits2(stackTop,stackMax);_stackRestore(stackTop);}Module["establishStackSpace"]=establishStackSpace;function exitOnMainThread(returnCode){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(2,0,returnCode);try{_exit(returnCode);}catch(e){handleException(e);}}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr);}return func;}function invokeEntryPoint(ptr,arg){var result=getWasmTableEntry(ptr)(arg);if(keepRuntimeAlive()){PThread.setExitStatus(result);}else{__emscripten_thread_exit(result);}}Module["invokeEntryPoint"]=invokeEntryPoint;function registerTLSInit(tlsInitFunc){PThread.tlsInitFunctions.push(tlsInitFunc);}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){GROWABLE_HEAP_U32()[this.ptr+4>>>2]=type;};this.get_type=function(){return GROWABLE_HEAP_U32()[this.ptr+4>>>2];};this.set_destructor=function(destructor){GROWABLE_HEAP_U32()[this.ptr+8>>>2]=destructor;};this.get_destructor=function(){return GROWABLE_HEAP_U32()[this.ptr+8>>>2];};this.set_refcount=function(refcount){GROWABLE_HEAP_I32()[this.ptr>>>2]=refcount;};this.set_caught=function(caught){caught=caught?1:0;GROWABLE_HEAP_I8()[this.ptr+12>>>0]=caught;};this.get_caught=function(){return GROWABLE_HEAP_I8()[this.ptr+12>>>0]!=0;};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;GROWABLE_HEAP_I8()[this.ptr+13>>>0]=rethrown;};this.get_rethrown=function(){return GROWABLE_HEAP_I8()[this.ptr+13>>>0]!=0;};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false);};this.add_ref=function(){Atomics.add(GROWABLE_HEAP_I32(),this.ptr+0>>2,1);};this.release_ref=function(){var prev=Atomics.sub(GROWABLE_HEAP_I32(),this.ptr+0>>2,1);return prev===1;};this.set_adjusted_ptr=function(adjustedPtr){GROWABLE_HEAP_U32()[this.ptr+16>>>2]=adjustedPtr;};this.get_adjusted_ptr=function(){return GROWABLE_HEAP_U32()[this.ptr+16>>>2];};this.get_exception_ptr=function(){var isPointer=_cxa_is_pointer_type(this.get_type());if(isPointer){return GROWABLE_HEAP_U32()[this.excPtr>>>2];}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr;};}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);throw ptr;}function ___emscripten_init_main_thread_js(tb){__emscripten_thread_init(tb,!ENVIRONMENT_IS_WORKER,1,!ENVIRONMENT_IS_WEB);PThread.threadInitTLS();}function ___emscripten_thread_cleanup(thread){if(!ENVIRONMENT_IS_PTHREAD)cleanupThread(thread);else postMessage({"cmd":"cleanupThread","thread":thread});}function __dlinit(main_dso_handle){}var dlopenMissingError="To use dlopen, you need enable dynamic linking, see https://github.com/emscripten-core/emscripten/wiki/Linking";function __dlopen_js(handle){abort(dlopenMissingError);}function __dlsym_catchup_js(handle,symbolIndex){abort(dlopenMissingError);}var tupleRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr);}}function simpleReadValueFromPointer(pointer){return this["fromWireType"](GROWABLE_HEAP_I32()[pointer>>>2]);}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(name===void 0){return"_unknown";}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name;}return name;}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(body);}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==void 0){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"");}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===void 0){return this.name;}else{return this.name+": "+this.message;}};return errorClass;}var InternalError=void 0;function throwInternalError(message){throw new InternalError(message);}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes;});function onComplete(typeConverters2){var myTypeConverters=getTypeConverters(typeConverters2);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count");}for(var i=0;i>>0]){ret+=embind_charCodes[GROWABLE_HEAP_U8()[c++>>>0]];}return ret;}var BindingError=void 0;function throwBindingError(message){throw new BindingError(message);}function registerType(rawType,registeredInstance){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance");}var name=registeredInstance.name;if(!rawType){throwBindingError('type "'+name+'" must have a positive integer typeid pointer');}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return;}else{throwBindingError("Cannot register type '"+name+"' twice");}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(function(cb){return cb();});}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function fromWireType(wt){return!!wt;},"toWireType":function toWireType(destructors,o){return o?trueValue:falseValue;},"argPackAdvance":8,"readValueFromPointer":function readValueFromPointer(pointer){var heap;if(size===1){heap=GROWABLE_HEAP_I8();}else if(size===2){heap=GROWABLE_HEAP_I16();}else if(size===4){heap=GROWABLE_HEAP_I32();}else{throw new TypeError("Unknown boolean type size: "+name);}return this["fromWireType"](heap[pointer>>>shift]);},destructorFunction:null});}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false;}if(!(other instanceof ClassHandle)){return false;}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass;}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass;}return leftClass===rightClass&&left===right;}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType};}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name;}throwBindingError(getInstanceTypeName(obj)+" instance already deleted");}var finalizationRegistry=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr);}else{$$.ptrType.registeredClass.rawDestructor($$.ptr);}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=$$.count.value===0;if(toDelete){runDestructor($$);}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr;}if(desiredClass.baseClass===void 0){return null;}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null;}return desiredClass.downcast(rv);}var registeredPointers={};function getInheritedInstanceCount(){return Object.keys(registeredInstances).length;}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k]);}}return rv;}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]();}}var delayFunction=void 0;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes);}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction;}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===void 0){throwBindingError("ptr should not be undefined");}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass;}return ptr;}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr];}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType");}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified");}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}));}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null;}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(registeredInstance!==void 0){if(registeredInstance.$$.count.value===0){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]();}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv;}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr});}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr});}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this);}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType;}else{toType=registeredPointerRecord.pointerType;}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this);}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr});}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp});}}function attachFinalizer(handle){if(typeof FinalizationRegistry==="undefined"){attachFinalizer=function attachFinalizer(handle2){return handle2;};return handle;}finalizationRegistry=new FinalizationRegistry(function(info){releaseClassHandle(info.$$);});attachFinalizer=function attachFinalizer(handle2){var $$=handle2.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle2,info,handle2);}return handle2;};detachFinalizer=function detachFinalizer(handle2){return finalizationRegistry.unregister(handle2);};return attachFinalizer(handle);}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this;}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone;}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion");}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=void 0;this.$$.ptr=void 0;}}function ClassHandle_isDeleted(){return!this.$$.ptr;}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion");}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes);}this.$$.deleteScheduled=true;return this;}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater;}function ClassHandle(){}function ensureOverloadTable(proto,methodName,humanName){if(proto[methodName].overloadTable===void 0){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!");}return proto[methodName].overloadTable[arguments.length].apply(this,arguments);};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc;}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(numArguments===void 0||Module[name].overloadTable!==void 0&&Module[name].overloadTable[numArguments]!==void 0){throwBindingError("Cannot register public name '"+name+"' twice");}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!");}Module[name].overloadTable[numArguments]=value;}else{Module[name]=value;if(numArguments!==void 0){Module[name].numArguments=numArguments;}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[];}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name);}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass;}return ptr;}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}return 0;}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr;}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr);}return ptr;}else{return 0;}}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(handle.$$.smartPtr===void 0){throwBindingError("Passing raw pointer to smart pointer is illegal");}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr;}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name);}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr;}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]();}));if(destructors!==null){destructors.push(this.rawDestructor,ptr);}}break;default:throwBindingError("Unsupporting sharing policy");}}return ptr;}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}return 0;}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr;}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr);}return ptr;}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr);}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]();}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType;}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===void 0){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null;}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null;}}else{this["toWireType"]=genericPointerToWireType;}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol");}if(Module[name].overloadTable!==void 0&&numArguments!==void 0){Module[name].overloadTable[numArguments]=value;}else{Module[name]=value;Module[name].argCount=numArguments;}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr);}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args);}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn;}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache);};}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction);}return getWasmTableEntry(rawFunction);}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError("unknown function pointer with signature "+signature+": "+rawFunction);}return fp;}var UnboundTypeError=void 0;function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free2(ptr);return rv;}function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return;}if(registeredTypes[type]){return;}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return;}unboundTypes.push(type);seen[type]=true;}types.forEach(visit);throw new UnboundTypeError(message+": "+unboundTypes.map(getTypeName).join([", "]));}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast);}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast);}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError("Cannot construct "+name+" due to unbound types",[baseClassRawType]);});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype;}else{basePrototype=ClassHandle.prototype;}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name);}if(registeredClass.constructor_body===void 0){throw new BindingError(name+" has no accessible constructor");}var body=registeredClass.constructor_body[arguments.length];if(body===void 0){throw new BindingError("Tried to invoke ctor of "+name+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(registeredClass.constructor_body).toString()+") parameters instead!");}return body.apply(this,arguments);});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter];});}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i>>2]);}return array;}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError("new_ called with constructor type "+_typeof(constructor)+" which is not a function");}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy();var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj;}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired;}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n";}else{for(var i=isClassMethodFunc?1:2;i0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(classType.registeredClass.constructor_body===void 0){classType.registeredClass.constructor_body=[];}if(classType.registeredClass.constructor_body[argCount-1]!==void 0){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");}classType.registeredClass.constructor_body[argCount-1]=function(){throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes);};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[];});return[];});}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)];}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName);}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes);}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(method===void 0||method.overloadTable===void 0&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler;}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler;}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(proto[methodName].overloadTable===void 0){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction;}else{proto[methodName].overloadTable[argCount-2]=memberFunction;}return[];});return[];});}var emval_free_list=[];var emval_handle_array=[{},{value:void 0},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&--emval_handle_array[handle].refcount===0){emval_handle_array[handle]=void 0;emval_free_list.push(handle);}}function count_emval_handles(){var count=0;for(var i=5;i>>0]);};case 1:return function(pointer){var heap=signed?GROWABLE_HEAP_I16():GROWABLE_HEAP_U16();return this["fromWireType"](heap[pointer>>>1]);};case 2:return function(pointer){var heap=signed?GROWABLE_HEAP_I32():GROWABLE_HEAP_U32();return this["fromWireType"](heap[pointer>>>2]);};default:throw new TypeError("Unknown integer type: "+name);}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function fromWireType(c){return this.constructor.values[c];},"toWireType":function toWireType(destructors,c){return c.value;},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor);}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(impl===void 0){throwBindingError(humanName+" has unknown type "+getTypeName(rawType));}return impl;}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value;}function embindRepr(v){if(v===null){return"null";}var t=_typeof(v);if(t==="object"||t==="array"||t==="function"){return v.toString();}else{return""+v;}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F32()[pointer>>>2]);};case 3:return function(pointer){return this["fromWireType"](GROWABLE_HEAP_F64()[pointer>>>3]);};default:throw new TypeError("Unknown float type: "+name);}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function fromWireType(value){return value;},"toWireType":function toWireType(destructors,value){return value;},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null});}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes);},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes2){var invokerArgsArray=[argTypes2[0],null].concat(argTypes2.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[];});}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return GROWABLE_HEAP_I8()[pointer>>>0];}:function readU8FromPointer(pointer){return GROWABLE_HEAP_U8()[pointer>>>0];};case 1:return signed?function readS16FromPointer(pointer){return GROWABLE_HEAP_I16()[pointer>>>1];}:function readU16FromPointer(pointer){return GROWABLE_HEAP_U16()[pointer>>>1];};case 2:return signed?function readS32FromPointer(pointer){return GROWABLE_HEAP_I32()[pointer>>>2];}:function readU32FromPointer(pointer){return GROWABLE_HEAP_U32()[pointer>>>2];};default:throw new TypeError("Unknown integer type: "+name);}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);var shift=getShiftFromSize(size);var fromWireType=function fromWireType(value){return value;};if(minRange===0){var bitshift=32-8*size;fromWireType=function fromWireType(value){return value<>>bitshift;};}var isUnsignedType=name.includes("unsigned");var checkAssertions=function checkAssertions(value,toTypeName){};var toWireType;if(isUnsignedType){toWireType=function toWireType(destructors,value){checkAssertions(value,this.name);return value>>>0;};}else{toWireType=function toWireType(destructors,value){checkAssertions(value,this.name);return value;};}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null});}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=GROWABLE_HEAP_U32();var size=heap[handle>>>0];var data=heap[handle+1>>>0];return new TA(heap.buffer,data,size);}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true});}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function fromWireType(value){var length=GROWABLE_HEAP_U32()[value>>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||GROWABLE_HEAP_U8()[currentBytePtr>>>0]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===void 0){str=stringSegment;}else{str+=String.fromCharCode(0);str+=stringSegment;}decodeStartPtr=currentBytePtr+1;}}}else{var a=new Array(length);for(var i=0;i>>0]);}str=a.join("");}_free2(value);return str;},"toWireType":function toWireType(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value);}var length;var valueIsOfTypeString=typeof value=="string";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError("Cannot pass non-string to std::string");}if(stdStringIsUTF8&&valueIsOfTypeString){length=lengthBytesUTF8(value);}else{length=value.length;}var base=_malloc2(4+length+1);var ptr=base+4;ptr>>>=0;GROWABLE_HEAP_U32()[base>>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1);}else{if(valueIsOfTypeString){for(var i=0;i255){_free2(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits");}GROWABLE_HEAP_U8()[ptr+i>>>0]=charCode;}}else{for(var i=0;i>>0]=value[i];}}}if(destructors!==null){destructors.push(_free2,base);}return base;},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function destructorFunction(ptr){_free2(ptr);}});}var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&GROWABLE_HEAP_U16()[idx>>>0]){++idx;}endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(GROWABLE_HEAP_U8().slice(ptr,endPtr));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=GROWABLE_HEAP_I16()[ptr+i*2>>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit);}return str;}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===void 0){maxBytesToWrite=2147483647;}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>>1]=codeUnit;outPtr+=2;}GROWABLE_HEAP_I16()[outPtr>>>1]=0;return outPtr-startPtr;}function lengthBytesUTF16(str){return str.length*2;}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=GROWABLE_HEAP_I32()[ptr+i*4>>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023);}else{str+=String.fromCharCode(utf32);}}return str;}function stringToUTF32(str,outPtr,maxBytesToWrite){outPtr>>>=0;if(maxBytesToWrite===void 0){maxBytesToWrite=2147483647;}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023;}GROWABLE_HEAP_I32()[outPtr>>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break;}GROWABLE_HEAP_I32()[outPtr>>>2]=0;return outPtr-startPtr;}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4;}return len;}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=function getHeap(){return GROWABLE_HEAP_U16();};shift=1;}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function getHeap(){return GROWABLE_HEAP_U32();};shift=2;}registerType(rawType,{name:name,"fromWireType":function fromWireType(value){var length=GROWABLE_HEAP_U32()[value>>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===void 0){str=stringSegment;}else{str+=String.fromCharCode(0);str+=stringSegment;}decodeStartPtr=currentBytePtr+charSize;}}_free2(value);return str;},"toWireType":function toWireType(destructors,value){if(!(typeof value=="string")){throwBindingError("Cannot pass non-string to C++ string type "+name);}var length=lengthBytesUTF(value);var ptr=_malloc2(4+length+charSize);ptr>>>=0;GROWABLE_HEAP_U32()[ptr>>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free2,ptr);}return ptr;},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function destructorFunction(ptr){_free2(ptr);}});}function __embind_register_value_array(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){tupleRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),elements:[]};}function __embind_register_value_array_element(rawTupleType,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){tupleRegistrations[rawTupleType].elements.push({getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext});}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]};}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext});}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function fromWireType(){return void 0;},"toWireType":function toWireType(destructors,o){return void 0;}});}function __emscripten_err(str){err(UTF8ToString(str));}function executeNotifiedProxyingQueue(queue){Atomics.store(GROWABLE_HEAP_I32(),queue>>2,1);if(_pthread_self()){__emscripten_proxy_execute_task_queue(queue);}Atomics.compareExchange(GROWABLE_HEAP_I32(),queue>>2,1,0);}Module["executeNotifiedProxyingQueue"]=executeNotifiedProxyingQueue;function __emscripten_notify_task_queue(targetThreadId,currThreadId,mainThreadId,queue){if(targetThreadId==currThreadId){setTimeout(function(){return executeNotifiedProxyingQueue(queue);});}else if(ENVIRONMENT_IS_PTHREAD){postMessage({"targetThread":targetThreadId,"cmd":"processProxyingQueue","queue":queue});}else{var worker=PThread.pthreads[targetThreadId];if(!worker){return;}worker.postMessage({"cmd":"processProxyingQueue","queue":queue});}return 1;}function __emscripten_set_offscreencanvas_size(target,width,height){return-1;}function __emval_as(handle,returnType,destructorsRef){handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=Emval.toHandle(destructors);GROWABLE_HEAP_U32()[destructorsRef>>>2]=rd;return returnType["toWireType"](destructors,handle);}function emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>>2],"parameter "+i);}return a;}function __emval_call(handle,argCount,argTypes,argv){handle=Emval.toValue(handle);var types=emval_lookupTypes(argCount,argTypes);var args=new Array(argCount);for(var i=0;i4){emval_handle_array[handle].refcount+=1;}}function __emval_instanceof(object,constructor){object=Emval.toValue(object);constructor=Emval.toValue(constructor);return object instanceof constructor;}function __emval_is_number(handle){handle=Emval.toValue(handle);return typeof handle=="number";}function __emval_is_string(handle){handle=Emval.toValue(handle);return typeof handle=="string";}function __emval_new_array(){return Emval.toHandle([]);}function __emval_new_cstring(v){return Emval.toHandle(getStringOrSymbol(v));}function __emval_new_object(){return Emval.toHandle({});}function __emval_run_destructors(handle){var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle);}function __emval_set_property(handle,key,value){handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value;}function __emval_take_value(type,arg){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v);}function _abort(){abort("");}function warnOnce(text){if(!warnOnce.shown)warnOnce.shown={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;err(text);}}function _emscripten_check_blocking_allowed(){if(ENVIRONMENT_IS_WORKER)return;warnOnce("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread");}var _emscripten_get_now;_emscripten_get_now=function _emscripten_get_now(){return performance.timeOrigin+performance.now();};function _emscripten_memcpy_big(dest,src,num){GROWABLE_HEAP_U8().copyWithin(dest>>>0,src>>>0,src+num>>>0);}function withStackSave(f){var stack=_stackSave();var ret=f();_stackRestore(stack);return ret;}function _emscripten_proxy_to_main_thread_js(index,sync){var numCallArgs=arguments.length-2;var outerArgs=arguments;return withStackSave(function(){var serializedNumCallArgs=numCallArgs;var args=_stackAlloc(serializedNumCallArgs*8);var b=args>>3;for(var i=0;i>>0]=arg;}return _emscripten_run_in_main_runtime_thread_js2(index,serializedNumCallArgs,args,sync);});}var _emscripten_receive_on_main_thread_js_callArgs=[];function _emscripten_receive_on_main_thread_js(index,numCallArgs,args){_emscripten_receive_on_main_thread_js_callArgs.length=numCallArgs;var b=args>>3;for(var i=0;i>>0];}var func=proxiedFunctionTable[index];return func.apply(null,_emscripten_receive_on_main_thread_js_callArgs);}function getHeapMax(){return 4294901760;}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1;}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=GROWABLE_HEAP_U8().length;requestedSize=requestedSize>>>0;if(requestedSize<=oldSize){return false;}var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false;}var alignUp=function alignUp(x,multiple){return x+(multiple-x%multiple)%multiple;};for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+0.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true;}}return false;}function _emscripten_unwind_to_js_event_loop(){throw"unwind";}var ENV={};function getExecutableName(){return thisProgram||"./this.program";}function getEnvStrings(){if(!getEnvStrings.strings){var lang=((typeof navigator==="undefined"?"undefined":_typeof(navigator))=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===void 0)delete env[x];else env[x]=ENV[x];}var strings=[];for(var x in env){strings.push(x+"="+env[x]);}getEnvStrings.strings=strings;}return getEnvStrings.strings;}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>>0]=str.charCodeAt(i);}if(!dontAddNull)GROWABLE_HEAP_I8()[buffer>>>0]=0;}function _environ_get(__environ,environ_buf){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(3,1,__environ,environ_buf);var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;GROWABLE_HEAP_U32()[__environ+i*4>>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1;});return 0;}function _environ_sizes_get(penviron_count,penviron_buf_size){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(4,1,penviron_count,penviron_buf_size);var strings=getEnvStrings();GROWABLE_HEAP_U32()[penviron_count>>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1;});GROWABLE_HEAP_U32()[penviron_buf_size>>>2]=bufSize;return 0;}function _fd_close(fd){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(5,1,fd);try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>>2];var len=GROWABLE_HEAP_U32()[iov+4>>>2];iov+=8;var curr=FS.read(stream,GROWABLE_HEAP_I8(),ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>>2]=num;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(7,1,fd,offset_low,offset_high,whence,newOffset);try{var offset=convertI32PairToI53Checked(offset_low,offset_high);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],GROWABLE_HEAP_I32()[newOffset>>>2]=tempI64[0],GROWABLE_HEAP_I32()[newOffset+4>>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>>2];var len=GROWABLE_HEAP_U32()[iov+4>>>2];iov+=8;var curr=FS.write(stream,GROWABLE_HEAP_I8(),ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr;}}return ret;}function _fd_write(fd,iov,iovcnt,pnum){if(ENVIRONMENT_IS_PTHREAD)return _emscripten_proxy_to_main_thread_js(8,1,fd,iov,iovcnt,pnum);try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);GROWABLE_HEAP_U32()[pnum>>>2]=num;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0);}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum;}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1);}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1);}}else{newDate.setDate(newDate.getDate()+days);return newDate;}}return newDate;}function writeArrayToMemory(array,buffer){GROWABLE_HEAP_I8().set(array,buffer>>>0);}function _strftime(s,maxsize,format,tm){var tm_zone=GROWABLE_HEAP_I32()[tm+40>>>2];var date={tm_sec:GROWABLE_HEAP_I32()[tm>>>2],tm_min:GROWABLE_HEAP_I32()[tm+4>>>2],tm_hour:GROWABLE_HEAP_I32()[tm+8>>>2],tm_mday:GROWABLE_HEAP_I32()[tm+12>>>2],tm_mon:GROWABLE_HEAP_I32()[tm+16>>>2],tm_year:GROWABLE_HEAP_I32()[tm+20>>>2],tm_wday:GROWABLE_HEAP_I32()[tm+24>>>2],tm_yday:GROWABLE_HEAP_I32()[tm+28>>>2],tm_isdst:GROWABLE_HEAP_I32()[tm+32>>>2],tm_gmtoff:GROWABLE_HEAP_I32()[tm+36>>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule]);}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0;}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate());}}return compare;}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30);}}function getWeekBasedYear(date2){var thisDate=__addDays(new Date(date2.tm_year+1900,0,1),date2.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1;}return thisDate.getFullYear();}return thisDate.getFullYear()-1;}var EXPANSION_RULES_2={"%a":function a(date2){return WEEKDAYS[date2.tm_wday].substring(0,3);},"%A":function A(date2){return WEEKDAYS[date2.tm_wday];},"%b":function b(date2){return MONTHS[date2.tm_mon].substring(0,3);},"%B":function B(date2){return MONTHS[date2.tm_mon];},"%C":function C(date2){var year=date2.tm_year+1900;return leadingNulls(year/100|0,2);},"%d":function d(date2){return leadingNulls(date2.tm_mday,2);},"%e":function e(date2){return leadingSomething(date2.tm_mday,2," ");},"%g":function g(date2){return getWeekBasedYear(date2).toString().substring(2);},"%G":function G(date2){return getWeekBasedYear(date2);},"%H":function H(date2){return leadingNulls(date2.tm_hour,2);},"%I":function I(date2){var twelveHour=date2.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2);},"%j":function j(date2){return leadingNulls(date2.tm_mday+__arraySum(__isLeapYear(date2.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date2.tm_mon-1),3);},"%m":function m(date2){return leadingNulls(date2.tm_mon+1,2);},"%M":function M(date2){return leadingNulls(date2.tm_min,2);},"%n":function n(){return"\n";},"%p":function p(date2){if(date2.tm_hour>=0&&date2.tm_hour<12){return"AM";}return"PM";},"%S":function S(date2){return leadingNulls(date2.tm_sec,2);},"%t":function t(){return" ";},"%u":function u(date2){return date2.tm_wday||7;},"%U":function U(date2){var days=date2.tm_yday+7-date2.tm_wday;return leadingNulls(Math.floor(days/7),2);},"%V":function V(date2){var val=Math.floor((date2.tm_yday+7-(date2.tm_wday+6)%7)/7);if((date2.tm_wday+371-date2.tm_yday-2)%7<=2){val++;}if(!val){val=52;var dec31=(date2.tm_wday+7-date2.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date2.tm_year%400-1)){val++;}}else if(val==53){var jan1=(date2.tm_wday+371-date2.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date2.tm_year)))val=1;}return leadingNulls(val,2);},"%w":function w(date2){return date2.tm_wday;},"%W":function W(date2){var days=date2.tm_yday+7-(date2.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2);},"%y":function y(date2){return(date2.tm_year+1900).toString().substring(2);},"%Y":function Y(date2){return date2.tm_year+1900;},"%z":function z(date2){var off=date2.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4);},"%Z":function Z(date2){return date2.tm_zone;},"%%":function _(){return"%";}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date));}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0;}writeArrayToMemory(bytes,s);return bytes.length-1;}function _strftime_l(s,maxsize,format,tm,loc){return _strftime(s,maxsize,format,tm);}PThread.init();var FSNode=function FSNode(parent,name,mode,rdev){if(!parent){parent=this;}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev;};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function get(){return(this.mode&readMode)===readMode;},set:function set(val){val?this.mode|=readMode:this.mode&=~readMode;}},write:{get:function get(){return(this.mode&writeMode)===writeMode;},set:function set(val){val?this.mode|=writeMode:this.mode&=~writeMode;}},isFolder:{get:function get(){return FS.isDir(this.mode);}},isDevice:{get:function get(){return FS.isChrdev(this.mode);}}});FS.FSNode=FSNode;FS.staticInit();InternalError=Module["InternalError"]=extendError(Error,"InternalError");embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var proxiedFunctionTable=[null,_proc_exit,exitOnMainThread,_environ_get,_environ_sizes_get,_fd_close,_fd_read,_fd_seek,_fd_write];var wasmImports={"g":___cxa_throw,"T":___emscripten_init_main_thread_js,"J":___emscripten_thread_cleanup,"X":__dlinit,"_":__dlopen_js,"Z":__dlsym_catchup_js,"da":__embind_finalize_value_array,"q":__embind_finalize_value_object,"H":__embind_register_bigint,"ba":__embind_register_bool,"p":__embind_register_class,"o":__embind_register_class_constructor,"c":__embind_register_class_function,"aa":__embind_register_emval,"D":__embind_register_enum,"t":__embind_register_enum_value,"B":__embind_register_float,"d":__embind_register_function,"s":__embind_register_integer,"i":__embind_register_memory_view,"C":__embind_register_std_string,"x":__embind_register_std_wstring,"ea":__embind_register_value_array,"j":__embind_register_value_array_element,"r":__embind_register_value_object,"f":__embind_register_value_object_field,"ca":__embind_register_void,"Y":__emscripten_err,"V":__emscripten_notify_task_queue,"S":__emscripten_set_offscreencanvas_size,"n":__emval_as,"z":__emval_call,"b":__emval_decref,"F":__emval_get_global,"l":__emval_get_property,"u":__emval_incref,"ga":__emval_instanceof,"y":__emval_is_number,"E":__emval_is_string,"fa":__emval_new_array,"h":__emval_new_cstring,"w":__emval_new_object,"m":__emval_run_destructors,"k":__emval_set_property,"e":__emval_take_value,"A":_abort,"U":_emscripten_check_blocking_allowed,"v":_emscripten_get_now,"W":_emscripten_memcpy_big,"R":_emscripten_receive_on_main_thread_js,"P":_emscripten_resize_heap,"$":_emscripten_unwind_to_js_event_loop,"L":_environ_get,"M":_environ_sizes_get,"I":_exit,"N":_fd_close,"O":_fd_read,"G":_fd_seek,"Q":_fd_write,"a":wasmMemory||Module["wasmMemory"],"K":_strftime_l};createWasm();var _malloc2=function _malloc(){return(_malloc2=Module["asm"]["ja"]).apply(null,arguments);};Module["__emscripten_tls_init"]=function(){return(Module["__emscripten_tls_init"]=Module["asm"]["ka"]).apply(null,arguments);};var _pthread_self=Module["_pthread_self"]=function(){return(_pthread_self=Module["_pthread_self"]=Module["asm"]["la"]).apply(null,arguments);};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["ma"]).apply(null,arguments);};Module["__embind_initialize_bindings"]=function(){return(Module["__embind_initialize_bindings"]=Module["asm"]["na"]).apply(null,arguments);};var __emscripten_thread_init=Module["__emscripten_thread_init"]=function(){return(__emscripten_thread_init=Module["__emscripten_thread_init"]=Module["asm"]["oa"]).apply(null,arguments);};Module["__emscripten_thread_crashed"]=function(){return(Module["__emscripten_thread_crashed"]=Module["asm"]["pa"]).apply(null,arguments);};var _emscripten_run_in_main_runtime_thread_js2=function _emscripten_run_in_main_runtime_thread_js(){return(_emscripten_run_in_main_runtime_thread_js2=Module["asm"]["qa"]).apply(null,arguments);};var __emscripten_proxy_execute_task_queue=Module["__emscripten_proxy_execute_task_queue"]=function(){return(__emscripten_proxy_execute_task_queue=Module["__emscripten_proxy_execute_task_queue"]=Module["asm"]["ra"]).apply(null,arguments);};var _emscripten_thread_free_data=function __emscripten_thread_free_data(){return(_emscripten_thread_free_data=Module["asm"]["sa"]).apply(null,arguments);};var __emscripten_thread_exit=Module["__emscripten_thread_exit"]=function(){return(__emscripten_thread_exit=Module["__emscripten_thread_exit"]=Module["asm"]["ta"]).apply(null,arguments);};var _free2=function _free(){return(_free2=Module["asm"]["ua"]).apply(null,arguments);};var _emscripten_stack_set_limits2=function _emscripten_stack_set_limits(){return(_emscripten_stack_set_limits2=Module["asm"]["va"]).apply(null,arguments);};var _stackSave=function stackSave(){return(_stackSave=Module["asm"]["wa"]).apply(null,arguments);};var _stackRestore=function stackRestore(){return(_stackRestore=Module["asm"]["xa"]).apply(null,arguments);};var _stackAlloc=function stackAlloc(){return(_stackAlloc=Module["asm"]["ya"]).apply(null,arguments);};var _cxa_is_pointer_type=function ___cxa_is_pointer_type(){return(_cxa_is_pointer_type=Module["asm"]["za"]).apply(null,arguments);};Module["dynCall_jiji"]=function(){return(Module["dynCall_jiji"]=Module["asm"]["Aa"]).apply(null,arguments);};Module["dynCall_viijii"]=function(){return(Module["dynCall_viijii"]=Module["asm"]["Ba"]).apply(null,arguments);};Module["dynCall_iiiiij"]=function(){return(Module["dynCall_iiiiij"]=Module["asm"]["Ca"]).apply(null,arguments);};Module["dynCall_iiiiijj"]=function(){return(Module["dynCall_iiiiijj"]=Module["asm"]["Da"]).apply(null,arguments);};Module["dynCall_iiiiiijj"]=function(){return(Module["dynCall_iiiiiijj"]=Module["asm"]["Ea"]).apply(null,arguments);};Module["keepRuntimeAlive"]=keepRuntimeAlive;Module["wasmMemory"]=wasmMemory;Module["ExitStatus"]=ExitStatus;Module["PThread"]=PThread;var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller;};function run(){if(runDependencies>0){return;}if(ENVIRONMENT_IS_PTHREAD){readyPromiseResolve(Module);initRuntime();startWorker(Module);return;}preRun();if(runDependencies>0){return;}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun();}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("");},1);doRun();},1);}else{doRun();}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()();}}run();return WebIFCWasm3.ready;};}();if(_typeof(exports)==="object"&&_typeof(module)==="object")module.exports=WebIFCWasm2;else if(typeof define==="function"&&define["amd"])define([],function(){return WebIFCWasm2;});else if(_typeof(exports)==="object")exports["WebIFCWasm"]=WebIFCWasm2;}});// dist/web-ifc.js var require_web_ifc=__commonJS({"dist/web-ifc.js":function distWebIfcJs(exports,module){var WebIFCWasm2=function(){var _scriptDir=typeof document!=="undefined"&&document.currentScript?document.currentScript.src:void 0;return function(){var WebIFCWasm3=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var Module=typeof WebIFCWasm3!="undefined"?WebIFCWasm3:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject;});var moduleOverrides=Object.assign({},Module);var thisProgram="./this.program";var ENVIRONMENT_IS_WEB=true;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory);}return scriptDirectory+path;}var read_,readAsync,readBinary;{if(typeof document!="undefined"&&document.currentScript){scriptDirectory=document.currentScript.src;}if(_scriptDir){scriptDirectory=_scriptDir;}if(scriptDirectory.indexOf("blob:")!==0){scriptDirectory=scriptDirectory.substr(0,scriptDirectory.replace(/[?#].*/,"").lastIndexOf("/")+1);}else{scriptDirectory="";}{read_=function read_(url){var xhr=new XMLHttpRequest();xhr.open("GET",url,false);xhr.send(null);return xhr.responseText;};readAsync=function readAsync(url,onload,onerror){var xhr=new XMLHttpRequest();xhr.open("GET",url,true);xhr.responseType="arraybuffer";xhr.onload=function(){if(xhr.status==200||xhr.status==0&&xhr.response){onload(xhr.response);return;}onerror();};xhr.onerror=onerror;xhr.send(null);};}}var out=Module["print"]||console.log.bind(console);var err=Module["printErr"]||console.warn.bind(console);Object.assign(Module,moduleOverrides);moduleOverrides=null;if(Module["arguments"]);if(Module["thisProgram"])thisProgram=Module["thisProgram"];if(Module["quit"]);var wasmBinary;if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];Module["noExitRuntime"]||true;if((typeof WebAssembly==="undefined"?"undefined":_typeof(WebAssembly))!="object"){abort("no native wasm support detected");}var wasmMemory;var ABORT=false;function assert(condition,text){if(!condition){abort(text);}}var UTF8Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(heapOrArray,idx,maxBytesToRead){idx>>>=0;var endIdx=idx+maxBytesToRead;var endPtr=idx;while(heapOrArray[endPtr]&&!(endPtr>=endIdx)){++endPtr;}if(endPtr-idx>16&&heapOrArray.buffer&&UTF8Decoder){return UTF8Decoder.decode(heapOrArray.subarray(idx,endPtr));}var str="";while(idx>10,56320|ch&1023);}}return str;}function UTF8ToString(ptr,maxBytesToRead){ptr>>>=0;return ptr?UTF8ArrayToString(HEAPU8,ptr,maxBytesToRead):"";}function stringToUTF8Array(str,heap,outIdx,maxBytesToWrite){outIdx>>>=0;if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i=55296&&u<=57343){var u1=str.charCodeAt(++i);u=65536+((u&1023)<<10)|u1&1023;}if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++>>>0]=u;}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++>>>0]=192|u>>6;heap[outIdx++>>>0]=128|u&63;}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++>>>0]=224|u>>12;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63;}else{if(outIdx+3>=endIdx)break;heap[outIdx++>>>0]=240|u>>18;heap[outIdx++>>>0]=128|u>>12&63;heap[outIdx++>>>0]=128|u>>6&63;heap[outIdx++>>>0]=128|u&63;}}heap[outIdx>>>0]=0;return outIdx-startIdx;}function stringToUTF8(str,outPtr,maxBytesToWrite){return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite);}function lengthBytesUTF8(str){var len=0;for(var i=0;i=55296&&c<=57343){len+=4;++i;}else{len+=3;}}return len;}var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateMemoryViews(){var b=wasmMemory.buffer;Module["HEAP8"]=HEAP8=new Int8Array(b);Module["HEAP16"]=HEAP16=new Int16Array(b);Module["HEAP32"]=HEAP32=new Int32Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);Module["HEAPU16"]=HEAPU16=new Uint16Array(b);Module["HEAPU32"]=HEAPU32=new Uint32Array(b);Module["HEAPF32"]=HEAPF32=new Float32Array(b);Module["HEAPF64"]=HEAPF64=new Float64Array(b);}var wasmTable;var __ATPRERUN__=[];var __ATINIT__=[];var __ATPOSTRUN__=[];function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift());}}callRuntimeCallbacks(__ATPRERUN__);}function initRuntime(){if(!Module["noFSInit"]&&!FS.init.initialized)FS.init();FS.ignorePermissions=false;callRuntimeCallbacks(__ATINIT__);}function postRun(){if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift());}}callRuntimeCallbacks(__ATPOSTRUN__);}function addOnPreRun(cb){__ATPRERUN__.unshift(cb);}function addOnInit(cb){__ATINIT__.unshift(cb);}function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb);}var runDependencies=0;var dependenciesFulfilled=null;function getUniqueRunDependency(id){return id;}function addRunDependency(id){runDependencies++;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}}function removeRunDependency(id){runDependencies--;if(Module["monitorRunDependencies"]){Module["monitorRunDependencies"](runDependencies);}if(runDependencies==0){if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback();}}}function abort(what){if(Module["onAbort"]){Module["onAbort"](what);}what="Aborted("+what+")";err(what);ABORT=true;what+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(what);readyPromiseReject(e);throw e;}var dataURIPrefix="data:application/octet-stream;base64,";function isDataURI(filename){return filename.startsWith(dataURIPrefix);}var wasmBinaryFile;wasmBinaryFile="web-ifc.wasm";if(!isDataURI(wasmBinaryFile)){wasmBinaryFile=locateFile(wasmBinaryFile);}function getBinary(file){try{if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary);}if(readBinary);throw"both async and sync fetching of the wasm failed";}catch(err2){abort(err2);}}function getBinaryPromise(){if(!wasmBinary&&ENVIRONMENT_IS_WEB){if(typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){if(!response["ok"]){throw"failed to load wasm binary file at '"+wasmBinaryFile+"'";}return response["arrayBuffer"]();})["catch"](function(){return getBinary(wasmBinaryFile);});}}return Promise.resolve().then(function(){return getBinary(wasmBinaryFile);});}function createWasm(){var info={"a":wasmImports};function receiveInstance(instance,module2){var exports3=instance.exports;Module["asm"]=exports3;wasmMemory=Module["asm"]["V"];updateMemoryViews();wasmTable=Module["asm"]["X"];addOnInit(Module["asm"]["W"]);removeRunDependency();}addRunDependency();function receiveInstantiationResult(result){receiveInstance(result["instance"]);}function instantiateArrayBuffer(receiver){return getBinaryPromise().then(function(binary){return WebAssembly.instantiate(binary,info);}).then(function(instance){return instance;}).then(receiver,function(reason){err("failed to asynchronously prepare wasm: "+reason);abort(reason);});}function instantiateAsync(){if(!wasmBinary&&typeof WebAssembly.instantiateStreaming=="function"&&!isDataURI(wasmBinaryFile)&&typeof fetch=="function"){return fetch(wasmBinaryFile,{credentials:"same-origin"}).then(function(response){var result=WebAssembly.instantiateStreaming(response,info);return result.then(receiveInstantiationResult,function(reason){err("wasm streaming compile failed: "+reason);err("falling back to ArrayBuffer instantiation");return instantiateArrayBuffer(receiveInstantiationResult);});});}else{return instantiateArrayBuffer(receiveInstantiationResult);}}if(Module["instantiateWasm"]){try{var exports2=Module["instantiateWasm"](info,receiveInstance);return exports2;}catch(e){err("Module.instantiateWasm callback failed with error: "+e);readyPromiseReject(e);}}instantiateAsync()["catch"](readyPromiseReject);return{};}var tempDouble;var tempI64;function callRuntimeCallbacks(callbacks){while(callbacks.length>0){callbacks.shift()(Module);}}function ExceptionInfo(excPtr){this.excPtr=excPtr;this.ptr=excPtr-24;this.set_type=function(type){HEAPU32[this.ptr+4>>>2]=type;};this.get_type=function(){return HEAPU32[this.ptr+4>>>2];};this.set_destructor=function(destructor){HEAPU32[this.ptr+8>>>2]=destructor;};this.get_destructor=function(){return HEAPU32[this.ptr+8>>>2];};this.set_refcount=function(refcount){HEAP32[this.ptr>>>2]=refcount;};this.set_caught=function(caught){caught=caught?1:0;HEAP8[this.ptr+12>>>0]=caught;};this.get_caught=function(){return HEAP8[this.ptr+12>>>0]!=0;};this.set_rethrown=function(rethrown){rethrown=rethrown?1:0;HEAP8[this.ptr+13>>>0]=rethrown;};this.get_rethrown=function(){return HEAP8[this.ptr+13>>>0]!=0;};this.init=function(type,destructor){this.set_adjusted_ptr(0);this.set_type(type);this.set_destructor(destructor);this.set_refcount(0);this.set_caught(false);this.set_rethrown(false);};this.add_ref=function(){var value=HEAP32[this.ptr>>>2];HEAP32[this.ptr>>>2]=value+1;};this.release_ref=function(){var prev=HEAP32[this.ptr>>>2];HEAP32[this.ptr>>>2]=prev-1;return prev===1;};this.set_adjusted_ptr=function(adjustedPtr){HEAPU32[this.ptr+16>>>2]=adjustedPtr;};this.get_adjusted_ptr=function(){return HEAPU32[this.ptr+16>>>2];};this.get_exception_ptr=function(){var isPointer=_cxa_is_pointer_type2(this.get_type());if(isPointer){return HEAPU32[this.excPtr>>>2];}var adjusted=this.get_adjusted_ptr();if(adjusted!==0)return adjusted;return this.excPtr;};}function ___cxa_throw(ptr,type,destructor){var info=new ExceptionInfo(ptr);info.init(type,destructor);throw ptr;}var tupleRegistrations={};function runDestructors(destructors){while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr);}}function simpleReadValueFromPointer(pointer){return this["fromWireType"](HEAP32[pointer>>>2]);}var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var char_0=48;var char_9=57;function makeLegalFunctionName(name){if(name===void 0){return"_unknown";}name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return"_"+name;}return name;}function createNamedFunction(name,body){name=makeLegalFunctionName(name);return new Function("body","return function "+name+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(body);}function extendError(baseErrorType,errorName){var errorClass=createNamedFunction(errorName,function(message){this.name=errorName;this.message=message;var stack=new Error(message).stack;if(stack!==void 0){this.stack=this.toString()+"\n"+stack.replace(/^Error(:[^\n]*)?\n/,"");}});errorClass.prototype=Object.create(baseErrorType.prototype);errorClass.prototype.constructor=errorClass;errorClass.prototype.toString=function(){if(this.message===void 0){return this.name;}else{return this.name+": "+this.message;}};return errorClass;}var InternalError=void 0;function throwInternalError(message){throw new InternalError(message);}function whenDependentTypesAreResolved(myTypes,dependentTypes,getTypeConverters){myTypes.forEach(function(type){typeDependencies[type]=dependentTypes;});function onComplete(typeConverters2){var myTypeConverters=getTypeConverters(typeConverters2);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count");}for(var i=0;i>>0]){ret+=embind_charCodes[HEAPU8[c++>>>0]];}return ret;}var BindingError=void 0;function throwBindingError(message){throw new BindingError(message);}function registerType(rawType,registeredInstance){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!("argPackAdvance"in registeredInstance)){throw new TypeError("registerType registeredInstance requires argPackAdvance");}var name=registeredInstance.name;if(!rawType){throwBindingError('type "'+name+'" must have a positive integer typeid pointer');}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return;}else{throwBindingError("Cannot register type '"+name+"' twice");}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(function(cb){return cb();});}}function __embind_register_bool(rawType,name,size,trueValue,falseValue){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function fromWireType(wt){return!!wt;},"toWireType":function toWireType(destructors,o){return o?trueValue:falseValue;},"argPackAdvance":8,"readValueFromPointer":function readValueFromPointer(pointer){var heap;if(size===1){heap=HEAP8;}else if(size===2){heap=HEAP16;}else if(size===4){heap=HEAP32;}else{throw new TypeError("Unknown boolean type size: "+name);}return this["fromWireType"](heap[pointer>>>shift]);},destructorFunction:null});}function ClassHandle_isAliasOf(other){if(!(this instanceof ClassHandle)){return false;}if(!(other instanceof ClassHandle)){return false;}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass;}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass;}return leftClass===rightClass&&left===right;}function shallowCopyInternalPointer(o){return{count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType};}function throwInstanceAlreadyDeleted(obj){function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name;}throwBindingError(getInstanceTypeName(obj)+" instance already deleted");}var finalizationRegistry=false;function detachFinalizer(handle){}function runDestructor($$){if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr);}else{$$.ptrType.registeredClass.rawDestructor($$.ptr);}}function releaseClassHandle($$){$$.count.value-=1;var toDelete=$$.count.value===0;if(toDelete){runDestructor($$);}}function downcastPointer(ptr,ptrClass,desiredClass){if(ptrClass===desiredClass){return ptr;}if(desiredClass.baseClass===void 0){return null;}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null;}return desiredClass.downcast(rv);}var registeredPointers={};function getInheritedInstanceCount(){return Object.keys(registeredInstances).length;}function getLiveInheritedInstances(){var rv=[];for(var k in registeredInstances){if(registeredInstances.hasOwnProperty(k)){rv.push(registeredInstances[k]);}}return rv;}var deletionQueue=[];function flushPendingDeletes(){while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]();}}var delayFunction=void 0;function setDelayFunction(fn){delayFunction=fn;if(deletionQueue.length&&delayFunction){delayFunction(flushPendingDeletes);}}function init_embind(){Module["getInheritedInstanceCount"]=getInheritedInstanceCount;Module["getLiveInheritedInstances"]=getLiveInheritedInstances;Module["flushPendingDeletes"]=flushPendingDeletes;Module["setDelayFunction"]=setDelayFunction;}var registeredInstances={};function getBasestPointer(class_,ptr){if(ptr===void 0){throwBindingError("ptr should not be undefined");}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass;}return ptr;}function getInheritedInstance(class_,ptr){ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr];}function makeClassHandle(prototype,record){if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType");}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified");}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record}}));}function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null;}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(registeredInstance!==void 0){if(registeredInstance.$$.count.value===0){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]();}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv;}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr});}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr:ptr});}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this);}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType;}else{toType=registeredPointerRecord.pointerType;}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this);}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr});}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp});}}function attachFinalizer(handle){if(typeof FinalizationRegistry==="undefined"){attachFinalizer=function attachFinalizer(handle2){return handle2;};return handle;}finalizationRegistry=new FinalizationRegistry(function(info){releaseClassHandle(info.$$);});attachFinalizer=function attachFinalizer(handle2){var $$=handle2.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$:$$};finalizationRegistry.register(handle2,info,handle2);}return handle2;};detachFinalizer=function detachFinalizer(handle2){return finalizationRegistry.unregister(handle2);};return attachFinalizer(handle);}function ClassHandle_clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this;}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone;}}function ClassHandle_delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion");}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=void 0;this.$$.ptr=void 0;}}function ClassHandle_isDeleted(){return!this.$$.ptr;}function ClassHandle_deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this);}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion");}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes);}this.$$.deleteScheduled=true;return this;}function init_ClassHandle(){ClassHandle.prototype["isAliasOf"]=ClassHandle_isAliasOf;ClassHandle.prototype["clone"]=ClassHandle_clone;ClassHandle.prototype["delete"]=ClassHandle_delete;ClassHandle.prototype["isDeleted"]=ClassHandle_isDeleted;ClassHandle.prototype["deleteLater"]=ClassHandle_deleteLater;}function ClassHandle(){}function ensureOverloadTable(proto,methodName,humanName){if(proto[methodName].overloadTable===void 0){var prevFunc=proto[methodName];proto[methodName]=function(){if(!proto[methodName].overloadTable.hasOwnProperty(arguments.length)){throwBindingError("Function '"+humanName+"' called with an invalid number of arguments ("+arguments.length+") - expects one of ("+proto[methodName].overloadTable+")!");}return proto[methodName].overloadTable[arguments.length].apply(this,arguments);};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc;}}function exposePublicSymbol(name,value,numArguments){if(Module.hasOwnProperty(name)){if(numArguments===void 0||Module[name].overloadTable!==void 0&&Module[name].overloadTable[numArguments]!==void 0){throwBindingError("Cannot register public name '"+name+"' twice");}ensureOverloadTable(Module,name,name);if(Module.hasOwnProperty(numArguments)){throwBindingError("Cannot register multiple overloads of a function with the same number of arguments ("+numArguments+")!");}Module[name].overloadTable[numArguments]=value;}else{Module[name]=value;if(numArguments!==void 0){Module[name].numArguments=numArguments;}}}function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[];}function upcastPointer(ptr,ptrClass,desiredClass){while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError("Expected null or instance of "+desiredClass.name+", got an instance of "+ptrClass.name);}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass;}return ptr;}function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}return 0;}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr;}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr);}return ptr;}else{return 0;}}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(handle.$$.smartPtr===void 0){throwBindingError("Passing raw pointer to smart pointer is illegal");}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr;}else{throwBindingError("Cannot convert argument of type "+(handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name)+" to parameter type "+this.name);}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr;}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(function(){clonedHandle["delete"]();}));if(destructors!==null){destructors.push(this.rawDestructor,ptr);}}break;default:throwBindingError("Unsupporting sharing policy");}}return ptr;}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError("null is not a valid "+this.name);}return 0;}if(!handle.$$){throwBindingError('Cannot pass "'+embindRepr(handle)+'" as a '+this.name);}if(!handle.$$.ptr){throwBindingError("Cannot pass deleted object as a pointer of type "+this.name);}if(handle.$$.ptrType.isConst){throwBindingError("Cannot convert argument of type "+handle.$$.ptrType.name+" to parameter type "+this.name);}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr;}function RegisteredPointer_getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr);}return ptr;}function RegisteredPointer_destructor(ptr){if(this.rawDestructor){this.rawDestructor(ptr);}}function RegisteredPointer_deleteObject(handle){if(handle!==null){handle["delete"]();}}function init_RegisteredPointer(){RegisteredPointer.prototype.getPointee=RegisteredPointer_getPointee;RegisteredPointer.prototype.destructor=RegisteredPointer_destructor;RegisteredPointer.prototype["argPackAdvance"]=8;RegisteredPointer.prototype["readValueFromPointer"]=simpleReadValueFromPointer;RegisteredPointer.prototype["deleteObject"]=RegisteredPointer_deleteObject;RegisteredPointer.prototype["fromWireType"]=RegisteredPointer_fromWireType;}function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===void 0){if(isConst){this["toWireType"]=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null;}else{this["toWireType"]=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null;}}else{this["toWireType"]=genericPointerToWireType;}}function replacePublicSymbol(name,value,numArguments){if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistant public symbol");}if(Module[name].overloadTable!==void 0&&numArguments!==void 0){Module[name].overloadTable[numArguments]=value;}else{Module[name]=value;Module[name].argCount=numArguments;}}function dynCallLegacy(sig,ptr,args){var f=Module["dynCall_"+sig];return args&&args.length?f.apply(null,[ptr].concat(args)):f.call(null,ptr);}var wasmTableMirror=[];function getWasmTableEntry(funcPtr){var func=wasmTableMirror[funcPtr];if(!func){if(funcPtr>=wasmTableMirror.length)wasmTableMirror.length=funcPtr+1;wasmTableMirror[funcPtr]=func=wasmTable.get(funcPtr);}return func;}function dynCall(sig,ptr,args){if(sig.includes("j")){return dynCallLegacy(sig,ptr,args);}var rtn=getWasmTableEntry(ptr).apply(null,args);return rtn;}function getDynCaller(sig,ptr){var argCache=[];return function(){argCache.length=0;Object.assign(argCache,arguments);return dynCall(sig,ptr,argCache);};}function embind__requireFunction(signature,rawFunction){signature=readLatin1String(signature);function makeDynCaller(){if(signature.includes("j")){return getDynCaller(signature,rawFunction);}return getWasmTableEntry(rawFunction);}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError("unknown function pointer with signature "+signature+": "+rawFunction);}return fp;}var UnboundTypeError=void 0;function getTypeName(type){var ptr=___getTypeName(type);var rv=readLatin1String(ptr);_free3(ptr);return rv;}function throwUnboundTypeError(message,types){var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return;}if(registeredTypes[type]){return;}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return;}unboundTypes.push(type);seen[type]=true;}types.forEach(visit);throw new UnboundTypeError(message+": "+unboundTypes.map(getTypeName).join([", "]));}function __embind_register_class(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor){name=readLatin1String(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);if(upcast){upcast=embind__requireFunction(upcastSignature,upcast);}if(downcast){downcast=embind__requireFunction(downcastSignature,downcast);}rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError("Cannot construct "+name+" due to unbound types",[baseClassRawType]);});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],function(base){base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype;}else{basePrototype=ClassHandle.prototype;}var constructor=createNamedFunction(legalFunctionName,function(){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError("Use 'new' to construct "+name);}if(registeredClass.constructor_body===void 0){throw new BindingError(name+" has no accessible constructor");}var body=registeredClass.constructor_body[arguments.length];if(body===void 0){throw new BindingError("Tried to invoke ctor of "+name+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(registeredClass.constructor_body).toString()+") parameters instead!");}return body.apply(this,arguments);});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter];});}function heap32VectorToArray(count,firstElement){var array=[];for(var i=0;i>>2]);}return array;}function new_(constructor,argumentList){if(!(constructor instanceof Function)){throw new TypeError("new_ called with constructor type "+_typeof(constructor)+" which is not a function");}var dummy=createNamedFunction(constructor.name||"unknownFunctionName",function(){});dummy.prototype=constructor.prototype;var obj=new dummy();var r=constructor.apply(obj,argumentList);return r instanceof Object?r:obj;}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!");}var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=false;for(var i=1;i0?", ":"")+argsListWired;}invokerFnBody+=(returns?"var rv = ":"")+"invoker(fn"+(argsListWired.length>0?", ":"")+argsListWired+");\n";if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n";}else{for(var i=isClassMethodFunc?1:2;i0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName="constructor "+classType.name;if(classType.registeredClass.constructor_body===void 0){classType.registeredClass.constructor_body=[];}if(classType.registeredClass.constructor_body[argCount-1]!==void 0){throw new BindingError("Cannot register multiple constructors with identical number of parameters ("+(argCount-1)+") for class '"+classType.name+"'! Overload resolution is currently only performed using the parameter count, not actual type info!");}classType.registeredClass.constructor_body[argCount-1]=function(){throwUnboundTypeError("Cannot construct "+classType.name+" due to unbound types",rawArgTypes);};whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[];});return[];});}function __embind_register_class_function(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual){var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=readLatin1String(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker);whenDependentTypesAreResolved([],[rawClassType],function(classType){classType=classType[0];var humanName=classType.name+"."+methodName;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)];}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName);}function unboundTypesHandler(){throwUnboundTypeError("Cannot call "+humanName+" due to unbound types",rawArgTypes);}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(method===void 0||method.overloadTable===void 0&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler;}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler;}whenDependentTypesAreResolved([],rawArgTypes,function(argTypes){var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context);if(proto[methodName].overloadTable===void 0){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction;}else{proto[methodName].overloadTable[argCount-2]=memberFunction;}return[];});return[];});}var emval_free_list=[];var emval_handle_array=[{},{value:void 0},{value:null},{value:true},{value:false}];function __emval_decref(handle){if(handle>4&&--emval_handle_array[handle].refcount===0){emval_handle_array[handle]=void 0;emval_free_list.push(handle);}}function count_emval_handles(){var count=0;for(var i=5;i>>0]);};case 1:return function(pointer){var heap=signed?HEAP16:HEAPU16;return this["fromWireType"](heap[pointer>>>1]);};case 2:return function(pointer){var heap=signed?HEAP32:HEAPU32;return this["fromWireType"](heap[pointer>>>2]);};default:throw new TypeError("Unknown integer type: "+name);}}function __embind_register_enum(rawType,name,size,isSigned){var shift=getShiftFromSize(size);name=readLatin1String(name);function ctor(){}ctor.values={};registerType(rawType,{name:name,constructor:ctor,"fromWireType":function fromWireType(c){return this.constructor.values[c];},"toWireType":function toWireType(destructors,c){return c.value;},"argPackAdvance":8,"readValueFromPointer":enumReadValueFromPointer(name,shift,isSigned),destructorFunction:null});exposePublicSymbol(name,ctor);}function requireRegisteredType(rawType,humanName){var impl=registeredTypes[rawType];if(impl===void 0){throwBindingError(humanName+" has unknown type "+getTypeName(rawType));}return impl;}function __embind_register_enum_value(rawEnumType,name,enumValue){var enumType=requireRegisteredType(rawEnumType,"enum");name=readLatin1String(name);var Enum=enumType.constructor;var Value=Object.create(enumType.constructor.prototype,{value:{value:enumValue},constructor:{value:createNamedFunction(enumType.name+"_"+name,function(){})}});Enum.values[enumValue]=Value;Enum[name]=Value;}function embindRepr(v){if(v===null){return"null";}var t=_typeof(v);if(t==="object"||t==="array"||t==="function"){return v.toString();}else{return""+v;}}function floatReadValueFromPointer(name,shift){switch(shift){case 2:return function(pointer){return this["fromWireType"](HEAPF32[pointer>>>2]);};case 3:return function(pointer){return this["fromWireType"](HEAPF64[pointer>>>3]);};default:throw new TypeError("Unknown float type: "+name);}}function __embind_register_float(rawType,name,size){var shift=getShiftFromSize(size);name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":function fromWireType(value){return value;},"toWireType":function toWireType(destructors,value){return value;},"argPackAdvance":8,"readValueFromPointer":floatReadValueFromPointer(name,shift),destructorFunction:null});}function __embind_register_function(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn){var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=readLatin1String(name);rawInvoker=embind__requireFunction(signature,rawInvoker);exposePublicSymbol(name,function(){throwUnboundTypeError("Cannot call "+name+" due to unbound types",argTypes);},argCount-1);whenDependentTypesAreResolved([],argTypes,function(argTypes2){var invokerArgsArray=[argTypes2[0],null].concat(argTypes2.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn),argCount-1);return[];});}function integerReadValueFromPointer(name,shift,signed){switch(shift){case 0:return signed?function readS8FromPointer(pointer){return HEAP8[pointer>>>0];}:function readU8FromPointer(pointer){return HEAPU8[pointer>>>0];};case 1:return signed?function readS16FromPointer(pointer){return HEAP16[pointer>>>1];}:function readU16FromPointer(pointer){return HEAPU16[pointer>>>1];};case 2:return signed?function readS32FromPointer(pointer){return HEAP32[pointer>>>2];}:function readU32FromPointer(pointer){return HEAPU32[pointer>>>2];};default:throw new TypeError("Unknown integer type: "+name);}}function __embind_register_integer(primitiveType,name,size,minRange,maxRange){name=readLatin1String(name);var shift=getShiftFromSize(size);var fromWireType=function fromWireType(value){return value;};if(minRange===0){var bitshift=32-8*size;fromWireType=function fromWireType(value){return value<>>bitshift;};}var isUnsignedType=name.includes("unsigned");var checkAssertions=function checkAssertions(value,toTypeName){};var toWireType;if(isUnsignedType){toWireType=function toWireType(destructors,value){checkAssertions(value,this.name);return value>>>0;};}else{toWireType=function toWireType(destructors,value){checkAssertions(value,this.name);return value;};}registerType(primitiveType,{name:name,"fromWireType":fromWireType,"toWireType":toWireType,"argPackAdvance":8,"readValueFromPointer":integerReadValueFromPointer(name,shift,minRange!==0),destructorFunction:null});}function __embind_register_memory_view(rawType,dataTypeIndex,name){var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){handle=handle>>2;var heap=HEAPU32;var size=heap[handle>>>0];var data=heap[handle+1>>>0];return new TA(heap.buffer,data,size);}name=readLatin1String(name);registerType(rawType,{name:name,"fromWireType":decodeMemoryView,"argPackAdvance":8,"readValueFromPointer":decodeMemoryView},{ignoreDuplicateRegistrations:true});}function __embind_register_std_string(rawType,name){name=readLatin1String(name);var stdStringIsUTF8=name==="std::string";registerType(rawType,{name:name,"fromWireType":function fromWireType(value){var length=HEAPU32[value>>>2];var payload=value+4;var str;if(stdStringIsUTF8){var decodeStartPtr=payload;for(var i=0;i<=length;++i){var currentBytePtr=payload+i;if(i==length||HEAPU8[currentBytePtr>>>0]==0){var maxRead=currentBytePtr-decodeStartPtr;var stringSegment=UTF8ToString(decodeStartPtr,maxRead);if(str===void 0){str=stringSegment;}else{str+=String.fromCharCode(0);str+=stringSegment;}decodeStartPtr=currentBytePtr+1;}}}else{var a=new Array(length);for(var i=0;i>>0]);}str=a.join("");}_free3(value);return str;},"toWireType":function toWireType(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value);}var length;var valueIsOfTypeString=typeof value=="string";if(!(valueIsOfTypeString||value instanceof Uint8Array||value instanceof Uint8ClampedArray||value instanceof Int8Array)){throwBindingError("Cannot pass non-string to std::string");}if(stdStringIsUTF8&&valueIsOfTypeString){length=lengthBytesUTF8(value);}else{length=value.length;}var base=_malloc3(4+length+1);var ptr=base+4;ptr>>>=0;HEAPU32[base>>>2]=length;if(stdStringIsUTF8&&valueIsOfTypeString){stringToUTF8(value,ptr,length+1);}else{if(valueIsOfTypeString){for(var i=0;i255){_free3(ptr);throwBindingError("String has UTF-16 code units that do not fit in 8 bits");}HEAPU8[ptr+i>>>0]=charCode;}}else{for(var i=0;i>>0]=value[i];}}}if(destructors!==null){destructors.push(_free3,base);}return base;},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function destructorFunction(ptr){_free3(ptr);}});}var UTF16Decoder=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0;function UTF16ToString(ptr,maxBytesToRead){var endPtr=ptr;var idx=endPtr>>1;var maxIdx=idx+maxBytesToRead/2;while(!(idx>=maxIdx)&&HEAPU16[idx>>>0]){++idx;}endPtr=idx<<1;if(endPtr-ptr>32&&UTF16Decoder)return UTF16Decoder.decode(HEAPU8.subarray(ptr>>>0,endPtr>>>0));var str="";for(var i=0;!(i>=maxBytesToRead/2);++i){var codeUnit=HEAP16[ptr+i*2>>>1];if(codeUnit==0)break;str+=String.fromCharCode(codeUnit);}return str;}function stringToUTF16(str,outPtr,maxBytesToWrite){if(maxBytesToWrite===void 0){maxBytesToWrite=2147483647;}if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite>>1]=codeUnit;outPtr+=2;}HEAP16[outPtr>>>1]=0;return outPtr-startPtr;}function lengthBytesUTF16(str){return str.length*2;}function UTF32ToString(ptr,maxBytesToRead){var i=0;var str="";while(!(i>=maxBytesToRead/4)){var utf32=HEAP32[ptr+i*4>>>2];if(utf32==0)break;++i;if(utf32>=65536){var ch=utf32-65536;str+=String.fromCharCode(55296|ch>>10,56320|ch&1023);}else{str+=String.fromCharCode(utf32);}}return str;}function stringToUTF32(str,outPtr,maxBytesToWrite){outPtr>>>=0;if(maxBytesToWrite===void 0){maxBytesToWrite=2147483647;}if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i=55296&&codeUnit<=57343){var trailSurrogate=str.charCodeAt(++i);codeUnit=65536+((codeUnit&1023)<<10)|trailSurrogate&1023;}HEAP32[outPtr>>>2]=codeUnit;outPtr+=4;if(outPtr+4>endPtr)break;}HEAP32[outPtr>>>2]=0;return outPtr-startPtr;}function lengthBytesUTF32(str){var len=0;for(var i=0;i=55296&&codeUnit<=57343)++i;len+=4;}return len;}function __embind_register_std_wstring(rawType,charSize,name){name=readLatin1String(name);var decodeString,encodeString,getHeap,lengthBytesUTF,shift;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16;getHeap=function getHeap(){return HEAPU16;};shift=1;}else if(charSize===4){decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32;getHeap=function getHeap(){return HEAPU32;};shift=2;}registerType(rawType,{name:name,"fromWireType":function fromWireType(value){var length=HEAPU32[value>>>2];var HEAP=getHeap();var str;var decodeStartPtr=value+4;for(var i=0;i<=length;++i){var currentBytePtr=value+4+i*charSize;if(i==length||HEAP[currentBytePtr>>>shift]==0){var maxReadBytes=currentBytePtr-decodeStartPtr;var stringSegment=decodeString(decodeStartPtr,maxReadBytes);if(str===void 0){str=stringSegment;}else{str+=String.fromCharCode(0);str+=stringSegment;}decodeStartPtr=currentBytePtr+charSize;}}_free3(value);return str;},"toWireType":function toWireType(destructors,value){if(!(typeof value=="string")){throwBindingError("Cannot pass non-string to C++ string type "+name);}var length=lengthBytesUTF(value);var ptr=_malloc3(4+length+charSize);ptr>>>=0;HEAPU32[ptr>>>2]=length>>shift;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free3,ptr);}return ptr;},"argPackAdvance":8,"readValueFromPointer":simpleReadValueFromPointer,destructorFunction:function destructorFunction(ptr){_free3(ptr);}});}function __embind_register_value_array(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){tupleRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),elements:[]};}function __embind_register_value_array_element(rawTupleType,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){tupleRegistrations[rawTupleType].elements.push({getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext});}function __embind_register_value_object(rawType,name,constructorSignature,rawConstructor,destructorSignature,rawDestructor){structRegistrations[rawType]={name:readLatin1String(name),rawConstructor:embind__requireFunction(constructorSignature,rawConstructor),rawDestructor:embind__requireFunction(destructorSignature,rawDestructor),fields:[]};}function __embind_register_value_object_field(structType,fieldName,getterReturnType,getterSignature,getter,getterContext,setterArgumentType,setterSignature,setter,setterContext){structRegistrations[structType].fields.push({fieldName:readLatin1String(fieldName),getterReturnType:getterReturnType,getter:embind__requireFunction(getterSignature,getter),getterContext:getterContext,setterArgumentType:setterArgumentType,setter:embind__requireFunction(setterSignature,setter),setterContext:setterContext});}function __embind_register_void(rawType,name){name=readLatin1String(name);registerType(rawType,{isVoid:true,name:name,"argPackAdvance":0,"fromWireType":function fromWireType(){return void 0;},"toWireType":function toWireType(destructors,o){return void 0;}});}function __emval_as(handle,returnType,destructorsRef){handle=Emval.toValue(handle);returnType=requireRegisteredType(returnType,"emval::as");var destructors=[];var rd=Emval.toHandle(destructors);HEAPU32[destructorsRef>>>2]=rd;return returnType["toWireType"](destructors,handle);}function emval_lookupTypes(argCount,argTypes){var a=new Array(argCount);for(var i=0;i>>2],"parameter "+i);}return a;}function __emval_call(handle,argCount,argTypes,argv){handle=Emval.toValue(handle);var types=emval_lookupTypes(argCount,argTypes);var args=new Array(argCount);for(var i=0;i4){emval_handle_array[handle].refcount+=1;}}function __emval_instanceof(object,constructor){object=Emval.toValue(object);constructor=Emval.toValue(constructor);return object instanceof constructor;}function __emval_is_number(handle){handle=Emval.toValue(handle);return typeof handle=="number";}function __emval_is_string(handle){handle=Emval.toValue(handle);return typeof handle=="string";}function __emval_new_array(){return Emval.toHandle([]);}function __emval_new_cstring(v){return Emval.toHandle(getStringOrSymbol(v));}function __emval_new_object(){return Emval.toHandle({});}function __emval_run_destructors(handle){var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle);}function __emval_set_property(handle,key,value){handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value;}function __emval_take_value(type,arg){type=requireRegisteredType(type,"_emval_take_value");var v=type["readValueFromPointer"](arg);return Emval.toHandle(v);}function _abort(){abort("");}function _emscripten_memcpy_big(dest,src,num){HEAPU8.copyWithin(dest>>>0,src>>>0,src+num>>>0);}function getHeapMax(){return 4294901760;}function emscripten_realloc_buffer(size){var b=wasmMemory.buffer;try{wasmMemory.grow(size-b.byteLength+65535>>>16);updateMemoryViews();return 1;}catch(e){}}function _emscripten_resize_heap(requestedSize){var oldSize=HEAPU8.length;requestedSize=requestedSize>>>0;var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){return false;}var alignUp=function alignUp(x,multiple){return x+(multiple-x%multiple)%multiple;};for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+0.2/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignUp(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=emscripten_realloc_buffer(newSize);if(replacement){return true;}}return false;}var ENV={};function getExecutableName(){return thisProgram||"./this.program";}function getEnvStrings(){if(!getEnvStrings.strings){var lang=((typeof navigator==="undefined"?"undefined":_typeof(navigator))=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8";var env={"USER":"web_user","LOGNAME":"web_user","PATH":"/","PWD":"/","HOME":"/home/web_user","LANG":lang,"_":getExecutableName()};for(var x in ENV){if(ENV[x]===void 0)delete env[x];else env[x]=ENV[x];}var strings=[];for(var x in env){strings.push(x+"="+env[x]);}getEnvStrings.strings=strings;}return getEnvStrings.strings;}function writeAsciiToMemory(str,buffer,dontAddNull){for(var i=0;i>>0]=str.charCodeAt(i);}if(!dontAddNull)HEAP8[buffer>>>0]=0;}var PATH={isAbs:function isAbs(path){return path.charAt(0)==="/";},splitPath:function splitPath(filename){var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;return splitPathRe.exec(filename).slice(1);},normalizeArray:function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1);}else if(last===".."){parts.splice(i,1);up++;}else if(up){parts.splice(i,1);up--;}}if(allowAboveRoot){for(;up;up--){parts.unshift("..");}}return parts;},normalize:function normalize(path){var isAbsolute=PATH.isAbs(path),trailingSlash=path.substr(-1)==="/";path=PATH.normalizeArray(path.split("/").filter(function(p){return!!p;}),!isAbsolute).join("/");if(!path&&!isAbsolute){path=".";}if(path&&trailingSlash){path+="/";}return(isAbsolute?"/":"")+path;},dirname:function dirname(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){return".";}if(dir){dir=dir.substr(0,dir.length-1);}return root+dir;},basename:function basename(path){if(path==="/")return"/";path=PATH.normalize(path);path=path.replace(/\/$/,"");var lastSlash=path.lastIndexOf("/");if(lastSlash===-1)return path;return path.substr(lastSlash+1);},join:function join(){var paths=Array.prototype.slice.call(arguments);return PATH.normalize(paths.join("/"));},join2:function join2(l,r){return PATH.normalize(l+"/"+r);}};function getRandomDevice(){if((typeof crypto==="undefined"?"undefined":_typeof(crypto))=="object"&&typeof crypto["getRandomValues"]=="function"){var randomBuffer=new Uint8Array(1);return function(){crypto.getRandomValues(randomBuffer);return randomBuffer[0];};}else return function(){return abort("randomDevice");};}var PATH_FS={resolve:function resolve(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();if(typeof path!="string"){throw new TypeError("Arguments to path.resolve must be strings");}else if(!path){return"";}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=PATH.isAbs(path);}resolvedPath=PATH.normalizeArray(resolvedPath.split("/").filter(function(p){return!!p;}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||".";},relative:function relative(from,to){from=PATH_FS.resolve(from).substr(1);to=PATH_FS.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break;}if(start>end)return[];return arr.slice(start,end-start+1);}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0?length:lengthBytesUTF8(stringy)+1;var u8array=new Array(len);var numBytesWritten=stringToUTF8Array(stringy,u8array,0,u8array.length);if(dontAddNull)u8array.length=numBytesWritten;return u8array;}var TTY={ttys:[],init:function init(){},shutdown:function shutdown(){},register:function register(dev,ops){TTY.ttys[dev]={input:[],output:[],ops:ops};FS.registerDevice(dev,TTY.stream_ops);},stream_ops:{open:function open(stream){var tty=TTY.ttys[stream.node.rdev];if(!tty){throw new FS.ErrnoError(43);}stream.tty=tty;stream.seekable=false;},close:function close(stream){stream.tty.ops.fsync(stream.tty);},fsync:function fsync(stream){stream.tty.ops.fsync(stream.tty);},read:function read(stream,buffer,offset,length,pos){if(!stream.tty||!stream.tty.ops.get_char){throw new FS.ErrnoError(60);}var bytesRead=0;for(var i=0;i0){out(UTF8ArrayToString(tty.output,0));tty.output=[];}}},default_tty1_ops:{put_char:function put_char(tty,val){if(val===null||val===10){err(UTF8ArrayToString(tty.output,0));tty.output=[];}else{if(val!=0)tty.output.push(val);}},fsync:function fsync(tty){if(tty.output&&tty.output.length>0){err(UTF8ArrayToString(tty.output,0));tty.output=[];}}}};function mmapAlloc(size){abort();}var MEMFS={ops_table:null,mount:function mount(_mount2){return MEMFS.createNode(null,"/",16384|511,0);},createNode:function createNode(parent,name,mode,dev){if(FS.isBlkdev(mode)||FS.isFIFO(mode)){throw new FS.ErrnoError(63);}if(!MEMFS.ops_table){MEMFS.ops_table={dir:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,lookup:MEMFS.node_ops.lookup,mknod:MEMFS.node_ops.mknod,rename:MEMFS.node_ops.rename,unlink:MEMFS.node_ops.unlink,rmdir:MEMFS.node_ops.rmdir,readdir:MEMFS.node_ops.readdir,symlink:MEMFS.node_ops.symlink},stream:{llseek:MEMFS.stream_ops.llseek}},file:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:{llseek:MEMFS.stream_ops.llseek,read:MEMFS.stream_ops.read,write:MEMFS.stream_ops.write,allocate:MEMFS.stream_ops.allocate,mmap:MEMFS.stream_ops.mmap,msync:MEMFS.stream_ops.msync}},link:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr,readlink:MEMFS.node_ops.readlink},stream:{}},chrdev:{node:{getattr:MEMFS.node_ops.getattr,setattr:MEMFS.node_ops.setattr},stream:FS.chrdev_stream_ops}};}var node=FS.createNode(parent,name,mode,dev);if(FS.isDir(node.mode)){node.node_ops=MEMFS.ops_table.dir.node;node.stream_ops=MEMFS.ops_table.dir.stream;node.contents={};}else if(FS.isFile(node.mode)){node.node_ops=MEMFS.ops_table.file.node;node.stream_ops=MEMFS.ops_table.file.stream;node.usedBytes=0;node.contents=null;}else if(FS.isLink(node.mode)){node.node_ops=MEMFS.ops_table.link.node;node.stream_ops=MEMFS.ops_table.link.stream;}else if(FS.isChrdev(node.mode)){node.node_ops=MEMFS.ops_table.chrdev.node;node.stream_ops=MEMFS.ops_table.chrdev.stream;}node.timestamp=Date.now();if(parent){parent.contents[name]=node;parent.timestamp=node.timestamp;}return node;},getFileDataAsTypedArray:function getFileDataAsTypedArray(node){if(!node.contents)return new Uint8Array(0);if(node.contents.subarray)return node.contents.subarray(0,node.usedBytes);return new Uint8Array(node.contents);},expandFileStorage:function expandFileStorage(node,newCapacity){newCapacity>>>=0;var prevCapacity=node.contents?node.contents.length:0;if(prevCapacity>=newCapacity)return;var CAPACITY_DOUBLING_MAX=1024*1024;newCapacity=Math.max(newCapacity,prevCapacity*(prevCapacity>>0);if(prevCapacity!=0)newCapacity=Math.max(newCapacity,256);var oldContents=node.contents;node.contents=new Uint8Array(newCapacity);if(node.usedBytes>0)node.contents.set(oldContents.subarray(0,node.usedBytes),0);},resizeFileStorage:function resizeFileStorage(node,newSize){newSize>>>=0;if(node.usedBytes==newSize)return;if(newSize==0){node.contents=null;node.usedBytes=0;}else{var oldContents=node.contents;node.contents=new Uint8Array(newSize);if(oldContents){node.contents.set(oldContents.subarray(0,Math.min(newSize,node.usedBytes)));}node.usedBytes=newSize;}},node_ops:{getattr:function getattr(node){var attr={};attr.dev=FS.isChrdev(node.mode)?node.id:1;attr.ino=node.id;attr.mode=node.mode;attr.nlink=1;attr.uid=0;attr.gid=0;attr.rdev=node.rdev;if(FS.isDir(node.mode)){attr.size=4096;}else if(FS.isFile(node.mode)){attr.size=node.usedBytes;}else if(FS.isLink(node.mode)){attr.size=node.link.length;}else{attr.size=0;}attr.atime=new Date(node.timestamp);attr.mtime=new Date(node.timestamp);attr.ctime=new Date(node.timestamp);attr.blksize=4096;attr.blocks=Math.ceil(attr.size/attr.blksize);return attr;},setattr:function setattr(node,attr){if(attr.mode!==void 0){node.mode=attr.mode;}if(attr.timestamp!==void 0){node.timestamp=attr.timestamp;}if(attr.size!==void 0){MEMFS.resizeFileStorage(node,attr.size);}},lookup:function lookup(parent,name){throw FS.genericErrors[44];},mknod:function mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev);},rename:function rename(old_node,new_dir,new_name){if(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name);}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(55);}}}delete old_node.parent.contents[old_node.name];old_node.parent.timestamp=Date.now();old_node.name=new_name;new_dir.contents[new_name]=old_node;new_dir.timestamp=old_node.parent.timestamp;old_node.parent=new_dir;},unlink:function unlink(parent,name){delete parent.contents[name];parent.timestamp=Date.now();},rmdir:function rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(55);}delete parent.contents[name];parent.timestamp=Date.now();},readdir:function readdir(node){var entries=[".",".."];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue;}entries.push(key);}return entries;},symlink:function symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node;},readlink:function readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(28);}return node.link;}},stream_ops:{read:function read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=stream.node.usedBytes)return 0;var size=Math.min(stream.node.usedBytes-position,length);if(size>8&&contents.subarray){buffer.set(contents.subarray(position,position+size),offset);}else{for(var i=0;i0||position+length>>=0;HEAP8.set(contents,ptr>>>0);}return{ptr:ptr,allocated:allocated};},msync:function msync(stream,buffer,offset,length,mmapFlags){MEMFS.stream_ops.write(stream,buffer,0,length,offset,false);return 0;}}};function asyncLoad(url,onload,onerror,noRunDep){var dep=!noRunDep?getUniqueRunDependency("al "+url):"";readAsync(url,function(arrayBuffer){assert(arrayBuffer,'Loading data file "'+url+'" failed (no arrayBuffer).');onload(new Uint8Array(arrayBuffer));if(dep)removeRunDependency();},function(event){if(onerror){onerror();}else{throw'Loading data file "'+url+'" failed.';}});if(dep)addRunDependency();}var FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:false,ignorePermissions:true,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:function lookupPath(path){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};path=PATH_FS.resolve(path);if(!path)return{path:"",node:null};var defaults={follow_mount:true,recurse_count:0};opts=Object.assign(defaults,opts);if(opts.recurse_count>8){throw new FS.ErrnoError(32);}var parts=path.split("/").filter(function(p){return!!p;});var current=FS.root;var current_path="/";for(var i=0;i40){throw new FS.ErrnoError(32);}}}}return{path:current_path,node:current};},getPath:function getPath(node){var path;while(true){if(FS.isRoot(node)){var mount=node.mount.mountpoint;if(!path)return mount;return mount[mount.length-1]!=="/"?mount+"/"+path:mount+path;}path=path?node.name+"/"+path:node.name;node=node.parent;}},hashName:function hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length;},hashAddNode:function hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node;},hashRemoveNode:function hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next;}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break;}current=current.name_next;}}},lookupNode:function lookupNode(parent,name){var errCode=FS.mayLookup(parent);if(errCode){throw new FS.ErrnoError(errCode,parent);}var hash=FS.hashName(parent.id,name);for(var node=FS.nameTable[hash];node;node=node.name_next){var nodeName=node.name;if(node.parent.id===parent.id&&nodeName===name){return node;}}return FS.lookup(parent,name);},createNode:function createNode(parent,name,mode,rdev){var node=new FS.FSNode(parent,name,mode,rdev);FS.hashAddNode(node);return node;},destroyNode:function destroyNode(node){FS.hashRemoveNode(node);},isRoot:function isRoot(node){return node===node.parent;},isMountpoint:function isMountpoint(node){return!!node.mounted;},isFile:function isFile(mode){return(mode&61440)===32768;},isDir:function isDir(mode){return(mode&61440)===16384;},isLink:function isLink(mode){return(mode&61440)===40960;},isChrdev:function isChrdev(mode){return(mode&61440)===8192;},isBlkdev:function isBlkdev(mode){return(mode&61440)===24576;},isFIFO:function isFIFO(mode){return(mode&61440)===4096;},isSocket:function isSocket(mode){return(mode&49152)===49152;},flagModes:{"r":0,"r+":2,"w":577,"w+":578,"a":1089,"a+":1090},modeStringToFlags:function modeStringToFlags(str){var flags=FS.flagModes[str];if(typeof flags=="undefined"){throw new Error("Unknown file open mode: "+str);}return flags;},flagsToPermissionString:function flagsToPermissionString(flag){var perms=["r","w","rw"][flag&3];if(flag&512){perms+="w";}return perms;},nodePermissions:function nodePermissions(node,perms){if(FS.ignorePermissions){return 0;}if(perms.includes("r")&&!(node.mode&292)){return 2;}else if(perms.includes("w")&&!(node.mode&146)){return 2;}else if(perms.includes("x")&&!(node.mode&73)){return 2;}return 0;},mayLookup:function mayLookup(dir){var errCode=FS.nodePermissions(dir,"x");if(errCode)return errCode;if(!dir.node_ops.lookup)return 2;return 0;},mayCreate:function mayCreate(dir,name){try{var node=FS.lookupNode(dir,name);return 20;}catch(e){}return FS.nodePermissions(dir,"wx");},mayDelete:function mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name);}catch(e){return e.errno;}var errCode=FS.nodePermissions(dir,"wx");if(errCode){return errCode;}if(isdir){if(!FS.isDir(node.mode)){return 54;}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return 10;}}else{if(FS.isDir(node.mode)){return 31;}}return 0;},mayOpen:function mayOpen(node,flags){if(!node){return 44;}if(FS.isLink(node.mode)){return 32;}else if(FS.isDir(node.mode)){if(FS.flagsToPermissionString(flags)!=="r"||flags&512){return 31;}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags));},MAX_OPEN_FDS:4096,nextfd:function nextfd(){var fd_start=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;var fd_end=arguments.length>1&&arguments[1]!==undefined?arguments[1]:FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd;}}throw new FS.ErrnoError(33);},getStream:function getStream(fd){return FS.streams[fd];},createStream:function createStream(stream,fd_start,fd_end){if(!FS.FSStream){FS.FSStream=function(){this.shared={};};FS.FSStream.prototype={};Object.defineProperties(FS.FSStream.prototype,{object:{get:function get(){return this.node;},set:function set(val){this.node=val;}},isRead:{get:function get(){return(this.flags&2097155)!==1;}},isWrite:{get:function get(){return(this.flags&2097155)!==0;}},isAppend:{get:function get(){return this.flags&1024;}},flags:{get:function get(){return this.shared.flags;},set:function set(val){this.shared.flags=val;}},position:{get:function get(){return this.shared.position;},set:function set(val){this.shared.position=val;}}});}stream=Object.assign(new FS.FSStream(),stream);var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;FS.streams[fd]=stream;return stream;},closeStream:function closeStream(fd){FS.streams[fd]=null;},chrdev_stream_ops:{open:function open(stream){var device=FS.getDevice(stream.node.rdev);stream.stream_ops=device.stream_ops;if(stream.stream_ops.open){stream.stream_ops.open(stream);}},llseek:function llseek(){throw new FS.ErrnoError(70);}},major:function major(dev){return dev>>8;},minor:function minor(dev){return dev&255;},makedev:function makedev(ma,mi){return ma<<8|mi;},registerDevice:function registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops};},getDevice:function getDevice(dev){return FS.devices[dev];},getMounts:function getMounts(mount){var mounts=[];var check=[mount];while(check.length){var m=check.pop();mounts.push(m);check.push.apply(check,m.mounts);}return mounts;},syncfs:function syncfs(populate,callback){if(typeof populate=="function"){callback=populate;populate=false;}FS.syncFSRequests++;if(FS.syncFSRequests>1){err("warning: "+FS.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");}var mounts=FS.getMounts(FS.root.mount);var completed=0;function doCallback(errCode){FS.syncFSRequests--;return callback(errCode);}function done(errCode){if(errCode){if(!done.errored){done.errored=true;return doCallback(errCode);}return;}if(++completed>=mounts.length){doCallback(null);}}mounts.forEach(function(mount){if(!mount.type.syncfs){return done(null);}mount.type.syncfs(mount,populate,done);});},mount:function mount(type,opts,mountpoint){var root=mountpoint==="/";var pseudo=!mountpoint;var node;if(root&&FS.root){throw new FS.ErrnoError(10);}else if(!root&&!pseudo){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});mountpoint=lookup.path;node=lookup.node;if(FS.isMountpoint(node)){throw new FS.ErrnoError(10);}if(!FS.isDir(node.mode)){throw new FS.ErrnoError(54);}}var mount={type:type,opts:opts,mountpoint:mountpoint,mounts:[]};var mountRoot=type.mount(mount);mountRoot.mount=mount;mount.root=mountRoot;if(root){FS.root=mountRoot;}else if(node){node.mounted=mount;if(node.mount){node.mount.mounts.push(mount);}}return mountRoot;},unmount:function unmount(mountpoint){var lookup=FS.lookupPath(mountpoint,{follow_mount:false});if(!FS.isMountpoint(lookup.node)){throw new FS.ErrnoError(28);}var node=lookup.node;var mount=node.mounted;var mounts=FS.getMounts(mount);Object.keys(FS.nameTable).forEach(function(hash){var current=FS.nameTable[hash];while(current){var next=current.name_next;if(mounts.includes(current.mount)){FS.destroyNode(current);}current=next;}});node.mounted=null;var idx=node.mount.mounts.indexOf(mount);node.mount.mounts.splice(idx,1);},lookup:function lookup(parent,name){return parent.node_ops.lookup(parent,name);},mknod:function mknod(path,mode,dev){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);if(!name||name==="."||name===".."){throw new FS.ErrnoError(28);}var errCode=FS.mayCreate(parent,name);if(errCode){throw new FS.ErrnoError(errCode);}if(!parent.node_ops.mknod){throw new FS.ErrnoError(63);}return parent.node_ops.mknod(parent,name,mode,dev);},create:function create(path,mode){mode=mode!==void 0?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0);},mkdir:function mkdir(path,mode){mode=mode!==void 0?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0);},mkdirTree:function mkdirTree(path,mode){var dirs=path.split("/");var d="";for(var i=0;i>>=0;if(length<0||position<0){throw new FS.ErrnoError(28);}if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(8);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31);}if(!stream.stream_ops.read){throw new FS.ErrnoError(28);}var seeking=typeof position!="undefined";if(!seeking){position=stream.position;}else if(!stream.seekable){throw new FS.ErrnoError(70);}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead;},write:function write(stream,buffer,offset,length,position,canOwn){offset>>>=0;if(length<0||position<0){throw new FS.ErrnoError(28);}if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(31);}if(!stream.stream_ops.write){throw new FS.ErrnoError(28);}if(stream.seekable&&stream.flags&1024){FS.llseek(stream,0,2);}var seeking=typeof position!="undefined";if(!seeking){position=stream.position;}else if(!stream.seekable){throw new FS.ErrnoError(70);}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten;},allocate:function allocate(stream,offset,length){if(FS.isClosed(stream)){throw new FS.ErrnoError(8);}if(offset<0||length<=0){throw new FS.ErrnoError(28);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(8);}if(!FS.isFile(stream.node.mode)&&!FS.isDir(stream.node.mode)){throw new FS.ErrnoError(43);}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(138);}stream.stream_ops.allocate(stream,offset,length);},mmap:function mmap(stream,length,position,prot,flags){if((prot&2)!==0&&(flags&2)===0&&(stream.flags&2097155)!==2){throw new FS.ErrnoError(2);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(2);}if(!stream.stream_ops.mmap){throw new FS.ErrnoError(43);}return stream.stream_ops.mmap(stream,length,position,prot,flags);},msync:function msync(stream,buffer,offset,length,mmapFlags){offset>>>=0;if(!stream.stream_ops.msync){return 0;}return stream.stream_ops.msync(stream,buffer,offset,length,mmapFlags);},munmap:function munmap(stream){return 0;},ioctl:function ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(59);}return stream.stream_ops.ioctl(stream,cmd,arg);},readFile:function readFile(path){var opts=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};opts.flags=opts.flags||0;opts.encoding=opts.encoding||"binary";if(opts.encoding!=="utf8"&&opts.encoding!=="binary"){throw new Error('Invalid encoding type "'+opts.encoding+'"');}var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==="utf8"){ret=UTF8ArrayToString(buf,0);}else if(opts.encoding==="binary"){ret=buf;}FS.close(stream);return ret;},writeFile:function writeFile(path,data){var opts=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};opts.flags=opts.flags||577;var stream=FS.open(path,opts.flags,opts.mode);if(typeof data=="string"){var buf=new Uint8Array(lengthBytesUTF8(data)+1);var actualNumBytes=stringToUTF8Array(data,buf,0,buf.length);FS.write(stream,buf,0,actualNumBytes,void 0,opts.canOwn);}else if(ArrayBuffer.isView(data)){FS.write(stream,data,0,data.byteLength,void 0,opts.canOwn);}else{throw new Error("Unsupported data type");}FS.close(stream);},cwd:function cwd(){return FS.currentPath;},chdir:function chdir(path){var lookup=FS.lookupPath(path,{follow:true});if(lookup.node===null){throw new FS.ErrnoError(44);}if(!FS.isDir(lookup.node.mode)){throw new FS.ErrnoError(54);}var errCode=FS.nodePermissions(lookup.node,"x");if(errCode){throw new FS.ErrnoError(errCode);}FS.currentPath=lookup.path;},createDefaultDirectories:function createDefaultDirectories(){FS.mkdir("/tmp");FS.mkdir("/home");FS.mkdir("/home/web_user");},createDefaultDevices:function createDefaultDevices(){FS.mkdir("/dev");FS.registerDevice(FS.makedev(1,3),{read:function read(){return 0;},write:function write(stream,buffer,offset,length,pos){return length;}});FS.mkdev("/dev/null",FS.makedev(1,3));TTY.register(FS.makedev(5,0),TTY.default_tty_ops);TTY.register(FS.makedev(6,0),TTY.default_tty1_ops);FS.mkdev("/dev/tty",FS.makedev(5,0));FS.mkdev("/dev/tty1",FS.makedev(6,0));var random_device=getRandomDevice();FS.createDevice("/dev","random",random_device);FS.createDevice("/dev","urandom",random_device);FS.mkdir("/dev/shm");FS.mkdir("/dev/shm/tmp");},createSpecialDirectories:function createSpecialDirectories(){FS.mkdir("/proc");var proc_self=FS.mkdir("/proc/self");FS.mkdir("/proc/self/fd");FS.mount({mount:function mount(){var node=FS.createNode(proc_self,"fd",16384|511,73);node.node_ops={lookup:function lookup(parent,name){var fd=+name;var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);var ret={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:function readlink(){return stream.path;}}};ret.parent=ret;return ret;}};return node;}},{},"/proc/self/fd");},createStandardStreams:function createStandardStreams(){if(Module["stdin"]){FS.createDevice("/dev","stdin",Module["stdin"]);}else{FS.symlink("/dev/tty","/dev/stdin");}if(Module["stdout"]){FS.createDevice("/dev","stdout",null,Module["stdout"]);}else{FS.symlink("/dev/tty","/dev/stdout");}if(Module["stderr"]){FS.createDevice("/dev","stderr",null,Module["stderr"]);}else{FS.symlink("/dev/tty1","/dev/stderr");}FS.open("/dev/stdin",0);FS.open("/dev/stdout",1);FS.open("/dev/stderr",1);},ensureErrnoError:function ensureErrnoError(){if(FS.ErrnoError)return;FS.ErrnoError=function ErrnoError(errno,node){this.node=node;this.setErrno=function(errno2){this.errno=errno2;};this.setErrno(errno);this.message="FS error";};FS.ErrnoError.prototype=new Error();FS.ErrnoError.prototype.constructor=FS.ErrnoError;[44].forEach(function(code){FS.genericErrors[code]=new FS.ErrnoError(code);FS.genericErrors[code].stack="";});},staticInit:function staticInit(){FS.ensureErrnoError();FS.nameTable=new Array(4096);FS.mount(MEMFS,{},"/");FS.createDefaultDirectories();FS.createDefaultDevices();FS.createSpecialDirectories();FS.filesystems={"MEMFS":MEMFS};},init:function init(input,output,error){FS.init.initialized=true;FS.ensureErrnoError();Module["stdin"]=input||Module["stdin"];Module["stdout"]=output||Module["stdout"];Module["stderr"]=error||Module["stderr"];FS.createStandardStreams();},quit:function quit(){FS.init.initialized=false;for(var i=0;ithis.length-1||idx<0){return void 0;}var chunkOffset=idx%this.chunkSize;var chunkNum=idx/this.chunkSize|0;return this.getter(chunkNum)[chunkOffset];};LazyUint8Array.prototype.setDataGetter=function LazyUint8Array_setDataGetter(getter){this.getter=getter;};LazyUint8Array.prototype.cacheLength=function LazyUint8Array_cacheLength(){var xhr=new XMLHttpRequest();xhr.open("HEAD",url,false);xhr.send(null);if(!(xhr.status>=200&&xhr.status<300||xhr.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr.status);var datalength=Number(xhr.getResponseHeader("Content-length"));var header;var hasByteServing=(header=xhr.getResponseHeader("Accept-Ranges"))&&header==="bytes";var usesGzip=(header=xhr.getResponseHeader("Content-Encoding"))&&header==="gzip";var chunkSize=1024*1024;if(!hasByteServing)chunkSize=datalength;var doXHR=function doXHR(from,to){if(from>to)throw new Error("invalid range ("+from+", "+to+") or no bytes requested!");if(to>datalength-1)throw new Error("only "+datalength+" bytes available! programmer error!");var xhr2=new XMLHttpRequest();xhr2.open("GET",url,false);if(datalength!==chunkSize)xhr2.setRequestHeader("Range","bytes="+from+"-"+to);xhr2.responseType="arraybuffer";if(xhr2.overrideMimeType){xhr2.overrideMimeType("text/plain; charset=x-user-defined");}xhr2.send(null);if(!(xhr2.status>=200&&xhr2.status<300||xhr2.status===304))throw new Error("Couldn't load "+url+". Status: "+xhr2.status);if(xhr2.response!==void 0){return new Uint8Array(xhr2.response||[]);}return intArrayFromString(xhr2.responseText||"",true);};var lazyArray2=this;lazyArray2.setDataGetter(function(chunkNum){var start=chunkNum*chunkSize;var end=(chunkNum+1)*chunkSize-1;end=Math.min(end,datalength-1);if(typeof lazyArray2.chunks[chunkNum]=="undefined"){lazyArray2.chunks[chunkNum]=doXHR(start,end);}if(typeof lazyArray2.chunks[chunkNum]=="undefined")throw new Error("doXHR failed!");return lazyArray2.chunks[chunkNum];});if(usesGzip||!datalength){chunkSize=datalength=1;datalength=this.getter(0).length;chunkSize=datalength;out("LazyFiles on gzip forces download of the whole file when length is accessed");}this._length=datalength;this._chunkSize=chunkSize;this.lengthKnown=true;};if(typeof XMLHttpRequest!="undefined"){throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var lazyArray=new LazyUint8Array();var properties={isDevice:false,contents:lazyArray};}else{var properties={isDevice:false,url:url};}var node=FS.createFile(parent,name,properties,canRead,canWrite);if(properties.contents){node.contents=properties.contents;}else if(properties.url){node.contents=null;node.url=properties.url;}Object.defineProperties(node,{usedBytes:{get:function get(){return this.contents.length;}}});var stream_ops={};var keys=Object.keys(node.stream_ops);keys.forEach(function(key){var fn=node.stream_ops[key];stream_ops[key]=function forceLoadLazyFile(){FS.forceLoadFile(node);return fn.apply(null,arguments);};});function writeChunks(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);if(contents.slice){for(var i=0;i1&&arguments[1]!==undefined?arguments[1]:function(){};var onerror=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION);}catch(e){return onerror(e);}openRequest.onupgradeneeded=function(){out("creating db");var db=openRequest.result;db.createObjectStore(FS.DB_STORE_NAME);};openRequest.onsuccess=function(){var db=openRequest.result;var transaction=db.transaction([FS.DB_STORE_NAME],"readwrite");var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror();}paths.forEach(function(path){var putRequest=files.put(FS.analyzePath(path).object.contents,path);putRequest.onsuccess=function(){ok++;if(ok+fail==total)finish();};putRequest.onerror=function(){fail++;if(ok+fail==total)finish();};});transaction.onerror=onerror;};openRequest.onerror=onerror;},loadFilesFromDB:function loadFilesFromDB(paths){var onload=arguments.length>1&&arguments[1]!==undefined?arguments[1]:function(){};var onerror=arguments.length>2&&arguments[2]!==undefined?arguments[2]:function(){};var indexedDB=FS.indexedDB();try{var openRequest=indexedDB.open(FS.DB_NAME(),FS.DB_VERSION);}catch(e){return onerror(e);}openRequest.onupgradeneeded=onerror;openRequest.onsuccess=function(){var db=openRequest.result;try{var transaction=db.transaction([FS.DB_STORE_NAME],"readonly");}catch(e){onerror(e);return;}var files=transaction.objectStore(FS.DB_STORE_NAME);var ok=0,fail=0,total=paths.length;function finish(){if(fail==0)onload();else onerror();}paths.forEach(function(path){var getRequest=files.get(path);getRequest.onsuccess=function(){if(FS.analyzePath(path).exists){FS.unlink(path);}FS.createDataFile(PATH.dirname(path),PATH.basename(path),getRequest.result,true,true,true);ok++;if(ok+fail==total)finish();};getRequest.onerror=function(){fail++;if(ok+fail==total)finish();};});transaction.onerror=onerror;};openRequest.onerror=onerror;}};var SYSCALLS={DEFAULT_POLLMASK:5,calculateAt:function calculateAt(dirfd,path,allowEmpty){if(PATH.isAbs(path)){return path;}var dir;if(dirfd===-100){dir=FS.cwd();}else{var dirstream=SYSCALLS.getStreamFromFD(dirfd);dir=dirstream.path;}if(path.length==0){if(!allowEmpty){throw new FS.ErrnoError(44);}return dir;}return PATH.join2(dir,path);},doStat:function doStat(func,path,buf){try{var stat=func(path);}catch(e){if(e&&e.node&&PATH.normalize(path)!==PATH.normalize(FS.getPath(e.node))){return-54;}throw e;}HEAP32[buf>>>2]=stat.dev;HEAP32[buf+8>>>2]=stat.ino;HEAP32[buf+12>>>2]=stat.mode;HEAPU32[buf+16>>>2]=stat.nlink;HEAP32[buf+20>>>2]=stat.uid;HEAP32[buf+24>>>2]=stat.gid;HEAP32[buf+28>>>2]=stat.rdev;tempI64=[stat.size>>>0,(tempDouble=stat.size,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+40>>>2]=tempI64[0],HEAP32[buf+44>>>2]=tempI64[1];HEAP32[buf+48>>>2]=4096;HEAP32[buf+52>>>2]=stat.blocks;var atime=stat.atime.getTime();var mtime=stat.mtime.getTime();var ctime=stat.ctime.getTime();tempI64=[Math.floor(atime/1e3)>>>0,(tempDouble=Math.floor(atime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+56>>>2]=tempI64[0],HEAP32[buf+60>>>2]=tempI64[1];HEAPU32[buf+64>>>2]=atime%1e3*1e3;tempI64=[Math.floor(mtime/1e3)>>>0,(tempDouble=Math.floor(mtime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+72>>>2]=tempI64[0],HEAP32[buf+76>>>2]=tempI64[1];HEAPU32[buf+80>>>2]=mtime%1e3*1e3;tempI64=[Math.floor(ctime/1e3)>>>0,(tempDouble=Math.floor(ctime/1e3),+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+88>>>2]=tempI64[0],HEAP32[buf+92>>>2]=tempI64[1];HEAPU32[buf+96>>>2]=ctime%1e3*1e3;tempI64=[stat.ino>>>0,(tempDouble=stat.ino,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[buf+104>>>2]=tempI64[0],HEAP32[buf+108>>>2]=tempI64[1];return 0;},doMsync:function doMsync(addr,stream,len,flags,offset){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(43);}if(flags&2){return 0;}addr>>>=0;var buffer=HEAPU8.slice(addr,addr+len);FS.msync(stream,buffer,offset,len,flags);},varargs:void 0,get:function get(){SYSCALLS.varargs+=4;var ret=HEAP32[SYSCALLS.varargs-4>>>2];return ret;},getStr:function getStr(ptr){var ret=UTF8ToString(ptr);return ret;},getStreamFromFD:function getStreamFromFD(fd){var stream=FS.getStream(fd);if(!stream)throw new FS.ErrnoError(8);return stream;}};function _environ_get(__environ,environ_buf){var bufSize=0;getEnvStrings().forEach(function(string,i){var ptr=environ_buf+bufSize;HEAPU32[__environ+i*4>>>2]=ptr;writeAsciiToMemory(string,ptr);bufSize+=string.length+1;});return 0;}function _environ_sizes_get(penviron_count,penviron_buf_size){var strings=getEnvStrings();HEAPU32[penviron_count>>>2]=strings.length;var bufSize=0;strings.forEach(function(string){bufSize+=string.length+1;});HEAPU32[penviron_buf_size>>>2]=bufSize;return 0;}function _fd_close(fd){try{var stream=SYSCALLS.getStreamFromFD(fd);FS.close(stream);return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function doReadv(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>>2];var len=HEAPU32[iov+4>>>2];iov+=8;var curr=FS.read(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(curr>>2]=num;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function convertI32PairToI53Checked(lo,hi){return hi+2097152>>>0<4194305-!!lo?(lo>>>0)+hi*4294967296:NaN;}function _fd_seek(fd,offset_low,offset_high,whence,newOffset){try{var offset=convertI32PairToI53Checked(offset_low,offset_high);if(isNaN(offset))return 61;var stream=SYSCALLS.getStreamFromFD(fd);FS.llseek(stream,offset,whence);tempI64=[stream.position>>>0,(tempDouble=stream.position,+Math.abs(tempDouble)>=1?tempDouble>0?(Math.min(+Math.floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math.ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[newOffset>>>2]=tempI64[0],HEAP32[newOffset+4>>>2]=tempI64[1];if(stream.getdents&&offset===0&&whence===0)stream.getdents=null;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function doWritev(stream,iov,iovcnt,offset){var ret=0;for(var i=0;i>>2];var len=HEAPU32[iov+4>>>2];iov+=8;var curr=FS.write(stream,HEAP8,ptr,len,offset);if(curr<0)return-1;ret+=curr;if(typeof offset!=="undefined"){offset+=curr;}}return ret;}function _fd_write(fd,iov,iovcnt,pnum){try{var stream=SYSCALLS.getStreamFromFD(fd);var num=doWritev(stream,iov,iovcnt);HEAPU32[pnum>>>2]=num;return 0;}catch(e){if(typeof FS=="undefined"||!(e instanceof FS.ErrnoError))throw e;return e.errno;}}function __isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0);}function __arraySum(array,index){var sum=0;for(var i=0;i<=index;sum+=array[i++]){}return sum;}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31];var __MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(date,days){var newDate=new Date(date.getTime());while(days>0){var leap=__isLeapYear(newDate.getFullYear());var currentMonth=newDate.getMonth();var daysInCurrentMonth=(leap?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[currentMonth];if(days>daysInCurrentMonth-newDate.getDate()){days-=daysInCurrentMonth-newDate.getDate()+1;newDate.setDate(1);if(currentMonth<11){newDate.setMonth(currentMonth+1);}else{newDate.setMonth(0);newDate.setFullYear(newDate.getFullYear()+1);}}else{newDate.setDate(newDate.getDate()+days);return newDate;}}return newDate;}function writeArrayToMemory(array,buffer){HEAP8.set(array,buffer>>>0);}function _strftime(s,maxsize,format,tm){var tm_zone=HEAP32[tm+40>>>2];var date={tm_sec:HEAP32[tm>>>2],tm_min:HEAP32[tm+4>>>2],tm_hour:HEAP32[tm+8>>>2],tm_mday:HEAP32[tm+12>>>2],tm_mon:HEAP32[tm+16>>>2],tm_year:HEAP32[tm+20>>>2],tm_wday:HEAP32[tm+24>>>2],tm_yday:HEAP32[tm+28>>>2],tm_isdst:HEAP32[tm+32>>>2],tm_gmtoff:HEAP32[tm+36>>>2],tm_zone:tm_zone?UTF8ToString(tm_zone):""};var pattern=UTF8ToString(format);var EXPANSION_RULES_1={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var rule in EXPANSION_RULES_1){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_1[rule]);}var WEEKDAYS=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];function leadingSomething(value,digits,character){var str=typeof value=="number"?value.toString():value||"";while(str.length0?1:0;}var compare;if((compare=sgn(date1.getFullYear()-date2.getFullYear()))===0){if((compare=sgn(date1.getMonth()-date2.getMonth()))===0){compare=sgn(date1.getDate()-date2.getDate());}}return compare;}function getFirstWeekStartDate(janFourth){switch(janFourth.getDay()){case 0:return new Date(janFourth.getFullYear()-1,11,29);case 1:return janFourth;case 2:return new Date(janFourth.getFullYear(),0,3);case 3:return new Date(janFourth.getFullYear(),0,2);case 4:return new Date(janFourth.getFullYear(),0,1);case 5:return new Date(janFourth.getFullYear()-1,11,31);case 6:return new Date(janFourth.getFullYear()-1,11,30);}}function getWeekBasedYear(date2){var thisDate=__addDays(new Date(date2.tm_year+1900,0,1),date2.tm_yday);var janFourthThisYear=new Date(thisDate.getFullYear(),0,4);var janFourthNextYear=new Date(thisDate.getFullYear()+1,0,4);var firstWeekStartThisYear=getFirstWeekStartDate(janFourthThisYear);var firstWeekStartNextYear=getFirstWeekStartDate(janFourthNextYear);if(compareByDay(firstWeekStartThisYear,thisDate)<=0){if(compareByDay(firstWeekStartNextYear,thisDate)<=0){return thisDate.getFullYear()+1;}return thisDate.getFullYear();}return thisDate.getFullYear()-1;}var EXPANSION_RULES_2={"%a":function a(date2){return WEEKDAYS[date2.tm_wday].substring(0,3);},"%A":function A(date2){return WEEKDAYS[date2.tm_wday];},"%b":function b(date2){return MONTHS[date2.tm_mon].substring(0,3);},"%B":function B(date2){return MONTHS[date2.tm_mon];},"%C":function C(date2){var year=date2.tm_year+1900;return leadingNulls(year/100|0,2);},"%d":function d(date2){return leadingNulls(date2.tm_mday,2);},"%e":function e(date2){return leadingSomething(date2.tm_mday,2," ");},"%g":function g(date2){return getWeekBasedYear(date2).toString().substring(2);},"%G":function G(date2){return getWeekBasedYear(date2);},"%H":function H(date2){return leadingNulls(date2.tm_hour,2);},"%I":function I(date2){var twelveHour=date2.tm_hour;if(twelveHour==0)twelveHour=12;else if(twelveHour>12)twelveHour-=12;return leadingNulls(twelveHour,2);},"%j":function j(date2){return leadingNulls(date2.tm_mday+__arraySum(__isLeapYear(date2.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,date2.tm_mon-1),3);},"%m":function m(date2){return leadingNulls(date2.tm_mon+1,2);},"%M":function M(date2){return leadingNulls(date2.tm_min,2);},"%n":function n(){return"\n";},"%p":function p(date2){if(date2.tm_hour>=0&&date2.tm_hour<12){return"AM";}return"PM";},"%S":function S(date2){return leadingNulls(date2.tm_sec,2);},"%t":function t(){return" ";},"%u":function u(date2){return date2.tm_wday||7;},"%U":function U(date2){var days=date2.tm_yday+7-date2.tm_wday;return leadingNulls(Math.floor(days/7),2);},"%V":function V(date2){var val=Math.floor((date2.tm_yday+7-(date2.tm_wday+6)%7)/7);if((date2.tm_wday+371-date2.tm_yday-2)%7<=2){val++;}if(!val){val=52;var dec31=(date2.tm_wday+7-date2.tm_yday-1)%7;if(dec31==4||dec31==5&&__isLeapYear(date2.tm_year%400-1)){val++;}}else if(val==53){var jan1=(date2.tm_wday+371-date2.tm_yday)%7;if(jan1!=4&&(jan1!=3||!__isLeapYear(date2.tm_year)))val=1;}return leadingNulls(val,2);},"%w":function w(date2){return date2.tm_wday;},"%W":function W(date2){var days=date2.tm_yday+7-(date2.tm_wday+6)%7;return leadingNulls(Math.floor(days/7),2);},"%y":function y(date2){return(date2.tm_year+1900).toString().substring(2);},"%Y":function Y(date2){return date2.tm_year+1900;},"%z":function z(date2){var off=date2.tm_gmtoff;var ahead=off>=0;off=Math.abs(off)/60;off=off/60*100+off%60;return(ahead?"+":"-")+String("0000"+off).slice(-4);},"%Z":function Z(date2){return date2.tm_zone;},"%%":function _(){return"%";}};pattern=pattern.replace(/%%/g,"\0\0");for(var rule in EXPANSION_RULES_2){if(pattern.includes(rule)){pattern=pattern.replace(new RegExp(rule,"g"),EXPANSION_RULES_2[rule](date));}}pattern=pattern.replace(/\0\0/g,"%");var bytes=intArrayFromString(pattern,false);if(bytes.length>maxsize){return 0;}writeArrayToMemory(bytes,s);return bytes.length-1;}function _strftime_l(s,maxsize,format,tm,loc){return _strftime(s,maxsize,format,tm);}InternalError=Module["InternalError"]=extendError(Error,"InternalError");embind_init_charCodes();BindingError=Module["BindingError"]=extendError(Error,"BindingError");init_ClassHandle();init_embind();init_RegisteredPointer();UnboundTypeError=Module["UnboundTypeError"]=extendError(Error,"UnboundTypeError");init_emval();var FSNode=function FSNode(parent,name,mode,rdev){if(!parent){parent=this;}this.parent=parent;this.mount=parent.mount;this.mounted=null;this.id=FS.nextInode++;this.name=name;this.mode=mode;this.node_ops={};this.stream_ops={};this.rdev=rdev;};var readMode=292|73;var writeMode=146;Object.defineProperties(FSNode.prototype,{read:{get:function get(){return(this.mode&readMode)===readMode;},set:function set(val){val?this.mode|=readMode:this.mode&=~readMode;}},write:{get:function get(){return(this.mode&writeMode)===writeMode;},set:function set(val){val?this.mode|=writeMode:this.mode&=~writeMode;}},isFolder:{get:function get(){return FS.isDir(this.mode);}},isDevice:{get:function get(){return FS.isChrdev(this.mode);}}});FS.FSNode=FSNode;FS.staticInit();var wasmImports={"f":___cxa_throw,"R":__embind_finalize_value_array,"p":__embind_finalize_value_object,"F":__embind_register_bigint,"P":__embind_register_bool,"o":__embind_register_class,"n":__embind_register_class_constructor,"b":__embind_register_class_function,"O":__embind_register_emval,"B":__embind_register_enum,"s":__embind_register_enum_value,"z":__embind_register_float,"c":__embind_register_function,"r":__embind_register_integer,"h":__embind_register_memory_view,"A":__embind_register_std_string,"v":__embind_register_std_wstring,"S":__embind_register_value_array,"i":__embind_register_value_array_element,"q":__embind_register_value_object,"e":__embind_register_value_object_field,"Q":__embind_register_void,"m":__emval_as,"x":__emval_call,"a":__emval_decref,"D":__emval_get_global,"k":__emval_get_property,"t":__emval_incref,"U":__emval_instanceof,"w":__emval_is_number,"C":__emval_is_string,"T":__emval_new_array,"g":__emval_new_cstring,"u":__emval_new_object,"l":__emval_run_destructors,"j":__emval_set_property,"d":__emval_take_value,"y":_abort,"N":_emscripten_memcpy_big,"L":_emscripten_resize_heap,"H":_environ_get,"I":_environ_sizes_get,"J":_fd_close,"K":_fd_read,"E":_fd_seek,"M":_fd_write,"G":_strftime_l};createWasm();var _malloc3=function _malloc(){return(_malloc3=Module["asm"]["Y"]).apply(null,arguments);};var ___getTypeName=Module["___getTypeName"]=function(){return(___getTypeName=Module["___getTypeName"]=Module["asm"]["Z"]).apply(null,arguments);};Module["__embind_initialize_bindings"]=function(){return(Module["__embind_initialize_bindings"]=Module["asm"]["_"]).apply(null,arguments);};var _free3=function _free(){return(_free3=Module["asm"]["$"]).apply(null,arguments);};var _cxa_is_pointer_type2=function ___cxa_is_pointer_type(){return(_cxa_is_pointer_type2=Module["asm"]["aa"]).apply(null,arguments);};Module["dynCall_jiji"]=function(){return(Module["dynCall_jiji"]=Module["asm"]["ba"]).apply(null,arguments);};Module["dynCall_viijii"]=function(){return(Module["dynCall_viijii"]=Module["asm"]["ca"]).apply(null,arguments);};Module["dynCall_iiiiij"]=function(){return(Module["dynCall_iiiiij"]=Module["asm"]["da"]).apply(null,arguments);};Module["dynCall_iiiiijj"]=function(){return(Module["dynCall_iiiiijj"]=Module["asm"]["ea"]).apply(null,arguments);};Module["dynCall_iiiiiijj"]=function(){return(Module["dynCall_iiiiiijj"]=Module["asm"]["fa"]).apply(null,arguments);};var calledRun;dependenciesFulfilled=function runCaller(){if(!calledRun)run();if(!calledRun)dependenciesFulfilled=runCaller;};function run(){if(runDependencies>0){return;}preRun();if(runDependencies>0){return;}function doRun(){if(calledRun)return;calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve(Module);if(Module["onRuntimeInitialized"])Module["onRuntimeInitialized"]();postRun();}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(function(){setTimeout(function(){Module["setStatus"]("");},1);doRun();},1);}else{doRun();}}if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].pop()();}}run();return WebIFCWasm3.ready;};}();if(_typeof(exports)==="object"&&_typeof(module)==="object")module.exports=WebIFCWasm2;else if(typeof define==="function"&&define["amd"])define([],function(){return WebIFCWasm2;});else if(_typeof(exports)==="object")exports["WebIFCWasm"]=WebIFCWasm2;}});var IFCGEOSLICE=1971632696;var IFCGEOMODEL=2680139844;var IFCELECTRICFLOWTREATMENTDEVICE=24726584;var IFCDISTRIBUTIONBOARD=3693000487;var IFCCONVEYORSEGMENT=3460952963;var IFCCAISSONFOUNDATION=3999819293;var IFCBOREHOLE=3314249567;var IFCBEARING=4196446775;var IFCALIGNMENT=325726236;var IFCTRACKELEMENT=3425753595;var IFCSIGNAL=991950508;var IFCREINFORCEDSOIL=3798194928;var IFCRAIL=3290496277;var IFCPAVEMENT=1383356374;var IFCNAVIGATIONELEMENT=2182337498;var IFCMOORINGDEVICE=234836483;var IFCMOBILETELECOMMUNICATIONSAPPLIANCE=2078563270;var IFCLIQUIDTERMINAL=1638804497;var IFCLINEARPOSITIONINGELEMENT=1154579445;var IFCKERB=2696325953;var IFCGEOTECHNICALASSEMBLY=2713699986;var IFCELECTRICFLOWTREATMENTDEVICETYPE=2142170206;var IFCEARTHWORKSFILL=3376911765;var IFCEARTHWORKSELEMENT=1077100507;var IFCEARTHWORKSCUT=3071239417;var IFCDISTRIBUTIONBOARDTYPE=479945903;var IFCDEEPFOUNDATION=3426335179;var IFCCOURSE=1502416096;var IFCCONVEYORSEGMENTTYPE=2940368186;var IFCCAISSONFOUNDATIONTYPE=3203706013;var IFCBUILTSYSTEM=3862327254;var IFCBUILTELEMENT=1876633798;var IFCBRIDGEPART=963979645;var IFCBRIDGE=644574406;var IFCBEARINGTYPE=3649138523;var IFCALIGNMENTVERTICAL=1662888072;var IFCALIGNMENTSEGMENT=317615605;var IFCALIGNMENTHORIZONTAL=1545765605;var IFCALIGNMENTCANT=4266260250;var IFCVIBRATIONDAMPERTYPE=3956297820;var IFCVIBRATIONDAMPER=1530820697;var IFCVEHICLE=840318589;var IFCTRANSPORTATIONDEVICE=1953115116;var IFCTRACKELEMENTTYPE=618700268;var IFCTENDONCONDUITTYPE=2281632017;var IFCTENDONCONDUIT=3663046924;var IFCSINESPIRAL=42703149;var IFCSIGNALTYPE=1894708472;var IFCSIGNTYPE=3599934289;var IFCSIGN=33720170;var IFCSEVENTHORDERPOLYNOMIALSPIRAL=1027922057;var IFCSEGMENTEDREFERENCECURVE=544395925;var IFCSECONDORDERPOLYNOMIALSPIRAL=3649235739;var IFCROADPART=550521510;var IFCROAD=146592293;var IFCRELADHERESTOELEMENT=3818125796;var IFCREFERENT=4021432810;var IFCRAILWAYPART=1891881377;var IFCRAILWAY=3992365140;var IFCRAILTYPE=1763565496;var IFCPOSITIONINGELEMENT=1946335990;var IFCPAVEMENTTYPE=514975943;var IFCNAVIGATIONELEMENTTYPE=506776471;var IFCMOORINGDEVICETYPE=710110818;var IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE=1950438474;var IFCMARINEPART=976884017;var IFCMARINEFACILITY=525669439;var IFCLIQUIDTERMINALTYPE=1770583370;var IFCLINEARELEMENT=2176059722;var IFCKERBTYPE=679976338;var IFCIMPACTPROTECTIONDEVICETYPE=3948183225;var IFCIMPACTPROTECTIONDEVICE=2568555532;var IFCGRADIENTCURVE=2898700619;var IFCGEOTECHNICALSTRATUM=1594536857;var IFCGEOTECHNICALELEMENT=4230923436;var IFCFACILITYPARTCOMMON=4228831410;var IFCFACILITYPART=1310830890;var IFCFACILITY=24185140;var IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID=4234616927;var IFCDEEPFOUNDATIONTYPE=1306400036;var IFCCOURSETYPE=4189326743;var IFCCOSINESPIRAL=2000195564;var IFCCLOTHOID=3497074424;var IFCBUILTELEMENTTYPE=1626504194;var IFCVEHICLETYPE=3651464721;var IFCTRIANGULATEDIRREGULARNETWORK=1229763772;var IFCTRANSPORTATIONDEVICETYPE=3665877780;var IFCTHIRDORDERPOLYNOMIALSPIRAL=782932809;var IFCSPIRAL=2735484536;var IFCSECTIONEDSURFACE=1356537516;var IFCSECTIONEDSOLIDHORIZONTAL=1290935644;var IFCSECTIONEDSOLID=1862484736;var IFCRELPOSITIONS=1441486842;var IFCRELASSOCIATESPROFILEDEF=1033248425;var IFCPOLYNOMIALCURVE=3381221214;var IFCOFFSETCURVEBYDISTANCES=2485787929;var IFCOFFSETCURVE=590820931;var IFCINDEXEDPOLYGONALTEXTUREMAP=3465909080;var IFCDIRECTRIXCURVESWEPTAREASOLID=593015953;var IFCCURVESEGMENT=4212018352;var IFCAXIS2PLACEMENTLINEAR=3425423356;var IFCSEGMENT=823603102;var IFCPOINTBYDISTANCEEXPRESSION=2165702409;var IFCOPENCROSSPROFILEDEF=182550632;var IFCLINEARPLACEMENT=388784114;var IFCALIGNMENTHORIZONTALSEGMENT=536804194;var IFCALIGNMENTCANTSEGMENT=3752311538;var IFCTEXTURECOORDINATEINDICESWITHVOIDS=1010789467;var IFCTEXTURECOORDINATEINDICES=222769930;var IFCQUANTITYNUMBER=2691318326;var IFCALIGNMENTVERTICALSEGMENT=3633395639;var IFCCONTROLLER=25142252;var IFCALARM=3087945054;var IFCACTUATOR=4288193352;var IFCUNITARYCONTROLELEMENT=630975310;var IFCSENSOR=4086658281;var IFCPROTECTIVEDEVICETRIPPINGUNIT=2295281155;var IFCFLOWINSTRUMENT=182646315;var IFCFIRESUPPRESSIONTERMINAL=1426591983;var IFCFILTER=819412036;var IFCFAN=3415622556;var IFCELECTRICTIMECONTROL=1003880860;var IFCELECTRICMOTOR=402227799;var IFCELECTRICGENERATOR=264262732;var IFCELECTRICFLOWSTORAGEDEVICE=3310460725;var IFCELECTRICDISTRIBUTIONBOARD=862014818;var IFCELECTRICAPPLIANCE=1904799276;var IFCDUCTSILENCER=1360408905;var IFCDUCTSEGMENT=3518393246;var IFCDUCTFITTING=342316401;var IFCDISTRIBUTIONCIRCUIT=562808652;var IFCDAMPER=4074379575;var IFCCOOLINGTOWER=3640358203;var IFCCOOLEDBEAM=4136498852;var IFCCONDENSER=2272882330;var IFCCOMPRESSOR=3571504051;var IFCCOMMUNICATIONSAPPLIANCE=3221913625;var IFCCOIL=639361253;var IFCCHILLER=3902619387;var IFCCABLESEGMENT=4217484030;var IFCCABLEFITTING=1051757585;var IFCCABLECARRIERSEGMENT=3758799889;var IFCCABLECARRIERFITTING=635142910;var IFCBURNER=2938176219;var IFCBOILER=32344328;var IFCBEAMSTANDARDCASE=2906023776;var IFCAUDIOVISUALAPPLIANCE=277319702;var IFCAIRTOAIRHEATRECOVERY=2056796094;var IFCAIRTERMINALBOX=177149247;var IFCAIRTERMINAL=1634111441;var IFCWINDOWSTANDARDCASE=486154966;var IFCWASTETERMINAL=4237592921;var IFCWALLELEMENTEDCASE=4156078855;var IFCVALVE=4207607924;var IFCUNITARYEQUIPMENT=4292641817;var IFCUNITARYCONTROLELEMENTTYPE=3179687236;var IFCTUBEBUNDLE=3026737570;var IFCTRANSFORMER=3825984169;var IFCTANK=812556717;var IFCSWITCHINGDEVICE=1162798199;var IFCSTRUCTURALLOADCASE=385403989;var IFCSTACKTERMINAL=1404847402;var IFCSPACEHEATER=1999602285;var IFCSOLARDEVICE=3420628829;var IFCSLABSTANDARDCASE=3027962421;var IFCSLABELEMENTEDCASE=3127900445;var IFCSHADINGDEVICE=1329646415;var IFCSANITARYTERMINAL=3053780830;var IFCREINFORCINGBARTYPE=2572171363;var IFCRATIONALBSPLINECURVEWITHKNOTS=1232101972;var IFCPUMP=90941305;var IFCPROTECTIVEDEVICETRIPPINGUNITTYPE=655969474;var IFCPROTECTIVEDEVICE=738039164;var IFCPLATESTANDARDCASE=1156407060;var IFCPIPESEGMENT=3612865200;var IFCPIPEFITTING=310824031;var IFCOUTLET=3694346114;var IFCOUTERBOUNDARYCURVE=144952367;var IFCMOTORCONNECTION=2474470126;var IFCMEMBERSTANDARDCASE=1911478936;var IFCMEDICALDEVICE=1437502449;var IFCLIGHTFIXTURE=629592764;var IFCLAMP=76236018;var IFCJUNCTIONBOX=2176052936;var IFCINTERCEPTOR=4175244083;var IFCHUMIDIFIER=2068733104;var IFCHEATEXCHANGER=3319311131;var IFCFLOWMETER=2188021234;var IFCEXTERNALSPATIALELEMENT=1209101575;var IFCEVAPORATOR=484807127;var IFCEVAPORATIVECOOLER=3747195512;var IFCENGINE=2814081492;var IFCELECTRICDISTRIBUTIONBOARDTYPE=2417008758;var IFCDOORSTANDARDCASE=3242481149;var IFCDISTRIBUTIONSYSTEM=3205830791;var IFCCOMMUNICATIONSAPPLIANCETYPE=400855858;var IFCCOLUMNSTANDARDCASE=905975707;var IFCCIVILELEMENT=1677625105;var IFCCHIMNEY=3296154744;var IFCCABLEFITTINGTYPE=2674252688;var IFCBURNERTYPE=2188180465;var IFCBUILDINGSYSTEM=1177604601;var IFCBUILDINGELEMENTPARTTYPE=39481116;var IFCBOUNDARYCURVE=1136057603;var IFCBSPLINECURVEWITHKNOTS=2461110595;var IFCAUDIOVISUALAPPLIANCETYPE=1532957894;var IFCWORKCALENDAR=4088093105;var IFCWINDOWTYPE=4009809668;var IFCVOIDINGFEATURE=926996030;var IFCVIBRATIONISOLATOR=2391383451;var IFCTENDONTYPE=2415094496;var IFCTENDONANCHORTYPE=3081323446;var IFCSYSTEMFURNITUREELEMENT=413509423;var IFCSURFACEFEATURE=3101698114;var IFCSTRUCTURALSURFACEACTION=3657597509;var IFCSTRUCTURALCURVEREACTION=2757150158;var IFCSTRUCTURALCURVEACTION=1004757350;var IFCSTAIRTYPE=338393293;var IFCSOLARDEVICETYPE=1072016465;var IFCSHADINGDEVICETYPE=4074543187;var IFCSEAMCURVE=2157484638;var IFCROOFTYPE=2781568857;var IFCREINFORCINGMESHTYPE=2310774935;var IFCREINFORCINGELEMENTTYPE=964333572;var IFCRATIONALBSPLINESURFACEWITHKNOTS=683857671;var IFCRAMPTYPE=1469900589;var IFCPOLYGONALFACESET=2839578677;var IFCPILETYPE=1158309216;var IFCOPENINGSTANDARDCASE=3079942009;var IFCMEDICALDEVICETYPE=1114901282;var IFCINTERSECTIONCURVE=3113134337;var IFCINTERCEPTORTYPE=3946677679;var IFCINDEXEDPOLYCURVE=2571569899;var IFCGEOGRAPHICELEMENT=3493046030;var IFCFURNITURE=1509553395;var IFCFOOTINGTYPE=1893162501;var IFCEXTERNALSPATIALSTRUCTUREELEMENT=2853485674;var IFCEVENT=4148101412;var IFCENGINETYPE=132023988;var IFCELEMENTASSEMBLYTYPE=2397081782;var IFCDOORTYPE=2323601079;var IFCCYLINDRICALSURFACE=1213902940;var IFCCONSTRUCTIONPRODUCTRESOURCETYPE=1525564444;var IFCCONSTRUCTIONMATERIALRESOURCETYPE=4105962743;var IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE=2185764099;var IFCCOMPOSITECURVEONSURFACE=15328376;var IFCCOMPLEXPROPERTYTEMPLATE=3875453745;var IFCCIVILELEMENTTYPE=3893394355;var IFCCHIMNEYTYPE=2197970202;var IFCBSPLINESURFACEWITHKNOTS=167062518;var IFCBSPLINESURFACE=2887950389;var IFCADVANCEDBREPWITHVOIDS=2603310189;var IFCADVANCEDBREP=1635779807;var IFCTRIANGULATEDFACESET=2916149573;var IFCTOROIDALSURFACE=1935646853;var IFCTESSELLATEDFACESET=2387106220;var IFCTASKTYPE=3206491090;var IFCSURFACECURVE=699246055;var IFCSUBCONTRACTRESOURCETYPE=4095615324;var IFCSTRUCTURALSURFACEREACTION=603775116;var IFCSPHERICALSURFACE=4015995234;var IFCSPATIALZONETYPE=2481509218;var IFCSPATIALZONE=463610769;var IFCSPATIALELEMENTTYPE=710998568;var IFCSPATIALELEMENT=1412071761;var IFCSIMPLEPROPERTYTEMPLATE=3663146110;var IFCREVOLVEDAREASOLIDTAPERED=3243963512;var IFCREPARAMETRISEDCOMPOSITECURVESEGMENT=816062949;var IFCRELSPACEBOUNDARY2NDLEVEL=1521410863;var IFCRELSPACEBOUNDARY1STLEVEL=3523091289;var IFCRELINTERFERESELEMENTS=427948657;var IFCRELDEFINESBYTEMPLATE=307848117;var IFCRELDEFINESBYOBJECT=1462361463;var IFCRELDECLARES=2565941209;var IFCRELASSIGNSTOGROUPBYFACTOR=1027710054;var IFCPROPERTYTEMPLATE=3521284610;var IFCPROPERTYSETTEMPLATE=492091185;var IFCPROJECTLIBRARY=653396225;var IFCPROCEDURETYPE=569719735;var IFCPREDEFINEDPROPERTYSET=3967405729;var IFCPCURVE=1682466193;var IFCLABORRESOURCETYPE=428585644;var IFCINDEXEDPOLYGONALFACEWITHVOIDS=2294589976;var IFCINDEXEDPOLYGONALFACE=178912537;var IFCGEOGRAPHICELEMENTTYPE=4095422895;var IFCFIXEDREFERENCESWEPTAREASOLID=2652556860;var IFCEXTRUDEDAREASOLIDTAPERED=2804161546;var IFCEVENTTYPE=4024345920;var IFCCURVEBOUNDEDSURFACE=2629017746;var IFCCREWRESOURCETYPE=1815067380;var IFCCONTEXT=3419103109;var IFCCONSTRUCTIONRESOURCETYPE=2574617495;var IFCCARTESIANPOINTLIST3D=2059837836;var IFCCARTESIANPOINTLIST2D=1675464909;var IFCCARTESIANPOINTLIST=574549367;var IFCADVANCEDFACE=3406155212;var IFCTYPERESOURCE=3698973494;var IFCTYPEPROCESS=3736923433;var IFCTESSELLATEDITEM=901063453;var IFCSWEPTDISKSOLIDPOLYGONAL=1096409881;var IFCRESOURCETIME=1042787934;var IFCRESOURCECONSTRAINTRELATIONSHIP=1608871552;var IFCRESOURCEAPPROVALRELATIONSHIP=2943643501;var IFCQUANTITYSET=2090586900;var IFCPROPERTYTEMPLATEDEFINITION=1482703590;var IFCPREDEFINEDPROPERTIES=3778827333;var IFCMIRROREDPROFILEDEF=2998442950;var IFCMATERIALRELATIONSHIP=853536259;var IFCMATERIALPROFILESETUSAGETAPERING=3404854881;var IFCMATERIALPROFILESETUSAGE=3079605661;var IFCMATERIALCONSTITUENTSET=2852063980;var IFCMATERIALCONSTITUENT=3708119e3;var IFCLAGTIME=1585845231;var IFCINDEXEDTRIANGLETEXTUREMAP=2133299955;var IFCINDEXEDTEXTUREMAP=1437953363;var IFCINDEXEDCOLOURMAP=3570813810;var IFCEXTERNALREFERENCERELATIONSHIP=1437805879;var IFCEXTENDEDPROPERTIES=297599258;var IFCEVENTTIME=211053100;var IFCCONVERSIONBASEDUNITWITHOFFSET=2713554722;var IFCCOLOURRGBLIST=3285139300;var IFCWORKTIME=1236880293;var IFCTEXTUREVERTEXLIST=3611470254;var IFCTASKTIMERECURRING=2771591690;var IFCTASKTIME=1549132990;var IFCSURFACEREINFORCEMENTAREA=2934153892;var IFCSTRUCTURALLOADORRESULT=609421318;var IFCSTRUCTURALLOADCONFIGURATION=3478079324;var IFCPROJECTEDCRS=3843373140;var IFCMATERIALPROFILEWITHOFFSETS=552965576;var IFCMATERIALPROFILESET=164193824;var IFCMATERIALPROFILE=2235152071;var IFCMATERIALLAYERWITHOFFSETS=1847252529;var IFCMAPCONVERSION=3057273783;var IFCCOORDINATEOPERATION=1785450214;var IFCCONNECTIONVOLUMEGEOMETRY=775493141;var IFCREINFORCINGBAR=979691226;var IFCELECTRICDISTRIBUTIONPOINT=3700593921;var IFCDISTRIBUTIONCONTROLELEMENT=1062813311;var IFCDISTRIBUTIONCHAMBERELEMENT=1052013943;var IFCCONTROLLERTYPE=578613899;var IFCCHAMFEREDGEFEATURE=2454782716;var IFCBEAM=753842376;var IFCALARMTYPE=3001207471;var IFCACTUATORTYPE=2874132201;var IFCWINDOW=3304561284;var IFCWALLSTANDARDCASE=3512223829;var IFCWALL=2391406946;var IFCVIBRATIONISOLATORTYPE=3313531582;var IFCTENDONANCHOR=2347447852;var IFCTENDON=3824725483;var IFCSTRUCTURALANALYSISMODEL=2515109513;var IFCSTAIRFLIGHT=4252922144;var IFCSTAIR=331165859;var IFCSLAB=1529196076;var IFCSENSORTYPE=1783015770;var IFCROUNDEDEDGEFEATURE=1376911519;var IFCROOF=2016517767;var IFCREINFORCINGMESH=2320036040;var IFCREINFORCINGELEMENT=3027567501;var IFCRATIONALBEZIERCURVE=3055160366;var IFCRAMPFLIGHT=3283111854;var IFCRAMP=3024970846;var IFCRAILING=2262370178;var IFCPLATE=3171933400;var IFCPILE=1687234759;var IFCMEMBER=1073191201;var IFCFOOTING=900683007;var IFCFLOWTREATMENTDEVICE=3508470533;var IFCFLOWTERMINAL=2223149337;var IFCFLOWSTORAGEDEVICE=707683696;var IFCFLOWSEGMENT=987401354;var IFCFLOWMOVINGDEVICE=3132237377;var IFCFLOWINSTRUMENTTYPE=4037862832;var IFCFLOWFITTING=4278956645;var IFCFLOWCONTROLLER=2058353004;var IFCFIRESUPPRESSIONTERMINALTYPE=4222183408;var IFCFILTERTYPE=1810631287;var IFCFANTYPE=346874300;var IFCENERGYCONVERSIONDEVICE=1658829314;var IFCELECTRICALELEMENT=857184966;var IFCELECTRICALCIRCUIT=1634875225;var IFCELECTRICTIMECONTROLTYPE=712377611;var IFCELECTRICMOTORTYPE=1217240411;var IFCELECTRICHEATERTYPE=1365060375;var IFCELECTRICGENERATORTYPE=1534661035;var IFCELECTRICFLOWSTORAGEDEVICETYPE=3277789161;var IFCELECTRICAPPLIANCETYPE=663422040;var IFCEDGEFEATURE=855621170;var IFCDUCTSILENCERTYPE=2030761528;var IFCDUCTSEGMENTTYPE=3760055223;var IFCDUCTFITTINGTYPE=869906466;var IFCDOOR=395920057;var IFCDISTRIBUTIONPORT=3041715199;var IFCDISTRIBUTIONFLOWELEMENT=3040386961;var IFCDISTRIBUTIONELEMENT=1945004755;var IFCDISTRIBUTIONCONTROLELEMENTTYPE=2063403501;var IFCDISTRIBUTIONCHAMBERELEMENTTYPE=1599208980;var IFCDISCRETEACCESSORYTYPE=2635815018;var IFCDISCRETEACCESSORY=1335981549;var IFCDIAMETERDIMENSION=4147604152;var IFCDAMPERTYPE=3961806047;var IFCCURTAINWALL=3495092785;var IFCCOVERING=1973544240;var IFCCOOLINGTOWERTYPE=2954562838;var IFCCOOLEDBEAMTYPE=335055490;var IFCCONSTRUCTIONPRODUCTRESOURCE=488727124;var IFCCONSTRUCTIONMATERIALRESOURCE=1060000209;var IFCCONSTRUCTIONEQUIPMENTRESOURCE=3898045240;var IFCCONDITIONCRITERION=1163958913;var IFCCONDITION=2188551683;var IFCCONDENSERTYPE=2816379211;var IFCCOMPRESSORTYPE=3850581409;var IFCCOLUMN=843113511;var IFCCOILTYPE=2301859152;var IFCCIRCLE=2611217952;var IFCCHILLERTYPE=2951183804;var IFCCABLESEGMENTTYPE=1285652485;var IFCCABLECARRIERSEGMENTTYPE=3293546465;var IFCCABLECARRIERFITTINGTYPE=395041908;var IFCBUILDINGELEMENTPROXYTYPE=1909888760;var IFCBUILDINGELEMENTPROXY=1095909175;var IFCBUILDINGELEMENTPART=2979338954;var IFCBUILDINGELEMENTCOMPONENT=52481810;var IFCBUILDINGELEMENT=3299480353;var IFCBOILERTYPE=231477066;var IFCBEZIERCURVE=1916977116;var IFCBEAMTYPE=819618141;var IFCBSPLINECURVE=1967976161;var IFCASSET=3460190687;var IFCANGULARDIMENSION=2470393545;var IFCAIRTOAIRHEATRECOVERYTYPE=1871374353;var IFCAIRTERMINALTYPE=3352864051;var IFCAIRTERMINALBOXTYPE=1411407467;var IFCACTIONREQUEST=3821786052;var IFC2DCOMPOSITECURVE=1213861670;var IFCZONE=1033361043;var IFCWORKSCHEDULE=3342526732;var IFCWORKPLAN=4218914973;var IFCWORKCONTROL=1028945134;var IFCWASTETERMINALTYPE=1133259667;var IFCWALLTYPE=1898987631;var IFCVIRTUALELEMENT=2769231204;var IFCVALVETYPE=728799441;var IFCUNITARYEQUIPMENTTYPE=1911125066;var IFCTUBEBUNDLETYPE=1600972822;var IFCTRIMMEDCURVE=3593883385;var IFCTRANSPORTELEMENT=1620046519;var IFCTRANSFORMERTYPE=1692211062;var IFCTIMESERIESSCHEDULE=1637806684;var IFCTANKTYPE=5716631;var IFCSYSTEM=2254336722;var IFCSWITCHINGDEVICETYPE=2315554128;var IFCSUBCONTRACTRESOURCE=148013059;var IFCSTRUCTURALSURFACECONNECTION=1975003073;var IFCSTRUCTURALRESULTGROUP=2986769608;var IFCSTRUCTURALPOINTREACTION=1235345126;var IFCSTRUCTURALPOINTCONNECTION=734778138;var IFCSTRUCTURALPOINTACTION=2082059205;var IFCSTRUCTURALPLANARACTIONVARYING=3987759626;var IFCSTRUCTURALPLANARACTION=1621171031;var IFCSTRUCTURALLOADGROUP=1252848954;var IFCSTRUCTURALLINEARACTIONVARYING=1721250024;var IFCSTRUCTURALLINEARACTION=1807405624;var IFCSTRUCTURALCURVEMEMBERVARYING=2445595289;var IFCSTRUCTURALCURVEMEMBER=214636428;var IFCSTRUCTURALCURVECONNECTION=4243806635;var IFCSTRUCTURALCONNECTION=1179482911;var IFCSTRUCTURALACTION=682877961;var IFCSTAIRFLIGHTTYPE=1039846685;var IFCSTACKTERMINALTYPE=3112655638;var IFCSPACETYPE=3812236995;var IFCSPACEPROGRAM=652456506;var IFCSPACEHEATERTYPE=1305183839;var IFCSPACE=3856911033;var IFCSLABTYPE=2533589738;var IFCSITE=4097777520;var IFCSERVICELIFE=4105383287;var IFCSCHEDULETIMECONTROL=3517283431;var IFCSANITARYTERMINALTYPE=1768891740;var IFCRELASSIGNSTASKS=2863920197;var IFCRELAGGREGATES=160246688;var IFCRAMPFLIGHTTYPE=2324767716;var IFCRAILINGTYPE=2893384427;var IFCRADIUSDIMENSION=3248260540;var IFCPUMPTYPE=2250791053;var IFCPROTECTIVEDEVICETYPE=1842657554;var IFCPROJECTIONELEMENT=3651124850;var IFCPROJECTORDERRECORD=3642467123;var IFCPROJECTORDER=2904328755;var IFCPROCEDURE=2744685151;var IFCPORT=3740093272;var IFCPOLYLINE=3724593414;var IFCPLATETYPE=4017108033;var IFCPIPESEGMENTTYPE=4231323485;var IFCPIPEFITTINGTYPE=804291784;var IFCPERMIT=3327091369;var IFCPERFORMANCEHISTORY=2382730787;var IFCOUTLETTYPE=2837617999;var IFCORDERACTION=3425660407;var IFCOPENINGELEMENT=3588315303;var IFCOCCUPANT=4143007308;var IFCMOVE=1916936684;var IFCMOTORCONNECTIONTYPE=977012517;var IFCMEMBERTYPE=3181161470;var IFCMECHANICALFASTENERTYPE=2108223431;var IFCMECHANICALFASTENER=377706215;var IFCLINEARDIMENSION=2506943328;var IFCLIGHTFIXTURETYPE=1161773419;var IFCLAMPTYPE=1051575348;var IFCLABORRESOURCE=3827777499;var IFCJUNCTIONBOXTYPE=4288270099;var IFCINVENTORY=2391368822;var IFCHUMIDIFIERTYPE=1806887404;var IFCHEATEXCHANGERTYPE=1251058090;var IFCGROUP=2706460486;var IFCGRID=3009204131;var IFCGASTERMINALTYPE=200128114;var IFCFURNITURESTANDARD=814719939;var IFCFURNISHINGELEMENT=263784265;var IFCFLOWTREATMENTDEVICETYPE=3009222698;var IFCFLOWTERMINALTYPE=2297155007;var IFCFLOWSTORAGEDEVICETYPE=1339347760;var IFCFLOWSEGMENTTYPE=1834744321;var IFCFLOWMOVINGDEVICETYPE=1482959167;var IFCFLOWMETERTYPE=3815607619;var IFCFLOWFITTINGTYPE=3198132628;var IFCFLOWCONTROLLERTYPE=3907093117;var IFCFEATUREELEMENTSUBTRACTION=1287392070;var IFCFEATUREELEMENTADDITION=2143335405;var IFCFEATUREELEMENT=2827207264;var IFCFASTENERTYPE=2489546625;var IFCFASTENER=647756555;var IFCFACETEDBREPWITHVOIDS=3737207727;var IFCFACETEDBREP=807026263;var IFCEVAPORATORTYPE=3390157468;var IFCEVAPORATIVECOOLERTYPE=3174744832;var IFCEQUIPMENTSTANDARD=3272907226;var IFCEQUIPMENTELEMENT=1962604670;var IFCENERGYCONVERSIONDEVICETYPE=2107101300;var IFCELLIPSE=1704287377;var IFCELEMENTCOMPONENTTYPE=2590856083;var IFCELEMENTCOMPONENT=1623761950;var IFCELEMENTASSEMBLY=4123344466;var IFCELEMENT=1758889154;var IFCELECTRICALBASEPROPERTIES=360485395;var IFCDISTRIBUTIONFLOWELEMENTTYPE=3849074793;var IFCDISTRIBUTIONELEMENTTYPE=3256556792;var IFCDIMENSIONCURVEDIRECTEDCALLOUT=681481545;var IFCCURTAINWALLTYPE=1457835157;var IFCCREWRESOURCE=3295246426;var IFCCOVERINGTYPE=1916426348;var IFCCOSTSCHEDULE=1419761937;var IFCCOSTITEM=3895139033;var IFCCONTROL=3293443760;var IFCCONSTRUCTIONRESOURCE=2559216714;var IFCCONIC=2510884976;var IFCCOMPOSITECURVE=3732776249;var IFCCOLUMNTYPE=300633059;var IFCCIRCLEHOLLOWPROFILEDEF=2937912522;var IFCBUILDINGSTOREY=3124254112;var IFCBUILDINGELEMENTTYPE=1950629157;var IFCBUILDING=4031249490;var IFCBOUNDEDCURVE=1260505505;var IFCBOOLEANCLIPPINGRESULT=3649129432;var IFCBLOCK=1334484129;var IFCASYMMETRICISHAPEPROFILEDEF=3207858831;var IFCANNOTATION=1674181508;var IFCACTOR=2296667514;var IFCTRANSPORTELEMENTTYPE=2097647324;var IFCTASK=3473067441;var IFCSYSTEMFURNITUREELEMENTTYPE=1580310250;var IFCSURFACEOFREVOLUTION=4124788165;var IFCSURFACEOFLINEAREXTRUSION=2809605785;var IFCSURFACECURVESWEPTAREASOLID=2028607225;var IFCSTRUCTUREDDIMENSIONCALLOUT=4070609034;var IFCSTRUCTURALSURFACEMEMBERVARYING=2218152070;var IFCSTRUCTURALSURFACEMEMBER=3979015343;var IFCSTRUCTURALREACTION=3689010777;var IFCSTRUCTURALMEMBER=530289379;var IFCSTRUCTURALITEM=3136571912;var IFCSTRUCTURALACTIVITY=3544373492;var IFCSPHERE=451544542;var IFCSPATIALSTRUCTUREELEMENTTYPE=3893378262;var IFCSPATIALSTRUCTUREELEMENT=2706606064;var IFCRIGHTCIRCULARCYLINDER=3626867408;var IFCRIGHTCIRCULARCONE=4158566097;var IFCREVOLVEDAREASOLID=1856042241;var IFCRESOURCE=2914609552;var IFCRELVOIDSELEMENT=1401173127;var IFCRELSPACEBOUNDARY=3451746338;var IFCRELSERVICESBUILDINGS=366585022;var IFCRELSEQUENCE=4122056220;var IFCRELSCHEDULESCOSTITEMS=1058617721;var IFCRELREFERENCEDINSPATIALSTRUCTURE=1245217292;var IFCRELPROJECTSELEMENT=750771296;var IFCRELOVERRIDESPROPERTIES=202636808;var IFCRELOCCUPIESSPACES=2051452291;var IFCRELNESTS=3268803585;var IFCRELINTERACTIONREQUIREMENTS=4189434867;var IFCRELFLOWCONTROLELEMENTS=279856033;var IFCRELFILLSELEMENT=3940055652;var IFCRELDEFINESBYTYPE=781010003;var IFCRELDEFINESBYPROPERTIES=4186316022;var IFCRELDEFINES=693640335;var IFCRELDECOMPOSES=2551354335;var IFCRELCOVERSSPACES=2802773753;var IFCRELCOVERSBLDGELEMENTS=886880790;var IFCRELCONTAINEDINSPATIALSTRUCTURE=3242617779;var IFCRELCONNECTSWITHREALIZINGELEMENTS=3678494232;var IFCRELCONNECTSWITHECCENTRICITY=504942748;var IFCRELCONNECTSSTRUCTURALMEMBER=1638771189;var IFCRELCONNECTSSTRUCTURALELEMENT=3912681535;var IFCRELCONNECTSSTRUCTURALACTIVITY=2127690289;var IFCRELCONNECTSPORTS=3190031847;var IFCRELCONNECTSPORTTOELEMENT=4201705270;var IFCRELCONNECTSPATHELEMENTS=3945020480;var IFCRELCONNECTSELEMENTS=1204542856;var IFCRELCONNECTS=826625072;var IFCRELASSOCIATESPROFILEPROPERTIES=2851387026;var IFCRELASSOCIATESMATERIAL=2655215786;var IFCRELASSOCIATESLIBRARY=3840914261;var IFCRELASSOCIATESDOCUMENT=982818633;var IFCRELASSOCIATESCONSTRAINT=2728634034;var IFCRELASSOCIATESCLASSIFICATION=919958153;var IFCRELASSOCIATESAPPROVAL=4095574036;var IFCRELASSOCIATESAPPLIEDVALUE=1327628568;var IFCRELASSOCIATES=1865459582;var IFCRELASSIGNSTORESOURCE=205026976;var IFCRELASSIGNSTOPROJECTORDER=3372526763;var IFCRELASSIGNSTOPRODUCT=2857406711;var IFCRELASSIGNSTOPROCESS=4278684876;var IFCRELASSIGNSTOGROUP=1307041759;var IFCRELASSIGNSTOCONTROL=2495723537;var IFCRELASSIGNSTOACTOR=1683148259;var IFCRELASSIGNS=3939117080;var IFCRECTANGULARTRIMMEDSURFACE=3454111270;var IFCRECTANGULARPYRAMID=2798486643;var IFCRECTANGLEHOLLOWPROFILEDEF=2770003689;var IFCPROXY=3219374653;var IFCPROPERTYSET=1451395588;var IFCPROJECTIONCURVE=4194566429;var IFCPROJECT=103090709;var IFCPRODUCT=4208778838;var IFCPROCESS=2945172077;var IFCPLANE=220341763;var IFCPLANARBOX=603570806;var IFCPERMEABLECOVERINGPROPERTIES=3566463478;var IFCOFFSETCURVE3D=3505215534;var IFCOFFSETCURVE2D=3388369263;var IFCOBJECT=3888040117;var IFCMANIFOLDSOLIDBREP=1425443689;var IFCLINE=1281925730;var IFCLSHAPEPROFILEDEF=572779678;var IFCISHAPEPROFILEDEF=1484403080;var IFCGEOMETRICCURVESET=987898635;var IFCFURNITURETYPE=1268542332;var IFCFURNISHINGELEMENTTYPE=4238390223;var IFCFLUIDFLOWPROPERTIES=3455213021;var IFCFILLAREASTYLETILES=315944413;var IFCFILLAREASTYLETILESYMBOLWITHSTYLE=4203026998;var IFCFILLAREASTYLEHATCHING=374418227;var IFCFACEBASEDSURFACEMODEL=2047409740;var IFCEXTRUDEDAREASOLID=477187591;var IFCENERGYPROPERTIES=80994333;var IFCELLIPSEPROFILEDEF=2835456948;var IFCELEMENTARYSURFACE=2777663545;var IFCELEMENTTYPE=339256511;var IFCELEMENTQUANTITY=1883228015;var IFCEDGELOOP=1472233963;var IFCDRAUGHTINGPREDEFINEDCURVEFONT=4006246654;var IFCDRAUGHTINGPREDEFINEDCOLOUR=445594917;var IFCDRAUGHTINGCALLOUT=3073041342;var IFCDOORSTYLE=526551008;var IFCDOORPANELPROPERTIES=1714330368;var IFCDOORLININGPROPERTIES=2963535650;var IFCDIRECTION=32440307;var IFCDIMENSIONCURVETERMINATOR=4054601972;var IFCDIMENSIONCURVE=606661476;var IFCDEFINEDSYMBOL=693772133;var IFCCURVEBOUNDEDPLANE=2827736869;var IFCCURVE=2601014836;var IFCCSGSOLID=2147822146;var IFCCSGPRIMITIVE3D=2506170314;var IFCCRANERAILFSHAPEPROFILEDEF=194851669;var IFCCRANERAILASHAPEPROFILEDEF=4133800736;var IFCCOMPOSITECURVESEGMENT=2485617015;var IFCCLOSEDSHELL=2205249479;var IFCCIRCLEPROFILEDEF=1383045692;var IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM=1416205885;var IFCCARTESIANTRANSFORMATIONOPERATOR3D=3331915920;var IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM=3486308946;var IFCCARTESIANTRANSFORMATIONOPERATOR2D=3749851601;var IFCCARTESIANTRANSFORMATIONOPERATOR=59481748;var IFCCARTESIANPOINT=1123145078;var IFCCSHAPEPROFILEDEF=2898889636;var IFCBOXEDHALFSPACE=2713105998;var IFCBOUNDINGBOX=2581212453;var IFCBOUNDEDSURFACE=4182860854;var IFCBOOLEANRESULT=2736907675;var IFCAXIS2PLACEMENT3D=2740243338;var IFCAXIS2PLACEMENT2D=3125803723;var IFCAXIS1PLACEMENT=4261334040;var IFCANNOTATIONSURFACE=1302238472;var IFCANNOTATIONFILLAREAOCCURRENCE=2265737646;var IFCANNOTATIONFILLAREA=669184980;var IFCANNOTATIONCURVEOCCURRENCE=3288037868;var IFCZSHAPEPROFILEDEF=2543172580;var IFCWINDOWSTYLE=1299126871;var IFCWINDOWPANELPROPERTIES=512836454;var IFCWINDOWLININGPROPERTIES=336235671;var IFCVERTEXLOOP=2759199220;var IFCVECTOR=1417489154;var IFCUSHAPEPROFILEDEF=427810014;var IFCTYPEPRODUCT=2347495698;var IFCTYPEOBJECT=1628702193;var IFCTWODIRECTIONREPEATFACTOR=1345879162;var IFCTRAPEZIUMPROFILEDEF=2715220739;var IFCTEXTLITERALWITHEXTENT=3124975700;var IFCTEXTLITERAL=4282788508;var IFCTERMINATORSYMBOL=3028897424;var IFCTSHAPEPROFILEDEF=3071757647;var IFCSWEPTSURFACE=230924584;var IFCSWEPTDISKSOLID=1260650574;var IFCSWEPTAREASOLID=2247615214;var IFCSURFACESTYLERENDERING=1878645084;var IFCSURFACE=2513912981;var IFCSUBEDGE=2233826070;var IFCSTRUCTURALSTEELPROFILEPROPERTIES=3653947884;var IFCSTRUCTURALPROFILEPROPERTIES=3843319758;var IFCSTRUCTURALLOADSINGLEFORCEWARPING=1190533807;var IFCSTRUCTURALLOADSINGLEFORCE=1597423693;var IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION=1973038258;var IFCSTRUCTURALLOADSINGLEDISPLACEMENT=2473145415;var IFCSTRUCTURALLOADPLANARFORCE=2668620305;var IFCSTRUCTURALLOADLINEARFORCE=1595516126;var IFCSPACETHERMALLOADPROPERTIES=390701378;var IFCSOUNDVALUE=1202362311;var IFCSOUNDPROPERTIES=2485662743;var IFCSOLIDMODEL=723233188;var IFCSLIPPAGECONNECTIONCONDITION=2609359061;var IFCSHELLBASEDSURFACEMODEL=4124623270;var IFCSERVICELIFEFACTOR=2411513650;var IFCSECTIONEDSPINE=1509187699;var IFCROUNDEDRECTANGLEPROFILEDEF=2778083089;var IFCRELATIONSHIP=478536968;var IFCREINFORCEMENTDEFINITIONPROPERTIES=3765753017;var IFCREGULARTIMESERIES=3413951693;var IFCRECTANGLEPROFILEDEF=3615266464;var IFCPROPERTYTABLEVALUE=110355661;var IFCPROPERTYSINGLEVALUE=3650150729;var IFCPROPERTYSETDEFINITION=3357820518;var IFCPROPERTYREFERENCEVALUE=941946838;var IFCPROPERTYLISTVALUE=2752243245;var IFCPROPERTYENUMERATEDVALUE=4166981789;var IFCPROPERTYDEFINITION=1680319473;var IFCPROPERTYBOUNDEDVALUE=871118103;var IFCPRODUCTDEFINITIONSHAPE=673634403;var IFCPREDEFINEDPOINTMARKERSYMBOL=179317114;var IFCPREDEFINEDDIMENSIONSYMBOL=433424934;var IFCPREDEFINEDCURVEFONT=2559016684;var IFCPREDEFINEDCOLOUR=759155922;var IFCPOLYGONALBOUNDEDHALFSPACE=2775532180;var IFCPOLYLOOP=2924175390;var IFCPOINTONSURFACE=1423911732;var IFCPOINTONCURVE=4022376103;var IFCPOINT=2067069095;var IFCPLANAREXTENT=1663979128;var IFCPLACEMENT=2004835150;var IFCPIXELTEXTURE=597895409;var IFCPHYSICALCOMPLEXQUANTITY=3021840470;var IFCPATH=2519244187;var IFCPARAMETERIZEDPROFILEDEF=2529465313;var IFCORIENTEDEDGE=1029017970;var IFCOPENSHELL=2665983363;var IFCONEDIRECTIONREPEATFACTOR=2833995503;var IFCOBJECTDEFINITION=219451334;var IFCMECHANICALCONCRETEMATERIALPROPERTIES=1430189142;var IFCMATERIALDEFINITIONREPRESENTATION=2022407955;var IFCMAPPEDITEM=2347385850;var IFCLOOP=1008929658;var IFCLOCALPLACEMENT=2624227202;var IFCLIGHTSOURCESPOT=3422422726;var IFCLIGHTSOURCEPOSITIONAL=1520743889;var IFCLIGHTSOURCEGONIOMETRIC=4266656042;var IFCLIGHTSOURCEDIRECTIONAL=2604431987;var IFCLIGHTSOURCEAMBIENT=125510826;var IFCLIGHTSOURCE=1402838566;var IFCIRREGULARTIMESERIES=3741457305;var IFCIMAGETEXTURE=3905492369;var IFCHYGROSCOPICMATERIALPROPERTIES=2445078500;var IFCHALFSPACESOLID=812098782;var IFCGRIDPLACEMENT=178086475;var IFCGEOMETRICSET=3590301190;var IFCGEOMETRICREPRESENTATIONSUBCONTEXT=4142052618;var IFCGEOMETRICREPRESENTATIONITEM=2453401579;var IFCGEOMETRICREPRESENTATIONCONTEXT=3448662350;var IFCGENERALPROFILEPROPERTIES=1446786286;var IFCGENERALMATERIALPROPERTIES=803998398;var IFCFUELPROPERTIES=3857492461;var IFCFILLAREASTYLE=738692330;var IFCFAILURECONNECTIONCONDITION=4219587988;var IFCFACESURFACE=3008276851;var IFCFACEOUTERBOUND=803316827;var IFCFACEBOUND=1809719519;var IFCFACE=2556980723;var IFCEXTENDEDMATERIALPROPERTIES=1860660968;var IFCEDGECURVE=476780140;var IFCEDGE=3900360178;var IFCDRAUGHTINGPREDEFINEDTEXTFONT=4170525392;var IFCDOCUMENTREFERENCE=3732053477;var IFCDIMENSIONPAIR=1694125774;var IFCDIMENSIONCALLOUTRELATIONSHIP=2273265877;var IFCDERIVEDPROFILEDEF=3632507154;var IFCCURVESTYLE=3800577675;var IFCCONVERSIONBASEDUNIT=2889183280;var IFCCONTEXTDEPENDENTUNIT=3050246964;var IFCCONNECTIONPOINTECCENTRICITY=45288368;var IFCCONNECTIONCURVEGEOMETRY=1981873012;var IFCCONNECTEDFACESET=370225590;var IFCCOMPOSITEPROFILEDEF=1485152156;var IFCCOMPLEXPROPERTY=2542286263;var IFCCOLOURRGB=776857604;var IFCCLASSIFICATIONREFERENCE=647927063;var IFCCENTERLINEPROFILEDEF=3150382593;var IFCBLOBTEXTURE=616511568;var IFCARBITRARYPROFILEDEFWITHVOIDS=2705031697;var IFCARBITRARYOPENPROFILEDEF=1310608509;var IFCARBITRARYCLOSEDPROFILEDEF=3798115385;var IFCANNOTATIONTEXTOCCURRENCE=2297822566;var IFCANNOTATIONSYMBOLOCCURRENCE=3612888222;var IFCANNOTATIONSURFACEOCCURRENCE=962685235;var IFCANNOTATIONOCCURRENCE=2442683028;var IFCWATERPROPERTIES=1065908215;var IFCVIRTUALGRIDINTERSECTION=891718957;var IFCVERTEXPOINT=1907098498;var IFCVERTEX=2799835756;var IFCTOPOLOGYREPRESENTATION=1735638870;var IFCTOPOLOGICALREPRESENTATIONITEM=1377556343;var IFCTIMESERIESREFERENCERELATIONSHIP=1718945513;var IFCTHERMALMATERIALPROPERTIES=3317419933;var IFCTEXTUREVERTEX=1210645708;var IFCTEXTUREMAP=2552916305;var IFCTEXTURECOORDINATEGENERATOR=1742049831;var IFCTEXTURECOORDINATE=280115917;var IFCTEXTSTYLETEXTMODEL=1640371178;var IFCTEXTSTYLEFORDEFINEDFONT=2636378356;var IFCTEXTSTYLEFONTMODEL=1983826977;var IFCTEXTSTYLE=1447204868;var IFCTELECOMADDRESS=912023232;var IFCTABLE=985171141;var IFCSYMBOLSTYLE=1290481447;var IFCSURFACETEXTURE=626085974;var IFCSURFACESTYLEWITHTEXTURES=1351298697;var IFCSURFACESTYLESHADING=846575682;var IFCSURFACESTYLEREFRACTION=1607154358;var IFCSURFACESTYLELIGHTING=3303107099;var IFCSURFACESTYLE=1300840506;var IFCSTYLEDREPRESENTATION=3049322572;var IFCSTYLEDITEM=3958052878;var IFCSTYLEMODEL=2830218821;var IFCSTRUCTURALLOADTEMPERATURE=3408363356;var IFCSTRUCTURALLOADSTATIC=2525727697;var IFCSIMPLEPROPERTY=3692461612;var IFCSHAPEREPRESENTATION=4240577450;var IFCSHAPEMODEL=3982875396;var IFCSHAPEASPECT=867548509;var IFCSECTIONREINFORCEMENTPROPERTIES=4165799628;var IFCSECTIONPROPERTIES=2042790032;var IFCSIUNIT=448429030;var IFCRIBPLATEPROFILEPROPERTIES=3679540991;var IFCREPRESENTATIONMAP=1660063152;var IFCREPRESENTATION=1076942058;var IFCREINFORCEMENTBARPROPERTIES=1580146022;var IFCREFERENCESVALUEDOCUMENT=2692823254;var IFCQUANTITYWEIGHT=825690147;var IFCQUANTITYVOLUME=2405470396;var IFCQUANTITYTIME=3252649465;var IFCQUANTITYLENGTH=931644368;var IFCQUANTITYCOUNT=2093928680;var IFCQUANTITYAREA=2044713172;var IFCPROPERTYENUMERATION=3710013099;var IFCPROPERTYDEPENDENCYRELATIONSHIP=148025276;var IFCPROPERTYCONSTRAINTRELATIONSHIP=3896028662;var IFCPROPERTY=2598011224;var IFCPROFILEPROPERTIES=2802850158;var IFCPRODUCTSOFCOMBUSTIONPROPERTIES=2267347899;var IFCPRODUCTREPRESENTATION=2095639259;var IFCPRESENTATIONLAYERWITHSTYLE=1304840413;var IFCPRESENTATIONLAYERASSIGNMENT=2022622350;var IFCPREDEFINEDTEXTFONT=1775413392;var IFCPREDEFINEDTERMINATORSYMBOL=3213052703;var IFCPREDEFINEDSYMBOL=990879717;var IFCPREDEFINEDITEM=3727388367;var IFCPOSTALADDRESS=3355820592;var IFCPHYSICALSIMPLEQUANTITY=2226359599;var IFCPERSONANDORGANIZATION=101040310;var IFCPERSON=2077209135;var IFCORGANIZATIONRELATIONSHIP=1411181986;var IFCORGANIZATION=4251960020;var IFCOPTICALMATERIALPROPERTIES=1227763645;var IFCOBJECTIVE=2251480897;var IFCOBJECTPLACEMENT=3701648758;var IFCMETRIC=3368373690;var IFCMECHANICALSTEELMATERIALPROPERTIES=677618848;var IFCMECHANICALMATERIALPROPERTIES=4256014907;var IFCMATERIALPROPERTIES=3265635763;var IFCMATERIALLAYERSETUSAGE=1303795690;var IFCMATERIALLAYERSET=3303938423;var IFCMATERIALLAYER=248100487;var IFCMATERIALCLASSIFICATIONRELATIONSHIP=1847130766;var IFCMATERIAL=1838606355;var IFCLIBRARYREFERENCE=3452421091;var IFCLIBRARYINFORMATION=2655187982;var IFCEXTERNALLYDEFINEDTEXTFONT=3548104201;var IFCEXTERNALLYDEFINEDSYMBOL=3207319532;var IFCEXTERNALLYDEFINEDSURFACESTYLE=1040185647;var IFCEXTERNALLYDEFINEDHATCHSTYLE=2242383968;var IFCENVIRONMENTALIMPACTVALUE=1648886627;var IFCDRAUGHTINGCALLOUTRELATIONSHIP=3796139169;var IFCDOCUMENTINFORMATIONRELATIONSHIP=770865208;var IFCDOCUMENTINFORMATION=1154170062;var IFCCURVESTYLEFONTPATTERN=3510044353;var IFCCURVESTYLEFONTANDSCALING=2367409068;var IFCCURVESTYLEFONT=1105321065;var IFCCURRENCYRELATIONSHIP=539742890;var IFCCOSTVALUE=602808272;var IFCCONSTRAINTRELATIONSHIP=347226245;var IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP=613356794;var IFCCONSTRAINTAGGREGATIONRELATIONSHIP=1658513725;var IFCCONNECTIONSURFACEGEOMETRY=2732653382;var IFCCONNECTIONPORTGEOMETRY=4257277454;var IFCCONNECTIONPOINTGEOMETRY=2614616156;var IFCCOLOURSPECIFICATION=3264961684;var IFCCLASSIFICATIONITEMRELATIONSHIP=1098599126;var IFCCLASSIFICATIONITEM=1767535486;var IFCCLASSIFICATION=747523909;var IFCBOUNDARYNODECONDITIONWARPING=2069777674;var IFCBOUNDARYNODECONDITION=1387855156;var IFCBOUNDARYFACECONDITION=3367102660;var IFCBOUNDARYEDGECONDITION=1560379544;var IFCAPPROVALRELATIONSHIP=3869604511;var IFCAPPROVALACTORRELATIONSHIP=2080292479;var IFCAPPLIEDVALUERELATIONSHIP=1110488051;var FILE_DESCRIPTION=599546466;var FILE_NAME=1390159747;var FILE_SCHEMA=1109904537;var Handle=/*#__PURE__*/_createClass(function Handle(value){_classCallCheck(this,Handle);this.value=value;this.type=5;});var IfcLineObject=/*#__PURE__*/_createClass(function IfcLineObject(expressID){_classCallCheck(this,IfcLineObject);this.expressID=expressID;this.type=0;});var FromRawLineData=[];var InversePropertyDef={};var InheritanceDef={};var Constructors={};var ToRawLineData={};var TypeInitialisers={};var SchemaNames=[];function TypeInitialiser(schema,tapeItem){if(Array.isArray(tapeItem))tapeItem.map(function(p){return TypeInitialiser(schema,p);});if(tapeItem.typecode)return TypeInitialisers[schema][tapeItem.typecode](tapeItem.value);else return tapeItem.value;}function Labelise(tapeItem){tapeItem.value=tapeItem.value.toString();tapeItem.valueType=tapeItem.type;tapeItem.type=2;tapeItem.label=tapeItem.constructor.name.toUpperCase();return tapeItem;}var Schemas;(function(Schemas2){Schemas2["IFC2X3"]="IFC2X3";Schemas2["IFC4"]="IFC4";Schemas2["IFC4X3"]="IFC4X3";})(Schemas||(Schemas={}));SchemaNames[1]="IFC2X3";FromRawLineData[1]={3630933823:function _(id,v){return new IFC2X3.IfcActorRole(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcText(v[2].value));},618182010:function _(id,v){return new IFC2X3.IfcAddress(id,v[0],!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},639542469:function _(id,v){return new IFC2X3.IfcApplication(id,new Handle(v[0].value),new IFC2X3.IfcLabel(v[1].value),new IFC2X3.IfcLabel(v[2].value),new IFC2X3.IfcIdentifier(v[3].value));},411424972:function _(id,v){return new IFC2X3.IfcAppliedValue(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value));},1110488051:function _(id,v){return new IFC2X3.IfcAppliedValueRelationship(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2],!v[3]?null:new IFC2X3.IfcLabel(v[3].value),!v[4]?null:new IFC2X3.IfcText(v[4].value));},130549933:function _(id,v){return new IFC2X3.IfcApproval(id,!v[0]?null:new IFC2X3.IfcText(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcLabel(v[3].value),!v[4]?null:new IFC2X3.IfcText(v[4].value),new IFC2X3.IfcLabel(v[5].value),new IFC2X3.IfcIdentifier(v[6].value));},2080292479:function _(id,v){return new IFC2X3.IfcApprovalActorRelationship(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value));},390851274:function _(id,v){return new IFC2X3.IfcApprovalPropertyRelationship(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value));},3869604511:function _(id,v){return new IFC2X3.IfcApprovalRelationship(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcText(v[2].value),new IFC2X3.IfcLabel(v[3].value));},4037036970:function _(id,v){return new IFC2X3.IfcBoundaryCondition(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value));},1560379544:function _(id,v){return new IFC2X3.IfcBoundaryEdgeCondition(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcModulusOfLinearSubgradeReactionMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcModulusOfLinearSubgradeReactionMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcModulusOfLinearSubgradeReactionMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcModulusOfRotationalSubgradeReactionMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcModulusOfRotationalSubgradeReactionMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcModulusOfRotationalSubgradeReactionMeasure(v[6].value));},3367102660:function _(id,v){return new IFC2X3.IfcBoundaryFaceCondition(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcModulusOfSubgradeReactionMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcModulusOfSubgradeReactionMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcModulusOfSubgradeReactionMeasure(v[3].value));},1387855156:function _(id,v){return new IFC2X3.IfcBoundaryNodeCondition(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLinearStiffnessMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLinearStiffnessMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcLinearStiffnessMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcRotationalStiffnessMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcRotationalStiffnessMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcRotationalStiffnessMeasure(v[6].value));},2069777674:function _(id,v){return new IFC2X3.IfcBoundaryNodeConditionWarping(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLinearStiffnessMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLinearStiffnessMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcLinearStiffnessMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcRotationalStiffnessMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcRotationalStiffnessMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcRotationalStiffnessMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcWarpingMomentMeasure(v[7].value));},622194075:function _(id,v){return new IFC2X3.IfcCalendarDate(id,new IFC2X3.IfcDayInMonthNumber(v[0].value),new IFC2X3.IfcMonthInYearNumber(v[1].value),new IFC2X3.IfcYearNumber(v[2].value));},747523909:function _(id,v){return new IFC2X3.IfcClassification(id,new IFC2X3.IfcLabel(v[0].value),new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC2X3.IfcLabel(v[3].value));},1767535486:function _(id,v){return new IFC2X3.IfcClassificationItem(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new IFC2X3.IfcLabel(v[2].value));},1098599126:function _(id,v){return new IFC2X3.IfcClassificationItemRelationship(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},938368621:function _(id,v){return new IFC2X3.IfcClassificationNotation(id,v[0].map(function(p){return new Handle(p.value);}));},3639012971:function _(id,v){return new IFC2X3.IfcClassificationNotationFacet(id,new IFC2X3.IfcLabel(v[0].value));},3264961684:function _(id,v){return new IFC2X3.IfcColourSpecification(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value));},2859738748:function _(id,_2){return new IFC2X3.IfcConnectionGeometry(id);},2614616156:function _(id,v){return new IFC2X3.IfcConnectionPointGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},4257277454:function _(id,v){return new IFC2X3.IfcConnectionPortGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value));},2732653382:function _(id,v){return new IFC2X3.IfcConnectionSurfaceGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1959218052:function _(id,v){return new IFC2X3.IfcConstraint(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2],!v[3]?null:new IFC2X3.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value));},1658513725:function _(id,v){return new IFC2X3.IfcConstraintAggregationRelationship(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}),v[4]);},613356794:function _(id,v){return new IFC2X3.IfcConstraintClassificationRelationship(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},347226245:function _(id,v){return new IFC2X3.IfcConstraintRelationship(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1065062679:function _(id,v){return new IFC2X3.IfcCoordinatedUniversalTimeOffset(id,new IFC2X3.IfcHourInDay(v[0].value),!v[1]?null:new IFC2X3.IfcMinuteInHour(v[1].value),v[2]);},602808272:function _(id,v){return new IFC2X3.IfcCostValue(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new IFC2X3.IfcText(v[7].value));},539742890:function _(id,v){return new IFC2X3.IfcCurrencyRelationship(id,new Handle(v[0].value),new Handle(v[1].value),new IFC2X3.IfcPositiveRatioMeasure(v[2].value),new Handle(v[3].value),!v[4]?null:new Handle(v[4].value));},1105321065:function _(id,v){return new IFC2X3.IfcCurveStyleFont(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},2367409068:function _(id,v){return new IFC2X3.IfcCurveStyleFontAndScaling(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),new IFC2X3.IfcPositiveRatioMeasure(v[2].value));},3510044353:function _(id,v){return new IFC2X3.IfcCurveStyleFontPattern(id,new IFC2X3.IfcLengthMeasure(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value));},1072939445:function _(id,v){return new IFC2X3.IfcDateAndTime(id,new Handle(v[0].value),new Handle(v[1].value));},1765591967:function _(id,v){return new IFC2X3.IfcDerivedUnit(id,v[0].map(function(p){return new Handle(p.value);}),v[1],!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},1045800335:function _(id,v){return new IFC2X3.IfcDerivedUnitElement(id,new Handle(v[0].value),v[1].value);},2949456006:function _(id,v){return new IFC2X3.IfcDimensionalExponents(id,v[0].value,v[1].value,v[2].value,v[3].value,v[4].value,v[5].value,v[6].value);},1376555844:function _(id,v){return new IFC2X3.IfcDocumentElectronicFormat(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},1154170062:function _(id,v){return new IFC2X3.IfcDocumentInformation(id,new IFC2X3.IfcIdentifier(v[0].value),new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcText(v[2].value),!v[3]?null:v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:new IFC2X3.IfcText(v[4].value),!v[5]?null:new IFC2X3.IfcText(v[5].value),!v[6]?null:new IFC2X3.IfcText(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),!v[11]?null:new Handle(v[11].value),!v[12]?null:new Handle(v[12].value),!v[13]?null:new Handle(v[13].value),!v[14]?null:new Handle(v[14].value),v[15],v[16]);},770865208:function _(id,v){return new IFC2X3.IfcDocumentInformationRelationship(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},3796139169:function _(id,v){return new IFC2X3.IfcDraughtingCalloutRelationship(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},1648886627:function _(id,v){return new IFC2X3.IfcEnvironmentalImpactValue(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3200245327:function _(id,v){return new IFC2X3.IfcExternalReference(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},2242383968:function _(id,v){return new IFC2X3.IfcExternallyDefinedHatchStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},1040185647:function _(id,v){return new IFC2X3.IfcExternallyDefinedSurfaceStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},3207319532:function _(id,v){return new IFC2X3.IfcExternallyDefinedSymbol(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},3548104201:function _(id,v){return new IFC2X3.IfcExternallyDefinedTextFont(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},852622518:function _(id,v){return new IFC2X3.IfcGridAxis(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),new IFC2X3.IfcBoolean(v[2].value));},3020489413:function _(id,v){return new IFC2X3.IfcIrregularTimeSeriesValue(id,new Handle(v[0].value),v[1].map(function(p){return TypeInitialiser(1,p);}));},2655187982:function _(id,v){return new IFC2X3.IfcLibraryInformation(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new Handle(p.value);}));},3452421091:function _(id,v){return new IFC2X3.IfcLibraryReference(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},4162380809:function _(id,v){return new IFC2X3.IfcLightDistributionData(id,new IFC2X3.IfcPlaneAngleMeasure(v[0].value),v[1].map(function(p){return new IFC2X3.IfcPlaneAngleMeasure(p.value);}),v[2].map(function(p){return new IFC2X3.IfcLuminousIntensityDistributionMeasure(p.value);}));},1566485204:function _(id,v){return new IFC2X3.IfcLightIntensityDistribution(id,v[0],v[1].map(function(p){return new Handle(p.value);}));},30780891:function _(id,v){return new IFC2X3.IfcLocalTime(id,new IFC2X3.IfcHourInDay(v[0].value),!v[1]?null:new IFC2X3.IfcMinuteInHour(v[1].value),!v[2]?null:new IFC2X3.IfcSecondInMinute(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC2X3.IfcDaylightSavingHour(v[4].value));},1838606355:function _(id,v){return new IFC2X3.IfcMaterial(id,new IFC2X3.IfcLabel(v[0].value));},1847130766:function _(id,v){return new IFC2X3.IfcMaterialClassificationRelationship(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value));},248100487:function _(id,v){return new IFC2X3.IfcMaterialLayer(id,!v[0]?null:new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLogical(v[2].value));},3303938423:function _(id,v){return new IFC2X3.IfcMaterialLayerSet(id,v[0].map(function(p){return new Handle(p.value);}),!v[1]?null:new IFC2X3.IfcLabel(v[1].value));},1303795690:function _(id,v){return new IFC2X3.IfcMaterialLayerSetUsage(id,new Handle(v[0].value),v[1],v[2],new IFC2X3.IfcLengthMeasure(v[3].value));},2199411900:function _(id,v){return new IFC2X3.IfcMaterialList(id,v[0].map(function(p){return new Handle(p.value);}));},3265635763:function _(id,v){return new IFC2X3.IfcMaterialProperties(id,new Handle(v[0].value));},2597039031:function _(id,v){return new IFC2X3.IfcMeasureWithUnit(id,TypeInitialiser(1,v[0]),new Handle(v[1].value));},4256014907:function _(id,v){return new IFC2X3.IfcMechanicalMaterialProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcDynamicViscosityMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcModulusOfElasticityMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcModulusOfElasticityMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcThermalExpansionCoefficientMeasure(v[5].value));},677618848:function _(id,v){return new IFC2X3.IfcMechanicalSteelMaterialProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcDynamicViscosityMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcModulusOfElasticityMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcModulusOfElasticityMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcThermalExpansionCoefficientMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPressureMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPressureMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveRatioMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcModulusOfElasticityMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcPressureMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcPositiveRatioMeasure(v[11].value),!v[12]?null:v[12].map(function(p){return new Handle(p.value);}));},3368373690:function _(id,v){return new IFC2X3.IfcMetric(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2],!v[3]?null:new IFC2X3.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new IFC2X3.IfcLabel(v[8].value),new Handle(v[9].value));},2706619895:function _(id,v){return new IFC2X3.IfcMonetaryUnit(id,v[0]);},1918398963:function _(id,v){return new IFC2X3.IfcNamedUnit(id,new Handle(v[0].value),v[1]);},3701648758:function _(id,_3){return new IFC2X3.IfcObjectPlacement(id);},2251480897:function _(id,v){return new IFC2X3.IfcObjective(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2],!v[3]?null:new IFC2X3.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value),v[9],!v[10]?null:new IFC2X3.IfcLabel(v[10].value));},1227763645:function _(id,v){return new IFC2X3.IfcOpticalMaterialProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcPositiveRatioMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcPositiveRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPositiveRatioMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveRatioMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPositiveRatioMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveRatioMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveRatioMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveRatioMeasure(v[9].value));},4251960020:function _(id,v){return new IFC2X3.IfcOrganization(id,!v[0]?null:new IFC2X3.IfcIdentifier(v[0].value),new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcText(v[2].value),!v[3]?null:v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:v[4].map(function(p){return new Handle(p.value);}));},1411181986:function _(id,v){return new IFC2X3.IfcOrganizationRelationship(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1207048766:function _(id,v){return new IFC2X3.IfcOwnerHistory(id,new Handle(v[0].value),new Handle(v[1].value),v[2],v[3],!v[4]?null:new IFC2X3.IfcTimeStamp(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new IFC2X3.IfcTimeStamp(v[7].value));},2077209135:function _(id,v){return new IFC2X3.IfcPerson(id,!v[0]?null:new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC2X3.IfcLabel(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC2X3.IfcLabel(p.value);}),!v[5]?null:v[5].map(function(p){return new IFC2X3.IfcLabel(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},101040310:function _(id,v){return new IFC2X3.IfcPersonAndOrganization(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2483315170:function _(id,v){return new IFC2X3.IfcPhysicalQuantity(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value));},2226359599:function _(id,v){return new IFC2X3.IfcPhysicalSimpleQuantity(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value));},3355820592:function _(id,v){return new IFC2X3.IfcPostalAddress(id,v[0],!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcLabel(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC2X3.IfcLabel(p.value);}),!v[5]?null:new IFC2X3.IfcLabel(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),!v[9]?null:new IFC2X3.IfcLabel(v[9].value));},3727388367:function _(id,v){return new IFC2X3.IfcPreDefinedItem(id,new IFC2X3.IfcLabel(v[0].value));},990879717:function _(id,v){return new IFC2X3.IfcPreDefinedSymbol(id,new IFC2X3.IfcLabel(v[0].value));},3213052703:function _(id,v){return new IFC2X3.IfcPreDefinedTerminatorSymbol(id,new IFC2X3.IfcLabel(v[0].value));},1775413392:function _(id,v){return new IFC2X3.IfcPreDefinedTextFont(id,new IFC2X3.IfcLabel(v[0].value));},2022622350:function _(id,v){return new IFC2X3.IfcPresentationLayerAssignment(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC2X3.IfcIdentifier(v[3].value));},1304840413:function _(id,v){return new IFC2X3.IfcPresentationLayerWithStyle(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC2X3.IfcIdentifier(v[3].value),v[4].value,v[5].value,v[6].value,!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},3119450353:function _(id,v){return new IFC2X3.IfcPresentationStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value));},2417041796:function _(id,v){return new IFC2X3.IfcPresentationStyleAssignment(id,v[0].map(function(p){return new Handle(p.value);}));},2095639259:function _(id,v){return new IFC2X3.IfcProductRepresentation(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},2267347899:function _(id,v){return new IFC2X3.IfcProductsOfCombustionProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcSpecificHeatCapacityMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcPositiveRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPositiveRatioMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveRatioMeasure(v[4].value));},3958567839:function _(id,v){return new IFC2X3.IfcProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value));},2802850158:function _(id,v){return new IFC2X3.IfcProfileProperties(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value));},2598011224:function _(id,v){return new IFC2X3.IfcProperty(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value));},3896028662:function _(id,v){return new IFC2X3.IfcPropertyConstraintRelationship(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},148025276:function _(id,v){return new IFC2X3.IfcPropertyDependencyRelationship(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcText(v[4].value));},3710013099:function _(id,v){return new IFC2X3.IfcPropertyEnumeration(id,new IFC2X3.IfcLabel(v[0].value),v[1].map(function(p){return TypeInitialiser(1,p);}),!v[2]?null:new Handle(v[2].value));},2044713172:function _(id,v){return new IFC2X3.IfcQuantityArea(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC2X3.IfcAreaMeasure(v[3].value));},2093928680:function _(id,v){return new IFC2X3.IfcQuantityCount(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC2X3.IfcCountMeasure(v[3].value));},931644368:function _(id,v){return new IFC2X3.IfcQuantityLength(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC2X3.IfcLengthMeasure(v[3].value));},3252649465:function _(id,v){return new IFC2X3.IfcQuantityTime(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC2X3.IfcTimeMeasure(v[3].value));},2405470396:function _(id,v){return new IFC2X3.IfcQuantityVolume(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC2X3.IfcVolumeMeasure(v[3].value));},825690147:function _(id,v){return new IFC2X3.IfcQuantityWeight(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC2X3.IfcMassMeasure(v[3].value));},2692823254:function _(id,v){return new IFC2X3.IfcReferencesValueDocument(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},1580146022:function _(id,v){return new IFC2X3.IfcReinforcementBarProperties(id,new IFC2X3.IfcAreaMeasure(v[0].value),new IFC2X3.IfcLabel(v[1].value),v[2],!v[3]?null:new IFC2X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcCountMeasure(v[5].value));},1222501353:function _(id,v){return new IFC2X3.IfcRelaxation(id,new IFC2X3.IfcNormalisedRatioMeasure(v[0].value),new IFC2X3.IfcNormalisedRatioMeasure(v[1].value));},1076942058:function _(id,v){return new IFC2X3.IfcRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3377609919:function _(id,v){return new IFC2X3.IfcRepresentationContext(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value));},3008791417:function _(id,_4){return new IFC2X3.IfcRepresentationItem(id);},1660063152:function _(id,v){return new IFC2X3.IfcRepresentationMap(id,new Handle(v[0].value),new Handle(v[1].value));},3679540991:function _(id,v){return new IFC2X3.IfcRibPlateProfileProperties(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcPositiveLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPositiveLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),v[6]);},2341007311:function _(id,v){return new IFC2X3.IfcRoot(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},448429030:function _(id,v){return new IFC2X3.IfcSIUnit(id,v[0],v[1],v[2]);},2042790032:function _(id,v){return new IFC2X3.IfcSectionProperties(id,v[0],new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},4165799628:function _(id,v){return new IFC2X3.IfcSectionReinforcementProperties(id,new IFC2X3.IfcLengthMeasure(v[0].value),new IFC2X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLengthMeasure(v[2].value),v[3],new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},867548509:function _(id,v){return new IFC2X3.IfcShapeAspect(id,v[0].map(function(p){return new Handle(p.value);}),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcText(v[2].value),v[3].value,new Handle(v[4].value));},3982875396:function _(id,v){return new IFC2X3.IfcShapeModel(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},4240577450:function _(id,v){return new IFC2X3.IfcShapeRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3692461612:function _(id,v){return new IFC2X3.IfcSimpleProperty(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value));},2273995522:function _(id,v){return new IFC2X3.IfcStructuralConnectionCondition(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value));},2162789131:function _(id,v){return new IFC2X3.IfcStructuralLoad(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value));},2525727697:function _(id,v){return new IFC2X3.IfcStructuralLoadStatic(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value));},3408363356:function _(id,v){return new IFC2X3.IfcStructuralLoadTemperature(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[3].value));},2830218821:function _(id,v){return new IFC2X3.IfcStyleModel(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3958052878:function _(id,v){return new IFC2X3.IfcStyledItem(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},3049322572:function _(id,v){return new IFC2X3.IfcStyledRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1300840506:function _(id,v){return new IFC2X3.IfcSurfaceStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),v[1],v[2].map(function(p){return new Handle(p.value);}));},3303107099:function _(id,v){return new IFC2X3.IfcSurfaceStyleLighting(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},1607154358:function _(id,v){return new IFC2X3.IfcSurfaceStyleRefraction(id,!v[0]?null:new IFC2X3.IfcReal(v[0].value),!v[1]?null:new IFC2X3.IfcReal(v[1].value));},846575682:function _(id,v){return new IFC2X3.IfcSurfaceStyleShading(id,new Handle(v[0].value));},1351298697:function _(id,v){return new IFC2X3.IfcSurfaceStyleWithTextures(id,v[0].map(function(p){return new Handle(p.value);}));},626085974:function _(id,v){return new IFC2X3.IfcSurfaceTexture(id,v[0].value,v[1].value,v[2],!v[3]?null:new Handle(v[3].value));},1290481447:function _(id,v){return new IFC2X3.IfcSymbolStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),TypeInitialiser(1,v[1]));},985171141:function _(id,v){return new IFC2X3.IfcTable(id,v[0].value,v[1].map(function(p){return new Handle(p.value);}));},531007025:function _(id,v){return new IFC2X3.IfcTableRow(id,v[0].map(function(p){return TypeInitialiser(1,p);}),v[1].value);},912023232:function _(id,v){return new IFC2X3.IfcTelecomAddress(id,v[0],!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC2X3.IfcLabel(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC2X3.IfcLabel(p.value);}),!v[5]?null:new IFC2X3.IfcLabel(v[5].value),!v[6]?null:v[6].map(function(p){return new IFC2X3.IfcLabel(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value));},1447204868:function _(id,v){return new IFC2X3.IfcTextStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new Handle(v[2].value),new Handle(v[3].value));},1983826977:function _(id,v){return new IFC2X3.IfcTextStyleFontModel(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:v[1].map(function(p){return new IFC2X3.IfcTextFontName(p.value);}),!v[2]?null:new IFC2X3.IfcFontStyle(v[2].value),!v[3]?null:new IFC2X3.IfcFontVariant(v[3].value),!v[4]?null:new IFC2X3.IfcFontWeight(v[4].value),TypeInitialiser(1,v[5]));},2636378356:function _(id,v){return new IFC2X3.IfcTextStyleForDefinedFont(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1640371178:function _(id,v){return new IFC2X3.IfcTextStyleTextModel(id,!v[0]?null:TypeInitialiser(1,v[0]),!v[1]?null:new IFC2X3.IfcTextAlignment(v[1].value),!v[2]?null:new IFC2X3.IfcTextDecoration(v[2].value),!v[3]?null:TypeInitialiser(1,v[3]),!v[4]?null:TypeInitialiser(1,v[4]),!v[5]?null:new IFC2X3.IfcTextTransformation(v[5].value),!v[6]?null:TypeInitialiser(1,v[6]));},1484833681:function _(id,v){return new IFC2X3.IfcTextStyleWithBoxCharacteristics(id,!v[0]?null:new IFC2X3.IfcPositiveLengthMeasure(v[0].value),!v[1]?null:new IFC2X3.IfcPositiveLengthMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcPlaneAngleMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPlaneAngleMeasure(v[3].value),!v[4]?null:TypeInitialiser(1,v[4]));},280115917:function _(id,_5){return new IFC2X3.IfcTextureCoordinate(id);},1742049831:function _(id,v){return new IFC2X3.IfcTextureCoordinateGenerator(id,new IFC2X3.IfcLabel(v[0].value),v[1].map(function(p){return TypeInitialiser(1,p);}));},2552916305:function _(id,v){return new IFC2X3.IfcTextureMap(id,v[0].map(function(p){return new Handle(p.value);}));},1210645708:function _(id,v){return new IFC2X3.IfcTextureVertex(id,v[0].map(function(p){return new IFC2X3.IfcParameterValue(p.value);}));},3317419933:function _(id,v){return new IFC2X3.IfcThermalMaterialProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcSpecificHeatCapacityMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcThermalConductivityMeasure(v[4].value));},3101149627:function _(id,v){return new IFC2X3.IfcTimeSeries(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value),v[4],v[5],!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value));},1718945513:function _(id,v){return new IFC2X3.IfcTimeSeriesReferenceRelationship(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},581633288:function _(id,v){return new IFC2X3.IfcTimeSeriesValue(id,v[0].map(function(p){return TypeInitialiser(1,p);}));},1377556343:function _(id,_6){return new IFC2X3.IfcTopologicalRepresentationItem(id);},1735638870:function _(id,v){return new IFC2X3.IfcTopologyRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},180925521:function _(id,v){return new IFC2X3.IfcUnitAssignment(id,v[0].map(function(p){return new Handle(p.value);}));},2799835756:function _(id,_7){return new IFC2X3.IfcVertex(id);},3304826586:function _(id,v){return new IFC2X3.IfcVertexBasedTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new Handle(p.value);}));},1907098498:function _(id,v){return new IFC2X3.IfcVertexPoint(id,new Handle(v[0].value));},891718957:function _(id,v){return new IFC2X3.IfcVirtualGridIntersection(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new IFC2X3.IfcLengthMeasure(p.value);}));},1065908215:function _(id,v){return new IFC2X3.IfcWaterProperties(id,new Handle(v[0].value),!v[1]?null:v[1].value,!v[2]?null:new IFC2X3.IfcIonConcentrationMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcIonConcentrationMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcIonConcentrationMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPHMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[7].value));},2442683028:function _(id,v){return new IFC2X3.IfcAnnotationOccurrence(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},962685235:function _(id,v){return new IFC2X3.IfcAnnotationSurfaceOccurrence(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},3612888222:function _(id,v){return new IFC2X3.IfcAnnotationSymbolOccurrence(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},2297822566:function _(id,v){return new IFC2X3.IfcAnnotationTextOccurrence(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},3798115385:function _(id,v){return new IFC2X3.IfcArbitraryClosedProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value));},1310608509:function _(id,v){return new IFC2X3.IfcArbitraryOpenProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value));},2705031697:function _(id,v){return new IFC2X3.IfcArbitraryProfileDefWithVoids(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},616511568:function _(id,v){return new IFC2X3.IfcBlobTexture(id,v[0].value,v[1].value,v[2],!v[3]?null:new Handle(v[3].value),new IFC2X3.IfcIdentifier(v[4].value),v[5].value);},3150382593:function _(id,v){return new IFC2X3.IfcCenterLineProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value));},647927063:function _(id,v){return new IFC2X3.IfcClassificationReference(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new Handle(v[3].value));},776857604:function _(id,v){return new IFC2X3.IfcColourRgb(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new IFC2X3.IfcNormalisedRatioMeasure(v[1].value),new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),new IFC2X3.IfcNormalisedRatioMeasure(v[3].value));},2542286263:function _(id,v){return new IFC2X3.IfcComplexProperty(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new IFC2X3.IfcIdentifier(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1485152156:function _(id,v){return new IFC2X3.IfcCompositeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC2X3.IfcLabel(v[3].value));},370225590:function _(id,v){return new IFC2X3.IfcConnectedFaceSet(id,v[0].map(function(p){return new Handle(p.value);}));},1981873012:function _(id,v){return new IFC2X3.IfcConnectionCurveGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},45288368:function _(id,v){return new IFC2X3.IfcConnectionPointEccentricity(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcLengthMeasure(v[4].value));},3050246964:function _(id,v){return new IFC2X3.IfcContextDependentUnit(id,new Handle(v[0].value),v[1],new IFC2X3.IfcLabel(v[2].value));},2889183280:function _(id,v){return new IFC2X3.IfcConversionBasedUnit(id,new Handle(v[0].value),v[1],new IFC2X3.IfcLabel(v[2].value),new Handle(v[3].value));},3800577675:function _(id,v){return new IFC2X3.IfcCurveStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:TypeInitialiser(1,v[2]),!v[3]?null:new Handle(v[3].value));},3632507154:function _(id,v){return new IFC2X3.IfcDerivedProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},2273265877:function _(id,v){return new IFC2X3.IfcDimensionCalloutRelationship(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},1694125774:function _(id,v){return new IFC2X3.IfcDimensionPair(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},3732053477:function _(id,v){return new IFC2X3.IfcDocumentReference(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},4170525392:function _(id,v){return new IFC2X3.IfcDraughtingPreDefinedTextFont(id,new IFC2X3.IfcLabel(v[0].value));},3900360178:function _(id,v){return new IFC2X3.IfcEdge(id,new Handle(v[0].value),new Handle(v[1].value));},476780140:function _(id,v){return new IFC2X3.IfcEdgeCurve(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),v[3].value);},1860660968:function _(id,v){return new IFC2X3.IfcExtendedMaterialProperties(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcText(v[2].value),new IFC2X3.IfcLabel(v[3].value));},2556980723:function _(id,v){return new IFC2X3.IfcFace(id,v[0].map(function(p){return new Handle(p.value);}));},1809719519:function _(id,v){return new IFC2X3.IfcFaceBound(id,new Handle(v[0].value),v[1].value);},803316827:function _(id,v){return new IFC2X3.IfcFaceOuterBound(id,new Handle(v[0].value),v[1].value);},3008276851:function _(id,v){return new IFC2X3.IfcFaceSurface(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),v[2].value);},4219587988:function _(id,v){return new IFC2X3.IfcFailureConnectionCondition(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcForceMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcForceMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcForceMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcForceMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcForceMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcForceMeasure(v[6].value));},738692330:function _(id,v){return new IFC2X3.IfcFillAreaStyle(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},3857492461:function _(id,v){return new IFC2X3.IfcFuelProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcPositiveRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcHeatingValueMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcHeatingValueMeasure(v[4].value));},803998398:function _(id,v){return new IFC2X3.IfcGeneralMaterialProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcMolecularWeightMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcMassDensityMeasure(v[3].value));},1446786286:function _(id,v){return new IFC2X3.IfcGeneralProfileProperties(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcMassPerLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPositiveLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcAreaMeasure(v[6].value));},3448662350:function _(id,v){return new IFC2X3.IfcGeometricRepresentationContext(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new IFC2X3.IfcDimensionCount(v[2].value),!v[3]?null:v[3].value,new Handle(v[4].value),!v[5]?null:new Handle(v[5].value));},2453401579:function _(id,_8){return new IFC2X3.IfcGeometricRepresentationItem(id);},4142052618:function _(id,v){return new IFC2X3.IfcGeometricRepresentationSubContext(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC2X3.IfcPositiveRatioMeasure(v[3].value),v[4],!v[5]?null:new IFC2X3.IfcLabel(v[5].value));},3590301190:function _(id,v){return new IFC2X3.IfcGeometricSet(id,v[0].map(function(p){return new Handle(p.value);}));},178086475:function _(id,v){return new IFC2X3.IfcGridPlacement(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},812098782:function _(id,v){return new IFC2X3.IfcHalfSpaceSolid(id,new Handle(v[0].value),v[1].value);},2445078500:function _(id,v){return new IFC2X3.IfcHygroscopicMaterialProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcPositiveRatioMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcPositiveRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcIsothermalMoistureCapacityMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcVaporPermeabilityMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcMoistureDiffusivityMeasure(v[5].value));},3905492369:function _(id,v){return new IFC2X3.IfcImageTexture(id,v[0].value,v[1].value,v[2],!v[3]?null:new Handle(v[3].value),new IFC2X3.IfcIdentifier(v[4].value));},3741457305:function _(id,v){return new IFC2X3.IfcIrregularTimeSeries(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value),v[4],v[5],!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),v[8].map(function(p){return new Handle(p.value);}));},1402838566:function _(id,v){return new IFC2X3.IfcLightSource(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[3].value));},125510826:function _(id,v){return new IFC2X3.IfcLightSourceAmbient(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[3].value));},2604431987:function _(id,v){return new IFC2X3.IfcLightSourceDirectional(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value));},4266656042:function _(id,v){return new IFC2X3.IfcLightSourceGoniometric(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),new IFC2X3.IfcThermodynamicTemperatureMeasure(v[6].value),new IFC2X3.IfcLuminousFluxMeasure(v[7].value),v[8],new Handle(v[9].value));},1520743889:function _(id,v){return new IFC2X3.IfcLightSourcePositional(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcReal(v[6].value),new IFC2X3.IfcReal(v[7].value),new IFC2X3.IfcReal(v[8].value));},3422422726:function _(id,v){return new IFC2X3.IfcLightSourceSpot(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcReal(v[6].value),new IFC2X3.IfcReal(v[7].value),new IFC2X3.IfcReal(v[8].value),new Handle(v[9].value),!v[10]?null:new IFC2X3.IfcReal(v[10].value),new IFC2X3.IfcPositivePlaneAngleMeasure(v[11].value),new IFC2X3.IfcPositivePlaneAngleMeasure(v[12].value));},2624227202:function _(id,v){return new IFC2X3.IfcLocalPlacement(id,!v[0]?null:new Handle(v[0].value),new Handle(v[1].value));},1008929658:function _(id,_9){return new IFC2X3.IfcLoop(id);},2347385850:function _(id,v){return new IFC2X3.IfcMappedItem(id,new Handle(v[0].value),new Handle(v[1].value));},2022407955:function _(id,v){return new IFC2X3.IfcMaterialDefinitionRepresentation(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},1430189142:function _(id,v){return new IFC2X3.IfcMechanicalConcreteMaterialProperties(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcDynamicViscosityMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcModulusOfElasticityMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcModulusOfElasticityMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcThermalExpansionCoefficientMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPressureMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcText(v[8].value),!v[9]?null:new IFC2X3.IfcText(v[9].value),!v[10]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcText(v[11].value));},219451334:function _(id,v){return new IFC2X3.IfcObjectDefinition(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},2833995503:function _(id,v){return new IFC2X3.IfcOneDirectionRepeatFactor(id,new Handle(v[0].value));},2665983363:function _(id,v){return new IFC2X3.IfcOpenShell(id,v[0].map(function(p){return new Handle(p.value);}));},1029017970:function _(id,v){return new IFC2X3.IfcOrientedEdge(id,new Handle(v[0].value),v[1].value);},2529465313:function _(id,v){return new IFC2X3.IfcParameterizedProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value));},2519244187:function _(id,v){return new IFC2X3.IfcPath(id,v[0].map(function(p){return new Handle(p.value);}));},3021840470:function _(id,v){return new IFC2X3.IfcPhysicalComplexQuantity(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new IFC2X3.IfcLabel(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcLabel(v[5].value));},597895409:function _(id,v){return new IFC2X3.IfcPixelTexture(id,v[0].value,v[1].value,v[2],!v[3]?null:new Handle(v[3].value),new IFC2X3.IfcInteger(v[4].value),new IFC2X3.IfcInteger(v[5].value),new IFC2X3.IfcInteger(v[6].value),v[7].map(function(p){return p.value;}));},2004835150:function _(id,v){return new IFC2X3.IfcPlacement(id,new Handle(v[0].value));},1663979128:function _(id,v){return new IFC2X3.IfcPlanarExtent(id,new IFC2X3.IfcLengthMeasure(v[0].value),new IFC2X3.IfcLengthMeasure(v[1].value));},2067069095:function _(id,_10){return new IFC2X3.IfcPoint(id);},4022376103:function _(id,v){return new IFC2X3.IfcPointOnCurve(id,new Handle(v[0].value),new IFC2X3.IfcParameterValue(v[1].value));},1423911732:function _(id,v){return new IFC2X3.IfcPointOnSurface(id,new Handle(v[0].value),new IFC2X3.IfcParameterValue(v[1].value),new IFC2X3.IfcParameterValue(v[2].value));},2924175390:function _(id,v){return new IFC2X3.IfcPolyLoop(id,v[0].map(function(p){return new Handle(p.value);}));},2775532180:function _(id,v){return new IFC2X3.IfcPolygonalBoundedHalfSpace(id,new Handle(v[0].value),v[1].value,new Handle(v[2].value),new Handle(v[3].value));},759155922:function _(id,v){return new IFC2X3.IfcPreDefinedColour(id,new IFC2X3.IfcLabel(v[0].value));},2559016684:function _(id,v){return new IFC2X3.IfcPreDefinedCurveFont(id,new IFC2X3.IfcLabel(v[0].value));},433424934:function _(id,v){return new IFC2X3.IfcPreDefinedDimensionSymbol(id,new IFC2X3.IfcLabel(v[0].value));},179317114:function _(id,v){return new IFC2X3.IfcPreDefinedPointMarkerSymbol(id,new IFC2X3.IfcLabel(v[0].value));},673634403:function _(id,v){return new IFC2X3.IfcProductDefinitionShape(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},871118103:function _(id,v){return new IFC2X3.IfcPropertyBoundedValue(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:TypeInitialiser(1,v[2]),!v[3]?null:TypeInitialiser(1,v[3]),!v[4]?null:new Handle(v[4].value));},1680319473:function _(id,v){return new IFC2X3.IfcPropertyDefinition(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},4166981789:function _(id,v){return new IFC2X3.IfcPropertyEnumeratedValue(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return TypeInitialiser(1,p);}),!v[3]?null:new Handle(v[3].value));},2752243245:function _(id,v){return new IFC2X3.IfcPropertyListValue(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return TypeInitialiser(1,p);}),!v[3]?null:new Handle(v[3].value));},941946838:function _(id,v){return new IFC2X3.IfcPropertyReferenceValue(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),new Handle(v[3].value));},3357820518:function _(id,v){return new IFC2X3.IfcPropertySetDefinition(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},3650150729:function _(id,v){return new IFC2X3.IfcPropertySingleValue(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),!v[2]?null:TypeInitialiser(1,v[2]),!v[3]?null:new Handle(v[3].value));},110355661:function _(id,v){return new IFC2X3.IfcPropertyTableValue(id,new IFC2X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),v[2].map(function(p){return TypeInitialiser(1,p);}),v[3].map(function(p){return TypeInitialiser(1,p);}),!v[4]?null:new IFC2X3.IfcText(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},3615266464:function _(id,v){return new IFC2X3.IfcRectangleProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value));},3413951693:function _(id,v){return new IFC2X3.IfcRegularTimeSeries(id,new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value),v[4],v[5],!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),new IFC2X3.IfcTimeMeasure(v[8].value),v[9].map(function(p){return new Handle(p.value);}));},3765753017:function _(id,v){return new IFC2X3.IfcReinforcementDefinitionProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},478536968:function _(id,v){return new IFC2X3.IfcRelationship(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},2778083089:function _(id,v){return new IFC2X3.IfcRoundedRectangleProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value));},1509187699:function _(id,v){return new IFC2X3.IfcSectionedSpine(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}));},2411513650:function _(id,v){return new IFC2X3.IfcServiceLifeFactor(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4],!v[5]?null:TypeInitialiser(1,v[5]),TypeInitialiser(1,v[6]),!v[7]?null:TypeInitialiser(1,v[7]));},4124623270:function _(id,v){return new IFC2X3.IfcShellBasedSurfaceModel(id,v[0].map(function(p){return new Handle(p.value);}));},2609359061:function _(id,v){return new IFC2X3.IfcSlippageConnectionCondition(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcLengthMeasure(v[3].value));},723233188:function _(id,_11){return new IFC2X3.IfcSolidModel(id);},2485662743:function _(id,v){return new IFC2X3.IfcSoundProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new IFC2X3.IfcBoolean(v[4].value),v[5],v[6].map(function(p){return new Handle(p.value);}));},1202362311:function _(id,v){return new IFC2X3.IfcSoundValue(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new IFC2X3.IfcFrequencyMeasure(v[5].value),!v[6]?null:TypeInitialiser(1,v[6]));},390701378:function _(id,v){return new IFC2X3.IfcSpaceThermalLoadProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveRatioMeasure(v[4].value),v[5],v[6],!v[7]?null:new IFC2X3.IfcText(v[7].value),new IFC2X3.IfcPowerMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPowerMeasure(v[9].value),!v[10]?null:new Handle(v[10].value),!v[11]?null:new IFC2X3.IfcLabel(v[11].value),!v[12]?null:new IFC2X3.IfcLabel(v[12].value),v[13]);},1595516126:function _(id,v){return new IFC2X3.IfcStructuralLoadLinearForce(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLinearForceMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLinearForceMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcLinearForceMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcLinearMomentMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcLinearMomentMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcLinearMomentMeasure(v[6].value));},2668620305:function _(id,v){return new IFC2X3.IfcStructuralLoadPlanarForce(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcPlanarForceMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcPlanarForceMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPlanarForceMeasure(v[3].value));},2473145415:function _(id,v){return new IFC2X3.IfcStructuralLoadSingleDisplacement(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPlaneAngleMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPlaneAngleMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPlaneAngleMeasure(v[6].value));},1973038258:function _(id,v){return new IFC2X3.IfcStructuralLoadSingleDisplacementDistortion(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPlaneAngleMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPlaneAngleMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPlaneAngleMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcCurvatureMeasure(v[7].value));},1597423693:function _(id,v){return new IFC2X3.IfcStructuralLoadSingleForce(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcForceMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcForceMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcForceMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcTorqueMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcTorqueMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcTorqueMeasure(v[6].value));},1190533807:function _(id,v){return new IFC2X3.IfcStructuralLoadSingleForceWarping(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new IFC2X3.IfcForceMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcForceMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcForceMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcTorqueMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcTorqueMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcTorqueMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcWarpingMomentMeasure(v[7].value));},3843319758:function _(id,v){return new IFC2X3.IfcStructuralProfileProperties(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcMassPerLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPositiveLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcAreaMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcWarpingConstantMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcLengthMeasure(v[12].value),!v[13]?null:new IFC2X3.IfcLengthMeasure(v[13].value),!v[14]?null:new IFC2X3.IfcAreaMeasure(v[14].value),!v[15]?null:new IFC2X3.IfcAreaMeasure(v[15].value),!v[16]?null:new IFC2X3.IfcSectionModulusMeasure(v[16].value),!v[17]?null:new IFC2X3.IfcSectionModulusMeasure(v[17].value),!v[18]?null:new IFC2X3.IfcSectionModulusMeasure(v[18].value),!v[19]?null:new IFC2X3.IfcSectionModulusMeasure(v[19].value),!v[20]?null:new IFC2X3.IfcSectionModulusMeasure(v[20].value),!v[21]?null:new IFC2X3.IfcLengthMeasure(v[21].value),!v[22]?null:new IFC2X3.IfcLengthMeasure(v[22].value));},3653947884:function _(id,v){return new IFC2X3.IfcStructuralSteelProfileProperties(id,!v[0]?null:new IFC2X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcMassPerLengthMeasure(v[2].value),!v[3]?null:new IFC2X3.IfcPositiveLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcAreaMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcMomentOfInertiaMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcWarpingConstantMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcLengthMeasure(v[12].value),!v[13]?null:new IFC2X3.IfcLengthMeasure(v[13].value),!v[14]?null:new IFC2X3.IfcAreaMeasure(v[14].value),!v[15]?null:new IFC2X3.IfcAreaMeasure(v[15].value),!v[16]?null:new IFC2X3.IfcSectionModulusMeasure(v[16].value),!v[17]?null:new IFC2X3.IfcSectionModulusMeasure(v[17].value),!v[18]?null:new IFC2X3.IfcSectionModulusMeasure(v[18].value),!v[19]?null:new IFC2X3.IfcSectionModulusMeasure(v[19].value),!v[20]?null:new IFC2X3.IfcSectionModulusMeasure(v[20].value),!v[21]?null:new IFC2X3.IfcLengthMeasure(v[21].value),!v[22]?null:new IFC2X3.IfcLengthMeasure(v[22].value),!v[23]?null:new IFC2X3.IfcAreaMeasure(v[23].value),!v[24]?null:new IFC2X3.IfcAreaMeasure(v[24].value),!v[25]?null:new IFC2X3.IfcPositiveRatioMeasure(v[25].value),!v[26]?null:new IFC2X3.IfcPositiveRatioMeasure(v[26].value));},2233826070:function _(id,v){return new IFC2X3.IfcSubedge(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value));},2513912981:function _(id,_12){return new IFC2X3.IfcSurface(id);},1878645084:function _(id,v){return new IFC2X3.IfcSurfaceStyleRendering(id,new Handle(v[0].value),!v[1]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:TypeInitialiser(1,v[7]),v[8]);},2247615214:function _(id,v){return new IFC2X3.IfcSweptAreaSolid(id,new Handle(v[0].value),new Handle(v[1].value));},1260650574:function _(id,v){return new IFC2X3.IfcSweptDiskSolid(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),!v[2]?null:new IFC2X3.IfcPositiveLengthMeasure(v[2].value),new IFC2X3.IfcParameterValue(v[3].value),new IFC2X3.IfcParameterValue(v[4].value));},230924584:function _(id,v){return new IFC2X3.IfcSweptSurface(id,new Handle(v[0].value),new Handle(v[1].value));},3071757647:function _(id,v){return new IFC2X3.IfcTShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcPlaneAngleMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcPlaneAngleMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcPositiveLengthMeasure(v[12].value));},3028897424:function _(id,v){return new IFC2X3.IfcTerminatorSymbol(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),new Handle(v[3].value));},4282788508:function _(id,v){return new IFC2X3.IfcTextLiteral(id,new IFC2X3.IfcPresentableText(v[0].value),new Handle(v[1].value),v[2]);},3124975700:function _(id,v){return new IFC2X3.IfcTextLiteralWithExtent(id,new IFC2X3.IfcPresentableText(v[0].value),new Handle(v[1].value),v[2],new Handle(v[3].value),new IFC2X3.IfcBoxAlignment(v[4].value));},2715220739:function _(id,v){return new IFC2X3.IfcTrapeziumProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcLengthMeasure(v[6].value));},1345879162:function _(id,v){return new IFC2X3.IfcTwoDirectionRepeatFactor(id,new Handle(v[0].value),new Handle(v[1].value));},1628702193:function _(id,v){return new IFC2X3.IfcTypeObject(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}));},2347495698:function _(id,v){return new IFC2X3.IfcTypeProduct(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value));},427810014:function _(id,v){return new IFC2X3.IfcUShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPlaneAngleMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcPositiveLengthMeasure(v[10].value));},1417489154:function _(id,v){return new IFC2X3.IfcVector(id,new Handle(v[0].value),new IFC2X3.IfcLengthMeasure(v[1].value));},2759199220:function _(id,v){return new IFC2X3.IfcVertexLoop(id,new Handle(v[0].value));},336235671:function _(id,v){return new IFC2X3.IfcWindowLiningProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[11].value),!v[12]?null:new Handle(v[12].value));},512836454:function _(id,v){return new IFC2X3.IfcWindowPanelProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4],v[5],!v[6]?null:new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new Handle(v[8].value));},1299126871:function _(id,v){return new IFC2X3.IfcWindowStyle(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8],v[9],v[10].value,v[11].value);},2543172580:function _(id,v){return new IFC2X3.IfcZShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value));},3288037868:function _(id,v){return new IFC2X3.IfcAnnotationCurveOccurrence(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},669184980:function _(id,v){return new IFC2X3.IfcAnnotationFillArea(id,new Handle(v[0].value),!v[1]?null:v[1].map(function(p){return new Handle(p.value);}));},2265737646:function _(id,v){return new IFC2X3.IfcAnnotationFillAreaOccurrence(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new Handle(v[3].value),v[4]);},1302238472:function _(id,v){return new IFC2X3.IfcAnnotationSurface(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},4261334040:function _(id,v){return new IFC2X3.IfcAxis1Placement(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},3125803723:function _(id,v){return new IFC2X3.IfcAxis2Placement2D(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},2740243338:function _(id,v){return new IFC2X3.IfcAxis2Placement3D(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},2736907675:function _(id,v){return new IFC2X3.IfcBooleanResult(id,v[0],new Handle(v[1].value),new Handle(v[2].value));},4182860854:function _(id,_13){return new IFC2X3.IfcBoundedSurface(id);},2581212453:function _(id,v){return new IFC2X3.IfcBoundingBox(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),new IFC2X3.IfcPositiveLengthMeasure(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value));},2713105998:function _(id,v){return new IFC2X3.IfcBoxedHalfSpace(id,new Handle(v[0].value),v[1].value,new Handle(v[2].value));},2898889636:function _(id,v){return new IFC2X3.IfcCShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value));},1123145078:function _(id,v){return new IFC2X3.IfcCartesianPoint(id,v[0].map(function(p){return new IFC2X3.IfcLengthMeasure(p.value);}));},59481748:function _(id,v){return new IFC2X3.IfcCartesianTransformationOperator(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:v[3].value);},3749851601:function _(id,v){return new IFC2X3.IfcCartesianTransformationOperator2D(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:v[3].value);},3486308946:function _(id,v){return new IFC2X3.IfcCartesianTransformationOperator2DnonUniform(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:v[3].value,!v[4]?null:v[4].value);},3331915920:function _(id,v){return new IFC2X3.IfcCartesianTransformationOperator3D(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:v[3].value,!v[4]?null:new Handle(v[4].value));},1416205885:function _(id,v){return new IFC2X3.IfcCartesianTransformationOperator3DnonUniform(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:v[3].value,!v[4]?null:new Handle(v[4].value),!v[5]?null:v[5].value,!v[6]?null:v[6].value);},1383045692:function _(id,v){return new IFC2X3.IfcCircleProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value));},2205249479:function _(id,v){return new IFC2X3.IfcClosedShell(id,v[0].map(function(p){return new Handle(p.value);}));},2485617015:function _(id,v){return new IFC2X3.IfcCompositeCurveSegment(id,v[0],v[1].value,new Handle(v[2].value));},4133800736:function _(id,v){return new IFC2X3.IfcCraneRailAShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),new IFC2X3.IfcPositiveLengthMeasure(v[7].value),new IFC2X3.IfcPositiveLengthMeasure(v[8].value),new IFC2X3.IfcPositiveLengthMeasure(v[9].value),new IFC2X3.IfcPositiveLengthMeasure(v[10].value),new IFC2X3.IfcPositiveLengthMeasure(v[11].value),new IFC2X3.IfcPositiveLengthMeasure(v[12].value),new IFC2X3.IfcPositiveLengthMeasure(v[13].value),!v[14]?null:new IFC2X3.IfcPositiveLengthMeasure(v[14].value));},194851669:function _(id,v){return new IFC2X3.IfcCraneRailFShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),new IFC2X3.IfcPositiveLengthMeasure(v[7].value),new IFC2X3.IfcPositiveLengthMeasure(v[8].value),new IFC2X3.IfcPositiveLengthMeasure(v[9].value),new IFC2X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcPositiveLengthMeasure(v[11].value));},2506170314:function _(id,v){return new IFC2X3.IfcCsgPrimitive3D(id,new Handle(v[0].value));},2147822146:function _(id,v){return new IFC2X3.IfcCsgSolid(id,new Handle(v[0].value));},2601014836:function _(id,_14){return new IFC2X3.IfcCurve(id);},2827736869:function _(id,v){return new IFC2X3.IfcCurveBoundedPlane(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},693772133:function _(id,v){return new IFC2X3.IfcDefinedSymbol(id,new Handle(v[0].value),new Handle(v[1].value));},606661476:function _(id,v){return new IFC2X3.IfcDimensionCurve(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},4054601972:function _(id,v){return new IFC2X3.IfcDimensionCurveTerminator(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),new Handle(v[3].value),v[4]);},32440307:function _(id,v){return new IFC2X3.IfcDirection(id,v[0].map(function(p){return p.value;}));},2963535650:function _(id,v){return new IFC2X3.IfcDoorLiningProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcLengthMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcLengthMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcLengthMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcPositiveLengthMeasure(v[12].value),!v[13]?null:new IFC2X3.IfcPositiveLengthMeasure(v[13].value),!v[14]?null:new Handle(v[14].value));},1714330368:function _(id,v){return new IFC2X3.IfcDoorPanelProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),v[5],!v[6]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[6].value),v[7],!v[8]?null:new Handle(v[8].value));},526551008:function _(id,v){return new IFC2X3.IfcDoorStyle(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8],v[9],v[10].value,v[11].value);},3073041342:function _(id,v){return new IFC2X3.IfcDraughtingCallout(id,v[0].map(function(p){return new Handle(p.value);}));},445594917:function _(id,v){return new IFC2X3.IfcDraughtingPreDefinedColour(id,new IFC2X3.IfcLabel(v[0].value));},4006246654:function _(id,v){return new IFC2X3.IfcDraughtingPreDefinedCurveFont(id,new IFC2X3.IfcLabel(v[0].value));},1472233963:function _(id,v){return new IFC2X3.IfcEdgeLoop(id,v[0].map(function(p){return new Handle(p.value);}));},1883228015:function _(id,v){return new IFC2X3.IfcElementQuantity(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},339256511:function _(id,v){return new IFC2X3.IfcElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},2777663545:function _(id,v){return new IFC2X3.IfcElementarySurface(id,new Handle(v[0].value));},2835456948:function _(id,v){return new IFC2X3.IfcEllipseProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value));},80994333:function _(id,v){return new IFC2X3.IfcEnergyProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4],!v[5]?null:new IFC2X3.IfcLabel(v[5].value));},477187591:function _(id,v){return new IFC2X3.IfcExtrudedAreaSolid(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value));},2047409740:function _(id,v){return new IFC2X3.IfcFaceBasedSurfaceModel(id,v[0].map(function(p){return new Handle(p.value);}));},374418227:function _(id,v){return new IFC2X3.IfcFillAreaStyleHatching(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),new IFC2X3.IfcPlaneAngleMeasure(v[4].value));},4203026998:function _(id,v){return new IFC2X3.IfcFillAreaStyleTileSymbolWithStyle(id,new Handle(v[0].value));},315944413:function _(id,v){return new IFC2X3.IfcFillAreaStyleTiles(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),new IFC2X3.IfcPositiveRatioMeasure(v[2].value));},3455213021:function _(id,v){return new IFC2X3.IfcFluidFlowProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4],!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new IFC2X3.IfcLabel(v[10].value),!v[11]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcThermodynamicTemperatureMeasure(v[12].value),!v[13]?null:new Handle(v[13].value),!v[14]?null:new Handle(v[14].value),!v[15]?null:TypeInitialiser(1,v[15]),!v[16]?null:new IFC2X3.IfcPositiveRatioMeasure(v[16].value),!v[17]?null:new IFC2X3.IfcLinearVelocityMeasure(v[17].value),!v[18]?null:new IFC2X3.IfcPressureMeasure(v[18].value));},4238390223:function _(id,v){return new IFC2X3.IfcFurnishingElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},1268542332:function _(id,v){return new IFC2X3.IfcFurnitureType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},987898635:function _(id,v){return new IFC2X3.IfcGeometricCurveSet(id,v[0].map(function(p){return new Handle(p.value);}));},1484403080:function _(id,v){return new IFC2X3.IfcIShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value));},572779678:function _(id,v){return new IFC2X3.IfcLShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),!v[4]?null:new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new IFC2X3.IfcPlaneAngleMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcPositiveLengthMeasure(v[10].value));},1281925730:function _(id,v){return new IFC2X3.IfcLine(id,new Handle(v[0].value),new Handle(v[1].value));},1425443689:function _(id,v){return new IFC2X3.IfcManifoldSolidBrep(id,new Handle(v[0].value));},3888040117:function _(id,v){return new IFC2X3.IfcObject(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},3388369263:function _(id,v){return new IFC2X3.IfcOffsetCurve2D(id,new Handle(v[0].value),new IFC2X3.IfcLengthMeasure(v[1].value),v[2].value);},3505215534:function _(id,v){return new IFC2X3.IfcOffsetCurve3D(id,new Handle(v[0].value),new IFC2X3.IfcLengthMeasure(v[1].value),v[2].value,new Handle(v[3].value));},3566463478:function _(id,v){return new IFC2X3.IfcPermeableCoveringProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4],v[5],!v[6]?null:new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new Handle(v[8].value));},603570806:function _(id,v){return new IFC2X3.IfcPlanarBox(id,new IFC2X3.IfcLengthMeasure(v[0].value),new IFC2X3.IfcLengthMeasure(v[1].value),new Handle(v[2].value));},220341763:function _(id,v){return new IFC2X3.IfcPlane(id,new Handle(v[0].value));},2945172077:function _(id,v){return new IFC2X3.IfcProcess(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},4208778838:function _(id,v){return new IFC2X3.IfcProduct(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},103090709:function _(id,v){return new IFC2X3.IfcProject(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcLabel(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7].map(function(p){return new Handle(p.value);}),new Handle(v[8].value));},4194566429:function _(id,v){return new IFC2X3.IfcProjectionCurve(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC2X3.IfcLabel(v[2].value));},1451395588:function _(id,v){return new IFC2X3.IfcPropertySet(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}));},3219374653:function _(id,v){return new IFC2X3.IfcProxy(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},2770003689:function _(id,v){return new IFC2X3.IfcRectangleHollowProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value));},2798486643:function _(id,v){return new IFC2X3.IfcRectangularPyramid(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),new IFC2X3.IfcPositiveLengthMeasure(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value));},3454111270:function _(id,v){return new IFC2X3.IfcRectangularTrimmedSurface(id,new Handle(v[0].value),new IFC2X3.IfcParameterValue(v[1].value),new IFC2X3.IfcParameterValue(v[2].value),new IFC2X3.IfcParameterValue(v[3].value),new IFC2X3.IfcParameterValue(v[4].value),v[5].value,v[6].value);},3939117080:function _(id,v){return new IFC2X3.IfcRelAssigns(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5]);},1683148259:function _(id,v){return new IFC2X3.IfcRelAssignsToActor(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},2495723537:function _(id,v){return new IFC2X3.IfcRelAssignsToControl(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1307041759:function _(id,v){return new IFC2X3.IfcRelAssignsToGroup(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},4278684876:function _(id,v){return new IFC2X3.IfcRelAssignsToProcess(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},2857406711:function _(id,v){return new IFC2X3.IfcRelAssignsToProduct(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},3372526763:function _(id,v){return new IFC2X3.IfcRelAssignsToProjectOrder(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},205026976:function _(id,v){return new IFC2X3.IfcRelAssignsToResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1865459582:function _(id,v){return new IFC2X3.IfcRelAssociates(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}));},1327628568:function _(id,v){return new IFC2X3.IfcRelAssociatesAppliedValue(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},4095574036:function _(id,v){return new IFC2X3.IfcRelAssociatesApproval(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},919958153:function _(id,v){return new IFC2X3.IfcRelAssociatesClassification(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},2728634034:function _(id,v){return new IFC2X3.IfcRelAssociatesConstraint(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new IFC2X3.IfcLabel(v[5].value),new Handle(v[6].value));},982818633:function _(id,v){return new IFC2X3.IfcRelAssociatesDocument(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},3840914261:function _(id,v){return new IFC2X3.IfcRelAssociatesLibrary(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},2655215786:function _(id,v){return new IFC2X3.IfcRelAssociatesMaterial(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},2851387026:function _(id,v){return new IFC2X3.IfcRelAssociatesProfileProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},826625072:function _(id,v){return new IFC2X3.IfcRelConnects(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value));},1204542856:function _(id,v){return new IFC2X3.IfcRelConnectsElements(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value));},3945020480:function _(id,v){return new IFC2X3.IfcRelConnectsPathElements(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value),v[7].map(function(p){return p.value;}),v[8].map(function(p){return p.value;}),v[9],v[10]);},4201705270:function _(id,v){return new IFC2X3.IfcRelConnectsPortToElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},3190031847:function _(id,v){return new IFC2X3.IfcRelConnectsPorts(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},2127690289:function _(id,v){return new IFC2X3.IfcRelConnectsStructuralActivity(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},3912681535:function _(id,v){return new IFC2X3.IfcRelConnectsStructuralElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},1638771189:function _(id,v){return new IFC2X3.IfcRelConnectsStructuralMember(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC2X3.IfcLengthMeasure(v[8].value),!v[9]?null:new Handle(v[9].value));},504942748:function _(id,v){return new IFC2X3.IfcRelConnectsWithEccentricity(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC2X3.IfcLengthMeasure(v[8].value),!v[9]?null:new Handle(v[9].value),new Handle(v[10].value));},3678494232:function _(id,v){return new IFC2X3.IfcRelConnectsWithRealizingElements(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value),v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3242617779:function _(id,v){return new IFC2X3.IfcRelContainedInSpatialStructure(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},886880790:function _(id,v){return new IFC2X3.IfcRelCoversBldgElements(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2802773753:function _(id,v){return new IFC2X3.IfcRelCoversSpaces(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2551354335:function _(id,v){return new IFC2X3.IfcRelDecomposes(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},693640335:function _(id,v){return new IFC2X3.IfcRelDefines(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}));},4186316022:function _(id,v){return new IFC2X3.IfcRelDefinesByProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},781010003:function _(id,v){return new IFC2X3.IfcRelDefinesByType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},3940055652:function _(id,v){return new IFC2X3.IfcRelFillsElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},279856033:function _(id,v){return new IFC2X3.IfcRelFlowControlElements(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},4189434867:function _(id,v){return new IFC2X3.IfcRelInteractionRequirements(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcCountMeasure(v[4].value),!v[5]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),new Handle(v[8].value));},3268803585:function _(id,v){return new IFC2X3.IfcRelNests(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2051452291:function _(id,v){return new IFC2X3.IfcRelOccupiesSpaces(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},202636808:function _(id,v){return new IFC2X3.IfcRelOverridesProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value),v[6].map(function(p){return new Handle(p.value);}));},750771296:function _(id,v){return new IFC2X3.IfcRelProjectsElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},1245217292:function _(id,v){return new IFC2X3.IfcRelReferencedInSpatialStructure(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},1058617721:function _(id,v){return new IFC2X3.IfcRelSchedulesCostItems(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},4122056220:function _(id,v){return new IFC2X3.IfcRelSequence(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),new IFC2X3.IfcTimeMeasure(v[6].value),v[7]);},366585022:function _(id,v){return new IFC2X3.IfcRelServicesBuildings(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},3451746338:function _(id,v){return new IFC2X3.IfcRelSpaceBoundary(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8]);},1401173127:function _(id,v){return new IFC2X3.IfcRelVoidsElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},2914609552:function _(id,v){return new IFC2X3.IfcResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},1856042241:function _(id,v){return new IFC2X3.IfcRevolvedAreaSolid(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPlaneAngleMeasure(v[3].value));},4158566097:function _(id,v){return new IFC2X3.IfcRightCircularCone(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),new IFC2X3.IfcPositiveLengthMeasure(v[2].value));},3626867408:function _(id,v){return new IFC2X3.IfcRightCircularCylinder(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),new IFC2X3.IfcPositiveLengthMeasure(v[2].value));},2706606064:function _(id,v){return new IFC2X3.IfcSpatialStructureElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8]);},3893378262:function _(id,v){return new IFC2X3.IfcSpatialStructureElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},451544542:function _(id,v){return new IFC2X3.IfcSphere(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value));},3544373492:function _(id,v){return new IFC2X3.IfcStructuralActivity(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},3136571912:function _(id,v){return new IFC2X3.IfcStructuralItem(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},530289379:function _(id,v){return new IFC2X3.IfcStructuralMember(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},3689010777:function _(id,v){return new IFC2X3.IfcStructuralReaction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},3979015343:function _(id,v){return new IFC2X3.IfcStructuralSurfaceMember(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value));},2218152070:function _(id,v){return new IFC2X3.IfcStructuralSurfaceMemberVarying(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),v[9].map(function(p){return new IFC2X3.IfcPositiveLengthMeasure(p.value);}),new Handle(v[10].value));},4070609034:function _(id,v){return new IFC2X3.IfcStructuredDimensionCallout(id,v[0].map(function(p){return new Handle(p.value);}));},2028607225:function _(id,v){return new IFC2X3.IfcSurfaceCurveSweptAreaSolid(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new IFC2X3.IfcParameterValue(v[3].value),new IFC2X3.IfcParameterValue(v[4].value),new Handle(v[5].value));},2809605785:function _(id,v){return new IFC2X3.IfcSurfaceOfLinearExtrusion(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new IFC2X3.IfcLengthMeasure(v[3].value));},4124788165:function _(id,v){return new IFC2X3.IfcSurfaceOfRevolution(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value));},1580310250:function _(id,v){return new IFC2X3.IfcSystemFurnitureElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3473067441:function _(id,v){return new IFC2X3.IfcTask(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8].value,!v[9]?null:v[9].value);},2097647324:function _(id,v){return new IFC2X3.IfcTransportElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2296667514:function _(id,v){return new IFC2X3.IfcActor(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new Handle(v[5].value));},1674181508:function _(id,v){return new IFC2X3.IfcAnnotation(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},3207858831:function _(id,v){return new IFC2X3.IfcAsymmetricIShapeProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value),new IFC2X3.IfcPositiveLengthMeasure(v[5].value),new IFC2X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcPositiveLengthMeasure(v[7].value),new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcPositiveLengthMeasure(v[11].value));},1334484129:function _(id,v){return new IFC2X3.IfcBlock(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),new IFC2X3.IfcPositiveLengthMeasure(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value));},3649129432:function _(id,v){return new IFC2X3.IfcBooleanClippingResult(id,v[0],new Handle(v[1].value),new Handle(v[2].value));},1260505505:function _(id,_15){return new IFC2X3.IfcBoundedCurve(id);},4031249490:function _(id,v){return new IFC2X3.IfcBuilding(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC2X3.IfcLengthMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcLengthMeasure(v[10].value),!v[11]?null:new Handle(v[11].value));},1950629157:function _(id,v){return new IFC2X3.IfcBuildingElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3124254112:function _(id,v){return new IFC2X3.IfcBuildingStorey(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC2X3.IfcLengthMeasure(v[9].value));},2937912522:function _(id,v){return new IFC2X3.IfcCircleHollowProfileDef(id,v[0],!v[1]?null:new IFC2X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC2X3.IfcPositiveLengthMeasure(v[3].value),new IFC2X3.IfcPositiveLengthMeasure(v[4].value));},300633059:function _(id,v){return new IFC2X3.IfcColumnType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3732776249:function _(id,v){return new IFC2X3.IfcCompositeCurve(id,v[0].map(function(p){return new Handle(p.value);}),v[1].value);},2510884976:function _(id,v){return new IFC2X3.IfcConic(id,new Handle(v[0].value));},2559216714:function _(id,v){return new IFC2X3.IfcConstructionResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new Handle(v[8].value));},3293443760:function _(id,v){return new IFC2X3.IfcControl(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},3895139033:function _(id,v){return new IFC2X3.IfcCostItem(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},1419761937:function _(id,v){return new IFC2X3.IfcCostSchedule(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),new IFC2X3.IfcIdentifier(v[11].value),v[12]);},1916426348:function _(id,v){return new IFC2X3.IfcCoveringType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3295246426:function _(id,v){return new IFC2X3.IfcCrewResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new Handle(v[8].value));},1457835157:function _(id,v){return new IFC2X3.IfcCurtainWallType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},681481545:function _(id,v){return new IFC2X3.IfcDimensionCurveDirectedCallout(id,v[0].map(function(p){return new Handle(p.value);}));},3256556792:function _(id,v){return new IFC2X3.IfcDistributionElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3849074793:function _(id,v){return new IFC2X3.IfcDistributionFlowElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},360485395:function _(id,v){return new IFC2X3.IfcElectricalBaseProperties(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4],!v[5]?null:new IFC2X3.IfcLabel(v[5].value),v[6],new IFC2X3.IfcElectricVoltageMeasure(v[7].value),new IFC2X3.IfcFrequencyMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcElectricCurrentMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcElectricCurrentMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcPowerMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcPowerMeasure(v[12].value),v[13].value);},1758889154:function _(id,v){return new IFC2X3.IfcElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},4123344466:function _(id,v){return new IFC2X3.IfcElementAssembly(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8],v[9]);},1623761950:function _(id,v){return new IFC2X3.IfcElementComponent(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2590856083:function _(id,v){return new IFC2X3.IfcElementComponentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},1704287377:function _(id,v){return new IFC2X3.IfcEllipse(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value),new IFC2X3.IfcPositiveLengthMeasure(v[2].value));},2107101300:function _(id,v){return new IFC2X3.IfcEnergyConversionDeviceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},1962604670:function _(id,v){return new IFC2X3.IfcEquipmentElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3272907226:function _(id,v){return new IFC2X3.IfcEquipmentStandard(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},3174744832:function _(id,v){return new IFC2X3.IfcEvaporativeCoolerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3390157468:function _(id,v){return new IFC2X3.IfcEvaporatorType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},807026263:function _(id,v){return new IFC2X3.IfcFacetedBrep(id,new Handle(v[0].value));},3737207727:function _(id,v){return new IFC2X3.IfcFacetedBrepWithVoids(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},647756555:function _(id,v){return new IFC2X3.IfcFastener(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2489546625:function _(id,v){return new IFC2X3.IfcFastenerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},2827207264:function _(id,v){return new IFC2X3.IfcFeatureElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2143335405:function _(id,v){return new IFC2X3.IfcFeatureElementAddition(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},1287392070:function _(id,v){return new IFC2X3.IfcFeatureElementSubtraction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3907093117:function _(id,v){return new IFC2X3.IfcFlowControllerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3198132628:function _(id,v){return new IFC2X3.IfcFlowFittingType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3815607619:function _(id,v){return new IFC2X3.IfcFlowMeterType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1482959167:function _(id,v){return new IFC2X3.IfcFlowMovingDeviceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},1834744321:function _(id,v){return new IFC2X3.IfcFlowSegmentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},1339347760:function _(id,v){return new IFC2X3.IfcFlowStorageDeviceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},2297155007:function _(id,v){return new IFC2X3.IfcFlowTerminalType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3009222698:function _(id,v){return new IFC2X3.IfcFlowTreatmentDeviceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},263784265:function _(id,v){return new IFC2X3.IfcFurnishingElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},814719939:function _(id,v){return new IFC2X3.IfcFurnitureStandard(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},200128114:function _(id,v){return new IFC2X3.IfcGasTerminalType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3009204131:function _(id,v){return new IFC2X3.IfcGrid(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7].map(function(p){return new Handle(p.value);}),v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}));},2706460486:function _(id,v){return new IFC2X3.IfcGroup(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},1251058090:function _(id,v){return new IFC2X3.IfcHeatExchangerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1806887404:function _(id,v){return new IFC2X3.IfcHumidifierType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2391368822:function _(id,v){return new IFC2X3.IfcInventory(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5],new Handle(v[6].value),v[7].map(function(p){return new Handle(p.value);}),new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value));},4288270099:function _(id,v){return new IFC2X3.IfcJunctionBoxType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3827777499:function _(id,v){return new IFC2X3.IfcLaborResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new Handle(v[8].value),!v[9]?null:new IFC2X3.IfcText(v[9].value));},1051575348:function _(id,v){return new IFC2X3.IfcLampType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1161773419:function _(id,v){return new IFC2X3.IfcLightFixtureType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2506943328:function _(id,v){return new IFC2X3.IfcLinearDimension(id,v[0].map(function(p){return new Handle(p.value);}));},377706215:function _(id,v){return new IFC2X3.IfcMechanicalFastener(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value));},2108223431:function _(id,v){return new IFC2X3.IfcMechanicalFastenerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3181161470:function _(id,v){return new IFC2X3.IfcMemberType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},977012517:function _(id,v){return new IFC2X3.IfcMotorConnectionType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1916936684:function _(id,v){return new IFC2X3.IfcMove(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8].value,!v[9]?null:v[9].value,new Handle(v[10].value),new Handle(v[11].value),!v[12]?null:v[12].map(function(p){return new IFC2X3.IfcText(p.value);}));},4143007308:function _(id,v){return new IFC2X3.IfcOccupant(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new Handle(v[5].value),v[6]);},3588315303:function _(id,v){return new IFC2X3.IfcOpeningElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3425660407:function _(id,v){return new IFC2X3.IfcOrderAction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8].value,!v[9]?null:v[9].value,new IFC2X3.IfcIdentifier(v[10].value));},2837617999:function _(id,v){return new IFC2X3.IfcOutletType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2382730787:function _(id,v){return new IFC2X3.IfcPerformanceHistory(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcLabel(v[5].value));},3327091369:function _(id,v){return new IFC2X3.IfcPermit(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value));},804291784:function _(id,v){return new IFC2X3.IfcPipeFittingType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},4231323485:function _(id,v){return new IFC2X3.IfcPipeSegmentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},4017108033:function _(id,v){return new IFC2X3.IfcPlateType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3724593414:function _(id,v){return new IFC2X3.IfcPolyline(id,v[0].map(function(p){return new Handle(p.value);}));},3740093272:function _(id,v){return new IFC2X3.IfcPort(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},2744685151:function _(id,v){return new IFC2X3.IfcProcedure(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC2X3.IfcLabel(v[7].value));},2904328755:function _(id,v){return new IFC2X3.IfcProjectOrder(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC2X3.IfcLabel(v[7].value));},3642467123:function _(id,v){return new IFC2X3.IfcProjectOrderRecord(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5].map(function(p){return new Handle(p.value);}),v[6]);},3651124850:function _(id,v){return new IFC2X3.IfcProjectionElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},1842657554:function _(id,v){return new IFC2X3.IfcProtectiveDeviceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2250791053:function _(id,v){return new IFC2X3.IfcPumpType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3248260540:function _(id,v){return new IFC2X3.IfcRadiusDimension(id,v[0].map(function(p){return new Handle(p.value);}));},2893384427:function _(id,v){return new IFC2X3.IfcRailingType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2324767716:function _(id,v){return new IFC2X3.IfcRampFlightType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},160246688:function _(id,v){return new IFC2X3.IfcRelAggregates(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2863920197:function _(id,v){return new IFC2X3.IfcRelAssignsTasks(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},1768891740:function _(id,v){return new IFC2X3.IfcSanitaryTerminalType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3517283431:function _(id,v){return new IFC2X3.IfcScheduleTimeControl(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value),!v[11]?null:new Handle(v[11].value),!v[12]?null:new Handle(v[12].value),!v[13]?null:new IFC2X3.IfcTimeMeasure(v[13].value),!v[14]?null:new IFC2X3.IfcTimeMeasure(v[14].value),!v[15]?null:new IFC2X3.IfcTimeMeasure(v[15].value),!v[16]?null:new IFC2X3.IfcTimeMeasure(v[16].value),!v[17]?null:new IFC2X3.IfcTimeMeasure(v[17].value),!v[18]?null:v[18].value,!v[19]?null:new Handle(v[19].value),!v[20]?null:new IFC2X3.IfcTimeMeasure(v[20].value),!v[21]?null:new IFC2X3.IfcTimeMeasure(v[21].value),!v[22]?null:new IFC2X3.IfcPositiveRatioMeasure(v[22].value));},4105383287:function _(id,v){return new IFC2X3.IfcServiceLife(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5],new IFC2X3.IfcTimeMeasure(v[6].value));},4097777520:function _(id,v){return new IFC2X3.IfcSite(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC2X3.IfcCompoundPlaneAngleMeasure(v[9]),!v[10]?null:new IFC2X3.IfcCompoundPlaneAngleMeasure(v[10]),!v[11]?null:new IFC2X3.IfcLengthMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcLabel(v[12].value),!v[13]?null:new Handle(v[13].value));},2533589738:function _(id,v){return new IFC2X3.IfcSlabType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3856911033:function _(id,v){return new IFC2X3.IfcSpace(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),v[8],v[9],!v[10]?null:new IFC2X3.IfcLengthMeasure(v[10].value));},1305183839:function _(id,v){return new IFC2X3.IfcSpaceHeaterType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},652456506:function _(id,v){return new IFC2X3.IfcSpaceProgram(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcAreaMeasure(v[6].value),!v[7]?null:new IFC2X3.IfcAreaMeasure(v[7].value),!v[8]?null:new Handle(v[8].value),new IFC2X3.IfcAreaMeasure(v[9].value));},3812236995:function _(id,v){return new IFC2X3.IfcSpaceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3112655638:function _(id,v){return new IFC2X3.IfcStackTerminalType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1039846685:function _(id,v){return new IFC2X3.IfcStairFlightType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},682877961:function _(id,v){return new IFC2X3.IfcStructuralAction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9].value,!v[10]?null:new Handle(v[10].value));},1179482911:function _(id,v){return new IFC2X3.IfcStructuralConnection(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},4243806635:function _(id,v){return new IFC2X3.IfcStructuralCurveConnection(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},214636428:function _(id,v){return new IFC2X3.IfcStructuralCurveMember(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},2445595289:function _(id,v){return new IFC2X3.IfcStructuralCurveMemberVarying(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},1807405624:function _(id,v){return new IFC2X3.IfcStructuralLinearAction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9].value,!v[10]?null:new Handle(v[10].value),v[11]);},1721250024:function _(id,v){return new IFC2X3.IfcStructuralLinearActionVarying(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9].value,!v[10]?null:new Handle(v[10].value),v[11],new Handle(v[12].value),v[13].map(function(p){return new Handle(p.value);}));},1252848954:function _(id,v){return new IFC2X3.IfcStructuralLoadGroup(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5],v[6],v[7],!v[8]?null:new IFC2X3.IfcRatioMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcLabel(v[9].value));},1621171031:function _(id,v){return new IFC2X3.IfcStructuralPlanarAction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9].value,!v[10]?null:new Handle(v[10].value),v[11]);},3987759626:function _(id,v){return new IFC2X3.IfcStructuralPlanarActionVarying(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9].value,!v[10]?null:new Handle(v[10].value),v[11],new Handle(v[12].value),v[13].map(function(p){return new Handle(p.value);}));},2082059205:function _(id,v){return new IFC2X3.IfcStructuralPointAction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9].value,!v[10]?null:new Handle(v[10].value));},734778138:function _(id,v){return new IFC2X3.IfcStructuralPointConnection(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},1235345126:function _(id,v){return new IFC2X3.IfcStructuralPointReaction(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},2986769608:function _(id,v){return new IFC2X3.IfcStructuralResultGroup(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),v[7].value);},1975003073:function _(id,v){return new IFC2X3.IfcStructuralSurfaceConnection(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},148013059:function _(id,v){return new IFC2X3.IfcSubContractResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new IFC2X3.IfcText(v[10].value));},2315554128:function _(id,v){return new IFC2X3.IfcSwitchingDeviceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2254336722:function _(id,v){return new IFC2X3.IfcSystem(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},5716631:function _(id,v){return new IFC2X3.IfcTankType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1637806684:function _(id,v){return new IFC2X3.IfcTimeSeriesSchedule(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),v[6],new Handle(v[7].value));},1692211062:function _(id,v){return new IFC2X3.IfcTransformerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1620046519:function _(id,v){return new IFC2X3.IfcTransportElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8],!v[9]?null:new IFC2X3.IfcMassMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcCountMeasure(v[10].value));},3593883385:function _(id,v){return new IFC2X3.IfcTrimmedCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}),v[3].value,v[4]);},1600972822:function _(id,v){return new IFC2X3.IfcTubeBundleType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1911125066:function _(id,v){return new IFC2X3.IfcUnitaryEquipmentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},728799441:function _(id,v){return new IFC2X3.IfcValveType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2769231204:function _(id,v){return new IFC2X3.IfcVirtualElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},1898987631:function _(id,v){return new IFC2X3.IfcWallType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1133259667:function _(id,v){return new IFC2X3.IfcWasteTerminalType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1028945134:function _(id,v){return new IFC2X3.IfcWorkControl(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),!v[9]?null:new IFC2X3.IfcTimeMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcTimeMeasure(v[10].value),new Handle(v[11].value),!v[12]?null:new Handle(v[12].value),v[13],!v[14]?null:new IFC2X3.IfcLabel(v[14].value));},4218914973:function _(id,v){return new IFC2X3.IfcWorkPlan(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),!v[9]?null:new IFC2X3.IfcTimeMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcTimeMeasure(v[10].value),new Handle(v[11].value),!v[12]?null:new Handle(v[12].value),v[13],!v[14]?null:new IFC2X3.IfcLabel(v[14].value));},3342526732:function _(id,v){return new IFC2X3.IfcWorkSchedule(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),!v[9]?null:new IFC2X3.IfcTimeMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcTimeMeasure(v[10].value),new Handle(v[11].value),!v[12]?null:new Handle(v[12].value),v[13],!v[14]?null:new IFC2X3.IfcLabel(v[14].value));},1033361043:function _(id,v){return new IFC2X3.IfcZone(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},1213861670:function _(id,v){return new IFC2X3.Ifc2DCompositeCurve(id,v[0].map(function(p){return new Handle(p.value);}),v[1].value);},3821786052:function _(id,v){return new IFC2X3.IfcActionRequest(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value));},1411407467:function _(id,v){return new IFC2X3.IfcAirTerminalBoxType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3352864051:function _(id,v){return new IFC2X3.IfcAirTerminalType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1871374353:function _(id,v){return new IFC2X3.IfcAirToAirHeatRecoveryType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2470393545:function _(id,v){return new IFC2X3.IfcAngularDimension(id,v[0].map(function(p){return new Handle(p.value);}));},3460190687:function _(id,v){return new IFC2X3.IfcAsset(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new IFC2X3.IfcIdentifier(v[5].value),new Handle(v[6].value),new Handle(v[7].value),new Handle(v[8].value),new Handle(v[9].value),new Handle(v[10].value),new Handle(v[11].value),new Handle(v[12].value),new Handle(v[13].value));},1967976161:function _(id,v){return new IFC2X3.IfcBSplineCurve(id,v[0].value,v[1].map(function(p){return new Handle(p.value);}),v[2],v[3].value,v[4].value);},819618141:function _(id,v){return new IFC2X3.IfcBeamType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1916977116:function _(id,v){return new IFC2X3.IfcBezierCurve(id,v[0].value,v[1].map(function(p){return new Handle(p.value);}),v[2],v[3].value,v[4].value);},231477066:function _(id,v){return new IFC2X3.IfcBoilerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3299480353:function _(id,v){return new IFC2X3.IfcBuildingElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},52481810:function _(id,v){return new IFC2X3.IfcBuildingElementComponent(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2979338954:function _(id,v){return new IFC2X3.IfcBuildingElementPart(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},1095909175:function _(id,v){return new IFC2X3.IfcBuildingElementProxy(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},1909888760:function _(id,v){return new IFC2X3.IfcBuildingElementProxyType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},395041908:function _(id,v){return new IFC2X3.IfcCableCarrierFittingType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3293546465:function _(id,v){return new IFC2X3.IfcCableCarrierSegmentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1285652485:function _(id,v){return new IFC2X3.IfcCableSegmentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2951183804:function _(id,v){return new IFC2X3.IfcChillerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2611217952:function _(id,v){return new IFC2X3.IfcCircle(id,new Handle(v[0].value),new IFC2X3.IfcPositiveLengthMeasure(v[1].value));},2301859152:function _(id,v){return new IFC2X3.IfcCoilType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},843113511:function _(id,v){return new IFC2X3.IfcColumn(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3850581409:function _(id,v){return new IFC2X3.IfcCompressorType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2816379211:function _(id,v){return new IFC2X3.IfcCondenserType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2188551683:function _(id,v){return new IFC2X3.IfcCondition(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},1163958913:function _(id,v){return new IFC2X3.IfcConditionCriterion(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),new Handle(v[5].value),new Handle(v[6].value));},3898045240:function _(id,v){return new IFC2X3.IfcConstructionEquipmentResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new Handle(v[8].value));},1060000209:function _(id,v){return new IFC2X3.IfcConstructionMaterialResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new Handle(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new IFC2X3.IfcRatioMeasure(v[10].value));},488727124:function _(id,v){return new IFC2X3.IfcConstructionProductResource(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new IFC2X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC2X3.IfcLabel(v[6].value),v[7],!v[8]?null:new Handle(v[8].value));},335055490:function _(id,v){return new IFC2X3.IfcCooledBeamType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2954562838:function _(id,v){return new IFC2X3.IfcCoolingTowerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1973544240:function _(id,v){return new IFC2X3.IfcCovering(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},3495092785:function _(id,v){return new IFC2X3.IfcCurtainWall(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3961806047:function _(id,v){return new IFC2X3.IfcDamperType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},4147604152:function _(id,v){return new IFC2X3.IfcDiameterDimension(id,v[0].map(function(p){return new Handle(p.value);}));},1335981549:function _(id,v){return new IFC2X3.IfcDiscreteAccessory(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2635815018:function _(id,v){return new IFC2X3.IfcDiscreteAccessoryType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},1599208980:function _(id,v){return new IFC2X3.IfcDistributionChamberElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2063403501:function _(id,v){return new IFC2X3.IfcDistributionControlElementType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},1945004755:function _(id,v){return new IFC2X3.IfcDistributionElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3040386961:function _(id,v){return new IFC2X3.IfcDistributionFlowElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3041715199:function _(id,v){return new IFC2X3.IfcDistributionPort(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},395920057:function _(id,v){return new IFC2X3.IfcDoor(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value));},869906466:function _(id,v){return new IFC2X3.IfcDuctFittingType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3760055223:function _(id,v){return new IFC2X3.IfcDuctSegmentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2030761528:function _(id,v){return new IFC2X3.IfcDuctSilencerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},855621170:function _(id,v){return new IFC2X3.IfcEdgeFeature(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value));},663422040:function _(id,v){return new IFC2X3.IfcElectricApplianceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3277789161:function _(id,v){return new IFC2X3.IfcElectricFlowStorageDeviceType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1534661035:function _(id,v){return new IFC2X3.IfcElectricGeneratorType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1365060375:function _(id,v){return new IFC2X3.IfcElectricHeaterType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1217240411:function _(id,v){return new IFC2X3.IfcElectricMotorType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},712377611:function _(id,v){return new IFC2X3.IfcElectricTimeControlType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1634875225:function _(id,v){return new IFC2X3.IfcElectricalCircuit(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value));},857184966:function _(id,v){return new IFC2X3.IfcElectricalElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},1658829314:function _(id,v){return new IFC2X3.IfcEnergyConversionDevice(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},346874300:function _(id,v){return new IFC2X3.IfcFanType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1810631287:function _(id,v){return new IFC2X3.IfcFilterType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},4222183408:function _(id,v){return new IFC2X3.IfcFireSuppressionTerminalType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2058353004:function _(id,v){return new IFC2X3.IfcFlowController(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},4278956645:function _(id,v){return new IFC2X3.IfcFlowFitting(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},4037862832:function _(id,v){return new IFC2X3.IfcFlowInstrumentType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3132237377:function _(id,v){return new IFC2X3.IfcFlowMovingDevice(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},987401354:function _(id,v){return new IFC2X3.IfcFlowSegment(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},707683696:function _(id,v){return new IFC2X3.IfcFlowStorageDevice(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2223149337:function _(id,v){return new IFC2X3.IfcFlowTerminal(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3508470533:function _(id,v){return new IFC2X3.IfcFlowTreatmentDevice(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},900683007:function _(id,v){return new IFC2X3.IfcFooting(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},1073191201:function _(id,v){return new IFC2X3.IfcMember(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},1687234759:function _(id,v){return new IFC2X3.IfcPile(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8],v[9]);},3171933400:function _(id,v){return new IFC2X3.IfcPlate(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2262370178:function _(id,v){return new IFC2X3.IfcRailing(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},3024970846:function _(id,v){return new IFC2X3.IfcRamp(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},3283111854:function _(id,v){return new IFC2X3.IfcRampFlight(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3055160366:function _(id,v){return new IFC2X3.IfcRationalBezierCurve(id,v[0].value,v[1].map(function(p){return new Handle(p.value);}),v[2],v[3].value,v[4].value,v[5].map(function(p){return p.value;}));},3027567501:function _(id,v){return new IFC2X3.IfcReinforcingElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},2320036040:function _(id,v){return new IFC2X3.IfcReinforcingMesh(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcPositiveLengthMeasure(v[10].value),new IFC2X3.IfcPositiveLengthMeasure(v[11].value),new IFC2X3.IfcPositiveLengthMeasure(v[12].value),new IFC2X3.IfcAreaMeasure(v[13].value),new IFC2X3.IfcAreaMeasure(v[14].value),new IFC2X3.IfcPositiveLengthMeasure(v[15].value),new IFC2X3.IfcPositiveLengthMeasure(v[16].value));},2016517767:function _(id,v){return new IFC2X3.IfcRoof(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},1376911519:function _(id,v){return new IFC2X3.IfcRoundedEdgeFeature(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value));},1783015770:function _(id,v){return new IFC2X3.IfcSensorType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1529196076:function _(id,v){return new IFC2X3.IfcSlab(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},331165859:function _(id,v){return new IFC2X3.IfcStair(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8]);},4252922144:function _(id,v){return new IFC2X3.IfcStairFlight(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:v[8].value,!v[9]?null:v[9].value,!v[10]?null:new IFC2X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcPositiveLengthMeasure(v[11].value));},2515109513:function _(id,v){return new IFC2X3.IfcStructuralAnalysisModel(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}));},3824725483:function _(id,v){return new IFC2X3.IfcTendon(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9],new IFC2X3.IfcPositiveLengthMeasure(v[10].value),new IFC2X3.IfcAreaMeasure(v[11].value),!v[12]?null:new IFC2X3.IfcForceMeasure(v[12].value),!v[13]?null:new IFC2X3.IfcPressureMeasure(v[13].value),!v[14]?null:new IFC2X3.IfcNormalisedRatioMeasure(v[14].value),!v[15]?null:new IFC2X3.IfcPositiveLengthMeasure(v[15].value),!v[16]?null:new IFC2X3.IfcPositiveLengthMeasure(v[16].value));},2347447852:function _(id,v){return new IFC2X3.IfcTendonAnchor(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value));},3313531582:function _(id,v){return new IFC2X3.IfcVibrationIsolatorType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},2391406946:function _(id,v){return new IFC2X3.IfcWall(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3512223829:function _(id,v){return new IFC2X3.IfcWallStandardCase(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},3304561284:function _(id,v){return new IFC2X3.IfcWindow(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value));},2874132201:function _(id,v){return new IFC2X3.IfcActuatorType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},3001207471:function _(id,v){return new IFC2X3.IfcAlarmType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},753842376:function _(id,v){return new IFC2X3.IfcBeam(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},2454782716:function _(id,v){return new IFC2X3.IfcChamferEdgeFeature(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC2X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC2X3.IfcPositiveLengthMeasure(v[10].value));},578613899:function _(id,v){return new IFC2X3.IfcControllerType(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC2X3.IfcLabel(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),v[9]);},1052013943:function _(id,v){return new IFC2X3.IfcDistributionChamberElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value));},1062813311:function _(id,v){return new IFC2X3.IfcDistributionControlElement(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcIdentifier(v[8].value));},3700593921:function _(id,v){return new IFC2X3.IfcElectricDistributionPoint(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),v[8],!v[9]?null:new IFC2X3.IfcLabel(v[9].value));},979691226:function _(id,v){return new IFC2X3.IfcReinforcingBar(id,new IFC2X3.IfcGloballyUniqueId(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC2X3.IfcLabel(v[2].value),!v[3]?null:new IFC2X3.IfcText(v[3].value),!v[4]?null:new IFC2X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC2X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC2X3.IfcLabel(v[8].value),new IFC2X3.IfcPositiveLengthMeasure(v[9].value),new IFC2X3.IfcAreaMeasure(v[10].value),!v[11]?null:new IFC2X3.IfcPositiveLengthMeasure(v[11].value),v[12],v[13]);}};InheritanceDef[1]={618182010:[IFCTELECOMADDRESS,IFCPOSTALADDRESS],411424972:[IFCENVIRONMENTALIMPACTVALUE,IFCCOSTVALUE],4037036970:[IFCBOUNDARYNODECONDITIONWARPING,IFCBOUNDARYNODECONDITION,IFCBOUNDARYFACECONDITION,IFCBOUNDARYEDGECONDITION],1387855156:[IFCBOUNDARYNODECONDITIONWARPING],3264961684:[IFCCOLOURRGB],2859738748:[IFCCONNECTIONCURVEGEOMETRY,IFCCONNECTIONSURFACEGEOMETRY,IFCCONNECTIONPORTGEOMETRY,IFCCONNECTIONPOINTECCENTRICITY,IFCCONNECTIONPOINTGEOMETRY],2614616156:[IFCCONNECTIONPOINTECCENTRICITY],1959218052:[IFCOBJECTIVE,IFCMETRIC],3796139169:[IFCDIMENSIONPAIR,IFCDIMENSIONCALLOUTRELATIONSHIP],3200245327:[IFCDOCUMENTREFERENCE,IFCCLASSIFICATIONREFERENCE,IFCLIBRARYREFERENCE,IFCEXTERNALLYDEFINEDTEXTFONT,IFCEXTERNALLYDEFINEDSYMBOL,IFCEXTERNALLYDEFINEDSURFACESTYLE,IFCEXTERNALLYDEFINEDHATCHSTYLE],3265635763:[IFCHYGROSCOPICMATERIALPROPERTIES,IFCGENERALMATERIALPROPERTIES,IFCFUELPROPERTIES,IFCEXTENDEDMATERIALPROPERTIES,IFCWATERPROPERTIES,IFCTHERMALMATERIALPROPERTIES,IFCPRODUCTSOFCOMBUSTIONPROPERTIES,IFCOPTICALMATERIALPROPERTIES,IFCMECHANICALCONCRETEMATERIALPROPERTIES,IFCMECHANICALSTEELMATERIALPROPERTIES,IFCMECHANICALMATERIALPROPERTIES],4256014907:[IFCMECHANICALCONCRETEMATERIALPROPERTIES,IFCMECHANICALSTEELMATERIALPROPERTIES],1918398963:[IFCCONVERSIONBASEDUNIT,IFCCONTEXTDEPENDENTUNIT,IFCSIUNIT],3701648758:[IFCLOCALPLACEMENT,IFCGRIDPLACEMENT],2483315170:[IFCPHYSICALCOMPLEXQUANTITY,IFCQUANTITYWEIGHT,IFCQUANTITYVOLUME,IFCQUANTITYTIME,IFCQUANTITYLENGTH,IFCQUANTITYCOUNT,IFCQUANTITYAREA,IFCPHYSICALSIMPLEQUANTITY],2226359599:[IFCQUANTITYWEIGHT,IFCQUANTITYVOLUME,IFCQUANTITYTIME,IFCQUANTITYLENGTH,IFCQUANTITYCOUNT,IFCQUANTITYAREA],3727388367:[IFCDRAUGHTINGPREDEFINEDCURVEFONT,IFCPREDEFINEDCURVEFONT,IFCDRAUGHTINGPREDEFINEDCOLOUR,IFCPREDEFINEDCOLOUR,IFCDRAUGHTINGPREDEFINEDTEXTFONT,IFCTEXTSTYLEFONTMODEL,IFCPREDEFINEDTEXTFONT,IFCPREDEFINEDPOINTMARKERSYMBOL,IFCPREDEFINEDDIMENSIONSYMBOL,IFCPREDEFINEDTERMINATORSYMBOL,IFCPREDEFINEDSYMBOL],990879717:[IFCPREDEFINEDPOINTMARKERSYMBOL,IFCPREDEFINEDDIMENSIONSYMBOL,IFCPREDEFINEDTERMINATORSYMBOL],1775413392:[IFCDRAUGHTINGPREDEFINEDTEXTFONT,IFCTEXTSTYLEFONTMODEL],2022622350:[IFCPRESENTATIONLAYERWITHSTYLE],3119450353:[IFCFILLAREASTYLE,IFCCURVESTYLE,IFCTEXTSTYLE,IFCSYMBOLSTYLE,IFCSURFACESTYLE],2095639259:[IFCPRODUCTDEFINITIONSHAPE,IFCMATERIALDEFINITIONREPRESENTATION],3958567839:[IFCLSHAPEPROFILEDEF,IFCASYMMETRICISHAPEPROFILEDEF,IFCISHAPEPROFILEDEF,IFCELLIPSEPROFILEDEF,IFCCRANERAILFSHAPEPROFILEDEF,IFCCRANERAILASHAPEPROFILEDEF,IFCCIRCLEHOLLOWPROFILEDEF,IFCCIRCLEPROFILEDEF,IFCCSHAPEPROFILEDEF,IFCZSHAPEPROFILEDEF,IFCUSHAPEPROFILEDEF,IFCTRAPEZIUMPROFILEDEF,IFCTSHAPEPROFILEDEF,IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF,IFCRECTANGLEPROFILEDEF,IFCPARAMETERIZEDPROFILEDEF,IFCDERIVEDPROFILEDEF,IFCCOMPOSITEPROFILEDEF,IFCCENTERLINEPROFILEDEF,IFCARBITRARYOPENPROFILEDEF,IFCARBITRARYPROFILEDEFWITHVOIDS,IFCARBITRARYCLOSEDPROFILEDEF],2802850158:[IFCSTRUCTURALSTEELPROFILEPROPERTIES,IFCSTRUCTURALPROFILEPROPERTIES,IFCGENERALPROFILEPROPERTIES,IFCRIBPLATEPROFILEPROPERTIES],2598011224:[IFCCOMPLEXPROPERTY,IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE,IFCSIMPLEPROPERTY],1076942058:[IFCSTYLEDREPRESENTATION,IFCSTYLEMODEL,IFCTOPOLOGYREPRESENTATION,IFCSHAPEREPRESENTATION,IFCSHAPEMODEL],3377609919:[IFCGEOMETRICREPRESENTATIONSUBCONTEXT,IFCGEOMETRICREPRESENTATIONCONTEXT],3008791417:[IFCMAPPEDITEM,IFCFILLAREASTYLETILES,IFCFILLAREASTYLETILESYMBOLWITHSTYLE,IFCFILLAREASTYLEHATCHING,IFCFACEBASEDSURFACEMODEL,IFCDIAMETERDIMENSION,IFCANGULARDIMENSION,IFCRADIUSDIMENSION,IFCLINEARDIMENSION,IFCDIMENSIONCURVEDIRECTEDCALLOUT,IFCSTRUCTUREDDIMENSIONCALLOUT,IFCDRAUGHTINGCALLOUT,IFCDIRECTION,IFCDEFINEDSYMBOL,IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBEZIERCURVE,IFCBEZIERCURVE,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFC2DCOMPOSITECURVE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCLINE,IFCCURVE,IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID,IFCCSGPRIMITIVE3D,IFCCOMPOSITECURVESEGMENT,IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D,IFCCARTESIANTRANSFORMATIONOPERATOR,IFCBOUNDINGBOX,IFCBOOLEANCLIPPINGRESULT,IFCBOOLEANRESULT,IFCANNOTATIONSURFACE,IFCANNOTATIONFILLAREA,IFCVECTOR,IFCTEXTLITERALWITHEXTENT,IFCTEXTLITERAL,IFCPLANE,IFCELEMENTARYSURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE,IFCSURFACE,IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLID,IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLID,IFCSWEPTAREASOLID,IFCSOLIDMODEL,IFCSHELLBASEDSURFACEMODEL,IFCSECTIONEDSPINE,IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE,IFCPOINT,IFCPLANARBOX,IFCPLANAREXTENT,IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT,IFCPLACEMENT,IFCTWODIRECTIONREPEATFACTOR,IFCONEDIRECTIONREPEATFACTOR,IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT,IFCLIGHTSOURCE,IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE,IFCHALFSPACESOLID,IFCGEOMETRICCURVESET,IFCGEOMETRICSET,IFCGEOMETRICREPRESENTATIONITEM,IFCPATH,IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP,IFCLOOP,IFCFACEOUTERBOUND,IFCFACEBOUND,IFCFACESURFACE,IFCFACE,IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE,IFCEDGE,IFCCLOSEDSHELL,IFCOPENSHELL,IFCCONNECTEDFACESET,IFCVERTEXPOINT,IFCVERTEX,IFCTOPOLOGICALREPRESENTATIONITEM,IFCANNOTATIONFILLAREAOCCURRENCE,IFCPROJECTIONCURVE,IFCDIMENSIONCURVE,IFCANNOTATIONCURVEOCCURRENCE,IFCANNOTATIONTEXTOCCURRENCE,IFCDIMENSIONCURVETERMINATOR,IFCTERMINATORSYMBOL,IFCANNOTATIONSYMBOLOCCURRENCE,IFCANNOTATIONSURFACEOCCURRENCE,IFCANNOTATIONOCCURRENCE,IFCSTYLEDITEM],2341007311:[IFCRELDEFINESBYTYPE,IFCRELOVERRIDESPROPERTIES,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINES,IFCRELAGGREGATES,IFCRELNESTS,IFCRELDECOMPOSES,IFCRELVOIDSELEMENT,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELPROJECTSELEMENT,IFCRELINTERACTIONREQUIREMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALELEMENT,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS,IFCRELCONNECTS,IFCRELASSOCIATESPROFILEPROPERTIES,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL,IFCRELASSOCIATESAPPLIEDVALUE,IFCRELASSOCIATES,IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTASKS,IFCRELSCHEDULESCOSTITEMS,IFCRELASSIGNSTOPROJECTORDER,IFCRELASSIGNSTOCONTROL,IFCRELOCCUPIESSPACES,IFCRELASSIGNSTOACTOR,IFCRELASSIGNS,IFCRELATIONSHIP,IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCFLUIDFLOWPROPERTIES,IFCELECTRICALBASEPROPERTIES,IFCENERGYPROPERTIES,IFCELEMENTQUANTITY,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCSPACETHERMALLOADPROPERTIES,IFCSOUNDVALUE,IFCSOUNDPROPERTIES,IFCSERVICELIFEFACTOR,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPROPERTYSETDEFINITION,IFCPROPERTYDEFINITION,IFCCONDITION,IFCASSET,IFCZONE,IFCSTRUCTURALANALYSISMODEL,IFCELECTRICALCIRCUIT,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCCONDITIONCRITERION,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCTIMESERIESSCHEDULE,IFCSPACEPROGRAM,IFCSERVICELIFE,IFCSCHEDULETIMECONTROL,IFCPROJECTORDERRECORD,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCFURNITURESTANDARD,IFCEQUIPMENTSTANDARD,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCPROJECT,IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCELECTRICALELEMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFLOWTREATMENTDEVICE,IFCFLOWTERMINAL,IFCFLOWSTORAGEDEVICE,IFCFLOWSEGMENT,IFCFLOWMOVINGDEVICE,IFCFLOWFITTING,IFCELECTRICDISTRIBUTIONPOINT,IFCFLOWCONTROLLER,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATE,IFCPILE,IFCMEMBER,IFCFOOTING,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMN,IFCBUILDINGELEMENTPROXY,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCBUILDINGELEMENTPART,IFCBUILDINGELEMENTCOMPONENT,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCFURNISHINGELEMENT,IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE,IFCEDGEFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCEQUIPMENTELEMENT,IFCDISCRETEACCESSORY,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALPLANARACTIONVARYING,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALLINEARACTIONVARYING,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCPROXY,IFCPRODUCT,IFCPROCEDURE,IFCORDERACTION,IFCMOVE,IFCTASK,IFCPROCESS,IFCOBJECT,IFCVIBRATIONISOLATORTYPE,IFCDISCRETEACCESSORYTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCSENSORTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWALLTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCMEMBERTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE,IFCTYPEPRODUCT,IFCTYPEOBJECT,IFCOBJECTDEFINITION],3982875396:[IFCTOPOLOGYREPRESENTATION,IFCSHAPEREPRESENTATION],3692461612:[IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE],2273995522:[IFCSLIPPAGECONNECTIONCONDITION,IFCFAILURECONNECTIONCONDITION],2162789131:[IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE,IFCSTRUCTURALLOADSTATIC],2525727697:[IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE],2830218821:[IFCSTYLEDREPRESENTATION],3958052878:[IFCANNOTATIONFILLAREAOCCURRENCE,IFCPROJECTIONCURVE,IFCDIMENSIONCURVE,IFCANNOTATIONCURVEOCCURRENCE,IFCANNOTATIONTEXTOCCURRENCE,IFCDIMENSIONCURVETERMINATOR,IFCTERMINATORSYMBOL,IFCANNOTATIONSYMBOLOCCURRENCE,IFCANNOTATIONSURFACEOCCURRENCE,IFCANNOTATIONOCCURRENCE],846575682:[IFCSURFACESTYLERENDERING],626085974:[IFCPIXELTEXTURE,IFCIMAGETEXTURE,IFCBLOBTEXTURE],280115917:[IFCTEXTUREMAP,IFCTEXTURECOORDINATEGENERATOR],3101149627:[IFCREGULARTIMESERIES,IFCIRREGULARTIMESERIES],1377556343:[IFCPATH,IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP,IFCLOOP,IFCFACEOUTERBOUND,IFCFACEBOUND,IFCFACESURFACE,IFCFACE,IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE,IFCEDGE,IFCCLOSEDSHELL,IFCOPENSHELL,IFCCONNECTEDFACESET,IFCVERTEXPOINT,IFCVERTEX],2799835756:[IFCVERTEXPOINT],2442683028:[IFCANNOTATIONFILLAREAOCCURRENCE,IFCPROJECTIONCURVE,IFCDIMENSIONCURVE,IFCANNOTATIONCURVEOCCURRENCE,IFCANNOTATIONTEXTOCCURRENCE,IFCDIMENSIONCURVETERMINATOR,IFCTERMINATORSYMBOL,IFCANNOTATIONSYMBOLOCCURRENCE,IFCANNOTATIONSURFACEOCCURRENCE],3612888222:[IFCDIMENSIONCURVETERMINATOR,IFCTERMINATORSYMBOL],3798115385:[IFCARBITRARYPROFILEDEFWITHVOIDS],1310608509:[IFCCENTERLINEPROFILEDEF],370225590:[IFCCLOSEDSHELL,IFCOPENSHELL],3900360178:[IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE],2556980723:[IFCFACESURFACE],1809719519:[IFCFACEOUTERBOUND],1446786286:[IFCSTRUCTURALSTEELPROFILEPROPERTIES,IFCSTRUCTURALPROFILEPROPERTIES],3448662350:[IFCGEOMETRICREPRESENTATIONSUBCONTEXT],2453401579:[IFCFILLAREASTYLETILES,IFCFILLAREASTYLETILESYMBOLWITHSTYLE,IFCFILLAREASTYLEHATCHING,IFCFACEBASEDSURFACEMODEL,IFCDIAMETERDIMENSION,IFCANGULARDIMENSION,IFCRADIUSDIMENSION,IFCLINEARDIMENSION,IFCDIMENSIONCURVEDIRECTEDCALLOUT,IFCSTRUCTUREDDIMENSIONCALLOUT,IFCDRAUGHTINGCALLOUT,IFCDIRECTION,IFCDEFINEDSYMBOL,IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBEZIERCURVE,IFCBEZIERCURVE,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFC2DCOMPOSITECURVE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCLINE,IFCCURVE,IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID,IFCCSGPRIMITIVE3D,IFCCOMPOSITECURVESEGMENT,IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D,IFCCARTESIANTRANSFORMATIONOPERATOR,IFCBOUNDINGBOX,IFCBOOLEANCLIPPINGRESULT,IFCBOOLEANRESULT,IFCANNOTATIONSURFACE,IFCANNOTATIONFILLAREA,IFCVECTOR,IFCTEXTLITERALWITHEXTENT,IFCTEXTLITERAL,IFCPLANE,IFCELEMENTARYSURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE,IFCSURFACE,IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLID,IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLID,IFCSWEPTAREASOLID,IFCSOLIDMODEL,IFCSHELLBASEDSURFACEMODEL,IFCSECTIONEDSPINE,IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE,IFCPOINT,IFCPLANARBOX,IFCPLANAREXTENT,IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT,IFCPLACEMENT,IFCTWODIRECTIONREPEATFACTOR,IFCONEDIRECTIONREPEATFACTOR,IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT,IFCLIGHTSOURCE,IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE,IFCHALFSPACESOLID,IFCGEOMETRICCURVESET,IFCGEOMETRICSET],3590301190:[IFCGEOMETRICCURVESET],812098782:[IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE],1402838566:[IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT],1520743889:[IFCLIGHTSOURCESPOT],1008929658:[IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP],219451334:[IFCCONDITION,IFCASSET,IFCZONE,IFCSTRUCTURALANALYSISMODEL,IFCELECTRICALCIRCUIT,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCCONDITIONCRITERION,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCTIMESERIESSCHEDULE,IFCSPACEPROGRAM,IFCSERVICELIFE,IFCSCHEDULETIMECONTROL,IFCPROJECTORDERRECORD,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCFURNITURESTANDARD,IFCEQUIPMENTSTANDARD,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCPROJECT,IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCELECTRICALELEMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFLOWTREATMENTDEVICE,IFCFLOWTERMINAL,IFCFLOWSTORAGEDEVICE,IFCFLOWSEGMENT,IFCFLOWMOVINGDEVICE,IFCFLOWFITTING,IFCELECTRICDISTRIBUTIONPOINT,IFCFLOWCONTROLLER,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATE,IFCPILE,IFCMEMBER,IFCFOOTING,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMN,IFCBUILDINGELEMENTPROXY,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCBUILDINGELEMENTPART,IFCBUILDINGELEMENTCOMPONENT,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCFURNISHINGELEMENT,IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE,IFCEDGEFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCEQUIPMENTELEMENT,IFCDISCRETEACCESSORY,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALPLANARACTIONVARYING,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALLINEARACTIONVARYING,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCPROXY,IFCPRODUCT,IFCPROCEDURE,IFCORDERACTION,IFCMOVE,IFCTASK,IFCPROCESS,IFCOBJECT,IFCVIBRATIONISOLATORTYPE,IFCDISCRETEACCESSORYTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCSENSORTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWALLTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCMEMBERTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE,IFCTYPEPRODUCT,IFCTYPEOBJECT],2833995503:[IFCTWODIRECTIONREPEATFACTOR],2529465313:[IFCLSHAPEPROFILEDEF,IFCASYMMETRICISHAPEPROFILEDEF,IFCISHAPEPROFILEDEF,IFCELLIPSEPROFILEDEF,IFCCRANERAILFSHAPEPROFILEDEF,IFCCRANERAILASHAPEPROFILEDEF,IFCCIRCLEHOLLOWPROFILEDEF,IFCCIRCLEPROFILEDEF,IFCCSHAPEPROFILEDEF,IFCZSHAPEPROFILEDEF,IFCUSHAPEPROFILEDEF,IFCTRAPEZIUMPROFILEDEF,IFCTSHAPEPROFILEDEF,IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF,IFCRECTANGLEPROFILEDEF],2004835150:[IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT],1663979128:[IFCPLANARBOX],2067069095:[IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE],759155922:[IFCDRAUGHTINGPREDEFINEDCOLOUR],2559016684:[IFCDRAUGHTINGPREDEFINEDCURVEFONT],1680319473:[IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCFLUIDFLOWPROPERTIES,IFCELECTRICALBASEPROPERTIES,IFCENERGYPROPERTIES,IFCELEMENTQUANTITY,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCSPACETHERMALLOADPROPERTIES,IFCSOUNDVALUE,IFCSOUNDPROPERTIES,IFCSERVICELIFEFACTOR,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPROPERTYSETDEFINITION],3357820518:[IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCFLUIDFLOWPROPERTIES,IFCELECTRICALBASEPROPERTIES,IFCENERGYPROPERTIES,IFCELEMENTQUANTITY,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCSPACETHERMALLOADPROPERTIES,IFCSOUNDVALUE,IFCSOUNDPROPERTIES,IFCSERVICELIFEFACTOR,IFCREINFORCEMENTDEFINITIONPROPERTIES],3615266464:[IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF],478536968:[IFCRELDEFINESBYTYPE,IFCRELOVERRIDESPROPERTIES,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINES,IFCRELAGGREGATES,IFCRELNESTS,IFCRELDECOMPOSES,IFCRELVOIDSELEMENT,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELPROJECTSELEMENT,IFCRELINTERACTIONREQUIREMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALELEMENT,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS,IFCRELCONNECTS,IFCRELASSOCIATESPROFILEPROPERTIES,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL,IFCRELASSOCIATESAPPLIEDVALUE,IFCRELASSOCIATES,IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTASKS,IFCRELSCHEDULESCOSTITEMS,IFCRELASSIGNSTOPROJECTORDER,IFCRELASSIGNSTOCONTROL,IFCRELOCCUPIESSPACES,IFCRELASSIGNSTOACTOR,IFCRELASSIGNS],723233188:[IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLID,IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLID,IFCSWEPTAREASOLID],2473145415:[IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION],1597423693:[IFCSTRUCTURALLOADSINGLEFORCEWARPING],3843319758:[IFCSTRUCTURALSTEELPROFILEPROPERTIES],2513912981:[IFCPLANE,IFCELEMENTARYSURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE],2247615214:[IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLID],230924584:[IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION],3028897424:[IFCDIMENSIONCURVETERMINATOR],4282788508:[IFCTEXTLITERALWITHEXTENT],1628702193:[IFCVIBRATIONISOLATORTYPE,IFCDISCRETEACCESSORYTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCSENSORTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWALLTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCMEMBERTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE,IFCTYPEPRODUCT],2347495698:[IFCVIBRATIONISOLATORTYPE,IFCDISCRETEACCESSORYTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCSENSORTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWALLTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCMEMBERTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE],3288037868:[IFCPROJECTIONCURVE,IFCDIMENSIONCURVE],2736907675:[IFCBOOLEANCLIPPINGRESULT],4182860854:[IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDPLANE],59481748:[IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D],3749851601:[IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM],3331915920:[IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM],1383045692:[IFCCIRCLEHOLLOWPROFILEDEF],2506170314:[IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID],2601014836:[IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBEZIERCURVE,IFCBEZIERCURVE,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFC2DCOMPOSITECURVE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCLINE],3073041342:[IFCDIAMETERDIMENSION,IFCANGULARDIMENSION,IFCRADIUSDIMENSION,IFCLINEARDIMENSION,IFCDIMENSIONCURVEDIRECTEDCALLOUT,IFCSTRUCTUREDDIMENSIONCALLOUT],339256511:[IFCVIBRATIONISOLATORTYPE,IFCDISCRETEACCESSORYTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCSENSORTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWALLTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCMEMBERTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE],2777663545:[IFCPLANE],80994333:[IFCELECTRICALBASEPROPERTIES],4238390223:[IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE],1484403080:[IFCASYMMETRICISHAPEPROFILEDEF],1425443689:[IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP],3888040117:[IFCCONDITION,IFCASSET,IFCZONE,IFCSTRUCTURALANALYSISMODEL,IFCELECTRICALCIRCUIT,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCCONDITIONCRITERION,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCTIMESERIESSCHEDULE,IFCSPACEPROGRAM,IFCSERVICELIFE,IFCSCHEDULETIMECONTROL,IFCPROJECTORDERRECORD,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCFURNITURESTANDARD,IFCEQUIPMENTSTANDARD,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCPROJECT,IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCELECTRICALELEMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFLOWTREATMENTDEVICE,IFCFLOWTERMINAL,IFCFLOWSTORAGEDEVICE,IFCFLOWSEGMENT,IFCFLOWMOVINGDEVICE,IFCFLOWFITTING,IFCELECTRICDISTRIBUTIONPOINT,IFCFLOWCONTROLLER,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATE,IFCPILE,IFCMEMBER,IFCFOOTING,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMN,IFCBUILDINGELEMENTPROXY,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCBUILDINGELEMENTPART,IFCBUILDINGELEMENTCOMPONENT,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCFURNISHINGELEMENT,IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE,IFCEDGEFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCEQUIPMENTELEMENT,IFCDISCRETEACCESSORY,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALPLANARACTIONVARYING,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALLINEARACTIONVARYING,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCPROXY,IFCPRODUCT,IFCPROCEDURE,IFCORDERACTION,IFCMOVE,IFCTASK,IFCPROCESS],2945172077:[IFCPROCEDURE,IFCORDERACTION,IFCMOVE,IFCTASK],4208778838:[IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCELECTRICALELEMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFLOWTREATMENTDEVICE,IFCFLOWTERMINAL,IFCFLOWSTORAGEDEVICE,IFCFLOWSEGMENT,IFCFLOWMOVINGDEVICE,IFCFLOWFITTING,IFCELECTRICDISTRIBUTIONPOINT,IFCFLOWCONTROLLER,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATE,IFCPILE,IFCMEMBER,IFCFOOTING,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMN,IFCBUILDINGELEMENTPROXY,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCBUILDINGELEMENTPART,IFCBUILDINGELEMENTCOMPONENT,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCFURNISHINGELEMENT,IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE,IFCEDGEFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCEQUIPMENTELEMENT,IFCDISCRETEACCESSORY,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALPLANARACTIONVARYING,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALLINEARACTIONVARYING,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCPROXY],3939117080:[IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTASKS,IFCRELSCHEDULESCOSTITEMS,IFCRELASSIGNSTOPROJECTORDER,IFCRELASSIGNSTOCONTROL,IFCRELOCCUPIESSPACES,IFCRELASSIGNSTOACTOR],1683148259:[IFCRELOCCUPIESSPACES],2495723537:[IFCRELASSIGNSTASKS,IFCRELSCHEDULESCOSTITEMS,IFCRELASSIGNSTOPROJECTORDER],1865459582:[IFCRELASSOCIATESPROFILEPROPERTIES,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL,IFCRELASSOCIATESAPPLIEDVALUE],826625072:[IFCRELVOIDSELEMENT,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELPROJECTSELEMENT,IFCRELINTERACTIONREQUIREMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALELEMENT,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS],1204542856:[IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS],1638771189:[IFCRELCONNECTSWITHECCENTRICITY],2551354335:[IFCRELAGGREGATES,IFCRELNESTS],693640335:[IFCRELDEFINESBYTYPE,IFCRELOVERRIDESPROPERTIES,IFCRELDEFINESBYPROPERTIES],4186316022:[IFCRELOVERRIDESPROPERTIES],2914609552:[IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE],2706606064:[IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING],3893378262:[IFCSPACETYPE],3544373492:[IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALPLANARACTIONVARYING,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALLINEARACTIONVARYING,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALREACTION],3136571912:[IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER],530289379:[IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER],3689010777:[IFCSTRUCTURALPOINTREACTION],3979015343:[IFCSTRUCTURALSURFACEMEMBERVARYING],3473067441:[IFCORDERACTION,IFCMOVE],2296667514:[IFCOCCUPANT],1260505505:[IFCRATIONALBEZIERCURVE,IFCBEZIERCURVE,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFC2DCOMPOSITECURVE,IFCCOMPOSITECURVE],1950629157:[IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWALLTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCMEMBERTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE],3732776249:[IFC2DCOMPOSITECURVE],2510884976:[IFCCIRCLE,IFCELLIPSE],2559216714:[IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE],3293443760:[IFCCONDITIONCRITERION,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCTIMESERIESSCHEDULE,IFCSPACEPROGRAM,IFCSERVICELIFE,IFCSCHEDULETIMECONTROL,IFCPROJECTORDERRECORD,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCFURNITURESTANDARD,IFCEQUIPMENTSTANDARD,IFCCOSTSCHEDULE,IFCCOSTITEM],681481545:[IFCDIAMETERDIMENSION,IFCANGULARDIMENSION,IFCRADIUSDIMENSION,IFCLINEARDIMENSION],3256556792:[IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCSENSORTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE],3849074793:[IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENERGYCONVERSIONDEVICETYPE],1758889154:[IFCELECTRICALELEMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFLOWTREATMENTDEVICE,IFCFLOWTERMINAL,IFCFLOWSTORAGEDEVICE,IFCFLOWSEGMENT,IFCFLOWMOVINGDEVICE,IFCFLOWFITTING,IFCELECTRICDISTRIBUTIONPOINT,IFCFLOWCONTROLLER,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATE,IFCPILE,IFCMEMBER,IFCFOOTING,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMN,IFCBUILDINGELEMENTPROXY,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCBUILDINGELEMENTPART,IFCBUILDINGELEMENTCOMPONENT,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCFURNISHINGELEMENT,IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE,IFCEDGEFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCEQUIPMENTELEMENT,IFCDISCRETEACCESSORY,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY],1623761950:[IFCDISCRETEACCESSORY,IFCMECHANICALFASTENER,IFCFASTENER],2590856083:[IFCVIBRATIONISOLATORTYPE,IFCDISCRETEACCESSORYTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE],2107101300:[IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSPACEHEATERTYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE],647756555:[IFCMECHANICALFASTENER],2489546625:[IFCMECHANICALFASTENERTYPE],2827207264:[IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE,IFCEDGEFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION],2143335405:[IFCPROJECTIONELEMENT],1287392070:[IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE,IFCEDGEFEATURE,IFCOPENINGELEMENT],3907093117:[IFCELECTRICTIMECONTROLTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE],3198132628:[IFCDUCTFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE],1482959167:[IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE],1834744321:[IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE],1339347760:[IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE],2297155007:[IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICHEATERTYPE,IFCELECTRICAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCGASTERMINALTYPE],3009222698:[IFCFILTERTYPE,IFCDUCTSILENCERTYPE],2706460486:[IFCCONDITION,IFCASSET,IFCZONE,IFCSTRUCTURALANALYSISMODEL,IFCELECTRICALCIRCUIT,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADGROUP,IFCINVENTORY],3740093272:[IFCDISTRIBUTIONPORT],682877961:[IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALPLANARACTIONVARYING,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALLINEARACTIONVARYING,IFCSTRUCTURALLINEARACTION],1179482911:[IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION],214636428:[IFCSTRUCTURALCURVEMEMBERVARYING],1807405624:[IFCSTRUCTURALLINEARACTIONVARYING],1621171031:[IFCSTRUCTURALPLANARACTIONVARYING],2254336722:[IFCSTRUCTURALANALYSISMODEL,IFCELECTRICALCIRCUIT],1028945134:[IFCWORKSCHEDULE,IFCWORKPLAN],1967976161:[IFCRATIONALBEZIERCURVE,IFCBEZIERCURVE],1916977116:[IFCRATIONALBEZIERCURVE],3299480353:[IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATE,IFCPILE,IFCMEMBER,IFCFOOTING,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMN,IFCBUILDINGELEMENTPROXY,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCBUILDINGELEMENTPART,IFCBUILDINGELEMENTCOMPONENT],52481810:[IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCBUILDINGELEMENTPART],2635815018:[IFCVIBRATIONISOLATORTYPE],2063403501:[IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCSENSORTYPE,IFCFLOWINSTRUMENTTYPE],1945004755:[IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFLOWTREATMENTDEVICE,IFCFLOWTERMINAL,IFCFLOWSTORAGEDEVICE,IFCFLOWSEGMENT,IFCFLOWMOVINGDEVICE,IFCFLOWFITTING,IFCELECTRICDISTRIBUTIONPOINT,IFCFLOWCONTROLLER,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT],3040386961:[IFCDISTRIBUTIONCHAMBERELEMENT,IFCFLOWTREATMENTDEVICE,IFCFLOWTERMINAL,IFCFLOWSTORAGEDEVICE,IFCFLOWSEGMENT,IFCFLOWMOVINGDEVICE,IFCFLOWFITTING,IFCELECTRICDISTRIBUTIONPOINT,IFCFLOWCONTROLLER,IFCENERGYCONVERSIONDEVICE],855621170:[IFCCHAMFEREDGEFEATURE,IFCROUNDEDEDGEFEATURE],2058353004:[IFCELECTRICDISTRIBUTIONPOINT],3027567501:[IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH],2391406946:[IFCWALLSTANDARDCASE]};InversePropertyDef[1]={618182010:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],411424972:[["ValuesReferenced",IFCREFERENCESVALUEDOCUMENT,1,true],["ValueOfComponents",IFCAPPLIEDVALUERELATIONSHIP,0,true],["IsComponentIn",IFCAPPLIEDVALUERELATIONSHIP,1,true]],130549933:[["Actors",IFCAPPROVALACTORRELATIONSHIP,1,true],["IsRelatedWith",IFCAPPROVALRELATIONSHIP,0,true],["Relates",IFCAPPROVALRELATIONSHIP,1,true]],747523909:[["Contains",IFCCLASSIFICATIONITEM,1,true]],1767535486:[["IsClassifiedItemIn",IFCCLASSIFICATIONITEMRELATIONSHIP,1,true],["IsClassifyingItemIn",IFCCLASSIFICATIONITEMRELATIONSHIP,0,true]],1959218052:[["ClassifiedAs",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP,0,true],["RelatesConstraints",IFCCONSTRAINTRELATIONSHIP,2,true],["IsRelatedWith",IFCCONSTRAINTRELATIONSHIP,3,true],["PropertiesForConstraint",IFCPROPERTYCONSTRAINTRELATIONSHIP,0,true],["Aggregates",IFCCONSTRAINTAGGREGATIONRELATIONSHIP,2,true],["IsAggregatedIn",IFCCONSTRAINTAGGREGATIONRELATIONSHIP,3,true]],602808272:[["ValuesReferenced",IFCREFERENCESVALUEDOCUMENT,1,true],["ValueOfComponents",IFCAPPLIEDVALUERELATIONSHIP,0,true],["IsComponentIn",IFCAPPLIEDVALUERELATIONSHIP,1,true]],1154170062:[["IsPointedTo",IFCDOCUMENTINFORMATIONRELATIONSHIP,1,true],["IsPointer",IFCDOCUMENTINFORMATIONRELATIONSHIP,0,true]],1648886627:[["ValuesReferenced",IFCREFERENCESVALUEDOCUMENT,1,true],["ValueOfComponents",IFCAPPLIEDVALUERELATIONSHIP,0,true],["IsComponentIn",IFCAPPLIEDVALUERELATIONSHIP,1,true]],852622518:[["PartOfW",IFCGRID,9,true],["PartOfV",IFCGRID,8,true],["PartOfU",IFCGRID,7,true],["HasIntersections",IFCVIRTUALGRIDINTERSECTION,0,true]],3452421091:[["ReferenceIntoLibrary",IFCLIBRARYINFORMATION,4,true]],1838606355:[["HasRepresentation",IFCMATERIALDEFINITIONREPRESENTATION,3,true],["ClassifiedAs",IFCMATERIALCLASSIFICATIONRELATIONSHIP,1,true]],248100487:[["ToMaterialLayerSet",IFCMATERIALLAYERSET,0,false]],3368373690:[["ClassifiedAs",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP,0,true],["RelatesConstraints",IFCCONSTRAINTRELATIONSHIP,2,true],["IsRelatedWith",IFCCONSTRAINTRELATIONSHIP,3,true],["PropertiesForConstraint",IFCPROPERTYCONSTRAINTRELATIONSHIP,0,true],["Aggregates",IFCCONSTRAINTAGGREGATIONRELATIONSHIP,2,true],["IsAggregatedIn",IFCCONSTRAINTAGGREGATIONRELATIONSHIP,3,true]],3701648758:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCLOCALPLACEMENT,0,true]],2251480897:[["ClassifiedAs",IFCCONSTRAINTCLASSIFICATIONRELATIONSHIP,0,true],["RelatesConstraints",IFCCONSTRAINTRELATIONSHIP,2,true],["IsRelatedWith",IFCCONSTRAINTRELATIONSHIP,3,true],["PropertiesForConstraint",IFCPROPERTYCONSTRAINTRELATIONSHIP,0,true],["Aggregates",IFCCONSTRAINTAGGREGATIONRELATIONSHIP,2,true],["IsAggregatedIn",IFCCONSTRAINTAGGREGATIONRELATIONSHIP,3,true]],4251960020:[["IsRelatedBy",IFCORGANIZATIONRELATIONSHIP,3,true],["Relates",IFCORGANIZATIONRELATIONSHIP,2,true],["Engages",IFCPERSONANDORGANIZATION,1,true]],2077209135:[["EngagedIn",IFCPERSONANDORGANIZATION,0,true]],2483315170:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2226359599:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],3355820592:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],2598011224:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],2044713172:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2093928680:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],931644368:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],3252649465:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2405470396:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],825690147:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],1076942058:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],3377609919:[["RepresentationsInContext",IFCREPRESENTATION,0,true]],3008791417:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1660063152:[["MapUsage",IFCMAPPEDITEM,0,true]],3982875396:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],4240577450:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],3692461612:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],2830218821:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],3958052878:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3049322572:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],531007025:[["OfTable",IFCTABLE,1,false]],912023232:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],280115917:[["AnnotatedSurface",IFCANNOTATIONSURFACE,1,true]],1742049831:[["AnnotatedSurface",IFCANNOTATIONSURFACE,1,true]],2552916305:[["AnnotatedSurface",IFCANNOTATIONSURFACE,1,true]],3101149627:[["DocumentedBy",IFCTIMESERIESREFERENCERELATIONSHIP,0,true]],1377556343:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1735638870:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],2799835756:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1907098498:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2442683028:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],962685235:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3612888222:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2297822566:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2542286263:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],370225590:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3732053477:[["ReferenceToDocument",IFCDOCUMENTINFORMATION,3,true]],3900360178:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],476780140:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2556980723:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1809719519:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],803316827:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3008276851:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3448662350:[["RepresentationsInContext",IFCREPRESENTATION,0,true],["HasSubContexts",IFCGEOMETRICREPRESENTATIONSUBCONTEXT,6,true]],2453401579:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4142052618:[["RepresentationsInContext",IFCREPRESENTATION,0,true],["HasSubContexts",IFCGEOMETRICREPRESENTATIONSUBCONTEXT,6,true]],3590301190:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],178086475:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCLOCALPLACEMENT,0,true]],812098782:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3741457305:[["DocumentedBy",IFCTIMESERIESREFERENCERELATIONSHIP,0,true]],1402838566:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],125510826:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2604431987:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4266656042:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1520743889:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3422422726:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2624227202:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCLOCALPLACEMENT,0,true]],1008929658:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2347385850:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],219451334:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true]],2833995503:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2665983363:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1029017970:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2519244187:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3021840470:[["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2004835150:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1663979128:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2067069095:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4022376103:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1423911732:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2924175390:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2775532180:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],673634403:[["ShapeOfProduct",IFCPRODUCT,6,true],["HasShapeAspects",IFCSHAPEASPECT,4,true]],871118103:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],1680319473:[["HasAssociations",IFCRELASSOCIATES,4,true]],4166981789:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],2752243245:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],941946838:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],3357820518:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],3650150729:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],110355661:[["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,0,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,1,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true]],3413951693:[["DocumentedBy",IFCTIMESERIESREFERENCERELATIONSHIP,0,true]],3765753017:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],1509187699:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2411513650:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],4124623270:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],723233188:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2485662743:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],1202362311:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],390701378:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],2233826070:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2513912981:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2247615214:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1260650574:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],230924584:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3028897424:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4282788508:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3124975700:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1345879162:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1628702193:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2347495698:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1417489154:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2759199220:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],336235671:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],512836454:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],1299126871:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3288037868:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],669184980:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2265737646:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1302238472:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4261334040:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3125803723:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2740243338:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2736907675:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4182860854:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2581212453:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2713105998:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1123145078:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],59481748:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3749851601:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3486308946:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3331915920:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1416205885:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2205249479:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2485617015:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["UsingCurves",IFCCOMPOSITECURVE,0,true]],2506170314:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2147822146:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2601014836:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2827736869:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],693772133:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],606661476:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["AnnotatedBySymbols",IFCTERMINATORSYMBOL,3,true]],4054601972:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],32440307:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2963535650:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],1714330368:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],526551008:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3073041342:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["IsRelatedFromCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,3,true],["IsRelatedToCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,2,true]],1472233963:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1883228015:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],339256511:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2777663545:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],80994333:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],477187591:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2047409740:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],374418227:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4203026998:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],315944413:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3455213021:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],4238390223:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1268542332:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],987898635:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1281925730:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1425443689:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3888040117:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true]],3388369263:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3505215534:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3566463478:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],603570806:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],220341763:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2945172077:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true]],4208778838:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],103090709:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true]],4194566429:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1451395588:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],3219374653:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2798486643:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3454111270:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2914609552:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1856042241:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4158566097:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3626867408:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2706606064:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true]],3893378262:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],451544542:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3544373492:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false]],3136571912:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true]],530289379:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ReferencesElement",IFCRELCONNECTSSTRUCTURALELEMENT,5,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],3689010777:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false],["Causes",IFCSTRUCTURALACTION,10,true]],3979015343:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ReferencesElement",IFCRELCONNECTSSTRUCTURALELEMENT,5,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2218152070:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ReferencesElement",IFCRELCONNECTSSTRUCTURALELEMENT,5,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],4070609034:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["IsRelatedFromCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,3,true],["IsRelatedToCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,2,true]],2028607225:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2809605785:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4124788165:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1580310250:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3473067441:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true]],2097647324:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2296667514:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsActingUpon",IFCRELASSIGNSTOACTOR,6,true]],1674181508:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1334484129:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3649129432:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1260505505:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4031249490:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true]],1950629157:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3124254112:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true]],300633059:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3732776249:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2510884976:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2559216714:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],3293443760:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3895139033:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1419761937:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1916426348:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3295246426:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1457835157:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],681481545:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["IsRelatedFromCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,3,true],["IsRelatedToCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,2,true]],3256556792:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3849074793:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],360485395:[["HasAssociations",IFCRELASSOCIATES,4,true],["PropertyDefinitionOf",IFCRELDEFINESBYPROPERTIES,5,true],["DefinesType",IFCTYPEOBJECT,5,true]],1758889154:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],4123344466:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1623761950:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2590856083:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1704287377:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2107101300:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1962604670:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3272907226:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3174744832:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3390157468:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],807026263:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3737207727:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],647756555:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2489546625:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2827207264:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2143335405:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["ProjectsElements",IFCRELPROJECTSELEMENT,5,false]],1287392070:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],3907093117:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3198132628:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3815607619:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1482959167:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1834744321:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1339347760:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2297155007:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3009222698:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],263784265:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],814719939:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],200128114:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3009204131:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2706460486:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false]],1251058090:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1806887404:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2391368822:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false]],4288270099:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3827777499:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1051575348:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1161773419:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2506943328:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["IsRelatedFromCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,3,true],["IsRelatedToCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,2,true]],377706215:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2108223431:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3181161470:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],977012517:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1916936684:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true]],4143007308:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsActingUpon",IFCRELASSIGNSTOACTOR,6,true]],3588315303:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false],["HasFillings",IFCRELFILLSELEMENT,4,true]],3425660407:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true]],2837617999:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2382730787:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3327091369:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],804291784:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],4231323485:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],4017108033:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3724593414:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3740093272:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedIn",IFCRELCONNECTSPORTTOELEMENT,4,false],["ConnectedFrom",IFCRELCONNECTSPORTS,5,true],["ConnectedTo",IFCRELCONNECTSPORTS,4,true]],2744685151:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true]],2904328755:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3642467123:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3651124850:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["ProjectsElements",IFCRELPROJECTSELEMENT,5,false]],1842657554:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2250791053:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3248260540:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["IsRelatedFromCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,3,true],["IsRelatedToCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,2,true]],2893384427:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2324767716:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1768891740:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3517283431:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true],["ScheduleTimeControlAssigned",IFCRELASSIGNSTASKS,7,false]],4105383287:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],4097777520:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true]],2533589738:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3856911033:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["HasCoverings",IFCRELCOVERSSPACES,4,true],["BoundedBy",IFCRELSPACEBOUNDARY,4,true]],1305183839:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],652456506:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true],["HasInteractionReqsFrom",IFCRELINTERACTIONREQUIREMENTS,7,true],["HasInteractionReqsTo",IFCRELINTERACTIONREQUIREMENTS,8,true]],3812236995:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3112655638:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1039846685:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],682877961:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false]],1179482911:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],4243806635:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],214636428:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ReferencesElement",IFCRELCONNECTSSTRUCTURALELEMENT,5,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2445595289:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ReferencesElement",IFCRELCONNECTSSTRUCTURALELEMENT,5,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],1807405624:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false]],1721250024:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false]],1252848954:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false],["SourceOfResultGroup",IFCSTRUCTURALRESULTGROUP,6,true],["LoadGroupFor",IFCSTRUCTURALANALYSISMODEL,7,true]],1621171031:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false]],3987759626:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false]],2082059205:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false]],734778138:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],1235345126:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,false],["Causes",IFCSTRUCTURALACTION,10,true]],2986769608:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false],["ResultGroupFor",IFCSTRUCTURALANALYSISMODEL,8,true]],1975003073:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],148013059:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],2315554128:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2254336722:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],5716631:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1637806684:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1692211062:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1620046519:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3593883385:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1600972822:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1911125066:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],728799441:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2769231204:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1898987631:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1133259667:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1028945134:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],4218914973:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3342526732:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1033361043:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false]],1213861670:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3821786052:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1411407467:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3352864051:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1871374353:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2470393545:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["IsRelatedFromCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,3,true],["IsRelatedToCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,2,true]],3460190687:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false]],1967976161:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],819618141:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1916977116:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],231477066:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3299480353:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],52481810:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2979338954:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1095909175:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1909888760:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],395041908:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3293546465:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1285652485:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2951183804:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2611217952:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2301859152:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],843113511:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3850581409:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2816379211:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2188551683:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false]],1163958913:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3898045240:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1060000209:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],488727124:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],335055490:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2954562838:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1973544240:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["CoversSpaces",IFCRELCOVERSSPACES,5,true],["Covers",IFCRELCOVERSBLDGELEMENTS,5,true]],3495092785:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3961806047:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],4147604152:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["IsRelatedFromCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,3,true],["IsRelatedToCallout",IFCDRAUGHTINGCALLOUTRELATIONSHIP,2,true]],1335981549:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2635815018:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1599208980:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2063403501:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1945004755:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3040386961:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3041715199:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedIn",IFCRELCONNECTSPORTTOELEMENT,4,false],["ConnectedFrom",IFCRELCONNECTSPORTS,5,true],["ConnectedTo",IFCRELCONNECTSPORTS,4,true]],395920057:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],869906466:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3760055223:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2030761528:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],855621170:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],663422040:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3277789161:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1534661035:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1365060375:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1217240411:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],712377611:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1634875225:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],857184966:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1658829314:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],346874300:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1810631287:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],4222183408:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2058353004:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4278956645:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4037862832:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3132237377:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],987401354:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],707683696:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2223149337:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3508470533:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],900683007:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1073191201:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1687234759:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3171933400:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2262370178:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3024970846:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3283111854:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3055160366:[["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3027567501:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2320036040:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2016517767:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],1376911519:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],1783015770:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1529196076:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],331165859:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],4252922144:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2515109513:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,false],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],3824725483:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2347447852:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3313531582:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],2391406946:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3512223829:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],3304561284:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2874132201:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],3001207471:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],753842376:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2454782716:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],578613899:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["ObjectTypeOf",IFCRELDEFINESBYTYPE,5,true]],1052013943:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1062813311:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],3700593921:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],979691226:[["HasAssignments",IFCRELASSIGNS,4,true],["IsDecomposedBy",IFCRELDECOMPOSES,4,true],["Decomposes",IFCRELDECOMPOSES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["HasStructuralMember",IFCRELCONNECTSSTRUCTURALELEMENT,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]]};Constructors[1]={3630933823:function _(ID,a){return new IFC2X3.IfcActorRole(ID,a[0],a[1],a[2]);},618182010:function _(ID,a){return new IFC2X3.IfcAddress(ID,a[0],a[1],a[2]);},639542469:function _(ID,a){return new IFC2X3.IfcApplication(ID,a[0],a[1],a[2],a[3]);},411424972:function _(ID,a){return new IFC2X3.IfcAppliedValue(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1110488051:function _(ID,a){return new IFC2X3.IfcAppliedValueRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},130549933:function _(ID,a){return new IFC2X3.IfcApproval(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2080292479:function _(ID,a){return new IFC2X3.IfcApprovalActorRelationship(ID,a[0],a[1],a[2]);},390851274:function _(ID,a){return new IFC2X3.IfcApprovalPropertyRelationship(ID,a[0],a[1]);},3869604511:function _(ID,a){return new IFC2X3.IfcApprovalRelationship(ID,a[0],a[1],a[2],a[3]);},4037036970:function _(ID,a){return new IFC2X3.IfcBoundaryCondition(ID,a[0]);},1560379544:function _(ID,a){return new IFC2X3.IfcBoundaryEdgeCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3367102660:function _(ID,a){return new IFC2X3.IfcBoundaryFaceCondition(ID,a[0],a[1],a[2],a[3]);},1387855156:function _(ID,a){return new IFC2X3.IfcBoundaryNodeCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2069777674:function _(ID,a){return new IFC2X3.IfcBoundaryNodeConditionWarping(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},622194075:function _(ID,a){return new IFC2X3.IfcCalendarDate(ID,a[0],a[1],a[2]);},747523909:function _(ID,a){return new IFC2X3.IfcClassification(ID,a[0],a[1],a[2],a[3]);},1767535486:function _(ID,a){return new IFC2X3.IfcClassificationItem(ID,a[0],a[1],a[2]);},1098599126:function _(ID,a){return new IFC2X3.IfcClassificationItemRelationship(ID,a[0],a[1]);},938368621:function _(ID,a){return new IFC2X3.IfcClassificationNotation(ID,a[0]);},3639012971:function _(ID,a){return new IFC2X3.IfcClassificationNotationFacet(ID,a[0]);},3264961684:function _(ID,a){return new IFC2X3.IfcColourSpecification(ID,a[0]);},2859738748:function _(ID,_16){return new IFC2X3.IfcConnectionGeometry(ID);},2614616156:function _(ID,a){return new IFC2X3.IfcConnectionPointGeometry(ID,a[0],a[1]);},4257277454:function _(ID,a){return new IFC2X3.IfcConnectionPortGeometry(ID,a[0],a[1],a[2]);},2732653382:function _(ID,a){return new IFC2X3.IfcConnectionSurfaceGeometry(ID,a[0],a[1]);},1959218052:function _(ID,a){return new IFC2X3.IfcConstraint(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1658513725:function _(ID,a){return new IFC2X3.IfcConstraintAggregationRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},613356794:function _(ID,a){return new IFC2X3.IfcConstraintClassificationRelationship(ID,a[0],a[1]);},347226245:function _(ID,a){return new IFC2X3.IfcConstraintRelationship(ID,a[0],a[1],a[2],a[3]);},1065062679:function _(ID,a){return new IFC2X3.IfcCoordinatedUniversalTimeOffset(ID,a[0],a[1],a[2]);},602808272:function _(ID,a){return new IFC2X3.IfcCostValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},539742890:function _(ID,a){return new IFC2X3.IfcCurrencyRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},1105321065:function _(ID,a){return new IFC2X3.IfcCurveStyleFont(ID,a[0],a[1]);},2367409068:function _(ID,a){return new IFC2X3.IfcCurveStyleFontAndScaling(ID,a[0],a[1],a[2]);},3510044353:function _(ID,a){return new IFC2X3.IfcCurveStyleFontPattern(ID,a[0],a[1]);},1072939445:function _(ID,a){return new IFC2X3.IfcDateAndTime(ID,a[0],a[1]);},1765591967:function _(ID,a){return new IFC2X3.IfcDerivedUnit(ID,a[0],a[1],a[2]);},1045800335:function _(ID,a){return new IFC2X3.IfcDerivedUnitElement(ID,a[0],a[1]);},2949456006:function _(ID,a){return new IFC2X3.IfcDimensionalExponents(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1376555844:function _(ID,a){return new IFC2X3.IfcDocumentElectronicFormat(ID,a[0],a[1],a[2]);},1154170062:function _(ID,a){return new IFC2X3.IfcDocumentInformation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},770865208:function _(ID,a){return new IFC2X3.IfcDocumentInformationRelationship(ID,a[0],a[1],a[2]);},3796139169:function _(ID,a){return new IFC2X3.IfcDraughtingCalloutRelationship(ID,a[0],a[1],a[2],a[3]);},1648886627:function _(ID,a){return new IFC2X3.IfcEnvironmentalImpactValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3200245327:function _(ID,a){return new IFC2X3.IfcExternalReference(ID,a[0],a[1],a[2]);},2242383968:function _(ID,a){return new IFC2X3.IfcExternallyDefinedHatchStyle(ID,a[0],a[1],a[2]);},1040185647:function _(ID,a){return new IFC2X3.IfcExternallyDefinedSurfaceStyle(ID,a[0],a[1],a[2]);},3207319532:function _(ID,a){return new IFC2X3.IfcExternallyDefinedSymbol(ID,a[0],a[1],a[2]);},3548104201:function _(ID,a){return new IFC2X3.IfcExternallyDefinedTextFont(ID,a[0],a[1],a[2]);},852622518:function _(ID,a){return new IFC2X3.IfcGridAxis(ID,a[0],a[1],a[2]);},3020489413:function _(ID,a){return new IFC2X3.IfcIrregularTimeSeriesValue(ID,a[0],a[1]);},2655187982:function _(ID,a){return new IFC2X3.IfcLibraryInformation(ID,a[0],a[1],a[2],a[3],a[4]);},3452421091:function _(ID,a){return new IFC2X3.IfcLibraryReference(ID,a[0],a[1],a[2]);},4162380809:function _(ID,a){return new IFC2X3.IfcLightDistributionData(ID,a[0],a[1],a[2]);},1566485204:function _(ID,a){return new IFC2X3.IfcLightIntensityDistribution(ID,a[0],a[1]);},30780891:function _(ID,a){return new IFC2X3.IfcLocalTime(ID,a[0],a[1],a[2],a[3],a[4]);},1838606355:function _(ID,a){return new IFC2X3.IfcMaterial(ID,a[0]);},1847130766:function _(ID,a){return new IFC2X3.IfcMaterialClassificationRelationship(ID,a[0],a[1]);},248100487:function _(ID,a){return new IFC2X3.IfcMaterialLayer(ID,a[0],a[1],a[2]);},3303938423:function _(ID,a){return new IFC2X3.IfcMaterialLayerSet(ID,a[0],a[1]);},1303795690:function _(ID,a){return new IFC2X3.IfcMaterialLayerSetUsage(ID,a[0],a[1],a[2],a[3]);},2199411900:function _(ID,a){return new IFC2X3.IfcMaterialList(ID,a[0]);},3265635763:function _(ID,a){return new IFC2X3.IfcMaterialProperties(ID,a[0]);},2597039031:function _(ID,a){return new IFC2X3.IfcMeasureWithUnit(ID,a[0],a[1]);},4256014907:function _(ID,a){return new IFC2X3.IfcMechanicalMaterialProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},677618848:function _(ID,a){return new IFC2X3.IfcMechanicalSteelMaterialProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},3368373690:function _(ID,a){return new IFC2X3.IfcMetric(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2706619895:function _(ID,a){return new IFC2X3.IfcMonetaryUnit(ID,a[0]);},1918398963:function _(ID,a){return new IFC2X3.IfcNamedUnit(ID,a[0],a[1]);},3701648758:function _(ID,_17){return new IFC2X3.IfcObjectPlacement(ID);},2251480897:function _(ID,a){return new IFC2X3.IfcObjective(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1227763645:function _(ID,a){return new IFC2X3.IfcOpticalMaterialProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4251960020:function _(ID,a){return new IFC2X3.IfcOrganization(ID,a[0],a[1],a[2],a[3],a[4]);},1411181986:function _(ID,a){return new IFC2X3.IfcOrganizationRelationship(ID,a[0],a[1],a[2],a[3]);},1207048766:function _(ID,a){return new IFC2X3.IfcOwnerHistory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2077209135:function _(ID,a){return new IFC2X3.IfcPerson(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},101040310:function _(ID,a){return new IFC2X3.IfcPersonAndOrganization(ID,a[0],a[1],a[2]);},2483315170:function _(ID,a){return new IFC2X3.IfcPhysicalQuantity(ID,a[0],a[1]);},2226359599:function _(ID,a){return new IFC2X3.IfcPhysicalSimpleQuantity(ID,a[0],a[1],a[2]);},3355820592:function _(ID,a){return new IFC2X3.IfcPostalAddress(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3727388367:function _(ID,a){return new IFC2X3.IfcPreDefinedItem(ID,a[0]);},990879717:function _(ID,a){return new IFC2X3.IfcPreDefinedSymbol(ID,a[0]);},3213052703:function _(ID,a){return new IFC2X3.IfcPreDefinedTerminatorSymbol(ID,a[0]);},1775413392:function _(ID,a){return new IFC2X3.IfcPreDefinedTextFont(ID,a[0]);},2022622350:function _(ID,a){return new IFC2X3.IfcPresentationLayerAssignment(ID,a[0],a[1],a[2],a[3]);},1304840413:function _(ID,a){return new IFC2X3.IfcPresentationLayerWithStyle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3119450353:function _(ID,a){return new IFC2X3.IfcPresentationStyle(ID,a[0]);},2417041796:function _(ID,a){return new IFC2X3.IfcPresentationStyleAssignment(ID,a[0]);},2095639259:function _(ID,a){return new IFC2X3.IfcProductRepresentation(ID,a[0],a[1],a[2]);},2267347899:function _(ID,a){return new IFC2X3.IfcProductsOfCombustionProperties(ID,a[0],a[1],a[2],a[3],a[4]);},3958567839:function _(ID,a){return new IFC2X3.IfcProfileDef(ID,a[0],a[1]);},2802850158:function _(ID,a){return new IFC2X3.IfcProfileProperties(ID,a[0],a[1]);},2598011224:function _(ID,a){return new IFC2X3.IfcProperty(ID,a[0],a[1]);},3896028662:function _(ID,a){return new IFC2X3.IfcPropertyConstraintRelationship(ID,a[0],a[1],a[2],a[3]);},148025276:function _(ID,a){return new IFC2X3.IfcPropertyDependencyRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},3710013099:function _(ID,a){return new IFC2X3.IfcPropertyEnumeration(ID,a[0],a[1],a[2]);},2044713172:function _(ID,a){return new IFC2X3.IfcQuantityArea(ID,a[0],a[1],a[2],a[3]);},2093928680:function _(ID,a){return new IFC2X3.IfcQuantityCount(ID,a[0],a[1],a[2],a[3]);},931644368:function _(ID,a){return new IFC2X3.IfcQuantityLength(ID,a[0],a[1],a[2],a[3]);},3252649465:function _(ID,a){return new IFC2X3.IfcQuantityTime(ID,a[0],a[1],a[2],a[3]);},2405470396:function _(ID,a){return new IFC2X3.IfcQuantityVolume(ID,a[0],a[1],a[2],a[3]);},825690147:function _(ID,a){return new IFC2X3.IfcQuantityWeight(ID,a[0],a[1],a[2],a[3]);},2692823254:function _(ID,a){return new IFC2X3.IfcReferencesValueDocument(ID,a[0],a[1],a[2],a[3]);},1580146022:function _(ID,a){return new IFC2X3.IfcReinforcementBarProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1222501353:function _(ID,a){return new IFC2X3.IfcRelaxation(ID,a[0],a[1]);},1076942058:function _(ID,a){return new IFC2X3.IfcRepresentation(ID,a[0],a[1],a[2],a[3]);},3377609919:function _(ID,a){return new IFC2X3.IfcRepresentationContext(ID,a[0],a[1]);},3008791417:function _(ID,_18){return new IFC2X3.IfcRepresentationItem(ID);},1660063152:function _(ID,a){return new IFC2X3.IfcRepresentationMap(ID,a[0],a[1]);},3679540991:function _(ID,a){return new IFC2X3.IfcRibPlateProfileProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2341007311:function _(ID,a){return new IFC2X3.IfcRoot(ID,a[0],a[1],a[2],a[3]);},448429030:function _(ID,a){return new IFC2X3.IfcSIUnit(ID,a[0],a[1],a[2]);},2042790032:function _(ID,a){return new IFC2X3.IfcSectionProperties(ID,a[0],a[1],a[2]);},4165799628:function _(ID,a){return new IFC2X3.IfcSectionReinforcementProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},867548509:function _(ID,a){return new IFC2X3.IfcShapeAspect(ID,a[0],a[1],a[2],a[3],a[4]);},3982875396:function _(ID,a){return new IFC2X3.IfcShapeModel(ID,a[0],a[1],a[2],a[3]);},4240577450:function _(ID,a){return new IFC2X3.IfcShapeRepresentation(ID,a[0],a[1],a[2],a[3]);},3692461612:function _(ID,a){return new IFC2X3.IfcSimpleProperty(ID,a[0],a[1]);},2273995522:function _(ID,a){return new IFC2X3.IfcStructuralConnectionCondition(ID,a[0]);},2162789131:function _(ID,a){return new IFC2X3.IfcStructuralLoad(ID,a[0]);},2525727697:function _(ID,a){return new IFC2X3.IfcStructuralLoadStatic(ID,a[0]);},3408363356:function _(ID,a){return new IFC2X3.IfcStructuralLoadTemperature(ID,a[0],a[1],a[2],a[3]);},2830218821:function _(ID,a){return new IFC2X3.IfcStyleModel(ID,a[0],a[1],a[2],a[3]);},3958052878:function _(ID,a){return new IFC2X3.IfcStyledItem(ID,a[0],a[1],a[2]);},3049322572:function _(ID,a){return new IFC2X3.IfcStyledRepresentation(ID,a[0],a[1],a[2],a[3]);},1300840506:function _(ID,a){return new IFC2X3.IfcSurfaceStyle(ID,a[0],a[1],a[2]);},3303107099:function _(ID,a){return new IFC2X3.IfcSurfaceStyleLighting(ID,a[0],a[1],a[2],a[3]);},1607154358:function _(ID,a){return new IFC2X3.IfcSurfaceStyleRefraction(ID,a[0],a[1]);},846575682:function _(ID,a){return new IFC2X3.IfcSurfaceStyleShading(ID,a[0]);},1351298697:function _(ID,a){return new IFC2X3.IfcSurfaceStyleWithTextures(ID,a[0]);},626085974:function _(ID,a){return new IFC2X3.IfcSurfaceTexture(ID,a[0],a[1],a[2],a[3]);},1290481447:function _(ID,a){return new IFC2X3.IfcSymbolStyle(ID,a[0],a[1]);},985171141:function _(ID,a){return new IFC2X3.IfcTable(ID,a[0],a[1]);},531007025:function _(ID,a){return new IFC2X3.IfcTableRow(ID,a[0],a[1]);},912023232:function _(ID,a){return new IFC2X3.IfcTelecomAddress(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1447204868:function _(ID,a){return new IFC2X3.IfcTextStyle(ID,a[0],a[1],a[2],a[3]);},1983826977:function _(ID,a){return new IFC2X3.IfcTextStyleFontModel(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2636378356:function _(ID,a){return new IFC2X3.IfcTextStyleForDefinedFont(ID,a[0],a[1]);},1640371178:function _(ID,a){return new IFC2X3.IfcTextStyleTextModel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1484833681:function _(ID,a){return new IFC2X3.IfcTextStyleWithBoxCharacteristics(ID,a[0],a[1],a[2],a[3],a[4]);},280115917:function _(ID,_19){return new IFC2X3.IfcTextureCoordinate(ID);},1742049831:function _(ID,a){return new IFC2X3.IfcTextureCoordinateGenerator(ID,a[0],a[1]);},2552916305:function _(ID,a){return new IFC2X3.IfcTextureMap(ID,a[0]);},1210645708:function _(ID,a){return new IFC2X3.IfcTextureVertex(ID,a[0]);},3317419933:function _(ID,a){return new IFC2X3.IfcThermalMaterialProperties(ID,a[0],a[1],a[2],a[3],a[4]);},3101149627:function _(ID,a){return new IFC2X3.IfcTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1718945513:function _(ID,a){return new IFC2X3.IfcTimeSeriesReferenceRelationship(ID,a[0],a[1]);},581633288:function _(ID,a){return new IFC2X3.IfcTimeSeriesValue(ID,a[0]);},1377556343:function _(ID,_20){return new IFC2X3.IfcTopologicalRepresentationItem(ID);},1735638870:function _(ID,a){return new IFC2X3.IfcTopologyRepresentation(ID,a[0],a[1],a[2],a[3]);},180925521:function _(ID,a){return new IFC2X3.IfcUnitAssignment(ID,a[0]);},2799835756:function _(ID,_21){return new IFC2X3.IfcVertex(ID);},3304826586:function _(ID,a){return new IFC2X3.IfcVertexBasedTextureMap(ID,a[0],a[1]);},1907098498:function _(ID,a){return new IFC2X3.IfcVertexPoint(ID,a[0]);},891718957:function _(ID,a){return new IFC2X3.IfcVirtualGridIntersection(ID,a[0],a[1]);},1065908215:function _(ID,a){return new IFC2X3.IfcWaterProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2442683028:function _(ID,a){return new IFC2X3.IfcAnnotationOccurrence(ID,a[0],a[1],a[2]);},962685235:function _(ID,a){return new IFC2X3.IfcAnnotationSurfaceOccurrence(ID,a[0],a[1],a[2]);},3612888222:function _(ID,a){return new IFC2X3.IfcAnnotationSymbolOccurrence(ID,a[0],a[1],a[2]);},2297822566:function _(ID,a){return new IFC2X3.IfcAnnotationTextOccurrence(ID,a[0],a[1],a[2]);},3798115385:function _(ID,a){return new IFC2X3.IfcArbitraryClosedProfileDef(ID,a[0],a[1],a[2]);},1310608509:function _(ID,a){return new IFC2X3.IfcArbitraryOpenProfileDef(ID,a[0],a[1],a[2]);},2705031697:function _(ID,a){return new IFC2X3.IfcArbitraryProfileDefWithVoids(ID,a[0],a[1],a[2],a[3]);},616511568:function _(ID,a){return new IFC2X3.IfcBlobTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3150382593:function _(ID,a){return new IFC2X3.IfcCenterLineProfileDef(ID,a[0],a[1],a[2],a[3]);},647927063:function _(ID,a){return new IFC2X3.IfcClassificationReference(ID,a[0],a[1],a[2],a[3]);},776857604:function _(ID,a){return new IFC2X3.IfcColourRgb(ID,a[0],a[1],a[2],a[3]);},2542286263:function _(ID,a){return new IFC2X3.IfcComplexProperty(ID,a[0],a[1],a[2],a[3]);},1485152156:function _(ID,a){return new IFC2X3.IfcCompositeProfileDef(ID,a[0],a[1],a[2],a[3]);},370225590:function _(ID,a){return new IFC2X3.IfcConnectedFaceSet(ID,a[0]);},1981873012:function _(ID,a){return new IFC2X3.IfcConnectionCurveGeometry(ID,a[0],a[1]);},45288368:function _(ID,a){return new IFC2X3.IfcConnectionPointEccentricity(ID,a[0],a[1],a[2],a[3],a[4]);},3050246964:function _(ID,a){return new IFC2X3.IfcContextDependentUnit(ID,a[0],a[1],a[2]);},2889183280:function _(ID,a){return new IFC2X3.IfcConversionBasedUnit(ID,a[0],a[1],a[2],a[3]);},3800577675:function _(ID,a){return new IFC2X3.IfcCurveStyle(ID,a[0],a[1],a[2],a[3]);},3632507154:function _(ID,a){return new IFC2X3.IfcDerivedProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},2273265877:function _(ID,a){return new IFC2X3.IfcDimensionCalloutRelationship(ID,a[0],a[1],a[2],a[3]);},1694125774:function _(ID,a){return new IFC2X3.IfcDimensionPair(ID,a[0],a[1],a[2],a[3]);},3732053477:function _(ID,a){return new IFC2X3.IfcDocumentReference(ID,a[0],a[1],a[2]);},4170525392:function _(ID,a){return new IFC2X3.IfcDraughtingPreDefinedTextFont(ID,a[0]);},3900360178:function _(ID,a){return new IFC2X3.IfcEdge(ID,a[0],a[1]);},476780140:function _(ID,a){return new IFC2X3.IfcEdgeCurve(ID,a[0],a[1],a[2],a[3]);},1860660968:function _(ID,a){return new IFC2X3.IfcExtendedMaterialProperties(ID,a[0],a[1],a[2],a[3]);},2556980723:function _(ID,a){return new IFC2X3.IfcFace(ID,a[0]);},1809719519:function _(ID,a){return new IFC2X3.IfcFaceBound(ID,a[0],a[1]);},803316827:function _(ID,a){return new IFC2X3.IfcFaceOuterBound(ID,a[0],a[1]);},3008276851:function _(ID,a){return new IFC2X3.IfcFaceSurface(ID,a[0],a[1],a[2]);},4219587988:function _(ID,a){return new IFC2X3.IfcFailureConnectionCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},738692330:function _(ID,a){return new IFC2X3.IfcFillAreaStyle(ID,a[0],a[1]);},3857492461:function _(ID,a){return new IFC2X3.IfcFuelProperties(ID,a[0],a[1],a[2],a[3],a[4]);},803998398:function _(ID,a){return new IFC2X3.IfcGeneralMaterialProperties(ID,a[0],a[1],a[2],a[3]);},1446786286:function _(ID,a){return new IFC2X3.IfcGeneralProfileProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3448662350:function _(ID,a){return new IFC2X3.IfcGeometricRepresentationContext(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2453401579:function _(ID,_22){return new IFC2X3.IfcGeometricRepresentationItem(ID);},4142052618:function _(ID,a){return new IFC2X3.IfcGeometricRepresentationSubContext(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3590301190:function _(ID,a){return new IFC2X3.IfcGeometricSet(ID,a[0]);},178086475:function _(ID,a){return new IFC2X3.IfcGridPlacement(ID,a[0],a[1]);},812098782:function _(ID,a){return new IFC2X3.IfcHalfSpaceSolid(ID,a[0],a[1]);},2445078500:function _(ID,a){return new IFC2X3.IfcHygroscopicMaterialProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3905492369:function _(ID,a){return new IFC2X3.IfcImageTexture(ID,a[0],a[1],a[2],a[3],a[4]);},3741457305:function _(ID,a){return new IFC2X3.IfcIrregularTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1402838566:function _(ID,a){return new IFC2X3.IfcLightSource(ID,a[0],a[1],a[2],a[3]);},125510826:function _(ID,a){return new IFC2X3.IfcLightSourceAmbient(ID,a[0],a[1],a[2],a[3]);},2604431987:function _(ID,a){return new IFC2X3.IfcLightSourceDirectional(ID,a[0],a[1],a[2],a[3],a[4]);},4266656042:function _(ID,a){return new IFC2X3.IfcLightSourceGoniometric(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1520743889:function _(ID,a){return new IFC2X3.IfcLightSourcePositional(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3422422726:function _(ID,a){return new IFC2X3.IfcLightSourceSpot(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},2624227202:function _(ID,a){return new IFC2X3.IfcLocalPlacement(ID,a[0],a[1]);},1008929658:function _(ID,_23){return new IFC2X3.IfcLoop(ID);},2347385850:function _(ID,a){return new IFC2X3.IfcMappedItem(ID,a[0],a[1]);},2022407955:function _(ID,a){return new IFC2X3.IfcMaterialDefinitionRepresentation(ID,a[0],a[1],a[2],a[3]);},1430189142:function _(ID,a){return new IFC2X3.IfcMechanicalConcreteMaterialProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},219451334:function _(ID,a){return new IFC2X3.IfcObjectDefinition(ID,a[0],a[1],a[2],a[3]);},2833995503:function _(ID,a){return new IFC2X3.IfcOneDirectionRepeatFactor(ID,a[0]);},2665983363:function _(ID,a){return new IFC2X3.IfcOpenShell(ID,a[0]);},1029017970:function _(ID,a){return new IFC2X3.IfcOrientedEdge(ID,a[0],a[1]);},2529465313:function _(ID,a){return new IFC2X3.IfcParameterizedProfileDef(ID,a[0],a[1],a[2]);},2519244187:function _(ID,a){return new IFC2X3.IfcPath(ID,a[0]);},3021840470:function _(ID,a){return new IFC2X3.IfcPhysicalComplexQuantity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},597895409:function _(ID,a){return new IFC2X3.IfcPixelTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2004835150:function _(ID,a){return new IFC2X3.IfcPlacement(ID,a[0]);},1663979128:function _(ID,a){return new IFC2X3.IfcPlanarExtent(ID,a[0],a[1]);},2067069095:function _(ID,_24){return new IFC2X3.IfcPoint(ID);},4022376103:function _(ID,a){return new IFC2X3.IfcPointOnCurve(ID,a[0],a[1]);},1423911732:function _(ID,a){return new IFC2X3.IfcPointOnSurface(ID,a[0],a[1],a[2]);},2924175390:function _(ID,a){return new IFC2X3.IfcPolyLoop(ID,a[0]);},2775532180:function _(ID,a){return new IFC2X3.IfcPolygonalBoundedHalfSpace(ID,a[0],a[1],a[2],a[3]);},759155922:function _(ID,a){return new IFC2X3.IfcPreDefinedColour(ID,a[0]);},2559016684:function _(ID,a){return new IFC2X3.IfcPreDefinedCurveFont(ID,a[0]);},433424934:function _(ID,a){return new IFC2X3.IfcPreDefinedDimensionSymbol(ID,a[0]);},179317114:function _(ID,a){return new IFC2X3.IfcPreDefinedPointMarkerSymbol(ID,a[0]);},673634403:function _(ID,a){return new IFC2X3.IfcProductDefinitionShape(ID,a[0],a[1],a[2]);},871118103:function _(ID,a){return new IFC2X3.IfcPropertyBoundedValue(ID,a[0],a[1],a[2],a[3],a[4]);},1680319473:function _(ID,a){return new IFC2X3.IfcPropertyDefinition(ID,a[0],a[1],a[2],a[3]);},4166981789:function _(ID,a){return new IFC2X3.IfcPropertyEnumeratedValue(ID,a[0],a[1],a[2],a[3]);},2752243245:function _(ID,a){return new IFC2X3.IfcPropertyListValue(ID,a[0],a[1],a[2],a[3]);},941946838:function _(ID,a){return new IFC2X3.IfcPropertyReferenceValue(ID,a[0],a[1],a[2],a[3]);},3357820518:function _(ID,a){return new IFC2X3.IfcPropertySetDefinition(ID,a[0],a[1],a[2],a[3]);},3650150729:function _(ID,a){return new IFC2X3.IfcPropertySingleValue(ID,a[0],a[1],a[2],a[3]);},110355661:function _(ID,a){return new IFC2X3.IfcPropertyTableValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3615266464:function _(ID,a){return new IFC2X3.IfcRectangleProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},3413951693:function _(ID,a){return new IFC2X3.IfcRegularTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3765753017:function _(ID,a){return new IFC2X3.IfcReinforcementDefinitionProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},478536968:function _(ID,a){return new IFC2X3.IfcRelationship(ID,a[0],a[1],a[2],a[3]);},2778083089:function _(ID,a){return new IFC2X3.IfcRoundedRectangleProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1509187699:function _(ID,a){return new IFC2X3.IfcSectionedSpine(ID,a[0],a[1],a[2]);},2411513650:function _(ID,a){return new IFC2X3.IfcServiceLifeFactor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4124623270:function _(ID,a){return new IFC2X3.IfcShellBasedSurfaceModel(ID,a[0]);},2609359061:function _(ID,a){return new IFC2X3.IfcSlippageConnectionCondition(ID,a[0],a[1],a[2],a[3]);},723233188:function _(ID,_25){return new IFC2X3.IfcSolidModel(ID);},2485662743:function _(ID,a){return new IFC2X3.IfcSoundProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1202362311:function _(ID,a){return new IFC2X3.IfcSoundValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},390701378:function _(ID,a){return new IFC2X3.IfcSpaceThermalLoadProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1595516126:function _(ID,a){return new IFC2X3.IfcStructuralLoadLinearForce(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2668620305:function _(ID,a){return new IFC2X3.IfcStructuralLoadPlanarForce(ID,a[0],a[1],a[2],a[3]);},2473145415:function _(ID,a){return new IFC2X3.IfcStructuralLoadSingleDisplacement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1973038258:function _(ID,a){return new IFC2X3.IfcStructuralLoadSingleDisplacementDistortion(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1597423693:function _(ID,a){return new IFC2X3.IfcStructuralLoadSingleForce(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1190533807:function _(ID,a){return new IFC2X3.IfcStructuralLoadSingleForceWarping(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3843319758:function _(ID,a){return new IFC2X3.IfcStructuralProfileProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19],a[20],a[21],a[22]);},3653947884:function _(ID,a){return new IFC2X3.IfcStructuralSteelProfileProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19],a[20],a[21],a[22],a[23],a[24],a[25],a[26]);},2233826070:function _(ID,a){return new IFC2X3.IfcSubedge(ID,a[0],a[1],a[2]);},2513912981:function _(ID,_26){return new IFC2X3.IfcSurface(ID);},1878645084:function _(ID,a){return new IFC2X3.IfcSurfaceStyleRendering(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2247615214:function _(ID,a){return new IFC2X3.IfcSweptAreaSolid(ID,a[0],a[1]);},1260650574:function _(ID,a){return new IFC2X3.IfcSweptDiskSolid(ID,a[0],a[1],a[2],a[3],a[4]);},230924584:function _(ID,a){return new IFC2X3.IfcSweptSurface(ID,a[0],a[1]);},3071757647:function _(ID,a){return new IFC2X3.IfcTShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},3028897424:function _(ID,a){return new IFC2X3.IfcTerminatorSymbol(ID,a[0],a[1],a[2],a[3]);},4282788508:function _(ID,a){return new IFC2X3.IfcTextLiteral(ID,a[0],a[1],a[2]);},3124975700:function _(ID,a){return new IFC2X3.IfcTextLiteralWithExtent(ID,a[0],a[1],a[2],a[3],a[4]);},2715220739:function _(ID,a){return new IFC2X3.IfcTrapeziumProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1345879162:function _(ID,a){return new IFC2X3.IfcTwoDirectionRepeatFactor(ID,a[0],a[1]);},1628702193:function _(ID,a){return new IFC2X3.IfcTypeObject(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2347495698:function _(ID,a){return new IFC2X3.IfcTypeProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},427810014:function _(ID,a){return new IFC2X3.IfcUShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1417489154:function _(ID,a){return new IFC2X3.IfcVector(ID,a[0],a[1]);},2759199220:function _(ID,a){return new IFC2X3.IfcVertexLoop(ID,a[0]);},336235671:function _(ID,a){return new IFC2X3.IfcWindowLiningProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},512836454:function _(ID,a){return new IFC2X3.IfcWindowPanelProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1299126871:function _(ID,a){return new IFC2X3.IfcWindowStyle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2543172580:function _(ID,a){return new IFC2X3.IfcZShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3288037868:function _(ID,a){return new IFC2X3.IfcAnnotationCurveOccurrence(ID,a[0],a[1],a[2]);},669184980:function _(ID,a){return new IFC2X3.IfcAnnotationFillArea(ID,a[0],a[1]);},2265737646:function _(ID,a){return new IFC2X3.IfcAnnotationFillAreaOccurrence(ID,a[0],a[1],a[2],a[3],a[4]);},1302238472:function _(ID,a){return new IFC2X3.IfcAnnotationSurface(ID,a[0],a[1]);},4261334040:function _(ID,a){return new IFC2X3.IfcAxis1Placement(ID,a[0],a[1]);},3125803723:function _(ID,a){return new IFC2X3.IfcAxis2Placement2D(ID,a[0],a[1]);},2740243338:function _(ID,a){return new IFC2X3.IfcAxis2Placement3D(ID,a[0],a[1],a[2]);},2736907675:function _(ID,a){return new IFC2X3.IfcBooleanResult(ID,a[0],a[1],a[2]);},4182860854:function _(ID,_27){return new IFC2X3.IfcBoundedSurface(ID);},2581212453:function _(ID,a){return new IFC2X3.IfcBoundingBox(ID,a[0],a[1],a[2],a[3]);},2713105998:function _(ID,a){return new IFC2X3.IfcBoxedHalfSpace(ID,a[0],a[1],a[2]);},2898889636:function _(ID,a){return new IFC2X3.IfcCShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1123145078:function _(ID,a){return new IFC2X3.IfcCartesianPoint(ID,a[0]);},59481748:function _(ID,a){return new IFC2X3.IfcCartesianTransformationOperator(ID,a[0],a[1],a[2],a[3]);},3749851601:function _(ID,a){return new IFC2X3.IfcCartesianTransformationOperator2D(ID,a[0],a[1],a[2],a[3]);},3486308946:function _(ID,a){return new IFC2X3.IfcCartesianTransformationOperator2DnonUniform(ID,a[0],a[1],a[2],a[3],a[4]);},3331915920:function _(ID,a){return new IFC2X3.IfcCartesianTransformationOperator3D(ID,a[0],a[1],a[2],a[3],a[4]);},1416205885:function _(ID,a){return new IFC2X3.IfcCartesianTransformationOperator3DnonUniform(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1383045692:function _(ID,a){return new IFC2X3.IfcCircleProfileDef(ID,a[0],a[1],a[2],a[3]);},2205249479:function _(ID,a){return new IFC2X3.IfcClosedShell(ID,a[0]);},2485617015:function _(ID,a){return new IFC2X3.IfcCompositeCurveSegment(ID,a[0],a[1],a[2]);},4133800736:function _(ID,a){return new IFC2X3.IfcCraneRailAShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14]);},194851669:function _(ID,a){return new IFC2X3.IfcCraneRailFShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2506170314:function _(ID,a){return new IFC2X3.IfcCsgPrimitive3D(ID,a[0]);},2147822146:function _(ID,a){return new IFC2X3.IfcCsgSolid(ID,a[0]);},2601014836:function _(ID,_28){return new IFC2X3.IfcCurve(ID);},2827736869:function _(ID,a){return new IFC2X3.IfcCurveBoundedPlane(ID,a[0],a[1],a[2]);},693772133:function _(ID,a){return new IFC2X3.IfcDefinedSymbol(ID,a[0],a[1]);},606661476:function _(ID,a){return new IFC2X3.IfcDimensionCurve(ID,a[0],a[1],a[2]);},4054601972:function _(ID,a){return new IFC2X3.IfcDimensionCurveTerminator(ID,a[0],a[1],a[2],a[3],a[4]);},32440307:function _(ID,a){return new IFC2X3.IfcDirection(ID,a[0]);},2963535650:function _(ID,a){return new IFC2X3.IfcDoorLiningProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14]);},1714330368:function _(ID,a){return new IFC2X3.IfcDoorPanelProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},526551008:function _(ID,a){return new IFC2X3.IfcDoorStyle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},3073041342:function _(ID,a){return new IFC2X3.IfcDraughtingCallout(ID,a[0]);},445594917:function _(ID,a){return new IFC2X3.IfcDraughtingPreDefinedColour(ID,a[0]);},4006246654:function _(ID,a){return new IFC2X3.IfcDraughtingPreDefinedCurveFont(ID,a[0]);},1472233963:function _(ID,a){return new IFC2X3.IfcEdgeLoop(ID,a[0]);},1883228015:function _(ID,a){return new IFC2X3.IfcElementQuantity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},339256511:function _(ID,a){return new IFC2X3.IfcElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2777663545:function _(ID,a){return new IFC2X3.IfcElementarySurface(ID,a[0]);},2835456948:function _(ID,a){return new IFC2X3.IfcEllipseProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},80994333:function _(ID,a){return new IFC2X3.IfcEnergyProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},477187591:function _(ID,a){return new IFC2X3.IfcExtrudedAreaSolid(ID,a[0],a[1],a[2],a[3]);},2047409740:function _(ID,a){return new IFC2X3.IfcFaceBasedSurfaceModel(ID,a[0]);},374418227:function _(ID,a){return new IFC2X3.IfcFillAreaStyleHatching(ID,a[0],a[1],a[2],a[3],a[4]);},4203026998:function _(ID,a){return new IFC2X3.IfcFillAreaStyleTileSymbolWithStyle(ID,a[0]);},315944413:function _(ID,a){return new IFC2X3.IfcFillAreaStyleTiles(ID,a[0],a[1],a[2]);},3455213021:function _(ID,a){return new IFC2X3.IfcFluidFlowProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18]);},4238390223:function _(ID,a){return new IFC2X3.IfcFurnishingElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1268542332:function _(ID,a){return new IFC2X3.IfcFurnitureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},987898635:function _(ID,a){return new IFC2X3.IfcGeometricCurveSet(ID,a[0]);},1484403080:function _(ID,a){return new IFC2X3.IfcIShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},572779678:function _(ID,a){return new IFC2X3.IfcLShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1281925730:function _(ID,a){return new IFC2X3.IfcLine(ID,a[0],a[1]);},1425443689:function _(ID,a){return new IFC2X3.IfcManifoldSolidBrep(ID,a[0]);},3888040117:function _(ID,a){return new IFC2X3.IfcObject(ID,a[0],a[1],a[2],a[3],a[4]);},3388369263:function _(ID,a){return new IFC2X3.IfcOffsetCurve2D(ID,a[0],a[1],a[2]);},3505215534:function _(ID,a){return new IFC2X3.IfcOffsetCurve3D(ID,a[0],a[1],a[2],a[3]);},3566463478:function _(ID,a){return new IFC2X3.IfcPermeableCoveringProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},603570806:function _(ID,a){return new IFC2X3.IfcPlanarBox(ID,a[0],a[1],a[2]);},220341763:function _(ID,a){return new IFC2X3.IfcPlane(ID,a[0]);},2945172077:function _(ID,a){return new IFC2X3.IfcProcess(ID,a[0],a[1],a[2],a[3],a[4]);},4208778838:function _(ID,a){return new IFC2X3.IfcProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},103090709:function _(ID,a){return new IFC2X3.IfcProject(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4194566429:function _(ID,a){return new IFC2X3.IfcProjectionCurve(ID,a[0],a[1],a[2]);},1451395588:function _(ID,a){return new IFC2X3.IfcPropertySet(ID,a[0],a[1],a[2],a[3],a[4]);},3219374653:function _(ID,a){return new IFC2X3.IfcProxy(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2770003689:function _(ID,a){return new IFC2X3.IfcRectangleHollowProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2798486643:function _(ID,a){return new IFC2X3.IfcRectangularPyramid(ID,a[0],a[1],a[2],a[3]);},3454111270:function _(ID,a){return new IFC2X3.IfcRectangularTrimmedSurface(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3939117080:function _(ID,a){return new IFC2X3.IfcRelAssigns(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1683148259:function _(ID,a){return new IFC2X3.IfcRelAssignsToActor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2495723537:function _(ID,a){return new IFC2X3.IfcRelAssignsToControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1307041759:function _(ID,a){return new IFC2X3.IfcRelAssignsToGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},4278684876:function _(ID,a){return new IFC2X3.IfcRelAssignsToProcess(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2857406711:function _(ID,a){return new IFC2X3.IfcRelAssignsToProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3372526763:function _(ID,a){return new IFC2X3.IfcRelAssignsToProjectOrder(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},205026976:function _(ID,a){return new IFC2X3.IfcRelAssignsToResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1865459582:function _(ID,a){return new IFC2X3.IfcRelAssociates(ID,a[0],a[1],a[2],a[3],a[4]);},1327628568:function _(ID,a){return new IFC2X3.IfcRelAssociatesAppliedValue(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4095574036:function _(ID,a){return new IFC2X3.IfcRelAssociatesApproval(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},919958153:function _(ID,a){return new IFC2X3.IfcRelAssociatesClassification(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2728634034:function _(ID,a){return new IFC2X3.IfcRelAssociatesConstraint(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},982818633:function _(ID,a){return new IFC2X3.IfcRelAssociatesDocument(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3840914261:function _(ID,a){return new IFC2X3.IfcRelAssociatesLibrary(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2655215786:function _(ID,a){return new IFC2X3.IfcRelAssociatesMaterial(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2851387026:function _(ID,a){return new IFC2X3.IfcRelAssociatesProfileProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},826625072:function _(ID,a){return new IFC2X3.IfcRelConnects(ID,a[0],a[1],a[2],a[3]);},1204542856:function _(ID,a){return new IFC2X3.IfcRelConnectsElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3945020480:function _(ID,a){return new IFC2X3.IfcRelConnectsPathElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4201705270:function _(ID,a){return new IFC2X3.IfcRelConnectsPortToElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3190031847:function _(ID,a){return new IFC2X3.IfcRelConnectsPorts(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2127690289:function _(ID,a){return new IFC2X3.IfcRelConnectsStructuralActivity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3912681535:function _(ID,a){return new IFC2X3.IfcRelConnectsStructuralElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1638771189:function _(ID,a){return new IFC2X3.IfcRelConnectsStructuralMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},504942748:function _(ID,a){return new IFC2X3.IfcRelConnectsWithEccentricity(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3678494232:function _(ID,a){return new IFC2X3.IfcRelConnectsWithRealizingElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3242617779:function _(ID,a){return new IFC2X3.IfcRelContainedInSpatialStructure(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},886880790:function _(ID,a){return new IFC2X3.IfcRelCoversBldgElements(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2802773753:function _(ID,a){return new IFC2X3.IfcRelCoversSpaces(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2551354335:function _(ID,a){return new IFC2X3.IfcRelDecomposes(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},693640335:function _(ID,a){return new IFC2X3.IfcRelDefines(ID,a[0],a[1],a[2],a[3],a[4]);},4186316022:function _(ID,a){return new IFC2X3.IfcRelDefinesByProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},781010003:function _(ID,a){return new IFC2X3.IfcRelDefinesByType(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3940055652:function _(ID,a){return new IFC2X3.IfcRelFillsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},279856033:function _(ID,a){return new IFC2X3.IfcRelFlowControlElements(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4189434867:function _(ID,a){return new IFC2X3.IfcRelInteractionRequirements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3268803585:function _(ID,a){return new IFC2X3.IfcRelNests(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2051452291:function _(ID,a){return new IFC2X3.IfcRelOccupiesSpaces(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},202636808:function _(ID,a){return new IFC2X3.IfcRelOverridesProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},750771296:function _(ID,a){return new IFC2X3.IfcRelProjectsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1245217292:function _(ID,a){return new IFC2X3.IfcRelReferencedInSpatialStructure(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1058617721:function _(ID,a){return new IFC2X3.IfcRelSchedulesCostItems(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},4122056220:function _(ID,a){return new IFC2X3.IfcRelSequence(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},366585022:function _(ID,a){return new IFC2X3.IfcRelServicesBuildings(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3451746338:function _(ID,a){return new IFC2X3.IfcRelSpaceBoundary(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1401173127:function _(ID,a){return new IFC2X3.IfcRelVoidsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2914609552:function _(ID,a){return new IFC2X3.IfcResource(ID,a[0],a[1],a[2],a[3],a[4]);},1856042241:function _(ID,a){return new IFC2X3.IfcRevolvedAreaSolid(ID,a[0],a[1],a[2],a[3]);},4158566097:function _(ID,a){return new IFC2X3.IfcRightCircularCone(ID,a[0],a[1],a[2]);},3626867408:function _(ID,a){return new IFC2X3.IfcRightCircularCylinder(ID,a[0],a[1],a[2]);},2706606064:function _(ID,a){return new IFC2X3.IfcSpatialStructureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3893378262:function _(ID,a){return new IFC2X3.IfcSpatialStructureElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},451544542:function _(ID,a){return new IFC2X3.IfcSphere(ID,a[0],a[1]);},3544373492:function _(ID,a){return new IFC2X3.IfcStructuralActivity(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3136571912:function _(ID,a){return new IFC2X3.IfcStructuralItem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},530289379:function _(ID,a){return new IFC2X3.IfcStructuralMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3689010777:function _(ID,a){return new IFC2X3.IfcStructuralReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3979015343:function _(ID,a){return new IFC2X3.IfcStructuralSurfaceMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2218152070:function _(ID,a){return new IFC2X3.IfcStructuralSurfaceMemberVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4070609034:function _(ID,a){return new IFC2X3.IfcStructuredDimensionCallout(ID,a[0]);},2028607225:function _(ID,a){return new IFC2X3.IfcSurfaceCurveSweptAreaSolid(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2809605785:function _(ID,a){return new IFC2X3.IfcSurfaceOfLinearExtrusion(ID,a[0],a[1],a[2],a[3]);},4124788165:function _(ID,a){return new IFC2X3.IfcSurfaceOfRevolution(ID,a[0],a[1],a[2]);},1580310250:function _(ID,a){return new IFC2X3.IfcSystemFurnitureElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3473067441:function _(ID,a){return new IFC2X3.IfcTask(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2097647324:function _(ID,a){return new IFC2X3.IfcTransportElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2296667514:function _(ID,a){return new IFC2X3.IfcActor(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1674181508:function _(ID,a){return new IFC2X3.IfcAnnotation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3207858831:function _(ID,a){return new IFC2X3.IfcAsymmetricIShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1334484129:function _(ID,a){return new IFC2X3.IfcBlock(ID,a[0],a[1],a[2],a[3]);},3649129432:function _(ID,a){return new IFC2X3.IfcBooleanClippingResult(ID,a[0],a[1],a[2]);},1260505505:function _(ID,_29){return new IFC2X3.IfcBoundedCurve(ID);},4031249490:function _(ID,a){return new IFC2X3.IfcBuilding(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1950629157:function _(ID,a){return new IFC2X3.IfcBuildingElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3124254112:function _(ID,a){return new IFC2X3.IfcBuildingStorey(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2937912522:function _(ID,a){return new IFC2X3.IfcCircleHollowProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},300633059:function _(ID,a){return new IFC2X3.IfcColumnType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3732776249:function _(ID,a){return new IFC2X3.IfcCompositeCurve(ID,a[0],a[1]);},2510884976:function _(ID,a){return new IFC2X3.IfcConic(ID,a[0]);},2559216714:function _(ID,a){return new IFC2X3.IfcConstructionResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3293443760:function _(ID,a){return new IFC2X3.IfcControl(ID,a[0],a[1],a[2],a[3],a[4]);},3895139033:function _(ID,a){return new IFC2X3.IfcCostItem(ID,a[0],a[1],a[2],a[3],a[4]);},1419761937:function _(ID,a){return new IFC2X3.IfcCostSchedule(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},1916426348:function _(ID,a){return new IFC2X3.IfcCoveringType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3295246426:function _(ID,a){return new IFC2X3.IfcCrewResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1457835157:function _(ID,a){return new IFC2X3.IfcCurtainWallType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},681481545:function _(ID,a){return new IFC2X3.IfcDimensionCurveDirectedCallout(ID,a[0]);},3256556792:function _(ID,a){return new IFC2X3.IfcDistributionElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3849074793:function _(ID,a){return new IFC2X3.IfcDistributionFlowElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},360485395:function _(ID,a){return new IFC2X3.IfcElectricalBaseProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1758889154:function _(ID,a){return new IFC2X3.IfcElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4123344466:function _(ID,a){return new IFC2X3.IfcElementAssembly(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1623761950:function _(ID,a){return new IFC2X3.IfcElementComponent(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2590856083:function _(ID,a){return new IFC2X3.IfcElementComponentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1704287377:function _(ID,a){return new IFC2X3.IfcEllipse(ID,a[0],a[1],a[2]);},2107101300:function _(ID,a){return new IFC2X3.IfcEnergyConversionDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1962604670:function _(ID,a){return new IFC2X3.IfcEquipmentElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3272907226:function _(ID,a){return new IFC2X3.IfcEquipmentStandard(ID,a[0],a[1],a[2],a[3],a[4]);},3174744832:function _(ID,a){return new IFC2X3.IfcEvaporativeCoolerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3390157468:function _(ID,a){return new IFC2X3.IfcEvaporatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},807026263:function _(ID,a){return new IFC2X3.IfcFacetedBrep(ID,a[0]);},3737207727:function _(ID,a){return new IFC2X3.IfcFacetedBrepWithVoids(ID,a[0],a[1]);},647756555:function _(ID,a){return new IFC2X3.IfcFastener(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2489546625:function _(ID,a){return new IFC2X3.IfcFastenerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2827207264:function _(ID,a){return new IFC2X3.IfcFeatureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2143335405:function _(ID,a){return new IFC2X3.IfcFeatureElementAddition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1287392070:function _(ID,a){return new IFC2X3.IfcFeatureElementSubtraction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3907093117:function _(ID,a){return new IFC2X3.IfcFlowControllerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3198132628:function _(ID,a){return new IFC2X3.IfcFlowFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3815607619:function _(ID,a){return new IFC2X3.IfcFlowMeterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1482959167:function _(ID,a){return new IFC2X3.IfcFlowMovingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1834744321:function _(ID,a){return new IFC2X3.IfcFlowSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1339347760:function _(ID,a){return new IFC2X3.IfcFlowStorageDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2297155007:function _(ID,a){return new IFC2X3.IfcFlowTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3009222698:function _(ID,a){return new IFC2X3.IfcFlowTreatmentDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},263784265:function _(ID,a){return new IFC2X3.IfcFurnishingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},814719939:function _(ID,a){return new IFC2X3.IfcFurnitureStandard(ID,a[0],a[1],a[2],a[3],a[4]);},200128114:function _(ID,a){return new IFC2X3.IfcGasTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3009204131:function _(ID,a){return new IFC2X3.IfcGrid(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2706460486:function _(ID,a){return new IFC2X3.IfcGroup(ID,a[0],a[1],a[2],a[3],a[4]);},1251058090:function _(ID,a){return new IFC2X3.IfcHeatExchangerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1806887404:function _(ID,a){return new IFC2X3.IfcHumidifierType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2391368822:function _(ID,a){return new IFC2X3.IfcInventory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4288270099:function _(ID,a){return new IFC2X3.IfcJunctionBoxType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3827777499:function _(ID,a){return new IFC2X3.IfcLaborResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1051575348:function _(ID,a){return new IFC2X3.IfcLampType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1161773419:function _(ID,a){return new IFC2X3.IfcLightFixtureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2506943328:function _(ID,a){return new IFC2X3.IfcLinearDimension(ID,a[0]);},377706215:function _(ID,a){return new IFC2X3.IfcMechanicalFastener(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2108223431:function _(ID,a){return new IFC2X3.IfcMechanicalFastenerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3181161470:function _(ID,a){return new IFC2X3.IfcMemberType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},977012517:function _(ID,a){return new IFC2X3.IfcMotorConnectionType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1916936684:function _(ID,a){return new IFC2X3.IfcMove(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},4143007308:function _(ID,a){return new IFC2X3.IfcOccupant(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3588315303:function _(ID,a){return new IFC2X3.IfcOpeningElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3425660407:function _(ID,a){return new IFC2X3.IfcOrderAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2837617999:function _(ID,a){return new IFC2X3.IfcOutletType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2382730787:function _(ID,a){return new IFC2X3.IfcPerformanceHistory(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3327091369:function _(ID,a){return new IFC2X3.IfcPermit(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},804291784:function _(ID,a){return new IFC2X3.IfcPipeFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4231323485:function _(ID,a){return new IFC2X3.IfcPipeSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4017108033:function _(ID,a){return new IFC2X3.IfcPlateType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3724593414:function _(ID,a){return new IFC2X3.IfcPolyline(ID,a[0]);},3740093272:function _(ID,a){return new IFC2X3.IfcPort(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2744685151:function _(ID,a){return new IFC2X3.IfcProcedure(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2904328755:function _(ID,a){return new IFC2X3.IfcProjectOrder(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3642467123:function _(ID,a){return new IFC2X3.IfcProjectOrderRecord(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3651124850:function _(ID,a){return new IFC2X3.IfcProjectionElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1842657554:function _(ID,a){return new IFC2X3.IfcProtectiveDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2250791053:function _(ID,a){return new IFC2X3.IfcPumpType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3248260540:function _(ID,a){return new IFC2X3.IfcRadiusDimension(ID,a[0]);},2893384427:function _(ID,a){return new IFC2X3.IfcRailingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2324767716:function _(ID,a){return new IFC2X3.IfcRampFlightType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},160246688:function _(ID,a){return new IFC2X3.IfcRelAggregates(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2863920197:function _(ID,a){return new IFC2X3.IfcRelAssignsTasks(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1768891740:function _(ID,a){return new IFC2X3.IfcSanitaryTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3517283431:function _(ID,a){return new IFC2X3.IfcScheduleTimeControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19],a[20],a[21],a[22]);},4105383287:function _(ID,a){return new IFC2X3.IfcServiceLife(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},4097777520:function _(ID,a){return new IFC2X3.IfcSite(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},2533589738:function _(ID,a){return new IFC2X3.IfcSlabType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3856911033:function _(ID,a){return new IFC2X3.IfcSpace(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1305183839:function _(ID,a){return new IFC2X3.IfcSpaceHeaterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},652456506:function _(ID,a){return new IFC2X3.IfcSpaceProgram(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3812236995:function _(ID,a){return new IFC2X3.IfcSpaceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3112655638:function _(ID,a){return new IFC2X3.IfcStackTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1039846685:function _(ID,a){return new IFC2X3.IfcStairFlightType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},682877961:function _(ID,a){return new IFC2X3.IfcStructuralAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1179482911:function _(ID,a){return new IFC2X3.IfcStructuralConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4243806635:function _(ID,a){return new IFC2X3.IfcStructuralCurveConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},214636428:function _(ID,a){return new IFC2X3.IfcStructuralCurveMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2445595289:function _(ID,a){return new IFC2X3.IfcStructuralCurveMemberVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1807405624:function _(ID,a){return new IFC2X3.IfcStructuralLinearAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1721250024:function _(ID,a){return new IFC2X3.IfcStructuralLinearActionVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1252848954:function _(ID,a){return new IFC2X3.IfcStructuralLoadGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1621171031:function _(ID,a){return new IFC2X3.IfcStructuralPlanarAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},3987759626:function _(ID,a){return new IFC2X3.IfcStructuralPlanarActionVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},2082059205:function _(ID,a){return new IFC2X3.IfcStructuralPointAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},734778138:function _(ID,a){return new IFC2X3.IfcStructuralPointConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1235345126:function _(ID,a){return new IFC2X3.IfcStructuralPointReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2986769608:function _(ID,a){return new IFC2X3.IfcStructuralResultGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1975003073:function _(ID,a){return new IFC2X3.IfcStructuralSurfaceConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},148013059:function _(ID,a){return new IFC2X3.IfcSubContractResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2315554128:function _(ID,a){return new IFC2X3.IfcSwitchingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2254336722:function _(ID,a){return new IFC2X3.IfcSystem(ID,a[0],a[1],a[2],a[3],a[4]);},5716631:function _(ID,a){return new IFC2X3.IfcTankType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1637806684:function _(ID,a){return new IFC2X3.IfcTimeSeriesSchedule(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1692211062:function _(ID,a){return new IFC2X3.IfcTransformerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1620046519:function _(ID,a){return new IFC2X3.IfcTransportElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3593883385:function _(ID,a){return new IFC2X3.IfcTrimmedCurve(ID,a[0],a[1],a[2],a[3],a[4]);},1600972822:function _(ID,a){return new IFC2X3.IfcTubeBundleType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1911125066:function _(ID,a){return new IFC2X3.IfcUnitaryEquipmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},728799441:function _(ID,a){return new IFC2X3.IfcValveType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2769231204:function _(ID,a){return new IFC2X3.IfcVirtualElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1898987631:function _(ID,a){return new IFC2X3.IfcWallType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1133259667:function _(ID,a){return new IFC2X3.IfcWasteTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1028945134:function _(ID,a){return new IFC2X3.IfcWorkControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14]);},4218914973:function _(ID,a){return new IFC2X3.IfcWorkPlan(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14]);},3342526732:function _(ID,a){return new IFC2X3.IfcWorkSchedule(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14]);},1033361043:function _(ID,a){return new IFC2X3.IfcZone(ID,a[0],a[1],a[2],a[3],a[4]);},1213861670:function _(ID,a){return new IFC2X3.Ifc2DCompositeCurve(ID,a[0],a[1]);},3821786052:function _(ID,a){return new IFC2X3.IfcActionRequest(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1411407467:function _(ID,a){return new IFC2X3.IfcAirTerminalBoxType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3352864051:function _(ID,a){return new IFC2X3.IfcAirTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1871374353:function _(ID,a){return new IFC2X3.IfcAirToAirHeatRecoveryType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2470393545:function _(ID,a){return new IFC2X3.IfcAngularDimension(ID,a[0]);},3460190687:function _(ID,a){return new IFC2X3.IfcAsset(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1967976161:function _(ID,a){return new IFC2X3.IfcBSplineCurve(ID,a[0],a[1],a[2],a[3],a[4]);},819618141:function _(ID,a){return new IFC2X3.IfcBeamType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1916977116:function _(ID,a){return new IFC2X3.IfcBezierCurve(ID,a[0],a[1],a[2],a[3],a[4]);},231477066:function _(ID,a){return new IFC2X3.IfcBoilerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3299480353:function _(ID,a){return new IFC2X3.IfcBuildingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},52481810:function _(ID,a){return new IFC2X3.IfcBuildingElementComponent(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2979338954:function _(ID,a){return new IFC2X3.IfcBuildingElementPart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1095909175:function _(ID,a){return new IFC2X3.IfcBuildingElementProxy(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1909888760:function _(ID,a){return new IFC2X3.IfcBuildingElementProxyType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},395041908:function _(ID,a){return new IFC2X3.IfcCableCarrierFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3293546465:function _(ID,a){return new IFC2X3.IfcCableCarrierSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1285652485:function _(ID,a){return new IFC2X3.IfcCableSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2951183804:function _(ID,a){return new IFC2X3.IfcChillerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2611217952:function _(ID,a){return new IFC2X3.IfcCircle(ID,a[0],a[1]);},2301859152:function _(ID,a){return new IFC2X3.IfcCoilType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},843113511:function _(ID,a){return new IFC2X3.IfcColumn(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3850581409:function _(ID,a){return new IFC2X3.IfcCompressorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2816379211:function _(ID,a){return new IFC2X3.IfcCondenserType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2188551683:function _(ID,a){return new IFC2X3.IfcCondition(ID,a[0],a[1],a[2],a[3],a[4]);},1163958913:function _(ID,a){return new IFC2X3.IfcConditionCriterion(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3898045240:function _(ID,a){return new IFC2X3.IfcConstructionEquipmentResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1060000209:function _(ID,a){return new IFC2X3.IfcConstructionMaterialResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},488727124:function _(ID,a){return new IFC2X3.IfcConstructionProductResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},335055490:function _(ID,a){return new IFC2X3.IfcCooledBeamType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2954562838:function _(ID,a){return new IFC2X3.IfcCoolingTowerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1973544240:function _(ID,a){return new IFC2X3.IfcCovering(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3495092785:function _(ID,a){return new IFC2X3.IfcCurtainWall(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3961806047:function _(ID,a){return new IFC2X3.IfcDamperType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4147604152:function _(ID,a){return new IFC2X3.IfcDiameterDimension(ID,a[0]);},1335981549:function _(ID,a){return new IFC2X3.IfcDiscreteAccessory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2635815018:function _(ID,a){return new IFC2X3.IfcDiscreteAccessoryType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1599208980:function _(ID,a){return new IFC2X3.IfcDistributionChamberElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2063403501:function _(ID,a){return new IFC2X3.IfcDistributionControlElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1945004755:function _(ID,a){return new IFC2X3.IfcDistributionElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3040386961:function _(ID,a){return new IFC2X3.IfcDistributionFlowElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3041715199:function _(ID,a){return new IFC2X3.IfcDistributionPort(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},395920057:function _(ID,a){return new IFC2X3.IfcDoor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},869906466:function _(ID,a){return new IFC2X3.IfcDuctFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3760055223:function _(ID,a){return new IFC2X3.IfcDuctSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2030761528:function _(ID,a){return new IFC2X3.IfcDuctSilencerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},855621170:function _(ID,a){return new IFC2X3.IfcEdgeFeature(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},663422040:function _(ID,a){return new IFC2X3.IfcElectricApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3277789161:function _(ID,a){return new IFC2X3.IfcElectricFlowStorageDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1534661035:function _(ID,a){return new IFC2X3.IfcElectricGeneratorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1365060375:function _(ID,a){return new IFC2X3.IfcElectricHeaterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1217240411:function _(ID,a){return new IFC2X3.IfcElectricMotorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},712377611:function _(ID,a){return new IFC2X3.IfcElectricTimeControlType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1634875225:function _(ID,a){return new IFC2X3.IfcElectricalCircuit(ID,a[0],a[1],a[2],a[3],a[4]);},857184966:function _(ID,a){return new IFC2X3.IfcElectricalElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1658829314:function _(ID,a){return new IFC2X3.IfcEnergyConversionDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},346874300:function _(ID,a){return new IFC2X3.IfcFanType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1810631287:function _(ID,a){return new IFC2X3.IfcFilterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4222183408:function _(ID,a){return new IFC2X3.IfcFireSuppressionTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2058353004:function _(ID,a){return new IFC2X3.IfcFlowController(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4278956645:function _(ID,a){return new IFC2X3.IfcFlowFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4037862832:function _(ID,a){return new IFC2X3.IfcFlowInstrumentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3132237377:function _(ID,a){return new IFC2X3.IfcFlowMovingDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},987401354:function _(ID,a){return new IFC2X3.IfcFlowSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},707683696:function _(ID,a){return new IFC2X3.IfcFlowStorageDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2223149337:function _(ID,a){return new IFC2X3.IfcFlowTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3508470533:function _(ID,a){return new IFC2X3.IfcFlowTreatmentDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},900683007:function _(ID,a){return new IFC2X3.IfcFooting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1073191201:function _(ID,a){return new IFC2X3.IfcMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1687234759:function _(ID,a){return new IFC2X3.IfcPile(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3171933400:function _(ID,a){return new IFC2X3.IfcPlate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2262370178:function _(ID,a){return new IFC2X3.IfcRailing(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3024970846:function _(ID,a){return new IFC2X3.IfcRamp(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3283111854:function _(ID,a){return new IFC2X3.IfcRampFlight(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3055160366:function _(ID,a){return new IFC2X3.IfcRationalBezierCurve(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3027567501:function _(ID,a){return new IFC2X3.IfcReinforcingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2320036040:function _(ID,a){return new IFC2X3.IfcReinforcingMesh(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},2016517767:function _(ID,a){return new IFC2X3.IfcRoof(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1376911519:function _(ID,a){return new IFC2X3.IfcRoundedEdgeFeature(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1783015770:function _(ID,a){return new IFC2X3.IfcSensorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1529196076:function _(ID,a){return new IFC2X3.IfcSlab(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},331165859:function _(ID,a){return new IFC2X3.IfcStair(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4252922144:function _(ID,a){return new IFC2X3.IfcStairFlight(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2515109513:function _(ID,a){return new IFC2X3.IfcStructuralAnalysisModel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3824725483:function _(ID,a){return new IFC2X3.IfcTendon(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},2347447852:function _(ID,a){return new IFC2X3.IfcTendonAnchor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3313531582:function _(ID,a){return new IFC2X3.IfcVibrationIsolatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2391406946:function _(ID,a){return new IFC2X3.IfcWall(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3512223829:function _(ID,a){return new IFC2X3.IfcWallStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3304561284:function _(ID,a){return new IFC2X3.IfcWindow(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2874132201:function _(ID,a){return new IFC2X3.IfcActuatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3001207471:function _(ID,a){return new IFC2X3.IfcAlarmType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},753842376:function _(ID,a){return new IFC2X3.IfcBeam(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2454782716:function _(ID,a){return new IFC2X3.IfcChamferEdgeFeature(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},578613899:function _(ID,a){return new IFC2X3.IfcControllerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1052013943:function _(ID,a){return new IFC2X3.IfcDistributionChamberElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1062813311:function _(ID,a){return new IFC2X3.IfcDistributionControlElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3700593921:function _(ID,a){return new IFC2X3.IfcElectricDistributionPoint(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},979691226:function _(ID,a){return new IFC2X3.IfcReinforcingBar(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);}};ToRawLineData[1]={3630933823:function _(i){return[i.Role,i.UserDefinedRole,i.Description];},618182010:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose];},639542469:function _(i){return[i.ApplicationDeveloper,i.Version,i.ApplicationFullName,i.ApplicationIdentifier];},411424972:function _(i){return[i.Name,i.Description,i.AppliedValue,i.UnitBasis,i.ApplicableDate,i.FixedUntilDate];},1110488051:function _(i){return[i.ComponentOfTotal,i.Components,i.ArithmeticOperator,i.Name,i.Description];},130549933:function _(i){return[i.Description,i.ApprovalDateTime,i.ApprovalStatus,i.ApprovalLevel,i.ApprovalQualifier,i.Name,i.Identifier];},2080292479:function _(i){return[i.Actor,i.Approval,i.Role];},390851274:function _(i){return[i.ApprovedProperties,i.Approval];},3869604511:function _(i){return[i.RelatedApproval,i.RelatingApproval,i.Description,i.Name];},4037036970:function _(i){return[i.Name];},1560379544:function _(i){return[i.Name,i.LinearStiffnessByLengthX,i.LinearStiffnessByLengthY,i.LinearStiffnessByLengthZ,i.RotationalStiffnessByLengthX,i.RotationalStiffnessByLengthY,i.RotationalStiffnessByLengthZ];},3367102660:function _(i){return[i.Name,i.LinearStiffnessByAreaX,i.LinearStiffnessByAreaY,i.LinearStiffnessByAreaZ];},1387855156:function _(i){return[i.Name,i.LinearStiffnessX,i.LinearStiffnessY,i.LinearStiffnessZ,i.RotationalStiffnessX,i.RotationalStiffnessY,i.RotationalStiffnessZ];},2069777674:function _(i){return[i.Name,i.LinearStiffnessX,i.LinearStiffnessY,i.LinearStiffnessZ,i.RotationalStiffnessX,i.RotationalStiffnessY,i.RotationalStiffnessZ,i.WarpingStiffness];},622194075:function _(i){return[i.DayComponent,i.MonthComponent,i.YearComponent];},747523909:function _(i){return[i.Source,i.Edition,i.EditionDate,i.Name];},1767535486:function _(i){return[i.Notation,i.ItemOf,i.Title];},1098599126:function _(i){return[i.RelatingItem,i.RelatedItems];},938368621:function _(i){return[i.NotationFacets];},3639012971:function _(i){return[i.NotationValue];},3264961684:function _(i){return[i.Name];},2859738748:function _(_30){return[];},2614616156:function _(i){return[i.PointOnRelatingElement,i.PointOnRelatedElement];},4257277454:function _(i){return[i.LocationAtRelatingElement,i.LocationAtRelatedElement,i.ProfileOfPort];},2732653382:function _(i){return[i.SurfaceOnRelatingElement,i.SurfaceOnRelatedElement];},1959218052:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade];},1658513725:function _(i){return[i.Name,i.Description,i.RelatingConstraint,i.RelatedConstraints,i.LogicalAggregator];},613356794:function _(i){return[i.ClassifiedConstraint,i.RelatedClassifications];},347226245:function _(i){return[i.Name,i.Description,i.RelatingConstraint,i.RelatedConstraints];},1065062679:function _(i){return[i.HourOffset,i.MinuteOffset,i.Sense];},602808272:function _(i){return[i.Name,i.Description,i.AppliedValue,i.UnitBasis,i.ApplicableDate,i.FixedUntilDate,i.CostType,i.Condition];},539742890:function _(i){return[i.RelatingMonetaryUnit,i.RelatedMonetaryUnit,i.ExchangeRate,i.RateDateTime,i.RateSource];},1105321065:function _(i){return[i.Name,i.PatternList];},2367409068:function _(i){return[i.Name,i.CurveFont,i.CurveFontScaling];},3510044353:function _(i){return[i.VisibleSegmentLength,i.InvisibleSegmentLength];},1072939445:function _(i){return[i.DateComponent,i.TimeComponent];},1765591967:function _(i){return[i.Elements,i.UnitType,i.UserDefinedType];},1045800335:function _(i){return[i.Unit,i.Exponent];},2949456006:function _(i){return[i.LengthExponent,i.MassExponent,i.TimeExponent,i.ElectricCurrentExponent,i.ThermodynamicTemperatureExponent,i.AmountOfSubstanceExponent,i.LuminousIntensityExponent];},1376555844:function _(i){return[i.FileExtension,i.MimeContentType,i.MimeSubtype];},1154170062:function _(i){return[i.DocumentId,i.Name,i.Description,i.DocumentReferences,i.Purpose,i.IntendedUse,i.Scope,i.Revision,i.DocumentOwner,i.Editors,i.CreationTime,i.LastRevisionTime,i.ElectronicFormat,i.ValidFrom,i.ValidUntil,i.Confidentiality,i.Status];},770865208:function _(i){return[i.RelatingDocument,i.RelatedDocuments,i.RelationshipType];},3796139169:function _(i){return[i.Name,i.Description,i.RelatingDraughtingCallout,i.RelatedDraughtingCallout];},1648886627:function _(i){return[i.Name,i.Description,i.AppliedValue,i.UnitBasis,i.ApplicableDate,i.FixedUntilDate,i.ImpactType,i.Category,i.UserDefinedCategory];},3200245327:function _(i){return[i.Location,i.ItemReference,i.Name];},2242383968:function _(i){return[i.Location,i.ItemReference,i.Name];},1040185647:function _(i){return[i.Location,i.ItemReference,i.Name];},3207319532:function _(i){return[i.Location,i.ItemReference,i.Name];},3548104201:function _(i){return[i.Location,i.ItemReference,i.Name];},852622518:function _(i){var _a;return[i.AxisTag,i.AxisCurve,(_a=i.SameSense)==null?void 0:_a.toString()];},3020489413:function _(i){return[i.TimeStamp,i.ListValues.map(function(p){return Labelise(p);})];},2655187982:function _(i){return[i.Name,i.Version,i.Publisher,i.VersionDate,i.LibraryReference];},3452421091:function _(i){return[i.Location,i.ItemReference,i.Name];},4162380809:function _(i){return[i.MainPlaneAngle,i.SecondaryPlaneAngle,i.LuminousIntensity];},1566485204:function _(i){return[i.LightDistributionCurve,i.DistributionData];},30780891:function _(i){return[i.HourComponent,i.MinuteComponent,i.SecondComponent,i.Zone,i.DaylightSavingOffset];},1838606355:function _(i){return[i.Name];},1847130766:function _(i){return[i.MaterialClassifications,i.ClassifiedMaterial];},248100487:function _(i){var _a;return[i.Material,i.LayerThickness,(_a=i.IsVentilated)==null?void 0:_a.toString()];},3303938423:function _(i){return[i.MaterialLayers,i.LayerSetName];},1303795690:function _(i){return[i.ForLayerSet,i.LayerSetDirection,i.DirectionSense,i.OffsetFromReferenceLine];},2199411900:function _(i){return[i.Materials];},3265635763:function _(i){return[i.Material];},2597039031:function _(i){return[Labelise(i.ValueComponent),i.UnitComponent];},4256014907:function _(i){return[i.Material,i.DynamicViscosity,i.YoungModulus,i.ShearModulus,i.PoissonRatio,i.ThermalExpansionCoefficient];},677618848:function _(i){return[i.Material,i.DynamicViscosity,i.YoungModulus,i.ShearModulus,i.PoissonRatio,i.ThermalExpansionCoefficient,i.YieldStress,i.UltimateStress,i.UltimateStrain,i.HardeningModule,i.ProportionalStress,i.PlasticStrain,i.Relaxations];},3368373690:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade,i.Benchmark,i.ValueSource,i.DataValue];},2706619895:function _(i){return[i.Currency];},1918398963:function _(i){return[i.Dimensions,i.UnitType];},3701648758:function _(_31){return[];},2251480897:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade,i.BenchmarkValues,i.ResultValues,i.ObjectiveQualifier,i.UserDefinedQualifier];},1227763645:function _(i){return[i.Material,i.VisibleTransmittance,i.SolarTransmittance,i.ThermalIrTransmittance,i.ThermalIrEmissivityBack,i.ThermalIrEmissivityFront,i.VisibleReflectanceBack,i.VisibleReflectanceFront,i.SolarReflectanceFront,i.SolarReflectanceBack];},4251960020:function _(i){return[i.Id,i.Name,i.Description,i.Roles,i.Addresses];},1411181986:function _(i){return[i.Name,i.Description,i.RelatingOrganization,i.RelatedOrganizations];},1207048766:function _(i){return[i.OwningUser,i.OwningApplication,i.State,i.ChangeAction,i.LastModifiedDate,i.LastModifyingUser,i.LastModifyingApplication,i.CreationDate];},2077209135:function _(i){return[i.Id,i.FamilyName,i.GivenName,i.MiddleNames,i.PrefixTitles,i.SuffixTitles,i.Roles,i.Addresses];},101040310:function _(i){return[i.ThePerson,i.TheOrganization,i.Roles];},2483315170:function _(i){return[i.Name,i.Description];},2226359599:function _(i){return[i.Name,i.Description,i.Unit];},3355820592:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose,i.InternalLocation,i.AddressLines,i.PostalBox,i.Town,i.Region,i.PostalCode,i.Country];},3727388367:function _(i){return[i.Name];},990879717:function _(i){return[i.Name];},3213052703:function _(i){return[i.Name];},1775413392:function _(i){return[i.Name];},2022622350:function _(i){return[i.Name,i.Description,i.AssignedItems,i.Identifier];},1304840413:function _(i){return[i.Name,i.Description,i.AssignedItems,i.Identifier,i.LayerOn,i.LayerFrozen,i.LayerBlocked,i.LayerStyles];},3119450353:function _(i){return[i.Name];},2417041796:function _(i){return[i.Styles];},2095639259:function _(i){return[i.Name,i.Description,i.Representations];},2267347899:function _(i){return[i.Material,i.SpecificHeatCapacity,i.N20Content,i.COContent,i.CO2Content];},3958567839:function _(i){return[i.ProfileType,i.ProfileName];},2802850158:function _(i){return[i.ProfileName,i.ProfileDefinition];},2598011224:function _(i){return[i.Name,i.Description];},3896028662:function _(i){return[i.RelatingConstraint,i.RelatedProperties,i.Name,i.Description];},148025276:function _(i){return[i.DependingProperty,i.DependantProperty,i.Name,i.Description,i.Expression];},3710013099:function _(i){return[i.Name,i.EnumerationValues.map(function(p){return Labelise(p);}),i.Unit];},2044713172:function _(i){return[i.Name,i.Description,i.Unit,i.AreaValue];},2093928680:function _(i){return[i.Name,i.Description,i.Unit,i.CountValue];},931644368:function _(i){return[i.Name,i.Description,i.Unit,i.LengthValue];},3252649465:function _(i){return[i.Name,i.Description,i.Unit,i.TimeValue];},2405470396:function _(i){return[i.Name,i.Description,i.Unit,i.VolumeValue];},825690147:function _(i){return[i.Name,i.Description,i.Unit,i.WeightValue];},2692823254:function _(i){return[i.ReferencedDocument,i.ReferencingValues,i.Name,i.Description];},1580146022:function _(i){return[i.TotalCrossSectionArea,i.SteelGrade,i.BarSurface,i.EffectiveDepth,i.NominalBarDiameter,i.BarCount];},1222501353:function _(i){return[i.RelaxationValue,i.InitialStress];},1076942058:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},3377609919:function _(i){return[i.ContextIdentifier,i.ContextType];},3008791417:function _(_32){return[];},1660063152:function _(i){return[i.MappingOrigin,i.MappedRepresentation];},3679540991:function _(i){return[i.ProfileName,i.ProfileDefinition,i.Thickness,i.RibHeight,i.RibWidth,i.RibSpacing,i.Direction];},2341007311:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},448429030:function _(i){return[i.Dimensions,i.UnitType,i.Prefix,i.Name];},2042790032:function _(i){return[i.SectionType,i.StartProfile,i.EndProfile];},4165799628:function _(i){return[i.LongitudinalStartPosition,i.LongitudinalEndPosition,i.TransversePosition,i.ReinforcementRole,i.SectionDefinition,i.CrossSectionReinforcementDefinitions];},867548509:function _(i){return[i.ShapeRepresentations,i.Name,i.Description,i.ProductDefinitional,i.PartOfProductDefinitionShape];},3982875396:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},4240577450:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},3692461612:function _(i){return[i.Name,i.Description];},2273995522:function _(i){return[i.Name];},2162789131:function _(i){return[i.Name];},2525727697:function _(i){return[i.Name];},3408363356:function _(i){return[i.Name,i.DeltaT_Constant,i.DeltaT_Y,i.DeltaT_Z];},2830218821:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},3958052878:function _(i){return[i.Item,i.Styles,i.Name];},3049322572:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},1300840506:function _(i){return[i.Name,i.Side,i.Styles];},3303107099:function _(i){return[i.DiffuseTransmissionColour,i.DiffuseReflectionColour,i.TransmissionColour,i.ReflectanceColour];},1607154358:function _(i){return[i.RefractionIndex,i.DispersionFactor];},846575682:function _(i){return[i.SurfaceColour];},1351298697:function _(i){return[i.Textures];},626085974:function _(i){return[i.RepeatS,i.RepeatT,i.TextureType,i.TextureTransform];},1290481447:function _(i){return[i.Name,Labelise(i.StyleOfSymbol)];},985171141:function _(i){return[i.Name,i.Rows];},531007025:function _(i){return[i.RowCells.map(function(p){return Labelise(p);}),i.IsHeading];},912023232:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose,i.TelephoneNumbers,i.FacsimileNumbers,i.PagerNumber,i.ElectronicMailAddresses,i.WWWHomePageURL];},1447204868:function _(i){return[i.Name,i.TextCharacterAppearance,i.TextStyle,i.TextFontStyle];},1983826977:function _(i){return[i.Name,i.FontFamily,i.FontStyle,i.FontVariant,i.FontWeight,Labelise(i.FontSize)];},2636378356:function _(i){return[i.Colour,i.BackgroundColour];},1640371178:function _(i){return[!i.TextIndent?null:Labelise(i.TextIndent),i.TextAlign,i.TextDecoration,!i.LetterSpacing?null:Labelise(i.LetterSpacing),!i.WordSpacing?null:Labelise(i.WordSpacing),i.TextTransform,!i.LineHeight?null:Labelise(i.LineHeight)];},1484833681:function _(i){return[i.BoxHeight,i.BoxWidth,i.BoxSlantAngle,i.BoxRotateAngle,!i.CharacterSpacing?null:Labelise(i.CharacterSpacing)];},280115917:function _(_33){return[];},1742049831:function _(i){return[i.Mode,i.Parameter.map(function(p){return Labelise(p);})];},2552916305:function _(i){return[i.TextureMaps];},1210645708:function _(i){return[i.Coordinates];},3317419933:function _(i){return[i.Material,i.SpecificHeatCapacity,i.BoilingPoint,i.FreezingPoint,i.ThermalConductivity];},3101149627:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit];},1718945513:function _(i){return[i.ReferencedTimeSeries,i.TimeSeriesReferences];},581633288:function _(i){return[i.ListValues.map(function(p){return Labelise(p);})];},1377556343:function _(_34){return[];},1735638870:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},180925521:function _(i){return[i.Units];},2799835756:function _(_35){return[];},3304826586:function _(i){return[i.TextureVertices,i.TexturePoints];},1907098498:function _(i){return[i.VertexGeometry];},891718957:function _(i){return[i.IntersectingAxes,i.OffsetDistances];},1065908215:function _(i){return[i.Material,i.IsPotable,i.Hardness,i.AlkalinityConcentration,i.AcidityConcentration,i.ImpuritiesContent,i.PHLevel,i.DissolvedSolidsContent];},2442683028:function _(i){return[i.Item,i.Styles,i.Name];},962685235:function _(i){return[i.Item,i.Styles,i.Name];},3612888222:function _(i){return[i.Item,i.Styles,i.Name];},2297822566:function _(i){return[i.Item,i.Styles,i.Name];},3798115385:function _(i){return[i.ProfileType,i.ProfileName,i.OuterCurve];},1310608509:function _(i){return[i.ProfileType,i.ProfileName,i.Curve];},2705031697:function _(i){return[i.ProfileType,i.ProfileName,i.OuterCurve,i.InnerCurves];},616511568:function _(i){return[i.RepeatS,i.RepeatT,i.TextureType,i.TextureTransform,i.RasterFormat,i.RasterCode];},3150382593:function _(i){return[i.ProfileType,i.ProfileName,i.Curve,i.Thickness];},647927063:function _(i){return[i.Location,i.ItemReference,i.Name,i.ReferencedSource];},776857604:function _(i){return[i.Name,i.Red,i.Green,i.Blue];},2542286263:function _(i){return[i.Name,i.Description,i.UsageName,i.HasProperties];},1485152156:function _(i){return[i.ProfileType,i.ProfileName,i.Profiles,i.Label];},370225590:function _(i){return[i.CfsFaces];},1981873012:function _(i){return[i.CurveOnRelatingElement,i.CurveOnRelatedElement];},45288368:function _(i){return[i.PointOnRelatingElement,i.PointOnRelatedElement,i.EccentricityInX,i.EccentricityInY,i.EccentricityInZ];},3050246964:function _(i){return[i.Dimensions,i.UnitType,i.Name];},2889183280:function _(i){return[i.Dimensions,i.UnitType,i.Name,i.ConversionFactor];},3800577675:function _(i){return[i.Name,i.CurveFont,!i.CurveWidth?null:Labelise(i.CurveWidth),i.CurveColour];},3632507154:function _(i){return[i.ProfileType,i.ProfileName,i.ParentProfile,i.Operator,i.Label];},2273265877:function _(i){return[i.Name,i.Description,i.RelatingDraughtingCallout,i.RelatedDraughtingCallout];},1694125774:function _(i){return[i.Name,i.Description,i.RelatingDraughtingCallout,i.RelatedDraughtingCallout];},3732053477:function _(i){return[i.Location,i.ItemReference,i.Name];},4170525392:function _(i){return[i.Name];},3900360178:function _(i){return[i.EdgeStart,i.EdgeEnd];},476780140:function _(i){return[i.EdgeStart,i.EdgeEnd,i.EdgeGeometry,i.SameSense];},1860660968:function _(i){return[i.Material,i.ExtendedProperties,i.Description,i.Name];},2556980723:function _(i){return[i.Bounds];},1809719519:function _(i){return[i.Bound,i.Orientation];},803316827:function _(i){return[i.Bound,i.Orientation];},3008276851:function _(i){return[i.Bounds,i.FaceSurface,i.SameSense];},4219587988:function _(i){return[i.Name,i.TensionFailureX,i.TensionFailureY,i.TensionFailureZ,i.CompressionFailureX,i.CompressionFailureY,i.CompressionFailureZ];},738692330:function _(i){return[i.Name,i.FillStyles];},3857492461:function _(i){return[i.Material,i.CombustionTemperature,i.CarbonContent,i.LowerHeatingValue,i.HigherHeatingValue];},803998398:function _(i){return[i.Material,i.MolecularWeight,i.Porosity,i.MassDensity];},1446786286:function _(i){return[i.ProfileName,i.ProfileDefinition,i.PhysicalWeight,i.Perimeter,i.MinimumPlateThickness,i.MaximumPlateThickness,i.CrossSectionArea];},3448662350:function _(i){return[i.ContextIdentifier,i.ContextType,i.CoordinateSpaceDimension,i.Precision,i.WorldCoordinateSystem,i.TrueNorth];},2453401579:function _(_36){return[];},4142052618:function _(i){return[i.ContextIdentifier,i.ContextType,i.CoordinateSpaceDimension,i.Precision,i.WorldCoordinateSystem,i.TrueNorth,i.ParentContext,i.TargetScale,i.TargetView,i.UserDefinedTargetView];},3590301190:function _(i){return[i.Elements];},178086475:function _(i){return[i.PlacementLocation,i.PlacementRefDirection];},812098782:function _(i){return[i.BaseSurface,i.AgreementFlag];},2445078500:function _(i){return[i.Material,i.UpperVaporResistanceFactor,i.LowerVaporResistanceFactor,i.IsothermalMoistureCapacity,i.VaporPermeability,i.MoistureDiffusivity];},3905492369:function _(i){return[i.RepeatS,i.RepeatT,i.TextureType,i.TextureTransform,i.UrlReference];},3741457305:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit,i.Values];},1402838566:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity];},125510826:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity];},2604431987:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Orientation];},4266656042:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.ColourAppearance,i.ColourTemperature,i.LuminousFlux,i.LightEmissionSource,i.LightDistributionDataSource];},1520743889:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.Radius,i.ConstantAttenuation,i.DistanceAttenuation,i.QuadricAttenuation];},3422422726:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.Radius,i.ConstantAttenuation,i.DistanceAttenuation,i.QuadricAttenuation,i.Orientation,i.ConcentrationExponent,i.SpreadAngle,i.BeamWidthAngle];},2624227202:function _(i){return[i.PlacementRelTo,i.RelativePlacement];},1008929658:function _(_37){return[];},2347385850:function _(i){return[i.MappingSource,i.MappingTarget];},2022407955:function _(i){return[i.Name,i.Description,i.Representations,i.RepresentedMaterial];},1430189142:function _(i){return[i.Material,i.DynamicViscosity,i.YoungModulus,i.ShearModulus,i.PoissonRatio,i.ThermalExpansionCoefficient,i.CompressiveStrength,i.MaxAggregateSize,i.AdmixturesDescription,i.Workability,i.ProtectivePoreRatio,i.WaterImpermeability];},219451334:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2833995503:function _(i){return[i.RepeatFactor];},2665983363:function _(i){return[i.CfsFaces];},1029017970:function _(i){return[i.EdgeStart,i.EdgeEnd,i.EdgeElement,i.Orientation];},2529465313:function _(i){return[i.ProfileType,i.ProfileName,i.Position];},2519244187:function _(i){return[i.EdgeList];},3021840470:function _(i){return[i.Name,i.Description,i.HasQuantities,i.Discrimination,i.Quality,i.Usage];},597895409:function _(i){return[i.RepeatS,i.RepeatT,i.TextureType,i.TextureTransform,i.Width,i.Height,i.ColourComponents,i.Pixel];},2004835150:function _(i){return[i.Location];},1663979128:function _(i){return[i.SizeInX,i.SizeInY];},2067069095:function _(_38){return[];},4022376103:function _(i){return[i.BasisCurve,i.PointParameter];},1423911732:function _(i){return[i.BasisSurface,i.PointParameterU,i.PointParameterV];},2924175390:function _(i){return[i.Polygon];},2775532180:function _(i){return[i.BaseSurface,i.AgreementFlag,i.Position,i.PolygonalBoundary];},759155922:function _(i){return[i.Name];},2559016684:function _(i){return[i.Name];},433424934:function _(i){return[i.Name];},179317114:function _(i){return[i.Name];},673634403:function _(i){return[i.Name,i.Description,i.Representations];},871118103:function _(i){return[i.Name,i.Description,!i.UpperBoundValue?null:Labelise(i.UpperBoundValue),!i.LowerBoundValue?null:Labelise(i.LowerBoundValue),i.Unit];},1680319473:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},4166981789:function _(i){return[i.Name,i.Description,i.EnumerationValues.map(function(p){return Labelise(p);}),i.EnumerationReference];},2752243245:function _(i){return[i.Name,i.Description,i.ListValues.map(function(p){return Labelise(p);}),i.Unit];},941946838:function _(i){return[i.Name,i.Description,i.UsageName,i.PropertyReference];},3357820518:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},3650150729:function _(i){return[i.Name,i.Description,!i.NominalValue?null:Labelise(i.NominalValue),i.Unit];},110355661:function _(i){return[i.Name,i.Description,i.DefiningValues.map(function(p){return Labelise(p);}),i.DefinedValues.map(function(p){return Labelise(p);}),i.Expression,i.DefiningUnit,i.DefinedUnit];},3615266464:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim];},3413951693:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit,i.TimeStep,i.Values];},3765753017:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.DefinitionType,i.ReinforcementSectionDefinitions];},478536968:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2778083089:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim,i.RoundingRadius];},1509187699:function _(i){return[i.SpineCurve,i.CrossSections,i.CrossSectionPositions];},2411513650:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.PredefinedType,!i.UpperValue?null:Labelise(i.UpperValue),Labelise(i.MostUsedValue),!i.LowerValue?null:Labelise(i.LowerValue)];},4124623270:function _(i){return[i.SbsmBoundary];},2609359061:function _(i){return[i.Name,i.SlippageX,i.SlippageY,i.SlippageZ];},723233188:function _(_39){return[];},2485662743:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,(_a=i.IsAttenuating)==null?void 0:_a.toString(),i.SoundScale,i.SoundValues];},1202362311:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.SoundLevelTimeSeries,i.Frequency,!i.SoundLevelSingleValue?null:Labelise(i.SoundLevelSingleValue)];},390701378:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableValueRatio,i.ThermalLoadSource,i.PropertySource,i.SourceDescription,i.MaximumValue,i.MinimumValue,i.ThermalLoadTimeSeriesValues,i.UserDefinedThermalLoadSource,i.UserDefinedPropertySource,i.ThermalLoadType];},1595516126:function _(i){return[i.Name,i.LinearForceX,i.LinearForceY,i.LinearForceZ,i.LinearMomentX,i.LinearMomentY,i.LinearMomentZ];},2668620305:function _(i){return[i.Name,i.PlanarForceX,i.PlanarForceY,i.PlanarForceZ];},2473145415:function _(i){return[i.Name,i.DisplacementX,i.DisplacementY,i.DisplacementZ,i.RotationalDisplacementRX,i.RotationalDisplacementRY,i.RotationalDisplacementRZ];},1973038258:function _(i){return[i.Name,i.DisplacementX,i.DisplacementY,i.DisplacementZ,i.RotationalDisplacementRX,i.RotationalDisplacementRY,i.RotationalDisplacementRZ,i.Distortion];},1597423693:function _(i){return[i.Name,i.ForceX,i.ForceY,i.ForceZ,i.MomentX,i.MomentY,i.MomentZ];},1190533807:function _(i){return[i.Name,i.ForceX,i.ForceY,i.ForceZ,i.MomentX,i.MomentY,i.MomentZ,i.WarpingMoment];},3843319758:function _(i){return[i.ProfileName,i.ProfileDefinition,i.PhysicalWeight,i.Perimeter,i.MinimumPlateThickness,i.MaximumPlateThickness,i.CrossSectionArea,i.TorsionalConstantX,i.MomentOfInertiaYZ,i.MomentOfInertiaY,i.MomentOfInertiaZ,i.WarpingConstant,i.ShearCentreZ,i.ShearCentreY,i.ShearDeformationAreaZ,i.ShearDeformationAreaY,i.MaximumSectionModulusY,i.MinimumSectionModulusY,i.MaximumSectionModulusZ,i.MinimumSectionModulusZ,i.TorsionalSectionModulus,i.CentreOfGravityInX,i.CentreOfGravityInY];},3653947884:function _(i){return[i.ProfileName,i.ProfileDefinition,i.PhysicalWeight,i.Perimeter,i.MinimumPlateThickness,i.MaximumPlateThickness,i.CrossSectionArea,i.TorsionalConstantX,i.MomentOfInertiaYZ,i.MomentOfInertiaY,i.MomentOfInertiaZ,i.WarpingConstant,i.ShearCentreZ,i.ShearCentreY,i.ShearDeformationAreaZ,i.ShearDeformationAreaY,i.MaximumSectionModulusY,i.MinimumSectionModulusY,i.MaximumSectionModulusZ,i.MinimumSectionModulusZ,i.TorsionalSectionModulus,i.CentreOfGravityInX,i.CentreOfGravityInY,i.ShearAreaZ,i.ShearAreaY,i.PlasticShapeFactorY,i.PlasticShapeFactorZ];},2233826070:function _(i){return[i.EdgeStart,i.EdgeEnd,i.ParentEdge];},2513912981:function _(_40){return[];},1878645084:function _(i){return[i.SurfaceColour,i.Transparency,i.DiffuseColour,i.TransmissionColour,i.DiffuseTransmissionColour,i.ReflectionColour,i.SpecularColour,!i.SpecularHighlight?null:Labelise(i.SpecularHighlight),i.ReflectanceMethod];},2247615214:function _(i){return[i.SweptArea,i.Position];},1260650574:function _(i){return[i.Directrix,i.Radius,i.InnerRadius,i.StartParam,i.EndParam];},230924584:function _(i){return[i.SweptCurve,i.Position];},3071757647:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.FlangeEdgeRadius,i.WebEdgeRadius,i.WebSlope,i.FlangeSlope,i.CentreOfGravityInY];},3028897424:function _(i){return[i.Item,i.Styles,i.Name,i.AnnotatedCurve];},4282788508:function _(i){return[i.Literal,i.Placement,i.Path];},3124975700:function _(i){return[i.Literal,i.Placement,i.Path,i.Extent,i.BoxAlignment];},2715220739:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.BottomXDim,i.TopXDim,i.YDim,i.TopXOffset];},1345879162:function _(i){return[i.RepeatFactor,i.SecondRepeatFactor];},1628702193:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets];},2347495698:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag];},427810014:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.EdgeRadius,i.FlangeSlope,i.CentreOfGravityInX];},1417489154:function _(i){return[i.Orientation,i.Magnitude];},2759199220:function _(i){return[i.LoopVertex];},336235671:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.LiningDepth,i.LiningThickness,i.TransomThickness,i.MullionThickness,i.FirstTransomOffset,i.SecondTransomOffset,i.FirstMullionOffset,i.SecondMullionOffset,i.ShapeAspectStyle];},512836454:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.OperationType,i.PanelPosition,i.FrameDepth,i.FrameThickness,i.ShapeAspectStyle];},1299126871:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ConstructionType,i.OperationType,i.ParameterTakesPrecedence,i.Sizeable];},2543172580:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.EdgeRadius];},3288037868:function _(i){return[i.Item,i.Styles,i.Name];},669184980:function _(i){return[i.OuterBoundary,i.InnerBoundaries];},2265737646:function _(i){return[i.Item,i.Styles,i.Name,i.FillStyleTarget,i.GlobalOrLocal];},1302238472:function _(i){return[i.Item,i.TextureCoordinates];},4261334040:function _(i){return[i.Location,i.Axis];},3125803723:function _(i){return[i.Location,i.RefDirection];},2740243338:function _(i){return[i.Location,i.Axis,i.RefDirection];},2736907675:function _(i){return[i.Operator,i.FirstOperand,i.SecondOperand];},4182860854:function _(_41){return[];},2581212453:function _(i){return[i.Corner,i.XDim,i.YDim,i.ZDim];},2713105998:function _(i){return[i.BaseSurface,i.AgreementFlag,i.Enclosure];},2898889636:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.Width,i.WallThickness,i.Girth,i.InternalFilletRadius,i.CentreOfGravityInX];},1123145078:function _(i){return[i.Coordinates];},59481748:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale];},3749851601:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale];},3486308946:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Scale2];},3331915920:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Axis3];},1416205885:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Axis3,i.Scale2,i.Scale3];},1383045692:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Radius];},2205249479:function _(i){return[i.CfsFaces];},2485617015:function _(i){return[i.Transition,i.SameSense,i.ParentCurve];},4133800736:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.OverallHeight,i.BaseWidth2,i.Radius,i.HeadWidth,i.HeadDepth2,i.HeadDepth3,i.WebThickness,i.BaseWidth4,i.BaseDepth1,i.BaseDepth2,i.BaseDepth3,i.CentreOfGravityInY];},194851669:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.OverallHeight,i.HeadWidth,i.Radius,i.HeadDepth2,i.HeadDepth3,i.WebThickness,i.BaseDepth1,i.BaseDepth2,i.CentreOfGravityInY];},2506170314:function _(i){return[i.Position];},2147822146:function _(i){return[i.TreeRootExpression];},2601014836:function _(_42){return[];},2827736869:function _(i){return[i.BasisSurface,i.OuterBoundary,i.InnerBoundaries];},693772133:function _(i){return[i.Definition,i.Target];},606661476:function _(i){return[i.Item,i.Styles,i.Name];},4054601972:function _(i){return[i.Item,i.Styles,i.Name,i.AnnotatedCurve,i.Role];},32440307:function _(i){return[i.DirectionRatios];},2963535650:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.LiningDepth,i.LiningThickness,i.ThresholdDepth,i.ThresholdThickness,i.TransomThickness,i.TransomOffset,i.LiningOffset,i.ThresholdOffset,i.CasingThickness,i.CasingDepth,i.ShapeAspectStyle];},1714330368:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.PanelDepth,i.PanelOperation,i.PanelWidth,i.PanelPosition,i.ShapeAspectStyle];},526551008:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.OperationType,i.ConstructionType,i.ParameterTakesPrecedence,i.Sizeable];},3073041342:function _(i){return[i.Contents];},445594917:function _(i){return[i.Name];},4006246654:function _(i){return[i.Name];},1472233963:function _(i){return[i.EdgeList];},1883228015:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.MethodOfMeasurement,i.Quantities];},339256511:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2777663545:function _(i){return[i.Position];},2835456948:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.SemiAxis1,i.SemiAxis2];},80994333:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.EnergySequence,i.UserDefinedEnergySequence];},477187591:function _(i){return[i.SweptArea,i.Position,i.ExtrudedDirection,i.Depth];},2047409740:function _(i){return[i.FbsmFaces];},374418227:function _(i){return[i.HatchLineAppearance,i.StartOfNextHatchLine,i.PointOfReferenceHatchLine,i.PatternStart,i.HatchLineAngle];},4203026998:function _(i){return[i.Symbol];},315944413:function _(i){return[i.TilingPattern,i.Tiles,i.TilingScale];},3455213021:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.PropertySource,i.FlowConditionTimeSeries,i.VelocityTimeSeries,i.FlowrateTimeSeries,i.Fluid,i.PressureTimeSeries,i.UserDefinedPropertySource,i.TemperatureSingleValue,i.WetBulbTemperatureSingleValue,i.WetBulbTemperatureTimeSeries,i.TemperatureTimeSeries,!i.FlowrateSingleValue?null:Labelise(i.FlowrateSingleValue),i.FlowConditionSingleValue,i.VelocitySingleValue,i.PressureSingleValue];},4238390223:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1268542332:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.AssemblyPlace];},987898635:function _(i){return[i.Elements];},1484403080:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.OverallWidth,i.OverallDepth,i.WebThickness,i.FlangeThickness,i.FilletRadius];},572779678:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.Width,i.Thickness,i.FilletRadius,i.EdgeRadius,i.LegSlope,i.CentreOfGravityInX,i.CentreOfGravityInY];},1281925730:function _(i){return[i.Pnt,i.Dir];},1425443689:function _(i){return[i.Outer];},3888040117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},3388369263:function _(i){return[i.BasisCurve,i.Distance,i.SelfIntersect];},3505215534:function _(i){return[i.BasisCurve,i.Distance,i.SelfIntersect,i.RefDirection];},3566463478:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.OperationType,i.PanelPosition,i.FrameDepth,i.FrameThickness,i.ShapeAspectStyle];},603570806:function _(i){return[i.SizeInX,i.SizeInY,i.Placement];},220341763:function _(i){return[i.Position];},2945172077:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},4208778838:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},103090709:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.Phase,i.RepresentationContexts,i.UnitsInContext];},4194566429:function _(i){return[i.Item,i.Styles,i.Name];},1451395588:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.HasProperties];},3219374653:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.ProxyType,i.Tag];},2770003689:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim,i.WallThickness,i.InnerFilletRadius,i.OuterFilletRadius];},2798486643:function _(i){return[i.Position,i.XLength,i.YLength,i.Height];},3454111270:function _(i){return[i.BasisSurface,i.U1,i.V1,i.U2,i.V2,i.Usense,i.Vsense];},3939117080:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType];},1683148259:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingActor,i.ActingRole];},2495723537:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingControl];},1307041759:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingGroup];},4278684876:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingProcess,i.QuantityInProcess];},2857406711:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingProduct];},3372526763:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingControl];},205026976:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingResource];},1865459582:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects];},1327628568:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingAppliedValue];},4095574036:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingApproval];},919958153:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingClassification];},2728634034:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.Intent,i.RelatingConstraint];},982818633:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingDocument];},3840914261:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingLibrary];},2655215786:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingMaterial];},2851387026:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingProfileProperties,i.ProfileSectionLocation,i.ProfileOrientation];},826625072:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},1204542856:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement];},3945020480:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement,i.RelatingPriorities,i.RelatedPriorities,i.RelatedConnectionType,i.RelatingConnectionType];},4201705270:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingPort,i.RelatedElement];},3190031847:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingPort,i.RelatedPort,i.RealizingElement];},2127690289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedStructuralActivity];},3912681535:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedStructuralMember];},1638771189:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingStructuralMember,i.RelatedStructuralConnection,i.AppliedCondition,i.AdditionalConditions,i.SupportedLength,i.ConditionCoordinateSystem];},504942748:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingStructuralMember,i.RelatedStructuralConnection,i.AppliedCondition,i.AdditionalConditions,i.SupportedLength,i.ConditionCoordinateSystem,i.ConnectionConstraint];},3678494232:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement,i.RealizingElements,i.ConnectionType];},3242617779:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedElements,i.RelatingStructure];},886880790:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingBuildingElement,i.RelatedCoverings];},2802773753:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedSpace,i.RelatedCoverings];},2551354335:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingObject,i.RelatedObjects];},693640335:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects];},4186316022:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingPropertyDefinition];},781010003:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingType];},3940055652:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingOpeningElement,i.RelatedBuildingElement];},279856033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedControlElements,i.RelatingFlowElement];},4189434867:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.DailyInteraction,i.ImportanceRating,i.LocationOfInteraction,i.RelatedSpaceProgram,i.RelatingSpaceProgram];},3268803585:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingObject,i.RelatedObjects];},2051452291:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingActor,i.ActingRole];},202636808:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingPropertyDefinition,i.OverridingProperties];},750771296:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedFeatureElement];},1245217292:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedElements,i.RelatingStructure];},1058617721:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingControl];},4122056220:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingProcess,i.RelatedProcess,i.TimeLag,i.SequenceType];},366585022:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSystem,i.RelatedBuildings];},3451746338:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedBuildingElement,i.ConnectionGeometry,i.PhysicalOrVirtualBoundary,i.InternalOrExternalBoundary];},1401173127:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingBuildingElement,i.RelatedOpeningElement];},2914609552:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},1856042241:function _(i){return[i.SweptArea,i.Position,i.Axis,i.Angle];},4158566097:function _(i){return[i.Position,i.Height,i.BottomRadius];},3626867408:function _(i){return[i.Position,i.Height,i.Radius];},2706606064:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType];},3893378262:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},451544542:function _(i){return[i.Position,i.Radius];},3544373492:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},3136571912:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},530289379:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},3689010777:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},3979015343:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Thickness];},2218152070:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Thickness,i.SubsequentThickness,i.VaryingThicknessLocation];},4070609034:function _(i){return[i.Contents];},2028607225:function _(i){return[i.SweptArea,i.Position,i.Directrix,i.StartParam,i.EndParam,i.ReferenceSurface];},2809605785:function _(i){return[i.SweptCurve,i.Position,i.ExtrudedDirection,i.Depth];},4124788165:function _(i){return[i.SweptCurve,i.Position,i.AxisPosition];},1580310250:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3473067441:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TaskId,i.Status,i.WorkMethod,i.IsMilestone,i.Priority];},2097647324:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2296667514:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheActor];},1674181508:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},3207858831:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.OverallWidth,i.OverallDepth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.TopFlangeWidth,i.TopFlangeThickness,i.TopFlangeFilletRadius,i.CentreOfGravityInY];},1334484129:function _(i){return[i.Position,i.XLength,i.YLength,i.ZLength];},3649129432:function _(i){return[i.Operator,i.FirstOperand,i.SecondOperand];},1260505505:function _(_43){return[];},4031249490:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.ElevationOfRefHeight,i.ElevationOfTerrain,i.BuildingAddress];},1950629157:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3124254112:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.Elevation];},2937912522:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Radius,i.WallThickness];},300633059:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3732776249:function _(i){return[i.Segments,i.SelfIntersect];},2510884976:function _(i){return[i.Position];},2559216714:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ResourceIdentifier,i.ResourceGroup,i.ResourceConsumption,i.BaseQuantity];},3293443760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},3895139033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},1419761937:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.SubmittedBy,i.PreparedBy,i.SubmittedOn,i.Status,i.TargetUsers,i.UpdateDate,i.ID,i.PredefinedType];},1916426348:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3295246426:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ResourceIdentifier,i.ResourceGroup,i.ResourceConsumption,i.BaseQuantity];},1457835157:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},681481545:function _(i){return[i.Contents];},3256556792:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3849074793:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},360485395:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.EnergySequence,i.UserDefinedEnergySequence,i.ElectricCurrentType,i.InputVoltage,i.InputFrequency,i.FullLoadCurrent,i.MinimumCircuitCurrent,i.MaximumPowerInput,i.RatedPowerInput,i.InputPhase];},1758889154:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4123344466:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.AssemblyPlace,i.PredefinedType];},1623761950:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2590856083:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1704287377:function _(i){return[i.Position,i.SemiAxis1,i.SemiAxis2];},2107101300:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1962604670:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3272907226:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},3174744832:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3390157468:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},807026263:function _(i){return[i.Outer];},3737207727:function _(i){return[i.Outer,i.Voids];},647756555:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2489546625:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2827207264:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2143335405:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1287392070:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3907093117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3198132628:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3815607619:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1482959167:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1834744321:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1339347760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2297155007:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3009222698:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},263784265:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},814719939:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},200128114:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3009204131:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.UAxes,i.VAxes,i.WAxes];},2706460486:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},1251058090:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1806887404:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2391368822:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.InventoryType,i.Jurisdiction,i.ResponsiblePersons,i.LastUpdateDate,i.CurrentValue,i.OriginalValue];},4288270099:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3827777499:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ResourceIdentifier,i.ResourceGroup,i.ResourceConsumption,i.BaseQuantity,i.SkillSet];},1051575348:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1161773419:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2506943328:function _(i){return[i.Contents];},377706215:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.NominalDiameter,i.NominalLength];},2108223431:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3181161470:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},977012517:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1916936684:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TaskId,i.Status,i.WorkMethod,i.IsMilestone,i.Priority,i.MoveFrom,i.MoveTo,i.PunchList];},4143007308:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheActor,i.PredefinedType];},3588315303:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3425660407:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TaskId,i.Status,i.WorkMethod,i.IsMilestone,i.Priority,i.ActionID];},2837617999:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2382730787:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LifeCyclePhase];},3327091369:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PermitID];},804291784:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4231323485:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4017108033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3724593414:function _(i){return[i.Points];},3740093272:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},2744685151:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ProcedureID,i.ProcedureType,i.UserDefinedProcedureType];},2904328755:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ID,i.PredefinedType,i.Status];},3642467123:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Records,i.PredefinedType];},3651124850:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1842657554:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2250791053:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3248260540:function _(i){return[i.Contents];},2893384427:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2324767716:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},160246688:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingObject,i.RelatedObjects];},2863920197:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingControl,i.TimeForTask];},1768891740:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3517283431:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ActualStart,i.EarlyStart,i.LateStart,i.ScheduleStart,i.ActualFinish,i.EarlyFinish,i.LateFinish,i.ScheduleFinish,i.ScheduleDuration,i.ActualDuration,i.RemainingTime,i.FreeFloat,i.TotalFloat,i.IsCritical,i.StatusTime,i.StartFloat,i.FinishFloat,i.Completion];},4105383287:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ServiceLifeType,i.ServiceLifeDuration];},4097777520:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.RefLatitude,i.RefLongitude,i.RefElevation,i.LandTitleNumber,i.SiteAddress];},2533589738:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3856911033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.InteriorOrExteriorSpace,i.ElevationWithFlooring];},1305183839:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},652456506:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.SpaceProgramIdentifier,i.MaxRequiredArea,i.MinRequiredArea,i.RequestedLocation,i.StandardRequiredArea];},3812236995:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3112655638:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1039846685:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},682877961:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.DestabilizingLoad,i.CausedBy];},1179482911:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},4243806635:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},214636428:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType];},2445595289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType];},1807405624:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.DestabilizingLoad,i.CausedBy,i.ProjectedOrTrue];},1721250024:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.DestabilizingLoad,i.CausedBy,i.ProjectedOrTrue,i.VaryingAppliedLoadLocation,i.SubsequentAppliedLoads];},1252848954:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.ActionType,i.ActionSource,i.Coefficient,i.Purpose];},1621171031:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.DestabilizingLoad,i.CausedBy,i.ProjectedOrTrue];},3987759626:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.DestabilizingLoad,i.CausedBy,i.ProjectedOrTrue,i.VaryingAppliedLoadLocation,i.SubsequentAppliedLoads];},2082059205:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.DestabilizingLoad,i.CausedBy];},734778138:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},1235345126:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},2986769608:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheoryType,i.ResultForLoadGroup,i.IsLinear];},1975003073:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},148013059:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ResourceIdentifier,i.ResourceGroup,i.ResourceConsumption,i.BaseQuantity,i.SubContractor,i.JobDescription];},2315554128:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2254336722:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},5716631:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1637806684:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ApplicableDates,i.TimeSeriesScheduleType,i.TimeSeries];},1692211062:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1620046519:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OperationType,i.CapacityByWeight,i.CapacityByNumber];},3593883385:function _(i){return[i.BasisCurve,i.Trim1,i.Trim2,i.SenseAgreement,i.MasterRepresentation];},1600972822:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1911125066:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},728799441:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2769231204:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1898987631:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1133259667:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1028945134:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identifier,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime,i.WorkControlType,i.UserDefinedControlType];},4218914973:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identifier,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime,i.WorkControlType,i.UserDefinedControlType];},3342526732:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identifier,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime,i.WorkControlType,i.UserDefinedControlType];},1033361043:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},1213861670:function _(i){return[i.Segments,i.SelfIntersect];},3821786052:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.RequestID];},1411407467:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3352864051:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1871374353:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2470393545:function _(i){return[i.Contents];},3460190687:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.AssetID,i.OriginalValue,i.CurrentValue,i.TotalReplacementCost,i.Owner,i.User,i.ResponsiblePerson,i.IncorporationDate,i.DepreciatedValue];},1967976161:function _(i){return[i.Degree,i.ControlPointsList,i.CurveForm,i.ClosedCurve,i.SelfIntersect];},819618141:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1916977116:function _(i){return[i.Degree,i.ControlPointsList,i.CurveForm,i.ClosedCurve,i.SelfIntersect];},231477066:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3299480353:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},52481810:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2979338954:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1095909175:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.CompositionType];},1909888760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},395041908:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3293546465:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1285652485:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2951183804:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2611217952:function _(i){return[i.Position,i.Radius];},2301859152:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},843113511:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3850581409:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2816379211:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2188551683:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},1163958913:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Criterion,i.CriterionDateTime];},3898045240:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ResourceIdentifier,i.ResourceGroup,i.ResourceConsumption,i.BaseQuantity];},1060000209:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ResourceIdentifier,i.ResourceGroup,i.ResourceConsumption,i.BaseQuantity,i.Suppliers,i.UsageRatio];},488727124:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ResourceIdentifier,i.ResourceGroup,i.ResourceConsumption,i.BaseQuantity];},335055490:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2954562838:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1973544240:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3495092785:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3961806047:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4147604152:function _(i){return[i.Contents];},1335981549:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2635815018:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1599208980:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2063403501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1945004755:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3040386961:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3041715199:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.FlowDirection];},395920057:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth];},869906466:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3760055223:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2030761528:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},855621170:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.FeatureLength];},663422040:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3277789161:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1534661035:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1365060375:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1217240411:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},712377611:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1634875225:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},857184966:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1658829314:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},346874300:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1810631287:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4222183408:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2058353004:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4278956645:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4037862832:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3132237377:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},987401354:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},707683696:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2223149337:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3508470533:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},900683007:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1073191201:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1687234759:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType,i.ConstructionType];},3171933400:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2262370178:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3024970846:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.ShapeType];},3283111854:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3055160366:function _(i){return[i.Degree,i.ControlPointsList,i.CurveForm,i.ClosedCurve,i.SelfIntersect,i.WeightsData];},3027567501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade];},2320036040:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.MeshLength,i.MeshWidth,i.LongitudinalBarNominalDiameter,i.TransverseBarNominalDiameter,i.LongitudinalBarCrossSectionArea,i.TransverseBarCrossSectionArea,i.LongitudinalBarSpacing,i.TransverseBarSpacing];},2016517767:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.ShapeType];},1376911519:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.FeatureLength,i.Radius];},1783015770:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1529196076:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},331165859:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.ShapeType];},4252922144:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.NumberOfRiser,i.NumberOfTreads,i.RiserHeight,i.TreadLength];},2515109513:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.OrientationOf2DPlane,i.LoadedBy,i.HasResults];},3824725483:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.PredefinedType,i.NominalDiameter,i.CrossSectionArea,i.TensionForce,i.PreStress,i.FrictionCoefficient,i.AnchorageSlip,i.MinCurvatureRadius];},2347447852:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade];},3313531582:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2391406946:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3512223829:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3304561284:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth];},2874132201:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3001207471:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},753842376:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2454782716:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.FeatureLength,i.Width,i.Height];},578613899:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1052013943:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1062813311:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.ControlElementId];},3700593921:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.DistributionPointFunction,i.UserDefinedFunction];},979691226:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.NominalDiameter,i.CrossSectionArea,i.BarLength,i.BarRole,i.BarSurface];}};TypeInitialisers[1]={3699917729:function _(v){return new IFC2X3.IfcAbsorbedDoseMeasure(v);},4182062534:function _(v){return new IFC2X3.IfcAccelerationMeasure(v);},360377573:function _(v){return new IFC2X3.IfcAmountOfSubstanceMeasure(v);},632304761:function _(v){return new IFC2X3.IfcAngularVelocityMeasure(v);},2650437152:function _(v){return new IFC2X3.IfcAreaMeasure(v);},2735952531:function _(v){return new IFC2X3.IfcBoolean(v);},1867003952:function _(v){return new IFC2X3.IfcBoxAlignment(v);},2991860651:function _(v){return new IFC2X3.IfcComplexNumber(v);},3812528620:function _(v){return new IFC2X3.IfcCompoundPlaneAngleMeasure(v);},3238673880:function _(v){return new IFC2X3.IfcContextDependentMeasure(v);},1778710042:function _(v){return new IFC2X3.IfcCountMeasure(v);},94842927:function _(v){return new IFC2X3.IfcCurvatureMeasure(v);},86635668:function _(v){return new IFC2X3.IfcDayInMonthNumber(v);},300323983:function _(v){return new IFC2X3.IfcDaylightSavingHour(v);},1514641115:function _(v){return new IFC2X3.IfcDescriptiveMeasure(v);},4134073009:function _(v){return new IFC2X3.IfcDimensionCount(v);},524656162:function _(v){return new IFC2X3.IfcDoseEquivalentMeasure(v);},69416015:function _(v){return new IFC2X3.IfcDynamicViscosityMeasure(v);},1827137117:function _(v){return new IFC2X3.IfcElectricCapacitanceMeasure(v);},3818826038:function _(v){return new IFC2X3.IfcElectricChargeMeasure(v);},2093906313:function _(v){return new IFC2X3.IfcElectricConductanceMeasure(v);},3790457270:function _(v){return new IFC2X3.IfcElectricCurrentMeasure(v);},2951915441:function _(v){return new IFC2X3.IfcElectricResistanceMeasure(v);},2506197118:function _(v){return new IFC2X3.IfcElectricVoltageMeasure(v);},2078135608:function _(v){return new IFC2X3.IfcEnergyMeasure(v);},1102727119:function _(v){return new IFC2X3.IfcFontStyle(v);},2715512545:function _(v){return new IFC2X3.IfcFontVariant(v);},2590844177:function _(v){return new IFC2X3.IfcFontWeight(v);},1361398929:function _(v){return new IFC2X3.IfcForceMeasure(v);},3044325142:function _(v){return new IFC2X3.IfcFrequencyMeasure(v);},3064340077:function _(v){return new IFC2X3.IfcGloballyUniqueId(v);},3113092358:function _(v){return new IFC2X3.IfcHeatFluxDensityMeasure(v);},1158859006:function _(v){return new IFC2X3.IfcHeatingValueMeasure(v);},2589826445:function _(v){return new IFC2X3.IfcHourInDay(v);},983778844:function _(v){return new IFC2X3.IfcIdentifier(v);},3358199106:function _(v){return new IFC2X3.IfcIlluminanceMeasure(v);},2679005408:function _(v){return new IFC2X3.IfcInductanceMeasure(v);},1939436016:function _(v){return new IFC2X3.IfcInteger(v);},3809634241:function _(v){return new IFC2X3.IfcIntegerCountRateMeasure(v);},3686016028:function _(v){return new IFC2X3.IfcIonConcentrationMeasure(v);},3192672207:function _(v){return new IFC2X3.IfcIsothermalMoistureCapacityMeasure(v);},2054016361:function _(v){return new IFC2X3.IfcKinematicViscosityMeasure(v);},3258342251:function _(v){return new IFC2X3.IfcLabel(v);},1243674935:function _(v){return new IFC2X3.IfcLengthMeasure(v);},191860431:function _(v){return new IFC2X3.IfcLinearForceMeasure(v);},2128979029:function _(v){return new IFC2X3.IfcLinearMomentMeasure(v);},1307019551:function _(v){return new IFC2X3.IfcLinearStiffnessMeasure(v);},3086160713:function _(v){return new IFC2X3.IfcLinearVelocityMeasure(v);},503418787:function _(v){return new IFC2X3.IfcLogical(v);},2095003142:function _(v){return new IFC2X3.IfcLuminousFluxMeasure(v);},2755797622:function _(v){return new IFC2X3.IfcLuminousIntensityDistributionMeasure(v);},151039812:function _(v){return new IFC2X3.IfcLuminousIntensityMeasure(v);},286949696:function _(v){return new IFC2X3.IfcMagneticFluxDensityMeasure(v);},2486716878:function _(v){return new IFC2X3.IfcMagneticFluxMeasure(v);},1477762836:function _(v){return new IFC2X3.IfcMassDensityMeasure(v);},4017473158:function _(v){return new IFC2X3.IfcMassFlowRateMeasure(v);},3124614049:function _(v){return new IFC2X3.IfcMassMeasure(v);},3531705166:function _(v){return new IFC2X3.IfcMassPerLengthMeasure(v);},102610177:function _(v){return new IFC2X3.IfcMinuteInHour(v);},3341486342:function _(v){return new IFC2X3.IfcModulusOfElasticityMeasure(v);},2173214787:function _(v){return new IFC2X3.IfcModulusOfLinearSubgradeReactionMeasure(v);},1052454078:function _(v){return new IFC2X3.IfcModulusOfRotationalSubgradeReactionMeasure(v);},1753493141:function _(v){return new IFC2X3.IfcModulusOfSubgradeReactionMeasure(v);},3177669450:function _(v){return new IFC2X3.IfcMoistureDiffusivityMeasure(v);},1648970520:function _(v){return new IFC2X3.IfcMolecularWeightMeasure(v);},3114022597:function _(v){return new IFC2X3.IfcMomentOfInertiaMeasure(v);},2615040989:function _(v){return new IFC2X3.IfcMonetaryMeasure(v);},765770214:function _(v){return new IFC2X3.IfcMonthInYearNumber(v);},2095195183:function _(v){return new IFC2X3.IfcNormalisedRatioMeasure(v);},2395907400:function _(v){return new IFC2X3.IfcNumericMeasure(v);},929793134:function _(v){return new IFC2X3.IfcPHMeasure(v);},2260317790:function _(v){return new IFC2X3.IfcParameterValue(v);},2642773653:function _(v){return new IFC2X3.IfcPlanarForceMeasure(v);},4042175685:function _(v){return new IFC2X3.IfcPlaneAngleMeasure(v);},2815919920:function _(v){return new IFC2X3.IfcPositiveLengthMeasure(v);},3054510233:function _(v){return new IFC2X3.IfcPositivePlaneAngleMeasure(v);},1245737093:function _(v){return new IFC2X3.IfcPositiveRatioMeasure(v);},1364037233:function _(v){return new IFC2X3.IfcPowerMeasure(v);},2169031380:function _(v){return new IFC2X3.IfcPresentableText(v);},3665567075:function _(v){return new IFC2X3.IfcPressureMeasure(v);},3972513137:function _(v){return new IFC2X3.IfcRadioActivityMeasure(v);},96294661:function _(v){return new IFC2X3.IfcRatioMeasure(v);},200335297:function _(v){return new IFC2X3.IfcReal(v);},2133746277:function _(v){return new IFC2X3.IfcRotationalFrequencyMeasure(v);},1755127002:function _(v){return new IFC2X3.IfcRotationalMassMeasure(v);},3211557302:function _(v){return new IFC2X3.IfcRotationalStiffnessMeasure(v);},2766185779:function _(v){return new IFC2X3.IfcSecondInMinute(v);},3467162246:function _(v){return new IFC2X3.IfcSectionModulusMeasure(v);},2190458107:function _(v){return new IFC2X3.IfcSectionalAreaIntegralMeasure(v);},408310005:function _(v){return new IFC2X3.IfcShearModulusMeasure(v);},3471399674:function _(v){return new IFC2X3.IfcSolidAngleMeasure(v);},846465480:function _(v){return new IFC2X3.IfcSoundPowerMeasure(v);},993287707:function _(v){return new IFC2X3.IfcSoundPressureMeasure(v);},3477203348:function _(v){return new IFC2X3.IfcSpecificHeatCapacityMeasure(v);},2757832317:function _(v){return new IFC2X3.IfcSpecularExponent(v);},361837227:function _(v){return new IFC2X3.IfcSpecularRoughness(v);},58845555:function _(v){return new IFC2X3.IfcTemperatureGradientMeasure(v);},2801250643:function _(v){return new IFC2X3.IfcText(v);},1460886941:function _(v){return new IFC2X3.IfcTextAlignment(v);},3490877962:function _(v){return new IFC2X3.IfcTextDecoration(v);},603696268:function _(v){return new IFC2X3.IfcTextFontName(v);},296282323:function _(v){return new IFC2X3.IfcTextTransformation(v);},232962298:function _(v){return new IFC2X3.IfcThermalAdmittanceMeasure(v);},2645777649:function _(v){return new IFC2X3.IfcThermalConductivityMeasure(v);},2281867870:function _(v){return new IFC2X3.IfcThermalExpansionCoefficientMeasure(v);},857959152:function _(v){return new IFC2X3.IfcThermalResistanceMeasure(v);},2016195849:function _(v){return new IFC2X3.IfcThermalTransmittanceMeasure(v);},743184107:function _(v){return new IFC2X3.IfcThermodynamicTemperatureMeasure(v);},2726807636:function _(v){return new IFC2X3.IfcTimeMeasure(v);},2591213694:function _(v){return new IFC2X3.IfcTimeStamp(v);},1278329552:function _(v){return new IFC2X3.IfcTorqueMeasure(v);},3345633955:function _(v){return new IFC2X3.IfcVaporPermeabilityMeasure(v);},3458127941:function _(v){return new IFC2X3.IfcVolumeMeasure(v);},2593997549:function _(v){return new IFC2X3.IfcVolumetricFlowRateMeasure(v);},51269191:function _(v){return new IFC2X3.IfcWarpingConstantMeasure(v);},1718600412:function _(v){return new IFC2X3.IfcWarpingMomentMeasure(v);},4065007721:function _(v){return new IFC2X3.IfcYearNumber(v);}};var IFC2X3;(function(IFC2X32){var IfcAbsorbedDoseMeasure=/*#__PURE__*/_createClass(function IfcAbsorbedDoseMeasure(v){_classCallCheck(this,IfcAbsorbedDoseMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcAbsorbedDoseMeasure=IfcAbsorbedDoseMeasure;var IfcAccelerationMeasure=/*#__PURE__*/_createClass(function IfcAccelerationMeasure(v){_classCallCheck(this,IfcAccelerationMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcAccelerationMeasure=IfcAccelerationMeasure;var IfcAmountOfSubstanceMeasure=/*#__PURE__*/_createClass(function IfcAmountOfSubstanceMeasure(v){_classCallCheck(this,IfcAmountOfSubstanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcAmountOfSubstanceMeasure=IfcAmountOfSubstanceMeasure;var IfcAngularVelocityMeasure=/*#__PURE__*/_createClass(function IfcAngularVelocityMeasure(v){_classCallCheck(this,IfcAngularVelocityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcAngularVelocityMeasure=IfcAngularVelocityMeasure;var IfcAreaMeasure=/*#__PURE__*/_createClass(function IfcAreaMeasure(v){_classCallCheck(this,IfcAreaMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcAreaMeasure=IfcAreaMeasure;var IfcBoolean=/*#__PURE__*/_createClass(function IfcBoolean(v){_classCallCheck(this,IfcBoolean);this.type=3;this.value=v=="true"?true:false;});IFC2X32.IfcBoolean=IfcBoolean;var IfcBoxAlignment=/*#__PURE__*/_createClass(function IfcBoxAlignment(value){_classCallCheck(this,IfcBoxAlignment);this.value=value;this.type=1;});IFC2X32.IfcBoxAlignment=IfcBoxAlignment;var IfcComplexNumber=/*#__PURE__*/_createClass(function IfcComplexNumber(value){_classCallCheck(this,IfcComplexNumber);this.value=value;});IFC2X32.IfcComplexNumber=IfcComplexNumber;var IfcCompoundPlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcCompoundPlaneAngleMeasure(value){_classCallCheck(this,IfcCompoundPlaneAngleMeasure);this.value=value;});IFC2X32.IfcCompoundPlaneAngleMeasure=IfcCompoundPlaneAngleMeasure;var IfcContextDependentMeasure=/*#__PURE__*/_createClass(function IfcContextDependentMeasure(v){_classCallCheck(this,IfcContextDependentMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcContextDependentMeasure=IfcContextDependentMeasure;var IfcCountMeasure=/*#__PURE__*/_createClass(function IfcCountMeasure(v){_classCallCheck(this,IfcCountMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcCountMeasure=IfcCountMeasure;var IfcCurvatureMeasure=/*#__PURE__*/_createClass(function IfcCurvatureMeasure(v){_classCallCheck(this,IfcCurvatureMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcCurvatureMeasure=IfcCurvatureMeasure;var IfcDayInMonthNumber=/*#__PURE__*/_createClass(function IfcDayInMonthNumber(v){_classCallCheck(this,IfcDayInMonthNumber);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcDayInMonthNumber=IfcDayInMonthNumber;var IfcDaylightSavingHour=/*#__PURE__*/_createClass(function IfcDaylightSavingHour(v){_classCallCheck(this,IfcDaylightSavingHour);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcDaylightSavingHour=IfcDaylightSavingHour;var IfcDescriptiveMeasure=/*#__PURE__*/_createClass(function IfcDescriptiveMeasure(value){_classCallCheck(this,IfcDescriptiveMeasure);this.value=value;this.type=1;});IFC2X32.IfcDescriptiveMeasure=IfcDescriptiveMeasure;var IfcDimensionCount=/*#__PURE__*/_createClass(function IfcDimensionCount(v){_classCallCheck(this,IfcDimensionCount);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcDimensionCount=IfcDimensionCount;var IfcDoseEquivalentMeasure=/*#__PURE__*/_createClass(function IfcDoseEquivalentMeasure(v){_classCallCheck(this,IfcDoseEquivalentMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcDoseEquivalentMeasure=IfcDoseEquivalentMeasure;var IfcDynamicViscosityMeasure=/*#__PURE__*/_createClass(function IfcDynamicViscosityMeasure(v){_classCallCheck(this,IfcDynamicViscosityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcDynamicViscosityMeasure=IfcDynamicViscosityMeasure;var IfcElectricCapacitanceMeasure=/*#__PURE__*/_createClass(function IfcElectricCapacitanceMeasure(v){_classCallCheck(this,IfcElectricCapacitanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcElectricCapacitanceMeasure=IfcElectricCapacitanceMeasure;var IfcElectricChargeMeasure=/*#__PURE__*/_createClass(function IfcElectricChargeMeasure(v){_classCallCheck(this,IfcElectricChargeMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcElectricChargeMeasure=IfcElectricChargeMeasure;var IfcElectricConductanceMeasure=/*#__PURE__*/_createClass(function IfcElectricConductanceMeasure(v){_classCallCheck(this,IfcElectricConductanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcElectricConductanceMeasure=IfcElectricConductanceMeasure;var IfcElectricCurrentMeasure=/*#__PURE__*/_createClass(function IfcElectricCurrentMeasure(v){_classCallCheck(this,IfcElectricCurrentMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcElectricCurrentMeasure=IfcElectricCurrentMeasure;var IfcElectricResistanceMeasure=/*#__PURE__*/_createClass(function IfcElectricResistanceMeasure(v){_classCallCheck(this,IfcElectricResistanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcElectricResistanceMeasure=IfcElectricResistanceMeasure;var IfcElectricVoltageMeasure=/*#__PURE__*/_createClass(function IfcElectricVoltageMeasure(v){_classCallCheck(this,IfcElectricVoltageMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcElectricVoltageMeasure=IfcElectricVoltageMeasure;var IfcEnergyMeasure=/*#__PURE__*/_createClass(function IfcEnergyMeasure(v){_classCallCheck(this,IfcEnergyMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcEnergyMeasure=IfcEnergyMeasure;var IfcFontStyle=/*#__PURE__*/_createClass(function IfcFontStyle(value){_classCallCheck(this,IfcFontStyle);this.value=value;this.type=1;});IFC2X32.IfcFontStyle=IfcFontStyle;var IfcFontVariant=/*#__PURE__*/_createClass(function IfcFontVariant(value){_classCallCheck(this,IfcFontVariant);this.value=value;this.type=1;});IFC2X32.IfcFontVariant=IfcFontVariant;var IfcFontWeight=/*#__PURE__*/_createClass(function IfcFontWeight(value){_classCallCheck(this,IfcFontWeight);this.value=value;this.type=1;});IFC2X32.IfcFontWeight=IfcFontWeight;var IfcForceMeasure=/*#__PURE__*/_createClass(function IfcForceMeasure(v){_classCallCheck(this,IfcForceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcForceMeasure=IfcForceMeasure;var IfcFrequencyMeasure=/*#__PURE__*/_createClass(function IfcFrequencyMeasure(v){_classCallCheck(this,IfcFrequencyMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcFrequencyMeasure=IfcFrequencyMeasure;var IfcGloballyUniqueId=/*#__PURE__*/_createClass(function IfcGloballyUniqueId(value){_classCallCheck(this,IfcGloballyUniqueId);this.value=value;this.type=1;});IFC2X32.IfcGloballyUniqueId=IfcGloballyUniqueId;var IfcHeatFluxDensityMeasure=/*#__PURE__*/_createClass(function IfcHeatFluxDensityMeasure(v){_classCallCheck(this,IfcHeatFluxDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcHeatFluxDensityMeasure=IfcHeatFluxDensityMeasure;var IfcHeatingValueMeasure=/*#__PURE__*/_createClass(function IfcHeatingValueMeasure(v){_classCallCheck(this,IfcHeatingValueMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcHeatingValueMeasure=IfcHeatingValueMeasure;var IfcHourInDay=/*#__PURE__*/_createClass(function IfcHourInDay(v){_classCallCheck(this,IfcHourInDay);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcHourInDay=IfcHourInDay;var IfcIdentifier=/*#__PURE__*/_createClass(function IfcIdentifier(value){_classCallCheck(this,IfcIdentifier);this.value=value;this.type=1;});IFC2X32.IfcIdentifier=IfcIdentifier;var IfcIlluminanceMeasure=/*#__PURE__*/_createClass(function IfcIlluminanceMeasure(v){_classCallCheck(this,IfcIlluminanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcIlluminanceMeasure=IfcIlluminanceMeasure;var IfcInductanceMeasure=/*#__PURE__*/_createClass(function IfcInductanceMeasure(v){_classCallCheck(this,IfcInductanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcInductanceMeasure=IfcInductanceMeasure;var IfcInteger=/*#__PURE__*/_createClass(function IfcInteger(v){_classCallCheck(this,IfcInteger);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcInteger=IfcInteger;var IfcIntegerCountRateMeasure=/*#__PURE__*/_createClass(function IfcIntegerCountRateMeasure(v){_classCallCheck(this,IfcIntegerCountRateMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcIntegerCountRateMeasure=IfcIntegerCountRateMeasure;var IfcIonConcentrationMeasure=/*#__PURE__*/_createClass(function IfcIonConcentrationMeasure(v){_classCallCheck(this,IfcIonConcentrationMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcIonConcentrationMeasure=IfcIonConcentrationMeasure;var IfcIsothermalMoistureCapacityMeasure=/*#__PURE__*/_createClass(function IfcIsothermalMoistureCapacityMeasure(v){_classCallCheck(this,IfcIsothermalMoistureCapacityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcIsothermalMoistureCapacityMeasure=IfcIsothermalMoistureCapacityMeasure;var IfcKinematicViscosityMeasure=/*#__PURE__*/_createClass(function IfcKinematicViscosityMeasure(v){_classCallCheck(this,IfcKinematicViscosityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcKinematicViscosityMeasure=IfcKinematicViscosityMeasure;var IfcLabel=/*#__PURE__*/_createClass(function IfcLabel(value){_classCallCheck(this,IfcLabel);this.value=value;this.type=1;});IFC2X32.IfcLabel=IfcLabel;var IfcLengthMeasure=/*#__PURE__*/_createClass(function IfcLengthMeasure(v){_classCallCheck(this,IfcLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLengthMeasure=IfcLengthMeasure;var IfcLinearForceMeasure=/*#__PURE__*/_createClass(function IfcLinearForceMeasure(v){_classCallCheck(this,IfcLinearForceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLinearForceMeasure=IfcLinearForceMeasure;var IfcLinearMomentMeasure=/*#__PURE__*/_createClass(function IfcLinearMomentMeasure(v){_classCallCheck(this,IfcLinearMomentMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLinearMomentMeasure=IfcLinearMomentMeasure;var IfcLinearStiffnessMeasure=/*#__PURE__*/_createClass(function IfcLinearStiffnessMeasure(v){_classCallCheck(this,IfcLinearStiffnessMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLinearStiffnessMeasure=IfcLinearStiffnessMeasure;var IfcLinearVelocityMeasure=/*#__PURE__*/_createClass(function IfcLinearVelocityMeasure(v){_classCallCheck(this,IfcLinearVelocityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLinearVelocityMeasure=IfcLinearVelocityMeasure;var IfcLogical=/*#__PURE__*/_createClass(function IfcLogical(v){_classCallCheck(this,IfcLogical);this.type=3;this.value=v=="true"?true:false;});IFC2X32.IfcLogical=IfcLogical;var IfcLuminousFluxMeasure=/*#__PURE__*/_createClass(function IfcLuminousFluxMeasure(v){_classCallCheck(this,IfcLuminousFluxMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLuminousFluxMeasure=IfcLuminousFluxMeasure;var IfcLuminousIntensityDistributionMeasure=/*#__PURE__*/_createClass(function IfcLuminousIntensityDistributionMeasure(v){_classCallCheck(this,IfcLuminousIntensityDistributionMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLuminousIntensityDistributionMeasure=IfcLuminousIntensityDistributionMeasure;var IfcLuminousIntensityMeasure=/*#__PURE__*/_createClass(function IfcLuminousIntensityMeasure(v){_classCallCheck(this,IfcLuminousIntensityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcLuminousIntensityMeasure=IfcLuminousIntensityMeasure;var IfcMagneticFluxDensityMeasure=/*#__PURE__*/_createClass(function IfcMagneticFluxDensityMeasure(v){_classCallCheck(this,IfcMagneticFluxDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMagneticFluxDensityMeasure=IfcMagneticFluxDensityMeasure;var IfcMagneticFluxMeasure=/*#__PURE__*/_createClass(function IfcMagneticFluxMeasure(v){_classCallCheck(this,IfcMagneticFluxMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMagneticFluxMeasure=IfcMagneticFluxMeasure;var IfcMassDensityMeasure=/*#__PURE__*/_createClass(function IfcMassDensityMeasure(v){_classCallCheck(this,IfcMassDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMassDensityMeasure=IfcMassDensityMeasure;var IfcMassFlowRateMeasure=/*#__PURE__*/_createClass(function IfcMassFlowRateMeasure(v){_classCallCheck(this,IfcMassFlowRateMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMassFlowRateMeasure=IfcMassFlowRateMeasure;var IfcMassMeasure=/*#__PURE__*/_createClass(function IfcMassMeasure(v){_classCallCheck(this,IfcMassMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMassMeasure=IfcMassMeasure;var IfcMassPerLengthMeasure=/*#__PURE__*/_createClass(function IfcMassPerLengthMeasure(v){_classCallCheck(this,IfcMassPerLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMassPerLengthMeasure=IfcMassPerLengthMeasure;var IfcMinuteInHour=/*#__PURE__*/_createClass(function IfcMinuteInHour(v){_classCallCheck(this,IfcMinuteInHour);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMinuteInHour=IfcMinuteInHour;var IfcModulusOfElasticityMeasure=/*#__PURE__*/_createClass(function IfcModulusOfElasticityMeasure(v){_classCallCheck(this,IfcModulusOfElasticityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcModulusOfElasticityMeasure=IfcModulusOfElasticityMeasure;var IfcModulusOfLinearSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfLinearSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfLinearSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcModulusOfLinearSubgradeReactionMeasure=IfcModulusOfLinearSubgradeReactionMeasure;var IfcModulusOfRotationalSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfRotationalSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfRotationalSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcModulusOfRotationalSubgradeReactionMeasure=IfcModulusOfRotationalSubgradeReactionMeasure;var IfcModulusOfSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcModulusOfSubgradeReactionMeasure=IfcModulusOfSubgradeReactionMeasure;var IfcMoistureDiffusivityMeasure=/*#__PURE__*/_createClass(function IfcMoistureDiffusivityMeasure(v){_classCallCheck(this,IfcMoistureDiffusivityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMoistureDiffusivityMeasure=IfcMoistureDiffusivityMeasure;var IfcMolecularWeightMeasure=/*#__PURE__*/_createClass(function IfcMolecularWeightMeasure(v){_classCallCheck(this,IfcMolecularWeightMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMolecularWeightMeasure=IfcMolecularWeightMeasure;var IfcMomentOfInertiaMeasure=/*#__PURE__*/_createClass(function IfcMomentOfInertiaMeasure(v){_classCallCheck(this,IfcMomentOfInertiaMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMomentOfInertiaMeasure=IfcMomentOfInertiaMeasure;var IfcMonetaryMeasure=/*#__PURE__*/_createClass(function IfcMonetaryMeasure(v){_classCallCheck(this,IfcMonetaryMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMonetaryMeasure=IfcMonetaryMeasure;var IfcMonthInYearNumber=/*#__PURE__*/_createClass(function IfcMonthInYearNumber(v){_classCallCheck(this,IfcMonthInYearNumber);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcMonthInYearNumber=IfcMonthInYearNumber;var IfcNormalisedRatioMeasure=/*#__PURE__*/_createClass(function IfcNormalisedRatioMeasure(v){_classCallCheck(this,IfcNormalisedRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcNormalisedRatioMeasure=IfcNormalisedRatioMeasure;var IfcNumericMeasure=/*#__PURE__*/_createClass(function IfcNumericMeasure(v){_classCallCheck(this,IfcNumericMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcNumericMeasure=IfcNumericMeasure;var IfcPHMeasure=/*#__PURE__*/_createClass(function IfcPHMeasure(v){_classCallCheck(this,IfcPHMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPHMeasure=IfcPHMeasure;var IfcParameterValue=/*#__PURE__*/_createClass(function IfcParameterValue(v){_classCallCheck(this,IfcParameterValue);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcParameterValue=IfcParameterValue;var IfcPlanarForceMeasure=/*#__PURE__*/_createClass(function IfcPlanarForceMeasure(v){_classCallCheck(this,IfcPlanarForceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPlanarForceMeasure=IfcPlanarForceMeasure;var IfcPlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcPlaneAngleMeasure(v){_classCallCheck(this,IfcPlaneAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPlaneAngleMeasure=IfcPlaneAngleMeasure;var IfcPositiveLengthMeasure=/*#__PURE__*/_createClass(function IfcPositiveLengthMeasure(v){_classCallCheck(this,IfcPositiveLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPositiveLengthMeasure=IfcPositiveLengthMeasure;var IfcPositivePlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcPositivePlaneAngleMeasure(v){_classCallCheck(this,IfcPositivePlaneAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPositivePlaneAngleMeasure=IfcPositivePlaneAngleMeasure;var IfcPositiveRatioMeasure=/*#__PURE__*/_createClass(function IfcPositiveRatioMeasure(v){_classCallCheck(this,IfcPositiveRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPositiveRatioMeasure=IfcPositiveRatioMeasure;var IfcPowerMeasure=/*#__PURE__*/_createClass(function IfcPowerMeasure(v){_classCallCheck(this,IfcPowerMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPowerMeasure=IfcPowerMeasure;var IfcPresentableText=/*#__PURE__*/_createClass(function IfcPresentableText(value){_classCallCheck(this,IfcPresentableText);this.value=value;this.type=1;});IFC2X32.IfcPresentableText=IfcPresentableText;var IfcPressureMeasure=/*#__PURE__*/_createClass(function IfcPressureMeasure(v){_classCallCheck(this,IfcPressureMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcPressureMeasure=IfcPressureMeasure;var IfcRadioActivityMeasure=/*#__PURE__*/_createClass(function IfcRadioActivityMeasure(v){_classCallCheck(this,IfcRadioActivityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcRadioActivityMeasure=IfcRadioActivityMeasure;var IfcRatioMeasure=/*#__PURE__*/_createClass(function IfcRatioMeasure(v){_classCallCheck(this,IfcRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcRatioMeasure=IfcRatioMeasure;var IfcReal=/*#__PURE__*/_createClass(function IfcReal(v){_classCallCheck(this,IfcReal);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcReal=IfcReal;var IfcRotationalFrequencyMeasure=/*#__PURE__*/_createClass(function IfcRotationalFrequencyMeasure(v){_classCallCheck(this,IfcRotationalFrequencyMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcRotationalFrequencyMeasure=IfcRotationalFrequencyMeasure;var IfcRotationalMassMeasure=/*#__PURE__*/_createClass(function IfcRotationalMassMeasure(v){_classCallCheck(this,IfcRotationalMassMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcRotationalMassMeasure=IfcRotationalMassMeasure;var IfcRotationalStiffnessMeasure=/*#__PURE__*/_createClass(function IfcRotationalStiffnessMeasure(v){_classCallCheck(this,IfcRotationalStiffnessMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcRotationalStiffnessMeasure=IfcRotationalStiffnessMeasure;var IfcSecondInMinute=/*#__PURE__*/_createClass(function IfcSecondInMinute(v){_classCallCheck(this,IfcSecondInMinute);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSecondInMinute=IfcSecondInMinute;var IfcSectionModulusMeasure=/*#__PURE__*/_createClass(function IfcSectionModulusMeasure(v){_classCallCheck(this,IfcSectionModulusMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSectionModulusMeasure=IfcSectionModulusMeasure;var IfcSectionalAreaIntegralMeasure=/*#__PURE__*/_createClass(function IfcSectionalAreaIntegralMeasure(v){_classCallCheck(this,IfcSectionalAreaIntegralMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSectionalAreaIntegralMeasure=IfcSectionalAreaIntegralMeasure;var IfcShearModulusMeasure=/*#__PURE__*/_createClass(function IfcShearModulusMeasure(v){_classCallCheck(this,IfcShearModulusMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcShearModulusMeasure=IfcShearModulusMeasure;var IfcSolidAngleMeasure=/*#__PURE__*/_createClass(function IfcSolidAngleMeasure(v){_classCallCheck(this,IfcSolidAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSolidAngleMeasure=IfcSolidAngleMeasure;var IfcSoundPowerMeasure=/*#__PURE__*/_createClass(function IfcSoundPowerMeasure(v){_classCallCheck(this,IfcSoundPowerMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSoundPowerMeasure=IfcSoundPowerMeasure;var IfcSoundPressureMeasure=/*#__PURE__*/_createClass(function IfcSoundPressureMeasure(v){_classCallCheck(this,IfcSoundPressureMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSoundPressureMeasure=IfcSoundPressureMeasure;var IfcSpecificHeatCapacityMeasure=/*#__PURE__*/_createClass(function IfcSpecificHeatCapacityMeasure(v){_classCallCheck(this,IfcSpecificHeatCapacityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSpecificHeatCapacityMeasure=IfcSpecificHeatCapacityMeasure;var IfcSpecularExponent=/*#__PURE__*/_createClass(function IfcSpecularExponent(v){_classCallCheck(this,IfcSpecularExponent);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSpecularExponent=IfcSpecularExponent;var IfcSpecularRoughness=/*#__PURE__*/_createClass(function IfcSpecularRoughness(v){_classCallCheck(this,IfcSpecularRoughness);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcSpecularRoughness=IfcSpecularRoughness;var IfcTemperatureGradientMeasure=/*#__PURE__*/_createClass(function IfcTemperatureGradientMeasure(v){_classCallCheck(this,IfcTemperatureGradientMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcTemperatureGradientMeasure=IfcTemperatureGradientMeasure;var IfcText=/*#__PURE__*/_createClass(function IfcText(value){_classCallCheck(this,IfcText);this.value=value;this.type=1;});IFC2X32.IfcText=IfcText;var IfcTextAlignment=/*#__PURE__*/_createClass(function IfcTextAlignment(value){_classCallCheck(this,IfcTextAlignment);this.value=value;this.type=1;});IFC2X32.IfcTextAlignment=IfcTextAlignment;var IfcTextDecoration=/*#__PURE__*/_createClass(function IfcTextDecoration(value){_classCallCheck(this,IfcTextDecoration);this.value=value;this.type=1;});IFC2X32.IfcTextDecoration=IfcTextDecoration;var IfcTextFontName=/*#__PURE__*/_createClass(function IfcTextFontName(value){_classCallCheck(this,IfcTextFontName);this.value=value;this.type=1;});IFC2X32.IfcTextFontName=IfcTextFontName;var IfcTextTransformation=/*#__PURE__*/_createClass(function IfcTextTransformation(value){_classCallCheck(this,IfcTextTransformation);this.value=value;this.type=1;});IFC2X32.IfcTextTransformation=IfcTextTransformation;var IfcThermalAdmittanceMeasure=/*#__PURE__*/_createClass(function IfcThermalAdmittanceMeasure(v){_classCallCheck(this,IfcThermalAdmittanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcThermalAdmittanceMeasure=IfcThermalAdmittanceMeasure;var IfcThermalConductivityMeasure=/*#__PURE__*/_createClass(function IfcThermalConductivityMeasure(v){_classCallCheck(this,IfcThermalConductivityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcThermalConductivityMeasure=IfcThermalConductivityMeasure;var IfcThermalExpansionCoefficientMeasure=/*#__PURE__*/_createClass(function IfcThermalExpansionCoefficientMeasure(v){_classCallCheck(this,IfcThermalExpansionCoefficientMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcThermalExpansionCoefficientMeasure=IfcThermalExpansionCoefficientMeasure;var IfcThermalResistanceMeasure=/*#__PURE__*/_createClass(function IfcThermalResistanceMeasure(v){_classCallCheck(this,IfcThermalResistanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcThermalResistanceMeasure=IfcThermalResistanceMeasure;var IfcThermalTransmittanceMeasure=/*#__PURE__*/_createClass(function IfcThermalTransmittanceMeasure(v){_classCallCheck(this,IfcThermalTransmittanceMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcThermalTransmittanceMeasure=IfcThermalTransmittanceMeasure;var IfcThermodynamicTemperatureMeasure=/*#__PURE__*/_createClass(function IfcThermodynamicTemperatureMeasure(v){_classCallCheck(this,IfcThermodynamicTemperatureMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcThermodynamicTemperatureMeasure=IfcThermodynamicTemperatureMeasure;var IfcTimeMeasure=/*#__PURE__*/_createClass(function IfcTimeMeasure(v){_classCallCheck(this,IfcTimeMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcTimeMeasure=IfcTimeMeasure;var IfcTimeStamp=/*#__PURE__*/_createClass(function IfcTimeStamp(v){_classCallCheck(this,IfcTimeStamp);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcTimeStamp=IfcTimeStamp;var IfcTorqueMeasure=/*#__PURE__*/_createClass(function IfcTorqueMeasure(v){_classCallCheck(this,IfcTorqueMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcTorqueMeasure=IfcTorqueMeasure;var IfcVaporPermeabilityMeasure=/*#__PURE__*/_createClass(function IfcVaporPermeabilityMeasure(v){_classCallCheck(this,IfcVaporPermeabilityMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcVaporPermeabilityMeasure=IfcVaporPermeabilityMeasure;var IfcVolumeMeasure=/*#__PURE__*/_createClass(function IfcVolumeMeasure(v){_classCallCheck(this,IfcVolumeMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcVolumeMeasure=IfcVolumeMeasure;var IfcVolumetricFlowRateMeasure=/*#__PURE__*/_createClass(function IfcVolumetricFlowRateMeasure(v){_classCallCheck(this,IfcVolumetricFlowRateMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcVolumetricFlowRateMeasure=IfcVolumetricFlowRateMeasure;var IfcWarpingConstantMeasure=/*#__PURE__*/_createClass(function IfcWarpingConstantMeasure(v){_classCallCheck(this,IfcWarpingConstantMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcWarpingConstantMeasure=IfcWarpingConstantMeasure;var IfcWarpingMomentMeasure=/*#__PURE__*/_createClass(function IfcWarpingMomentMeasure(v){_classCallCheck(this,IfcWarpingMomentMeasure);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcWarpingMomentMeasure=IfcWarpingMomentMeasure;var IfcYearNumber=/*#__PURE__*/_createClass(function IfcYearNumber(v){_classCallCheck(this,IfcYearNumber);this.type=4;this.value=parseFloat(v);});IFC2X32.IfcYearNumber=IfcYearNumber;var IfcActionSourceTypeEnum=/*#__PURE__*/_createClass(function IfcActionSourceTypeEnum(){_classCallCheck(this,IfcActionSourceTypeEnum);});IfcActionSourceTypeEnum.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"};IfcActionSourceTypeEnum.COMPLETION_G1={type:3,value:"COMPLETION_G1"};IfcActionSourceTypeEnum.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"};IfcActionSourceTypeEnum.SNOW_S={type:3,value:"SNOW_S"};IfcActionSourceTypeEnum.WIND_W={type:3,value:"WIND_W"};IfcActionSourceTypeEnum.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"};IfcActionSourceTypeEnum.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"};IfcActionSourceTypeEnum.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"};IfcActionSourceTypeEnum.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"};IfcActionSourceTypeEnum.FIRE={type:3,value:"FIRE"};IfcActionSourceTypeEnum.IMPULSE={type:3,value:"IMPULSE"};IfcActionSourceTypeEnum.IMPACT={type:3,value:"IMPACT"};IfcActionSourceTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcActionSourceTypeEnum.ERECTION={type:3,value:"ERECTION"};IfcActionSourceTypeEnum.PROPPING={type:3,value:"PROPPING"};IfcActionSourceTypeEnum.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"};IfcActionSourceTypeEnum.SHRINKAGE={type:3,value:"SHRINKAGE"};IfcActionSourceTypeEnum.CREEP={type:3,value:"CREEP"};IfcActionSourceTypeEnum.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"};IfcActionSourceTypeEnum.BUOYANCY={type:3,value:"BUOYANCY"};IfcActionSourceTypeEnum.ICE={type:3,value:"ICE"};IfcActionSourceTypeEnum.CURRENT={type:3,value:"CURRENT"};IfcActionSourceTypeEnum.WAVE={type:3,value:"WAVE"};IfcActionSourceTypeEnum.RAIN={type:3,value:"RAIN"};IfcActionSourceTypeEnum.BRAKES={type:3,value:"BRAKES"};IfcActionSourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionSourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcActionSourceTypeEnum=IfcActionSourceTypeEnum;var IfcActionTypeEnum=/*#__PURE__*/_createClass(function IfcActionTypeEnum(){_classCallCheck(this,IfcActionTypeEnum);});IfcActionTypeEnum.PERMANENT_G={type:3,value:"PERMANENT_G"};IfcActionTypeEnum.VARIABLE_Q={type:3,value:"VARIABLE_Q"};IfcActionTypeEnum.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"};IfcActionTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcActionTypeEnum=IfcActionTypeEnum;var IfcActuatorTypeEnum=/*#__PURE__*/_createClass(function IfcActuatorTypeEnum(){_classCallCheck(this,IfcActuatorTypeEnum);});IfcActuatorTypeEnum.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"};IfcActuatorTypeEnum.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"};IfcActuatorTypeEnum.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"};IfcActuatorTypeEnum.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"};IfcActuatorTypeEnum.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"};IfcActuatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActuatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcActuatorTypeEnum=IfcActuatorTypeEnum;var IfcAddressTypeEnum=/*#__PURE__*/_createClass(function IfcAddressTypeEnum(){_classCallCheck(this,IfcAddressTypeEnum);});IfcAddressTypeEnum.OFFICE={type:3,value:"OFFICE"};IfcAddressTypeEnum.SITE={type:3,value:"SITE"};IfcAddressTypeEnum.HOME={type:3,value:"HOME"};IfcAddressTypeEnum.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"};IfcAddressTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC2X32.IfcAddressTypeEnum=IfcAddressTypeEnum;var IfcAheadOrBehind=/*#__PURE__*/_createClass(function IfcAheadOrBehind(){_classCallCheck(this,IfcAheadOrBehind);});IfcAheadOrBehind.AHEAD={type:3,value:"AHEAD"};IfcAheadOrBehind.BEHIND={type:3,value:"BEHIND"};IFC2X32.IfcAheadOrBehind=IfcAheadOrBehind;var IfcAirTerminalBoxTypeEnum=/*#__PURE__*/_createClass(function IfcAirTerminalBoxTypeEnum(){_classCallCheck(this,IfcAirTerminalBoxTypeEnum);});IfcAirTerminalBoxTypeEnum.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"};IfcAirTerminalBoxTypeEnum.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"};IfcAirTerminalBoxTypeEnum.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"};IfcAirTerminalBoxTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirTerminalBoxTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcAirTerminalBoxTypeEnum=IfcAirTerminalBoxTypeEnum;var IfcAirTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcAirTerminalTypeEnum(){_classCallCheck(this,IfcAirTerminalTypeEnum);});IfcAirTerminalTypeEnum.GRILLE={type:3,value:"GRILLE"};IfcAirTerminalTypeEnum.REGISTER={type:3,value:"REGISTER"};IfcAirTerminalTypeEnum.DIFFUSER={type:3,value:"DIFFUSER"};IfcAirTerminalTypeEnum.EYEBALL={type:3,value:"EYEBALL"};IfcAirTerminalTypeEnum.IRIS={type:3,value:"IRIS"};IfcAirTerminalTypeEnum.LINEARGRILLE={type:3,value:"LINEARGRILLE"};IfcAirTerminalTypeEnum.LINEARDIFFUSER={type:3,value:"LINEARDIFFUSER"};IfcAirTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcAirTerminalTypeEnum=IfcAirTerminalTypeEnum;var IfcAirToAirHeatRecoveryTypeEnum=/*#__PURE__*/_createClass(function IfcAirToAirHeatRecoveryTypeEnum(){_classCallCheck(this,IfcAirToAirHeatRecoveryTypeEnum);});IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"};IfcAirToAirHeatRecoveryTypeEnum.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"};IfcAirToAirHeatRecoveryTypeEnum.HEATPIPE={type:3,value:"HEATPIPE"};IfcAirToAirHeatRecoveryTypeEnum.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"};IfcAirToAirHeatRecoveryTypeEnum.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"};IfcAirToAirHeatRecoveryTypeEnum.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"};IfcAirToAirHeatRecoveryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirToAirHeatRecoveryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcAirToAirHeatRecoveryTypeEnum=IfcAirToAirHeatRecoveryTypeEnum;var IfcAlarmTypeEnum=/*#__PURE__*/_createClass(function IfcAlarmTypeEnum(){_classCallCheck(this,IfcAlarmTypeEnum);});IfcAlarmTypeEnum.BELL={type:3,value:"BELL"};IfcAlarmTypeEnum.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"};IfcAlarmTypeEnum.LIGHT={type:3,value:"LIGHT"};IfcAlarmTypeEnum.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"};IfcAlarmTypeEnum.SIREN={type:3,value:"SIREN"};IfcAlarmTypeEnum.WHISTLE={type:3,value:"WHISTLE"};IfcAlarmTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAlarmTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcAlarmTypeEnum=IfcAlarmTypeEnum;var IfcAnalysisModelTypeEnum=/*#__PURE__*/_createClass(function IfcAnalysisModelTypeEnum(){_classCallCheck(this,IfcAnalysisModelTypeEnum);});IfcAnalysisModelTypeEnum.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"};IfcAnalysisModelTypeEnum.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"};IfcAnalysisModelTypeEnum.LOADING_3D={type:3,value:"LOADING_3D"};IfcAnalysisModelTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAnalysisModelTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcAnalysisModelTypeEnum=IfcAnalysisModelTypeEnum;var IfcAnalysisTheoryTypeEnum=/*#__PURE__*/_createClass(function IfcAnalysisTheoryTypeEnum(){_classCallCheck(this,IfcAnalysisTheoryTypeEnum);});IfcAnalysisTheoryTypeEnum.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"};IfcAnalysisTheoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAnalysisTheoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcAnalysisTheoryTypeEnum=IfcAnalysisTheoryTypeEnum;var IfcArithmeticOperatorEnum=/*#__PURE__*/_createClass(function IfcArithmeticOperatorEnum(){_classCallCheck(this,IfcArithmeticOperatorEnum);});IfcArithmeticOperatorEnum.ADD={type:3,value:"ADD"};IfcArithmeticOperatorEnum.DIVIDE={type:3,value:"DIVIDE"};IfcArithmeticOperatorEnum.MULTIPLY={type:3,value:"MULTIPLY"};IfcArithmeticOperatorEnum.SUBTRACT={type:3,value:"SUBTRACT"};IFC2X32.IfcArithmeticOperatorEnum=IfcArithmeticOperatorEnum;var IfcAssemblyPlaceEnum=/*#__PURE__*/_createClass(function IfcAssemblyPlaceEnum(){_classCallCheck(this,IfcAssemblyPlaceEnum);});IfcAssemblyPlaceEnum.SITE={type:3,value:"SITE"};IfcAssemblyPlaceEnum.FACTORY={type:3,value:"FACTORY"};IfcAssemblyPlaceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcAssemblyPlaceEnum=IfcAssemblyPlaceEnum;var IfcBSplineCurveForm=/*#__PURE__*/_createClass(function IfcBSplineCurveForm(){_classCallCheck(this,IfcBSplineCurveForm);});IfcBSplineCurveForm.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"};IfcBSplineCurveForm.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"};IfcBSplineCurveForm.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"};IfcBSplineCurveForm.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"};IfcBSplineCurveForm.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"};IfcBSplineCurveForm.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC2X32.IfcBSplineCurveForm=IfcBSplineCurveForm;var IfcBeamTypeEnum=/*#__PURE__*/_createClass(function IfcBeamTypeEnum(){_classCallCheck(this,IfcBeamTypeEnum);});IfcBeamTypeEnum.BEAM={type:3,value:"BEAM"};IfcBeamTypeEnum.JOIST={type:3,value:"JOIST"};IfcBeamTypeEnum.LINTEL={type:3,value:"LINTEL"};IfcBeamTypeEnum.T_BEAM={type:3,value:"T_BEAM"};IfcBeamTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBeamTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcBeamTypeEnum=IfcBeamTypeEnum;var IfcBenchmarkEnum=/*#__PURE__*/_createClass(function IfcBenchmarkEnum(){_classCallCheck(this,IfcBenchmarkEnum);});IfcBenchmarkEnum.GREATERTHAN={type:3,value:"GREATERTHAN"};IfcBenchmarkEnum.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"};IfcBenchmarkEnum.LESSTHAN={type:3,value:"LESSTHAN"};IfcBenchmarkEnum.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"};IfcBenchmarkEnum.EQUALTO={type:3,value:"EQUALTO"};IfcBenchmarkEnum.NOTEQUALTO={type:3,value:"NOTEQUALTO"};IFC2X32.IfcBenchmarkEnum=IfcBenchmarkEnum;var IfcBoilerTypeEnum=/*#__PURE__*/_createClass(function IfcBoilerTypeEnum(){_classCallCheck(this,IfcBoilerTypeEnum);});IfcBoilerTypeEnum.WATER={type:3,value:"WATER"};IfcBoilerTypeEnum.STEAM={type:3,value:"STEAM"};IfcBoilerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBoilerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcBoilerTypeEnum=IfcBoilerTypeEnum;var IfcBooleanOperator=/*#__PURE__*/_createClass(function IfcBooleanOperator(){_classCallCheck(this,IfcBooleanOperator);});IfcBooleanOperator.UNION={type:3,value:"UNION"};IfcBooleanOperator.INTERSECTION={type:3,value:"INTERSECTION"};IfcBooleanOperator.DIFFERENCE={type:3,value:"DIFFERENCE"};IFC2X32.IfcBooleanOperator=IfcBooleanOperator;var IfcBuildingElementProxyTypeEnum=/*#__PURE__*/_createClass(function IfcBuildingElementProxyTypeEnum(){_classCallCheck(this,IfcBuildingElementProxyTypeEnum);});IfcBuildingElementProxyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuildingElementProxyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcBuildingElementProxyTypeEnum=IfcBuildingElementProxyTypeEnum;var IfcCableCarrierFittingTypeEnum=/*#__PURE__*/_createClass(function IfcCableCarrierFittingTypeEnum(){_classCallCheck(this,IfcCableCarrierFittingTypeEnum);});IfcCableCarrierFittingTypeEnum.BEND={type:3,value:"BEND"};IfcCableCarrierFittingTypeEnum.CROSS={type:3,value:"CROSS"};IfcCableCarrierFittingTypeEnum.REDUCER={type:3,value:"REDUCER"};IfcCableCarrierFittingTypeEnum.TEE={type:3,value:"TEE"};IfcCableCarrierFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableCarrierFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCableCarrierFittingTypeEnum=IfcCableCarrierFittingTypeEnum;var IfcCableCarrierSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcCableCarrierSegmentTypeEnum(){_classCallCheck(this,IfcCableCarrierSegmentTypeEnum);});IfcCableCarrierSegmentTypeEnum.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"};IfcCableCarrierSegmentTypeEnum.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"};IfcCableCarrierSegmentTypeEnum.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"};IfcCableCarrierSegmentTypeEnum.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"};IfcCableCarrierSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableCarrierSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCableCarrierSegmentTypeEnum=IfcCableCarrierSegmentTypeEnum;var IfcCableSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcCableSegmentTypeEnum(){_classCallCheck(this,IfcCableSegmentTypeEnum);});IfcCableSegmentTypeEnum.CABLESEGMENT={type:3,value:"CABLESEGMENT"};IfcCableSegmentTypeEnum.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"};IfcCableSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCableSegmentTypeEnum=IfcCableSegmentTypeEnum;var IfcChangeActionEnum=/*#__PURE__*/_createClass(function IfcChangeActionEnum(){_classCallCheck(this,IfcChangeActionEnum);});IfcChangeActionEnum.NOCHANGE={type:3,value:"NOCHANGE"};IfcChangeActionEnum.MODIFIED={type:3,value:"MODIFIED"};IfcChangeActionEnum.ADDED={type:3,value:"ADDED"};IfcChangeActionEnum.DELETED={type:3,value:"DELETED"};IfcChangeActionEnum.MODIFIEDADDED={type:3,value:"MODIFIEDADDED"};IfcChangeActionEnum.MODIFIEDDELETED={type:3,value:"MODIFIEDDELETED"};IFC2X32.IfcChangeActionEnum=IfcChangeActionEnum;var IfcChillerTypeEnum=/*#__PURE__*/_createClass(function IfcChillerTypeEnum(){_classCallCheck(this,IfcChillerTypeEnum);});IfcChillerTypeEnum.AIRCOOLED={type:3,value:"AIRCOOLED"};IfcChillerTypeEnum.WATERCOOLED={type:3,value:"WATERCOOLED"};IfcChillerTypeEnum.HEATRECOVERY={type:3,value:"HEATRECOVERY"};IfcChillerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcChillerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcChillerTypeEnum=IfcChillerTypeEnum;var IfcCoilTypeEnum=/*#__PURE__*/_createClass(function IfcCoilTypeEnum(){_classCallCheck(this,IfcCoilTypeEnum);});IfcCoilTypeEnum.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"};IfcCoilTypeEnum.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"};IfcCoilTypeEnum.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"};IfcCoilTypeEnum.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"};IfcCoilTypeEnum.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"};IfcCoilTypeEnum.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"};IfcCoilTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoilTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCoilTypeEnum=IfcCoilTypeEnum;var IfcColumnTypeEnum=/*#__PURE__*/_createClass(function IfcColumnTypeEnum(){_classCallCheck(this,IfcColumnTypeEnum);});IfcColumnTypeEnum.COLUMN={type:3,value:"COLUMN"};IfcColumnTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcColumnTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcColumnTypeEnum=IfcColumnTypeEnum;var IfcCompressorTypeEnum=/*#__PURE__*/_createClass(function IfcCompressorTypeEnum(){_classCallCheck(this,IfcCompressorTypeEnum);});IfcCompressorTypeEnum.DYNAMIC={type:3,value:"DYNAMIC"};IfcCompressorTypeEnum.RECIPROCATING={type:3,value:"RECIPROCATING"};IfcCompressorTypeEnum.ROTARY={type:3,value:"ROTARY"};IfcCompressorTypeEnum.SCROLL={type:3,value:"SCROLL"};IfcCompressorTypeEnum.TROCHOIDAL={type:3,value:"TROCHOIDAL"};IfcCompressorTypeEnum.SINGLESTAGE={type:3,value:"SINGLESTAGE"};IfcCompressorTypeEnum.BOOSTER={type:3,value:"BOOSTER"};IfcCompressorTypeEnum.OPENTYPE={type:3,value:"OPENTYPE"};IfcCompressorTypeEnum.HERMETIC={type:3,value:"HERMETIC"};IfcCompressorTypeEnum.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"};IfcCompressorTypeEnum.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"};IfcCompressorTypeEnum.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"};IfcCompressorTypeEnum.ROTARYVANE={type:3,value:"ROTARYVANE"};IfcCompressorTypeEnum.SINGLESCREW={type:3,value:"SINGLESCREW"};IfcCompressorTypeEnum.TWINSCREW={type:3,value:"TWINSCREW"};IfcCompressorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCompressorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCompressorTypeEnum=IfcCompressorTypeEnum;var IfcCondenserTypeEnum=/*#__PURE__*/_createClass(function IfcCondenserTypeEnum(){_classCallCheck(this,IfcCondenserTypeEnum);});IfcCondenserTypeEnum.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"};IfcCondenserTypeEnum.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"};IfcCondenserTypeEnum.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"};IfcCondenserTypeEnum.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"};IfcCondenserTypeEnum.AIRCOOLED={type:3,value:"AIRCOOLED"};IfcCondenserTypeEnum.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"};IfcCondenserTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCondenserTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCondenserTypeEnum=IfcCondenserTypeEnum;var IfcConnectionTypeEnum=/*#__PURE__*/_createClass(function IfcConnectionTypeEnum(){_classCallCheck(this,IfcConnectionTypeEnum);});IfcConnectionTypeEnum.ATPATH={type:3,value:"ATPATH"};IfcConnectionTypeEnum.ATSTART={type:3,value:"ATSTART"};IfcConnectionTypeEnum.ATEND={type:3,value:"ATEND"};IfcConnectionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcConnectionTypeEnum=IfcConnectionTypeEnum;var IfcConstraintEnum=/*#__PURE__*/_createClass(function IfcConstraintEnum(){_classCallCheck(this,IfcConstraintEnum);});IfcConstraintEnum.HARD={type:3,value:"HARD"};IfcConstraintEnum.SOFT={type:3,value:"SOFT"};IfcConstraintEnum.ADVISORY={type:3,value:"ADVISORY"};IfcConstraintEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstraintEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcConstraintEnum=IfcConstraintEnum;var IfcControllerTypeEnum=/*#__PURE__*/_createClass(function IfcControllerTypeEnum(){_classCallCheck(this,IfcControllerTypeEnum);});IfcControllerTypeEnum.FLOATING={type:3,value:"FLOATING"};IfcControllerTypeEnum.PROPORTIONAL={type:3,value:"PROPORTIONAL"};IfcControllerTypeEnum.PROPORTIONALINTEGRAL={type:3,value:"PROPORTIONALINTEGRAL"};IfcControllerTypeEnum.PROPORTIONALINTEGRALDERIVATIVE={type:3,value:"PROPORTIONALINTEGRALDERIVATIVE"};IfcControllerTypeEnum.TIMEDTWOPOSITION={type:3,value:"TIMEDTWOPOSITION"};IfcControllerTypeEnum.TWOPOSITION={type:3,value:"TWOPOSITION"};IfcControllerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcControllerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcControllerTypeEnum=IfcControllerTypeEnum;var IfcCooledBeamTypeEnum=/*#__PURE__*/_createClass(function IfcCooledBeamTypeEnum(){_classCallCheck(this,IfcCooledBeamTypeEnum);});IfcCooledBeamTypeEnum.ACTIVE={type:3,value:"ACTIVE"};IfcCooledBeamTypeEnum.PASSIVE={type:3,value:"PASSIVE"};IfcCooledBeamTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCooledBeamTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCooledBeamTypeEnum=IfcCooledBeamTypeEnum;var IfcCoolingTowerTypeEnum=/*#__PURE__*/_createClass(function IfcCoolingTowerTypeEnum(){_classCallCheck(this,IfcCoolingTowerTypeEnum);});IfcCoolingTowerTypeEnum.NATURALDRAFT={type:3,value:"NATURALDRAFT"};IfcCoolingTowerTypeEnum.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"};IfcCoolingTowerTypeEnum.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"};IfcCoolingTowerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoolingTowerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCoolingTowerTypeEnum=IfcCoolingTowerTypeEnum;var IfcCostScheduleTypeEnum=/*#__PURE__*/_createClass(function IfcCostScheduleTypeEnum(){_classCallCheck(this,IfcCostScheduleTypeEnum);});IfcCostScheduleTypeEnum.BUDGET={type:3,value:"BUDGET"};IfcCostScheduleTypeEnum.COSTPLAN={type:3,value:"COSTPLAN"};IfcCostScheduleTypeEnum.ESTIMATE={type:3,value:"ESTIMATE"};IfcCostScheduleTypeEnum.TENDER={type:3,value:"TENDER"};IfcCostScheduleTypeEnum.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"};IfcCostScheduleTypeEnum.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"};IfcCostScheduleTypeEnum.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"};IfcCostScheduleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCostScheduleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCostScheduleTypeEnum=IfcCostScheduleTypeEnum;var IfcCoveringTypeEnum=/*#__PURE__*/_createClass(function IfcCoveringTypeEnum(){_classCallCheck(this,IfcCoveringTypeEnum);});IfcCoveringTypeEnum.CEILING={type:3,value:"CEILING"};IfcCoveringTypeEnum.FLOORING={type:3,value:"FLOORING"};IfcCoveringTypeEnum.CLADDING={type:3,value:"CLADDING"};IfcCoveringTypeEnum.ROOFING={type:3,value:"ROOFING"};IfcCoveringTypeEnum.INSULATION={type:3,value:"INSULATION"};IfcCoveringTypeEnum.MEMBRANE={type:3,value:"MEMBRANE"};IfcCoveringTypeEnum.SLEEVING={type:3,value:"SLEEVING"};IfcCoveringTypeEnum.WRAPPING={type:3,value:"WRAPPING"};IfcCoveringTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoveringTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCoveringTypeEnum=IfcCoveringTypeEnum;var IfcCurrencyEnum=/*#__PURE__*/_createClass(function IfcCurrencyEnum(){_classCallCheck(this,IfcCurrencyEnum);});IfcCurrencyEnum.AED={type:3,value:"AED"};IfcCurrencyEnum.AES={type:3,value:"AES"};IfcCurrencyEnum.ATS={type:3,value:"ATS"};IfcCurrencyEnum.AUD={type:3,value:"AUD"};IfcCurrencyEnum.BBD={type:3,value:"BBD"};IfcCurrencyEnum.BEG={type:3,value:"BEG"};IfcCurrencyEnum.BGL={type:3,value:"BGL"};IfcCurrencyEnum.BHD={type:3,value:"BHD"};IfcCurrencyEnum.BMD={type:3,value:"BMD"};IfcCurrencyEnum.BND={type:3,value:"BND"};IfcCurrencyEnum.BRL={type:3,value:"BRL"};IfcCurrencyEnum.BSD={type:3,value:"BSD"};IfcCurrencyEnum.BWP={type:3,value:"BWP"};IfcCurrencyEnum.BZD={type:3,value:"BZD"};IfcCurrencyEnum.CAD={type:3,value:"CAD"};IfcCurrencyEnum.CBD={type:3,value:"CBD"};IfcCurrencyEnum.CHF={type:3,value:"CHF"};IfcCurrencyEnum.CLP={type:3,value:"CLP"};IfcCurrencyEnum.CNY={type:3,value:"CNY"};IfcCurrencyEnum.CYS={type:3,value:"CYS"};IfcCurrencyEnum.CZK={type:3,value:"CZK"};IfcCurrencyEnum.DDP={type:3,value:"DDP"};IfcCurrencyEnum.DEM={type:3,value:"DEM"};IfcCurrencyEnum.DKK={type:3,value:"DKK"};IfcCurrencyEnum.EGL={type:3,value:"EGL"};IfcCurrencyEnum.EST={type:3,value:"EST"};IfcCurrencyEnum.EUR={type:3,value:"EUR"};IfcCurrencyEnum.FAK={type:3,value:"FAK"};IfcCurrencyEnum.FIM={type:3,value:"FIM"};IfcCurrencyEnum.FJD={type:3,value:"FJD"};IfcCurrencyEnum.FKP={type:3,value:"FKP"};IfcCurrencyEnum.FRF={type:3,value:"FRF"};IfcCurrencyEnum.GBP={type:3,value:"GBP"};IfcCurrencyEnum.GIP={type:3,value:"GIP"};IfcCurrencyEnum.GMD={type:3,value:"GMD"};IfcCurrencyEnum.GRX={type:3,value:"GRX"};IfcCurrencyEnum.HKD={type:3,value:"HKD"};IfcCurrencyEnum.HUF={type:3,value:"HUF"};IfcCurrencyEnum.ICK={type:3,value:"ICK"};IfcCurrencyEnum.IDR={type:3,value:"IDR"};IfcCurrencyEnum.ILS={type:3,value:"ILS"};IfcCurrencyEnum.INR={type:3,value:"INR"};IfcCurrencyEnum.IRP={type:3,value:"IRP"};IfcCurrencyEnum.ITL={type:3,value:"ITL"};IfcCurrencyEnum.JMD={type:3,value:"JMD"};IfcCurrencyEnum.JOD={type:3,value:"JOD"};IfcCurrencyEnum.JPY={type:3,value:"JPY"};IfcCurrencyEnum.KES={type:3,value:"KES"};IfcCurrencyEnum.KRW={type:3,value:"KRW"};IfcCurrencyEnum.KWD={type:3,value:"KWD"};IfcCurrencyEnum.KYD={type:3,value:"KYD"};IfcCurrencyEnum.LKR={type:3,value:"LKR"};IfcCurrencyEnum.LUF={type:3,value:"LUF"};IfcCurrencyEnum.MTL={type:3,value:"MTL"};IfcCurrencyEnum.MUR={type:3,value:"MUR"};IfcCurrencyEnum.MXN={type:3,value:"MXN"};IfcCurrencyEnum.MYR={type:3,value:"MYR"};IfcCurrencyEnum.NLG={type:3,value:"NLG"};IfcCurrencyEnum.NZD={type:3,value:"NZD"};IfcCurrencyEnum.OMR={type:3,value:"OMR"};IfcCurrencyEnum.PGK={type:3,value:"PGK"};IfcCurrencyEnum.PHP={type:3,value:"PHP"};IfcCurrencyEnum.PKR={type:3,value:"PKR"};IfcCurrencyEnum.PLN={type:3,value:"PLN"};IfcCurrencyEnum.PTN={type:3,value:"PTN"};IfcCurrencyEnum.QAR={type:3,value:"QAR"};IfcCurrencyEnum.RUR={type:3,value:"RUR"};IfcCurrencyEnum.SAR={type:3,value:"SAR"};IfcCurrencyEnum.SCR={type:3,value:"SCR"};IfcCurrencyEnum.SEK={type:3,value:"SEK"};IfcCurrencyEnum.SGD={type:3,value:"SGD"};IfcCurrencyEnum.SKP={type:3,value:"SKP"};IfcCurrencyEnum.THB={type:3,value:"THB"};IfcCurrencyEnum.TRL={type:3,value:"TRL"};IfcCurrencyEnum.TTD={type:3,value:"TTD"};IfcCurrencyEnum.TWD={type:3,value:"TWD"};IfcCurrencyEnum.USD={type:3,value:"USD"};IfcCurrencyEnum.VEB={type:3,value:"VEB"};IfcCurrencyEnum.VND={type:3,value:"VND"};IfcCurrencyEnum.XEU={type:3,value:"XEU"};IfcCurrencyEnum.ZAR={type:3,value:"ZAR"};IfcCurrencyEnum.ZWD={type:3,value:"ZWD"};IfcCurrencyEnum.NOK={type:3,value:"NOK"};IFC2X32.IfcCurrencyEnum=IfcCurrencyEnum;var IfcCurtainWallTypeEnum=/*#__PURE__*/_createClass(function IfcCurtainWallTypeEnum(){_classCallCheck(this,IfcCurtainWallTypeEnum);});IfcCurtainWallTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCurtainWallTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcCurtainWallTypeEnum=IfcCurtainWallTypeEnum;var IfcDamperTypeEnum=/*#__PURE__*/_createClass(function IfcDamperTypeEnum(){_classCallCheck(this,IfcDamperTypeEnum);});IfcDamperTypeEnum.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"};IfcDamperTypeEnum.FIREDAMPER={type:3,value:"FIREDAMPER"};IfcDamperTypeEnum.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"};IfcDamperTypeEnum.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"};IfcDamperTypeEnum.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"};IfcDamperTypeEnum.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"};IfcDamperTypeEnum.BLASTDAMPER={type:3,value:"BLASTDAMPER"};IfcDamperTypeEnum.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"};IfcDamperTypeEnum.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"};IfcDamperTypeEnum.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"};IfcDamperTypeEnum.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"};IfcDamperTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDamperTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDamperTypeEnum=IfcDamperTypeEnum;var IfcDataOriginEnum=/*#__PURE__*/_createClass(function IfcDataOriginEnum(){_classCallCheck(this,IfcDataOriginEnum);});IfcDataOriginEnum.MEASURED={type:3,value:"MEASURED"};IfcDataOriginEnum.PREDICTED={type:3,value:"PREDICTED"};IfcDataOriginEnum.SIMULATED={type:3,value:"SIMULATED"};IfcDataOriginEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDataOriginEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDataOriginEnum=IfcDataOriginEnum;var IfcDerivedUnitEnum=/*#__PURE__*/_createClass(function IfcDerivedUnitEnum(){_classCallCheck(this,IfcDerivedUnitEnum);});IfcDerivedUnitEnum.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"};IfcDerivedUnitEnum.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"};IfcDerivedUnitEnum.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"};IfcDerivedUnitEnum.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"};IfcDerivedUnitEnum.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"};IfcDerivedUnitEnum.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"};IfcDerivedUnitEnum.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"};IfcDerivedUnitEnum.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"};IfcDerivedUnitEnum.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"};IfcDerivedUnitEnum.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"};IfcDerivedUnitEnum.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"};IfcDerivedUnitEnum.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"};IfcDerivedUnitEnum.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"};IfcDerivedUnitEnum.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"};IfcDerivedUnitEnum.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"};IfcDerivedUnitEnum.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"};IfcDerivedUnitEnum.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"};IfcDerivedUnitEnum.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"};IfcDerivedUnitEnum.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"};IfcDerivedUnitEnum.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"};IfcDerivedUnitEnum.TORQUEUNIT={type:3,value:"TORQUEUNIT"};IfcDerivedUnitEnum.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"};IfcDerivedUnitEnum.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"};IfcDerivedUnitEnum.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"};IfcDerivedUnitEnum.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"};IfcDerivedUnitEnum.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"};IfcDerivedUnitEnum.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"};IfcDerivedUnitEnum.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"};IfcDerivedUnitEnum.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"};IfcDerivedUnitEnum.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"};IfcDerivedUnitEnum.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"};IfcDerivedUnitEnum.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"};IfcDerivedUnitEnum.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"};IfcDerivedUnitEnum.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"};IfcDerivedUnitEnum.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"};IfcDerivedUnitEnum.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.PHUNIT={type:3,value:"PHUNIT"};IfcDerivedUnitEnum.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"};IfcDerivedUnitEnum.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"};IfcDerivedUnitEnum.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"};IfcDerivedUnitEnum.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"};IfcDerivedUnitEnum.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"};IfcDerivedUnitEnum.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"};IfcDerivedUnitEnum.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"};IfcDerivedUnitEnum.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"};IfcDerivedUnitEnum.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"};IfcDerivedUnitEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC2X32.IfcDerivedUnitEnum=IfcDerivedUnitEnum;var IfcDimensionExtentUsage=/*#__PURE__*/_createClass(function IfcDimensionExtentUsage(){_classCallCheck(this,IfcDimensionExtentUsage);});IfcDimensionExtentUsage.ORIGIN={type:3,value:"ORIGIN"};IfcDimensionExtentUsage.TARGET={type:3,value:"TARGET"};IFC2X32.IfcDimensionExtentUsage=IfcDimensionExtentUsage;var IfcDirectionSenseEnum=/*#__PURE__*/_createClass(function IfcDirectionSenseEnum(){_classCallCheck(this,IfcDirectionSenseEnum);});IfcDirectionSenseEnum.POSITIVE={type:3,value:"POSITIVE"};IfcDirectionSenseEnum.NEGATIVE={type:3,value:"NEGATIVE"};IFC2X32.IfcDirectionSenseEnum=IfcDirectionSenseEnum;var IfcDistributionChamberElementTypeEnum=/*#__PURE__*/_createClass(function IfcDistributionChamberElementTypeEnum(){_classCallCheck(this,IfcDistributionChamberElementTypeEnum);});IfcDistributionChamberElementTypeEnum.FORMEDDUCT={type:3,value:"FORMEDDUCT"};IfcDistributionChamberElementTypeEnum.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"};IfcDistributionChamberElementTypeEnum.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"};IfcDistributionChamberElementTypeEnum.MANHOLE={type:3,value:"MANHOLE"};IfcDistributionChamberElementTypeEnum.METERCHAMBER={type:3,value:"METERCHAMBER"};IfcDistributionChamberElementTypeEnum.SUMP={type:3,value:"SUMP"};IfcDistributionChamberElementTypeEnum.TRENCH={type:3,value:"TRENCH"};IfcDistributionChamberElementTypeEnum.VALVECHAMBER={type:3,value:"VALVECHAMBER"};IfcDistributionChamberElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionChamberElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDistributionChamberElementTypeEnum=IfcDistributionChamberElementTypeEnum;var IfcDocumentConfidentialityEnum=/*#__PURE__*/_createClass(function IfcDocumentConfidentialityEnum(){_classCallCheck(this,IfcDocumentConfidentialityEnum);});IfcDocumentConfidentialityEnum.PUBLIC={type:3,value:"PUBLIC"};IfcDocumentConfidentialityEnum.RESTRICTED={type:3,value:"RESTRICTED"};IfcDocumentConfidentialityEnum.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"};IfcDocumentConfidentialityEnum.PERSONAL={type:3,value:"PERSONAL"};IfcDocumentConfidentialityEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDocumentConfidentialityEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDocumentConfidentialityEnum=IfcDocumentConfidentialityEnum;var IfcDocumentStatusEnum=/*#__PURE__*/_createClass(function IfcDocumentStatusEnum(){_classCallCheck(this,IfcDocumentStatusEnum);});IfcDocumentStatusEnum.DRAFT={type:3,value:"DRAFT"};IfcDocumentStatusEnum.FINALDRAFT={type:3,value:"FINALDRAFT"};IfcDocumentStatusEnum.FINAL={type:3,value:"FINAL"};IfcDocumentStatusEnum.REVISION={type:3,value:"REVISION"};IfcDocumentStatusEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDocumentStatusEnum=IfcDocumentStatusEnum;var IfcDoorPanelOperationEnum=/*#__PURE__*/_createClass(function IfcDoorPanelOperationEnum(){_classCallCheck(this,IfcDoorPanelOperationEnum);});IfcDoorPanelOperationEnum.SWINGING={type:3,value:"SWINGING"};IfcDoorPanelOperationEnum.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"};IfcDoorPanelOperationEnum.SLIDING={type:3,value:"SLIDING"};IfcDoorPanelOperationEnum.FOLDING={type:3,value:"FOLDING"};IfcDoorPanelOperationEnum.REVOLVING={type:3,value:"REVOLVING"};IfcDoorPanelOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorPanelOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorPanelOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDoorPanelOperationEnum=IfcDoorPanelOperationEnum;var IfcDoorPanelPositionEnum=/*#__PURE__*/_createClass(function IfcDoorPanelPositionEnum(){_classCallCheck(this,IfcDoorPanelPositionEnum);});IfcDoorPanelPositionEnum.LEFT={type:3,value:"LEFT"};IfcDoorPanelPositionEnum.MIDDLE={type:3,value:"MIDDLE"};IfcDoorPanelPositionEnum.RIGHT={type:3,value:"RIGHT"};IfcDoorPanelPositionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDoorPanelPositionEnum=IfcDoorPanelPositionEnum;var IfcDoorStyleConstructionEnum=/*#__PURE__*/_createClass(function IfcDoorStyleConstructionEnum(){_classCallCheck(this,IfcDoorStyleConstructionEnum);});IfcDoorStyleConstructionEnum.ALUMINIUM={type:3,value:"ALUMINIUM"};IfcDoorStyleConstructionEnum.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"};IfcDoorStyleConstructionEnum.STEEL={type:3,value:"STEEL"};IfcDoorStyleConstructionEnum.WOOD={type:3,value:"WOOD"};IfcDoorStyleConstructionEnum.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"};IfcDoorStyleConstructionEnum.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"};IfcDoorStyleConstructionEnum.PLASTIC={type:3,value:"PLASTIC"};IfcDoorStyleConstructionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorStyleConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDoorStyleConstructionEnum=IfcDoorStyleConstructionEnum;var IfcDoorStyleOperationEnum=/*#__PURE__*/_createClass(function IfcDoorStyleOperationEnum(){_classCallCheck(this,IfcDoorStyleOperationEnum);});IfcDoorStyleOperationEnum.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"};IfcDoorStyleOperationEnum.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"};IfcDoorStyleOperationEnum.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"};IfcDoorStyleOperationEnum.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"};IfcDoorStyleOperationEnum.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"};IfcDoorStyleOperationEnum.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"};IfcDoorStyleOperationEnum.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"};IfcDoorStyleOperationEnum.REVOLVING={type:3,value:"REVOLVING"};IfcDoorStyleOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorStyleOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorStyleOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDoorStyleOperationEnum=IfcDoorStyleOperationEnum;var IfcDuctFittingTypeEnum=/*#__PURE__*/_createClass(function IfcDuctFittingTypeEnum(){_classCallCheck(this,IfcDuctFittingTypeEnum);});IfcDuctFittingTypeEnum.BEND={type:3,value:"BEND"};IfcDuctFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcDuctFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcDuctFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcDuctFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcDuctFittingTypeEnum.OBSTRUCTION={type:3,value:"OBSTRUCTION"};IfcDuctFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcDuctFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDuctFittingTypeEnum=IfcDuctFittingTypeEnum;var IfcDuctSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcDuctSegmentTypeEnum(){_classCallCheck(this,IfcDuctSegmentTypeEnum);});IfcDuctSegmentTypeEnum.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"};IfcDuctSegmentTypeEnum.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"};IfcDuctSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDuctSegmentTypeEnum=IfcDuctSegmentTypeEnum;var IfcDuctSilencerTypeEnum=/*#__PURE__*/_createClass(function IfcDuctSilencerTypeEnum(){_classCallCheck(this,IfcDuctSilencerTypeEnum);});IfcDuctSilencerTypeEnum.FLATOVAL={type:3,value:"FLATOVAL"};IfcDuctSilencerTypeEnum.RECTANGULAR={type:3,value:"RECTANGULAR"};IfcDuctSilencerTypeEnum.ROUND={type:3,value:"ROUND"};IfcDuctSilencerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctSilencerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcDuctSilencerTypeEnum=IfcDuctSilencerTypeEnum;var IfcElectricApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcElectricApplianceTypeEnum(){_classCallCheck(this,IfcElectricApplianceTypeEnum);});IfcElectricApplianceTypeEnum.COMPUTER={type:3,value:"COMPUTER"};IfcElectricApplianceTypeEnum.DIRECTWATERHEATER={type:3,value:"DIRECTWATERHEATER"};IfcElectricApplianceTypeEnum.DISHWASHER={type:3,value:"DISHWASHER"};IfcElectricApplianceTypeEnum.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"};IfcElectricApplianceTypeEnum.ELECTRICHEATER={type:3,value:"ELECTRICHEATER"};IfcElectricApplianceTypeEnum.FACSIMILE={type:3,value:"FACSIMILE"};IfcElectricApplianceTypeEnum.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"};IfcElectricApplianceTypeEnum.FREEZER={type:3,value:"FREEZER"};IfcElectricApplianceTypeEnum.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"};IfcElectricApplianceTypeEnum.HANDDRYER={type:3,value:"HANDDRYER"};IfcElectricApplianceTypeEnum.INDIRECTWATERHEATER={type:3,value:"INDIRECTWATERHEATER"};IfcElectricApplianceTypeEnum.MICROWAVE={type:3,value:"MICROWAVE"};IfcElectricApplianceTypeEnum.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"};IfcElectricApplianceTypeEnum.PRINTER={type:3,value:"PRINTER"};IfcElectricApplianceTypeEnum.REFRIGERATOR={type:3,value:"REFRIGERATOR"};IfcElectricApplianceTypeEnum.RADIANTHEATER={type:3,value:"RADIANTHEATER"};IfcElectricApplianceTypeEnum.SCANNER={type:3,value:"SCANNER"};IfcElectricApplianceTypeEnum.TELEPHONE={type:3,value:"TELEPHONE"};IfcElectricApplianceTypeEnum.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"};IfcElectricApplianceTypeEnum.TV={type:3,value:"TV"};IfcElectricApplianceTypeEnum.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"};IfcElectricApplianceTypeEnum.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"};IfcElectricApplianceTypeEnum.WATERHEATER={type:3,value:"WATERHEATER"};IfcElectricApplianceTypeEnum.WATERCOOLER={type:3,value:"WATERCOOLER"};IfcElectricApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricApplianceTypeEnum=IfcElectricApplianceTypeEnum;var IfcElectricCurrentEnum=/*#__PURE__*/_createClass(function IfcElectricCurrentEnum(){_classCallCheck(this,IfcElectricCurrentEnum);});IfcElectricCurrentEnum.ALTERNATING={type:3,value:"ALTERNATING"};IfcElectricCurrentEnum.DIRECT={type:3,value:"DIRECT"};IfcElectricCurrentEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricCurrentEnum=IfcElectricCurrentEnum;var IfcElectricDistributionPointFunctionEnum=/*#__PURE__*/_createClass(function IfcElectricDistributionPointFunctionEnum(){_classCallCheck(this,IfcElectricDistributionPointFunctionEnum);});IfcElectricDistributionPointFunctionEnum.ALARMPANEL={type:3,value:"ALARMPANEL"};IfcElectricDistributionPointFunctionEnum.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"};IfcElectricDistributionPointFunctionEnum.CONTROLPANEL={type:3,value:"CONTROLPANEL"};IfcElectricDistributionPointFunctionEnum.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"};IfcElectricDistributionPointFunctionEnum.GASDETECTORPANEL={type:3,value:"GASDETECTORPANEL"};IfcElectricDistributionPointFunctionEnum.INDICATORPANEL={type:3,value:"INDICATORPANEL"};IfcElectricDistributionPointFunctionEnum.MIMICPANEL={type:3,value:"MIMICPANEL"};IfcElectricDistributionPointFunctionEnum.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"};IfcElectricDistributionPointFunctionEnum.SWITCHBOARD={type:3,value:"SWITCHBOARD"};IfcElectricDistributionPointFunctionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricDistributionPointFunctionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricDistributionPointFunctionEnum=IfcElectricDistributionPointFunctionEnum;var IfcElectricFlowStorageDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcElectricFlowStorageDeviceTypeEnum(){_classCallCheck(this,IfcElectricFlowStorageDeviceTypeEnum);});IfcElectricFlowStorageDeviceTypeEnum.BATTERY={type:3,value:"BATTERY"};IfcElectricFlowStorageDeviceTypeEnum.CAPACITORBANK={type:3,value:"CAPACITORBANK"};IfcElectricFlowStorageDeviceTypeEnum.HARMONICFILTER={type:3,value:"HARMONICFILTER"};IfcElectricFlowStorageDeviceTypeEnum.INDUCTORBANK={type:3,value:"INDUCTORBANK"};IfcElectricFlowStorageDeviceTypeEnum.UPS={type:3,value:"UPS"};IfcElectricFlowStorageDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricFlowStorageDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricFlowStorageDeviceTypeEnum=IfcElectricFlowStorageDeviceTypeEnum;var IfcElectricGeneratorTypeEnum=/*#__PURE__*/_createClass(function IfcElectricGeneratorTypeEnum(){_classCallCheck(this,IfcElectricGeneratorTypeEnum);});IfcElectricGeneratorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricGeneratorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricGeneratorTypeEnum=IfcElectricGeneratorTypeEnum;var IfcElectricHeaterTypeEnum=/*#__PURE__*/_createClass(function IfcElectricHeaterTypeEnum(){_classCallCheck(this,IfcElectricHeaterTypeEnum);});IfcElectricHeaterTypeEnum.ELECTRICPOINTHEATER={type:3,value:"ELECTRICPOINTHEATER"};IfcElectricHeaterTypeEnum.ELECTRICCABLEHEATER={type:3,value:"ELECTRICCABLEHEATER"};IfcElectricHeaterTypeEnum.ELECTRICMATHEATER={type:3,value:"ELECTRICMATHEATER"};IfcElectricHeaterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricHeaterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricHeaterTypeEnum=IfcElectricHeaterTypeEnum;var IfcElectricMotorTypeEnum=/*#__PURE__*/_createClass(function IfcElectricMotorTypeEnum(){_classCallCheck(this,IfcElectricMotorTypeEnum);});IfcElectricMotorTypeEnum.DC={type:3,value:"DC"};IfcElectricMotorTypeEnum.INDUCTION={type:3,value:"INDUCTION"};IfcElectricMotorTypeEnum.POLYPHASE={type:3,value:"POLYPHASE"};IfcElectricMotorTypeEnum.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"};IfcElectricMotorTypeEnum.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"};IfcElectricMotorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricMotorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricMotorTypeEnum=IfcElectricMotorTypeEnum;var IfcElectricTimeControlTypeEnum=/*#__PURE__*/_createClass(function IfcElectricTimeControlTypeEnum(){_classCallCheck(this,IfcElectricTimeControlTypeEnum);});IfcElectricTimeControlTypeEnum.TIMECLOCK={type:3,value:"TIMECLOCK"};IfcElectricTimeControlTypeEnum.TIMEDELAY={type:3,value:"TIMEDELAY"};IfcElectricTimeControlTypeEnum.RELAY={type:3,value:"RELAY"};IfcElectricTimeControlTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricTimeControlTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElectricTimeControlTypeEnum=IfcElectricTimeControlTypeEnum;var IfcElementAssemblyTypeEnum=/*#__PURE__*/_createClass(function IfcElementAssemblyTypeEnum(){_classCallCheck(this,IfcElementAssemblyTypeEnum);});IfcElementAssemblyTypeEnum.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"};IfcElementAssemblyTypeEnum.ARCH={type:3,value:"ARCH"};IfcElementAssemblyTypeEnum.BEAM_GRID={type:3,value:"BEAM_GRID"};IfcElementAssemblyTypeEnum.BRACED_FRAME={type:3,value:"BRACED_FRAME"};IfcElementAssemblyTypeEnum.GIRDER={type:3,value:"GIRDER"};IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"};IfcElementAssemblyTypeEnum.RIGID_FRAME={type:3,value:"RIGID_FRAME"};IfcElementAssemblyTypeEnum.SLAB_FIELD={type:3,value:"SLAB_FIELD"};IfcElementAssemblyTypeEnum.TRUSS={type:3,value:"TRUSS"};IfcElementAssemblyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElementAssemblyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcElementAssemblyTypeEnum=IfcElementAssemblyTypeEnum;var IfcElementCompositionEnum=/*#__PURE__*/_createClass(function IfcElementCompositionEnum(){_classCallCheck(this,IfcElementCompositionEnum);});IfcElementCompositionEnum.COMPLEX={type:3,value:"COMPLEX"};IfcElementCompositionEnum.ELEMENT={type:3,value:"ELEMENT"};IfcElementCompositionEnum.PARTIAL={type:3,value:"PARTIAL"};IFC2X32.IfcElementCompositionEnum=IfcElementCompositionEnum;var IfcEnergySequenceEnum=/*#__PURE__*/_createClass(function IfcEnergySequenceEnum(){_classCallCheck(this,IfcEnergySequenceEnum);});IfcEnergySequenceEnum.PRIMARY={type:3,value:"PRIMARY"};IfcEnergySequenceEnum.SECONDARY={type:3,value:"SECONDARY"};IfcEnergySequenceEnum.TERTIARY={type:3,value:"TERTIARY"};IfcEnergySequenceEnum.AUXILIARY={type:3,value:"AUXILIARY"};IfcEnergySequenceEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEnergySequenceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcEnergySequenceEnum=IfcEnergySequenceEnum;var IfcEnvironmentalImpactCategoryEnum=/*#__PURE__*/_createClass(function IfcEnvironmentalImpactCategoryEnum(){_classCallCheck(this,IfcEnvironmentalImpactCategoryEnum);});IfcEnvironmentalImpactCategoryEnum.COMBINEDVALUE={type:3,value:"COMBINEDVALUE"};IfcEnvironmentalImpactCategoryEnum.DISPOSAL={type:3,value:"DISPOSAL"};IfcEnvironmentalImpactCategoryEnum.EXTRACTION={type:3,value:"EXTRACTION"};IfcEnvironmentalImpactCategoryEnum.INSTALLATION={type:3,value:"INSTALLATION"};IfcEnvironmentalImpactCategoryEnum.MANUFACTURE={type:3,value:"MANUFACTURE"};IfcEnvironmentalImpactCategoryEnum.TRANSPORTATION={type:3,value:"TRANSPORTATION"};IfcEnvironmentalImpactCategoryEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEnvironmentalImpactCategoryEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcEnvironmentalImpactCategoryEnum=IfcEnvironmentalImpactCategoryEnum;var IfcEvaporativeCoolerTypeEnum=/*#__PURE__*/_createClass(function IfcEvaporativeCoolerTypeEnum(){_classCallCheck(this,IfcEvaporativeCoolerTypeEnum);});IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"};IfcEvaporativeCoolerTypeEnum.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"};IfcEvaporativeCoolerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEvaporativeCoolerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcEvaporativeCoolerTypeEnum=IfcEvaporativeCoolerTypeEnum;var IfcEvaporatorTypeEnum=/*#__PURE__*/_createClass(function IfcEvaporatorTypeEnum(){_classCallCheck(this,IfcEvaporatorTypeEnum);});IfcEvaporatorTypeEnum.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"};IfcEvaporatorTypeEnum.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"};IfcEvaporatorTypeEnum.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"};IfcEvaporatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEvaporatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcEvaporatorTypeEnum=IfcEvaporatorTypeEnum;var IfcFanTypeEnum=/*#__PURE__*/_createClass(function IfcFanTypeEnum(){_classCallCheck(this,IfcFanTypeEnum);});IfcFanTypeEnum.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"};IfcFanTypeEnum.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"};IfcFanTypeEnum.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"};IfcFanTypeEnum.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"};IfcFanTypeEnum.TUBEAXIAL={type:3,value:"TUBEAXIAL"};IfcFanTypeEnum.VANEAXIAL={type:3,value:"VANEAXIAL"};IfcFanTypeEnum.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"};IfcFanTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFanTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcFanTypeEnum=IfcFanTypeEnum;var IfcFilterTypeEnum=/*#__PURE__*/_createClass(function IfcFilterTypeEnum(){_classCallCheck(this,IfcFilterTypeEnum);});IfcFilterTypeEnum.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"};IfcFilterTypeEnum.ODORFILTER={type:3,value:"ODORFILTER"};IfcFilterTypeEnum.OILFILTER={type:3,value:"OILFILTER"};IfcFilterTypeEnum.STRAINER={type:3,value:"STRAINER"};IfcFilterTypeEnum.WATERFILTER={type:3,value:"WATERFILTER"};IfcFilterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFilterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcFilterTypeEnum=IfcFilterTypeEnum;var IfcFireSuppressionTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcFireSuppressionTerminalTypeEnum(){_classCallCheck(this,IfcFireSuppressionTerminalTypeEnum);});IfcFireSuppressionTerminalTypeEnum.BREECHINGINLET={type:3,value:"BREECHINGINLET"};IfcFireSuppressionTerminalTypeEnum.FIREHYDRANT={type:3,value:"FIREHYDRANT"};IfcFireSuppressionTerminalTypeEnum.HOSEREEL={type:3,value:"HOSEREEL"};IfcFireSuppressionTerminalTypeEnum.SPRINKLER={type:3,value:"SPRINKLER"};IfcFireSuppressionTerminalTypeEnum.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"};IfcFireSuppressionTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFireSuppressionTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcFireSuppressionTerminalTypeEnum=IfcFireSuppressionTerminalTypeEnum;var IfcFlowDirectionEnum=/*#__PURE__*/_createClass(function IfcFlowDirectionEnum(){_classCallCheck(this,IfcFlowDirectionEnum);});IfcFlowDirectionEnum.SOURCE={type:3,value:"SOURCE"};IfcFlowDirectionEnum.SINK={type:3,value:"SINK"};IfcFlowDirectionEnum.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"};IfcFlowDirectionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcFlowDirectionEnum=IfcFlowDirectionEnum;var IfcFlowInstrumentTypeEnum=/*#__PURE__*/_createClass(function IfcFlowInstrumentTypeEnum(){_classCallCheck(this,IfcFlowInstrumentTypeEnum);});IfcFlowInstrumentTypeEnum.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"};IfcFlowInstrumentTypeEnum.THERMOMETER={type:3,value:"THERMOMETER"};IfcFlowInstrumentTypeEnum.AMMETER={type:3,value:"AMMETER"};IfcFlowInstrumentTypeEnum.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"};IfcFlowInstrumentTypeEnum.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"};IfcFlowInstrumentTypeEnum.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"};IfcFlowInstrumentTypeEnum.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"};IfcFlowInstrumentTypeEnum.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"};IfcFlowInstrumentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFlowInstrumentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcFlowInstrumentTypeEnum=IfcFlowInstrumentTypeEnum;var IfcFlowMeterTypeEnum=/*#__PURE__*/_createClass(function IfcFlowMeterTypeEnum(){_classCallCheck(this,IfcFlowMeterTypeEnum);});IfcFlowMeterTypeEnum.ELECTRICMETER={type:3,value:"ELECTRICMETER"};IfcFlowMeterTypeEnum.ENERGYMETER={type:3,value:"ENERGYMETER"};IfcFlowMeterTypeEnum.FLOWMETER={type:3,value:"FLOWMETER"};IfcFlowMeterTypeEnum.GASMETER={type:3,value:"GASMETER"};IfcFlowMeterTypeEnum.OILMETER={type:3,value:"OILMETER"};IfcFlowMeterTypeEnum.WATERMETER={type:3,value:"WATERMETER"};IfcFlowMeterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFlowMeterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcFlowMeterTypeEnum=IfcFlowMeterTypeEnum;var IfcFootingTypeEnum=/*#__PURE__*/_createClass(function IfcFootingTypeEnum(){_classCallCheck(this,IfcFootingTypeEnum);});IfcFootingTypeEnum.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"};IfcFootingTypeEnum.PAD_FOOTING={type:3,value:"PAD_FOOTING"};IfcFootingTypeEnum.PILE_CAP={type:3,value:"PILE_CAP"};IfcFootingTypeEnum.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"};IfcFootingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFootingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcFootingTypeEnum=IfcFootingTypeEnum;var IfcGasTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcGasTerminalTypeEnum(){_classCallCheck(this,IfcGasTerminalTypeEnum);});IfcGasTerminalTypeEnum.GASAPPLIANCE={type:3,value:"GASAPPLIANCE"};IfcGasTerminalTypeEnum.GASBOOSTER={type:3,value:"GASBOOSTER"};IfcGasTerminalTypeEnum.GASBURNER={type:3,value:"GASBURNER"};IfcGasTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGasTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcGasTerminalTypeEnum=IfcGasTerminalTypeEnum;var IfcGeometricProjectionEnum=/*#__PURE__*/_createClass(function IfcGeometricProjectionEnum(){_classCallCheck(this,IfcGeometricProjectionEnum);});IfcGeometricProjectionEnum.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"};IfcGeometricProjectionEnum.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"};IfcGeometricProjectionEnum.MODEL_VIEW={type:3,value:"MODEL_VIEW"};IfcGeometricProjectionEnum.PLAN_VIEW={type:3,value:"PLAN_VIEW"};IfcGeometricProjectionEnum.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"};IfcGeometricProjectionEnum.SECTION_VIEW={type:3,value:"SECTION_VIEW"};IfcGeometricProjectionEnum.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"};IfcGeometricProjectionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGeometricProjectionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcGeometricProjectionEnum=IfcGeometricProjectionEnum;var IfcGlobalOrLocalEnum=/*#__PURE__*/_createClass(function IfcGlobalOrLocalEnum(){_classCallCheck(this,IfcGlobalOrLocalEnum);});IfcGlobalOrLocalEnum.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"};IfcGlobalOrLocalEnum.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"};IFC2X32.IfcGlobalOrLocalEnum=IfcGlobalOrLocalEnum;var IfcHeatExchangerTypeEnum=/*#__PURE__*/_createClass(function IfcHeatExchangerTypeEnum(){_classCallCheck(this,IfcHeatExchangerTypeEnum);});IfcHeatExchangerTypeEnum.PLATE={type:3,value:"PLATE"};IfcHeatExchangerTypeEnum.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"};IfcHeatExchangerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcHeatExchangerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcHeatExchangerTypeEnum=IfcHeatExchangerTypeEnum;var IfcHumidifierTypeEnum=/*#__PURE__*/_createClass(function IfcHumidifierTypeEnum(){_classCallCheck(this,IfcHumidifierTypeEnum);});IfcHumidifierTypeEnum.STEAMINJECTION={type:3,value:"STEAMINJECTION"};IfcHumidifierTypeEnum.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"};IfcHumidifierTypeEnum.ADIABATICPAN={type:3,value:"ADIABATICPAN"};IfcHumidifierTypeEnum.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"};IfcHumidifierTypeEnum.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"};IfcHumidifierTypeEnum.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"};IfcHumidifierTypeEnum.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"};IfcHumidifierTypeEnum.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"};IfcHumidifierTypeEnum.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"};IfcHumidifierTypeEnum.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"};IfcHumidifierTypeEnum.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"};IfcHumidifierTypeEnum.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"};IfcHumidifierTypeEnum.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"};IfcHumidifierTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcHumidifierTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcHumidifierTypeEnum=IfcHumidifierTypeEnum;var IfcInternalOrExternalEnum=/*#__PURE__*/_createClass(function IfcInternalOrExternalEnum(){_classCallCheck(this,IfcInternalOrExternalEnum);});IfcInternalOrExternalEnum.INTERNAL={type:3,value:"INTERNAL"};IfcInternalOrExternalEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcInternalOrExternalEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcInternalOrExternalEnum=IfcInternalOrExternalEnum;var IfcInventoryTypeEnum=/*#__PURE__*/_createClass(function IfcInventoryTypeEnum(){_classCallCheck(this,IfcInventoryTypeEnum);});IfcInventoryTypeEnum.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"};IfcInventoryTypeEnum.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"};IfcInventoryTypeEnum.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"};IfcInventoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcInventoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcInventoryTypeEnum=IfcInventoryTypeEnum;var IfcJunctionBoxTypeEnum=/*#__PURE__*/_createClass(function IfcJunctionBoxTypeEnum(){_classCallCheck(this,IfcJunctionBoxTypeEnum);});IfcJunctionBoxTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcJunctionBoxTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcJunctionBoxTypeEnum=IfcJunctionBoxTypeEnum;var IfcLampTypeEnum=/*#__PURE__*/_createClass(function IfcLampTypeEnum(){_classCallCheck(this,IfcLampTypeEnum);});IfcLampTypeEnum.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"};IfcLampTypeEnum.FLUORESCENT={type:3,value:"FLUORESCENT"};IfcLampTypeEnum.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"};IfcLampTypeEnum.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"};IfcLampTypeEnum.METALHALIDE={type:3,value:"METALHALIDE"};IfcLampTypeEnum.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"};IfcLampTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLampTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcLampTypeEnum=IfcLampTypeEnum;var IfcLayerSetDirectionEnum=/*#__PURE__*/_createClass(function IfcLayerSetDirectionEnum(){_classCallCheck(this,IfcLayerSetDirectionEnum);});IfcLayerSetDirectionEnum.AXIS1={type:3,value:"AXIS1"};IfcLayerSetDirectionEnum.AXIS2={type:3,value:"AXIS2"};IfcLayerSetDirectionEnum.AXIS3={type:3,value:"AXIS3"};IFC2X32.IfcLayerSetDirectionEnum=IfcLayerSetDirectionEnum;var IfcLightDistributionCurveEnum=/*#__PURE__*/_createClass(function IfcLightDistributionCurveEnum(){_classCallCheck(this,IfcLightDistributionCurveEnum);});IfcLightDistributionCurveEnum.TYPE_A={type:3,value:"TYPE_A"};IfcLightDistributionCurveEnum.TYPE_B={type:3,value:"TYPE_B"};IfcLightDistributionCurveEnum.TYPE_C={type:3,value:"TYPE_C"};IfcLightDistributionCurveEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcLightDistributionCurveEnum=IfcLightDistributionCurveEnum;var IfcLightEmissionSourceEnum=/*#__PURE__*/_createClass(function IfcLightEmissionSourceEnum(){_classCallCheck(this,IfcLightEmissionSourceEnum);});IfcLightEmissionSourceEnum.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"};IfcLightEmissionSourceEnum.FLUORESCENT={type:3,value:"FLUORESCENT"};IfcLightEmissionSourceEnum.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"};IfcLightEmissionSourceEnum.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"};IfcLightEmissionSourceEnum.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"};IfcLightEmissionSourceEnum.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"};IfcLightEmissionSourceEnum.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"};IfcLightEmissionSourceEnum.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"};IfcLightEmissionSourceEnum.METALHALIDE={type:3,value:"METALHALIDE"};IfcLightEmissionSourceEnum.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"};IfcLightEmissionSourceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcLightEmissionSourceEnum=IfcLightEmissionSourceEnum;var IfcLightFixtureTypeEnum=/*#__PURE__*/_createClass(function IfcLightFixtureTypeEnum(){_classCallCheck(this,IfcLightFixtureTypeEnum);});IfcLightFixtureTypeEnum.POINTSOURCE={type:3,value:"POINTSOURCE"};IfcLightFixtureTypeEnum.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"};IfcLightFixtureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLightFixtureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcLightFixtureTypeEnum=IfcLightFixtureTypeEnum;var IfcLoadGroupTypeEnum=/*#__PURE__*/_createClass(function IfcLoadGroupTypeEnum(){_classCallCheck(this,IfcLoadGroupTypeEnum);});IfcLoadGroupTypeEnum.LOAD_GROUP={type:3,value:"LOAD_GROUP"};IfcLoadGroupTypeEnum.LOAD_CASE={type:3,value:"LOAD_CASE"};IfcLoadGroupTypeEnum.LOAD_COMBINATION_GROUP={type:3,value:"LOAD_COMBINATION_GROUP"};IfcLoadGroupTypeEnum.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"};IfcLoadGroupTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLoadGroupTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcLoadGroupTypeEnum=IfcLoadGroupTypeEnum;var IfcLogicalOperatorEnum=/*#__PURE__*/_createClass(function IfcLogicalOperatorEnum(){_classCallCheck(this,IfcLogicalOperatorEnum);});IfcLogicalOperatorEnum.LOGICALAND={type:3,value:"LOGICALAND"};IfcLogicalOperatorEnum.LOGICALOR={type:3,value:"LOGICALOR"};IFC2X32.IfcLogicalOperatorEnum=IfcLogicalOperatorEnum;var IfcMemberTypeEnum=/*#__PURE__*/_createClass(function IfcMemberTypeEnum(){_classCallCheck(this,IfcMemberTypeEnum);});IfcMemberTypeEnum.BRACE={type:3,value:"BRACE"};IfcMemberTypeEnum.CHORD={type:3,value:"CHORD"};IfcMemberTypeEnum.COLLAR={type:3,value:"COLLAR"};IfcMemberTypeEnum.MEMBER={type:3,value:"MEMBER"};IfcMemberTypeEnum.MULLION={type:3,value:"MULLION"};IfcMemberTypeEnum.PLATE={type:3,value:"PLATE"};IfcMemberTypeEnum.POST={type:3,value:"POST"};IfcMemberTypeEnum.PURLIN={type:3,value:"PURLIN"};IfcMemberTypeEnum.RAFTER={type:3,value:"RAFTER"};IfcMemberTypeEnum.STRINGER={type:3,value:"STRINGER"};IfcMemberTypeEnum.STRUT={type:3,value:"STRUT"};IfcMemberTypeEnum.STUD={type:3,value:"STUD"};IfcMemberTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMemberTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcMemberTypeEnum=IfcMemberTypeEnum;var IfcMotorConnectionTypeEnum=/*#__PURE__*/_createClass(function IfcMotorConnectionTypeEnum(){_classCallCheck(this,IfcMotorConnectionTypeEnum);});IfcMotorConnectionTypeEnum.BELTDRIVE={type:3,value:"BELTDRIVE"};IfcMotorConnectionTypeEnum.COUPLING={type:3,value:"COUPLING"};IfcMotorConnectionTypeEnum.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"};IfcMotorConnectionTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMotorConnectionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcMotorConnectionTypeEnum=IfcMotorConnectionTypeEnum;var IfcNullStyle=/*#__PURE__*/_createClass(function IfcNullStyle(){_classCallCheck(this,IfcNullStyle);});IfcNullStyle.NULL={type:3,value:"NULL"};IFC2X32.IfcNullStyle=IfcNullStyle;var IfcObjectTypeEnum=/*#__PURE__*/_createClass(function IfcObjectTypeEnum(){_classCallCheck(this,IfcObjectTypeEnum);});IfcObjectTypeEnum.PRODUCT={type:3,value:"PRODUCT"};IfcObjectTypeEnum.PROCESS={type:3,value:"PROCESS"};IfcObjectTypeEnum.CONTROL={type:3,value:"CONTROL"};IfcObjectTypeEnum.RESOURCE={type:3,value:"RESOURCE"};IfcObjectTypeEnum.ACTOR={type:3,value:"ACTOR"};IfcObjectTypeEnum.GROUP={type:3,value:"GROUP"};IfcObjectTypeEnum.PROJECT={type:3,value:"PROJECT"};IfcObjectTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcObjectTypeEnum=IfcObjectTypeEnum;var IfcObjectiveEnum=/*#__PURE__*/_createClass(function IfcObjectiveEnum(){_classCallCheck(this,IfcObjectiveEnum);});IfcObjectiveEnum.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"};IfcObjectiveEnum.DESIGNINTENT={type:3,value:"DESIGNINTENT"};IfcObjectiveEnum.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"};IfcObjectiveEnum.REQUIREMENT={type:3,value:"REQUIREMENT"};IfcObjectiveEnum.SPECIFICATION={type:3,value:"SPECIFICATION"};IfcObjectiveEnum.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"};IfcObjectiveEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcObjectiveEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcObjectiveEnum=IfcObjectiveEnum;var IfcOccupantTypeEnum=/*#__PURE__*/_createClass(function IfcOccupantTypeEnum(){_classCallCheck(this,IfcOccupantTypeEnum);});IfcOccupantTypeEnum.ASSIGNEE={type:3,value:"ASSIGNEE"};IfcOccupantTypeEnum.ASSIGNOR={type:3,value:"ASSIGNOR"};IfcOccupantTypeEnum.LESSEE={type:3,value:"LESSEE"};IfcOccupantTypeEnum.LESSOR={type:3,value:"LESSOR"};IfcOccupantTypeEnum.LETTINGAGENT={type:3,value:"LETTINGAGENT"};IfcOccupantTypeEnum.OWNER={type:3,value:"OWNER"};IfcOccupantTypeEnum.TENANT={type:3,value:"TENANT"};IfcOccupantTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOccupantTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcOccupantTypeEnum=IfcOccupantTypeEnum;var IfcOutletTypeEnum=/*#__PURE__*/_createClass(function IfcOutletTypeEnum(){_classCallCheck(this,IfcOutletTypeEnum);});IfcOutletTypeEnum.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"};IfcOutletTypeEnum.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"};IfcOutletTypeEnum.POWEROUTLET={type:3,value:"POWEROUTLET"};IfcOutletTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOutletTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcOutletTypeEnum=IfcOutletTypeEnum;var IfcPermeableCoveringOperationEnum=/*#__PURE__*/_createClass(function IfcPermeableCoveringOperationEnum(){_classCallCheck(this,IfcPermeableCoveringOperationEnum);});IfcPermeableCoveringOperationEnum.GRILL={type:3,value:"GRILL"};IfcPermeableCoveringOperationEnum.LOUVER={type:3,value:"LOUVER"};IfcPermeableCoveringOperationEnum.SCREEN={type:3,value:"SCREEN"};IfcPermeableCoveringOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPermeableCoveringOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPermeableCoveringOperationEnum=IfcPermeableCoveringOperationEnum;var IfcPhysicalOrVirtualEnum=/*#__PURE__*/_createClass(function IfcPhysicalOrVirtualEnum(){_classCallCheck(this,IfcPhysicalOrVirtualEnum);});IfcPhysicalOrVirtualEnum.PHYSICAL={type:3,value:"PHYSICAL"};IfcPhysicalOrVirtualEnum.VIRTUAL={type:3,value:"VIRTUAL"};IfcPhysicalOrVirtualEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPhysicalOrVirtualEnum=IfcPhysicalOrVirtualEnum;var IfcPileConstructionEnum=/*#__PURE__*/_createClass(function IfcPileConstructionEnum(){_classCallCheck(this,IfcPileConstructionEnum);});IfcPileConstructionEnum.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"};IfcPileConstructionEnum.COMPOSITE={type:3,value:"COMPOSITE"};IfcPileConstructionEnum.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"};IfcPileConstructionEnum.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"};IfcPileConstructionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPileConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPileConstructionEnum=IfcPileConstructionEnum;var IfcPileTypeEnum=/*#__PURE__*/_createClass(function IfcPileTypeEnum(){_classCallCheck(this,IfcPileTypeEnum);});IfcPileTypeEnum.COHESION={type:3,value:"COHESION"};IfcPileTypeEnum.FRICTION={type:3,value:"FRICTION"};IfcPileTypeEnum.SUPPORT={type:3,value:"SUPPORT"};IfcPileTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPileTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPileTypeEnum=IfcPileTypeEnum;var IfcPipeFittingTypeEnum=/*#__PURE__*/_createClass(function IfcPipeFittingTypeEnum(){_classCallCheck(this,IfcPipeFittingTypeEnum);});IfcPipeFittingTypeEnum.BEND={type:3,value:"BEND"};IfcPipeFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcPipeFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcPipeFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcPipeFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcPipeFittingTypeEnum.OBSTRUCTION={type:3,value:"OBSTRUCTION"};IfcPipeFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcPipeFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPipeFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPipeFittingTypeEnum=IfcPipeFittingTypeEnum;var IfcPipeSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcPipeSegmentTypeEnum(){_classCallCheck(this,IfcPipeSegmentTypeEnum);});IfcPipeSegmentTypeEnum.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"};IfcPipeSegmentTypeEnum.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"};IfcPipeSegmentTypeEnum.GUTTER={type:3,value:"GUTTER"};IfcPipeSegmentTypeEnum.SPOOL={type:3,value:"SPOOL"};IfcPipeSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPipeSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPipeSegmentTypeEnum=IfcPipeSegmentTypeEnum;var IfcPlateTypeEnum=/*#__PURE__*/_createClass(function IfcPlateTypeEnum(){_classCallCheck(this,IfcPlateTypeEnum);});IfcPlateTypeEnum.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"};IfcPlateTypeEnum.SHEET={type:3,value:"SHEET"};IfcPlateTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPlateTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPlateTypeEnum=IfcPlateTypeEnum;var IfcProcedureTypeEnum=/*#__PURE__*/_createClass(function IfcProcedureTypeEnum(){_classCallCheck(this,IfcProcedureTypeEnum);});IfcProcedureTypeEnum.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"};IfcProcedureTypeEnum.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"};IfcProcedureTypeEnum.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"};IfcProcedureTypeEnum.CALIBRATION={type:3,value:"CALIBRATION"};IfcProcedureTypeEnum.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"};IfcProcedureTypeEnum.SHUTDOWN={type:3,value:"SHUTDOWN"};IfcProcedureTypeEnum.STARTUP={type:3,value:"STARTUP"};IfcProcedureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProcedureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcProcedureTypeEnum=IfcProcedureTypeEnum;var IfcProfileTypeEnum=/*#__PURE__*/_createClass(function IfcProfileTypeEnum(){_classCallCheck(this,IfcProfileTypeEnum);});IfcProfileTypeEnum.CURVE={type:3,value:"CURVE"};IfcProfileTypeEnum.AREA={type:3,value:"AREA"};IFC2X32.IfcProfileTypeEnum=IfcProfileTypeEnum;var IfcProjectOrderRecordTypeEnum=/*#__PURE__*/_createClass(function IfcProjectOrderRecordTypeEnum(){_classCallCheck(this,IfcProjectOrderRecordTypeEnum);});IfcProjectOrderRecordTypeEnum.CHANGE={type:3,value:"CHANGE"};IfcProjectOrderRecordTypeEnum.MAINTENANCE={type:3,value:"MAINTENANCE"};IfcProjectOrderRecordTypeEnum.MOVE={type:3,value:"MOVE"};IfcProjectOrderRecordTypeEnum.PURCHASE={type:3,value:"PURCHASE"};IfcProjectOrderRecordTypeEnum.WORK={type:3,value:"WORK"};IfcProjectOrderRecordTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProjectOrderRecordTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcProjectOrderRecordTypeEnum=IfcProjectOrderRecordTypeEnum;var IfcProjectOrderTypeEnum=/*#__PURE__*/_createClass(function IfcProjectOrderTypeEnum(){_classCallCheck(this,IfcProjectOrderTypeEnum);});IfcProjectOrderTypeEnum.CHANGEORDER={type:3,value:"CHANGEORDER"};IfcProjectOrderTypeEnum.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"};IfcProjectOrderTypeEnum.MOVEORDER={type:3,value:"MOVEORDER"};IfcProjectOrderTypeEnum.PURCHASEORDER={type:3,value:"PURCHASEORDER"};IfcProjectOrderTypeEnum.WORKORDER={type:3,value:"WORKORDER"};IfcProjectOrderTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProjectOrderTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcProjectOrderTypeEnum=IfcProjectOrderTypeEnum;var IfcProjectedOrTrueLengthEnum=/*#__PURE__*/_createClass(function IfcProjectedOrTrueLengthEnum(){_classCallCheck(this,IfcProjectedOrTrueLengthEnum);});IfcProjectedOrTrueLengthEnum.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"};IfcProjectedOrTrueLengthEnum.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"};IFC2X32.IfcProjectedOrTrueLengthEnum=IfcProjectedOrTrueLengthEnum;var IfcPropertySourceEnum=/*#__PURE__*/_createClass(function IfcPropertySourceEnum(){_classCallCheck(this,IfcPropertySourceEnum);});IfcPropertySourceEnum.DESIGN={type:3,value:"DESIGN"};IfcPropertySourceEnum.DESIGNMAXIMUM={type:3,value:"DESIGNMAXIMUM"};IfcPropertySourceEnum.DESIGNMINIMUM={type:3,value:"DESIGNMINIMUM"};IfcPropertySourceEnum.SIMULATED={type:3,value:"SIMULATED"};IfcPropertySourceEnum.ASBUILT={type:3,value:"ASBUILT"};IfcPropertySourceEnum.COMMISSIONING={type:3,value:"COMMISSIONING"};IfcPropertySourceEnum.MEASURED={type:3,value:"MEASURED"};IfcPropertySourceEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPropertySourceEnum.NOTKNOWN={type:3,value:"NOTKNOWN"};IFC2X32.IfcPropertySourceEnum=IfcPropertySourceEnum;var IfcProtectiveDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcProtectiveDeviceTypeEnum(){_classCallCheck(this,IfcProtectiveDeviceTypeEnum);});IfcProtectiveDeviceTypeEnum.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"};IfcProtectiveDeviceTypeEnum.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.EARTHFAILUREDEVICE={type:3,value:"EARTHFAILUREDEVICE"};IfcProtectiveDeviceTypeEnum.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"};IfcProtectiveDeviceTypeEnum.VARISTOR={type:3,value:"VARISTOR"};IfcProtectiveDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProtectiveDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcProtectiveDeviceTypeEnum=IfcProtectiveDeviceTypeEnum;var IfcPumpTypeEnum=/*#__PURE__*/_createClass(function IfcPumpTypeEnum(){_classCallCheck(this,IfcPumpTypeEnum);});IfcPumpTypeEnum.CIRCULATOR={type:3,value:"CIRCULATOR"};IfcPumpTypeEnum.ENDSUCTION={type:3,value:"ENDSUCTION"};IfcPumpTypeEnum.SPLITCASE={type:3,value:"SPLITCASE"};IfcPumpTypeEnum.VERTICALINLINE={type:3,value:"VERTICALINLINE"};IfcPumpTypeEnum.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"};IfcPumpTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPumpTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcPumpTypeEnum=IfcPumpTypeEnum;var IfcRailingTypeEnum=/*#__PURE__*/_createClass(function IfcRailingTypeEnum(){_classCallCheck(this,IfcRailingTypeEnum);});IfcRailingTypeEnum.HANDRAIL={type:3,value:"HANDRAIL"};IfcRailingTypeEnum.GUARDRAIL={type:3,value:"GUARDRAIL"};IfcRailingTypeEnum.BALUSTRADE={type:3,value:"BALUSTRADE"};IfcRailingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRailingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcRailingTypeEnum=IfcRailingTypeEnum;var IfcRampFlightTypeEnum=/*#__PURE__*/_createClass(function IfcRampFlightTypeEnum(){_classCallCheck(this,IfcRampFlightTypeEnum);});IfcRampFlightTypeEnum.STRAIGHT={type:3,value:"STRAIGHT"};IfcRampFlightTypeEnum.SPIRAL={type:3,value:"SPIRAL"};IfcRampFlightTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRampFlightTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcRampFlightTypeEnum=IfcRampFlightTypeEnum;var IfcRampTypeEnum=/*#__PURE__*/_createClass(function IfcRampTypeEnum(){_classCallCheck(this,IfcRampTypeEnum);});IfcRampTypeEnum.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"};IfcRampTypeEnum.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"};IfcRampTypeEnum.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"};IfcRampTypeEnum.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"};IfcRampTypeEnum.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"};IfcRampTypeEnum.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"};IfcRampTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRampTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcRampTypeEnum=IfcRampTypeEnum;var IfcReflectanceMethodEnum=/*#__PURE__*/_createClass(function IfcReflectanceMethodEnum(){_classCallCheck(this,IfcReflectanceMethodEnum);});IfcReflectanceMethodEnum.BLINN={type:3,value:"BLINN"};IfcReflectanceMethodEnum.FLAT={type:3,value:"FLAT"};IfcReflectanceMethodEnum.GLASS={type:3,value:"GLASS"};IfcReflectanceMethodEnum.MATT={type:3,value:"MATT"};IfcReflectanceMethodEnum.METAL={type:3,value:"METAL"};IfcReflectanceMethodEnum.MIRROR={type:3,value:"MIRROR"};IfcReflectanceMethodEnum.PHONG={type:3,value:"PHONG"};IfcReflectanceMethodEnum.PLASTIC={type:3,value:"PLASTIC"};IfcReflectanceMethodEnum.STRAUSS={type:3,value:"STRAUSS"};IfcReflectanceMethodEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcReflectanceMethodEnum=IfcReflectanceMethodEnum;var IfcReinforcingBarRoleEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarRoleEnum(){_classCallCheck(this,IfcReinforcingBarRoleEnum);});IfcReinforcingBarRoleEnum.MAIN={type:3,value:"MAIN"};IfcReinforcingBarRoleEnum.SHEAR={type:3,value:"SHEAR"};IfcReinforcingBarRoleEnum.LIGATURE={type:3,value:"LIGATURE"};IfcReinforcingBarRoleEnum.STUD={type:3,value:"STUD"};IfcReinforcingBarRoleEnum.PUNCHING={type:3,value:"PUNCHING"};IfcReinforcingBarRoleEnum.EDGE={type:3,value:"EDGE"};IfcReinforcingBarRoleEnum.RING={type:3,value:"RING"};IfcReinforcingBarRoleEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcingBarRoleEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcReinforcingBarRoleEnum=IfcReinforcingBarRoleEnum;var IfcReinforcingBarSurfaceEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarSurfaceEnum(){_classCallCheck(this,IfcReinforcingBarSurfaceEnum);});IfcReinforcingBarSurfaceEnum.PLAIN={type:3,value:"PLAIN"};IfcReinforcingBarSurfaceEnum.TEXTURED={type:3,value:"TEXTURED"};IFC2X32.IfcReinforcingBarSurfaceEnum=IfcReinforcingBarSurfaceEnum;var IfcResourceConsumptionEnum=/*#__PURE__*/_createClass(function IfcResourceConsumptionEnum(){_classCallCheck(this,IfcResourceConsumptionEnum);});IfcResourceConsumptionEnum.CONSUMED={type:3,value:"CONSUMED"};IfcResourceConsumptionEnum.PARTIALLYCONSUMED={type:3,value:"PARTIALLYCONSUMED"};IfcResourceConsumptionEnum.NOTCONSUMED={type:3,value:"NOTCONSUMED"};IfcResourceConsumptionEnum.OCCUPIED={type:3,value:"OCCUPIED"};IfcResourceConsumptionEnum.PARTIALLYOCCUPIED={type:3,value:"PARTIALLYOCCUPIED"};IfcResourceConsumptionEnum.NOTOCCUPIED={type:3,value:"NOTOCCUPIED"};IfcResourceConsumptionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcResourceConsumptionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcResourceConsumptionEnum=IfcResourceConsumptionEnum;var IfcRibPlateDirectionEnum=/*#__PURE__*/_createClass(function IfcRibPlateDirectionEnum(){_classCallCheck(this,IfcRibPlateDirectionEnum);});IfcRibPlateDirectionEnum.DIRECTION_X={type:3,value:"DIRECTION_X"};IfcRibPlateDirectionEnum.DIRECTION_Y={type:3,value:"DIRECTION_Y"};IFC2X32.IfcRibPlateDirectionEnum=IfcRibPlateDirectionEnum;var IfcRoleEnum=/*#__PURE__*/_createClass(function IfcRoleEnum(){_classCallCheck(this,IfcRoleEnum);});IfcRoleEnum.SUPPLIER={type:3,value:"SUPPLIER"};IfcRoleEnum.MANUFACTURER={type:3,value:"MANUFACTURER"};IfcRoleEnum.CONTRACTOR={type:3,value:"CONTRACTOR"};IfcRoleEnum.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"};IfcRoleEnum.ARCHITECT={type:3,value:"ARCHITECT"};IfcRoleEnum.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"};IfcRoleEnum.COSTENGINEER={type:3,value:"COSTENGINEER"};IfcRoleEnum.CLIENT={type:3,value:"CLIENT"};IfcRoleEnum.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"};IfcRoleEnum.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"};IfcRoleEnum.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"};IfcRoleEnum.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"};IfcRoleEnum.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"};IfcRoleEnum.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"};IfcRoleEnum.CIVILENGINEER={type:3,value:"CIVILENGINEER"};IfcRoleEnum.COMISSIONINGENGINEER={type:3,value:"COMISSIONINGENGINEER"};IfcRoleEnum.ENGINEER={type:3,value:"ENGINEER"};IfcRoleEnum.OWNER={type:3,value:"OWNER"};IfcRoleEnum.CONSULTANT={type:3,value:"CONSULTANT"};IfcRoleEnum.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"};IfcRoleEnum.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"};IfcRoleEnum.RESELLER={type:3,value:"RESELLER"};IfcRoleEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC2X32.IfcRoleEnum=IfcRoleEnum;var IfcRoofTypeEnum=/*#__PURE__*/_createClass(function IfcRoofTypeEnum(){_classCallCheck(this,IfcRoofTypeEnum);});IfcRoofTypeEnum.FLAT_ROOF={type:3,value:"FLAT_ROOF"};IfcRoofTypeEnum.SHED_ROOF={type:3,value:"SHED_ROOF"};IfcRoofTypeEnum.GABLE_ROOF={type:3,value:"GABLE_ROOF"};IfcRoofTypeEnum.HIP_ROOF={type:3,value:"HIP_ROOF"};IfcRoofTypeEnum.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"};IfcRoofTypeEnum.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"};IfcRoofTypeEnum.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"};IfcRoofTypeEnum.BARREL_ROOF={type:3,value:"BARREL_ROOF"};IfcRoofTypeEnum.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"};IfcRoofTypeEnum.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"};IfcRoofTypeEnum.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"};IfcRoofTypeEnum.DOME_ROOF={type:3,value:"DOME_ROOF"};IfcRoofTypeEnum.FREEFORM={type:3,value:"FREEFORM"};IfcRoofTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcRoofTypeEnum=IfcRoofTypeEnum;var IfcSIPrefix=/*#__PURE__*/_createClass(function IfcSIPrefix(){_classCallCheck(this,IfcSIPrefix);});IfcSIPrefix.EXA={type:3,value:"EXA"};IfcSIPrefix.PETA={type:3,value:"PETA"};IfcSIPrefix.TERA={type:3,value:"TERA"};IfcSIPrefix.GIGA={type:3,value:"GIGA"};IfcSIPrefix.MEGA={type:3,value:"MEGA"};IfcSIPrefix.KILO={type:3,value:"KILO"};IfcSIPrefix.HECTO={type:3,value:"HECTO"};IfcSIPrefix.DECA={type:3,value:"DECA"};IfcSIPrefix.DECI={type:3,value:"DECI"};IfcSIPrefix.CENTI={type:3,value:"CENTI"};IfcSIPrefix.MILLI={type:3,value:"MILLI"};IfcSIPrefix.MICRO={type:3,value:"MICRO"};IfcSIPrefix.NANO={type:3,value:"NANO"};IfcSIPrefix.PICO={type:3,value:"PICO"};IfcSIPrefix.FEMTO={type:3,value:"FEMTO"};IfcSIPrefix.ATTO={type:3,value:"ATTO"};IFC2X32.IfcSIPrefix=IfcSIPrefix;var IfcSIUnitName=/*#__PURE__*/_createClass(function IfcSIUnitName(){_classCallCheck(this,IfcSIUnitName);});IfcSIUnitName.AMPERE={type:3,value:"AMPERE"};IfcSIUnitName.BECQUEREL={type:3,value:"BECQUEREL"};IfcSIUnitName.CANDELA={type:3,value:"CANDELA"};IfcSIUnitName.COULOMB={type:3,value:"COULOMB"};IfcSIUnitName.CUBIC_METRE={type:3,value:"CUBIC_METRE"};IfcSIUnitName.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"};IfcSIUnitName.FARAD={type:3,value:"FARAD"};IfcSIUnitName.GRAM={type:3,value:"GRAM"};IfcSIUnitName.GRAY={type:3,value:"GRAY"};IfcSIUnitName.HENRY={type:3,value:"HENRY"};IfcSIUnitName.HERTZ={type:3,value:"HERTZ"};IfcSIUnitName.JOULE={type:3,value:"JOULE"};IfcSIUnitName.KELVIN={type:3,value:"KELVIN"};IfcSIUnitName.LUMEN={type:3,value:"LUMEN"};IfcSIUnitName.LUX={type:3,value:"LUX"};IfcSIUnitName.METRE={type:3,value:"METRE"};IfcSIUnitName.MOLE={type:3,value:"MOLE"};IfcSIUnitName.NEWTON={type:3,value:"NEWTON"};IfcSIUnitName.OHM={type:3,value:"OHM"};IfcSIUnitName.PASCAL={type:3,value:"PASCAL"};IfcSIUnitName.RADIAN={type:3,value:"RADIAN"};IfcSIUnitName.SECOND={type:3,value:"SECOND"};IfcSIUnitName.SIEMENS={type:3,value:"SIEMENS"};IfcSIUnitName.SIEVERT={type:3,value:"SIEVERT"};IfcSIUnitName.SQUARE_METRE={type:3,value:"SQUARE_METRE"};IfcSIUnitName.STERADIAN={type:3,value:"STERADIAN"};IfcSIUnitName.TESLA={type:3,value:"TESLA"};IfcSIUnitName.VOLT={type:3,value:"VOLT"};IfcSIUnitName.WATT={type:3,value:"WATT"};IfcSIUnitName.WEBER={type:3,value:"WEBER"};IFC2X32.IfcSIUnitName=IfcSIUnitName;var IfcSanitaryTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcSanitaryTerminalTypeEnum(){_classCallCheck(this,IfcSanitaryTerminalTypeEnum);});IfcSanitaryTerminalTypeEnum.BATH={type:3,value:"BATH"};IfcSanitaryTerminalTypeEnum.BIDET={type:3,value:"BIDET"};IfcSanitaryTerminalTypeEnum.CISTERN={type:3,value:"CISTERN"};IfcSanitaryTerminalTypeEnum.SHOWER={type:3,value:"SHOWER"};IfcSanitaryTerminalTypeEnum.SINK={type:3,value:"SINK"};IfcSanitaryTerminalTypeEnum.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"};IfcSanitaryTerminalTypeEnum.TOILETPAN={type:3,value:"TOILETPAN"};IfcSanitaryTerminalTypeEnum.URINAL={type:3,value:"URINAL"};IfcSanitaryTerminalTypeEnum.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"};IfcSanitaryTerminalTypeEnum.WCSEAT={type:3,value:"WCSEAT"};IfcSanitaryTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSanitaryTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSanitaryTerminalTypeEnum=IfcSanitaryTerminalTypeEnum;var IfcSectionTypeEnum=/*#__PURE__*/_createClass(function IfcSectionTypeEnum(){_classCallCheck(this,IfcSectionTypeEnum);});IfcSectionTypeEnum.UNIFORM={type:3,value:"UNIFORM"};IfcSectionTypeEnum.TAPERED={type:3,value:"TAPERED"};IFC2X32.IfcSectionTypeEnum=IfcSectionTypeEnum;var IfcSensorTypeEnum=/*#__PURE__*/_createClass(function IfcSensorTypeEnum(){_classCallCheck(this,IfcSensorTypeEnum);});IfcSensorTypeEnum.CO2SENSOR={type:3,value:"CO2SENSOR"};IfcSensorTypeEnum.FIRESENSOR={type:3,value:"FIRESENSOR"};IfcSensorTypeEnum.FLOWSENSOR={type:3,value:"FLOWSENSOR"};IfcSensorTypeEnum.GASSENSOR={type:3,value:"GASSENSOR"};IfcSensorTypeEnum.HEATSENSOR={type:3,value:"HEATSENSOR"};IfcSensorTypeEnum.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"};IfcSensorTypeEnum.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"};IfcSensorTypeEnum.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"};IfcSensorTypeEnum.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"};IfcSensorTypeEnum.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"};IfcSensorTypeEnum.SMOKESENSOR={type:3,value:"SMOKESENSOR"};IfcSensorTypeEnum.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"};IfcSensorTypeEnum.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"};IfcSensorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSensorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSensorTypeEnum=IfcSensorTypeEnum;var IfcSequenceEnum=/*#__PURE__*/_createClass(function IfcSequenceEnum(){_classCallCheck(this,IfcSequenceEnum);});IfcSequenceEnum.START_START={type:3,value:"START_START"};IfcSequenceEnum.START_FINISH={type:3,value:"START_FINISH"};IfcSequenceEnum.FINISH_START={type:3,value:"FINISH_START"};IfcSequenceEnum.FINISH_FINISH={type:3,value:"FINISH_FINISH"};IfcSequenceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSequenceEnum=IfcSequenceEnum;var IfcServiceLifeFactorTypeEnum=/*#__PURE__*/_createClass(function IfcServiceLifeFactorTypeEnum(){_classCallCheck(this,IfcServiceLifeFactorTypeEnum);});IfcServiceLifeFactorTypeEnum.A_QUALITYOFCOMPONENTS={type:3,value:"A_QUALITYOFCOMPONENTS"};IfcServiceLifeFactorTypeEnum.B_DESIGNLEVEL={type:3,value:"B_DESIGNLEVEL"};IfcServiceLifeFactorTypeEnum.C_WORKEXECUTIONLEVEL={type:3,value:"C_WORKEXECUTIONLEVEL"};IfcServiceLifeFactorTypeEnum.D_INDOORENVIRONMENT={type:3,value:"D_INDOORENVIRONMENT"};IfcServiceLifeFactorTypeEnum.E_OUTDOORENVIRONMENT={type:3,value:"E_OUTDOORENVIRONMENT"};IfcServiceLifeFactorTypeEnum.F_INUSECONDITIONS={type:3,value:"F_INUSECONDITIONS"};IfcServiceLifeFactorTypeEnum.G_MAINTENANCELEVEL={type:3,value:"G_MAINTENANCELEVEL"};IfcServiceLifeFactorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcServiceLifeFactorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcServiceLifeFactorTypeEnum=IfcServiceLifeFactorTypeEnum;var IfcServiceLifeTypeEnum=/*#__PURE__*/_createClass(function IfcServiceLifeTypeEnum(){_classCallCheck(this,IfcServiceLifeTypeEnum);});IfcServiceLifeTypeEnum.ACTUALSERVICELIFE={type:3,value:"ACTUALSERVICELIFE"};IfcServiceLifeTypeEnum.EXPECTEDSERVICELIFE={type:3,value:"EXPECTEDSERVICELIFE"};IfcServiceLifeTypeEnum.OPTIMISTICREFERENCESERVICELIFE={type:3,value:"OPTIMISTICREFERENCESERVICELIFE"};IfcServiceLifeTypeEnum.PESSIMISTICREFERENCESERVICELIFE={type:3,value:"PESSIMISTICREFERENCESERVICELIFE"};IfcServiceLifeTypeEnum.REFERENCESERVICELIFE={type:3,value:"REFERENCESERVICELIFE"};IFC2X32.IfcServiceLifeTypeEnum=IfcServiceLifeTypeEnum;var IfcSlabTypeEnum=/*#__PURE__*/_createClass(function IfcSlabTypeEnum(){_classCallCheck(this,IfcSlabTypeEnum);});IfcSlabTypeEnum.FLOOR={type:3,value:"FLOOR"};IfcSlabTypeEnum.ROOF={type:3,value:"ROOF"};IfcSlabTypeEnum.LANDING={type:3,value:"LANDING"};IfcSlabTypeEnum.BASESLAB={type:3,value:"BASESLAB"};IfcSlabTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSlabTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSlabTypeEnum=IfcSlabTypeEnum;var IfcSoundScaleEnum=/*#__PURE__*/_createClass(function IfcSoundScaleEnum(){_classCallCheck(this,IfcSoundScaleEnum);});IfcSoundScaleEnum.DBA={type:3,value:"DBA"};IfcSoundScaleEnum.DBB={type:3,value:"DBB"};IfcSoundScaleEnum.DBC={type:3,value:"DBC"};IfcSoundScaleEnum.NC={type:3,value:"NC"};IfcSoundScaleEnum.NR={type:3,value:"NR"};IfcSoundScaleEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSoundScaleEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSoundScaleEnum=IfcSoundScaleEnum;var IfcSpaceHeaterTypeEnum=/*#__PURE__*/_createClass(function IfcSpaceHeaterTypeEnum(){_classCallCheck(this,IfcSpaceHeaterTypeEnum);});IfcSpaceHeaterTypeEnum.SECTIONALRADIATOR={type:3,value:"SECTIONALRADIATOR"};IfcSpaceHeaterTypeEnum.PANELRADIATOR={type:3,value:"PANELRADIATOR"};IfcSpaceHeaterTypeEnum.TUBULARRADIATOR={type:3,value:"TUBULARRADIATOR"};IfcSpaceHeaterTypeEnum.CONVECTOR={type:3,value:"CONVECTOR"};IfcSpaceHeaterTypeEnum.BASEBOARDHEATER={type:3,value:"BASEBOARDHEATER"};IfcSpaceHeaterTypeEnum.FINNEDTUBEUNIT={type:3,value:"FINNEDTUBEUNIT"};IfcSpaceHeaterTypeEnum.UNITHEATER={type:3,value:"UNITHEATER"};IfcSpaceHeaterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpaceHeaterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSpaceHeaterTypeEnum=IfcSpaceHeaterTypeEnum;var IfcSpaceTypeEnum=/*#__PURE__*/_createClass(function IfcSpaceTypeEnum(){_classCallCheck(this,IfcSpaceTypeEnum);});IfcSpaceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpaceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSpaceTypeEnum=IfcSpaceTypeEnum;var IfcStackTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcStackTerminalTypeEnum(){_classCallCheck(this,IfcStackTerminalTypeEnum);});IfcStackTerminalTypeEnum.BIRDCAGE={type:3,value:"BIRDCAGE"};IfcStackTerminalTypeEnum.COWL={type:3,value:"COWL"};IfcStackTerminalTypeEnum.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"};IfcStackTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStackTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcStackTerminalTypeEnum=IfcStackTerminalTypeEnum;var IfcStairFlightTypeEnum=/*#__PURE__*/_createClass(function IfcStairFlightTypeEnum(){_classCallCheck(this,IfcStairFlightTypeEnum);});IfcStairFlightTypeEnum.STRAIGHT={type:3,value:"STRAIGHT"};IfcStairFlightTypeEnum.WINDER={type:3,value:"WINDER"};IfcStairFlightTypeEnum.SPIRAL={type:3,value:"SPIRAL"};IfcStairFlightTypeEnum.CURVED={type:3,value:"CURVED"};IfcStairFlightTypeEnum.FREEFORM={type:3,value:"FREEFORM"};IfcStairFlightTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStairFlightTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcStairFlightTypeEnum=IfcStairFlightTypeEnum;var IfcStairTypeEnum=/*#__PURE__*/_createClass(function IfcStairTypeEnum(){_classCallCheck(this,IfcStairTypeEnum);});IfcStairTypeEnum.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"};IfcStairTypeEnum.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"};IfcStairTypeEnum.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"};IfcStairTypeEnum.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"};IfcStairTypeEnum.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"};IfcStairTypeEnum.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"};IfcStairTypeEnum.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"};IfcStairTypeEnum.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"};IfcStairTypeEnum.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"};IfcStairTypeEnum.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"};IfcStairTypeEnum.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"};IfcStairTypeEnum.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"};IfcStairTypeEnum.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"};IfcStairTypeEnum.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"};IfcStairTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStairTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcStairTypeEnum=IfcStairTypeEnum;var IfcStateEnum=/*#__PURE__*/_createClass(function IfcStateEnum(){_classCallCheck(this,IfcStateEnum);});IfcStateEnum.READWRITE={type:3,value:"READWRITE"};IfcStateEnum.READONLY={type:3,value:"READONLY"};IfcStateEnum.LOCKED={type:3,value:"LOCKED"};IfcStateEnum.READWRITELOCKED={type:3,value:"READWRITELOCKED"};IfcStateEnum.READONLYLOCKED={type:3,value:"READONLYLOCKED"};IFC2X32.IfcStateEnum=IfcStateEnum;var IfcStructuralCurveTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralCurveTypeEnum(){_classCallCheck(this,IfcStructuralCurveTypeEnum);});IfcStructuralCurveTypeEnum.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"};IfcStructuralCurveTypeEnum.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"};IfcStructuralCurveTypeEnum.CABLE={type:3,value:"CABLE"};IfcStructuralCurveTypeEnum.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"};IfcStructuralCurveTypeEnum.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"};IfcStructuralCurveTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralCurveTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcStructuralCurveTypeEnum=IfcStructuralCurveTypeEnum;var IfcStructuralSurfaceTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralSurfaceTypeEnum(){_classCallCheck(this,IfcStructuralSurfaceTypeEnum);});IfcStructuralSurfaceTypeEnum.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"};IfcStructuralSurfaceTypeEnum.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"};IfcStructuralSurfaceTypeEnum.SHELL={type:3,value:"SHELL"};IfcStructuralSurfaceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralSurfaceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcStructuralSurfaceTypeEnum=IfcStructuralSurfaceTypeEnum;var IfcSurfaceSide=/*#__PURE__*/_createClass(function IfcSurfaceSide(){_classCallCheck(this,IfcSurfaceSide);});IfcSurfaceSide.POSITIVE={type:3,value:"POSITIVE"};IfcSurfaceSide.NEGATIVE={type:3,value:"NEGATIVE"};IfcSurfaceSide.BOTH={type:3,value:"BOTH"};IFC2X32.IfcSurfaceSide=IfcSurfaceSide;var IfcSurfaceTextureEnum=/*#__PURE__*/_createClass(function IfcSurfaceTextureEnum(){_classCallCheck(this,IfcSurfaceTextureEnum);});IfcSurfaceTextureEnum.BUMP={type:3,value:"BUMP"};IfcSurfaceTextureEnum.OPACITY={type:3,value:"OPACITY"};IfcSurfaceTextureEnum.REFLECTION={type:3,value:"REFLECTION"};IfcSurfaceTextureEnum.SELFILLUMINATION={type:3,value:"SELFILLUMINATION"};IfcSurfaceTextureEnum.SHININESS={type:3,value:"SHININESS"};IfcSurfaceTextureEnum.SPECULAR={type:3,value:"SPECULAR"};IfcSurfaceTextureEnum.TEXTURE={type:3,value:"TEXTURE"};IfcSurfaceTextureEnum.TRANSPARENCYMAP={type:3,value:"TRANSPARENCYMAP"};IfcSurfaceTextureEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSurfaceTextureEnum=IfcSurfaceTextureEnum;var IfcSwitchingDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcSwitchingDeviceTypeEnum(){_classCallCheck(this,IfcSwitchingDeviceTypeEnum);});IfcSwitchingDeviceTypeEnum.CONTACTOR={type:3,value:"CONTACTOR"};IfcSwitchingDeviceTypeEnum.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"};IfcSwitchingDeviceTypeEnum.STARTER={type:3,value:"STARTER"};IfcSwitchingDeviceTypeEnum.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"};IfcSwitchingDeviceTypeEnum.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"};IfcSwitchingDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSwitchingDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcSwitchingDeviceTypeEnum=IfcSwitchingDeviceTypeEnum;var IfcTankTypeEnum=/*#__PURE__*/_createClass(function IfcTankTypeEnum(){_classCallCheck(this,IfcTankTypeEnum);});IfcTankTypeEnum.PREFORMED={type:3,value:"PREFORMED"};IfcTankTypeEnum.SECTIONAL={type:3,value:"SECTIONAL"};IfcTankTypeEnum.EXPANSION={type:3,value:"EXPANSION"};IfcTankTypeEnum.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"};IfcTankTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTankTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcTankTypeEnum=IfcTankTypeEnum;var IfcTendonTypeEnum=/*#__PURE__*/_createClass(function IfcTendonTypeEnum(){_classCallCheck(this,IfcTendonTypeEnum);});IfcTendonTypeEnum.STRAND={type:3,value:"STRAND"};IfcTendonTypeEnum.WIRE={type:3,value:"WIRE"};IfcTendonTypeEnum.BAR={type:3,value:"BAR"};IfcTendonTypeEnum.COATED={type:3,value:"COATED"};IfcTendonTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTendonTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcTendonTypeEnum=IfcTendonTypeEnum;var IfcTextPath=/*#__PURE__*/_createClass(function IfcTextPath(){_classCallCheck(this,IfcTextPath);});IfcTextPath.LEFT={type:3,value:"LEFT"};IfcTextPath.RIGHT={type:3,value:"RIGHT"};IfcTextPath.UP={type:3,value:"UP"};IfcTextPath.DOWN={type:3,value:"DOWN"};IFC2X32.IfcTextPath=IfcTextPath;var IfcThermalLoadSourceEnum=/*#__PURE__*/_createClass(function IfcThermalLoadSourceEnum(){_classCallCheck(this,IfcThermalLoadSourceEnum);});IfcThermalLoadSourceEnum.PEOPLE={type:3,value:"PEOPLE"};IfcThermalLoadSourceEnum.LIGHTING={type:3,value:"LIGHTING"};IfcThermalLoadSourceEnum.EQUIPMENT={type:3,value:"EQUIPMENT"};IfcThermalLoadSourceEnum.VENTILATIONINDOORAIR={type:3,value:"VENTILATIONINDOORAIR"};IfcThermalLoadSourceEnum.VENTILATIONOUTSIDEAIR={type:3,value:"VENTILATIONOUTSIDEAIR"};IfcThermalLoadSourceEnum.RECIRCULATEDAIR={type:3,value:"RECIRCULATEDAIR"};IfcThermalLoadSourceEnum.EXHAUSTAIR={type:3,value:"EXHAUSTAIR"};IfcThermalLoadSourceEnum.AIREXCHANGERATE={type:3,value:"AIREXCHANGERATE"};IfcThermalLoadSourceEnum.DRYBULBTEMPERATURE={type:3,value:"DRYBULBTEMPERATURE"};IfcThermalLoadSourceEnum.RELATIVEHUMIDITY={type:3,value:"RELATIVEHUMIDITY"};IfcThermalLoadSourceEnum.INFILTRATION={type:3,value:"INFILTRATION"};IfcThermalLoadSourceEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcThermalLoadSourceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcThermalLoadSourceEnum=IfcThermalLoadSourceEnum;var IfcThermalLoadTypeEnum=/*#__PURE__*/_createClass(function IfcThermalLoadTypeEnum(){_classCallCheck(this,IfcThermalLoadTypeEnum);});IfcThermalLoadTypeEnum.SENSIBLE={type:3,value:"SENSIBLE"};IfcThermalLoadTypeEnum.LATENT={type:3,value:"LATENT"};IfcThermalLoadTypeEnum.RADIANT={type:3,value:"RADIANT"};IfcThermalLoadTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcThermalLoadTypeEnum=IfcThermalLoadTypeEnum;var IfcTimeSeriesDataTypeEnum=/*#__PURE__*/_createClass(function IfcTimeSeriesDataTypeEnum(){_classCallCheck(this,IfcTimeSeriesDataTypeEnum);});IfcTimeSeriesDataTypeEnum.CONTINUOUS={type:3,value:"CONTINUOUS"};IfcTimeSeriesDataTypeEnum.DISCRETE={type:3,value:"DISCRETE"};IfcTimeSeriesDataTypeEnum.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"};IfcTimeSeriesDataTypeEnum.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"};IfcTimeSeriesDataTypeEnum.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"};IfcTimeSeriesDataTypeEnum.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"};IfcTimeSeriesDataTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcTimeSeriesDataTypeEnum=IfcTimeSeriesDataTypeEnum;var IfcTimeSeriesScheduleTypeEnum=/*#__PURE__*/_createClass(function IfcTimeSeriesScheduleTypeEnum(){_classCallCheck(this,IfcTimeSeriesScheduleTypeEnum);});IfcTimeSeriesScheduleTypeEnum.ANNUAL={type:3,value:"ANNUAL"};IfcTimeSeriesScheduleTypeEnum.MONTHLY={type:3,value:"MONTHLY"};IfcTimeSeriesScheduleTypeEnum.WEEKLY={type:3,value:"WEEKLY"};IfcTimeSeriesScheduleTypeEnum.DAILY={type:3,value:"DAILY"};IfcTimeSeriesScheduleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTimeSeriesScheduleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcTimeSeriesScheduleTypeEnum=IfcTimeSeriesScheduleTypeEnum;var IfcTransformerTypeEnum=/*#__PURE__*/_createClass(function IfcTransformerTypeEnum(){_classCallCheck(this,IfcTransformerTypeEnum);});IfcTransformerTypeEnum.CURRENT={type:3,value:"CURRENT"};IfcTransformerTypeEnum.FREQUENCY={type:3,value:"FREQUENCY"};IfcTransformerTypeEnum.VOLTAGE={type:3,value:"VOLTAGE"};IfcTransformerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTransformerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcTransformerTypeEnum=IfcTransformerTypeEnum;var IfcTransitionCode=/*#__PURE__*/_createClass(function IfcTransitionCode(){_classCallCheck(this,IfcTransitionCode);});IfcTransitionCode.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"};IfcTransitionCode.CONTINUOUS={type:3,value:"CONTINUOUS"};IfcTransitionCode.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"};IfcTransitionCode.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"};IFC2X32.IfcTransitionCode=IfcTransitionCode;var IfcTransportElementTypeEnum=/*#__PURE__*/_createClass(function IfcTransportElementTypeEnum(){_classCallCheck(this,IfcTransportElementTypeEnum);});IfcTransportElementTypeEnum.ELEVATOR={type:3,value:"ELEVATOR"};IfcTransportElementTypeEnum.ESCALATOR={type:3,value:"ESCALATOR"};IfcTransportElementTypeEnum.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"};IfcTransportElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTransportElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcTransportElementTypeEnum=IfcTransportElementTypeEnum;var IfcTrimmingPreference=/*#__PURE__*/_createClass(function IfcTrimmingPreference(){_classCallCheck(this,IfcTrimmingPreference);});IfcTrimmingPreference.CARTESIAN={type:3,value:"CARTESIAN"};IfcTrimmingPreference.PARAMETER={type:3,value:"PARAMETER"};IfcTrimmingPreference.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC2X32.IfcTrimmingPreference=IfcTrimmingPreference;var IfcTubeBundleTypeEnum=/*#__PURE__*/_createClass(function IfcTubeBundleTypeEnum(){_classCallCheck(this,IfcTubeBundleTypeEnum);});IfcTubeBundleTypeEnum.FINNED={type:3,value:"FINNED"};IfcTubeBundleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTubeBundleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcTubeBundleTypeEnum=IfcTubeBundleTypeEnum;var IfcUnitEnum=/*#__PURE__*/_createClass(function IfcUnitEnum(){_classCallCheck(this,IfcUnitEnum);});IfcUnitEnum.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"};IfcUnitEnum.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"};IfcUnitEnum.AREAUNIT={type:3,value:"AREAUNIT"};IfcUnitEnum.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"};IfcUnitEnum.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"};IfcUnitEnum.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"};IfcUnitEnum.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"};IfcUnitEnum.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"};IfcUnitEnum.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"};IfcUnitEnum.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"};IfcUnitEnum.ENERGYUNIT={type:3,value:"ENERGYUNIT"};IfcUnitEnum.FORCEUNIT={type:3,value:"FORCEUNIT"};IfcUnitEnum.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"};IfcUnitEnum.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"};IfcUnitEnum.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"};IfcUnitEnum.LENGTHUNIT={type:3,value:"LENGTHUNIT"};IfcUnitEnum.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"};IfcUnitEnum.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"};IfcUnitEnum.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"};IfcUnitEnum.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"};IfcUnitEnum.MASSUNIT={type:3,value:"MASSUNIT"};IfcUnitEnum.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"};IfcUnitEnum.POWERUNIT={type:3,value:"POWERUNIT"};IfcUnitEnum.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"};IfcUnitEnum.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"};IfcUnitEnum.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"};IfcUnitEnum.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"};IfcUnitEnum.TIMEUNIT={type:3,value:"TIMEUNIT"};IfcUnitEnum.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"};IfcUnitEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC2X32.IfcUnitEnum=IfcUnitEnum;var IfcUnitaryEquipmentTypeEnum=/*#__PURE__*/_createClass(function IfcUnitaryEquipmentTypeEnum(){_classCallCheck(this,IfcUnitaryEquipmentTypeEnum);});IfcUnitaryEquipmentTypeEnum.AIRHANDLER={type:3,value:"AIRHANDLER"};IfcUnitaryEquipmentTypeEnum.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"};IfcUnitaryEquipmentTypeEnum.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"};IfcUnitaryEquipmentTypeEnum.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"};IfcUnitaryEquipmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcUnitaryEquipmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcUnitaryEquipmentTypeEnum=IfcUnitaryEquipmentTypeEnum;var IfcValveTypeEnum=/*#__PURE__*/_createClass(function IfcValveTypeEnum(){_classCallCheck(this,IfcValveTypeEnum);});IfcValveTypeEnum.AIRRELEASE={type:3,value:"AIRRELEASE"};IfcValveTypeEnum.ANTIVACUUM={type:3,value:"ANTIVACUUM"};IfcValveTypeEnum.CHANGEOVER={type:3,value:"CHANGEOVER"};IfcValveTypeEnum.CHECK={type:3,value:"CHECK"};IfcValveTypeEnum.COMMISSIONING={type:3,value:"COMMISSIONING"};IfcValveTypeEnum.DIVERTING={type:3,value:"DIVERTING"};IfcValveTypeEnum.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"};IfcValveTypeEnum.DOUBLECHECK={type:3,value:"DOUBLECHECK"};IfcValveTypeEnum.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"};IfcValveTypeEnum.FAUCET={type:3,value:"FAUCET"};IfcValveTypeEnum.FLUSHING={type:3,value:"FLUSHING"};IfcValveTypeEnum.GASCOCK={type:3,value:"GASCOCK"};IfcValveTypeEnum.GASTAP={type:3,value:"GASTAP"};IfcValveTypeEnum.ISOLATING={type:3,value:"ISOLATING"};IfcValveTypeEnum.MIXING={type:3,value:"MIXING"};IfcValveTypeEnum.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"};IfcValveTypeEnum.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"};IfcValveTypeEnum.REGULATING={type:3,value:"REGULATING"};IfcValveTypeEnum.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"};IfcValveTypeEnum.STEAMTRAP={type:3,value:"STEAMTRAP"};IfcValveTypeEnum.STOPCOCK={type:3,value:"STOPCOCK"};IfcValveTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcValveTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcValveTypeEnum=IfcValveTypeEnum;var IfcVibrationIsolatorTypeEnum=/*#__PURE__*/_createClass(function IfcVibrationIsolatorTypeEnum(){_classCallCheck(this,IfcVibrationIsolatorTypeEnum);});IfcVibrationIsolatorTypeEnum.COMPRESSION={type:3,value:"COMPRESSION"};IfcVibrationIsolatorTypeEnum.SPRING={type:3,value:"SPRING"};IfcVibrationIsolatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVibrationIsolatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcVibrationIsolatorTypeEnum=IfcVibrationIsolatorTypeEnum;var IfcWallTypeEnum=/*#__PURE__*/_createClass(function IfcWallTypeEnum(){_classCallCheck(this,IfcWallTypeEnum);});IfcWallTypeEnum.STANDARD={type:3,value:"STANDARD"};IfcWallTypeEnum.POLYGONAL={type:3,value:"POLYGONAL"};IfcWallTypeEnum.SHEAR={type:3,value:"SHEAR"};IfcWallTypeEnum.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"};IfcWallTypeEnum.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"};IfcWallTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWallTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcWallTypeEnum=IfcWallTypeEnum;var IfcWasteTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcWasteTerminalTypeEnum(){_classCallCheck(this,IfcWasteTerminalTypeEnum);});IfcWasteTerminalTypeEnum.FLOORTRAP={type:3,value:"FLOORTRAP"};IfcWasteTerminalTypeEnum.FLOORWASTE={type:3,value:"FLOORWASTE"};IfcWasteTerminalTypeEnum.GULLYSUMP={type:3,value:"GULLYSUMP"};IfcWasteTerminalTypeEnum.GULLYTRAP={type:3,value:"GULLYTRAP"};IfcWasteTerminalTypeEnum.GREASEINTERCEPTOR={type:3,value:"GREASEINTERCEPTOR"};IfcWasteTerminalTypeEnum.OILINTERCEPTOR={type:3,value:"OILINTERCEPTOR"};IfcWasteTerminalTypeEnum.PETROLINTERCEPTOR={type:3,value:"PETROLINTERCEPTOR"};IfcWasteTerminalTypeEnum.ROOFDRAIN={type:3,value:"ROOFDRAIN"};IfcWasteTerminalTypeEnum.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"};IfcWasteTerminalTypeEnum.WASTETRAP={type:3,value:"WASTETRAP"};IfcWasteTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWasteTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcWasteTerminalTypeEnum=IfcWasteTerminalTypeEnum;var IfcWindowPanelOperationEnum=/*#__PURE__*/_createClass(function IfcWindowPanelOperationEnum(){_classCallCheck(this,IfcWindowPanelOperationEnum);});IfcWindowPanelOperationEnum.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"};IfcWindowPanelOperationEnum.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"};IfcWindowPanelOperationEnum.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"};IfcWindowPanelOperationEnum.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"};IfcWindowPanelOperationEnum.TOPHUNG={type:3,value:"TOPHUNG"};IfcWindowPanelOperationEnum.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"};IfcWindowPanelOperationEnum.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"};IfcWindowPanelOperationEnum.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"};IfcWindowPanelOperationEnum.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"};IfcWindowPanelOperationEnum.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"};IfcWindowPanelOperationEnum.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"};IfcWindowPanelOperationEnum.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"};IfcWindowPanelOperationEnum.OTHEROPERATION={type:3,value:"OTHEROPERATION"};IfcWindowPanelOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcWindowPanelOperationEnum=IfcWindowPanelOperationEnum;var IfcWindowPanelPositionEnum=/*#__PURE__*/_createClass(function IfcWindowPanelPositionEnum(){_classCallCheck(this,IfcWindowPanelPositionEnum);});IfcWindowPanelPositionEnum.LEFT={type:3,value:"LEFT"};IfcWindowPanelPositionEnum.MIDDLE={type:3,value:"MIDDLE"};IfcWindowPanelPositionEnum.RIGHT={type:3,value:"RIGHT"};IfcWindowPanelPositionEnum.BOTTOM={type:3,value:"BOTTOM"};IfcWindowPanelPositionEnum.TOP={type:3,value:"TOP"};IfcWindowPanelPositionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcWindowPanelPositionEnum=IfcWindowPanelPositionEnum;var IfcWindowStyleConstructionEnum=/*#__PURE__*/_createClass(function IfcWindowStyleConstructionEnum(){_classCallCheck(this,IfcWindowStyleConstructionEnum);});IfcWindowStyleConstructionEnum.ALUMINIUM={type:3,value:"ALUMINIUM"};IfcWindowStyleConstructionEnum.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"};IfcWindowStyleConstructionEnum.STEEL={type:3,value:"STEEL"};IfcWindowStyleConstructionEnum.WOOD={type:3,value:"WOOD"};IfcWindowStyleConstructionEnum.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"};IfcWindowStyleConstructionEnum.PLASTIC={type:3,value:"PLASTIC"};IfcWindowStyleConstructionEnum.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"};IfcWindowStyleConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcWindowStyleConstructionEnum=IfcWindowStyleConstructionEnum;var IfcWindowStyleOperationEnum=/*#__PURE__*/_createClass(function IfcWindowStyleOperationEnum(){_classCallCheck(this,IfcWindowStyleOperationEnum);});IfcWindowStyleOperationEnum.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"};IfcWindowStyleOperationEnum.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"};IfcWindowStyleOperationEnum.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"};IfcWindowStyleOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWindowStyleOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcWindowStyleOperationEnum=IfcWindowStyleOperationEnum;var IfcWorkControlTypeEnum=/*#__PURE__*/_createClass(function IfcWorkControlTypeEnum(){_classCallCheck(this,IfcWorkControlTypeEnum);});IfcWorkControlTypeEnum.ACTUAL={type:3,value:"ACTUAL"};IfcWorkControlTypeEnum.BASELINE={type:3,value:"BASELINE"};IfcWorkControlTypeEnum.PLANNED={type:3,value:"PLANNED"};IfcWorkControlTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWorkControlTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC2X32.IfcWorkControlTypeEnum=IfcWorkControlTypeEnum;var IfcActorRole=/*#__PURE__*/function(_IfcLineObject){_inherits(IfcActorRole,_IfcLineObject);var _super160=_createSuper(IfcActorRole);function IfcActorRole(expressID,Role,UserDefinedRole,Description){var _this157;_classCallCheck(this,IfcActorRole);_this157=_super160.call(this,expressID);_this157.Role=Role;_this157.UserDefinedRole=UserDefinedRole;_this157.Description=Description;_this157.type=3630933823;return _this157;}return _createClass(IfcActorRole);}(IfcLineObject);IFC2X32.IfcActorRole=IfcActorRole;var IfcAddress=/*#__PURE__*/function(_IfcLineObject2){_inherits(IfcAddress,_IfcLineObject2);var _super161=_createSuper(IfcAddress);function IfcAddress(expressID,Purpose,Description,UserDefinedPurpose){var _this158;_classCallCheck(this,IfcAddress);_this158=_super161.call(this,expressID);_this158.Purpose=Purpose;_this158.Description=Description;_this158.UserDefinedPurpose=UserDefinedPurpose;_this158.type=618182010;return _this158;}return _createClass(IfcAddress);}(IfcLineObject);IFC2X32.IfcAddress=IfcAddress;var IfcApplication=/*#__PURE__*/function(_IfcLineObject3){_inherits(IfcApplication,_IfcLineObject3);var _super162=_createSuper(IfcApplication);function IfcApplication(expressID,ApplicationDeveloper,Version,ApplicationFullName,ApplicationIdentifier){var _this159;_classCallCheck(this,IfcApplication);_this159=_super162.call(this,expressID);_this159.ApplicationDeveloper=ApplicationDeveloper;_this159.Version=Version;_this159.ApplicationFullName=ApplicationFullName;_this159.ApplicationIdentifier=ApplicationIdentifier;_this159.type=639542469;return _this159;}return _createClass(IfcApplication);}(IfcLineObject);IFC2X32.IfcApplication=IfcApplication;var IfcAppliedValue=/*#__PURE__*/function(_IfcLineObject4){_inherits(IfcAppliedValue,_IfcLineObject4);var _super163=_createSuper(IfcAppliedValue);function IfcAppliedValue(expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate){var _this160;_classCallCheck(this,IfcAppliedValue);_this160=_super163.call(this,expressID);_this160.Name=Name;_this160.Description=Description;_this160.AppliedValue=AppliedValue;_this160.UnitBasis=UnitBasis;_this160.ApplicableDate=ApplicableDate;_this160.FixedUntilDate=FixedUntilDate;_this160.type=411424972;return _this160;}return _createClass(IfcAppliedValue);}(IfcLineObject);IFC2X32.IfcAppliedValue=IfcAppliedValue;var IfcAppliedValueRelationship=/*#__PURE__*/function(_IfcLineObject5){_inherits(IfcAppliedValueRelationship,_IfcLineObject5);var _super164=_createSuper(IfcAppliedValueRelationship);function IfcAppliedValueRelationship(expressID,ComponentOfTotal,Components,ArithmeticOperator,Name,Description){var _this161;_classCallCheck(this,IfcAppliedValueRelationship);_this161=_super164.call(this,expressID);_this161.ComponentOfTotal=ComponentOfTotal;_this161.Components=Components;_this161.ArithmeticOperator=ArithmeticOperator;_this161.Name=Name;_this161.Description=Description;_this161.type=1110488051;return _this161;}return _createClass(IfcAppliedValueRelationship);}(IfcLineObject);IFC2X32.IfcAppliedValueRelationship=IfcAppliedValueRelationship;var IfcApproval=/*#__PURE__*/function(_IfcLineObject6){_inherits(IfcApproval,_IfcLineObject6);var _super165=_createSuper(IfcApproval);function IfcApproval(expressID,Description,ApprovalDateTime,ApprovalStatus,ApprovalLevel,ApprovalQualifier,Name,Identifier){var _this162;_classCallCheck(this,IfcApproval);_this162=_super165.call(this,expressID);_this162.Description=Description;_this162.ApprovalDateTime=ApprovalDateTime;_this162.ApprovalStatus=ApprovalStatus;_this162.ApprovalLevel=ApprovalLevel;_this162.ApprovalQualifier=ApprovalQualifier;_this162.Name=Name;_this162.Identifier=Identifier;_this162.type=130549933;return _this162;}return _createClass(IfcApproval);}(IfcLineObject);IFC2X32.IfcApproval=IfcApproval;var IfcApprovalActorRelationship=/*#__PURE__*/function(_IfcLineObject7){_inherits(IfcApprovalActorRelationship,_IfcLineObject7);var _super166=_createSuper(IfcApprovalActorRelationship);function IfcApprovalActorRelationship(expressID,Actor,Approval,Role){var _this163;_classCallCheck(this,IfcApprovalActorRelationship);_this163=_super166.call(this,expressID);_this163.Actor=Actor;_this163.Approval=Approval;_this163.Role=Role;_this163.type=2080292479;return _this163;}return _createClass(IfcApprovalActorRelationship);}(IfcLineObject);IFC2X32.IfcApprovalActorRelationship=IfcApprovalActorRelationship;var IfcApprovalPropertyRelationship=/*#__PURE__*/function(_IfcLineObject8){_inherits(IfcApprovalPropertyRelationship,_IfcLineObject8);var _super167=_createSuper(IfcApprovalPropertyRelationship);function IfcApprovalPropertyRelationship(expressID,ApprovedProperties,Approval){var _this164;_classCallCheck(this,IfcApprovalPropertyRelationship);_this164=_super167.call(this,expressID);_this164.ApprovedProperties=ApprovedProperties;_this164.Approval=Approval;_this164.type=390851274;return _this164;}return _createClass(IfcApprovalPropertyRelationship);}(IfcLineObject);IFC2X32.IfcApprovalPropertyRelationship=IfcApprovalPropertyRelationship;var IfcApprovalRelationship=/*#__PURE__*/function(_IfcLineObject9){_inherits(IfcApprovalRelationship,_IfcLineObject9);var _super168=_createSuper(IfcApprovalRelationship);function IfcApprovalRelationship(expressID,RelatedApproval,RelatingApproval,Description,Name){var _this165;_classCallCheck(this,IfcApprovalRelationship);_this165=_super168.call(this,expressID);_this165.RelatedApproval=RelatedApproval;_this165.RelatingApproval=RelatingApproval;_this165.Description=Description;_this165.Name=Name;_this165.type=3869604511;return _this165;}return _createClass(IfcApprovalRelationship);}(IfcLineObject);IFC2X32.IfcApprovalRelationship=IfcApprovalRelationship;var IfcBoundaryCondition=/*#__PURE__*/function(_IfcLineObject10){_inherits(IfcBoundaryCondition,_IfcLineObject10);var _super169=_createSuper(IfcBoundaryCondition);function IfcBoundaryCondition(expressID,Name){var _this166;_classCallCheck(this,IfcBoundaryCondition);_this166=_super169.call(this,expressID);_this166.Name=Name;_this166.type=4037036970;return _this166;}return _createClass(IfcBoundaryCondition);}(IfcLineObject);IFC2X32.IfcBoundaryCondition=IfcBoundaryCondition;var IfcBoundaryEdgeCondition=/*#__PURE__*/function(_IfcBoundaryCondition){_inherits(IfcBoundaryEdgeCondition,_IfcBoundaryCondition);var _super170=_createSuper(IfcBoundaryEdgeCondition);function IfcBoundaryEdgeCondition(expressID,Name,LinearStiffnessByLengthX,LinearStiffnessByLengthY,LinearStiffnessByLengthZ,RotationalStiffnessByLengthX,RotationalStiffnessByLengthY,RotationalStiffnessByLengthZ){var _this167;_classCallCheck(this,IfcBoundaryEdgeCondition);_this167=_super170.call(this,expressID,Name);_this167.Name=Name;_this167.LinearStiffnessByLengthX=LinearStiffnessByLengthX;_this167.LinearStiffnessByLengthY=LinearStiffnessByLengthY;_this167.LinearStiffnessByLengthZ=LinearStiffnessByLengthZ;_this167.RotationalStiffnessByLengthX=RotationalStiffnessByLengthX;_this167.RotationalStiffnessByLengthY=RotationalStiffnessByLengthY;_this167.RotationalStiffnessByLengthZ=RotationalStiffnessByLengthZ;_this167.type=1560379544;return _this167;}return _createClass(IfcBoundaryEdgeCondition);}(IfcBoundaryCondition);IFC2X32.IfcBoundaryEdgeCondition=IfcBoundaryEdgeCondition;var IfcBoundaryFaceCondition=/*#__PURE__*/function(_IfcBoundaryCondition2){_inherits(IfcBoundaryFaceCondition,_IfcBoundaryCondition2);var _super171=_createSuper(IfcBoundaryFaceCondition);function IfcBoundaryFaceCondition(expressID,Name,LinearStiffnessByAreaX,LinearStiffnessByAreaY,LinearStiffnessByAreaZ){var _this168;_classCallCheck(this,IfcBoundaryFaceCondition);_this168=_super171.call(this,expressID,Name);_this168.Name=Name;_this168.LinearStiffnessByAreaX=LinearStiffnessByAreaX;_this168.LinearStiffnessByAreaY=LinearStiffnessByAreaY;_this168.LinearStiffnessByAreaZ=LinearStiffnessByAreaZ;_this168.type=3367102660;return _this168;}return _createClass(IfcBoundaryFaceCondition);}(IfcBoundaryCondition);IFC2X32.IfcBoundaryFaceCondition=IfcBoundaryFaceCondition;var IfcBoundaryNodeCondition=/*#__PURE__*/function(_IfcBoundaryCondition3){_inherits(IfcBoundaryNodeCondition,_IfcBoundaryCondition3);var _super172=_createSuper(IfcBoundaryNodeCondition);function IfcBoundaryNodeCondition(expressID,Name,LinearStiffnessX,LinearStiffnessY,LinearStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ){var _this169;_classCallCheck(this,IfcBoundaryNodeCondition);_this169=_super172.call(this,expressID,Name);_this169.Name=Name;_this169.LinearStiffnessX=LinearStiffnessX;_this169.LinearStiffnessY=LinearStiffnessY;_this169.LinearStiffnessZ=LinearStiffnessZ;_this169.RotationalStiffnessX=RotationalStiffnessX;_this169.RotationalStiffnessY=RotationalStiffnessY;_this169.RotationalStiffnessZ=RotationalStiffnessZ;_this169.type=1387855156;return _this169;}return _createClass(IfcBoundaryNodeCondition);}(IfcBoundaryCondition);IFC2X32.IfcBoundaryNodeCondition=IfcBoundaryNodeCondition;var IfcBoundaryNodeConditionWarping=/*#__PURE__*/function(_IfcBoundaryNodeCondi){_inherits(IfcBoundaryNodeConditionWarping,_IfcBoundaryNodeCondi);var _super173=_createSuper(IfcBoundaryNodeConditionWarping);function IfcBoundaryNodeConditionWarping(expressID,Name,LinearStiffnessX,LinearStiffnessY,LinearStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ,WarpingStiffness){var _this170;_classCallCheck(this,IfcBoundaryNodeConditionWarping);_this170=_super173.call(this,expressID,Name,LinearStiffnessX,LinearStiffnessY,LinearStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ);_this170.Name=Name;_this170.LinearStiffnessX=LinearStiffnessX;_this170.LinearStiffnessY=LinearStiffnessY;_this170.LinearStiffnessZ=LinearStiffnessZ;_this170.RotationalStiffnessX=RotationalStiffnessX;_this170.RotationalStiffnessY=RotationalStiffnessY;_this170.RotationalStiffnessZ=RotationalStiffnessZ;_this170.WarpingStiffness=WarpingStiffness;_this170.type=2069777674;return _this170;}return _createClass(IfcBoundaryNodeConditionWarping);}(IfcBoundaryNodeCondition);IFC2X32.IfcBoundaryNodeConditionWarping=IfcBoundaryNodeConditionWarping;var IfcCalendarDate=/*#__PURE__*/function(_IfcLineObject11){_inherits(IfcCalendarDate,_IfcLineObject11);var _super174=_createSuper(IfcCalendarDate);function IfcCalendarDate(expressID,DayComponent,MonthComponent,YearComponent){var _this171;_classCallCheck(this,IfcCalendarDate);_this171=_super174.call(this,expressID);_this171.DayComponent=DayComponent;_this171.MonthComponent=MonthComponent;_this171.YearComponent=YearComponent;_this171.type=622194075;return _this171;}return _createClass(IfcCalendarDate);}(IfcLineObject);IFC2X32.IfcCalendarDate=IfcCalendarDate;var IfcClassification=/*#__PURE__*/function(_IfcLineObject12){_inherits(IfcClassification,_IfcLineObject12);var _super175=_createSuper(IfcClassification);function IfcClassification(expressID,Source,Edition,EditionDate,Name){var _this172;_classCallCheck(this,IfcClassification);_this172=_super175.call(this,expressID);_this172.Source=Source;_this172.Edition=Edition;_this172.EditionDate=EditionDate;_this172.Name=Name;_this172.type=747523909;return _this172;}return _createClass(IfcClassification);}(IfcLineObject);IFC2X32.IfcClassification=IfcClassification;var IfcClassificationItem=/*#__PURE__*/function(_IfcLineObject13){_inherits(IfcClassificationItem,_IfcLineObject13);var _super176=_createSuper(IfcClassificationItem);function IfcClassificationItem(expressID,Notation,ItemOf,Title){var _this173;_classCallCheck(this,IfcClassificationItem);_this173=_super176.call(this,expressID);_this173.Notation=Notation;_this173.ItemOf=ItemOf;_this173.Title=Title;_this173.type=1767535486;return _this173;}return _createClass(IfcClassificationItem);}(IfcLineObject);IFC2X32.IfcClassificationItem=IfcClassificationItem;var IfcClassificationItemRelationship=/*#__PURE__*/function(_IfcLineObject14){_inherits(IfcClassificationItemRelationship,_IfcLineObject14);var _super177=_createSuper(IfcClassificationItemRelationship);function IfcClassificationItemRelationship(expressID,RelatingItem,RelatedItems){var _this174;_classCallCheck(this,IfcClassificationItemRelationship);_this174=_super177.call(this,expressID);_this174.RelatingItem=RelatingItem;_this174.RelatedItems=RelatedItems;_this174.type=1098599126;return _this174;}return _createClass(IfcClassificationItemRelationship);}(IfcLineObject);IFC2X32.IfcClassificationItemRelationship=IfcClassificationItemRelationship;var IfcClassificationNotation=/*#__PURE__*/function(_IfcLineObject15){_inherits(IfcClassificationNotation,_IfcLineObject15);var _super178=_createSuper(IfcClassificationNotation);function IfcClassificationNotation(expressID,NotationFacets){var _this175;_classCallCheck(this,IfcClassificationNotation);_this175=_super178.call(this,expressID);_this175.NotationFacets=NotationFacets;_this175.type=938368621;return _this175;}return _createClass(IfcClassificationNotation);}(IfcLineObject);IFC2X32.IfcClassificationNotation=IfcClassificationNotation;var IfcClassificationNotationFacet=/*#__PURE__*/function(_IfcLineObject16){_inherits(IfcClassificationNotationFacet,_IfcLineObject16);var _super179=_createSuper(IfcClassificationNotationFacet);function IfcClassificationNotationFacet(expressID,NotationValue){var _this176;_classCallCheck(this,IfcClassificationNotationFacet);_this176=_super179.call(this,expressID);_this176.NotationValue=NotationValue;_this176.type=3639012971;return _this176;}return _createClass(IfcClassificationNotationFacet);}(IfcLineObject);IFC2X32.IfcClassificationNotationFacet=IfcClassificationNotationFacet;var IfcColourSpecification=/*#__PURE__*/function(_IfcLineObject17){_inherits(IfcColourSpecification,_IfcLineObject17);var _super180=_createSuper(IfcColourSpecification);function IfcColourSpecification(expressID,Name){var _this177;_classCallCheck(this,IfcColourSpecification);_this177=_super180.call(this,expressID);_this177.Name=Name;_this177.type=3264961684;return _this177;}return _createClass(IfcColourSpecification);}(IfcLineObject);IFC2X32.IfcColourSpecification=IfcColourSpecification;var IfcConnectionGeometry=/*#__PURE__*/function(_IfcLineObject18){_inherits(IfcConnectionGeometry,_IfcLineObject18);var _super181=_createSuper(IfcConnectionGeometry);function IfcConnectionGeometry(expressID){var _this178;_classCallCheck(this,IfcConnectionGeometry);_this178=_super181.call(this,expressID);_this178.type=2859738748;return _this178;}return _createClass(IfcConnectionGeometry);}(IfcLineObject);IFC2X32.IfcConnectionGeometry=IfcConnectionGeometry;var IfcConnectionPointGeometry=/*#__PURE__*/function(_IfcConnectionGeometr){_inherits(IfcConnectionPointGeometry,_IfcConnectionGeometr);var _super182=_createSuper(IfcConnectionPointGeometry);function IfcConnectionPointGeometry(expressID,PointOnRelatingElement,PointOnRelatedElement){var _this179;_classCallCheck(this,IfcConnectionPointGeometry);_this179=_super182.call(this,expressID);_this179.PointOnRelatingElement=PointOnRelatingElement;_this179.PointOnRelatedElement=PointOnRelatedElement;_this179.type=2614616156;return _this179;}return _createClass(IfcConnectionPointGeometry);}(IfcConnectionGeometry);IFC2X32.IfcConnectionPointGeometry=IfcConnectionPointGeometry;var IfcConnectionPortGeometry=/*#__PURE__*/function(_IfcConnectionGeometr2){_inherits(IfcConnectionPortGeometry,_IfcConnectionGeometr2);var _super183=_createSuper(IfcConnectionPortGeometry);function IfcConnectionPortGeometry(expressID,LocationAtRelatingElement,LocationAtRelatedElement,ProfileOfPort){var _this180;_classCallCheck(this,IfcConnectionPortGeometry);_this180=_super183.call(this,expressID);_this180.LocationAtRelatingElement=LocationAtRelatingElement;_this180.LocationAtRelatedElement=LocationAtRelatedElement;_this180.ProfileOfPort=ProfileOfPort;_this180.type=4257277454;return _this180;}return _createClass(IfcConnectionPortGeometry);}(IfcConnectionGeometry);IFC2X32.IfcConnectionPortGeometry=IfcConnectionPortGeometry;var IfcConnectionSurfaceGeometry=/*#__PURE__*/function(_IfcConnectionGeometr3){_inherits(IfcConnectionSurfaceGeometry,_IfcConnectionGeometr3);var _super184=_createSuper(IfcConnectionSurfaceGeometry);function IfcConnectionSurfaceGeometry(expressID,SurfaceOnRelatingElement,SurfaceOnRelatedElement){var _this181;_classCallCheck(this,IfcConnectionSurfaceGeometry);_this181=_super184.call(this,expressID);_this181.SurfaceOnRelatingElement=SurfaceOnRelatingElement;_this181.SurfaceOnRelatedElement=SurfaceOnRelatedElement;_this181.type=2732653382;return _this181;}return _createClass(IfcConnectionSurfaceGeometry);}(IfcConnectionGeometry);IFC2X32.IfcConnectionSurfaceGeometry=IfcConnectionSurfaceGeometry;var IfcConstraint=/*#__PURE__*/function(_IfcLineObject19){_inherits(IfcConstraint,_IfcLineObject19);var _super185=_createSuper(IfcConstraint);function IfcConstraint(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade){var _this182;_classCallCheck(this,IfcConstraint);_this182=_super185.call(this,expressID);_this182.Name=Name;_this182.Description=Description;_this182.ConstraintGrade=ConstraintGrade;_this182.ConstraintSource=ConstraintSource;_this182.CreatingActor=CreatingActor;_this182.CreationTime=CreationTime;_this182.UserDefinedGrade=UserDefinedGrade;_this182.type=1959218052;return _this182;}return _createClass(IfcConstraint);}(IfcLineObject);IFC2X32.IfcConstraint=IfcConstraint;var IfcConstraintAggregationRelationship=/*#__PURE__*/function(_IfcLineObject20){_inherits(IfcConstraintAggregationRelationship,_IfcLineObject20);var _super186=_createSuper(IfcConstraintAggregationRelationship);function IfcConstraintAggregationRelationship(expressID,Name,Description,RelatingConstraint,RelatedConstraints,LogicalAggregator){var _this183;_classCallCheck(this,IfcConstraintAggregationRelationship);_this183=_super186.call(this,expressID);_this183.Name=Name;_this183.Description=Description;_this183.RelatingConstraint=RelatingConstraint;_this183.RelatedConstraints=RelatedConstraints;_this183.LogicalAggregator=LogicalAggregator;_this183.type=1658513725;return _this183;}return _createClass(IfcConstraintAggregationRelationship);}(IfcLineObject);IFC2X32.IfcConstraintAggregationRelationship=IfcConstraintAggregationRelationship;var IfcConstraintClassificationRelationship=/*#__PURE__*/function(_IfcLineObject21){_inherits(IfcConstraintClassificationRelationship,_IfcLineObject21);var _super187=_createSuper(IfcConstraintClassificationRelationship);function IfcConstraintClassificationRelationship(expressID,ClassifiedConstraint,RelatedClassifications){var _this184;_classCallCheck(this,IfcConstraintClassificationRelationship);_this184=_super187.call(this,expressID);_this184.ClassifiedConstraint=ClassifiedConstraint;_this184.RelatedClassifications=RelatedClassifications;_this184.type=613356794;return _this184;}return _createClass(IfcConstraintClassificationRelationship);}(IfcLineObject);IFC2X32.IfcConstraintClassificationRelationship=IfcConstraintClassificationRelationship;var IfcConstraintRelationship=/*#__PURE__*/function(_IfcLineObject22){_inherits(IfcConstraintRelationship,_IfcLineObject22);var _super188=_createSuper(IfcConstraintRelationship);function IfcConstraintRelationship(expressID,Name,Description,RelatingConstraint,RelatedConstraints){var _this185;_classCallCheck(this,IfcConstraintRelationship);_this185=_super188.call(this,expressID);_this185.Name=Name;_this185.Description=Description;_this185.RelatingConstraint=RelatingConstraint;_this185.RelatedConstraints=RelatedConstraints;_this185.type=347226245;return _this185;}return _createClass(IfcConstraintRelationship);}(IfcLineObject);IFC2X32.IfcConstraintRelationship=IfcConstraintRelationship;var IfcCoordinatedUniversalTimeOffset=/*#__PURE__*/function(_IfcLineObject23){_inherits(IfcCoordinatedUniversalTimeOffset,_IfcLineObject23);var _super189=_createSuper(IfcCoordinatedUniversalTimeOffset);function IfcCoordinatedUniversalTimeOffset(expressID,HourOffset,MinuteOffset,Sense){var _this186;_classCallCheck(this,IfcCoordinatedUniversalTimeOffset);_this186=_super189.call(this,expressID);_this186.HourOffset=HourOffset;_this186.MinuteOffset=MinuteOffset;_this186.Sense=Sense;_this186.type=1065062679;return _this186;}return _createClass(IfcCoordinatedUniversalTimeOffset);}(IfcLineObject);IFC2X32.IfcCoordinatedUniversalTimeOffset=IfcCoordinatedUniversalTimeOffset;var IfcCostValue=/*#__PURE__*/function(_IfcAppliedValue){_inherits(IfcCostValue,_IfcAppliedValue);var _super190=_createSuper(IfcCostValue);function IfcCostValue(expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,CostType,Condition){var _this187;_classCallCheck(this,IfcCostValue);_this187=_super190.call(this,expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate);_this187.Name=Name;_this187.Description=Description;_this187.AppliedValue=AppliedValue;_this187.UnitBasis=UnitBasis;_this187.ApplicableDate=ApplicableDate;_this187.FixedUntilDate=FixedUntilDate;_this187.CostType=CostType;_this187.Condition=Condition;_this187.type=602808272;return _this187;}return _createClass(IfcCostValue);}(IfcAppliedValue);IFC2X32.IfcCostValue=IfcCostValue;var IfcCurrencyRelationship=/*#__PURE__*/function(_IfcLineObject24){_inherits(IfcCurrencyRelationship,_IfcLineObject24);var _super191=_createSuper(IfcCurrencyRelationship);function IfcCurrencyRelationship(expressID,RelatingMonetaryUnit,RelatedMonetaryUnit,ExchangeRate,RateDateTime,RateSource){var _this188;_classCallCheck(this,IfcCurrencyRelationship);_this188=_super191.call(this,expressID);_this188.RelatingMonetaryUnit=RelatingMonetaryUnit;_this188.RelatedMonetaryUnit=RelatedMonetaryUnit;_this188.ExchangeRate=ExchangeRate;_this188.RateDateTime=RateDateTime;_this188.RateSource=RateSource;_this188.type=539742890;return _this188;}return _createClass(IfcCurrencyRelationship);}(IfcLineObject);IFC2X32.IfcCurrencyRelationship=IfcCurrencyRelationship;var IfcCurveStyleFont=/*#__PURE__*/function(_IfcLineObject25){_inherits(IfcCurveStyleFont,_IfcLineObject25);var _super192=_createSuper(IfcCurveStyleFont);function IfcCurveStyleFont(expressID,Name,PatternList){var _this189;_classCallCheck(this,IfcCurveStyleFont);_this189=_super192.call(this,expressID);_this189.Name=Name;_this189.PatternList=PatternList;_this189.type=1105321065;return _this189;}return _createClass(IfcCurveStyleFont);}(IfcLineObject);IFC2X32.IfcCurveStyleFont=IfcCurveStyleFont;var IfcCurveStyleFontAndScaling=/*#__PURE__*/function(_IfcLineObject26){_inherits(IfcCurveStyleFontAndScaling,_IfcLineObject26);var _super193=_createSuper(IfcCurveStyleFontAndScaling);function IfcCurveStyleFontAndScaling(expressID,Name,CurveFont,CurveFontScaling){var _this190;_classCallCheck(this,IfcCurveStyleFontAndScaling);_this190=_super193.call(this,expressID);_this190.Name=Name;_this190.CurveFont=CurveFont;_this190.CurveFontScaling=CurveFontScaling;_this190.type=2367409068;return _this190;}return _createClass(IfcCurveStyleFontAndScaling);}(IfcLineObject);IFC2X32.IfcCurveStyleFontAndScaling=IfcCurveStyleFontAndScaling;var IfcCurveStyleFontPattern=/*#__PURE__*/function(_IfcLineObject27){_inherits(IfcCurveStyleFontPattern,_IfcLineObject27);var _super194=_createSuper(IfcCurveStyleFontPattern);function IfcCurveStyleFontPattern(expressID,VisibleSegmentLength,InvisibleSegmentLength){var _this191;_classCallCheck(this,IfcCurveStyleFontPattern);_this191=_super194.call(this,expressID);_this191.VisibleSegmentLength=VisibleSegmentLength;_this191.InvisibleSegmentLength=InvisibleSegmentLength;_this191.type=3510044353;return _this191;}return _createClass(IfcCurveStyleFontPattern);}(IfcLineObject);IFC2X32.IfcCurveStyleFontPattern=IfcCurveStyleFontPattern;var IfcDateAndTime=/*#__PURE__*/function(_IfcLineObject28){_inherits(IfcDateAndTime,_IfcLineObject28);var _super195=_createSuper(IfcDateAndTime);function IfcDateAndTime(expressID,DateComponent,TimeComponent){var _this192;_classCallCheck(this,IfcDateAndTime);_this192=_super195.call(this,expressID);_this192.DateComponent=DateComponent;_this192.TimeComponent=TimeComponent;_this192.type=1072939445;return _this192;}return _createClass(IfcDateAndTime);}(IfcLineObject);IFC2X32.IfcDateAndTime=IfcDateAndTime;var IfcDerivedUnit=/*#__PURE__*/function(_IfcLineObject29){_inherits(IfcDerivedUnit,_IfcLineObject29);var _super196=_createSuper(IfcDerivedUnit);function IfcDerivedUnit(expressID,Elements,UnitType,UserDefinedType){var _this193;_classCallCheck(this,IfcDerivedUnit);_this193=_super196.call(this,expressID);_this193.Elements=Elements;_this193.UnitType=UnitType;_this193.UserDefinedType=UserDefinedType;_this193.type=1765591967;return _this193;}return _createClass(IfcDerivedUnit);}(IfcLineObject);IFC2X32.IfcDerivedUnit=IfcDerivedUnit;var IfcDerivedUnitElement=/*#__PURE__*/function(_IfcLineObject30){_inherits(IfcDerivedUnitElement,_IfcLineObject30);var _super197=_createSuper(IfcDerivedUnitElement);function IfcDerivedUnitElement(expressID,Unit,Exponent){var _this194;_classCallCheck(this,IfcDerivedUnitElement);_this194=_super197.call(this,expressID);_this194.Unit=Unit;_this194.Exponent=Exponent;_this194.type=1045800335;return _this194;}return _createClass(IfcDerivedUnitElement);}(IfcLineObject);IFC2X32.IfcDerivedUnitElement=IfcDerivedUnitElement;var IfcDimensionalExponents=/*#__PURE__*/function(_IfcLineObject31){_inherits(IfcDimensionalExponents,_IfcLineObject31);var _super198=_createSuper(IfcDimensionalExponents);function IfcDimensionalExponents(expressID,LengthExponent,MassExponent,TimeExponent,ElectricCurrentExponent,ThermodynamicTemperatureExponent,AmountOfSubstanceExponent,LuminousIntensityExponent){var _this195;_classCallCheck(this,IfcDimensionalExponents);_this195=_super198.call(this,expressID);_this195.LengthExponent=LengthExponent;_this195.MassExponent=MassExponent;_this195.TimeExponent=TimeExponent;_this195.ElectricCurrentExponent=ElectricCurrentExponent;_this195.ThermodynamicTemperatureExponent=ThermodynamicTemperatureExponent;_this195.AmountOfSubstanceExponent=AmountOfSubstanceExponent;_this195.LuminousIntensityExponent=LuminousIntensityExponent;_this195.type=2949456006;return _this195;}return _createClass(IfcDimensionalExponents);}(IfcLineObject);IFC2X32.IfcDimensionalExponents=IfcDimensionalExponents;var IfcDocumentElectronicFormat=/*#__PURE__*/function(_IfcLineObject32){_inherits(IfcDocumentElectronicFormat,_IfcLineObject32);var _super199=_createSuper(IfcDocumentElectronicFormat);function IfcDocumentElectronicFormat(expressID,FileExtension,MimeContentType,MimeSubtype){var _this196;_classCallCheck(this,IfcDocumentElectronicFormat);_this196=_super199.call(this,expressID);_this196.FileExtension=FileExtension;_this196.MimeContentType=MimeContentType;_this196.MimeSubtype=MimeSubtype;_this196.type=1376555844;return _this196;}return _createClass(IfcDocumentElectronicFormat);}(IfcLineObject);IFC2X32.IfcDocumentElectronicFormat=IfcDocumentElectronicFormat;var IfcDocumentInformation=/*#__PURE__*/function(_IfcLineObject33){_inherits(IfcDocumentInformation,_IfcLineObject33);var _super200=_createSuper(IfcDocumentInformation);function IfcDocumentInformation(expressID,DocumentId,Name,Description,DocumentReferences,Purpose,IntendedUse,Scope,Revision,DocumentOwner,Editors,CreationTime,LastRevisionTime,ElectronicFormat,ValidFrom,ValidUntil,Confidentiality,Status){var _this197;_classCallCheck(this,IfcDocumentInformation);_this197=_super200.call(this,expressID);_this197.DocumentId=DocumentId;_this197.Name=Name;_this197.Description=Description;_this197.DocumentReferences=DocumentReferences;_this197.Purpose=Purpose;_this197.IntendedUse=IntendedUse;_this197.Scope=Scope;_this197.Revision=Revision;_this197.DocumentOwner=DocumentOwner;_this197.Editors=Editors;_this197.CreationTime=CreationTime;_this197.LastRevisionTime=LastRevisionTime;_this197.ElectronicFormat=ElectronicFormat;_this197.ValidFrom=ValidFrom;_this197.ValidUntil=ValidUntil;_this197.Confidentiality=Confidentiality;_this197.Status=Status;_this197.type=1154170062;return _this197;}return _createClass(IfcDocumentInformation);}(IfcLineObject);IFC2X32.IfcDocumentInformation=IfcDocumentInformation;var IfcDocumentInformationRelationship=/*#__PURE__*/function(_IfcLineObject34){_inherits(IfcDocumentInformationRelationship,_IfcLineObject34);var _super201=_createSuper(IfcDocumentInformationRelationship);function IfcDocumentInformationRelationship(expressID,RelatingDocument,RelatedDocuments,RelationshipType){var _this198;_classCallCheck(this,IfcDocumentInformationRelationship);_this198=_super201.call(this,expressID);_this198.RelatingDocument=RelatingDocument;_this198.RelatedDocuments=RelatedDocuments;_this198.RelationshipType=RelationshipType;_this198.type=770865208;return _this198;}return _createClass(IfcDocumentInformationRelationship);}(IfcLineObject);IFC2X32.IfcDocumentInformationRelationship=IfcDocumentInformationRelationship;var IfcDraughtingCalloutRelationship=/*#__PURE__*/function(_IfcLineObject35){_inherits(IfcDraughtingCalloutRelationship,_IfcLineObject35);var _super202=_createSuper(IfcDraughtingCalloutRelationship);function IfcDraughtingCalloutRelationship(expressID,Name,Description,RelatingDraughtingCallout,RelatedDraughtingCallout){var _this199;_classCallCheck(this,IfcDraughtingCalloutRelationship);_this199=_super202.call(this,expressID);_this199.Name=Name;_this199.Description=Description;_this199.RelatingDraughtingCallout=RelatingDraughtingCallout;_this199.RelatedDraughtingCallout=RelatedDraughtingCallout;_this199.type=3796139169;return _this199;}return _createClass(IfcDraughtingCalloutRelationship);}(IfcLineObject);IFC2X32.IfcDraughtingCalloutRelationship=IfcDraughtingCalloutRelationship;var IfcEnvironmentalImpactValue=/*#__PURE__*/function(_IfcAppliedValue2){_inherits(IfcEnvironmentalImpactValue,_IfcAppliedValue2);var _super203=_createSuper(IfcEnvironmentalImpactValue);function IfcEnvironmentalImpactValue(expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,ImpactType,Category,UserDefinedCategory){var _this200;_classCallCheck(this,IfcEnvironmentalImpactValue);_this200=_super203.call(this,expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate);_this200.Name=Name;_this200.Description=Description;_this200.AppliedValue=AppliedValue;_this200.UnitBasis=UnitBasis;_this200.ApplicableDate=ApplicableDate;_this200.FixedUntilDate=FixedUntilDate;_this200.ImpactType=ImpactType;_this200.Category=Category;_this200.UserDefinedCategory=UserDefinedCategory;_this200.type=1648886627;return _this200;}return _createClass(IfcEnvironmentalImpactValue);}(IfcAppliedValue);IFC2X32.IfcEnvironmentalImpactValue=IfcEnvironmentalImpactValue;var IfcExternalReference=/*#__PURE__*/function(_IfcLineObject36){_inherits(IfcExternalReference,_IfcLineObject36);var _super204=_createSuper(IfcExternalReference);function IfcExternalReference(expressID,Location,ItemReference,Name){var _this201;_classCallCheck(this,IfcExternalReference);_this201=_super204.call(this,expressID);_this201.Location=Location;_this201.ItemReference=ItemReference;_this201.Name=Name;_this201.type=3200245327;return _this201;}return _createClass(IfcExternalReference);}(IfcLineObject);IFC2X32.IfcExternalReference=IfcExternalReference;var IfcExternallyDefinedHatchStyle=/*#__PURE__*/function(_IfcExternalReference){_inherits(IfcExternallyDefinedHatchStyle,_IfcExternalReference);var _super205=_createSuper(IfcExternallyDefinedHatchStyle);function IfcExternallyDefinedHatchStyle(expressID,Location,ItemReference,Name){var _this202;_classCallCheck(this,IfcExternallyDefinedHatchStyle);_this202=_super205.call(this,expressID,Location,ItemReference,Name);_this202.Location=Location;_this202.ItemReference=ItemReference;_this202.Name=Name;_this202.type=2242383968;return _this202;}return _createClass(IfcExternallyDefinedHatchStyle);}(IfcExternalReference);IFC2X32.IfcExternallyDefinedHatchStyle=IfcExternallyDefinedHatchStyle;var IfcExternallyDefinedSurfaceStyle=/*#__PURE__*/function(_IfcExternalReference2){_inherits(IfcExternallyDefinedSurfaceStyle,_IfcExternalReference2);var _super206=_createSuper(IfcExternallyDefinedSurfaceStyle);function IfcExternallyDefinedSurfaceStyle(expressID,Location,ItemReference,Name){var _this203;_classCallCheck(this,IfcExternallyDefinedSurfaceStyle);_this203=_super206.call(this,expressID,Location,ItemReference,Name);_this203.Location=Location;_this203.ItemReference=ItemReference;_this203.Name=Name;_this203.type=1040185647;return _this203;}return _createClass(IfcExternallyDefinedSurfaceStyle);}(IfcExternalReference);IFC2X32.IfcExternallyDefinedSurfaceStyle=IfcExternallyDefinedSurfaceStyle;var IfcExternallyDefinedSymbol=/*#__PURE__*/function(_IfcExternalReference3){_inherits(IfcExternallyDefinedSymbol,_IfcExternalReference3);var _super207=_createSuper(IfcExternallyDefinedSymbol);function IfcExternallyDefinedSymbol(expressID,Location,ItemReference,Name){var _this204;_classCallCheck(this,IfcExternallyDefinedSymbol);_this204=_super207.call(this,expressID,Location,ItemReference,Name);_this204.Location=Location;_this204.ItemReference=ItemReference;_this204.Name=Name;_this204.type=3207319532;return _this204;}return _createClass(IfcExternallyDefinedSymbol);}(IfcExternalReference);IFC2X32.IfcExternallyDefinedSymbol=IfcExternallyDefinedSymbol;var IfcExternallyDefinedTextFont=/*#__PURE__*/function(_IfcExternalReference4){_inherits(IfcExternallyDefinedTextFont,_IfcExternalReference4);var _super208=_createSuper(IfcExternallyDefinedTextFont);function IfcExternallyDefinedTextFont(expressID,Location,ItemReference,Name){var _this205;_classCallCheck(this,IfcExternallyDefinedTextFont);_this205=_super208.call(this,expressID,Location,ItemReference,Name);_this205.Location=Location;_this205.ItemReference=ItemReference;_this205.Name=Name;_this205.type=3548104201;return _this205;}return _createClass(IfcExternallyDefinedTextFont);}(IfcExternalReference);IFC2X32.IfcExternallyDefinedTextFont=IfcExternallyDefinedTextFont;var IfcGridAxis=/*#__PURE__*/function(_IfcLineObject37){_inherits(IfcGridAxis,_IfcLineObject37);var _super209=_createSuper(IfcGridAxis);function IfcGridAxis(expressID,AxisTag,AxisCurve,SameSense){var _this206;_classCallCheck(this,IfcGridAxis);_this206=_super209.call(this,expressID);_this206.AxisTag=AxisTag;_this206.AxisCurve=AxisCurve;_this206.SameSense=SameSense;_this206.type=852622518;return _this206;}return _createClass(IfcGridAxis);}(IfcLineObject);IFC2X32.IfcGridAxis=IfcGridAxis;var IfcIrregularTimeSeriesValue=/*#__PURE__*/function(_IfcLineObject38){_inherits(IfcIrregularTimeSeriesValue,_IfcLineObject38);var _super210=_createSuper(IfcIrregularTimeSeriesValue);function IfcIrregularTimeSeriesValue(expressID,TimeStamp,ListValues){var _this207;_classCallCheck(this,IfcIrregularTimeSeriesValue);_this207=_super210.call(this,expressID);_this207.TimeStamp=TimeStamp;_this207.ListValues=ListValues;_this207.type=3020489413;return _this207;}return _createClass(IfcIrregularTimeSeriesValue);}(IfcLineObject);IFC2X32.IfcIrregularTimeSeriesValue=IfcIrregularTimeSeriesValue;var IfcLibraryInformation=/*#__PURE__*/function(_IfcLineObject39){_inherits(IfcLibraryInformation,_IfcLineObject39);var _super211=_createSuper(IfcLibraryInformation);function IfcLibraryInformation(expressID,Name,Version,Publisher,VersionDate,LibraryReference){var _this208;_classCallCheck(this,IfcLibraryInformation);_this208=_super211.call(this,expressID);_this208.Name=Name;_this208.Version=Version;_this208.Publisher=Publisher;_this208.VersionDate=VersionDate;_this208.LibraryReference=LibraryReference;_this208.type=2655187982;return _this208;}return _createClass(IfcLibraryInformation);}(IfcLineObject);IFC2X32.IfcLibraryInformation=IfcLibraryInformation;var IfcLibraryReference=/*#__PURE__*/function(_IfcExternalReference5){_inherits(IfcLibraryReference,_IfcExternalReference5);var _super212=_createSuper(IfcLibraryReference);function IfcLibraryReference(expressID,Location,ItemReference,Name){var _this209;_classCallCheck(this,IfcLibraryReference);_this209=_super212.call(this,expressID,Location,ItemReference,Name);_this209.Location=Location;_this209.ItemReference=ItemReference;_this209.Name=Name;_this209.type=3452421091;return _this209;}return _createClass(IfcLibraryReference);}(IfcExternalReference);IFC2X32.IfcLibraryReference=IfcLibraryReference;var IfcLightDistributionData=/*#__PURE__*/function(_IfcLineObject40){_inherits(IfcLightDistributionData,_IfcLineObject40);var _super213=_createSuper(IfcLightDistributionData);function IfcLightDistributionData(expressID,MainPlaneAngle,SecondaryPlaneAngle,LuminousIntensity){var _this210;_classCallCheck(this,IfcLightDistributionData);_this210=_super213.call(this,expressID);_this210.MainPlaneAngle=MainPlaneAngle;_this210.SecondaryPlaneAngle=SecondaryPlaneAngle;_this210.LuminousIntensity=LuminousIntensity;_this210.type=4162380809;return _this210;}return _createClass(IfcLightDistributionData);}(IfcLineObject);IFC2X32.IfcLightDistributionData=IfcLightDistributionData;var IfcLightIntensityDistribution=/*#__PURE__*/function(_IfcLineObject41){_inherits(IfcLightIntensityDistribution,_IfcLineObject41);var _super214=_createSuper(IfcLightIntensityDistribution);function IfcLightIntensityDistribution(expressID,LightDistributionCurve,DistributionData){var _this211;_classCallCheck(this,IfcLightIntensityDistribution);_this211=_super214.call(this,expressID);_this211.LightDistributionCurve=LightDistributionCurve;_this211.DistributionData=DistributionData;_this211.type=1566485204;return _this211;}return _createClass(IfcLightIntensityDistribution);}(IfcLineObject);IFC2X32.IfcLightIntensityDistribution=IfcLightIntensityDistribution;var IfcLocalTime=/*#__PURE__*/function(_IfcLineObject42){_inherits(IfcLocalTime,_IfcLineObject42);var _super215=_createSuper(IfcLocalTime);function IfcLocalTime(expressID,HourComponent,MinuteComponent,SecondComponent,Zone,DaylightSavingOffset){var _this212;_classCallCheck(this,IfcLocalTime);_this212=_super215.call(this,expressID);_this212.HourComponent=HourComponent;_this212.MinuteComponent=MinuteComponent;_this212.SecondComponent=SecondComponent;_this212.Zone=Zone;_this212.DaylightSavingOffset=DaylightSavingOffset;_this212.type=30780891;return _this212;}return _createClass(IfcLocalTime);}(IfcLineObject);IFC2X32.IfcLocalTime=IfcLocalTime;var IfcMaterial=/*#__PURE__*/function(_IfcLineObject43){_inherits(IfcMaterial,_IfcLineObject43);var _super216=_createSuper(IfcMaterial);function IfcMaterial(expressID,Name){var _this213;_classCallCheck(this,IfcMaterial);_this213=_super216.call(this,expressID);_this213.Name=Name;_this213.type=1838606355;return _this213;}return _createClass(IfcMaterial);}(IfcLineObject);IFC2X32.IfcMaterial=IfcMaterial;var IfcMaterialClassificationRelationship=/*#__PURE__*/function(_IfcLineObject44){_inherits(IfcMaterialClassificationRelationship,_IfcLineObject44);var _super217=_createSuper(IfcMaterialClassificationRelationship);function IfcMaterialClassificationRelationship(expressID,MaterialClassifications,ClassifiedMaterial){var _this214;_classCallCheck(this,IfcMaterialClassificationRelationship);_this214=_super217.call(this,expressID);_this214.MaterialClassifications=MaterialClassifications;_this214.ClassifiedMaterial=ClassifiedMaterial;_this214.type=1847130766;return _this214;}return _createClass(IfcMaterialClassificationRelationship);}(IfcLineObject);IFC2X32.IfcMaterialClassificationRelationship=IfcMaterialClassificationRelationship;var IfcMaterialLayer=/*#__PURE__*/function(_IfcLineObject45){_inherits(IfcMaterialLayer,_IfcLineObject45);var _super218=_createSuper(IfcMaterialLayer);function IfcMaterialLayer(expressID,Material,LayerThickness,IsVentilated){var _this215;_classCallCheck(this,IfcMaterialLayer);_this215=_super218.call(this,expressID);_this215.Material=Material;_this215.LayerThickness=LayerThickness;_this215.IsVentilated=IsVentilated;_this215.type=248100487;return _this215;}return _createClass(IfcMaterialLayer);}(IfcLineObject);IFC2X32.IfcMaterialLayer=IfcMaterialLayer;var IfcMaterialLayerSet=/*#__PURE__*/function(_IfcLineObject46){_inherits(IfcMaterialLayerSet,_IfcLineObject46);var _super219=_createSuper(IfcMaterialLayerSet);function IfcMaterialLayerSet(expressID,MaterialLayers,LayerSetName){var _this216;_classCallCheck(this,IfcMaterialLayerSet);_this216=_super219.call(this,expressID);_this216.MaterialLayers=MaterialLayers;_this216.LayerSetName=LayerSetName;_this216.type=3303938423;return _this216;}return _createClass(IfcMaterialLayerSet);}(IfcLineObject);IFC2X32.IfcMaterialLayerSet=IfcMaterialLayerSet;var IfcMaterialLayerSetUsage=/*#__PURE__*/function(_IfcLineObject47){_inherits(IfcMaterialLayerSetUsage,_IfcLineObject47);var _super220=_createSuper(IfcMaterialLayerSetUsage);function IfcMaterialLayerSetUsage(expressID,ForLayerSet,LayerSetDirection,DirectionSense,OffsetFromReferenceLine){var _this217;_classCallCheck(this,IfcMaterialLayerSetUsage);_this217=_super220.call(this,expressID);_this217.ForLayerSet=ForLayerSet;_this217.LayerSetDirection=LayerSetDirection;_this217.DirectionSense=DirectionSense;_this217.OffsetFromReferenceLine=OffsetFromReferenceLine;_this217.type=1303795690;return _this217;}return _createClass(IfcMaterialLayerSetUsage);}(IfcLineObject);IFC2X32.IfcMaterialLayerSetUsage=IfcMaterialLayerSetUsage;var IfcMaterialList=/*#__PURE__*/function(_IfcLineObject48){_inherits(IfcMaterialList,_IfcLineObject48);var _super221=_createSuper(IfcMaterialList);function IfcMaterialList(expressID,Materials){var _this218;_classCallCheck(this,IfcMaterialList);_this218=_super221.call(this,expressID);_this218.Materials=Materials;_this218.type=2199411900;return _this218;}return _createClass(IfcMaterialList);}(IfcLineObject);IFC2X32.IfcMaterialList=IfcMaterialList;var IfcMaterialProperties=/*#__PURE__*/function(_IfcLineObject49){_inherits(IfcMaterialProperties,_IfcLineObject49);var _super222=_createSuper(IfcMaterialProperties);function IfcMaterialProperties(expressID,Material){var _this219;_classCallCheck(this,IfcMaterialProperties);_this219=_super222.call(this,expressID);_this219.Material=Material;_this219.type=3265635763;return _this219;}return _createClass(IfcMaterialProperties);}(IfcLineObject);IFC2X32.IfcMaterialProperties=IfcMaterialProperties;var IfcMeasureWithUnit=/*#__PURE__*/function(_IfcLineObject50){_inherits(IfcMeasureWithUnit,_IfcLineObject50);var _super223=_createSuper(IfcMeasureWithUnit);function IfcMeasureWithUnit(expressID,ValueComponent,UnitComponent){var _this220;_classCallCheck(this,IfcMeasureWithUnit);_this220=_super223.call(this,expressID);_this220.ValueComponent=ValueComponent;_this220.UnitComponent=UnitComponent;_this220.type=2597039031;return _this220;}return _createClass(IfcMeasureWithUnit);}(IfcLineObject);IFC2X32.IfcMeasureWithUnit=IfcMeasureWithUnit;var IfcMechanicalMaterialProperties=/*#__PURE__*/function(_IfcMaterialPropertie){_inherits(IfcMechanicalMaterialProperties,_IfcMaterialPropertie);var _super224=_createSuper(IfcMechanicalMaterialProperties);function IfcMechanicalMaterialProperties(expressID,Material,DynamicViscosity,YoungModulus,ShearModulus,PoissonRatio,ThermalExpansionCoefficient){var _this221;_classCallCheck(this,IfcMechanicalMaterialProperties);_this221=_super224.call(this,expressID,Material);_this221.Material=Material;_this221.DynamicViscosity=DynamicViscosity;_this221.YoungModulus=YoungModulus;_this221.ShearModulus=ShearModulus;_this221.PoissonRatio=PoissonRatio;_this221.ThermalExpansionCoefficient=ThermalExpansionCoefficient;_this221.type=4256014907;return _this221;}return _createClass(IfcMechanicalMaterialProperties);}(IfcMaterialProperties);IFC2X32.IfcMechanicalMaterialProperties=IfcMechanicalMaterialProperties;var IfcMechanicalSteelMaterialProperties=/*#__PURE__*/function(_IfcMechanicalMateria){_inherits(IfcMechanicalSteelMaterialProperties,_IfcMechanicalMateria);var _super225=_createSuper(IfcMechanicalSteelMaterialProperties);function IfcMechanicalSteelMaterialProperties(expressID,Material,DynamicViscosity,YoungModulus,ShearModulus,PoissonRatio,ThermalExpansionCoefficient,YieldStress,UltimateStress,UltimateStrain,HardeningModule,ProportionalStress,PlasticStrain,Relaxations){var _this222;_classCallCheck(this,IfcMechanicalSteelMaterialProperties);_this222=_super225.call(this,expressID,Material,DynamicViscosity,YoungModulus,ShearModulus,PoissonRatio,ThermalExpansionCoefficient);_this222.Material=Material;_this222.DynamicViscosity=DynamicViscosity;_this222.YoungModulus=YoungModulus;_this222.ShearModulus=ShearModulus;_this222.PoissonRatio=PoissonRatio;_this222.ThermalExpansionCoefficient=ThermalExpansionCoefficient;_this222.YieldStress=YieldStress;_this222.UltimateStress=UltimateStress;_this222.UltimateStrain=UltimateStrain;_this222.HardeningModule=HardeningModule;_this222.ProportionalStress=ProportionalStress;_this222.PlasticStrain=PlasticStrain;_this222.Relaxations=Relaxations;_this222.type=677618848;return _this222;}return _createClass(IfcMechanicalSteelMaterialProperties);}(IfcMechanicalMaterialProperties);IFC2X32.IfcMechanicalSteelMaterialProperties=IfcMechanicalSteelMaterialProperties;var IfcMetric=/*#__PURE__*/function(_IfcConstraint){_inherits(IfcMetric,_IfcConstraint);var _super226=_createSuper(IfcMetric);function IfcMetric(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade,Benchmark,ValueSource,DataValue){var _this223;_classCallCheck(this,IfcMetric);_this223=_super226.call(this,expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade);_this223.Name=Name;_this223.Description=Description;_this223.ConstraintGrade=ConstraintGrade;_this223.ConstraintSource=ConstraintSource;_this223.CreatingActor=CreatingActor;_this223.CreationTime=CreationTime;_this223.UserDefinedGrade=UserDefinedGrade;_this223.Benchmark=Benchmark;_this223.ValueSource=ValueSource;_this223.DataValue=DataValue;_this223.type=3368373690;return _this223;}return _createClass(IfcMetric);}(IfcConstraint);IFC2X32.IfcMetric=IfcMetric;var IfcMonetaryUnit=/*#__PURE__*/function(_IfcLineObject51){_inherits(IfcMonetaryUnit,_IfcLineObject51);var _super227=_createSuper(IfcMonetaryUnit);function IfcMonetaryUnit(expressID,Currency){var _this224;_classCallCheck(this,IfcMonetaryUnit);_this224=_super227.call(this,expressID);_this224.Currency=Currency;_this224.type=2706619895;return _this224;}return _createClass(IfcMonetaryUnit);}(IfcLineObject);IFC2X32.IfcMonetaryUnit=IfcMonetaryUnit;var IfcNamedUnit=/*#__PURE__*/function(_IfcLineObject52){_inherits(IfcNamedUnit,_IfcLineObject52);var _super228=_createSuper(IfcNamedUnit);function IfcNamedUnit(expressID,Dimensions,UnitType){var _this225;_classCallCheck(this,IfcNamedUnit);_this225=_super228.call(this,expressID);_this225.Dimensions=Dimensions;_this225.UnitType=UnitType;_this225.type=1918398963;return _this225;}return _createClass(IfcNamedUnit);}(IfcLineObject);IFC2X32.IfcNamedUnit=IfcNamedUnit;var IfcObjectPlacement=/*#__PURE__*/function(_IfcLineObject53){_inherits(IfcObjectPlacement,_IfcLineObject53);var _super229=_createSuper(IfcObjectPlacement);function IfcObjectPlacement(expressID){var _this226;_classCallCheck(this,IfcObjectPlacement);_this226=_super229.call(this,expressID);_this226.type=3701648758;return _this226;}return _createClass(IfcObjectPlacement);}(IfcLineObject);IFC2X32.IfcObjectPlacement=IfcObjectPlacement;var IfcObjective=/*#__PURE__*/function(_IfcConstraint2){_inherits(IfcObjective,_IfcConstraint2);var _super230=_createSuper(IfcObjective);function IfcObjective(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade,BenchmarkValues,ResultValues,ObjectiveQualifier,UserDefinedQualifier){var _this227;_classCallCheck(this,IfcObjective);_this227=_super230.call(this,expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade);_this227.Name=Name;_this227.Description=Description;_this227.ConstraintGrade=ConstraintGrade;_this227.ConstraintSource=ConstraintSource;_this227.CreatingActor=CreatingActor;_this227.CreationTime=CreationTime;_this227.UserDefinedGrade=UserDefinedGrade;_this227.BenchmarkValues=BenchmarkValues;_this227.ResultValues=ResultValues;_this227.ObjectiveQualifier=ObjectiveQualifier;_this227.UserDefinedQualifier=UserDefinedQualifier;_this227.type=2251480897;return _this227;}return _createClass(IfcObjective);}(IfcConstraint);IFC2X32.IfcObjective=IfcObjective;var IfcOpticalMaterialProperties=/*#__PURE__*/function(_IfcMaterialPropertie2){_inherits(IfcOpticalMaterialProperties,_IfcMaterialPropertie2);var _super231=_createSuper(IfcOpticalMaterialProperties);function IfcOpticalMaterialProperties(expressID,Material,VisibleTransmittance,SolarTransmittance,ThermalIrTransmittance,ThermalIrEmissivityBack,ThermalIrEmissivityFront,VisibleReflectanceBack,VisibleReflectanceFront,SolarReflectanceFront,SolarReflectanceBack){var _this228;_classCallCheck(this,IfcOpticalMaterialProperties);_this228=_super231.call(this,expressID,Material);_this228.Material=Material;_this228.VisibleTransmittance=VisibleTransmittance;_this228.SolarTransmittance=SolarTransmittance;_this228.ThermalIrTransmittance=ThermalIrTransmittance;_this228.ThermalIrEmissivityBack=ThermalIrEmissivityBack;_this228.ThermalIrEmissivityFront=ThermalIrEmissivityFront;_this228.VisibleReflectanceBack=VisibleReflectanceBack;_this228.VisibleReflectanceFront=VisibleReflectanceFront;_this228.SolarReflectanceFront=SolarReflectanceFront;_this228.SolarReflectanceBack=SolarReflectanceBack;_this228.type=1227763645;return _this228;}return _createClass(IfcOpticalMaterialProperties);}(IfcMaterialProperties);IFC2X32.IfcOpticalMaterialProperties=IfcOpticalMaterialProperties;var IfcOrganization=/*#__PURE__*/function(_IfcLineObject54){_inherits(IfcOrganization,_IfcLineObject54);var _super232=_createSuper(IfcOrganization);function IfcOrganization(expressID,Id,Name,Description,Roles,Addresses){var _this229;_classCallCheck(this,IfcOrganization);_this229=_super232.call(this,expressID);_this229.Id=Id;_this229.Name=Name;_this229.Description=Description;_this229.Roles=Roles;_this229.Addresses=Addresses;_this229.type=4251960020;return _this229;}return _createClass(IfcOrganization);}(IfcLineObject);IFC2X32.IfcOrganization=IfcOrganization;var IfcOrganizationRelationship=/*#__PURE__*/function(_IfcLineObject55){_inherits(IfcOrganizationRelationship,_IfcLineObject55);var _super233=_createSuper(IfcOrganizationRelationship);function IfcOrganizationRelationship(expressID,Name,Description,RelatingOrganization,RelatedOrganizations){var _this230;_classCallCheck(this,IfcOrganizationRelationship);_this230=_super233.call(this,expressID);_this230.Name=Name;_this230.Description=Description;_this230.RelatingOrganization=RelatingOrganization;_this230.RelatedOrganizations=RelatedOrganizations;_this230.type=1411181986;return _this230;}return _createClass(IfcOrganizationRelationship);}(IfcLineObject);IFC2X32.IfcOrganizationRelationship=IfcOrganizationRelationship;var IfcOwnerHistory=/*#__PURE__*/function(_IfcLineObject56){_inherits(IfcOwnerHistory,_IfcLineObject56);var _super234=_createSuper(IfcOwnerHistory);function IfcOwnerHistory(expressID,OwningUser,OwningApplication,State,ChangeAction,LastModifiedDate,LastModifyingUser,LastModifyingApplication,CreationDate){var _this231;_classCallCheck(this,IfcOwnerHistory);_this231=_super234.call(this,expressID);_this231.OwningUser=OwningUser;_this231.OwningApplication=OwningApplication;_this231.State=State;_this231.ChangeAction=ChangeAction;_this231.LastModifiedDate=LastModifiedDate;_this231.LastModifyingUser=LastModifyingUser;_this231.LastModifyingApplication=LastModifyingApplication;_this231.CreationDate=CreationDate;_this231.type=1207048766;return _this231;}return _createClass(IfcOwnerHistory);}(IfcLineObject);IFC2X32.IfcOwnerHistory=IfcOwnerHistory;var IfcPerson=/*#__PURE__*/function(_IfcLineObject57){_inherits(IfcPerson,_IfcLineObject57);var _super235=_createSuper(IfcPerson);function IfcPerson(expressID,Id,FamilyName,GivenName,MiddleNames,PrefixTitles,SuffixTitles,Roles,Addresses){var _this232;_classCallCheck(this,IfcPerson);_this232=_super235.call(this,expressID);_this232.Id=Id;_this232.FamilyName=FamilyName;_this232.GivenName=GivenName;_this232.MiddleNames=MiddleNames;_this232.PrefixTitles=PrefixTitles;_this232.SuffixTitles=SuffixTitles;_this232.Roles=Roles;_this232.Addresses=Addresses;_this232.type=2077209135;return _this232;}return _createClass(IfcPerson);}(IfcLineObject);IFC2X32.IfcPerson=IfcPerson;var IfcPersonAndOrganization=/*#__PURE__*/function(_IfcLineObject58){_inherits(IfcPersonAndOrganization,_IfcLineObject58);var _super236=_createSuper(IfcPersonAndOrganization);function IfcPersonAndOrganization(expressID,ThePerson,TheOrganization,Roles){var _this233;_classCallCheck(this,IfcPersonAndOrganization);_this233=_super236.call(this,expressID);_this233.ThePerson=ThePerson;_this233.TheOrganization=TheOrganization;_this233.Roles=Roles;_this233.type=101040310;return _this233;}return _createClass(IfcPersonAndOrganization);}(IfcLineObject);IFC2X32.IfcPersonAndOrganization=IfcPersonAndOrganization;var IfcPhysicalQuantity=/*#__PURE__*/function(_IfcLineObject59){_inherits(IfcPhysicalQuantity,_IfcLineObject59);var _super237=_createSuper(IfcPhysicalQuantity);function IfcPhysicalQuantity(expressID,Name,Description){var _this234;_classCallCheck(this,IfcPhysicalQuantity);_this234=_super237.call(this,expressID);_this234.Name=Name;_this234.Description=Description;_this234.type=2483315170;return _this234;}return _createClass(IfcPhysicalQuantity);}(IfcLineObject);IFC2X32.IfcPhysicalQuantity=IfcPhysicalQuantity;var IfcPhysicalSimpleQuantity=/*#__PURE__*/function(_IfcPhysicalQuantity){_inherits(IfcPhysicalSimpleQuantity,_IfcPhysicalQuantity);var _super238=_createSuper(IfcPhysicalSimpleQuantity);function IfcPhysicalSimpleQuantity(expressID,Name,Description,Unit){var _this235;_classCallCheck(this,IfcPhysicalSimpleQuantity);_this235=_super238.call(this,expressID,Name,Description);_this235.Name=Name;_this235.Description=Description;_this235.Unit=Unit;_this235.type=2226359599;return _this235;}return _createClass(IfcPhysicalSimpleQuantity);}(IfcPhysicalQuantity);IFC2X32.IfcPhysicalSimpleQuantity=IfcPhysicalSimpleQuantity;var IfcPostalAddress=/*#__PURE__*/function(_IfcAddress){_inherits(IfcPostalAddress,_IfcAddress);var _super239=_createSuper(IfcPostalAddress);function IfcPostalAddress(expressID,Purpose,Description,UserDefinedPurpose,InternalLocation,AddressLines,PostalBox,Town,Region,PostalCode,Country){var _this236;_classCallCheck(this,IfcPostalAddress);_this236=_super239.call(this,expressID,Purpose,Description,UserDefinedPurpose);_this236.Purpose=Purpose;_this236.Description=Description;_this236.UserDefinedPurpose=UserDefinedPurpose;_this236.InternalLocation=InternalLocation;_this236.AddressLines=AddressLines;_this236.PostalBox=PostalBox;_this236.Town=Town;_this236.Region=Region;_this236.PostalCode=PostalCode;_this236.Country=Country;_this236.type=3355820592;return _this236;}return _createClass(IfcPostalAddress);}(IfcAddress);IFC2X32.IfcPostalAddress=IfcPostalAddress;var IfcPreDefinedItem=/*#__PURE__*/function(_IfcLineObject60){_inherits(IfcPreDefinedItem,_IfcLineObject60);var _super240=_createSuper(IfcPreDefinedItem);function IfcPreDefinedItem(expressID,Name){var _this237;_classCallCheck(this,IfcPreDefinedItem);_this237=_super240.call(this,expressID);_this237.Name=Name;_this237.type=3727388367;return _this237;}return _createClass(IfcPreDefinedItem);}(IfcLineObject);IFC2X32.IfcPreDefinedItem=IfcPreDefinedItem;var IfcPreDefinedSymbol=/*#__PURE__*/function(_IfcPreDefinedItem){_inherits(IfcPreDefinedSymbol,_IfcPreDefinedItem);var _super241=_createSuper(IfcPreDefinedSymbol);function IfcPreDefinedSymbol(expressID,Name){var _this238;_classCallCheck(this,IfcPreDefinedSymbol);_this238=_super241.call(this,expressID,Name);_this238.Name=Name;_this238.type=990879717;return _this238;}return _createClass(IfcPreDefinedSymbol);}(IfcPreDefinedItem);IFC2X32.IfcPreDefinedSymbol=IfcPreDefinedSymbol;var IfcPreDefinedTerminatorSymbol=/*#__PURE__*/function(_IfcPreDefinedSymbol){_inherits(IfcPreDefinedTerminatorSymbol,_IfcPreDefinedSymbol);var _super242=_createSuper(IfcPreDefinedTerminatorSymbol);function IfcPreDefinedTerminatorSymbol(expressID,Name){var _this239;_classCallCheck(this,IfcPreDefinedTerminatorSymbol);_this239=_super242.call(this,expressID,Name);_this239.Name=Name;_this239.type=3213052703;return _this239;}return _createClass(IfcPreDefinedTerminatorSymbol);}(IfcPreDefinedSymbol);IFC2X32.IfcPreDefinedTerminatorSymbol=IfcPreDefinedTerminatorSymbol;var IfcPreDefinedTextFont=/*#__PURE__*/function(_IfcPreDefinedItem2){_inherits(IfcPreDefinedTextFont,_IfcPreDefinedItem2);var _super243=_createSuper(IfcPreDefinedTextFont);function IfcPreDefinedTextFont(expressID,Name){var _this240;_classCallCheck(this,IfcPreDefinedTextFont);_this240=_super243.call(this,expressID,Name);_this240.Name=Name;_this240.type=1775413392;return _this240;}return _createClass(IfcPreDefinedTextFont);}(IfcPreDefinedItem);IFC2X32.IfcPreDefinedTextFont=IfcPreDefinedTextFont;var IfcPresentationLayerAssignment=/*#__PURE__*/function(_IfcLineObject61){_inherits(IfcPresentationLayerAssignment,_IfcLineObject61);var _super244=_createSuper(IfcPresentationLayerAssignment);function IfcPresentationLayerAssignment(expressID,Name,Description,AssignedItems,Identifier){var _this241;_classCallCheck(this,IfcPresentationLayerAssignment);_this241=_super244.call(this,expressID);_this241.Name=Name;_this241.Description=Description;_this241.AssignedItems=AssignedItems;_this241.Identifier=Identifier;_this241.type=2022622350;return _this241;}return _createClass(IfcPresentationLayerAssignment);}(IfcLineObject);IFC2X32.IfcPresentationLayerAssignment=IfcPresentationLayerAssignment;var IfcPresentationLayerWithStyle=/*#__PURE__*/function(_IfcPresentationLayer){_inherits(IfcPresentationLayerWithStyle,_IfcPresentationLayer);var _super245=_createSuper(IfcPresentationLayerWithStyle);function IfcPresentationLayerWithStyle(expressID,Name,Description,AssignedItems,Identifier,LayerOn,LayerFrozen,LayerBlocked,LayerStyles){var _this242;_classCallCheck(this,IfcPresentationLayerWithStyle);_this242=_super245.call(this,expressID,Name,Description,AssignedItems,Identifier);_this242.Name=Name;_this242.Description=Description;_this242.AssignedItems=AssignedItems;_this242.Identifier=Identifier;_this242.LayerOn=LayerOn;_this242.LayerFrozen=LayerFrozen;_this242.LayerBlocked=LayerBlocked;_this242.LayerStyles=LayerStyles;_this242.type=1304840413;return _this242;}return _createClass(IfcPresentationLayerWithStyle);}(IfcPresentationLayerAssignment);IFC2X32.IfcPresentationLayerWithStyle=IfcPresentationLayerWithStyle;var IfcPresentationStyle=/*#__PURE__*/function(_IfcLineObject62){_inherits(IfcPresentationStyle,_IfcLineObject62);var _super246=_createSuper(IfcPresentationStyle);function IfcPresentationStyle(expressID,Name){var _this243;_classCallCheck(this,IfcPresentationStyle);_this243=_super246.call(this,expressID);_this243.Name=Name;_this243.type=3119450353;return _this243;}return _createClass(IfcPresentationStyle);}(IfcLineObject);IFC2X32.IfcPresentationStyle=IfcPresentationStyle;var IfcPresentationStyleAssignment=/*#__PURE__*/function(_IfcLineObject63){_inherits(IfcPresentationStyleAssignment,_IfcLineObject63);var _super247=_createSuper(IfcPresentationStyleAssignment);function IfcPresentationStyleAssignment(expressID,Styles){var _this244;_classCallCheck(this,IfcPresentationStyleAssignment);_this244=_super247.call(this,expressID);_this244.Styles=Styles;_this244.type=2417041796;return _this244;}return _createClass(IfcPresentationStyleAssignment);}(IfcLineObject);IFC2X32.IfcPresentationStyleAssignment=IfcPresentationStyleAssignment;var IfcProductRepresentation=/*#__PURE__*/function(_IfcLineObject64){_inherits(IfcProductRepresentation,_IfcLineObject64);var _super248=_createSuper(IfcProductRepresentation);function IfcProductRepresentation(expressID,Name,Description,Representations){var _this245;_classCallCheck(this,IfcProductRepresentation);_this245=_super248.call(this,expressID);_this245.Name=Name;_this245.Description=Description;_this245.Representations=Representations;_this245.type=2095639259;return _this245;}return _createClass(IfcProductRepresentation);}(IfcLineObject);IFC2X32.IfcProductRepresentation=IfcProductRepresentation;var IfcProductsOfCombustionProperties=/*#__PURE__*/function(_IfcMaterialPropertie3){_inherits(IfcProductsOfCombustionProperties,_IfcMaterialPropertie3);var _super249=_createSuper(IfcProductsOfCombustionProperties);function IfcProductsOfCombustionProperties(expressID,Material,SpecificHeatCapacity,N20Content,COContent,CO2Content){var _this246;_classCallCheck(this,IfcProductsOfCombustionProperties);_this246=_super249.call(this,expressID,Material);_this246.Material=Material;_this246.SpecificHeatCapacity=SpecificHeatCapacity;_this246.N20Content=N20Content;_this246.COContent=COContent;_this246.CO2Content=CO2Content;_this246.type=2267347899;return _this246;}return _createClass(IfcProductsOfCombustionProperties);}(IfcMaterialProperties);IFC2X32.IfcProductsOfCombustionProperties=IfcProductsOfCombustionProperties;var IfcProfileDef=/*#__PURE__*/function(_IfcLineObject65){_inherits(IfcProfileDef,_IfcLineObject65);var _super250=_createSuper(IfcProfileDef);function IfcProfileDef(expressID,ProfileType,ProfileName){var _this247;_classCallCheck(this,IfcProfileDef);_this247=_super250.call(this,expressID);_this247.ProfileType=ProfileType;_this247.ProfileName=ProfileName;_this247.type=3958567839;return _this247;}return _createClass(IfcProfileDef);}(IfcLineObject);IFC2X32.IfcProfileDef=IfcProfileDef;var IfcProfileProperties=/*#__PURE__*/function(_IfcLineObject66){_inherits(IfcProfileProperties,_IfcLineObject66);var _super251=_createSuper(IfcProfileProperties);function IfcProfileProperties(expressID,ProfileName,ProfileDefinition){var _this248;_classCallCheck(this,IfcProfileProperties);_this248=_super251.call(this,expressID);_this248.ProfileName=ProfileName;_this248.ProfileDefinition=ProfileDefinition;_this248.type=2802850158;return _this248;}return _createClass(IfcProfileProperties);}(IfcLineObject);IFC2X32.IfcProfileProperties=IfcProfileProperties;var IfcProperty=/*#__PURE__*/function(_IfcLineObject67){_inherits(IfcProperty,_IfcLineObject67);var _super252=_createSuper(IfcProperty);function IfcProperty(expressID,Name,Description){var _this249;_classCallCheck(this,IfcProperty);_this249=_super252.call(this,expressID);_this249.Name=Name;_this249.Description=Description;_this249.type=2598011224;return _this249;}return _createClass(IfcProperty);}(IfcLineObject);IFC2X32.IfcProperty=IfcProperty;var IfcPropertyConstraintRelationship=/*#__PURE__*/function(_IfcLineObject68){_inherits(IfcPropertyConstraintRelationship,_IfcLineObject68);var _super253=_createSuper(IfcPropertyConstraintRelationship);function IfcPropertyConstraintRelationship(expressID,RelatingConstraint,RelatedProperties,Name,Description){var _this250;_classCallCheck(this,IfcPropertyConstraintRelationship);_this250=_super253.call(this,expressID);_this250.RelatingConstraint=RelatingConstraint;_this250.RelatedProperties=RelatedProperties;_this250.Name=Name;_this250.Description=Description;_this250.type=3896028662;return _this250;}return _createClass(IfcPropertyConstraintRelationship);}(IfcLineObject);IFC2X32.IfcPropertyConstraintRelationship=IfcPropertyConstraintRelationship;var IfcPropertyDependencyRelationship=/*#__PURE__*/function(_IfcLineObject69){_inherits(IfcPropertyDependencyRelationship,_IfcLineObject69);var _super254=_createSuper(IfcPropertyDependencyRelationship);function IfcPropertyDependencyRelationship(expressID,DependingProperty,DependantProperty,Name,Description,Expression){var _this251;_classCallCheck(this,IfcPropertyDependencyRelationship);_this251=_super254.call(this,expressID);_this251.DependingProperty=DependingProperty;_this251.DependantProperty=DependantProperty;_this251.Name=Name;_this251.Description=Description;_this251.Expression=Expression;_this251.type=148025276;return _this251;}return _createClass(IfcPropertyDependencyRelationship);}(IfcLineObject);IFC2X32.IfcPropertyDependencyRelationship=IfcPropertyDependencyRelationship;var IfcPropertyEnumeration=/*#__PURE__*/function(_IfcLineObject70){_inherits(IfcPropertyEnumeration,_IfcLineObject70);var _super255=_createSuper(IfcPropertyEnumeration);function IfcPropertyEnumeration(expressID,Name,EnumerationValues,Unit){var _this252;_classCallCheck(this,IfcPropertyEnumeration);_this252=_super255.call(this,expressID);_this252.Name=Name;_this252.EnumerationValues=EnumerationValues;_this252.Unit=Unit;_this252.type=3710013099;return _this252;}return _createClass(IfcPropertyEnumeration);}(IfcLineObject);IFC2X32.IfcPropertyEnumeration=IfcPropertyEnumeration;var IfcQuantityArea=/*#__PURE__*/function(_IfcPhysicalSimpleQua){_inherits(IfcQuantityArea,_IfcPhysicalSimpleQua);var _super256=_createSuper(IfcQuantityArea);function IfcQuantityArea(expressID,Name,Description,Unit,AreaValue){var _this253;_classCallCheck(this,IfcQuantityArea);_this253=_super256.call(this,expressID,Name,Description,Unit);_this253.Name=Name;_this253.Description=Description;_this253.Unit=Unit;_this253.AreaValue=AreaValue;_this253.type=2044713172;return _this253;}return _createClass(IfcQuantityArea);}(IfcPhysicalSimpleQuantity);IFC2X32.IfcQuantityArea=IfcQuantityArea;var IfcQuantityCount=/*#__PURE__*/function(_IfcPhysicalSimpleQua2){_inherits(IfcQuantityCount,_IfcPhysicalSimpleQua2);var _super257=_createSuper(IfcQuantityCount);function IfcQuantityCount(expressID,Name,Description,Unit,CountValue){var _this254;_classCallCheck(this,IfcQuantityCount);_this254=_super257.call(this,expressID,Name,Description,Unit);_this254.Name=Name;_this254.Description=Description;_this254.Unit=Unit;_this254.CountValue=CountValue;_this254.type=2093928680;return _this254;}return _createClass(IfcQuantityCount);}(IfcPhysicalSimpleQuantity);IFC2X32.IfcQuantityCount=IfcQuantityCount;var IfcQuantityLength=/*#__PURE__*/function(_IfcPhysicalSimpleQua3){_inherits(IfcQuantityLength,_IfcPhysicalSimpleQua3);var _super258=_createSuper(IfcQuantityLength);function IfcQuantityLength(expressID,Name,Description,Unit,LengthValue){var _this255;_classCallCheck(this,IfcQuantityLength);_this255=_super258.call(this,expressID,Name,Description,Unit);_this255.Name=Name;_this255.Description=Description;_this255.Unit=Unit;_this255.LengthValue=LengthValue;_this255.type=931644368;return _this255;}return _createClass(IfcQuantityLength);}(IfcPhysicalSimpleQuantity);IFC2X32.IfcQuantityLength=IfcQuantityLength;var IfcQuantityTime=/*#__PURE__*/function(_IfcPhysicalSimpleQua4){_inherits(IfcQuantityTime,_IfcPhysicalSimpleQua4);var _super259=_createSuper(IfcQuantityTime);function IfcQuantityTime(expressID,Name,Description,Unit,TimeValue){var _this256;_classCallCheck(this,IfcQuantityTime);_this256=_super259.call(this,expressID,Name,Description,Unit);_this256.Name=Name;_this256.Description=Description;_this256.Unit=Unit;_this256.TimeValue=TimeValue;_this256.type=3252649465;return _this256;}return _createClass(IfcQuantityTime);}(IfcPhysicalSimpleQuantity);IFC2X32.IfcQuantityTime=IfcQuantityTime;var IfcQuantityVolume=/*#__PURE__*/function(_IfcPhysicalSimpleQua5){_inherits(IfcQuantityVolume,_IfcPhysicalSimpleQua5);var _super260=_createSuper(IfcQuantityVolume);function IfcQuantityVolume(expressID,Name,Description,Unit,VolumeValue){var _this257;_classCallCheck(this,IfcQuantityVolume);_this257=_super260.call(this,expressID,Name,Description,Unit);_this257.Name=Name;_this257.Description=Description;_this257.Unit=Unit;_this257.VolumeValue=VolumeValue;_this257.type=2405470396;return _this257;}return _createClass(IfcQuantityVolume);}(IfcPhysicalSimpleQuantity);IFC2X32.IfcQuantityVolume=IfcQuantityVolume;var IfcQuantityWeight=/*#__PURE__*/function(_IfcPhysicalSimpleQua6){_inherits(IfcQuantityWeight,_IfcPhysicalSimpleQua6);var _super261=_createSuper(IfcQuantityWeight);function IfcQuantityWeight(expressID,Name,Description,Unit,WeightValue){var _this258;_classCallCheck(this,IfcQuantityWeight);_this258=_super261.call(this,expressID,Name,Description,Unit);_this258.Name=Name;_this258.Description=Description;_this258.Unit=Unit;_this258.WeightValue=WeightValue;_this258.type=825690147;return _this258;}return _createClass(IfcQuantityWeight);}(IfcPhysicalSimpleQuantity);IFC2X32.IfcQuantityWeight=IfcQuantityWeight;var IfcReferencesValueDocument=/*#__PURE__*/function(_IfcLineObject71){_inherits(IfcReferencesValueDocument,_IfcLineObject71);var _super262=_createSuper(IfcReferencesValueDocument);function IfcReferencesValueDocument(expressID,ReferencedDocument,ReferencingValues,Name,Description){var _this259;_classCallCheck(this,IfcReferencesValueDocument);_this259=_super262.call(this,expressID);_this259.ReferencedDocument=ReferencedDocument;_this259.ReferencingValues=ReferencingValues;_this259.Name=Name;_this259.Description=Description;_this259.type=2692823254;return _this259;}return _createClass(IfcReferencesValueDocument);}(IfcLineObject);IFC2X32.IfcReferencesValueDocument=IfcReferencesValueDocument;var IfcReinforcementBarProperties=/*#__PURE__*/function(_IfcLineObject72){_inherits(IfcReinforcementBarProperties,_IfcLineObject72);var _super263=_createSuper(IfcReinforcementBarProperties);function IfcReinforcementBarProperties(expressID,TotalCrossSectionArea,SteelGrade,BarSurface,EffectiveDepth,NominalBarDiameter,BarCount){var _this260;_classCallCheck(this,IfcReinforcementBarProperties);_this260=_super263.call(this,expressID);_this260.TotalCrossSectionArea=TotalCrossSectionArea;_this260.SteelGrade=SteelGrade;_this260.BarSurface=BarSurface;_this260.EffectiveDepth=EffectiveDepth;_this260.NominalBarDiameter=NominalBarDiameter;_this260.BarCount=BarCount;_this260.type=1580146022;return _this260;}return _createClass(IfcReinforcementBarProperties);}(IfcLineObject);IFC2X32.IfcReinforcementBarProperties=IfcReinforcementBarProperties;var IfcRelaxation=/*#__PURE__*/function(_IfcLineObject73){_inherits(IfcRelaxation,_IfcLineObject73);var _super264=_createSuper(IfcRelaxation);function IfcRelaxation(expressID,RelaxationValue,InitialStress){var _this261;_classCallCheck(this,IfcRelaxation);_this261=_super264.call(this,expressID);_this261.RelaxationValue=RelaxationValue;_this261.InitialStress=InitialStress;_this261.type=1222501353;return _this261;}return _createClass(IfcRelaxation);}(IfcLineObject);IFC2X32.IfcRelaxation=IfcRelaxation;var IfcRepresentation=/*#__PURE__*/function(_IfcLineObject74){_inherits(IfcRepresentation,_IfcLineObject74);var _super265=_createSuper(IfcRepresentation);function IfcRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this262;_classCallCheck(this,IfcRepresentation);_this262=_super265.call(this,expressID);_this262.ContextOfItems=ContextOfItems;_this262.RepresentationIdentifier=RepresentationIdentifier;_this262.RepresentationType=RepresentationType;_this262.Items=Items;_this262.type=1076942058;return _this262;}return _createClass(IfcRepresentation);}(IfcLineObject);IFC2X32.IfcRepresentation=IfcRepresentation;var IfcRepresentationContext=/*#__PURE__*/function(_IfcLineObject75){_inherits(IfcRepresentationContext,_IfcLineObject75);var _super266=_createSuper(IfcRepresentationContext);function IfcRepresentationContext(expressID,ContextIdentifier,ContextType){var _this263;_classCallCheck(this,IfcRepresentationContext);_this263=_super266.call(this,expressID);_this263.ContextIdentifier=ContextIdentifier;_this263.ContextType=ContextType;_this263.type=3377609919;return _this263;}return _createClass(IfcRepresentationContext);}(IfcLineObject);IFC2X32.IfcRepresentationContext=IfcRepresentationContext;var IfcRepresentationItem=/*#__PURE__*/function(_IfcLineObject76){_inherits(IfcRepresentationItem,_IfcLineObject76);var _super267=_createSuper(IfcRepresentationItem);function IfcRepresentationItem(expressID){var _this264;_classCallCheck(this,IfcRepresentationItem);_this264=_super267.call(this,expressID);_this264.type=3008791417;return _this264;}return _createClass(IfcRepresentationItem);}(IfcLineObject);IFC2X32.IfcRepresentationItem=IfcRepresentationItem;var IfcRepresentationMap=/*#__PURE__*/function(_IfcLineObject77){_inherits(IfcRepresentationMap,_IfcLineObject77);var _super268=_createSuper(IfcRepresentationMap);function IfcRepresentationMap(expressID,MappingOrigin,MappedRepresentation){var _this265;_classCallCheck(this,IfcRepresentationMap);_this265=_super268.call(this,expressID);_this265.MappingOrigin=MappingOrigin;_this265.MappedRepresentation=MappedRepresentation;_this265.type=1660063152;return _this265;}return _createClass(IfcRepresentationMap);}(IfcLineObject);IFC2X32.IfcRepresentationMap=IfcRepresentationMap;var IfcRibPlateProfileProperties=/*#__PURE__*/function(_IfcProfileProperties){_inherits(IfcRibPlateProfileProperties,_IfcProfileProperties);var _super269=_createSuper(IfcRibPlateProfileProperties);function IfcRibPlateProfileProperties(expressID,ProfileName,ProfileDefinition,Thickness,RibHeight,RibWidth,RibSpacing,Direction){var _this266;_classCallCheck(this,IfcRibPlateProfileProperties);_this266=_super269.call(this,expressID,ProfileName,ProfileDefinition);_this266.ProfileName=ProfileName;_this266.ProfileDefinition=ProfileDefinition;_this266.Thickness=Thickness;_this266.RibHeight=RibHeight;_this266.RibWidth=RibWidth;_this266.RibSpacing=RibSpacing;_this266.Direction=Direction;_this266.type=3679540991;return _this266;}return _createClass(IfcRibPlateProfileProperties);}(IfcProfileProperties);IFC2X32.IfcRibPlateProfileProperties=IfcRibPlateProfileProperties;var IfcRoot=/*#__PURE__*/function(_IfcLineObject78){_inherits(IfcRoot,_IfcLineObject78);var _super270=_createSuper(IfcRoot);function IfcRoot(expressID,GlobalId,OwnerHistory,Name,Description){var _this267;_classCallCheck(this,IfcRoot);_this267=_super270.call(this,expressID);_this267.GlobalId=GlobalId;_this267.OwnerHistory=OwnerHistory;_this267.Name=Name;_this267.Description=Description;_this267.type=2341007311;return _this267;}return _createClass(IfcRoot);}(IfcLineObject);IFC2X32.IfcRoot=IfcRoot;var IfcSIUnit=/*#__PURE__*/function(_IfcNamedUnit){_inherits(IfcSIUnit,_IfcNamedUnit);var _super271=_createSuper(IfcSIUnit);function IfcSIUnit(expressID,UnitType,Prefix,Name){var _this268;_classCallCheck(this,IfcSIUnit);_this268=_super271.call(this,expressID,new Handle(0),UnitType);_this268.UnitType=UnitType;_this268.Prefix=Prefix;_this268.Name=Name;_this268.type=448429030;return _this268;}return _createClass(IfcSIUnit);}(IfcNamedUnit);IFC2X32.IfcSIUnit=IfcSIUnit;var IfcSectionProperties=/*#__PURE__*/function(_IfcLineObject79){_inherits(IfcSectionProperties,_IfcLineObject79);var _super272=_createSuper(IfcSectionProperties);function IfcSectionProperties(expressID,SectionType,StartProfile,EndProfile){var _this269;_classCallCheck(this,IfcSectionProperties);_this269=_super272.call(this,expressID);_this269.SectionType=SectionType;_this269.StartProfile=StartProfile;_this269.EndProfile=EndProfile;_this269.type=2042790032;return _this269;}return _createClass(IfcSectionProperties);}(IfcLineObject);IFC2X32.IfcSectionProperties=IfcSectionProperties;var IfcSectionReinforcementProperties=/*#__PURE__*/function(_IfcLineObject80){_inherits(IfcSectionReinforcementProperties,_IfcLineObject80);var _super273=_createSuper(IfcSectionReinforcementProperties);function IfcSectionReinforcementProperties(expressID,LongitudinalStartPosition,LongitudinalEndPosition,TransversePosition,ReinforcementRole,SectionDefinition,CrossSectionReinforcementDefinitions){var _this270;_classCallCheck(this,IfcSectionReinforcementProperties);_this270=_super273.call(this,expressID);_this270.LongitudinalStartPosition=LongitudinalStartPosition;_this270.LongitudinalEndPosition=LongitudinalEndPosition;_this270.TransversePosition=TransversePosition;_this270.ReinforcementRole=ReinforcementRole;_this270.SectionDefinition=SectionDefinition;_this270.CrossSectionReinforcementDefinitions=CrossSectionReinforcementDefinitions;_this270.type=4165799628;return _this270;}return _createClass(IfcSectionReinforcementProperties);}(IfcLineObject);IFC2X32.IfcSectionReinforcementProperties=IfcSectionReinforcementProperties;var IfcShapeAspect=/*#__PURE__*/function(_IfcLineObject81){_inherits(IfcShapeAspect,_IfcLineObject81);var _super274=_createSuper(IfcShapeAspect);function IfcShapeAspect(expressID,ShapeRepresentations,Name,Description,ProductDefinitional,PartOfProductDefinitionShape){var _this271;_classCallCheck(this,IfcShapeAspect);_this271=_super274.call(this,expressID);_this271.ShapeRepresentations=ShapeRepresentations;_this271.Name=Name;_this271.Description=Description;_this271.ProductDefinitional=ProductDefinitional;_this271.PartOfProductDefinitionShape=PartOfProductDefinitionShape;_this271.type=867548509;return _this271;}return _createClass(IfcShapeAspect);}(IfcLineObject);IFC2X32.IfcShapeAspect=IfcShapeAspect;var IfcShapeModel=/*#__PURE__*/function(_IfcRepresentation){_inherits(IfcShapeModel,_IfcRepresentation);var _super275=_createSuper(IfcShapeModel);function IfcShapeModel(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this272;_classCallCheck(this,IfcShapeModel);_this272=_super275.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this272.ContextOfItems=ContextOfItems;_this272.RepresentationIdentifier=RepresentationIdentifier;_this272.RepresentationType=RepresentationType;_this272.Items=Items;_this272.type=3982875396;return _this272;}return _createClass(IfcShapeModel);}(IfcRepresentation);IFC2X32.IfcShapeModel=IfcShapeModel;var IfcShapeRepresentation=/*#__PURE__*/function(_IfcShapeModel){_inherits(IfcShapeRepresentation,_IfcShapeModel);var _super276=_createSuper(IfcShapeRepresentation);function IfcShapeRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this273;_classCallCheck(this,IfcShapeRepresentation);_this273=_super276.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this273.ContextOfItems=ContextOfItems;_this273.RepresentationIdentifier=RepresentationIdentifier;_this273.RepresentationType=RepresentationType;_this273.Items=Items;_this273.type=4240577450;return _this273;}return _createClass(IfcShapeRepresentation);}(IfcShapeModel);IFC2X32.IfcShapeRepresentation=IfcShapeRepresentation;var IfcSimpleProperty=/*#__PURE__*/function(_IfcProperty){_inherits(IfcSimpleProperty,_IfcProperty);var _super277=_createSuper(IfcSimpleProperty);function IfcSimpleProperty(expressID,Name,Description){var _this274;_classCallCheck(this,IfcSimpleProperty);_this274=_super277.call(this,expressID,Name,Description);_this274.Name=Name;_this274.Description=Description;_this274.type=3692461612;return _this274;}return _createClass(IfcSimpleProperty);}(IfcProperty);IFC2X32.IfcSimpleProperty=IfcSimpleProperty;var IfcStructuralConnectionCondition=/*#__PURE__*/function(_IfcLineObject82){_inherits(IfcStructuralConnectionCondition,_IfcLineObject82);var _super278=_createSuper(IfcStructuralConnectionCondition);function IfcStructuralConnectionCondition(expressID,Name){var _this275;_classCallCheck(this,IfcStructuralConnectionCondition);_this275=_super278.call(this,expressID);_this275.Name=Name;_this275.type=2273995522;return _this275;}return _createClass(IfcStructuralConnectionCondition);}(IfcLineObject);IFC2X32.IfcStructuralConnectionCondition=IfcStructuralConnectionCondition;var IfcStructuralLoad=/*#__PURE__*/function(_IfcLineObject83){_inherits(IfcStructuralLoad,_IfcLineObject83);var _super279=_createSuper(IfcStructuralLoad);function IfcStructuralLoad(expressID,Name){var _this276;_classCallCheck(this,IfcStructuralLoad);_this276=_super279.call(this,expressID);_this276.Name=Name;_this276.type=2162789131;return _this276;}return _createClass(IfcStructuralLoad);}(IfcLineObject);IFC2X32.IfcStructuralLoad=IfcStructuralLoad;var IfcStructuralLoadStatic=/*#__PURE__*/function(_IfcStructuralLoad){_inherits(IfcStructuralLoadStatic,_IfcStructuralLoad);var _super280=_createSuper(IfcStructuralLoadStatic);function IfcStructuralLoadStatic(expressID,Name){var _this277;_classCallCheck(this,IfcStructuralLoadStatic);_this277=_super280.call(this,expressID,Name);_this277.Name=Name;_this277.type=2525727697;return _this277;}return _createClass(IfcStructuralLoadStatic);}(IfcStructuralLoad);IFC2X32.IfcStructuralLoadStatic=IfcStructuralLoadStatic;var IfcStructuralLoadTemperature=/*#__PURE__*/function(_IfcStructuralLoadSta){_inherits(IfcStructuralLoadTemperature,_IfcStructuralLoadSta);var _super281=_createSuper(IfcStructuralLoadTemperature);function IfcStructuralLoadTemperature(expressID,Name,DeltaT_Constant,DeltaT_Y,DeltaT_Z){var _this278;_classCallCheck(this,IfcStructuralLoadTemperature);_this278=_super281.call(this,expressID,Name);_this278.Name=Name;_this278.DeltaT_Constant=DeltaT_Constant;_this278.DeltaT_Y=DeltaT_Y;_this278.DeltaT_Z=DeltaT_Z;_this278.type=3408363356;return _this278;}return _createClass(IfcStructuralLoadTemperature);}(IfcStructuralLoadStatic);IFC2X32.IfcStructuralLoadTemperature=IfcStructuralLoadTemperature;var IfcStyleModel=/*#__PURE__*/function(_IfcRepresentation2){_inherits(IfcStyleModel,_IfcRepresentation2);var _super282=_createSuper(IfcStyleModel);function IfcStyleModel(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this279;_classCallCheck(this,IfcStyleModel);_this279=_super282.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this279.ContextOfItems=ContextOfItems;_this279.RepresentationIdentifier=RepresentationIdentifier;_this279.RepresentationType=RepresentationType;_this279.Items=Items;_this279.type=2830218821;return _this279;}return _createClass(IfcStyleModel);}(IfcRepresentation);IFC2X32.IfcStyleModel=IfcStyleModel;var IfcStyledItem=/*#__PURE__*/function(_IfcRepresentationIte){_inherits(IfcStyledItem,_IfcRepresentationIte);var _super283=_createSuper(IfcStyledItem);function IfcStyledItem(expressID,Item,Styles,Name){var _this280;_classCallCheck(this,IfcStyledItem);_this280=_super283.call(this,expressID);_this280.Item=Item;_this280.Styles=Styles;_this280.Name=Name;_this280.type=3958052878;return _this280;}return _createClass(IfcStyledItem);}(IfcRepresentationItem);IFC2X32.IfcStyledItem=IfcStyledItem;var IfcStyledRepresentation=/*#__PURE__*/function(_IfcStyleModel){_inherits(IfcStyledRepresentation,_IfcStyleModel);var _super284=_createSuper(IfcStyledRepresentation);function IfcStyledRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this281;_classCallCheck(this,IfcStyledRepresentation);_this281=_super284.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this281.ContextOfItems=ContextOfItems;_this281.RepresentationIdentifier=RepresentationIdentifier;_this281.RepresentationType=RepresentationType;_this281.Items=Items;_this281.type=3049322572;return _this281;}return _createClass(IfcStyledRepresentation);}(IfcStyleModel);IFC2X32.IfcStyledRepresentation=IfcStyledRepresentation;var IfcSurfaceStyle=/*#__PURE__*/function(_IfcPresentationStyle){_inherits(IfcSurfaceStyle,_IfcPresentationStyle);var _super285=_createSuper(IfcSurfaceStyle);function IfcSurfaceStyle(expressID,Name,Side,Styles){var _this282;_classCallCheck(this,IfcSurfaceStyle);_this282=_super285.call(this,expressID,Name);_this282.Name=Name;_this282.Side=Side;_this282.Styles=Styles;_this282.type=1300840506;return _this282;}return _createClass(IfcSurfaceStyle);}(IfcPresentationStyle);IFC2X32.IfcSurfaceStyle=IfcSurfaceStyle;var IfcSurfaceStyleLighting=/*#__PURE__*/function(_IfcLineObject84){_inherits(IfcSurfaceStyleLighting,_IfcLineObject84);var _super286=_createSuper(IfcSurfaceStyleLighting);function IfcSurfaceStyleLighting(expressID,DiffuseTransmissionColour,DiffuseReflectionColour,TransmissionColour,ReflectanceColour){var _this283;_classCallCheck(this,IfcSurfaceStyleLighting);_this283=_super286.call(this,expressID);_this283.DiffuseTransmissionColour=DiffuseTransmissionColour;_this283.DiffuseReflectionColour=DiffuseReflectionColour;_this283.TransmissionColour=TransmissionColour;_this283.ReflectanceColour=ReflectanceColour;_this283.type=3303107099;return _this283;}return _createClass(IfcSurfaceStyleLighting);}(IfcLineObject);IFC2X32.IfcSurfaceStyleLighting=IfcSurfaceStyleLighting;var IfcSurfaceStyleRefraction=/*#__PURE__*/function(_IfcLineObject85){_inherits(IfcSurfaceStyleRefraction,_IfcLineObject85);var _super287=_createSuper(IfcSurfaceStyleRefraction);function IfcSurfaceStyleRefraction(expressID,RefractionIndex,DispersionFactor){var _this284;_classCallCheck(this,IfcSurfaceStyleRefraction);_this284=_super287.call(this,expressID);_this284.RefractionIndex=RefractionIndex;_this284.DispersionFactor=DispersionFactor;_this284.type=1607154358;return _this284;}return _createClass(IfcSurfaceStyleRefraction);}(IfcLineObject);IFC2X32.IfcSurfaceStyleRefraction=IfcSurfaceStyleRefraction;var IfcSurfaceStyleShading=/*#__PURE__*/function(_IfcLineObject86){_inherits(IfcSurfaceStyleShading,_IfcLineObject86);var _super288=_createSuper(IfcSurfaceStyleShading);function IfcSurfaceStyleShading(expressID,SurfaceColour){var _this285;_classCallCheck(this,IfcSurfaceStyleShading);_this285=_super288.call(this,expressID);_this285.SurfaceColour=SurfaceColour;_this285.type=846575682;return _this285;}return _createClass(IfcSurfaceStyleShading);}(IfcLineObject);IFC2X32.IfcSurfaceStyleShading=IfcSurfaceStyleShading;var IfcSurfaceStyleWithTextures=/*#__PURE__*/function(_IfcLineObject87){_inherits(IfcSurfaceStyleWithTextures,_IfcLineObject87);var _super289=_createSuper(IfcSurfaceStyleWithTextures);function IfcSurfaceStyleWithTextures(expressID,Textures){var _this286;_classCallCheck(this,IfcSurfaceStyleWithTextures);_this286=_super289.call(this,expressID);_this286.Textures=Textures;_this286.type=1351298697;return _this286;}return _createClass(IfcSurfaceStyleWithTextures);}(IfcLineObject);IFC2X32.IfcSurfaceStyleWithTextures=IfcSurfaceStyleWithTextures;var IfcSurfaceTexture=/*#__PURE__*/function(_IfcLineObject88){_inherits(IfcSurfaceTexture,_IfcLineObject88);var _super290=_createSuper(IfcSurfaceTexture);function IfcSurfaceTexture(expressID,RepeatS,RepeatT,TextureType,TextureTransform){var _this287;_classCallCheck(this,IfcSurfaceTexture);_this287=_super290.call(this,expressID);_this287.RepeatS=RepeatS;_this287.RepeatT=RepeatT;_this287.TextureType=TextureType;_this287.TextureTransform=TextureTransform;_this287.type=626085974;return _this287;}return _createClass(IfcSurfaceTexture);}(IfcLineObject);IFC2X32.IfcSurfaceTexture=IfcSurfaceTexture;var IfcSymbolStyle=/*#__PURE__*/function(_IfcPresentationStyle2){_inherits(IfcSymbolStyle,_IfcPresentationStyle2);var _super291=_createSuper(IfcSymbolStyle);function IfcSymbolStyle(expressID,Name,StyleOfSymbol){var _this288;_classCallCheck(this,IfcSymbolStyle);_this288=_super291.call(this,expressID,Name);_this288.Name=Name;_this288.StyleOfSymbol=StyleOfSymbol;_this288.type=1290481447;return _this288;}return _createClass(IfcSymbolStyle);}(IfcPresentationStyle);IFC2X32.IfcSymbolStyle=IfcSymbolStyle;var IfcTable=/*#__PURE__*/function(_IfcLineObject89){_inherits(IfcTable,_IfcLineObject89);var _super292=_createSuper(IfcTable);function IfcTable(expressID,Name,Rows){var _this289;_classCallCheck(this,IfcTable);_this289=_super292.call(this,expressID);_this289.Name=Name;_this289.Rows=Rows;_this289.type=985171141;return _this289;}return _createClass(IfcTable);}(IfcLineObject);IFC2X32.IfcTable=IfcTable;var IfcTableRow=/*#__PURE__*/function(_IfcLineObject90){_inherits(IfcTableRow,_IfcLineObject90);var _super293=_createSuper(IfcTableRow);function IfcTableRow(expressID,RowCells,IsHeading){var _this290;_classCallCheck(this,IfcTableRow);_this290=_super293.call(this,expressID);_this290.RowCells=RowCells;_this290.IsHeading=IsHeading;_this290.type=531007025;return _this290;}return _createClass(IfcTableRow);}(IfcLineObject);IFC2X32.IfcTableRow=IfcTableRow;var IfcTelecomAddress=/*#__PURE__*/function(_IfcAddress2){_inherits(IfcTelecomAddress,_IfcAddress2);var _super294=_createSuper(IfcTelecomAddress);function IfcTelecomAddress(expressID,Purpose,Description,UserDefinedPurpose,TelephoneNumbers,FacsimileNumbers,PagerNumber,ElectronicMailAddresses,WWWHomePageURL){var _this291;_classCallCheck(this,IfcTelecomAddress);_this291=_super294.call(this,expressID,Purpose,Description,UserDefinedPurpose);_this291.Purpose=Purpose;_this291.Description=Description;_this291.UserDefinedPurpose=UserDefinedPurpose;_this291.TelephoneNumbers=TelephoneNumbers;_this291.FacsimileNumbers=FacsimileNumbers;_this291.PagerNumber=PagerNumber;_this291.ElectronicMailAddresses=ElectronicMailAddresses;_this291.WWWHomePageURL=WWWHomePageURL;_this291.type=912023232;return _this291;}return _createClass(IfcTelecomAddress);}(IfcAddress);IFC2X32.IfcTelecomAddress=IfcTelecomAddress;var IfcTextStyle=/*#__PURE__*/function(_IfcPresentationStyle3){_inherits(IfcTextStyle,_IfcPresentationStyle3);var _super295=_createSuper(IfcTextStyle);function IfcTextStyle(expressID,Name,TextCharacterAppearance,TextStyle,TextFontStyle){var _this292;_classCallCheck(this,IfcTextStyle);_this292=_super295.call(this,expressID,Name);_this292.Name=Name;_this292.TextCharacterAppearance=TextCharacterAppearance;_this292.TextStyle=TextStyle;_this292.TextFontStyle=TextFontStyle;_this292.type=1447204868;return _this292;}return _createClass(IfcTextStyle);}(IfcPresentationStyle);IFC2X32.IfcTextStyle=IfcTextStyle;var IfcTextStyleFontModel=/*#__PURE__*/function(_IfcPreDefinedTextFon){_inherits(IfcTextStyleFontModel,_IfcPreDefinedTextFon);var _super296=_createSuper(IfcTextStyleFontModel);function IfcTextStyleFontModel(expressID,Name,FontFamily,FontStyle,FontVariant,FontWeight,FontSize){var _this293;_classCallCheck(this,IfcTextStyleFontModel);_this293=_super296.call(this,expressID,Name);_this293.Name=Name;_this293.FontFamily=FontFamily;_this293.FontStyle=FontStyle;_this293.FontVariant=FontVariant;_this293.FontWeight=FontWeight;_this293.FontSize=FontSize;_this293.type=1983826977;return _this293;}return _createClass(IfcTextStyleFontModel);}(IfcPreDefinedTextFont);IFC2X32.IfcTextStyleFontModel=IfcTextStyleFontModel;var IfcTextStyleForDefinedFont=/*#__PURE__*/function(_IfcLineObject91){_inherits(IfcTextStyleForDefinedFont,_IfcLineObject91);var _super297=_createSuper(IfcTextStyleForDefinedFont);function IfcTextStyleForDefinedFont(expressID,Colour,BackgroundColour){var _this294;_classCallCheck(this,IfcTextStyleForDefinedFont);_this294=_super297.call(this,expressID);_this294.Colour=Colour;_this294.BackgroundColour=BackgroundColour;_this294.type=2636378356;return _this294;}return _createClass(IfcTextStyleForDefinedFont);}(IfcLineObject);IFC2X32.IfcTextStyleForDefinedFont=IfcTextStyleForDefinedFont;var IfcTextStyleTextModel=/*#__PURE__*/function(_IfcLineObject92){_inherits(IfcTextStyleTextModel,_IfcLineObject92);var _super298=_createSuper(IfcTextStyleTextModel);function IfcTextStyleTextModel(expressID,TextIndent,TextAlign,TextDecoration,LetterSpacing,WordSpacing,TextTransform,LineHeight){var _this295;_classCallCheck(this,IfcTextStyleTextModel);_this295=_super298.call(this,expressID);_this295.TextIndent=TextIndent;_this295.TextAlign=TextAlign;_this295.TextDecoration=TextDecoration;_this295.LetterSpacing=LetterSpacing;_this295.WordSpacing=WordSpacing;_this295.TextTransform=TextTransform;_this295.LineHeight=LineHeight;_this295.type=1640371178;return _this295;}return _createClass(IfcTextStyleTextModel);}(IfcLineObject);IFC2X32.IfcTextStyleTextModel=IfcTextStyleTextModel;var IfcTextStyleWithBoxCharacteristics=/*#__PURE__*/function(_IfcLineObject93){_inherits(IfcTextStyleWithBoxCharacteristics,_IfcLineObject93);var _super299=_createSuper(IfcTextStyleWithBoxCharacteristics);function IfcTextStyleWithBoxCharacteristics(expressID,BoxHeight,BoxWidth,BoxSlantAngle,BoxRotateAngle,CharacterSpacing){var _this296;_classCallCheck(this,IfcTextStyleWithBoxCharacteristics);_this296=_super299.call(this,expressID);_this296.BoxHeight=BoxHeight;_this296.BoxWidth=BoxWidth;_this296.BoxSlantAngle=BoxSlantAngle;_this296.BoxRotateAngle=BoxRotateAngle;_this296.CharacterSpacing=CharacterSpacing;_this296.type=1484833681;return _this296;}return _createClass(IfcTextStyleWithBoxCharacteristics);}(IfcLineObject);IFC2X32.IfcTextStyleWithBoxCharacteristics=IfcTextStyleWithBoxCharacteristics;var IfcTextureCoordinate=/*#__PURE__*/function(_IfcLineObject94){_inherits(IfcTextureCoordinate,_IfcLineObject94);var _super300=_createSuper(IfcTextureCoordinate);function IfcTextureCoordinate(expressID){var _this297;_classCallCheck(this,IfcTextureCoordinate);_this297=_super300.call(this,expressID);_this297.type=280115917;return _this297;}return _createClass(IfcTextureCoordinate);}(IfcLineObject);IFC2X32.IfcTextureCoordinate=IfcTextureCoordinate;var IfcTextureCoordinateGenerator=/*#__PURE__*/function(_IfcTextureCoordinate){_inherits(IfcTextureCoordinateGenerator,_IfcTextureCoordinate);var _super301=_createSuper(IfcTextureCoordinateGenerator);function IfcTextureCoordinateGenerator(expressID,Mode,Parameter){var _this298;_classCallCheck(this,IfcTextureCoordinateGenerator);_this298=_super301.call(this,expressID);_this298.Mode=Mode;_this298.Parameter=Parameter;_this298.type=1742049831;return _this298;}return _createClass(IfcTextureCoordinateGenerator);}(IfcTextureCoordinate);IFC2X32.IfcTextureCoordinateGenerator=IfcTextureCoordinateGenerator;var IfcTextureMap=/*#__PURE__*/function(_IfcTextureCoordinate2){_inherits(IfcTextureMap,_IfcTextureCoordinate2);var _super302=_createSuper(IfcTextureMap);function IfcTextureMap(expressID,TextureMaps){var _this299;_classCallCheck(this,IfcTextureMap);_this299=_super302.call(this,expressID);_this299.TextureMaps=TextureMaps;_this299.type=2552916305;return _this299;}return _createClass(IfcTextureMap);}(IfcTextureCoordinate);IFC2X32.IfcTextureMap=IfcTextureMap;var IfcTextureVertex=/*#__PURE__*/function(_IfcLineObject95){_inherits(IfcTextureVertex,_IfcLineObject95);var _super303=_createSuper(IfcTextureVertex);function IfcTextureVertex(expressID,Coordinates){var _this300;_classCallCheck(this,IfcTextureVertex);_this300=_super303.call(this,expressID);_this300.Coordinates=Coordinates;_this300.type=1210645708;return _this300;}return _createClass(IfcTextureVertex);}(IfcLineObject);IFC2X32.IfcTextureVertex=IfcTextureVertex;var IfcThermalMaterialProperties=/*#__PURE__*/function(_IfcMaterialPropertie4){_inherits(IfcThermalMaterialProperties,_IfcMaterialPropertie4);var _super304=_createSuper(IfcThermalMaterialProperties);function IfcThermalMaterialProperties(expressID,Material,SpecificHeatCapacity,BoilingPoint,FreezingPoint,ThermalConductivity){var _this301;_classCallCheck(this,IfcThermalMaterialProperties);_this301=_super304.call(this,expressID,Material);_this301.Material=Material;_this301.SpecificHeatCapacity=SpecificHeatCapacity;_this301.BoilingPoint=BoilingPoint;_this301.FreezingPoint=FreezingPoint;_this301.ThermalConductivity=ThermalConductivity;_this301.type=3317419933;return _this301;}return _createClass(IfcThermalMaterialProperties);}(IfcMaterialProperties);IFC2X32.IfcThermalMaterialProperties=IfcThermalMaterialProperties;var IfcTimeSeries=/*#__PURE__*/function(_IfcLineObject96){_inherits(IfcTimeSeries,_IfcLineObject96);var _super305=_createSuper(IfcTimeSeries);function IfcTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit){var _this302;_classCallCheck(this,IfcTimeSeries);_this302=_super305.call(this,expressID);_this302.Name=Name;_this302.Description=Description;_this302.StartTime=StartTime;_this302.EndTime=EndTime;_this302.TimeSeriesDataType=TimeSeriesDataType;_this302.DataOrigin=DataOrigin;_this302.UserDefinedDataOrigin=UserDefinedDataOrigin;_this302.Unit=Unit;_this302.type=3101149627;return _this302;}return _createClass(IfcTimeSeries);}(IfcLineObject);IFC2X32.IfcTimeSeries=IfcTimeSeries;var IfcTimeSeriesReferenceRelationship=/*#__PURE__*/function(_IfcLineObject97){_inherits(IfcTimeSeriesReferenceRelationship,_IfcLineObject97);var _super306=_createSuper(IfcTimeSeriesReferenceRelationship);function IfcTimeSeriesReferenceRelationship(expressID,ReferencedTimeSeries,TimeSeriesReferences){var _this303;_classCallCheck(this,IfcTimeSeriesReferenceRelationship);_this303=_super306.call(this,expressID);_this303.ReferencedTimeSeries=ReferencedTimeSeries;_this303.TimeSeriesReferences=TimeSeriesReferences;_this303.type=1718945513;return _this303;}return _createClass(IfcTimeSeriesReferenceRelationship);}(IfcLineObject);IFC2X32.IfcTimeSeriesReferenceRelationship=IfcTimeSeriesReferenceRelationship;var IfcTimeSeriesValue=/*#__PURE__*/function(_IfcLineObject98){_inherits(IfcTimeSeriesValue,_IfcLineObject98);var _super307=_createSuper(IfcTimeSeriesValue);function IfcTimeSeriesValue(expressID,ListValues){var _this304;_classCallCheck(this,IfcTimeSeriesValue);_this304=_super307.call(this,expressID);_this304.ListValues=ListValues;_this304.type=581633288;return _this304;}return _createClass(IfcTimeSeriesValue);}(IfcLineObject);IFC2X32.IfcTimeSeriesValue=IfcTimeSeriesValue;var IfcTopologicalRepresentationItem=/*#__PURE__*/function(_IfcRepresentationIte2){_inherits(IfcTopologicalRepresentationItem,_IfcRepresentationIte2);var _super308=_createSuper(IfcTopologicalRepresentationItem);function IfcTopologicalRepresentationItem(expressID){var _this305;_classCallCheck(this,IfcTopologicalRepresentationItem);_this305=_super308.call(this,expressID);_this305.type=1377556343;return _this305;}return _createClass(IfcTopologicalRepresentationItem);}(IfcRepresentationItem);IFC2X32.IfcTopologicalRepresentationItem=IfcTopologicalRepresentationItem;var IfcTopologyRepresentation=/*#__PURE__*/function(_IfcShapeModel2){_inherits(IfcTopologyRepresentation,_IfcShapeModel2);var _super309=_createSuper(IfcTopologyRepresentation);function IfcTopologyRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this306;_classCallCheck(this,IfcTopologyRepresentation);_this306=_super309.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this306.ContextOfItems=ContextOfItems;_this306.RepresentationIdentifier=RepresentationIdentifier;_this306.RepresentationType=RepresentationType;_this306.Items=Items;_this306.type=1735638870;return _this306;}return _createClass(IfcTopologyRepresentation);}(IfcShapeModel);IFC2X32.IfcTopologyRepresentation=IfcTopologyRepresentation;var IfcUnitAssignment=/*#__PURE__*/function(_IfcLineObject99){_inherits(IfcUnitAssignment,_IfcLineObject99);var _super310=_createSuper(IfcUnitAssignment);function IfcUnitAssignment(expressID,Units){var _this307;_classCallCheck(this,IfcUnitAssignment);_this307=_super310.call(this,expressID);_this307.Units=Units;_this307.type=180925521;return _this307;}return _createClass(IfcUnitAssignment);}(IfcLineObject);IFC2X32.IfcUnitAssignment=IfcUnitAssignment;var IfcVertex=/*#__PURE__*/function(_IfcTopologicalRepres){_inherits(IfcVertex,_IfcTopologicalRepres);var _super311=_createSuper(IfcVertex);function IfcVertex(expressID){var _this308;_classCallCheck(this,IfcVertex);_this308=_super311.call(this,expressID);_this308.type=2799835756;return _this308;}return _createClass(IfcVertex);}(IfcTopologicalRepresentationItem);IFC2X32.IfcVertex=IfcVertex;var IfcVertexBasedTextureMap=/*#__PURE__*/function(_IfcLineObject100){_inherits(IfcVertexBasedTextureMap,_IfcLineObject100);var _super312=_createSuper(IfcVertexBasedTextureMap);function IfcVertexBasedTextureMap(expressID,TextureVertices,TexturePoints){var _this309;_classCallCheck(this,IfcVertexBasedTextureMap);_this309=_super312.call(this,expressID);_this309.TextureVertices=TextureVertices;_this309.TexturePoints=TexturePoints;_this309.type=3304826586;return _this309;}return _createClass(IfcVertexBasedTextureMap);}(IfcLineObject);IFC2X32.IfcVertexBasedTextureMap=IfcVertexBasedTextureMap;var IfcVertexPoint=/*#__PURE__*/function(_IfcVertex){_inherits(IfcVertexPoint,_IfcVertex);var _super313=_createSuper(IfcVertexPoint);function IfcVertexPoint(expressID,VertexGeometry){var _this310;_classCallCheck(this,IfcVertexPoint);_this310=_super313.call(this,expressID);_this310.VertexGeometry=VertexGeometry;_this310.type=1907098498;return _this310;}return _createClass(IfcVertexPoint);}(IfcVertex);IFC2X32.IfcVertexPoint=IfcVertexPoint;var IfcVirtualGridIntersection=/*#__PURE__*/function(_IfcLineObject101){_inherits(IfcVirtualGridIntersection,_IfcLineObject101);var _super314=_createSuper(IfcVirtualGridIntersection);function IfcVirtualGridIntersection(expressID,IntersectingAxes,OffsetDistances){var _this311;_classCallCheck(this,IfcVirtualGridIntersection);_this311=_super314.call(this,expressID);_this311.IntersectingAxes=IntersectingAxes;_this311.OffsetDistances=OffsetDistances;_this311.type=891718957;return _this311;}return _createClass(IfcVirtualGridIntersection);}(IfcLineObject);IFC2X32.IfcVirtualGridIntersection=IfcVirtualGridIntersection;var IfcWaterProperties=/*#__PURE__*/function(_IfcMaterialPropertie5){_inherits(IfcWaterProperties,_IfcMaterialPropertie5);var _super315=_createSuper(IfcWaterProperties);function IfcWaterProperties(expressID,Material,IsPotable,Hardness,AlkalinityConcentration,AcidityConcentration,ImpuritiesContent,PHLevel,DissolvedSolidsContent){var _this312;_classCallCheck(this,IfcWaterProperties);_this312=_super315.call(this,expressID,Material);_this312.Material=Material;_this312.IsPotable=IsPotable;_this312.Hardness=Hardness;_this312.AlkalinityConcentration=AlkalinityConcentration;_this312.AcidityConcentration=AcidityConcentration;_this312.ImpuritiesContent=ImpuritiesContent;_this312.PHLevel=PHLevel;_this312.DissolvedSolidsContent=DissolvedSolidsContent;_this312.type=1065908215;return _this312;}return _createClass(IfcWaterProperties);}(IfcMaterialProperties);IFC2X32.IfcWaterProperties=IfcWaterProperties;var IfcAnnotationOccurrence=/*#__PURE__*/function(_IfcStyledItem){_inherits(IfcAnnotationOccurrence,_IfcStyledItem);var _super316=_createSuper(IfcAnnotationOccurrence);function IfcAnnotationOccurrence(expressID,Item,Styles,Name){var _this313;_classCallCheck(this,IfcAnnotationOccurrence);_this313=_super316.call(this,expressID,Item,Styles,Name);_this313.Item=Item;_this313.Styles=Styles;_this313.Name=Name;_this313.type=2442683028;return _this313;}return _createClass(IfcAnnotationOccurrence);}(IfcStyledItem);IFC2X32.IfcAnnotationOccurrence=IfcAnnotationOccurrence;var IfcAnnotationSurfaceOccurrence=/*#__PURE__*/function(_IfcAnnotationOccurre){_inherits(IfcAnnotationSurfaceOccurrence,_IfcAnnotationOccurre);var _super317=_createSuper(IfcAnnotationSurfaceOccurrence);function IfcAnnotationSurfaceOccurrence(expressID,Item,Styles,Name){var _this314;_classCallCheck(this,IfcAnnotationSurfaceOccurrence);_this314=_super317.call(this,expressID,Item,Styles,Name);_this314.Item=Item;_this314.Styles=Styles;_this314.Name=Name;_this314.type=962685235;return _this314;}return _createClass(IfcAnnotationSurfaceOccurrence);}(IfcAnnotationOccurrence);IFC2X32.IfcAnnotationSurfaceOccurrence=IfcAnnotationSurfaceOccurrence;var IfcAnnotationSymbolOccurrence=/*#__PURE__*/function(_IfcAnnotationOccurre2){_inherits(IfcAnnotationSymbolOccurrence,_IfcAnnotationOccurre2);var _super318=_createSuper(IfcAnnotationSymbolOccurrence);function IfcAnnotationSymbolOccurrence(expressID,Item,Styles,Name){var _this315;_classCallCheck(this,IfcAnnotationSymbolOccurrence);_this315=_super318.call(this,expressID,Item,Styles,Name);_this315.Item=Item;_this315.Styles=Styles;_this315.Name=Name;_this315.type=3612888222;return _this315;}return _createClass(IfcAnnotationSymbolOccurrence);}(IfcAnnotationOccurrence);IFC2X32.IfcAnnotationSymbolOccurrence=IfcAnnotationSymbolOccurrence;var IfcAnnotationTextOccurrence=/*#__PURE__*/function(_IfcAnnotationOccurre3){_inherits(IfcAnnotationTextOccurrence,_IfcAnnotationOccurre3);var _super319=_createSuper(IfcAnnotationTextOccurrence);function IfcAnnotationTextOccurrence(expressID,Item,Styles,Name){var _this316;_classCallCheck(this,IfcAnnotationTextOccurrence);_this316=_super319.call(this,expressID,Item,Styles,Name);_this316.Item=Item;_this316.Styles=Styles;_this316.Name=Name;_this316.type=2297822566;return _this316;}return _createClass(IfcAnnotationTextOccurrence);}(IfcAnnotationOccurrence);IFC2X32.IfcAnnotationTextOccurrence=IfcAnnotationTextOccurrence;var IfcArbitraryClosedProfileDef=/*#__PURE__*/function(_IfcProfileDef){_inherits(IfcArbitraryClosedProfileDef,_IfcProfileDef);var _super320=_createSuper(IfcArbitraryClosedProfileDef);function IfcArbitraryClosedProfileDef(expressID,ProfileType,ProfileName,OuterCurve){var _this317;_classCallCheck(this,IfcArbitraryClosedProfileDef);_this317=_super320.call(this,expressID,ProfileType,ProfileName);_this317.ProfileType=ProfileType;_this317.ProfileName=ProfileName;_this317.OuterCurve=OuterCurve;_this317.type=3798115385;return _this317;}return _createClass(IfcArbitraryClosedProfileDef);}(IfcProfileDef);IFC2X32.IfcArbitraryClosedProfileDef=IfcArbitraryClosedProfileDef;var IfcArbitraryOpenProfileDef=/*#__PURE__*/function(_IfcProfileDef2){_inherits(IfcArbitraryOpenProfileDef,_IfcProfileDef2);var _super321=_createSuper(IfcArbitraryOpenProfileDef);function IfcArbitraryOpenProfileDef(expressID,ProfileType,ProfileName,Curve){var _this318;_classCallCheck(this,IfcArbitraryOpenProfileDef);_this318=_super321.call(this,expressID,ProfileType,ProfileName);_this318.ProfileType=ProfileType;_this318.ProfileName=ProfileName;_this318.Curve=Curve;_this318.type=1310608509;return _this318;}return _createClass(IfcArbitraryOpenProfileDef);}(IfcProfileDef);IFC2X32.IfcArbitraryOpenProfileDef=IfcArbitraryOpenProfileDef;var IfcArbitraryProfileDefWithVoids=/*#__PURE__*/function(_IfcArbitraryClosedPr){_inherits(IfcArbitraryProfileDefWithVoids,_IfcArbitraryClosedPr);var _super322=_createSuper(IfcArbitraryProfileDefWithVoids);function IfcArbitraryProfileDefWithVoids(expressID,ProfileType,ProfileName,OuterCurve,InnerCurves){var _this319;_classCallCheck(this,IfcArbitraryProfileDefWithVoids);_this319=_super322.call(this,expressID,ProfileType,ProfileName,OuterCurve);_this319.ProfileType=ProfileType;_this319.ProfileName=ProfileName;_this319.OuterCurve=OuterCurve;_this319.InnerCurves=InnerCurves;_this319.type=2705031697;return _this319;}return _createClass(IfcArbitraryProfileDefWithVoids);}(IfcArbitraryClosedProfileDef);IFC2X32.IfcArbitraryProfileDefWithVoids=IfcArbitraryProfileDefWithVoids;var IfcBlobTexture=/*#__PURE__*/function(_IfcSurfaceTexture){_inherits(IfcBlobTexture,_IfcSurfaceTexture);var _super323=_createSuper(IfcBlobTexture);function IfcBlobTexture(expressID,RepeatS,RepeatT,TextureType,TextureTransform,RasterFormat,RasterCode){var _this320;_classCallCheck(this,IfcBlobTexture);_this320=_super323.call(this,expressID,RepeatS,RepeatT,TextureType,TextureTransform);_this320.RepeatS=RepeatS;_this320.RepeatT=RepeatT;_this320.TextureType=TextureType;_this320.TextureTransform=TextureTransform;_this320.RasterFormat=RasterFormat;_this320.RasterCode=RasterCode;_this320.type=616511568;return _this320;}return _createClass(IfcBlobTexture);}(IfcSurfaceTexture);IFC2X32.IfcBlobTexture=IfcBlobTexture;var IfcCenterLineProfileDef=/*#__PURE__*/function(_IfcArbitraryOpenProf){_inherits(IfcCenterLineProfileDef,_IfcArbitraryOpenProf);var _super324=_createSuper(IfcCenterLineProfileDef);function IfcCenterLineProfileDef(expressID,ProfileType,ProfileName,Curve,Thickness){var _this321;_classCallCheck(this,IfcCenterLineProfileDef);_this321=_super324.call(this,expressID,ProfileType,ProfileName,Curve);_this321.ProfileType=ProfileType;_this321.ProfileName=ProfileName;_this321.Curve=Curve;_this321.Thickness=Thickness;_this321.type=3150382593;return _this321;}return _createClass(IfcCenterLineProfileDef);}(IfcArbitraryOpenProfileDef);IFC2X32.IfcCenterLineProfileDef=IfcCenterLineProfileDef;var IfcClassificationReference=/*#__PURE__*/function(_IfcExternalReference6){_inherits(IfcClassificationReference,_IfcExternalReference6);var _super325=_createSuper(IfcClassificationReference);function IfcClassificationReference(expressID,Location,ItemReference,Name,ReferencedSource){var _this322;_classCallCheck(this,IfcClassificationReference);_this322=_super325.call(this,expressID,Location,ItemReference,Name);_this322.Location=Location;_this322.ItemReference=ItemReference;_this322.Name=Name;_this322.ReferencedSource=ReferencedSource;_this322.type=647927063;return _this322;}return _createClass(IfcClassificationReference);}(IfcExternalReference);IFC2X32.IfcClassificationReference=IfcClassificationReference;var IfcColourRgb=/*#__PURE__*/function(_IfcColourSpecificati){_inherits(IfcColourRgb,_IfcColourSpecificati);var _super326=_createSuper(IfcColourRgb);function IfcColourRgb(expressID,Name,Red,Green,Blue){var _this323;_classCallCheck(this,IfcColourRgb);_this323=_super326.call(this,expressID,Name);_this323.Name=Name;_this323.Red=Red;_this323.Green=Green;_this323.Blue=Blue;_this323.type=776857604;return _this323;}return _createClass(IfcColourRgb);}(IfcColourSpecification);IFC2X32.IfcColourRgb=IfcColourRgb;var IfcComplexProperty=/*#__PURE__*/function(_IfcProperty2){_inherits(IfcComplexProperty,_IfcProperty2);var _super327=_createSuper(IfcComplexProperty);function IfcComplexProperty(expressID,Name,Description,UsageName,HasProperties){var _this324;_classCallCheck(this,IfcComplexProperty);_this324=_super327.call(this,expressID,Name,Description);_this324.Name=Name;_this324.Description=Description;_this324.UsageName=UsageName;_this324.HasProperties=HasProperties;_this324.type=2542286263;return _this324;}return _createClass(IfcComplexProperty);}(IfcProperty);IFC2X32.IfcComplexProperty=IfcComplexProperty;var IfcCompositeProfileDef=/*#__PURE__*/function(_IfcProfileDef3){_inherits(IfcCompositeProfileDef,_IfcProfileDef3);var _super328=_createSuper(IfcCompositeProfileDef);function IfcCompositeProfileDef(expressID,ProfileType,ProfileName,Profiles,Label){var _this325;_classCallCheck(this,IfcCompositeProfileDef);_this325=_super328.call(this,expressID,ProfileType,ProfileName);_this325.ProfileType=ProfileType;_this325.ProfileName=ProfileName;_this325.Profiles=Profiles;_this325.Label=Label;_this325.type=1485152156;return _this325;}return _createClass(IfcCompositeProfileDef);}(IfcProfileDef);IFC2X32.IfcCompositeProfileDef=IfcCompositeProfileDef;var IfcConnectedFaceSet=/*#__PURE__*/function(_IfcTopologicalRepres2){_inherits(IfcConnectedFaceSet,_IfcTopologicalRepres2);var _super329=_createSuper(IfcConnectedFaceSet);function IfcConnectedFaceSet(expressID,CfsFaces){var _this326;_classCallCheck(this,IfcConnectedFaceSet);_this326=_super329.call(this,expressID);_this326.CfsFaces=CfsFaces;_this326.type=370225590;return _this326;}return _createClass(IfcConnectedFaceSet);}(IfcTopologicalRepresentationItem);IFC2X32.IfcConnectedFaceSet=IfcConnectedFaceSet;var IfcConnectionCurveGeometry=/*#__PURE__*/function(_IfcConnectionGeometr4){_inherits(IfcConnectionCurveGeometry,_IfcConnectionGeometr4);var _super330=_createSuper(IfcConnectionCurveGeometry);function IfcConnectionCurveGeometry(expressID,CurveOnRelatingElement,CurveOnRelatedElement){var _this327;_classCallCheck(this,IfcConnectionCurveGeometry);_this327=_super330.call(this,expressID);_this327.CurveOnRelatingElement=CurveOnRelatingElement;_this327.CurveOnRelatedElement=CurveOnRelatedElement;_this327.type=1981873012;return _this327;}return _createClass(IfcConnectionCurveGeometry);}(IfcConnectionGeometry);IFC2X32.IfcConnectionCurveGeometry=IfcConnectionCurveGeometry;var IfcConnectionPointEccentricity=/*#__PURE__*/function(_IfcConnectionPointGe){_inherits(IfcConnectionPointEccentricity,_IfcConnectionPointGe);var _super331=_createSuper(IfcConnectionPointEccentricity);function IfcConnectionPointEccentricity(expressID,PointOnRelatingElement,PointOnRelatedElement,EccentricityInX,EccentricityInY,EccentricityInZ){var _this328;_classCallCheck(this,IfcConnectionPointEccentricity);_this328=_super331.call(this,expressID,PointOnRelatingElement,PointOnRelatedElement);_this328.PointOnRelatingElement=PointOnRelatingElement;_this328.PointOnRelatedElement=PointOnRelatedElement;_this328.EccentricityInX=EccentricityInX;_this328.EccentricityInY=EccentricityInY;_this328.EccentricityInZ=EccentricityInZ;_this328.type=45288368;return _this328;}return _createClass(IfcConnectionPointEccentricity);}(IfcConnectionPointGeometry);IFC2X32.IfcConnectionPointEccentricity=IfcConnectionPointEccentricity;var IfcContextDependentUnit=/*#__PURE__*/function(_IfcNamedUnit2){_inherits(IfcContextDependentUnit,_IfcNamedUnit2);var _super332=_createSuper(IfcContextDependentUnit);function IfcContextDependentUnit(expressID,Dimensions,UnitType,Name){var _this329;_classCallCheck(this,IfcContextDependentUnit);_this329=_super332.call(this,expressID,Dimensions,UnitType);_this329.Dimensions=Dimensions;_this329.UnitType=UnitType;_this329.Name=Name;_this329.type=3050246964;return _this329;}return _createClass(IfcContextDependentUnit);}(IfcNamedUnit);IFC2X32.IfcContextDependentUnit=IfcContextDependentUnit;var IfcConversionBasedUnit=/*#__PURE__*/function(_IfcNamedUnit3){_inherits(IfcConversionBasedUnit,_IfcNamedUnit3);var _super333=_createSuper(IfcConversionBasedUnit);function IfcConversionBasedUnit(expressID,Dimensions,UnitType,Name,ConversionFactor){var _this330;_classCallCheck(this,IfcConversionBasedUnit);_this330=_super333.call(this,expressID,Dimensions,UnitType);_this330.Dimensions=Dimensions;_this330.UnitType=UnitType;_this330.Name=Name;_this330.ConversionFactor=ConversionFactor;_this330.type=2889183280;return _this330;}return _createClass(IfcConversionBasedUnit);}(IfcNamedUnit);IFC2X32.IfcConversionBasedUnit=IfcConversionBasedUnit;var IfcCurveStyle=/*#__PURE__*/function(_IfcPresentationStyle4){_inherits(IfcCurveStyle,_IfcPresentationStyle4);var _super334=_createSuper(IfcCurveStyle);function IfcCurveStyle(expressID,Name,CurveFont,CurveWidth,CurveColour){var _this331;_classCallCheck(this,IfcCurveStyle);_this331=_super334.call(this,expressID,Name);_this331.Name=Name;_this331.CurveFont=CurveFont;_this331.CurveWidth=CurveWidth;_this331.CurveColour=CurveColour;_this331.type=3800577675;return _this331;}return _createClass(IfcCurveStyle);}(IfcPresentationStyle);IFC2X32.IfcCurveStyle=IfcCurveStyle;var IfcDerivedProfileDef=/*#__PURE__*/function(_IfcProfileDef4){_inherits(IfcDerivedProfileDef,_IfcProfileDef4);var _super335=_createSuper(IfcDerivedProfileDef);function IfcDerivedProfileDef(expressID,ProfileType,ProfileName,ParentProfile,Operator,Label){var _this332;_classCallCheck(this,IfcDerivedProfileDef);_this332=_super335.call(this,expressID,ProfileType,ProfileName);_this332.ProfileType=ProfileType;_this332.ProfileName=ProfileName;_this332.ParentProfile=ParentProfile;_this332.Operator=Operator;_this332.Label=Label;_this332.type=3632507154;return _this332;}return _createClass(IfcDerivedProfileDef);}(IfcProfileDef);IFC2X32.IfcDerivedProfileDef=IfcDerivedProfileDef;var IfcDimensionCalloutRelationship=/*#__PURE__*/function(_IfcDraughtingCallout){_inherits(IfcDimensionCalloutRelationship,_IfcDraughtingCallout);var _super336=_createSuper(IfcDimensionCalloutRelationship);function IfcDimensionCalloutRelationship(expressID,Name,Description,RelatingDraughtingCallout,RelatedDraughtingCallout){var _this333;_classCallCheck(this,IfcDimensionCalloutRelationship);_this333=_super336.call(this,expressID,Name,Description,RelatingDraughtingCallout,RelatedDraughtingCallout);_this333.Name=Name;_this333.Description=Description;_this333.RelatingDraughtingCallout=RelatingDraughtingCallout;_this333.RelatedDraughtingCallout=RelatedDraughtingCallout;_this333.type=2273265877;return _this333;}return _createClass(IfcDimensionCalloutRelationship);}(IfcDraughtingCalloutRelationship);IFC2X32.IfcDimensionCalloutRelationship=IfcDimensionCalloutRelationship;var IfcDimensionPair=/*#__PURE__*/function(_IfcDraughtingCallout2){_inherits(IfcDimensionPair,_IfcDraughtingCallout2);var _super337=_createSuper(IfcDimensionPair);function IfcDimensionPair(expressID,Name,Description,RelatingDraughtingCallout,RelatedDraughtingCallout){var _this334;_classCallCheck(this,IfcDimensionPair);_this334=_super337.call(this,expressID,Name,Description,RelatingDraughtingCallout,RelatedDraughtingCallout);_this334.Name=Name;_this334.Description=Description;_this334.RelatingDraughtingCallout=RelatingDraughtingCallout;_this334.RelatedDraughtingCallout=RelatedDraughtingCallout;_this334.type=1694125774;return _this334;}return _createClass(IfcDimensionPair);}(IfcDraughtingCalloutRelationship);IFC2X32.IfcDimensionPair=IfcDimensionPair;var IfcDocumentReference=/*#__PURE__*/function(_IfcExternalReference7){_inherits(IfcDocumentReference,_IfcExternalReference7);var _super338=_createSuper(IfcDocumentReference);function IfcDocumentReference(expressID,Location,ItemReference,Name){var _this335;_classCallCheck(this,IfcDocumentReference);_this335=_super338.call(this,expressID,Location,ItemReference,Name);_this335.Location=Location;_this335.ItemReference=ItemReference;_this335.Name=Name;_this335.type=3732053477;return _this335;}return _createClass(IfcDocumentReference);}(IfcExternalReference);IFC2X32.IfcDocumentReference=IfcDocumentReference;var IfcDraughtingPreDefinedTextFont=/*#__PURE__*/function(_IfcPreDefinedTextFon2){_inherits(IfcDraughtingPreDefinedTextFont,_IfcPreDefinedTextFon2);var _super339=_createSuper(IfcDraughtingPreDefinedTextFont);function IfcDraughtingPreDefinedTextFont(expressID,Name){var _this336;_classCallCheck(this,IfcDraughtingPreDefinedTextFont);_this336=_super339.call(this,expressID,Name);_this336.Name=Name;_this336.type=4170525392;return _this336;}return _createClass(IfcDraughtingPreDefinedTextFont);}(IfcPreDefinedTextFont);IFC2X32.IfcDraughtingPreDefinedTextFont=IfcDraughtingPreDefinedTextFont;var IfcEdge=/*#__PURE__*/function(_IfcTopologicalRepres3){_inherits(IfcEdge,_IfcTopologicalRepres3);var _super340=_createSuper(IfcEdge);function IfcEdge(expressID,EdgeStart,EdgeEnd){var _this337;_classCallCheck(this,IfcEdge);_this337=_super340.call(this,expressID);_this337.EdgeStart=EdgeStart;_this337.EdgeEnd=EdgeEnd;_this337.type=3900360178;return _this337;}return _createClass(IfcEdge);}(IfcTopologicalRepresentationItem);IFC2X32.IfcEdge=IfcEdge;var IfcEdgeCurve=/*#__PURE__*/function(_IfcEdge){_inherits(IfcEdgeCurve,_IfcEdge);var _super341=_createSuper(IfcEdgeCurve);function IfcEdgeCurve(expressID,EdgeStart,EdgeEnd,EdgeGeometry,SameSense){var _this338;_classCallCheck(this,IfcEdgeCurve);_this338=_super341.call(this,expressID,EdgeStart,EdgeEnd);_this338.EdgeStart=EdgeStart;_this338.EdgeEnd=EdgeEnd;_this338.EdgeGeometry=EdgeGeometry;_this338.SameSense=SameSense;_this338.type=476780140;return _this338;}return _createClass(IfcEdgeCurve);}(IfcEdge);IFC2X32.IfcEdgeCurve=IfcEdgeCurve;var IfcExtendedMaterialProperties=/*#__PURE__*/function(_IfcMaterialPropertie6){_inherits(IfcExtendedMaterialProperties,_IfcMaterialPropertie6);var _super342=_createSuper(IfcExtendedMaterialProperties);function IfcExtendedMaterialProperties(expressID,Material,ExtendedProperties,Description,Name){var _this339;_classCallCheck(this,IfcExtendedMaterialProperties);_this339=_super342.call(this,expressID,Material);_this339.Material=Material;_this339.ExtendedProperties=ExtendedProperties;_this339.Description=Description;_this339.Name=Name;_this339.type=1860660968;return _this339;}return _createClass(IfcExtendedMaterialProperties);}(IfcMaterialProperties);IFC2X32.IfcExtendedMaterialProperties=IfcExtendedMaterialProperties;var IfcFace=/*#__PURE__*/function(_IfcTopologicalRepres4){_inherits(IfcFace,_IfcTopologicalRepres4);var _super343=_createSuper(IfcFace);function IfcFace(expressID,Bounds){var _this340;_classCallCheck(this,IfcFace);_this340=_super343.call(this,expressID);_this340.Bounds=Bounds;_this340.type=2556980723;return _this340;}return _createClass(IfcFace);}(IfcTopologicalRepresentationItem);IFC2X32.IfcFace=IfcFace;var IfcFaceBound=/*#__PURE__*/function(_IfcTopologicalRepres5){_inherits(IfcFaceBound,_IfcTopologicalRepres5);var _super344=_createSuper(IfcFaceBound);function IfcFaceBound(expressID,Bound,Orientation){var _this341;_classCallCheck(this,IfcFaceBound);_this341=_super344.call(this,expressID);_this341.Bound=Bound;_this341.Orientation=Orientation;_this341.type=1809719519;return _this341;}return _createClass(IfcFaceBound);}(IfcTopologicalRepresentationItem);IFC2X32.IfcFaceBound=IfcFaceBound;var IfcFaceOuterBound=/*#__PURE__*/function(_IfcFaceBound){_inherits(IfcFaceOuterBound,_IfcFaceBound);var _super345=_createSuper(IfcFaceOuterBound);function IfcFaceOuterBound(expressID,Bound,Orientation){var _this342;_classCallCheck(this,IfcFaceOuterBound);_this342=_super345.call(this,expressID,Bound,Orientation);_this342.Bound=Bound;_this342.Orientation=Orientation;_this342.type=803316827;return _this342;}return _createClass(IfcFaceOuterBound);}(IfcFaceBound);IFC2X32.IfcFaceOuterBound=IfcFaceOuterBound;var IfcFaceSurface=/*#__PURE__*/function(_IfcFace){_inherits(IfcFaceSurface,_IfcFace);var _super346=_createSuper(IfcFaceSurface);function IfcFaceSurface(expressID,Bounds,FaceSurface,SameSense){var _this343;_classCallCheck(this,IfcFaceSurface);_this343=_super346.call(this,expressID,Bounds);_this343.Bounds=Bounds;_this343.FaceSurface=FaceSurface;_this343.SameSense=SameSense;_this343.type=3008276851;return _this343;}return _createClass(IfcFaceSurface);}(IfcFace);IFC2X32.IfcFaceSurface=IfcFaceSurface;var IfcFailureConnectionCondition=/*#__PURE__*/function(_IfcStructuralConnect){_inherits(IfcFailureConnectionCondition,_IfcStructuralConnect);var _super347=_createSuper(IfcFailureConnectionCondition);function IfcFailureConnectionCondition(expressID,Name,TensionFailureX,TensionFailureY,TensionFailureZ,CompressionFailureX,CompressionFailureY,CompressionFailureZ){var _this344;_classCallCheck(this,IfcFailureConnectionCondition);_this344=_super347.call(this,expressID,Name);_this344.Name=Name;_this344.TensionFailureX=TensionFailureX;_this344.TensionFailureY=TensionFailureY;_this344.TensionFailureZ=TensionFailureZ;_this344.CompressionFailureX=CompressionFailureX;_this344.CompressionFailureY=CompressionFailureY;_this344.CompressionFailureZ=CompressionFailureZ;_this344.type=4219587988;return _this344;}return _createClass(IfcFailureConnectionCondition);}(IfcStructuralConnectionCondition);IFC2X32.IfcFailureConnectionCondition=IfcFailureConnectionCondition;var IfcFillAreaStyle=/*#__PURE__*/function(_IfcPresentationStyle5){_inherits(IfcFillAreaStyle,_IfcPresentationStyle5);var _super348=_createSuper(IfcFillAreaStyle);function IfcFillAreaStyle(expressID,Name,FillStyles){var _this345;_classCallCheck(this,IfcFillAreaStyle);_this345=_super348.call(this,expressID,Name);_this345.Name=Name;_this345.FillStyles=FillStyles;_this345.type=738692330;return _this345;}return _createClass(IfcFillAreaStyle);}(IfcPresentationStyle);IFC2X32.IfcFillAreaStyle=IfcFillAreaStyle;var IfcFuelProperties=/*#__PURE__*/function(_IfcMaterialPropertie7){_inherits(IfcFuelProperties,_IfcMaterialPropertie7);var _super349=_createSuper(IfcFuelProperties);function IfcFuelProperties(expressID,Material,CombustionTemperature,CarbonContent,LowerHeatingValue,HigherHeatingValue){var _this346;_classCallCheck(this,IfcFuelProperties);_this346=_super349.call(this,expressID,Material);_this346.Material=Material;_this346.CombustionTemperature=CombustionTemperature;_this346.CarbonContent=CarbonContent;_this346.LowerHeatingValue=LowerHeatingValue;_this346.HigherHeatingValue=HigherHeatingValue;_this346.type=3857492461;return _this346;}return _createClass(IfcFuelProperties);}(IfcMaterialProperties);IFC2X32.IfcFuelProperties=IfcFuelProperties;var IfcGeneralMaterialProperties=/*#__PURE__*/function(_IfcMaterialPropertie8){_inherits(IfcGeneralMaterialProperties,_IfcMaterialPropertie8);var _super350=_createSuper(IfcGeneralMaterialProperties);function IfcGeneralMaterialProperties(expressID,Material,MolecularWeight,Porosity,MassDensity){var _this347;_classCallCheck(this,IfcGeneralMaterialProperties);_this347=_super350.call(this,expressID,Material);_this347.Material=Material;_this347.MolecularWeight=MolecularWeight;_this347.Porosity=Porosity;_this347.MassDensity=MassDensity;_this347.type=803998398;return _this347;}return _createClass(IfcGeneralMaterialProperties);}(IfcMaterialProperties);IFC2X32.IfcGeneralMaterialProperties=IfcGeneralMaterialProperties;var IfcGeneralProfileProperties=/*#__PURE__*/function(_IfcProfileProperties2){_inherits(IfcGeneralProfileProperties,_IfcProfileProperties2);var _super351=_createSuper(IfcGeneralProfileProperties);function IfcGeneralProfileProperties(expressID,ProfileName,ProfileDefinition,PhysicalWeight,Perimeter,MinimumPlateThickness,MaximumPlateThickness,CrossSectionArea){var _this348;_classCallCheck(this,IfcGeneralProfileProperties);_this348=_super351.call(this,expressID,ProfileName,ProfileDefinition);_this348.ProfileName=ProfileName;_this348.ProfileDefinition=ProfileDefinition;_this348.PhysicalWeight=PhysicalWeight;_this348.Perimeter=Perimeter;_this348.MinimumPlateThickness=MinimumPlateThickness;_this348.MaximumPlateThickness=MaximumPlateThickness;_this348.CrossSectionArea=CrossSectionArea;_this348.type=1446786286;return _this348;}return _createClass(IfcGeneralProfileProperties);}(IfcProfileProperties);IFC2X32.IfcGeneralProfileProperties=IfcGeneralProfileProperties;var IfcGeometricRepresentationContext=/*#__PURE__*/function(_IfcRepresentationCon){_inherits(IfcGeometricRepresentationContext,_IfcRepresentationCon);var _super352=_createSuper(IfcGeometricRepresentationContext);function IfcGeometricRepresentationContext(expressID,ContextIdentifier,ContextType,CoordinateSpaceDimension,Precision,WorldCoordinateSystem,TrueNorth){var _this349;_classCallCheck(this,IfcGeometricRepresentationContext);_this349=_super352.call(this,expressID,ContextIdentifier,ContextType);_this349.ContextIdentifier=ContextIdentifier;_this349.ContextType=ContextType;_this349.CoordinateSpaceDimension=CoordinateSpaceDimension;_this349.Precision=Precision;_this349.WorldCoordinateSystem=WorldCoordinateSystem;_this349.TrueNorth=TrueNorth;_this349.type=3448662350;return _this349;}return _createClass(IfcGeometricRepresentationContext);}(IfcRepresentationContext);IFC2X32.IfcGeometricRepresentationContext=IfcGeometricRepresentationContext;var IfcGeometricRepresentationItem=/*#__PURE__*/function(_IfcRepresentationIte3){_inherits(IfcGeometricRepresentationItem,_IfcRepresentationIte3);var _super353=_createSuper(IfcGeometricRepresentationItem);function IfcGeometricRepresentationItem(expressID){var _this350;_classCallCheck(this,IfcGeometricRepresentationItem);_this350=_super353.call(this,expressID);_this350.type=2453401579;return _this350;}return _createClass(IfcGeometricRepresentationItem);}(IfcRepresentationItem);IFC2X32.IfcGeometricRepresentationItem=IfcGeometricRepresentationItem;var IfcGeometricRepresentationSubContext=/*#__PURE__*/function(_IfcGeometricRepresen){_inherits(IfcGeometricRepresentationSubContext,_IfcGeometricRepresen);var _super354=_createSuper(IfcGeometricRepresentationSubContext);function IfcGeometricRepresentationSubContext(expressID,ContextIdentifier,ContextType,ParentContext,TargetScale,TargetView,UserDefinedTargetView){var _this351;_classCallCheck(this,IfcGeometricRepresentationSubContext);_this351=_super354.call(this,expressID,ContextIdentifier,ContextType,new IfcDimensionCount(0),null,new Handle(0),null);_this351.ContextIdentifier=ContextIdentifier;_this351.ContextType=ContextType;_this351.ParentContext=ParentContext;_this351.TargetScale=TargetScale;_this351.TargetView=TargetView;_this351.UserDefinedTargetView=UserDefinedTargetView;_this351.type=4142052618;return _this351;}return _createClass(IfcGeometricRepresentationSubContext);}(IfcGeometricRepresentationContext);IFC2X32.IfcGeometricRepresentationSubContext=IfcGeometricRepresentationSubContext;var IfcGeometricSet=/*#__PURE__*/function(_IfcGeometricRepresen2){_inherits(IfcGeometricSet,_IfcGeometricRepresen2);var _super355=_createSuper(IfcGeometricSet);function IfcGeometricSet(expressID,Elements){var _this352;_classCallCheck(this,IfcGeometricSet);_this352=_super355.call(this,expressID);_this352.Elements=Elements;_this352.type=3590301190;return _this352;}return _createClass(IfcGeometricSet);}(IfcGeometricRepresentationItem);IFC2X32.IfcGeometricSet=IfcGeometricSet;var IfcGridPlacement=/*#__PURE__*/function(_IfcObjectPlacement){_inherits(IfcGridPlacement,_IfcObjectPlacement);var _super356=_createSuper(IfcGridPlacement);function IfcGridPlacement(expressID,PlacementLocation,PlacementRefDirection){var _this353;_classCallCheck(this,IfcGridPlacement);_this353=_super356.call(this,expressID);_this353.PlacementLocation=PlacementLocation;_this353.PlacementRefDirection=PlacementRefDirection;_this353.type=178086475;return _this353;}return _createClass(IfcGridPlacement);}(IfcObjectPlacement);IFC2X32.IfcGridPlacement=IfcGridPlacement;var IfcHalfSpaceSolid=/*#__PURE__*/function(_IfcGeometricRepresen3){_inherits(IfcHalfSpaceSolid,_IfcGeometricRepresen3);var _super357=_createSuper(IfcHalfSpaceSolid);function IfcHalfSpaceSolid(expressID,BaseSurface,AgreementFlag){var _this354;_classCallCheck(this,IfcHalfSpaceSolid);_this354=_super357.call(this,expressID);_this354.BaseSurface=BaseSurface;_this354.AgreementFlag=AgreementFlag;_this354.type=812098782;return _this354;}return _createClass(IfcHalfSpaceSolid);}(IfcGeometricRepresentationItem);IFC2X32.IfcHalfSpaceSolid=IfcHalfSpaceSolid;var IfcHygroscopicMaterialProperties=/*#__PURE__*/function(_IfcMaterialPropertie9){_inherits(IfcHygroscopicMaterialProperties,_IfcMaterialPropertie9);var _super358=_createSuper(IfcHygroscopicMaterialProperties);function IfcHygroscopicMaterialProperties(expressID,Material,UpperVaporResistanceFactor,LowerVaporResistanceFactor,IsothermalMoistureCapacity,VaporPermeability,MoistureDiffusivity){var _this355;_classCallCheck(this,IfcHygroscopicMaterialProperties);_this355=_super358.call(this,expressID,Material);_this355.Material=Material;_this355.UpperVaporResistanceFactor=UpperVaporResistanceFactor;_this355.LowerVaporResistanceFactor=LowerVaporResistanceFactor;_this355.IsothermalMoistureCapacity=IsothermalMoistureCapacity;_this355.VaporPermeability=VaporPermeability;_this355.MoistureDiffusivity=MoistureDiffusivity;_this355.type=2445078500;return _this355;}return _createClass(IfcHygroscopicMaterialProperties);}(IfcMaterialProperties);IFC2X32.IfcHygroscopicMaterialProperties=IfcHygroscopicMaterialProperties;var IfcImageTexture=/*#__PURE__*/function(_IfcSurfaceTexture2){_inherits(IfcImageTexture,_IfcSurfaceTexture2);var _super359=_createSuper(IfcImageTexture);function IfcImageTexture(expressID,RepeatS,RepeatT,TextureType,TextureTransform,UrlReference){var _this356;_classCallCheck(this,IfcImageTexture);_this356=_super359.call(this,expressID,RepeatS,RepeatT,TextureType,TextureTransform);_this356.RepeatS=RepeatS;_this356.RepeatT=RepeatT;_this356.TextureType=TextureType;_this356.TextureTransform=TextureTransform;_this356.UrlReference=UrlReference;_this356.type=3905492369;return _this356;}return _createClass(IfcImageTexture);}(IfcSurfaceTexture);IFC2X32.IfcImageTexture=IfcImageTexture;var IfcIrregularTimeSeries=/*#__PURE__*/function(_IfcTimeSeries){_inherits(IfcIrregularTimeSeries,_IfcTimeSeries);var _super360=_createSuper(IfcIrregularTimeSeries);function IfcIrregularTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit,Values){var _this357;_classCallCheck(this,IfcIrregularTimeSeries);_this357=_super360.call(this,expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit);_this357.Name=Name;_this357.Description=Description;_this357.StartTime=StartTime;_this357.EndTime=EndTime;_this357.TimeSeriesDataType=TimeSeriesDataType;_this357.DataOrigin=DataOrigin;_this357.UserDefinedDataOrigin=UserDefinedDataOrigin;_this357.Unit=Unit;_this357.Values=Values;_this357.type=3741457305;return _this357;}return _createClass(IfcIrregularTimeSeries);}(IfcTimeSeries);IFC2X32.IfcIrregularTimeSeries=IfcIrregularTimeSeries;var IfcLightSource=/*#__PURE__*/function(_IfcGeometricRepresen4){_inherits(IfcLightSource,_IfcGeometricRepresen4);var _super361=_createSuper(IfcLightSource);function IfcLightSource(expressID,Name,LightColour,AmbientIntensity,Intensity){var _this358;_classCallCheck(this,IfcLightSource);_this358=_super361.call(this,expressID);_this358.Name=Name;_this358.LightColour=LightColour;_this358.AmbientIntensity=AmbientIntensity;_this358.Intensity=Intensity;_this358.type=1402838566;return _this358;}return _createClass(IfcLightSource);}(IfcGeometricRepresentationItem);IFC2X32.IfcLightSource=IfcLightSource;var IfcLightSourceAmbient=/*#__PURE__*/function(_IfcLightSource){_inherits(IfcLightSourceAmbient,_IfcLightSource);var _super362=_createSuper(IfcLightSourceAmbient);function IfcLightSourceAmbient(expressID,Name,LightColour,AmbientIntensity,Intensity){var _this359;_classCallCheck(this,IfcLightSourceAmbient);_this359=_super362.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this359.Name=Name;_this359.LightColour=LightColour;_this359.AmbientIntensity=AmbientIntensity;_this359.Intensity=Intensity;_this359.type=125510826;return _this359;}return _createClass(IfcLightSourceAmbient);}(IfcLightSource);IFC2X32.IfcLightSourceAmbient=IfcLightSourceAmbient;var IfcLightSourceDirectional=/*#__PURE__*/function(_IfcLightSource2){_inherits(IfcLightSourceDirectional,_IfcLightSource2);var _super363=_createSuper(IfcLightSourceDirectional);function IfcLightSourceDirectional(expressID,Name,LightColour,AmbientIntensity,Intensity,Orientation){var _this360;_classCallCheck(this,IfcLightSourceDirectional);_this360=_super363.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this360.Name=Name;_this360.LightColour=LightColour;_this360.AmbientIntensity=AmbientIntensity;_this360.Intensity=Intensity;_this360.Orientation=Orientation;_this360.type=2604431987;return _this360;}return _createClass(IfcLightSourceDirectional);}(IfcLightSource);IFC2X32.IfcLightSourceDirectional=IfcLightSourceDirectional;var IfcLightSourceGoniometric=/*#__PURE__*/function(_IfcLightSource3){_inherits(IfcLightSourceGoniometric,_IfcLightSource3);var _super364=_createSuper(IfcLightSourceGoniometric);function IfcLightSourceGoniometric(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,ColourAppearance,ColourTemperature,LuminousFlux,LightEmissionSource,LightDistributionDataSource){var _this361;_classCallCheck(this,IfcLightSourceGoniometric);_this361=_super364.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this361.Name=Name;_this361.LightColour=LightColour;_this361.AmbientIntensity=AmbientIntensity;_this361.Intensity=Intensity;_this361.Position=Position;_this361.ColourAppearance=ColourAppearance;_this361.ColourTemperature=ColourTemperature;_this361.LuminousFlux=LuminousFlux;_this361.LightEmissionSource=LightEmissionSource;_this361.LightDistributionDataSource=LightDistributionDataSource;_this361.type=4266656042;return _this361;}return _createClass(IfcLightSourceGoniometric);}(IfcLightSource);IFC2X32.IfcLightSourceGoniometric=IfcLightSourceGoniometric;var IfcLightSourcePositional=/*#__PURE__*/function(_IfcLightSource4){_inherits(IfcLightSourcePositional,_IfcLightSource4);var _super365=_createSuper(IfcLightSourcePositional);function IfcLightSourcePositional(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation){var _this362;_classCallCheck(this,IfcLightSourcePositional);_this362=_super365.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this362.Name=Name;_this362.LightColour=LightColour;_this362.AmbientIntensity=AmbientIntensity;_this362.Intensity=Intensity;_this362.Position=Position;_this362.Radius=Radius;_this362.ConstantAttenuation=ConstantAttenuation;_this362.DistanceAttenuation=DistanceAttenuation;_this362.QuadricAttenuation=QuadricAttenuation;_this362.type=1520743889;return _this362;}return _createClass(IfcLightSourcePositional);}(IfcLightSource);IFC2X32.IfcLightSourcePositional=IfcLightSourcePositional;var IfcLightSourceSpot=/*#__PURE__*/function(_IfcLightSourcePositi){_inherits(IfcLightSourceSpot,_IfcLightSourcePositi);var _super366=_createSuper(IfcLightSourceSpot);function IfcLightSourceSpot(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation,Orientation,ConcentrationExponent,SpreadAngle,BeamWidthAngle){var _this363;_classCallCheck(this,IfcLightSourceSpot);_this363=_super366.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation);_this363.Name=Name;_this363.LightColour=LightColour;_this363.AmbientIntensity=AmbientIntensity;_this363.Intensity=Intensity;_this363.Position=Position;_this363.Radius=Radius;_this363.ConstantAttenuation=ConstantAttenuation;_this363.DistanceAttenuation=DistanceAttenuation;_this363.QuadricAttenuation=QuadricAttenuation;_this363.Orientation=Orientation;_this363.ConcentrationExponent=ConcentrationExponent;_this363.SpreadAngle=SpreadAngle;_this363.BeamWidthAngle=BeamWidthAngle;_this363.type=3422422726;return _this363;}return _createClass(IfcLightSourceSpot);}(IfcLightSourcePositional);IFC2X32.IfcLightSourceSpot=IfcLightSourceSpot;var IfcLocalPlacement=/*#__PURE__*/function(_IfcObjectPlacement2){_inherits(IfcLocalPlacement,_IfcObjectPlacement2);var _super367=_createSuper(IfcLocalPlacement);function IfcLocalPlacement(expressID,PlacementRelTo,RelativePlacement){var _this364;_classCallCheck(this,IfcLocalPlacement);_this364=_super367.call(this,expressID);_this364.PlacementRelTo=PlacementRelTo;_this364.RelativePlacement=RelativePlacement;_this364.type=2624227202;return _this364;}return _createClass(IfcLocalPlacement);}(IfcObjectPlacement);IFC2X32.IfcLocalPlacement=IfcLocalPlacement;var IfcLoop=/*#__PURE__*/function(_IfcTopologicalRepres6){_inherits(IfcLoop,_IfcTopologicalRepres6);var _super368=_createSuper(IfcLoop);function IfcLoop(expressID){var _this365;_classCallCheck(this,IfcLoop);_this365=_super368.call(this,expressID);_this365.type=1008929658;return _this365;}return _createClass(IfcLoop);}(IfcTopologicalRepresentationItem);IFC2X32.IfcLoop=IfcLoop;var IfcMappedItem=/*#__PURE__*/function(_IfcRepresentationIte4){_inherits(IfcMappedItem,_IfcRepresentationIte4);var _super369=_createSuper(IfcMappedItem);function IfcMappedItem(expressID,MappingSource,MappingTarget){var _this366;_classCallCheck(this,IfcMappedItem);_this366=_super369.call(this,expressID);_this366.MappingSource=MappingSource;_this366.MappingTarget=MappingTarget;_this366.type=2347385850;return _this366;}return _createClass(IfcMappedItem);}(IfcRepresentationItem);IFC2X32.IfcMappedItem=IfcMappedItem;var IfcMaterialDefinitionRepresentation=/*#__PURE__*/function(_IfcProductRepresenta){_inherits(IfcMaterialDefinitionRepresentation,_IfcProductRepresenta);var _super370=_createSuper(IfcMaterialDefinitionRepresentation);function IfcMaterialDefinitionRepresentation(expressID,Name,Description,Representations,RepresentedMaterial){var _this367;_classCallCheck(this,IfcMaterialDefinitionRepresentation);_this367=_super370.call(this,expressID,Name,Description,Representations);_this367.Name=Name;_this367.Description=Description;_this367.Representations=Representations;_this367.RepresentedMaterial=RepresentedMaterial;_this367.type=2022407955;return _this367;}return _createClass(IfcMaterialDefinitionRepresentation);}(IfcProductRepresentation);IFC2X32.IfcMaterialDefinitionRepresentation=IfcMaterialDefinitionRepresentation;var IfcMechanicalConcreteMaterialProperties=/*#__PURE__*/function(_IfcMechanicalMateria2){_inherits(IfcMechanicalConcreteMaterialProperties,_IfcMechanicalMateria2);var _super371=_createSuper(IfcMechanicalConcreteMaterialProperties);function IfcMechanicalConcreteMaterialProperties(expressID,Material,DynamicViscosity,YoungModulus,ShearModulus,PoissonRatio,ThermalExpansionCoefficient,CompressiveStrength,MaxAggregateSize,AdmixturesDescription,Workability,ProtectivePoreRatio,WaterImpermeability){var _this368;_classCallCheck(this,IfcMechanicalConcreteMaterialProperties);_this368=_super371.call(this,expressID,Material,DynamicViscosity,YoungModulus,ShearModulus,PoissonRatio,ThermalExpansionCoefficient);_this368.Material=Material;_this368.DynamicViscosity=DynamicViscosity;_this368.YoungModulus=YoungModulus;_this368.ShearModulus=ShearModulus;_this368.PoissonRatio=PoissonRatio;_this368.ThermalExpansionCoefficient=ThermalExpansionCoefficient;_this368.CompressiveStrength=CompressiveStrength;_this368.MaxAggregateSize=MaxAggregateSize;_this368.AdmixturesDescription=AdmixturesDescription;_this368.Workability=Workability;_this368.ProtectivePoreRatio=ProtectivePoreRatio;_this368.WaterImpermeability=WaterImpermeability;_this368.type=1430189142;return _this368;}return _createClass(IfcMechanicalConcreteMaterialProperties);}(IfcMechanicalMaterialProperties);IFC2X32.IfcMechanicalConcreteMaterialProperties=IfcMechanicalConcreteMaterialProperties;var IfcObjectDefinition=/*#__PURE__*/function(_IfcRoot){_inherits(IfcObjectDefinition,_IfcRoot);var _super372=_createSuper(IfcObjectDefinition);function IfcObjectDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this369;_classCallCheck(this,IfcObjectDefinition);_this369=_super372.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this369.GlobalId=GlobalId;_this369.OwnerHistory=OwnerHistory;_this369.Name=Name;_this369.Description=Description;_this369.type=219451334;return _this369;}return _createClass(IfcObjectDefinition);}(IfcRoot);IFC2X32.IfcObjectDefinition=IfcObjectDefinition;var IfcOneDirectionRepeatFactor=/*#__PURE__*/function(_IfcGeometricRepresen5){_inherits(IfcOneDirectionRepeatFactor,_IfcGeometricRepresen5);var _super373=_createSuper(IfcOneDirectionRepeatFactor);function IfcOneDirectionRepeatFactor(expressID,RepeatFactor){var _this370;_classCallCheck(this,IfcOneDirectionRepeatFactor);_this370=_super373.call(this,expressID);_this370.RepeatFactor=RepeatFactor;_this370.type=2833995503;return _this370;}return _createClass(IfcOneDirectionRepeatFactor);}(IfcGeometricRepresentationItem);IFC2X32.IfcOneDirectionRepeatFactor=IfcOneDirectionRepeatFactor;var IfcOpenShell=/*#__PURE__*/function(_IfcConnectedFaceSet){_inherits(IfcOpenShell,_IfcConnectedFaceSet);var _super374=_createSuper(IfcOpenShell);function IfcOpenShell(expressID,CfsFaces){var _this371;_classCallCheck(this,IfcOpenShell);_this371=_super374.call(this,expressID,CfsFaces);_this371.CfsFaces=CfsFaces;_this371.type=2665983363;return _this371;}return _createClass(IfcOpenShell);}(IfcConnectedFaceSet);IFC2X32.IfcOpenShell=IfcOpenShell;var IfcOrientedEdge=/*#__PURE__*/function(_IfcEdge2){_inherits(IfcOrientedEdge,_IfcEdge2);var _super375=_createSuper(IfcOrientedEdge);function IfcOrientedEdge(expressID,EdgeElement,Orientation){var _this372;_classCallCheck(this,IfcOrientedEdge);_this372=_super375.call(this,expressID,new Handle(0),new Handle(0));_this372.EdgeElement=EdgeElement;_this372.Orientation=Orientation;_this372.type=1029017970;return _this372;}return _createClass(IfcOrientedEdge);}(IfcEdge);IFC2X32.IfcOrientedEdge=IfcOrientedEdge;var IfcParameterizedProfileDef=/*#__PURE__*/function(_IfcProfileDef5){_inherits(IfcParameterizedProfileDef,_IfcProfileDef5);var _super376=_createSuper(IfcParameterizedProfileDef);function IfcParameterizedProfileDef(expressID,ProfileType,ProfileName,Position){var _this373;_classCallCheck(this,IfcParameterizedProfileDef);_this373=_super376.call(this,expressID,ProfileType,ProfileName);_this373.ProfileType=ProfileType;_this373.ProfileName=ProfileName;_this373.Position=Position;_this373.type=2529465313;return _this373;}return _createClass(IfcParameterizedProfileDef);}(IfcProfileDef);IFC2X32.IfcParameterizedProfileDef=IfcParameterizedProfileDef;var IfcPath=/*#__PURE__*/function(_IfcTopologicalRepres7){_inherits(IfcPath,_IfcTopologicalRepres7);var _super377=_createSuper(IfcPath);function IfcPath(expressID,EdgeList){var _this374;_classCallCheck(this,IfcPath);_this374=_super377.call(this,expressID);_this374.EdgeList=EdgeList;_this374.type=2519244187;return _this374;}return _createClass(IfcPath);}(IfcTopologicalRepresentationItem);IFC2X32.IfcPath=IfcPath;var IfcPhysicalComplexQuantity=/*#__PURE__*/function(_IfcPhysicalQuantity2){_inherits(IfcPhysicalComplexQuantity,_IfcPhysicalQuantity2);var _super378=_createSuper(IfcPhysicalComplexQuantity);function IfcPhysicalComplexQuantity(expressID,Name,Description,HasQuantities,Discrimination,Quality,Usage){var _this375;_classCallCheck(this,IfcPhysicalComplexQuantity);_this375=_super378.call(this,expressID,Name,Description);_this375.Name=Name;_this375.Description=Description;_this375.HasQuantities=HasQuantities;_this375.Discrimination=Discrimination;_this375.Quality=Quality;_this375.Usage=Usage;_this375.type=3021840470;return _this375;}return _createClass(IfcPhysicalComplexQuantity);}(IfcPhysicalQuantity);IFC2X32.IfcPhysicalComplexQuantity=IfcPhysicalComplexQuantity;var IfcPixelTexture=/*#__PURE__*/function(_IfcSurfaceTexture3){_inherits(IfcPixelTexture,_IfcSurfaceTexture3);var _super379=_createSuper(IfcPixelTexture);function IfcPixelTexture(expressID,RepeatS,RepeatT,TextureType,TextureTransform,Width,Height,ColourComponents,Pixel){var _this376;_classCallCheck(this,IfcPixelTexture);_this376=_super379.call(this,expressID,RepeatS,RepeatT,TextureType,TextureTransform);_this376.RepeatS=RepeatS;_this376.RepeatT=RepeatT;_this376.TextureType=TextureType;_this376.TextureTransform=TextureTransform;_this376.Width=Width;_this376.Height=Height;_this376.ColourComponents=ColourComponents;_this376.Pixel=Pixel;_this376.type=597895409;return _this376;}return _createClass(IfcPixelTexture);}(IfcSurfaceTexture);IFC2X32.IfcPixelTexture=IfcPixelTexture;var IfcPlacement=/*#__PURE__*/function(_IfcGeometricRepresen6){_inherits(IfcPlacement,_IfcGeometricRepresen6);var _super380=_createSuper(IfcPlacement);function IfcPlacement(expressID,Location){var _this377;_classCallCheck(this,IfcPlacement);_this377=_super380.call(this,expressID);_this377.Location=Location;_this377.type=2004835150;return _this377;}return _createClass(IfcPlacement);}(IfcGeometricRepresentationItem);IFC2X32.IfcPlacement=IfcPlacement;var IfcPlanarExtent=/*#__PURE__*/function(_IfcGeometricRepresen7){_inherits(IfcPlanarExtent,_IfcGeometricRepresen7);var _super381=_createSuper(IfcPlanarExtent);function IfcPlanarExtent(expressID,SizeInX,SizeInY){var _this378;_classCallCheck(this,IfcPlanarExtent);_this378=_super381.call(this,expressID);_this378.SizeInX=SizeInX;_this378.SizeInY=SizeInY;_this378.type=1663979128;return _this378;}return _createClass(IfcPlanarExtent);}(IfcGeometricRepresentationItem);IFC2X32.IfcPlanarExtent=IfcPlanarExtent;var IfcPoint=/*#__PURE__*/function(_IfcGeometricRepresen8){_inherits(IfcPoint,_IfcGeometricRepresen8);var _super382=_createSuper(IfcPoint);function IfcPoint(expressID){var _this379;_classCallCheck(this,IfcPoint);_this379=_super382.call(this,expressID);_this379.type=2067069095;return _this379;}return _createClass(IfcPoint);}(IfcGeometricRepresentationItem);IFC2X32.IfcPoint=IfcPoint;var IfcPointOnCurve=/*#__PURE__*/function(_IfcPoint){_inherits(IfcPointOnCurve,_IfcPoint);var _super383=_createSuper(IfcPointOnCurve);function IfcPointOnCurve(expressID,BasisCurve,PointParameter){var _this380;_classCallCheck(this,IfcPointOnCurve);_this380=_super383.call(this,expressID);_this380.BasisCurve=BasisCurve;_this380.PointParameter=PointParameter;_this380.type=4022376103;return _this380;}return _createClass(IfcPointOnCurve);}(IfcPoint);IFC2X32.IfcPointOnCurve=IfcPointOnCurve;var IfcPointOnSurface=/*#__PURE__*/function(_IfcPoint2){_inherits(IfcPointOnSurface,_IfcPoint2);var _super384=_createSuper(IfcPointOnSurface);function IfcPointOnSurface(expressID,BasisSurface,PointParameterU,PointParameterV){var _this381;_classCallCheck(this,IfcPointOnSurface);_this381=_super384.call(this,expressID);_this381.BasisSurface=BasisSurface;_this381.PointParameterU=PointParameterU;_this381.PointParameterV=PointParameterV;_this381.type=1423911732;return _this381;}return _createClass(IfcPointOnSurface);}(IfcPoint);IFC2X32.IfcPointOnSurface=IfcPointOnSurface;var IfcPolyLoop=/*#__PURE__*/function(_IfcLoop){_inherits(IfcPolyLoop,_IfcLoop);var _super385=_createSuper(IfcPolyLoop);function IfcPolyLoop(expressID,Polygon){var _this382;_classCallCheck(this,IfcPolyLoop);_this382=_super385.call(this,expressID);_this382.Polygon=Polygon;_this382.type=2924175390;return _this382;}return _createClass(IfcPolyLoop);}(IfcLoop);IFC2X32.IfcPolyLoop=IfcPolyLoop;var IfcPolygonalBoundedHalfSpace=/*#__PURE__*/function(_IfcHalfSpaceSolid){_inherits(IfcPolygonalBoundedHalfSpace,_IfcHalfSpaceSolid);var _super386=_createSuper(IfcPolygonalBoundedHalfSpace);function IfcPolygonalBoundedHalfSpace(expressID,BaseSurface,AgreementFlag,Position,PolygonalBoundary){var _this383;_classCallCheck(this,IfcPolygonalBoundedHalfSpace);_this383=_super386.call(this,expressID,BaseSurface,AgreementFlag);_this383.BaseSurface=BaseSurface;_this383.AgreementFlag=AgreementFlag;_this383.Position=Position;_this383.PolygonalBoundary=PolygonalBoundary;_this383.type=2775532180;return _this383;}return _createClass(IfcPolygonalBoundedHalfSpace);}(IfcHalfSpaceSolid);IFC2X32.IfcPolygonalBoundedHalfSpace=IfcPolygonalBoundedHalfSpace;var IfcPreDefinedColour=/*#__PURE__*/function(_IfcPreDefinedItem3){_inherits(IfcPreDefinedColour,_IfcPreDefinedItem3);var _super387=_createSuper(IfcPreDefinedColour);function IfcPreDefinedColour(expressID,Name){var _this384;_classCallCheck(this,IfcPreDefinedColour);_this384=_super387.call(this,expressID,Name);_this384.Name=Name;_this384.type=759155922;return _this384;}return _createClass(IfcPreDefinedColour);}(IfcPreDefinedItem);IFC2X32.IfcPreDefinedColour=IfcPreDefinedColour;var IfcPreDefinedCurveFont=/*#__PURE__*/function(_IfcPreDefinedItem4){_inherits(IfcPreDefinedCurveFont,_IfcPreDefinedItem4);var _super388=_createSuper(IfcPreDefinedCurveFont);function IfcPreDefinedCurveFont(expressID,Name){var _this385;_classCallCheck(this,IfcPreDefinedCurveFont);_this385=_super388.call(this,expressID,Name);_this385.Name=Name;_this385.type=2559016684;return _this385;}return _createClass(IfcPreDefinedCurveFont);}(IfcPreDefinedItem);IFC2X32.IfcPreDefinedCurveFont=IfcPreDefinedCurveFont;var IfcPreDefinedDimensionSymbol=/*#__PURE__*/function(_IfcPreDefinedSymbol2){_inherits(IfcPreDefinedDimensionSymbol,_IfcPreDefinedSymbol2);var _super389=_createSuper(IfcPreDefinedDimensionSymbol);function IfcPreDefinedDimensionSymbol(expressID,Name){var _this386;_classCallCheck(this,IfcPreDefinedDimensionSymbol);_this386=_super389.call(this,expressID,Name);_this386.Name=Name;_this386.type=433424934;return _this386;}return _createClass(IfcPreDefinedDimensionSymbol);}(IfcPreDefinedSymbol);IFC2X32.IfcPreDefinedDimensionSymbol=IfcPreDefinedDimensionSymbol;var IfcPreDefinedPointMarkerSymbol=/*#__PURE__*/function(_IfcPreDefinedSymbol3){_inherits(IfcPreDefinedPointMarkerSymbol,_IfcPreDefinedSymbol3);var _super390=_createSuper(IfcPreDefinedPointMarkerSymbol);function IfcPreDefinedPointMarkerSymbol(expressID,Name){var _this387;_classCallCheck(this,IfcPreDefinedPointMarkerSymbol);_this387=_super390.call(this,expressID,Name);_this387.Name=Name;_this387.type=179317114;return _this387;}return _createClass(IfcPreDefinedPointMarkerSymbol);}(IfcPreDefinedSymbol);IFC2X32.IfcPreDefinedPointMarkerSymbol=IfcPreDefinedPointMarkerSymbol;var IfcProductDefinitionShape=/*#__PURE__*/function(_IfcProductRepresenta2){_inherits(IfcProductDefinitionShape,_IfcProductRepresenta2);var _super391=_createSuper(IfcProductDefinitionShape);function IfcProductDefinitionShape(expressID,Name,Description,Representations){var _this388;_classCallCheck(this,IfcProductDefinitionShape);_this388=_super391.call(this,expressID,Name,Description,Representations);_this388.Name=Name;_this388.Description=Description;_this388.Representations=Representations;_this388.type=673634403;return _this388;}return _createClass(IfcProductDefinitionShape);}(IfcProductRepresentation);IFC2X32.IfcProductDefinitionShape=IfcProductDefinitionShape;var IfcPropertyBoundedValue=/*#__PURE__*/function(_IfcSimpleProperty){_inherits(IfcPropertyBoundedValue,_IfcSimpleProperty);var _super392=_createSuper(IfcPropertyBoundedValue);function IfcPropertyBoundedValue(expressID,Name,Description,UpperBoundValue,LowerBoundValue,Unit){var _this389;_classCallCheck(this,IfcPropertyBoundedValue);_this389=_super392.call(this,expressID,Name,Description);_this389.Name=Name;_this389.Description=Description;_this389.UpperBoundValue=UpperBoundValue;_this389.LowerBoundValue=LowerBoundValue;_this389.Unit=Unit;_this389.type=871118103;return _this389;}return _createClass(IfcPropertyBoundedValue);}(IfcSimpleProperty);IFC2X32.IfcPropertyBoundedValue=IfcPropertyBoundedValue;var IfcPropertyDefinition=/*#__PURE__*/function(_IfcRoot2){_inherits(IfcPropertyDefinition,_IfcRoot2);var _super393=_createSuper(IfcPropertyDefinition);function IfcPropertyDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this390;_classCallCheck(this,IfcPropertyDefinition);_this390=_super393.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this390.GlobalId=GlobalId;_this390.OwnerHistory=OwnerHistory;_this390.Name=Name;_this390.Description=Description;_this390.type=1680319473;return _this390;}return _createClass(IfcPropertyDefinition);}(IfcRoot);IFC2X32.IfcPropertyDefinition=IfcPropertyDefinition;var IfcPropertyEnumeratedValue=/*#__PURE__*/function(_IfcSimpleProperty2){_inherits(IfcPropertyEnumeratedValue,_IfcSimpleProperty2);var _super394=_createSuper(IfcPropertyEnumeratedValue);function IfcPropertyEnumeratedValue(expressID,Name,Description,EnumerationValues,EnumerationReference){var _this391;_classCallCheck(this,IfcPropertyEnumeratedValue);_this391=_super394.call(this,expressID,Name,Description);_this391.Name=Name;_this391.Description=Description;_this391.EnumerationValues=EnumerationValues;_this391.EnumerationReference=EnumerationReference;_this391.type=4166981789;return _this391;}return _createClass(IfcPropertyEnumeratedValue);}(IfcSimpleProperty);IFC2X32.IfcPropertyEnumeratedValue=IfcPropertyEnumeratedValue;var IfcPropertyListValue=/*#__PURE__*/function(_IfcSimpleProperty3){_inherits(IfcPropertyListValue,_IfcSimpleProperty3);var _super395=_createSuper(IfcPropertyListValue);function IfcPropertyListValue(expressID,Name,Description,ListValues,Unit){var _this392;_classCallCheck(this,IfcPropertyListValue);_this392=_super395.call(this,expressID,Name,Description);_this392.Name=Name;_this392.Description=Description;_this392.ListValues=ListValues;_this392.Unit=Unit;_this392.type=2752243245;return _this392;}return _createClass(IfcPropertyListValue);}(IfcSimpleProperty);IFC2X32.IfcPropertyListValue=IfcPropertyListValue;var IfcPropertyReferenceValue=/*#__PURE__*/function(_IfcSimpleProperty4){_inherits(IfcPropertyReferenceValue,_IfcSimpleProperty4);var _super396=_createSuper(IfcPropertyReferenceValue);function IfcPropertyReferenceValue(expressID,Name,Description,UsageName,PropertyReference){var _this393;_classCallCheck(this,IfcPropertyReferenceValue);_this393=_super396.call(this,expressID,Name,Description);_this393.Name=Name;_this393.Description=Description;_this393.UsageName=UsageName;_this393.PropertyReference=PropertyReference;_this393.type=941946838;return _this393;}return _createClass(IfcPropertyReferenceValue);}(IfcSimpleProperty);IFC2X32.IfcPropertyReferenceValue=IfcPropertyReferenceValue;var IfcPropertySetDefinition=/*#__PURE__*/function(_IfcPropertyDefinitio){_inherits(IfcPropertySetDefinition,_IfcPropertyDefinitio);var _super397=_createSuper(IfcPropertySetDefinition);function IfcPropertySetDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this394;_classCallCheck(this,IfcPropertySetDefinition);_this394=_super397.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this394.GlobalId=GlobalId;_this394.OwnerHistory=OwnerHistory;_this394.Name=Name;_this394.Description=Description;_this394.type=3357820518;return _this394;}return _createClass(IfcPropertySetDefinition);}(IfcPropertyDefinition);IFC2X32.IfcPropertySetDefinition=IfcPropertySetDefinition;var IfcPropertySingleValue=/*#__PURE__*/function(_IfcSimpleProperty5){_inherits(IfcPropertySingleValue,_IfcSimpleProperty5);var _super398=_createSuper(IfcPropertySingleValue);function IfcPropertySingleValue(expressID,Name,Description,NominalValue,Unit){var _this395;_classCallCheck(this,IfcPropertySingleValue);_this395=_super398.call(this,expressID,Name,Description);_this395.Name=Name;_this395.Description=Description;_this395.NominalValue=NominalValue;_this395.Unit=Unit;_this395.type=3650150729;return _this395;}return _createClass(IfcPropertySingleValue);}(IfcSimpleProperty);IFC2X32.IfcPropertySingleValue=IfcPropertySingleValue;var IfcPropertyTableValue=/*#__PURE__*/function(_IfcSimpleProperty6){_inherits(IfcPropertyTableValue,_IfcSimpleProperty6);var _super399=_createSuper(IfcPropertyTableValue);function IfcPropertyTableValue(expressID,Name,Description,DefiningValues,DefinedValues,Expression,DefiningUnit,DefinedUnit){var _this396;_classCallCheck(this,IfcPropertyTableValue);_this396=_super399.call(this,expressID,Name,Description);_this396.Name=Name;_this396.Description=Description;_this396.DefiningValues=DefiningValues;_this396.DefinedValues=DefinedValues;_this396.Expression=Expression;_this396.DefiningUnit=DefiningUnit;_this396.DefinedUnit=DefinedUnit;_this396.type=110355661;return _this396;}return _createClass(IfcPropertyTableValue);}(IfcSimpleProperty);IFC2X32.IfcPropertyTableValue=IfcPropertyTableValue;var IfcRectangleProfileDef=/*#__PURE__*/function(_IfcParameterizedProf){_inherits(IfcRectangleProfileDef,_IfcParameterizedProf);var _super400=_createSuper(IfcRectangleProfileDef);function IfcRectangleProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim){var _this397;_classCallCheck(this,IfcRectangleProfileDef);_this397=_super400.call(this,expressID,ProfileType,ProfileName,Position);_this397.ProfileType=ProfileType;_this397.ProfileName=ProfileName;_this397.Position=Position;_this397.XDim=XDim;_this397.YDim=YDim;_this397.type=3615266464;return _this397;}return _createClass(IfcRectangleProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcRectangleProfileDef=IfcRectangleProfileDef;var IfcRegularTimeSeries=/*#__PURE__*/function(_IfcTimeSeries2){_inherits(IfcRegularTimeSeries,_IfcTimeSeries2);var _super401=_createSuper(IfcRegularTimeSeries);function IfcRegularTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit,TimeStep,Values){var _this398;_classCallCheck(this,IfcRegularTimeSeries);_this398=_super401.call(this,expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit);_this398.Name=Name;_this398.Description=Description;_this398.StartTime=StartTime;_this398.EndTime=EndTime;_this398.TimeSeriesDataType=TimeSeriesDataType;_this398.DataOrigin=DataOrigin;_this398.UserDefinedDataOrigin=UserDefinedDataOrigin;_this398.Unit=Unit;_this398.TimeStep=TimeStep;_this398.Values=Values;_this398.type=3413951693;return _this398;}return _createClass(IfcRegularTimeSeries);}(IfcTimeSeries);IFC2X32.IfcRegularTimeSeries=IfcRegularTimeSeries;var IfcReinforcementDefinitionProperties=/*#__PURE__*/function(_IfcPropertySetDefini){_inherits(IfcReinforcementDefinitionProperties,_IfcPropertySetDefini);var _super402=_createSuper(IfcReinforcementDefinitionProperties);function IfcReinforcementDefinitionProperties(expressID,GlobalId,OwnerHistory,Name,Description,DefinitionType,ReinforcementSectionDefinitions){var _this399;_classCallCheck(this,IfcReinforcementDefinitionProperties);_this399=_super402.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this399.GlobalId=GlobalId;_this399.OwnerHistory=OwnerHistory;_this399.Name=Name;_this399.Description=Description;_this399.DefinitionType=DefinitionType;_this399.ReinforcementSectionDefinitions=ReinforcementSectionDefinitions;_this399.type=3765753017;return _this399;}return _createClass(IfcReinforcementDefinitionProperties);}(IfcPropertySetDefinition);IFC2X32.IfcReinforcementDefinitionProperties=IfcReinforcementDefinitionProperties;var IfcRelationship=/*#__PURE__*/function(_IfcRoot3){_inherits(IfcRelationship,_IfcRoot3);var _super403=_createSuper(IfcRelationship);function IfcRelationship(expressID,GlobalId,OwnerHistory,Name,Description){var _this400;_classCallCheck(this,IfcRelationship);_this400=_super403.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this400.GlobalId=GlobalId;_this400.OwnerHistory=OwnerHistory;_this400.Name=Name;_this400.Description=Description;_this400.type=478536968;return _this400;}return _createClass(IfcRelationship);}(IfcRoot);IFC2X32.IfcRelationship=IfcRelationship;var IfcRoundedRectangleProfileDef=/*#__PURE__*/function(_IfcRectangleProfileD){_inherits(IfcRoundedRectangleProfileDef,_IfcRectangleProfileD);var _super404=_createSuper(IfcRoundedRectangleProfileDef);function IfcRoundedRectangleProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim,RoundingRadius){var _this401;_classCallCheck(this,IfcRoundedRectangleProfileDef);_this401=_super404.call(this,expressID,ProfileType,ProfileName,Position,XDim,YDim);_this401.ProfileType=ProfileType;_this401.ProfileName=ProfileName;_this401.Position=Position;_this401.XDim=XDim;_this401.YDim=YDim;_this401.RoundingRadius=RoundingRadius;_this401.type=2778083089;return _this401;}return _createClass(IfcRoundedRectangleProfileDef);}(IfcRectangleProfileDef);IFC2X32.IfcRoundedRectangleProfileDef=IfcRoundedRectangleProfileDef;var IfcSectionedSpine=/*#__PURE__*/function(_IfcGeometricRepresen9){_inherits(IfcSectionedSpine,_IfcGeometricRepresen9);var _super405=_createSuper(IfcSectionedSpine);function IfcSectionedSpine(expressID,SpineCurve,CrossSections,CrossSectionPositions){var _this402;_classCallCheck(this,IfcSectionedSpine);_this402=_super405.call(this,expressID);_this402.SpineCurve=SpineCurve;_this402.CrossSections=CrossSections;_this402.CrossSectionPositions=CrossSectionPositions;_this402.type=1509187699;return _this402;}return _createClass(IfcSectionedSpine);}(IfcGeometricRepresentationItem);IFC2X32.IfcSectionedSpine=IfcSectionedSpine;var IfcServiceLifeFactor=/*#__PURE__*/function(_IfcPropertySetDefini2){_inherits(IfcServiceLifeFactor,_IfcPropertySetDefini2);var _super406=_createSuper(IfcServiceLifeFactor);function IfcServiceLifeFactor(expressID,GlobalId,OwnerHistory,Name,Description,PredefinedType,UpperValue,MostUsedValue,LowerValue){var _this403;_classCallCheck(this,IfcServiceLifeFactor);_this403=_super406.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this403.GlobalId=GlobalId;_this403.OwnerHistory=OwnerHistory;_this403.Name=Name;_this403.Description=Description;_this403.PredefinedType=PredefinedType;_this403.UpperValue=UpperValue;_this403.MostUsedValue=MostUsedValue;_this403.LowerValue=LowerValue;_this403.type=2411513650;return _this403;}return _createClass(IfcServiceLifeFactor);}(IfcPropertySetDefinition);IFC2X32.IfcServiceLifeFactor=IfcServiceLifeFactor;var IfcShellBasedSurfaceModel=/*#__PURE__*/function(_IfcGeometricRepresen10){_inherits(IfcShellBasedSurfaceModel,_IfcGeometricRepresen10);var _super407=_createSuper(IfcShellBasedSurfaceModel);function IfcShellBasedSurfaceModel(expressID,SbsmBoundary){var _this404;_classCallCheck(this,IfcShellBasedSurfaceModel);_this404=_super407.call(this,expressID);_this404.SbsmBoundary=SbsmBoundary;_this404.type=4124623270;return _this404;}return _createClass(IfcShellBasedSurfaceModel);}(IfcGeometricRepresentationItem);IFC2X32.IfcShellBasedSurfaceModel=IfcShellBasedSurfaceModel;var IfcSlippageConnectionCondition=/*#__PURE__*/function(_IfcStructuralConnect2){_inherits(IfcSlippageConnectionCondition,_IfcStructuralConnect2);var _super408=_createSuper(IfcSlippageConnectionCondition);function IfcSlippageConnectionCondition(expressID,Name,SlippageX,SlippageY,SlippageZ){var _this405;_classCallCheck(this,IfcSlippageConnectionCondition);_this405=_super408.call(this,expressID,Name);_this405.Name=Name;_this405.SlippageX=SlippageX;_this405.SlippageY=SlippageY;_this405.SlippageZ=SlippageZ;_this405.type=2609359061;return _this405;}return _createClass(IfcSlippageConnectionCondition);}(IfcStructuralConnectionCondition);IFC2X32.IfcSlippageConnectionCondition=IfcSlippageConnectionCondition;var IfcSolidModel=/*#__PURE__*/function(_IfcGeometricRepresen11){_inherits(IfcSolidModel,_IfcGeometricRepresen11);var _super409=_createSuper(IfcSolidModel);function IfcSolidModel(expressID){var _this406;_classCallCheck(this,IfcSolidModel);_this406=_super409.call(this,expressID);_this406.type=723233188;return _this406;}return _createClass(IfcSolidModel);}(IfcGeometricRepresentationItem);IFC2X32.IfcSolidModel=IfcSolidModel;var IfcSoundProperties=/*#__PURE__*/function(_IfcPropertySetDefini3){_inherits(IfcSoundProperties,_IfcPropertySetDefini3);var _super410=_createSuper(IfcSoundProperties);function IfcSoundProperties(expressID,GlobalId,OwnerHistory,Name,Description,IsAttenuating,SoundScale,SoundValues){var _this407;_classCallCheck(this,IfcSoundProperties);_this407=_super410.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this407.GlobalId=GlobalId;_this407.OwnerHistory=OwnerHistory;_this407.Name=Name;_this407.Description=Description;_this407.IsAttenuating=IsAttenuating;_this407.SoundScale=SoundScale;_this407.SoundValues=SoundValues;_this407.type=2485662743;return _this407;}return _createClass(IfcSoundProperties);}(IfcPropertySetDefinition);IFC2X32.IfcSoundProperties=IfcSoundProperties;var IfcSoundValue=/*#__PURE__*/function(_IfcPropertySetDefini4){_inherits(IfcSoundValue,_IfcPropertySetDefini4);var _super411=_createSuper(IfcSoundValue);function IfcSoundValue(expressID,GlobalId,OwnerHistory,Name,Description,SoundLevelTimeSeries,Frequency,SoundLevelSingleValue){var _this408;_classCallCheck(this,IfcSoundValue);_this408=_super411.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this408.GlobalId=GlobalId;_this408.OwnerHistory=OwnerHistory;_this408.Name=Name;_this408.Description=Description;_this408.SoundLevelTimeSeries=SoundLevelTimeSeries;_this408.Frequency=Frequency;_this408.SoundLevelSingleValue=SoundLevelSingleValue;_this408.type=1202362311;return _this408;}return _createClass(IfcSoundValue);}(IfcPropertySetDefinition);IFC2X32.IfcSoundValue=IfcSoundValue;var IfcSpaceThermalLoadProperties=/*#__PURE__*/function(_IfcPropertySetDefini5){_inherits(IfcSpaceThermalLoadProperties,_IfcPropertySetDefini5);var _super412=_createSuper(IfcSpaceThermalLoadProperties);function IfcSpaceThermalLoadProperties(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableValueRatio,ThermalLoadSource,PropertySource,SourceDescription,MaximumValue,MinimumValue,ThermalLoadTimeSeriesValues,UserDefinedThermalLoadSource,UserDefinedPropertySource,ThermalLoadType){var _this409;_classCallCheck(this,IfcSpaceThermalLoadProperties);_this409=_super412.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this409.GlobalId=GlobalId;_this409.OwnerHistory=OwnerHistory;_this409.Name=Name;_this409.Description=Description;_this409.ApplicableValueRatio=ApplicableValueRatio;_this409.ThermalLoadSource=ThermalLoadSource;_this409.PropertySource=PropertySource;_this409.SourceDescription=SourceDescription;_this409.MaximumValue=MaximumValue;_this409.MinimumValue=MinimumValue;_this409.ThermalLoadTimeSeriesValues=ThermalLoadTimeSeriesValues;_this409.UserDefinedThermalLoadSource=UserDefinedThermalLoadSource;_this409.UserDefinedPropertySource=UserDefinedPropertySource;_this409.ThermalLoadType=ThermalLoadType;_this409.type=390701378;return _this409;}return _createClass(IfcSpaceThermalLoadProperties);}(IfcPropertySetDefinition);IFC2X32.IfcSpaceThermalLoadProperties=IfcSpaceThermalLoadProperties;var IfcStructuralLoadLinearForce=/*#__PURE__*/function(_IfcStructuralLoadSta2){_inherits(IfcStructuralLoadLinearForce,_IfcStructuralLoadSta2);var _super413=_createSuper(IfcStructuralLoadLinearForce);function IfcStructuralLoadLinearForce(expressID,Name,LinearForceX,LinearForceY,LinearForceZ,LinearMomentX,LinearMomentY,LinearMomentZ){var _this410;_classCallCheck(this,IfcStructuralLoadLinearForce);_this410=_super413.call(this,expressID,Name);_this410.Name=Name;_this410.LinearForceX=LinearForceX;_this410.LinearForceY=LinearForceY;_this410.LinearForceZ=LinearForceZ;_this410.LinearMomentX=LinearMomentX;_this410.LinearMomentY=LinearMomentY;_this410.LinearMomentZ=LinearMomentZ;_this410.type=1595516126;return _this410;}return _createClass(IfcStructuralLoadLinearForce);}(IfcStructuralLoadStatic);IFC2X32.IfcStructuralLoadLinearForce=IfcStructuralLoadLinearForce;var IfcStructuralLoadPlanarForce=/*#__PURE__*/function(_IfcStructuralLoadSta3){_inherits(IfcStructuralLoadPlanarForce,_IfcStructuralLoadSta3);var _super414=_createSuper(IfcStructuralLoadPlanarForce);function IfcStructuralLoadPlanarForce(expressID,Name,PlanarForceX,PlanarForceY,PlanarForceZ){var _this411;_classCallCheck(this,IfcStructuralLoadPlanarForce);_this411=_super414.call(this,expressID,Name);_this411.Name=Name;_this411.PlanarForceX=PlanarForceX;_this411.PlanarForceY=PlanarForceY;_this411.PlanarForceZ=PlanarForceZ;_this411.type=2668620305;return _this411;}return _createClass(IfcStructuralLoadPlanarForce);}(IfcStructuralLoadStatic);IFC2X32.IfcStructuralLoadPlanarForce=IfcStructuralLoadPlanarForce;var IfcStructuralLoadSingleDisplacement=/*#__PURE__*/function(_IfcStructuralLoadSta4){_inherits(IfcStructuralLoadSingleDisplacement,_IfcStructuralLoadSta4);var _super415=_createSuper(IfcStructuralLoadSingleDisplacement);function IfcStructuralLoadSingleDisplacement(expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ){var _this412;_classCallCheck(this,IfcStructuralLoadSingleDisplacement);_this412=_super415.call(this,expressID,Name);_this412.Name=Name;_this412.DisplacementX=DisplacementX;_this412.DisplacementY=DisplacementY;_this412.DisplacementZ=DisplacementZ;_this412.RotationalDisplacementRX=RotationalDisplacementRX;_this412.RotationalDisplacementRY=RotationalDisplacementRY;_this412.RotationalDisplacementRZ=RotationalDisplacementRZ;_this412.type=2473145415;return _this412;}return _createClass(IfcStructuralLoadSingleDisplacement);}(IfcStructuralLoadStatic);IFC2X32.IfcStructuralLoadSingleDisplacement=IfcStructuralLoadSingleDisplacement;var IfcStructuralLoadSingleDisplacementDistortion=/*#__PURE__*/function(_IfcStructuralLoadSin){_inherits(IfcStructuralLoadSingleDisplacementDistortion,_IfcStructuralLoadSin);var _super416=_createSuper(IfcStructuralLoadSingleDisplacementDistortion);function IfcStructuralLoadSingleDisplacementDistortion(expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ,Distortion){var _this413;_classCallCheck(this,IfcStructuralLoadSingleDisplacementDistortion);_this413=_super416.call(this,expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ);_this413.Name=Name;_this413.DisplacementX=DisplacementX;_this413.DisplacementY=DisplacementY;_this413.DisplacementZ=DisplacementZ;_this413.RotationalDisplacementRX=RotationalDisplacementRX;_this413.RotationalDisplacementRY=RotationalDisplacementRY;_this413.RotationalDisplacementRZ=RotationalDisplacementRZ;_this413.Distortion=Distortion;_this413.type=1973038258;return _this413;}return _createClass(IfcStructuralLoadSingleDisplacementDistortion);}(IfcStructuralLoadSingleDisplacement);IFC2X32.IfcStructuralLoadSingleDisplacementDistortion=IfcStructuralLoadSingleDisplacementDistortion;var IfcStructuralLoadSingleForce=/*#__PURE__*/function(_IfcStructuralLoadSta5){_inherits(IfcStructuralLoadSingleForce,_IfcStructuralLoadSta5);var _super417=_createSuper(IfcStructuralLoadSingleForce);function IfcStructuralLoadSingleForce(expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ){var _this414;_classCallCheck(this,IfcStructuralLoadSingleForce);_this414=_super417.call(this,expressID,Name);_this414.Name=Name;_this414.ForceX=ForceX;_this414.ForceY=ForceY;_this414.ForceZ=ForceZ;_this414.MomentX=MomentX;_this414.MomentY=MomentY;_this414.MomentZ=MomentZ;_this414.type=1597423693;return _this414;}return _createClass(IfcStructuralLoadSingleForce);}(IfcStructuralLoadStatic);IFC2X32.IfcStructuralLoadSingleForce=IfcStructuralLoadSingleForce;var IfcStructuralLoadSingleForceWarping=/*#__PURE__*/function(_IfcStructuralLoadSin2){_inherits(IfcStructuralLoadSingleForceWarping,_IfcStructuralLoadSin2);var _super418=_createSuper(IfcStructuralLoadSingleForceWarping);function IfcStructuralLoadSingleForceWarping(expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ,WarpingMoment){var _this415;_classCallCheck(this,IfcStructuralLoadSingleForceWarping);_this415=_super418.call(this,expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ);_this415.Name=Name;_this415.ForceX=ForceX;_this415.ForceY=ForceY;_this415.ForceZ=ForceZ;_this415.MomentX=MomentX;_this415.MomentY=MomentY;_this415.MomentZ=MomentZ;_this415.WarpingMoment=WarpingMoment;_this415.type=1190533807;return _this415;}return _createClass(IfcStructuralLoadSingleForceWarping);}(IfcStructuralLoadSingleForce);IFC2X32.IfcStructuralLoadSingleForceWarping=IfcStructuralLoadSingleForceWarping;var IfcStructuralProfileProperties=/*#__PURE__*/function(_IfcGeneralProfilePro){_inherits(IfcStructuralProfileProperties,_IfcGeneralProfilePro);var _super419=_createSuper(IfcStructuralProfileProperties);function IfcStructuralProfileProperties(expressID,ProfileName,ProfileDefinition,PhysicalWeight,Perimeter,MinimumPlateThickness,MaximumPlateThickness,CrossSectionArea,TorsionalConstantX,MomentOfInertiaYZ,MomentOfInertiaY,MomentOfInertiaZ,WarpingConstant,ShearCentreZ,ShearCentreY,ShearDeformationAreaZ,ShearDeformationAreaY,MaximumSectionModulusY,MinimumSectionModulusY,MaximumSectionModulusZ,MinimumSectionModulusZ,TorsionalSectionModulus,CentreOfGravityInX,CentreOfGravityInY){var _this416;_classCallCheck(this,IfcStructuralProfileProperties);_this416=_super419.call(this,expressID,ProfileName,ProfileDefinition,PhysicalWeight,Perimeter,MinimumPlateThickness,MaximumPlateThickness,CrossSectionArea);_this416.ProfileName=ProfileName;_this416.ProfileDefinition=ProfileDefinition;_this416.PhysicalWeight=PhysicalWeight;_this416.Perimeter=Perimeter;_this416.MinimumPlateThickness=MinimumPlateThickness;_this416.MaximumPlateThickness=MaximumPlateThickness;_this416.CrossSectionArea=CrossSectionArea;_this416.TorsionalConstantX=TorsionalConstantX;_this416.MomentOfInertiaYZ=MomentOfInertiaYZ;_this416.MomentOfInertiaY=MomentOfInertiaY;_this416.MomentOfInertiaZ=MomentOfInertiaZ;_this416.WarpingConstant=WarpingConstant;_this416.ShearCentreZ=ShearCentreZ;_this416.ShearCentreY=ShearCentreY;_this416.ShearDeformationAreaZ=ShearDeformationAreaZ;_this416.ShearDeformationAreaY=ShearDeformationAreaY;_this416.MaximumSectionModulusY=MaximumSectionModulusY;_this416.MinimumSectionModulusY=MinimumSectionModulusY;_this416.MaximumSectionModulusZ=MaximumSectionModulusZ;_this416.MinimumSectionModulusZ=MinimumSectionModulusZ;_this416.TorsionalSectionModulus=TorsionalSectionModulus;_this416.CentreOfGravityInX=CentreOfGravityInX;_this416.CentreOfGravityInY=CentreOfGravityInY;_this416.type=3843319758;return _this416;}return _createClass(IfcStructuralProfileProperties);}(IfcGeneralProfileProperties);IFC2X32.IfcStructuralProfileProperties=IfcStructuralProfileProperties;var IfcStructuralSteelProfileProperties=/*#__PURE__*/function(_IfcStructuralProfile){_inherits(IfcStructuralSteelProfileProperties,_IfcStructuralProfile);var _super420=_createSuper(IfcStructuralSteelProfileProperties);function IfcStructuralSteelProfileProperties(expressID,ProfileName,ProfileDefinition,PhysicalWeight,Perimeter,MinimumPlateThickness,MaximumPlateThickness,CrossSectionArea,TorsionalConstantX,MomentOfInertiaYZ,MomentOfInertiaY,MomentOfInertiaZ,WarpingConstant,ShearCentreZ,ShearCentreY,ShearDeformationAreaZ,ShearDeformationAreaY,MaximumSectionModulusY,MinimumSectionModulusY,MaximumSectionModulusZ,MinimumSectionModulusZ,TorsionalSectionModulus,CentreOfGravityInX,CentreOfGravityInY,ShearAreaZ,ShearAreaY,PlasticShapeFactorY,PlasticShapeFactorZ){var _this417;_classCallCheck(this,IfcStructuralSteelProfileProperties);_this417=_super420.call(this,expressID,ProfileName,ProfileDefinition,PhysicalWeight,Perimeter,MinimumPlateThickness,MaximumPlateThickness,CrossSectionArea,TorsionalConstantX,MomentOfInertiaYZ,MomentOfInertiaY,MomentOfInertiaZ,WarpingConstant,ShearCentreZ,ShearCentreY,ShearDeformationAreaZ,ShearDeformationAreaY,MaximumSectionModulusY,MinimumSectionModulusY,MaximumSectionModulusZ,MinimumSectionModulusZ,TorsionalSectionModulus,CentreOfGravityInX,CentreOfGravityInY);_this417.ProfileName=ProfileName;_this417.ProfileDefinition=ProfileDefinition;_this417.PhysicalWeight=PhysicalWeight;_this417.Perimeter=Perimeter;_this417.MinimumPlateThickness=MinimumPlateThickness;_this417.MaximumPlateThickness=MaximumPlateThickness;_this417.CrossSectionArea=CrossSectionArea;_this417.TorsionalConstantX=TorsionalConstantX;_this417.MomentOfInertiaYZ=MomentOfInertiaYZ;_this417.MomentOfInertiaY=MomentOfInertiaY;_this417.MomentOfInertiaZ=MomentOfInertiaZ;_this417.WarpingConstant=WarpingConstant;_this417.ShearCentreZ=ShearCentreZ;_this417.ShearCentreY=ShearCentreY;_this417.ShearDeformationAreaZ=ShearDeformationAreaZ;_this417.ShearDeformationAreaY=ShearDeformationAreaY;_this417.MaximumSectionModulusY=MaximumSectionModulusY;_this417.MinimumSectionModulusY=MinimumSectionModulusY;_this417.MaximumSectionModulusZ=MaximumSectionModulusZ;_this417.MinimumSectionModulusZ=MinimumSectionModulusZ;_this417.TorsionalSectionModulus=TorsionalSectionModulus;_this417.CentreOfGravityInX=CentreOfGravityInX;_this417.CentreOfGravityInY=CentreOfGravityInY;_this417.ShearAreaZ=ShearAreaZ;_this417.ShearAreaY=ShearAreaY;_this417.PlasticShapeFactorY=PlasticShapeFactorY;_this417.PlasticShapeFactorZ=PlasticShapeFactorZ;_this417.type=3653947884;return _this417;}return _createClass(IfcStructuralSteelProfileProperties);}(IfcStructuralProfileProperties);IFC2X32.IfcStructuralSteelProfileProperties=IfcStructuralSteelProfileProperties;var IfcSubedge=/*#__PURE__*/function(_IfcEdge3){_inherits(IfcSubedge,_IfcEdge3);var _super421=_createSuper(IfcSubedge);function IfcSubedge(expressID,EdgeStart,EdgeEnd,ParentEdge){var _this418;_classCallCheck(this,IfcSubedge);_this418=_super421.call(this,expressID,EdgeStart,EdgeEnd);_this418.EdgeStart=EdgeStart;_this418.EdgeEnd=EdgeEnd;_this418.ParentEdge=ParentEdge;_this418.type=2233826070;return _this418;}return _createClass(IfcSubedge);}(IfcEdge);IFC2X32.IfcSubedge=IfcSubedge;var IfcSurface=/*#__PURE__*/function(_IfcGeometricRepresen12){_inherits(IfcSurface,_IfcGeometricRepresen12);var _super422=_createSuper(IfcSurface);function IfcSurface(expressID){var _this419;_classCallCheck(this,IfcSurface);_this419=_super422.call(this,expressID);_this419.type=2513912981;return _this419;}return _createClass(IfcSurface);}(IfcGeometricRepresentationItem);IFC2X32.IfcSurface=IfcSurface;var IfcSurfaceStyleRendering=/*#__PURE__*/function(_IfcSurfaceStyleShadi){_inherits(IfcSurfaceStyleRendering,_IfcSurfaceStyleShadi);var _super423=_createSuper(IfcSurfaceStyleRendering);function IfcSurfaceStyleRendering(expressID,SurfaceColour,Transparency,DiffuseColour,TransmissionColour,DiffuseTransmissionColour,ReflectionColour,SpecularColour,SpecularHighlight,ReflectanceMethod){var _this420;_classCallCheck(this,IfcSurfaceStyleRendering);_this420=_super423.call(this,expressID,SurfaceColour);_this420.SurfaceColour=SurfaceColour;_this420.Transparency=Transparency;_this420.DiffuseColour=DiffuseColour;_this420.TransmissionColour=TransmissionColour;_this420.DiffuseTransmissionColour=DiffuseTransmissionColour;_this420.ReflectionColour=ReflectionColour;_this420.SpecularColour=SpecularColour;_this420.SpecularHighlight=SpecularHighlight;_this420.ReflectanceMethod=ReflectanceMethod;_this420.type=1878645084;return _this420;}return _createClass(IfcSurfaceStyleRendering);}(IfcSurfaceStyleShading);IFC2X32.IfcSurfaceStyleRendering=IfcSurfaceStyleRendering;var IfcSweptAreaSolid=/*#__PURE__*/function(_IfcSolidModel){_inherits(IfcSweptAreaSolid,_IfcSolidModel);var _super424=_createSuper(IfcSweptAreaSolid);function IfcSweptAreaSolid(expressID,SweptArea,Position){var _this421;_classCallCheck(this,IfcSweptAreaSolid);_this421=_super424.call(this,expressID);_this421.SweptArea=SweptArea;_this421.Position=Position;_this421.type=2247615214;return _this421;}return _createClass(IfcSweptAreaSolid);}(IfcSolidModel);IFC2X32.IfcSweptAreaSolid=IfcSweptAreaSolid;var IfcSweptDiskSolid=/*#__PURE__*/function(_IfcSolidModel2){_inherits(IfcSweptDiskSolid,_IfcSolidModel2);var _super425=_createSuper(IfcSweptDiskSolid);function IfcSweptDiskSolid(expressID,Directrix,Radius,InnerRadius,StartParam,EndParam){var _this422;_classCallCheck(this,IfcSweptDiskSolid);_this422=_super425.call(this,expressID);_this422.Directrix=Directrix;_this422.Radius=Radius;_this422.InnerRadius=InnerRadius;_this422.StartParam=StartParam;_this422.EndParam=EndParam;_this422.type=1260650574;return _this422;}return _createClass(IfcSweptDiskSolid);}(IfcSolidModel);IFC2X32.IfcSweptDiskSolid=IfcSweptDiskSolid;var IfcSweptSurface=/*#__PURE__*/function(_IfcSurface){_inherits(IfcSweptSurface,_IfcSurface);var _super426=_createSuper(IfcSweptSurface);function IfcSweptSurface(expressID,SweptCurve,Position){var _this423;_classCallCheck(this,IfcSweptSurface);_this423=_super426.call(this,expressID);_this423.SweptCurve=SweptCurve;_this423.Position=Position;_this423.type=230924584;return _this423;}return _createClass(IfcSweptSurface);}(IfcSurface);IFC2X32.IfcSweptSurface=IfcSweptSurface;var IfcTShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf2){_inherits(IfcTShapeProfileDef,_IfcParameterizedProf2);var _super427=_createSuper(IfcTShapeProfileDef);function IfcTShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,FlangeEdgeRadius,WebEdgeRadius,WebSlope,FlangeSlope,CentreOfGravityInY){var _this424;_classCallCheck(this,IfcTShapeProfileDef);_this424=_super427.call(this,expressID,ProfileType,ProfileName,Position);_this424.ProfileType=ProfileType;_this424.ProfileName=ProfileName;_this424.Position=Position;_this424.Depth=Depth;_this424.FlangeWidth=FlangeWidth;_this424.WebThickness=WebThickness;_this424.FlangeThickness=FlangeThickness;_this424.FilletRadius=FilletRadius;_this424.FlangeEdgeRadius=FlangeEdgeRadius;_this424.WebEdgeRadius=WebEdgeRadius;_this424.WebSlope=WebSlope;_this424.FlangeSlope=FlangeSlope;_this424.CentreOfGravityInY=CentreOfGravityInY;_this424.type=3071757647;return _this424;}return _createClass(IfcTShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcTShapeProfileDef=IfcTShapeProfileDef;var IfcTerminatorSymbol=/*#__PURE__*/function(_IfcAnnotationSymbolO){_inherits(IfcTerminatorSymbol,_IfcAnnotationSymbolO);var _super428=_createSuper(IfcTerminatorSymbol);function IfcTerminatorSymbol(expressID,Item,Styles,Name,AnnotatedCurve){var _this425;_classCallCheck(this,IfcTerminatorSymbol);_this425=_super428.call(this,expressID,Item,Styles,Name);_this425.Item=Item;_this425.Styles=Styles;_this425.Name=Name;_this425.AnnotatedCurve=AnnotatedCurve;_this425.type=3028897424;return _this425;}return _createClass(IfcTerminatorSymbol);}(IfcAnnotationSymbolOccurrence);IFC2X32.IfcTerminatorSymbol=IfcTerminatorSymbol;var IfcTextLiteral=/*#__PURE__*/function(_IfcGeometricRepresen13){_inherits(IfcTextLiteral,_IfcGeometricRepresen13);var _super429=_createSuper(IfcTextLiteral);function IfcTextLiteral(expressID,Literal,Placement,Path){var _this426;_classCallCheck(this,IfcTextLiteral);_this426=_super429.call(this,expressID);_this426.Literal=Literal;_this426.Placement=Placement;_this426.Path=Path;_this426.type=4282788508;return _this426;}return _createClass(IfcTextLiteral);}(IfcGeometricRepresentationItem);IFC2X32.IfcTextLiteral=IfcTextLiteral;var IfcTextLiteralWithExtent=/*#__PURE__*/function(_IfcTextLiteral){_inherits(IfcTextLiteralWithExtent,_IfcTextLiteral);var _super430=_createSuper(IfcTextLiteralWithExtent);function IfcTextLiteralWithExtent(expressID,Literal,Placement,Path,Extent,BoxAlignment){var _this427;_classCallCheck(this,IfcTextLiteralWithExtent);_this427=_super430.call(this,expressID,Literal,Placement,Path);_this427.Literal=Literal;_this427.Placement=Placement;_this427.Path=Path;_this427.Extent=Extent;_this427.BoxAlignment=BoxAlignment;_this427.type=3124975700;return _this427;}return _createClass(IfcTextLiteralWithExtent);}(IfcTextLiteral);IFC2X32.IfcTextLiteralWithExtent=IfcTextLiteralWithExtent;var IfcTrapeziumProfileDef=/*#__PURE__*/function(_IfcParameterizedProf3){_inherits(IfcTrapeziumProfileDef,_IfcParameterizedProf3);var _super431=_createSuper(IfcTrapeziumProfileDef);function IfcTrapeziumProfileDef(expressID,ProfileType,ProfileName,Position,BottomXDim,TopXDim,YDim,TopXOffset){var _this428;_classCallCheck(this,IfcTrapeziumProfileDef);_this428=_super431.call(this,expressID,ProfileType,ProfileName,Position);_this428.ProfileType=ProfileType;_this428.ProfileName=ProfileName;_this428.Position=Position;_this428.BottomXDim=BottomXDim;_this428.TopXDim=TopXDim;_this428.YDim=YDim;_this428.TopXOffset=TopXOffset;_this428.type=2715220739;return _this428;}return _createClass(IfcTrapeziumProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcTrapeziumProfileDef=IfcTrapeziumProfileDef;var IfcTwoDirectionRepeatFactor=/*#__PURE__*/function(_IfcOneDirectionRepea){_inherits(IfcTwoDirectionRepeatFactor,_IfcOneDirectionRepea);var _super432=_createSuper(IfcTwoDirectionRepeatFactor);function IfcTwoDirectionRepeatFactor(expressID,RepeatFactor,SecondRepeatFactor){var _this429;_classCallCheck(this,IfcTwoDirectionRepeatFactor);_this429=_super432.call(this,expressID,RepeatFactor);_this429.RepeatFactor=RepeatFactor;_this429.SecondRepeatFactor=SecondRepeatFactor;_this429.type=1345879162;return _this429;}return _createClass(IfcTwoDirectionRepeatFactor);}(IfcOneDirectionRepeatFactor);IFC2X32.IfcTwoDirectionRepeatFactor=IfcTwoDirectionRepeatFactor;var IfcTypeObject=/*#__PURE__*/function(_IfcObjectDefinition){_inherits(IfcTypeObject,_IfcObjectDefinition);var _super433=_createSuper(IfcTypeObject);function IfcTypeObject(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets){var _this430;_classCallCheck(this,IfcTypeObject);_this430=_super433.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this430.GlobalId=GlobalId;_this430.OwnerHistory=OwnerHistory;_this430.Name=Name;_this430.Description=Description;_this430.ApplicableOccurrence=ApplicableOccurrence;_this430.HasPropertySets=HasPropertySets;_this430.type=1628702193;return _this430;}return _createClass(IfcTypeObject);}(IfcObjectDefinition);IFC2X32.IfcTypeObject=IfcTypeObject;var IfcTypeProduct=/*#__PURE__*/function(_IfcTypeObject){_inherits(IfcTypeProduct,_IfcTypeObject);var _super434=_createSuper(IfcTypeProduct);function IfcTypeProduct(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag){var _this431;_classCallCheck(this,IfcTypeProduct);_this431=_super434.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets);_this431.GlobalId=GlobalId;_this431.OwnerHistory=OwnerHistory;_this431.Name=Name;_this431.Description=Description;_this431.ApplicableOccurrence=ApplicableOccurrence;_this431.HasPropertySets=HasPropertySets;_this431.RepresentationMaps=RepresentationMaps;_this431.Tag=Tag;_this431.type=2347495698;return _this431;}return _createClass(IfcTypeProduct);}(IfcTypeObject);IFC2X32.IfcTypeProduct=IfcTypeProduct;var IfcUShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf4){_inherits(IfcUShapeProfileDef,_IfcParameterizedProf4);var _super435=_createSuper(IfcUShapeProfileDef);function IfcUShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,EdgeRadius,FlangeSlope,CentreOfGravityInX){var _this432;_classCallCheck(this,IfcUShapeProfileDef);_this432=_super435.call(this,expressID,ProfileType,ProfileName,Position);_this432.ProfileType=ProfileType;_this432.ProfileName=ProfileName;_this432.Position=Position;_this432.Depth=Depth;_this432.FlangeWidth=FlangeWidth;_this432.WebThickness=WebThickness;_this432.FlangeThickness=FlangeThickness;_this432.FilletRadius=FilletRadius;_this432.EdgeRadius=EdgeRadius;_this432.FlangeSlope=FlangeSlope;_this432.CentreOfGravityInX=CentreOfGravityInX;_this432.type=427810014;return _this432;}return _createClass(IfcUShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcUShapeProfileDef=IfcUShapeProfileDef;var IfcVector=/*#__PURE__*/function(_IfcGeometricRepresen14){_inherits(IfcVector,_IfcGeometricRepresen14);var _super436=_createSuper(IfcVector);function IfcVector(expressID,Orientation,Magnitude){var _this433;_classCallCheck(this,IfcVector);_this433=_super436.call(this,expressID);_this433.Orientation=Orientation;_this433.Magnitude=Magnitude;_this433.type=1417489154;return _this433;}return _createClass(IfcVector);}(IfcGeometricRepresentationItem);IFC2X32.IfcVector=IfcVector;var IfcVertexLoop=/*#__PURE__*/function(_IfcLoop2){_inherits(IfcVertexLoop,_IfcLoop2);var _super437=_createSuper(IfcVertexLoop);function IfcVertexLoop(expressID,LoopVertex){var _this434;_classCallCheck(this,IfcVertexLoop);_this434=_super437.call(this,expressID);_this434.LoopVertex=LoopVertex;_this434.type=2759199220;return _this434;}return _createClass(IfcVertexLoop);}(IfcLoop);IFC2X32.IfcVertexLoop=IfcVertexLoop;var IfcWindowLiningProperties=/*#__PURE__*/function(_IfcPropertySetDefini6){_inherits(IfcWindowLiningProperties,_IfcPropertySetDefini6);var _super438=_createSuper(IfcWindowLiningProperties);function IfcWindowLiningProperties(expressID,GlobalId,OwnerHistory,Name,Description,LiningDepth,LiningThickness,TransomThickness,MullionThickness,FirstTransomOffset,SecondTransomOffset,FirstMullionOffset,SecondMullionOffset,ShapeAspectStyle){var _this435;_classCallCheck(this,IfcWindowLiningProperties);_this435=_super438.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this435.GlobalId=GlobalId;_this435.OwnerHistory=OwnerHistory;_this435.Name=Name;_this435.Description=Description;_this435.LiningDepth=LiningDepth;_this435.LiningThickness=LiningThickness;_this435.TransomThickness=TransomThickness;_this435.MullionThickness=MullionThickness;_this435.FirstTransomOffset=FirstTransomOffset;_this435.SecondTransomOffset=SecondTransomOffset;_this435.FirstMullionOffset=FirstMullionOffset;_this435.SecondMullionOffset=SecondMullionOffset;_this435.ShapeAspectStyle=ShapeAspectStyle;_this435.type=336235671;return _this435;}return _createClass(IfcWindowLiningProperties);}(IfcPropertySetDefinition);IFC2X32.IfcWindowLiningProperties=IfcWindowLiningProperties;var IfcWindowPanelProperties=/*#__PURE__*/function(_IfcPropertySetDefini7){_inherits(IfcWindowPanelProperties,_IfcPropertySetDefini7);var _super439=_createSuper(IfcWindowPanelProperties);function IfcWindowPanelProperties(expressID,GlobalId,OwnerHistory,Name,Description,OperationType,PanelPosition,FrameDepth,FrameThickness,ShapeAspectStyle){var _this436;_classCallCheck(this,IfcWindowPanelProperties);_this436=_super439.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this436.GlobalId=GlobalId;_this436.OwnerHistory=OwnerHistory;_this436.Name=Name;_this436.Description=Description;_this436.OperationType=OperationType;_this436.PanelPosition=PanelPosition;_this436.FrameDepth=FrameDepth;_this436.FrameThickness=FrameThickness;_this436.ShapeAspectStyle=ShapeAspectStyle;_this436.type=512836454;return _this436;}return _createClass(IfcWindowPanelProperties);}(IfcPropertySetDefinition);IFC2X32.IfcWindowPanelProperties=IfcWindowPanelProperties;var IfcWindowStyle=/*#__PURE__*/function(_IfcTypeProduct){_inherits(IfcWindowStyle,_IfcTypeProduct);var _super440=_createSuper(IfcWindowStyle);function IfcWindowStyle(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ConstructionType,OperationType,ParameterTakesPrecedence,Sizeable){var _this437;_classCallCheck(this,IfcWindowStyle);_this437=_super440.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this437.GlobalId=GlobalId;_this437.OwnerHistory=OwnerHistory;_this437.Name=Name;_this437.Description=Description;_this437.ApplicableOccurrence=ApplicableOccurrence;_this437.HasPropertySets=HasPropertySets;_this437.RepresentationMaps=RepresentationMaps;_this437.Tag=Tag;_this437.ConstructionType=ConstructionType;_this437.OperationType=OperationType;_this437.ParameterTakesPrecedence=ParameterTakesPrecedence;_this437.Sizeable=Sizeable;_this437.type=1299126871;return _this437;}return _createClass(IfcWindowStyle);}(IfcTypeProduct);IFC2X32.IfcWindowStyle=IfcWindowStyle;var IfcZShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf5){_inherits(IfcZShapeProfileDef,_IfcParameterizedProf5);var _super441=_createSuper(IfcZShapeProfileDef);function IfcZShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,EdgeRadius){var _this438;_classCallCheck(this,IfcZShapeProfileDef);_this438=_super441.call(this,expressID,ProfileType,ProfileName,Position);_this438.ProfileType=ProfileType;_this438.ProfileName=ProfileName;_this438.Position=Position;_this438.Depth=Depth;_this438.FlangeWidth=FlangeWidth;_this438.WebThickness=WebThickness;_this438.FlangeThickness=FlangeThickness;_this438.FilletRadius=FilletRadius;_this438.EdgeRadius=EdgeRadius;_this438.type=2543172580;return _this438;}return _createClass(IfcZShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcZShapeProfileDef=IfcZShapeProfileDef;var IfcAnnotationCurveOccurrence=/*#__PURE__*/function(_IfcAnnotationOccurre4){_inherits(IfcAnnotationCurveOccurrence,_IfcAnnotationOccurre4);var _super442=_createSuper(IfcAnnotationCurveOccurrence);function IfcAnnotationCurveOccurrence(expressID,Item,Styles,Name){var _this439;_classCallCheck(this,IfcAnnotationCurveOccurrence);_this439=_super442.call(this,expressID,Item,Styles,Name);_this439.Item=Item;_this439.Styles=Styles;_this439.Name=Name;_this439.type=3288037868;return _this439;}return _createClass(IfcAnnotationCurveOccurrence);}(IfcAnnotationOccurrence);IFC2X32.IfcAnnotationCurveOccurrence=IfcAnnotationCurveOccurrence;var IfcAnnotationFillArea=/*#__PURE__*/function(_IfcGeometricRepresen15){_inherits(IfcAnnotationFillArea,_IfcGeometricRepresen15);var _super443=_createSuper(IfcAnnotationFillArea);function IfcAnnotationFillArea(expressID,OuterBoundary,InnerBoundaries){var _this440;_classCallCheck(this,IfcAnnotationFillArea);_this440=_super443.call(this,expressID);_this440.OuterBoundary=OuterBoundary;_this440.InnerBoundaries=InnerBoundaries;_this440.type=669184980;return _this440;}return _createClass(IfcAnnotationFillArea);}(IfcGeometricRepresentationItem);IFC2X32.IfcAnnotationFillArea=IfcAnnotationFillArea;var IfcAnnotationFillAreaOccurrence=/*#__PURE__*/function(_IfcAnnotationOccurre5){_inherits(IfcAnnotationFillAreaOccurrence,_IfcAnnotationOccurre5);var _super444=_createSuper(IfcAnnotationFillAreaOccurrence);function IfcAnnotationFillAreaOccurrence(expressID,Item,Styles,Name,FillStyleTarget,GlobalOrLocal){var _this441;_classCallCheck(this,IfcAnnotationFillAreaOccurrence);_this441=_super444.call(this,expressID,Item,Styles,Name);_this441.Item=Item;_this441.Styles=Styles;_this441.Name=Name;_this441.FillStyleTarget=FillStyleTarget;_this441.GlobalOrLocal=GlobalOrLocal;_this441.type=2265737646;return _this441;}return _createClass(IfcAnnotationFillAreaOccurrence);}(IfcAnnotationOccurrence);IFC2X32.IfcAnnotationFillAreaOccurrence=IfcAnnotationFillAreaOccurrence;var IfcAnnotationSurface=/*#__PURE__*/function(_IfcGeometricRepresen16){_inherits(IfcAnnotationSurface,_IfcGeometricRepresen16);var _super445=_createSuper(IfcAnnotationSurface);function IfcAnnotationSurface(expressID,Item,TextureCoordinates){var _this442;_classCallCheck(this,IfcAnnotationSurface);_this442=_super445.call(this,expressID);_this442.Item=Item;_this442.TextureCoordinates=TextureCoordinates;_this442.type=1302238472;return _this442;}return _createClass(IfcAnnotationSurface);}(IfcGeometricRepresentationItem);IFC2X32.IfcAnnotationSurface=IfcAnnotationSurface;var IfcAxis1Placement=/*#__PURE__*/function(_IfcPlacement){_inherits(IfcAxis1Placement,_IfcPlacement);var _super446=_createSuper(IfcAxis1Placement);function IfcAxis1Placement(expressID,Location,Axis){var _this443;_classCallCheck(this,IfcAxis1Placement);_this443=_super446.call(this,expressID,Location);_this443.Location=Location;_this443.Axis=Axis;_this443.type=4261334040;return _this443;}return _createClass(IfcAxis1Placement);}(IfcPlacement);IFC2X32.IfcAxis1Placement=IfcAxis1Placement;var IfcAxis2Placement2D=/*#__PURE__*/function(_IfcPlacement2){_inherits(IfcAxis2Placement2D,_IfcPlacement2);var _super447=_createSuper(IfcAxis2Placement2D);function IfcAxis2Placement2D(expressID,Location,RefDirection){var _this444;_classCallCheck(this,IfcAxis2Placement2D);_this444=_super447.call(this,expressID,Location);_this444.Location=Location;_this444.RefDirection=RefDirection;_this444.type=3125803723;return _this444;}return _createClass(IfcAxis2Placement2D);}(IfcPlacement);IFC2X32.IfcAxis2Placement2D=IfcAxis2Placement2D;var IfcAxis2Placement3D=/*#__PURE__*/function(_IfcPlacement3){_inherits(IfcAxis2Placement3D,_IfcPlacement3);var _super448=_createSuper(IfcAxis2Placement3D);function IfcAxis2Placement3D(expressID,Location,Axis,RefDirection){var _this445;_classCallCheck(this,IfcAxis2Placement3D);_this445=_super448.call(this,expressID,Location);_this445.Location=Location;_this445.Axis=Axis;_this445.RefDirection=RefDirection;_this445.type=2740243338;return _this445;}return _createClass(IfcAxis2Placement3D);}(IfcPlacement);IFC2X32.IfcAxis2Placement3D=IfcAxis2Placement3D;var IfcBooleanResult=/*#__PURE__*/function(_IfcGeometricRepresen17){_inherits(IfcBooleanResult,_IfcGeometricRepresen17);var _super449=_createSuper(IfcBooleanResult);function IfcBooleanResult(expressID,Operator,FirstOperand,SecondOperand){var _this446;_classCallCheck(this,IfcBooleanResult);_this446=_super449.call(this,expressID);_this446.Operator=Operator;_this446.FirstOperand=FirstOperand;_this446.SecondOperand=SecondOperand;_this446.type=2736907675;return _this446;}return _createClass(IfcBooleanResult);}(IfcGeometricRepresentationItem);IFC2X32.IfcBooleanResult=IfcBooleanResult;var IfcBoundedSurface=/*#__PURE__*/function(_IfcSurface2){_inherits(IfcBoundedSurface,_IfcSurface2);var _super450=_createSuper(IfcBoundedSurface);function IfcBoundedSurface(expressID){var _this447;_classCallCheck(this,IfcBoundedSurface);_this447=_super450.call(this,expressID);_this447.type=4182860854;return _this447;}return _createClass(IfcBoundedSurface);}(IfcSurface);IFC2X32.IfcBoundedSurface=IfcBoundedSurface;var IfcBoundingBox=/*#__PURE__*/function(_IfcGeometricRepresen18){_inherits(IfcBoundingBox,_IfcGeometricRepresen18);var _super451=_createSuper(IfcBoundingBox);function IfcBoundingBox(expressID,Corner,XDim,YDim,ZDim){var _this448;_classCallCheck(this,IfcBoundingBox);_this448=_super451.call(this,expressID);_this448.Corner=Corner;_this448.XDim=XDim;_this448.YDim=YDim;_this448.ZDim=ZDim;_this448.type=2581212453;return _this448;}return _createClass(IfcBoundingBox);}(IfcGeometricRepresentationItem);IFC2X32.IfcBoundingBox=IfcBoundingBox;var IfcBoxedHalfSpace=/*#__PURE__*/function(_IfcHalfSpaceSolid2){_inherits(IfcBoxedHalfSpace,_IfcHalfSpaceSolid2);var _super452=_createSuper(IfcBoxedHalfSpace);function IfcBoxedHalfSpace(expressID,BaseSurface,AgreementFlag,Enclosure){var _this449;_classCallCheck(this,IfcBoxedHalfSpace);_this449=_super452.call(this,expressID,BaseSurface,AgreementFlag);_this449.BaseSurface=BaseSurface;_this449.AgreementFlag=AgreementFlag;_this449.Enclosure=Enclosure;_this449.type=2713105998;return _this449;}return _createClass(IfcBoxedHalfSpace);}(IfcHalfSpaceSolid);IFC2X32.IfcBoxedHalfSpace=IfcBoxedHalfSpace;var IfcCShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf6){_inherits(IfcCShapeProfileDef,_IfcParameterizedProf6);var _super453=_createSuper(IfcCShapeProfileDef);function IfcCShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,Width,WallThickness,Girth,InternalFilletRadius,CentreOfGravityInX){var _this450;_classCallCheck(this,IfcCShapeProfileDef);_this450=_super453.call(this,expressID,ProfileType,ProfileName,Position);_this450.ProfileType=ProfileType;_this450.ProfileName=ProfileName;_this450.Position=Position;_this450.Depth=Depth;_this450.Width=Width;_this450.WallThickness=WallThickness;_this450.Girth=Girth;_this450.InternalFilletRadius=InternalFilletRadius;_this450.CentreOfGravityInX=CentreOfGravityInX;_this450.type=2898889636;return _this450;}return _createClass(IfcCShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcCShapeProfileDef=IfcCShapeProfileDef;var IfcCartesianPoint=/*#__PURE__*/function(_IfcPoint3){_inherits(IfcCartesianPoint,_IfcPoint3);var _super454=_createSuper(IfcCartesianPoint);function IfcCartesianPoint(expressID,Coordinates){var _this451;_classCallCheck(this,IfcCartesianPoint);_this451=_super454.call(this,expressID);_this451.Coordinates=Coordinates;_this451.type=1123145078;return _this451;}return _createClass(IfcCartesianPoint);}(IfcPoint);IFC2X32.IfcCartesianPoint=IfcCartesianPoint;var IfcCartesianTransformationOperator=/*#__PURE__*/function(_IfcGeometricRepresen19){_inherits(IfcCartesianTransformationOperator,_IfcGeometricRepresen19);var _super455=_createSuper(IfcCartesianTransformationOperator);function IfcCartesianTransformationOperator(expressID,Axis1,Axis2,LocalOrigin,Scale){var _this452;_classCallCheck(this,IfcCartesianTransformationOperator);_this452=_super455.call(this,expressID);_this452.Axis1=Axis1;_this452.Axis2=Axis2;_this452.LocalOrigin=LocalOrigin;_this452.Scale=Scale;_this452.type=59481748;return _this452;}return _createClass(IfcCartesianTransformationOperator);}(IfcGeometricRepresentationItem);IFC2X32.IfcCartesianTransformationOperator=IfcCartesianTransformationOperator;var IfcCartesianTransformationOperator2D=/*#__PURE__*/function(_IfcCartesianTransfor){_inherits(IfcCartesianTransformationOperator2D,_IfcCartesianTransfor);var _super456=_createSuper(IfcCartesianTransformationOperator2D);function IfcCartesianTransformationOperator2D(expressID,Axis1,Axis2,LocalOrigin,Scale){var _this453;_classCallCheck(this,IfcCartesianTransformationOperator2D);_this453=_super456.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this453.Axis1=Axis1;_this453.Axis2=Axis2;_this453.LocalOrigin=LocalOrigin;_this453.Scale=Scale;_this453.type=3749851601;return _this453;}return _createClass(IfcCartesianTransformationOperator2D);}(IfcCartesianTransformationOperator);IFC2X32.IfcCartesianTransformationOperator2D=IfcCartesianTransformationOperator2D;var IfcCartesianTransformationOperator2DnonUniform=/*#__PURE__*/function(_IfcCartesianTransfor2){_inherits(IfcCartesianTransformationOperator2DnonUniform,_IfcCartesianTransfor2);var _super457=_createSuper(IfcCartesianTransformationOperator2DnonUniform);function IfcCartesianTransformationOperator2DnonUniform(expressID,Axis1,Axis2,LocalOrigin,Scale,Scale2){var _this454;_classCallCheck(this,IfcCartesianTransformationOperator2DnonUniform);_this454=_super457.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this454.Axis1=Axis1;_this454.Axis2=Axis2;_this454.LocalOrigin=LocalOrigin;_this454.Scale=Scale;_this454.Scale2=Scale2;_this454.type=3486308946;return _this454;}return _createClass(IfcCartesianTransformationOperator2DnonUniform);}(IfcCartesianTransformationOperator2D);IFC2X32.IfcCartesianTransformationOperator2DnonUniform=IfcCartesianTransformationOperator2DnonUniform;var IfcCartesianTransformationOperator3D=/*#__PURE__*/function(_IfcCartesianTransfor3){_inherits(IfcCartesianTransformationOperator3D,_IfcCartesianTransfor3);var _super458=_createSuper(IfcCartesianTransformationOperator3D);function IfcCartesianTransformationOperator3D(expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3){var _this455;_classCallCheck(this,IfcCartesianTransformationOperator3D);_this455=_super458.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this455.Axis1=Axis1;_this455.Axis2=Axis2;_this455.LocalOrigin=LocalOrigin;_this455.Scale=Scale;_this455.Axis3=Axis3;_this455.type=3331915920;return _this455;}return _createClass(IfcCartesianTransformationOperator3D);}(IfcCartesianTransformationOperator);IFC2X32.IfcCartesianTransformationOperator3D=IfcCartesianTransformationOperator3D;var IfcCartesianTransformationOperator3DnonUniform=/*#__PURE__*/function(_IfcCartesianTransfor4){_inherits(IfcCartesianTransformationOperator3DnonUniform,_IfcCartesianTransfor4);var _super459=_createSuper(IfcCartesianTransformationOperator3DnonUniform);function IfcCartesianTransformationOperator3DnonUniform(expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3,Scale2,Scale3){var _this456;_classCallCheck(this,IfcCartesianTransformationOperator3DnonUniform);_this456=_super459.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3);_this456.Axis1=Axis1;_this456.Axis2=Axis2;_this456.LocalOrigin=LocalOrigin;_this456.Scale=Scale;_this456.Axis3=Axis3;_this456.Scale2=Scale2;_this456.Scale3=Scale3;_this456.type=1416205885;return _this456;}return _createClass(IfcCartesianTransformationOperator3DnonUniform);}(IfcCartesianTransformationOperator3D);IFC2X32.IfcCartesianTransformationOperator3DnonUniform=IfcCartesianTransformationOperator3DnonUniform;var IfcCircleProfileDef=/*#__PURE__*/function(_IfcParameterizedProf7){_inherits(IfcCircleProfileDef,_IfcParameterizedProf7);var _super460=_createSuper(IfcCircleProfileDef);function IfcCircleProfileDef(expressID,ProfileType,ProfileName,Position,Radius){var _this457;_classCallCheck(this,IfcCircleProfileDef);_this457=_super460.call(this,expressID,ProfileType,ProfileName,Position);_this457.ProfileType=ProfileType;_this457.ProfileName=ProfileName;_this457.Position=Position;_this457.Radius=Radius;_this457.type=1383045692;return _this457;}return _createClass(IfcCircleProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcCircleProfileDef=IfcCircleProfileDef;var IfcClosedShell=/*#__PURE__*/function(_IfcConnectedFaceSet2){_inherits(IfcClosedShell,_IfcConnectedFaceSet2);var _super461=_createSuper(IfcClosedShell);function IfcClosedShell(expressID,CfsFaces){var _this458;_classCallCheck(this,IfcClosedShell);_this458=_super461.call(this,expressID,CfsFaces);_this458.CfsFaces=CfsFaces;_this458.type=2205249479;return _this458;}return _createClass(IfcClosedShell);}(IfcConnectedFaceSet);IFC2X32.IfcClosedShell=IfcClosedShell;var IfcCompositeCurveSegment=/*#__PURE__*/function(_IfcGeometricRepresen20){_inherits(IfcCompositeCurveSegment,_IfcGeometricRepresen20);var _super462=_createSuper(IfcCompositeCurveSegment);function IfcCompositeCurveSegment(expressID,Transition,SameSense,ParentCurve){var _this459;_classCallCheck(this,IfcCompositeCurveSegment);_this459=_super462.call(this,expressID);_this459.Transition=Transition;_this459.SameSense=SameSense;_this459.ParentCurve=ParentCurve;_this459.type=2485617015;return _this459;}return _createClass(IfcCompositeCurveSegment);}(IfcGeometricRepresentationItem);IFC2X32.IfcCompositeCurveSegment=IfcCompositeCurveSegment;var IfcCraneRailAShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf8){_inherits(IfcCraneRailAShapeProfileDef,_IfcParameterizedProf8);var _super463=_createSuper(IfcCraneRailAShapeProfileDef);function IfcCraneRailAShapeProfileDef(expressID,ProfileType,ProfileName,Position,OverallHeight,BaseWidth2,Radius,HeadWidth,HeadDepth2,HeadDepth3,WebThickness,BaseWidth4,BaseDepth1,BaseDepth2,BaseDepth3,CentreOfGravityInY){var _this460;_classCallCheck(this,IfcCraneRailAShapeProfileDef);_this460=_super463.call(this,expressID,ProfileType,ProfileName,Position);_this460.ProfileType=ProfileType;_this460.ProfileName=ProfileName;_this460.Position=Position;_this460.OverallHeight=OverallHeight;_this460.BaseWidth2=BaseWidth2;_this460.Radius=Radius;_this460.HeadWidth=HeadWidth;_this460.HeadDepth2=HeadDepth2;_this460.HeadDepth3=HeadDepth3;_this460.WebThickness=WebThickness;_this460.BaseWidth4=BaseWidth4;_this460.BaseDepth1=BaseDepth1;_this460.BaseDepth2=BaseDepth2;_this460.BaseDepth3=BaseDepth3;_this460.CentreOfGravityInY=CentreOfGravityInY;_this460.type=4133800736;return _this460;}return _createClass(IfcCraneRailAShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcCraneRailAShapeProfileDef=IfcCraneRailAShapeProfileDef;var IfcCraneRailFShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf9){_inherits(IfcCraneRailFShapeProfileDef,_IfcParameterizedProf9);var _super464=_createSuper(IfcCraneRailFShapeProfileDef);function IfcCraneRailFShapeProfileDef(expressID,ProfileType,ProfileName,Position,OverallHeight,HeadWidth,Radius,HeadDepth2,HeadDepth3,WebThickness,BaseDepth1,BaseDepth2,CentreOfGravityInY){var _this461;_classCallCheck(this,IfcCraneRailFShapeProfileDef);_this461=_super464.call(this,expressID,ProfileType,ProfileName,Position);_this461.ProfileType=ProfileType;_this461.ProfileName=ProfileName;_this461.Position=Position;_this461.OverallHeight=OverallHeight;_this461.HeadWidth=HeadWidth;_this461.Radius=Radius;_this461.HeadDepth2=HeadDepth2;_this461.HeadDepth3=HeadDepth3;_this461.WebThickness=WebThickness;_this461.BaseDepth1=BaseDepth1;_this461.BaseDepth2=BaseDepth2;_this461.CentreOfGravityInY=CentreOfGravityInY;_this461.type=194851669;return _this461;}return _createClass(IfcCraneRailFShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcCraneRailFShapeProfileDef=IfcCraneRailFShapeProfileDef;var IfcCsgPrimitive3D=/*#__PURE__*/function(_IfcGeometricRepresen21){_inherits(IfcCsgPrimitive3D,_IfcGeometricRepresen21);var _super465=_createSuper(IfcCsgPrimitive3D);function IfcCsgPrimitive3D(expressID,Position){var _this462;_classCallCheck(this,IfcCsgPrimitive3D);_this462=_super465.call(this,expressID);_this462.Position=Position;_this462.type=2506170314;return _this462;}return _createClass(IfcCsgPrimitive3D);}(IfcGeometricRepresentationItem);IFC2X32.IfcCsgPrimitive3D=IfcCsgPrimitive3D;var IfcCsgSolid=/*#__PURE__*/function(_IfcSolidModel3){_inherits(IfcCsgSolid,_IfcSolidModel3);var _super466=_createSuper(IfcCsgSolid);function IfcCsgSolid(expressID,TreeRootExpression){var _this463;_classCallCheck(this,IfcCsgSolid);_this463=_super466.call(this,expressID);_this463.TreeRootExpression=TreeRootExpression;_this463.type=2147822146;return _this463;}return _createClass(IfcCsgSolid);}(IfcSolidModel);IFC2X32.IfcCsgSolid=IfcCsgSolid;var IfcCurve=/*#__PURE__*/function(_IfcGeometricRepresen22){_inherits(IfcCurve,_IfcGeometricRepresen22);var _super467=_createSuper(IfcCurve);function IfcCurve(expressID){var _this464;_classCallCheck(this,IfcCurve);_this464=_super467.call(this,expressID);_this464.type=2601014836;return _this464;}return _createClass(IfcCurve);}(IfcGeometricRepresentationItem);IFC2X32.IfcCurve=IfcCurve;var IfcCurveBoundedPlane=/*#__PURE__*/function(_IfcBoundedSurface){_inherits(IfcCurveBoundedPlane,_IfcBoundedSurface);var _super468=_createSuper(IfcCurveBoundedPlane);function IfcCurveBoundedPlane(expressID,BasisSurface,OuterBoundary,InnerBoundaries){var _this465;_classCallCheck(this,IfcCurveBoundedPlane);_this465=_super468.call(this,expressID);_this465.BasisSurface=BasisSurface;_this465.OuterBoundary=OuterBoundary;_this465.InnerBoundaries=InnerBoundaries;_this465.type=2827736869;return _this465;}return _createClass(IfcCurveBoundedPlane);}(IfcBoundedSurface);IFC2X32.IfcCurveBoundedPlane=IfcCurveBoundedPlane;var IfcDefinedSymbol=/*#__PURE__*/function(_IfcGeometricRepresen23){_inherits(IfcDefinedSymbol,_IfcGeometricRepresen23);var _super469=_createSuper(IfcDefinedSymbol);function IfcDefinedSymbol(expressID,Definition,Target){var _this466;_classCallCheck(this,IfcDefinedSymbol);_this466=_super469.call(this,expressID);_this466.Definition=Definition;_this466.Target=Target;_this466.type=693772133;return _this466;}return _createClass(IfcDefinedSymbol);}(IfcGeometricRepresentationItem);IFC2X32.IfcDefinedSymbol=IfcDefinedSymbol;var IfcDimensionCurve=/*#__PURE__*/function(_IfcAnnotationCurveOc){_inherits(IfcDimensionCurve,_IfcAnnotationCurveOc);var _super470=_createSuper(IfcDimensionCurve);function IfcDimensionCurve(expressID,Item,Styles,Name){var _this467;_classCallCheck(this,IfcDimensionCurve);_this467=_super470.call(this,expressID,Item,Styles,Name);_this467.Item=Item;_this467.Styles=Styles;_this467.Name=Name;_this467.type=606661476;return _this467;}return _createClass(IfcDimensionCurve);}(IfcAnnotationCurveOccurrence);IFC2X32.IfcDimensionCurve=IfcDimensionCurve;var IfcDimensionCurveTerminator=/*#__PURE__*/function(_IfcTerminatorSymbol){_inherits(IfcDimensionCurveTerminator,_IfcTerminatorSymbol);var _super471=_createSuper(IfcDimensionCurveTerminator);function IfcDimensionCurveTerminator(expressID,Item,Styles,Name,AnnotatedCurve,Role){var _this468;_classCallCheck(this,IfcDimensionCurveTerminator);_this468=_super471.call(this,expressID,Item,Styles,Name,AnnotatedCurve);_this468.Item=Item;_this468.Styles=Styles;_this468.Name=Name;_this468.AnnotatedCurve=AnnotatedCurve;_this468.Role=Role;_this468.type=4054601972;return _this468;}return _createClass(IfcDimensionCurveTerminator);}(IfcTerminatorSymbol);IFC2X32.IfcDimensionCurveTerminator=IfcDimensionCurveTerminator;var IfcDirection=/*#__PURE__*/function(_IfcGeometricRepresen24){_inherits(IfcDirection,_IfcGeometricRepresen24);var _super472=_createSuper(IfcDirection);function IfcDirection(expressID,DirectionRatios){var _this469;_classCallCheck(this,IfcDirection);_this469=_super472.call(this,expressID);_this469.DirectionRatios=DirectionRatios;_this469.type=32440307;return _this469;}return _createClass(IfcDirection);}(IfcGeometricRepresentationItem);IFC2X32.IfcDirection=IfcDirection;var IfcDoorLiningProperties=/*#__PURE__*/function(_IfcPropertySetDefini8){_inherits(IfcDoorLiningProperties,_IfcPropertySetDefini8);var _super473=_createSuper(IfcDoorLiningProperties);function IfcDoorLiningProperties(expressID,GlobalId,OwnerHistory,Name,Description,LiningDepth,LiningThickness,ThresholdDepth,ThresholdThickness,TransomThickness,TransomOffset,LiningOffset,ThresholdOffset,CasingThickness,CasingDepth,ShapeAspectStyle){var _this470;_classCallCheck(this,IfcDoorLiningProperties);_this470=_super473.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this470.GlobalId=GlobalId;_this470.OwnerHistory=OwnerHistory;_this470.Name=Name;_this470.Description=Description;_this470.LiningDepth=LiningDepth;_this470.LiningThickness=LiningThickness;_this470.ThresholdDepth=ThresholdDepth;_this470.ThresholdThickness=ThresholdThickness;_this470.TransomThickness=TransomThickness;_this470.TransomOffset=TransomOffset;_this470.LiningOffset=LiningOffset;_this470.ThresholdOffset=ThresholdOffset;_this470.CasingThickness=CasingThickness;_this470.CasingDepth=CasingDepth;_this470.ShapeAspectStyle=ShapeAspectStyle;_this470.type=2963535650;return _this470;}return _createClass(IfcDoorLiningProperties);}(IfcPropertySetDefinition);IFC2X32.IfcDoorLiningProperties=IfcDoorLiningProperties;var IfcDoorPanelProperties=/*#__PURE__*/function(_IfcPropertySetDefini9){_inherits(IfcDoorPanelProperties,_IfcPropertySetDefini9);var _super474=_createSuper(IfcDoorPanelProperties);function IfcDoorPanelProperties(expressID,GlobalId,OwnerHistory,Name,Description,PanelDepth,PanelOperation,PanelWidth,PanelPosition,ShapeAspectStyle){var _this471;_classCallCheck(this,IfcDoorPanelProperties);_this471=_super474.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this471.GlobalId=GlobalId;_this471.OwnerHistory=OwnerHistory;_this471.Name=Name;_this471.Description=Description;_this471.PanelDepth=PanelDepth;_this471.PanelOperation=PanelOperation;_this471.PanelWidth=PanelWidth;_this471.PanelPosition=PanelPosition;_this471.ShapeAspectStyle=ShapeAspectStyle;_this471.type=1714330368;return _this471;}return _createClass(IfcDoorPanelProperties);}(IfcPropertySetDefinition);IFC2X32.IfcDoorPanelProperties=IfcDoorPanelProperties;var IfcDoorStyle=/*#__PURE__*/function(_IfcTypeProduct2){_inherits(IfcDoorStyle,_IfcTypeProduct2);var _super475=_createSuper(IfcDoorStyle);function IfcDoorStyle(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,OperationType,ConstructionType,ParameterTakesPrecedence,Sizeable){var _this472;_classCallCheck(this,IfcDoorStyle);_this472=_super475.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this472.GlobalId=GlobalId;_this472.OwnerHistory=OwnerHistory;_this472.Name=Name;_this472.Description=Description;_this472.ApplicableOccurrence=ApplicableOccurrence;_this472.HasPropertySets=HasPropertySets;_this472.RepresentationMaps=RepresentationMaps;_this472.Tag=Tag;_this472.OperationType=OperationType;_this472.ConstructionType=ConstructionType;_this472.ParameterTakesPrecedence=ParameterTakesPrecedence;_this472.Sizeable=Sizeable;_this472.type=526551008;return _this472;}return _createClass(IfcDoorStyle);}(IfcTypeProduct);IFC2X32.IfcDoorStyle=IfcDoorStyle;var IfcDraughtingCallout=/*#__PURE__*/function(_IfcGeometricRepresen25){_inherits(IfcDraughtingCallout,_IfcGeometricRepresen25);var _super476=_createSuper(IfcDraughtingCallout);function IfcDraughtingCallout(expressID,Contents){var _this473;_classCallCheck(this,IfcDraughtingCallout);_this473=_super476.call(this,expressID);_this473.Contents=Contents;_this473.type=3073041342;return _this473;}return _createClass(IfcDraughtingCallout);}(IfcGeometricRepresentationItem);IFC2X32.IfcDraughtingCallout=IfcDraughtingCallout;var IfcDraughtingPreDefinedColour=/*#__PURE__*/function(_IfcPreDefinedColour){_inherits(IfcDraughtingPreDefinedColour,_IfcPreDefinedColour);var _super477=_createSuper(IfcDraughtingPreDefinedColour);function IfcDraughtingPreDefinedColour(expressID,Name){var _this474;_classCallCheck(this,IfcDraughtingPreDefinedColour);_this474=_super477.call(this,expressID,Name);_this474.Name=Name;_this474.type=445594917;return _this474;}return _createClass(IfcDraughtingPreDefinedColour);}(IfcPreDefinedColour);IFC2X32.IfcDraughtingPreDefinedColour=IfcDraughtingPreDefinedColour;var IfcDraughtingPreDefinedCurveFont=/*#__PURE__*/function(_IfcPreDefinedCurveFo){_inherits(IfcDraughtingPreDefinedCurveFont,_IfcPreDefinedCurveFo);var _super478=_createSuper(IfcDraughtingPreDefinedCurveFont);function IfcDraughtingPreDefinedCurveFont(expressID,Name){var _this475;_classCallCheck(this,IfcDraughtingPreDefinedCurveFont);_this475=_super478.call(this,expressID,Name);_this475.Name=Name;_this475.type=4006246654;return _this475;}return _createClass(IfcDraughtingPreDefinedCurveFont);}(IfcPreDefinedCurveFont);IFC2X32.IfcDraughtingPreDefinedCurveFont=IfcDraughtingPreDefinedCurveFont;var IfcEdgeLoop=/*#__PURE__*/function(_IfcLoop3){_inherits(IfcEdgeLoop,_IfcLoop3);var _super479=_createSuper(IfcEdgeLoop);function IfcEdgeLoop(expressID,EdgeList){var _this476;_classCallCheck(this,IfcEdgeLoop);_this476=_super479.call(this,expressID);_this476.EdgeList=EdgeList;_this476.type=1472233963;return _this476;}return _createClass(IfcEdgeLoop);}(IfcLoop);IFC2X32.IfcEdgeLoop=IfcEdgeLoop;var IfcElementQuantity=/*#__PURE__*/function(_IfcPropertySetDefini10){_inherits(IfcElementQuantity,_IfcPropertySetDefini10);var _super480=_createSuper(IfcElementQuantity);function IfcElementQuantity(expressID,GlobalId,OwnerHistory,Name,Description,MethodOfMeasurement,Quantities){var _this477;_classCallCheck(this,IfcElementQuantity);_this477=_super480.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this477.GlobalId=GlobalId;_this477.OwnerHistory=OwnerHistory;_this477.Name=Name;_this477.Description=Description;_this477.MethodOfMeasurement=MethodOfMeasurement;_this477.Quantities=Quantities;_this477.type=1883228015;return _this477;}return _createClass(IfcElementQuantity);}(IfcPropertySetDefinition);IFC2X32.IfcElementQuantity=IfcElementQuantity;var IfcElementType=/*#__PURE__*/function(_IfcTypeProduct3){_inherits(IfcElementType,_IfcTypeProduct3);var _super481=_createSuper(IfcElementType);function IfcElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this478;_classCallCheck(this,IfcElementType);_this478=_super481.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this478.GlobalId=GlobalId;_this478.OwnerHistory=OwnerHistory;_this478.Name=Name;_this478.Description=Description;_this478.ApplicableOccurrence=ApplicableOccurrence;_this478.HasPropertySets=HasPropertySets;_this478.RepresentationMaps=RepresentationMaps;_this478.Tag=Tag;_this478.ElementType=ElementType;_this478.type=339256511;return _this478;}return _createClass(IfcElementType);}(IfcTypeProduct);IFC2X32.IfcElementType=IfcElementType;var IfcElementarySurface=/*#__PURE__*/function(_IfcSurface3){_inherits(IfcElementarySurface,_IfcSurface3);var _super482=_createSuper(IfcElementarySurface);function IfcElementarySurface(expressID,Position){var _this479;_classCallCheck(this,IfcElementarySurface);_this479=_super482.call(this,expressID);_this479.Position=Position;_this479.type=2777663545;return _this479;}return _createClass(IfcElementarySurface);}(IfcSurface);IFC2X32.IfcElementarySurface=IfcElementarySurface;var IfcEllipseProfileDef=/*#__PURE__*/function(_IfcParameterizedProf10){_inherits(IfcEllipseProfileDef,_IfcParameterizedProf10);var _super483=_createSuper(IfcEllipseProfileDef);function IfcEllipseProfileDef(expressID,ProfileType,ProfileName,Position,SemiAxis1,SemiAxis2){var _this480;_classCallCheck(this,IfcEllipseProfileDef);_this480=_super483.call(this,expressID,ProfileType,ProfileName,Position);_this480.ProfileType=ProfileType;_this480.ProfileName=ProfileName;_this480.Position=Position;_this480.SemiAxis1=SemiAxis1;_this480.SemiAxis2=SemiAxis2;_this480.type=2835456948;return _this480;}return _createClass(IfcEllipseProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcEllipseProfileDef=IfcEllipseProfileDef;var IfcEnergyProperties=/*#__PURE__*/function(_IfcPropertySetDefini11){_inherits(IfcEnergyProperties,_IfcPropertySetDefini11);var _super484=_createSuper(IfcEnergyProperties);function IfcEnergyProperties(expressID,GlobalId,OwnerHistory,Name,Description,EnergySequence,UserDefinedEnergySequence){var _this481;_classCallCheck(this,IfcEnergyProperties);_this481=_super484.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this481.GlobalId=GlobalId;_this481.OwnerHistory=OwnerHistory;_this481.Name=Name;_this481.Description=Description;_this481.EnergySequence=EnergySequence;_this481.UserDefinedEnergySequence=UserDefinedEnergySequence;_this481.type=80994333;return _this481;}return _createClass(IfcEnergyProperties);}(IfcPropertySetDefinition);IFC2X32.IfcEnergyProperties=IfcEnergyProperties;var IfcExtrudedAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid){_inherits(IfcExtrudedAreaSolid,_IfcSweptAreaSolid);var _super485=_createSuper(IfcExtrudedAreaSolid);function IfcExtrudedAreaSolid(expressID,SweptArea,Position,ExtrudedDirection,Depth){var _this482;_classCallCheck(this,IfcExtrudedAreaSolid);_this482=_super485.call(this,expressID,SweptArea,Position);_this482.SweptArea=SweptArea;_this482.Position=Position;_this482.ExtrudedDirection=ExtrudedDirection;_this482.Depth=Depth;_this482.type=477187591;return _this482;}return _createClass(IfcExtrudedAreaSolid);}(IfcSweptAreaSolid);IFC2X32.IfcExtrudedAreaSolid=IfcExtrudedAreaSolid;var IfcFaceBasedSurfaceModel=/*#__PURE__*/function(_IfcGeometricRepresen26){_inherits(IfcFaceBasedSurfaceModel,_IfcGeometricRepresen26);var _super486=_createSuper(IfcFaceBasedSurfaceModel);function IfcFaceBasedSurfaceModel(expressID,FbsmFaces){var _this483;_classCallCheck(this,IfcFaceBasedSurfaceModel);_this483=_super486.call(this,expressID);_this483.FbsmFaces=FbsmFaces;_this483.type=2047409740;return _this483;}return _createClass(IfcFaceBasedSurfaceModel);}(IfcGeometricRepresentationItem);IFC2X32.IfcFaceBasedSurfaceModel=IfcFaceBasedSurfaceModel;var IfcFillAreaStyleHatching=/*#__PURE__*/function(_IfcGeometricRepresen27){_inherits(IfcFillAreaStyleHatching,_IfcGeometricRepresen27);var _super487=_createSuper(IfcFillAreaStyleHatching);function IfcFillAreaStyleHatching(expressID,HatchLineAppearance,StartOfNextHatchLine,PointOfReferenceHatchLine,PatternStart,HatchLineAngle){var _this484;_classCallCheck(this,IfcFillAreaStyleHatching);_this484=_super487.call(this,expressID);_this484.HatchLineAppearance=HatchLineAppearance;_this484.StartOfNextHatchLine=StartOfNextHatchLine;_this484.PointOfReferenceHatchLine=PointOfReferenceHatchLine;_this484.PatternStart=PatternStart;_this484.HatchLineAngle=HatchLineAngle;_this484.type=374418227;return _this484;}return _createClass(IfcFillAreaStyleHatching);}(IfcGeometricRepresentationItem);IFC2X32.IfcFillAreaStyleHatching=IfcFillAreaStyleHatching;var IfcFillAreaStyleTileSymbolWithStyle=/*#__PURE__*/function(_IfcGeometricRepresen28){_inherits(IfcFillAreaStyleTileSymbolWithStyle,_IfcGeometricRepresen28);var _super488=_createSuper(IfcFillAreaStyleTileSymbolWithStyle);function IfcFillAreaStyleTileSymbolWithStyle(expressID,Symbol2){var _this485;_classCallCheck(this,IfcFillAreaStyleTileSymbolWithStyle);_this485=_super488.call(this,expressID);_this485.Symbol=Symbol2;_this485.type=4203026998;return _this485;}return _createClass(IfcFillAreaStyleTileSymbolWithStyle);}(IfcGeometricRepresentationItem);IFC2X32.IfcFillAreaStyleTileSymbolWithStyle=IfcFillAreaStyleTileSymbolWithStyle;var IfcFillAreaStyleTiles=/*#__PURE__*/function(_IfcGeometricRepresen29){_inherits(IfcFillAreaStyleTiles,_IfcGeometricRepresen29);var _super489=_createSuper(IfcFillAreaStyleTiles);function IfcFillAreaStyleTiles(expressID,TilingPattern,Tiles,TilingScale){var _this486;_classCallCheck(this,IfcFillAreaStyleTiles);_this486=_super489.call(this,expressID);_this486.TilingPattern=TilingPattern;_this486.Tiles=Tiles;_this486.TilingScale=TilingScale;_this486.type=315944413;return _this486;}return _createClass(IfcFillAreaStyleTiles);}(IfcGeometricRepresentationItem);IFC2X32.IfcFillAreaStyleTiles=IfcFillAreaStyleTiles;var IfcFluidFlowProperties=/*#__PURE__*/function(_IfcPropertySetDefini12){_inherits(IfcFluidFlowProperties,_IfcPropertySetDefini12);var _super490=_createSuper(IfcFluidFlowProperties);function IfcFluidFlowProperties(expressID,GlobalId,OwnerHistory,Name,Description,PropertySource,FlowConditionTimeSeries,VelocityTimeSeries,FlowrateTimeSeries,Fluid,PressureTimeSeries,UserDefinedPropertySource,TemperatureSingleValue,WetBulbTemperatureSingleValue,WetBulbTemperatureTimeSeries,TemperatureTimeSeries,FlowrateSingleValue,FlowConditionSingleValue,VelocitySingleValue,PressureSingleValue){var _this487;_classCallCheck(this,IfcFluidFlowProperties);_this487=_super490.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this487.GlobalId=GlobalId;_this487.OwnerHistory=OwnerHistory;_this487.Name=Name;_this487.Description=Description;_this487.PropertySource=PropertySource;_this487.FlowConditionTimeSeries=FlowConditionTimeSeries;_this487.VelocityTimeSeries=VelocityTimeSeries;_this487.FlowrateTimeSeries=FlowrateTimeSeries;_this487.Fluid=Fluid;_this487.PressureTimeSeries=PressureTimeSeries;_this487.UserDefinedPropertySource=UserDefinedPropertySource;_this487.TemperatureSingleValue=TemperatureSingleValue;_this487.WetBulbTemperatureSingleValue=WetBulbTemperatureSingleValue;_this487.WetBulbTemperatureTimeSeries=WetBulbTemperatureTimeSeries;_this487.TemperatureTimeSeries=TemperatureTimeSeries;_this487.FlowrateSingleValue=FlowrateSingleValue;_this487.FlowConditionSingleValue=FlowConditionSingleValue;_this487.VelocitySingleValue=VelocitySingleValue;_this487.PressureSingleValue=PressureSingleValue;_this487.type=3455213021;return _this487;}return _createClass(IfcFluidFlowProperties);}(IfcPropertySetDefinition);IFC2X32.IfcFluidFlowProperties=IfcFluidFlowProperties;var IfcFurnishingElementType=/*#__PURE__*/function(_IfcElementType){_inherits(IfcFurnishingElementType,_IfcElementType);var _super491=_createSuper(IfcFurnishingElementType);function IfcFurnishingElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this488;_classCallCheck(this,IfcFurnishingElementType);_this488=_super491.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this488.GlobalId=GlobalId;_this488.OwnerHistory=OwnerHistory;_this488.Name=Name;_this488.Description=Description;_this488.ApplicableOccurrence=ApplicableOccurrence;_this488.HasPropertySets=HasPropertySets;_this488.RepresentationMaps=RepresentationMaps;_this488.Tag=Tag;_this488.ElementType=ElementType;_this488.type=4238390223;return _this488;}return _createClass(IfcFurnishingElementType);}(IfcElementType);IFC2X32.IfcFurnishingElementType=IfcFurnishingElementType;var IfcFurnitureType=/*#__PURE__*/function(_IfcFurnishingElement){_inherits(IfcFurnitureType,_IfcFurnishingElement);var _super492=_createSuper(IfcFurnitureType);function IfcFurnitureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,AssemblyPlace){var _this489;_classCallCheck(this,IfcFurnitureType);_this489=_super492.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this489.GlobalId=GlobalId;_this489.OwnerHistory=OwnerHistory;_this489.Name=Name;_this489.Description=Description;_this489.ApplicableOccurrence=ApplicableOccurrence;_this489.HasPropertySets=HasPropertySets;_this489.RepresentationMaps=RepresentationMaps;_this489.Tag=Tag;_this489.ElementType=ElementType;_this489.AssemblyPlace=AssemblyPlace;_this489.type=1268542332;return _this489;}return _createClass(IfcFurnitureType);}(IfcFurnishingElementType);IFC2X32.IfcFurnitureType=IfcFurnitureType;var IfcGeometricCurveSet=/*#__PURE__*/function(_IfcGeometricSet){_inherits(IfcGeometricCurveSet,_IfcGeometricSet);var _super493=_createSuper(IfcGeometricCurveSet);function IfcGeometricCurveSet(expressID,Elements){var _this490;_classCallCheck(this,IfcGeometricCurveSet);_this490=_super493.call(this,expressID,Elements);_this490.Elements=Elements;_this490.type=987898635;return _this490;}return _createClass(IfcGeometricCurveSet);}(IfcGeometricSet);IFC2X32.IfcGeometricCurveSet=IfcGeometricCurveSet;var IfcIShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf11){_inherits(IfcIShapeProfileDef,_IfcParameterizedProf11);var _super494=_createSuper(IfcIShapeProfileDef);function IfcIShapeProfileDef(expressID,ProfileType,ProfileName,Position,OverallWidth,OverallDepth,WebThickness,FlangeThickness,FilletRadius){var _this491;_classCallCheck(this,IfcIShapeProfileDef);_this491=_super494.call(this,expressID,ProfileType,ProfileName,Position);_this491.ProfileType=ProfileType;_this491.ProfileName=ProfileName;_this491.Position=Position;_this491.OverallWidth=OverallWidth;_this491.OverallDepth=OverallDepth;_this491.WebThickness=WebThickness;_this491.FlangeThickness=FlangeThickness;_this491.FilletRadius=FilletRadius;_this491.type=1484403080;return _this491;}return _createClass(IfcIShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcIShapeProfileDef=IfcIShapeProfileDef;var IfcLShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf12){_inherits(IfcLShapeProfileDef,_IfcParameterizedProf12);var _super495=_createSuper(IfcLShapeProfileDef);function IfcLShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,Width,Thickness,FilletRadius,EdgeRadius,LegSlope,CentreOfGravityInX,CentreOfGravityInY){var _this492;_classCallCheck(this,IfcLShapeProfileDef);_this492=_super495.call(this,expressID,ProfileType,ProfileName,Position);_this492.ProfileType=ProfileType;_this492.ProfileName=ProfileName;_this492.Position=Position;_this492.Depth=Depth;_this492.Width=Width;_this492.Thickness=Thickness;_this492.FilletRadius=FilletRadius;_this492.EdgeRadius=EdgeRadius;_this492.LegSlope=LegSlope;_this492.CentreOfGravityInX=CentreOfGravityInX;_this492.CentreOfGravityInY=CentreOfGravityInY;_this492.type=572779678;return _this492;}return _createClass(IfcLShapeProfileDef);}(IfcParameterizedProfileDef);IFC2X32.IfcLShapeProfileDef=IfcLShapeProfileDef;var IfcLine=/*#__PURE__*/function(_IfcCurve){_inherits(IfcLine,_IfcCurve);var _super496=_createSuper(IfcLine);function IfcLine(expressID,Pnt,Dir){var _this493;_classCallCheck(this,IfcLine);_this493=_super496.call(this,expressID);_this493.Pnt=Pnt;_this493.Dir=Dir;_this493.type=1281925730;return _this493;}return _createClass(IfcLine);}(IfcCurve);IFC2X32.IfcLine=IfcLine;var IfcManifoldSolidBrep=/*#__PURE__*/function(_IfcSolidModel4){_inherits(IfcManifoldSolidBrep,_IfcSolidModel4);var _super497=_createSuper(IfcManifoldSolidBrep);function IfcManifoldSolidBrep(expressID,Outer){var _this494;_classCallCheck(this,IfcManifoldSolidBrep);_this494=_super497.call(this,expressID);_this494.Outer=Outer;_this494.type=1425443689;return _this494;}return _createClass(IfcManifoldSolidBrep);}(IfcSolidModel);IFC2X32.IfcManifoldSolidBrep=IfcManifoldSolidBrep;var IfcObject=/*#__PURE__*/function(_IfcObjectDefinition2){_inherits(IfcObject,_IfcObjectDefinition2);var _super498=_createSuper(IfcObject);function IfcObject(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this495;_classCallCheck(this,IfcObject);_this495=_super498.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this495.GlobalId=GlobalId;_this495.OwnerHistory=OwnerHistory;_this495.Name=Name;_this495.Description=Description;_this495.ObjectType=ObjectType;_this495.type=3888040117;return _this495;}return _createClass(IfcObject);}(IfcObjectDefinition);IFC2X32.IfcObject=IfcObject;var IfcOffsetCurve2D=/*#__PURE__*/function(_IfcCurve2){_inherits(IfcOffsetCurve2D,_IfcCurve2);var _super499=_createSuper(IfcOffsetCurve2D);function IfcOffsetCurve2D(expressID,BasisCurve,Distance,SelfIntersect){var _this496;_classCallCheck(this,IfcOffsetCurve2D);_this496=_super499.call(this,expressID);_this496.BasisCurve=BasisCurve;_this496.Distance=Distance;_this496.SelfIntersect=SelfIntersect;_this496.type=3388369263;return _this496;}return _createClass(IfcOffsetCurve2D);}(IfcCurve);IFC2X32.IfcOffsetCurve2D=IfcOffsetCurve2D;var IfcOffsetCurve3D=/*#__PURE__*/function(_IfcCurve3){_inherits(IfcOffsetCurve3D,_IfcCurve3);var _super500=_createSuper(IfcOffsetCurve3D);function IfcOffsetCurve3D(expressID,BasisCurve,Distance,SelfIntersect,RefDirection){var _this497;_classCallCheck(this,IfcOffsetCurve3D);_this497=_super500.call(this,expressID);_this497.BasisCurve=BasisCurve;_this497.Distance=Distance;_this497.SelfIntersect=SelfIntersect;_this497.RefDirection=RefDirection;_this497.type=3505215534;return _this497;}return _createClass(IfcOffsetCurve3D);}(IfcCurve);IFC2X32.IfcOffsetCurve3D=IfcOffsetCurve3D;var IfcPermeableCoveringProperties=/*#__PURE__*/function(_IfcPropertySetDefini13){_inherits(IfcPermeableCoveringProperties,_IfcPropertySetDefini13);var _super501=_createSuper(IfcPermeableCoveringProperties);function IfcPermeableCoveringProperties(expressID,GlobalId,OwnerHistory,Name,Description,OperationType,PanelPosition,FrameDepth,FrameThickness,ShapeAspectStyle){var _this498;_classCallCheck(this,IfcPermeableCoveringProperties);_this498=_super501.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this498.GlobalId=GlobalId;_this498.OwnerHistory=OwnerHistory;_this498.Name=Name;_this498.Description=Description;_this498.OperationType=OperationType;_this498.PanelPosition=PanelPosition;_this498.FrameDepth=FrameDepth;_this498.FrameThickness=FrameThickness;_this498.ShapeAspectStyle=ShapeAspectStyle;_this498.type=3566463478;return _this498;}return _createClass(IfcPermeableCoveringProperties);}(IfcPropertySetDefinition);IFC2X32.IfcPermeableCoveringProperties=IfcPermeableCoveringProperties;var IfcPlanarBox=/*#__PURE__*/function(_IfcPlanarExtent){_inherits(IfcPlanarBox,_IfcPlanarExtent);var _super502=_createSuper(IfcPlanarBox);function IfcPlanarBox(expressID,SizeInX,SizeInY,Placement){var _this499;_classCallCheck(this,IfcPlanarBox);_this499=_super502.call(this,expressID,SizeInX,SizeInY);_this499.SizeInX=SizeInX;_this499.SizeInY=SizeInY;_this499.Placement=Placement;_this499.type=603570806;return _this499;}return _createClass(IfcPlanarBox);}(IfcPlanarExtent);IFC2X32.IfcPlanarBox=IfcPlanarBox;var IfcPlane=/*#__PURE__*/function(_IfcElementarySurface){_inherits(IfcPlane,_IfcElementarySurface);var _super503=_createSuper(IfcPlane);function IfcPlane(expressID,Position){var _this500;_classCallCheck(this,IfcPlane);_this500=_super503.call(this,expressID,Position);_this500.Position=Position;_this500.type=220341763;return _this500;}return _createClass(IfcPlane);}(IfcElementarySurface);IFC2X32.IfcPlane=IfcPlane;var IfcProcess=/*#__PURE__*/function(_IfcObject){_inherits(IfcProcess,_IfcObject);var _super504=_createSuper(IfcProcess);function IfcProcess(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this501;_classCallCheck(this,IfcProcess);_this501=_super504.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this501.GlobalId=GlobalId;_this501.OwnerHistory=OwnerHistory;_this501.Name=Name;_this501.Description=Description;_this501.ObjectType=ObjectType;_this501.type=2945172077;return _this501;}return _createClass(IfcProcess);}(IfcObject);IFC2X32.IfcProcess=IfcProcess;var IfcProduct=/*#__PURE__*/function(_IfcObject2){_inherits(IfcProduct,_IfcObject2);var _super505=_createSuper(IfcProduct);function IfcProduct(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this502;_classCallCheck(this,IfcProduct);_this502=_super505.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this502.GlobalId=GlobalId;_this502.OwnerHistory=OwnerHistory;_this502.Name=Name;_this502.Description=Description;_this502.ObjectType=ObjectType;_this502.ObjectPlacement=ObjectPlacement;_this502.Representation=Representation;_this502.type=4208778838;return _this502;}return _createClass(IfcProduct);}(IfcObject);IFC2X32.IfcProduct=IfcProduct;var IfcProject=/*#__PURE__*/function(_IfcObject3){_inherits(IfcProject,_IfcObject3);var _super506=_createSuper(IfcProject);function IfcProject(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext){var _this503;_classCallCheck(this,IfcProject);_this503=_super506.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this503.GlobalId=GlobalId;_this503.OwnerHistory=OwnerHistory;_this503.Name=Name;_this503.Description=Description;_this503.ObjectType=ObjectType;_this503.LongName=LongName;_this503.Phase=Phase;_this503.RepresentationContexts=RepresentationContexts;_this503.UnitsInContext=UnitsInContext;_this503.type=103090709;return _this503;}return _createClass(IfcProject);}(IfcObject);IFC2X32.IfcProject=IfcProject;var IfcProjectionCurve=/*#__PURE__*/function(_IfcAnnotationCurveOc2){_inherits(IfcProjectionCurve,_IfcAnnotationCurveOc2);var _super507=_createSuper(IfcProjectionCurve);function IfcProjectionCurve(expressID,Item,Styles,Name){var _this504;_classCallCheck(this,IfcProjectionCurve);_this504=_super507.call(this,expressID,Item,Styles,Name);_this504.Item=Item;_this504.Styles=Styles;_this504.Name=Name;_this504.type=4194566429;return _this504;}return _createClass(IfcProjectionCurve);}(IfcAnnotationCurveOccurrence);IFC2X32.IfcProjectionCurve=IfcProjectionCurve;var IfcPropertySet=/*#__PURE__*/function(_IfcPropertySetDefini14){_inherits(IfcPropertySet,_IfcPropertySetDefini14);var _super508=_createSuper(IfcPropertySet);function IfcPropertySet(expressID,GlobalId,OwnerHistory,Name,Description,HasProperties){var _this505;_classCallCheck(this,IfcPropertySet);_this505=_super508.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this505.GlobalId=GlobalId;_this505.OwnerHistory=OwnerHistory;_this505.Name=Name;_this505.Description=Description;_this505.HasProperties=HasProperties;_this505.type=1451395588;return _this505;}return _createClass(IfcPropertySet);}(IfcPropertySetDefinition);IFC2X32.IfcPropertySet=IfcPropertySet;var IfcProxy=/*#__PURE__*/function(_IfcProduct){_inherits(IfcProxy,_IfcProduct);var _super509=_createSuper(IfcProxy);function IfcProxy(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,ProxyType,Tag){var _this506;_classCallCheck(this,IfcProxy);_this506=_super509.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this506.GlobalId=GlobalId;_this506.OwnerHistory=OwnerHistory;_this506.Name=Name;_this506.Description=Description;_this506.ObjectType=ObjectType;_this506.ObjectPlacement=ObjectPlacement;_this506.Representation=Representation;_this506.ProxyType=ProxyType;_this506.Tag=Tag;_this506.type=3219374653;return _this506;}return _createClass(IfcProxy);}(IfcProduct);IFC2X32.IfcProxy=IfcProxy;var IfcRectangleHollowProfileDef=/*#__PURE__*/function(_IfcRectangleProfileD2){_inherits(IfcRectangleHollowProfileDef,_IfcRectangleProfileD2);var _super510=_createSuper(IfcRectangleHollowProfileDef);function IfcRectangleHollowProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim,WallThickness,InnerFilletRadius,OuterFilletRadius){var _this507;_classCallCheck(this,IfcRectangleHollowProfileDef);_this507=_super510.call(this,expressID,ProfileType,ProfileName,Position,XDim,YDim);_this507.ProfileType=ProfileType;_this507.ProfileName=ProfileName;_this507.Position=Position;_this507.XDim=XDim;_this507.YDim=YDim;_this507.WallThickness=WallThickness;_this507.InnerFilletRadius=InnerFilletRadius;_this507.OuterFilletRadius=OuterFilletRadius;_this507.type=2770003689;return _this507;}return _createClass(IfcRectangleHollowProfileDef);}(IfcRectangleProfileDef);IFC2X32.IfcRectangleHollowProfileDef=IfcRectangleHollowProfileDef;var IfcRectangularPyramid=/*#__PURE__*/function(_IfcCsgPrimitive3D){_inherits(IfcRectangularPyramid,_IfcCsgPrimitive3D);var _super511=_createSuper(IfcRectangularPyramid);function IfcRectangularPyramid(expressID,Position,XLength,YLength,Height){var _this508;_classCallCheck(this,IfcRectangularPyramid);_this508=_super511.call(this,expressID,Position);_this508.Position=Position;_this508.XLength=XLength;_this508.YLength=YLength;_this508.Height=Height;_this508.type=2798486643;return _this508;}return _createClass(IfcRectangularPyramid);}(IfcCsgPrimitive3D);IFC2X32.IfcRectangularPyramid=IfcRectangularPyramid;var IfcRectangularTrimmedSurface=/*#__PURE__*/function(_IfcBoundedSurface2){_inherits(IfcRectangularTrimmedSurface,_IfcBoundedSurface2);var _super512=_createSuper(IfcRectangularTrimmedSurface);function IfcRectangularTrimmedSurface(expressID,BasisSurface,U1,V1,U2,V2,Usense,Vsense){var _this509;_classCallCheck(this,IfcRectangularTrimmedSurface);_this509=_super512.call(this,expressID);_this509.BasisSurface=BasisSurface;_this509.U1=U1;_this509.V1=V1;_this509.U2=U2;_this509.V2=V2;_this509.Usense=Usense;_this509.Vsense=Vsense;_this509.type=3454111270;return _this509;}return _createClass(IfcRectangularTrimmedSurface);}(IfcBoundedSurface);IFC2X32.IfcRectangularTrimmedSurface=IfcRectangularTrimmedSurface;var IfcRelAssigns=/*#__PURE__*/function(_IfcRelationship){_inherits(IfcRelAssigns,_IfcRelationship);var _super513=_createSuper(IfcRelAssigns);function IfcRelAssigns(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType){var _this510;_classCallCheck(this,IfcRelAssigns);_this510=_super513.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this510.GlobalId=GlobalId;_this510.OwnerHistory=OwnerHistory;_this510.Name=Name;_this510.Description=Description;_this510.RelatedObjects=RelatedObjects;_this510.RelatedObjectsType=RelatedObjectsType;_this510.type=3939117080;return _this510;}return _createClass(IfcRelAssigns);}(IfcRelationship);IFC2X32.IfcRelAssigns=IfcRelAssigns;var IfcRelAssignsToActor=/*#__PURE__*/function(_IfcRelAssigns){_inherits(IfcRelAssignsToActor,_IfcRelAssigns);var _super514=_createSuper(IfcRelAssignsToActor);function IfcRelAssignsToActor(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingActor,ActingRole){var _this511;_classCallCheck(this,IfcRelAssignsToActor);_this511=_super514.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this511.GlobalId=GlobalId;_this511.OwnerHistory=OwnerHistory;_this511.Name=Name;_this511.Description=Description;_this511.RelatedObjects=RelatedObjects;_this511.RelatedObjectsType=RelatedObjectsType;_this511.RelatingActor=RelatingActor;_this511.ActingRole=ActingRole;_this511.type=1683148259;return _this511;}return _createClass(IfcRelAssignsToActor);}(IfcRelAssigns);IFC2X32.IfcRelAssignsToActor=IfcRelAssignsToActor;var IfcRelAssignsToControl=/*#__PURE__*/function(_IfcRelAssigns2){_inherits(IfcRelAssignsToControl,_IfcRelAssigns2);var _super515=_createSuper(IfcRelAssignsToControl);function IfcRelAssignsToControl(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl){var _this512;_classCallCheck(this,IfcRelAssignsToControl);_this512=_super515.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this512.GlobalId=GlobalId;_this512.OwnerHistory=OwnerHistory;_this512.Name=Name;_this512.Description=Description;_this512.RelatedObjects=RelatedObjects;_this512.RelatedObjectsType=RelatedObjectsType;_this512.RelatingControl=RelatingControl;_this512.type=2495723537;return _this512;}return _createClass(IfcRelAssignsToControl);}(IfcRelAssigns);IFC2X32.IfcRelAssignsToControl=IfcRelAssignsToControl;var IfcRelAssignsToGroup=/*#__PURE__*/function(_IfcRelAssigns3){_inherits(IfcRelAssignsToGroup,_IfcRelAssigns3);var _super516=_createSuper(IfcRelAssignsToGroup);function IfcRelAssignsToGroup(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingGroup){var _this513;_classCallCheck(this,IfcRelAssignsToGroup);_this513=_super516.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this513.GlobalId=GlobalId;_this513.OwnerHistory=OwnerHistory;_this513.Name=Name;_this513.Description=Description;_this513.RelatedObjects=RelatedObjects;_this513.RelatedObjectsType=RelatedObjectsType;_this513.RelatingGroup=RelatingGroup;_this513.type=1307041759;return _this513;}return _createClass(IfcRelAssignsToGroup);}(IfcRelAssigns);IFC2X32.IfcRelAssignsToGroup=IfcRelAssignsToGroup;var IfcRelAssignsToProcess=/*#__PURE__*/function(_IfcRelAssigns4){_inherits(IfcRelAssignsToProcess,_IfcRelAssigns4);var _super517=_createSuper(IfcRelAssignsToProcess);function IfcRelAssignsToProcess(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingProcess,QuantityInProcess){var _this514;_classCallCheck(this,IfcRelAssignsToProcess);_this514=_super517.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this514.GlobalId=GlobalId;_this514.OwnerHistory=OwnerHistory;_this514.Name=Name;_this514.Description=Description;_this514.RelatedObjects=RelatedObjects;_this514.RelatedObjectsType=RelatedObjectsType;_this514.RelatingProcess=RelatingProcess;_this514.QuantityInProcess=QuantityInProcess;_this514.type=4278684876;return _this514;}return _createClass(IfcRelAssignsToProcess);}(IfcRelAssigns);IFC2X32.IfcRelAssignsToProcess=IfcRelAssignsToProcess;var IfcRelAssignsToProduct=/*#__PURE__*/function(_IfcRelAssigns5){_inherits(IfcRelAssignsToProduct,_IfcRelAssigns5);var _super518=_createSuper(IfcRelAssignsToProduct);function IfcRelAssignsToProduct(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingProduct){var _this515;_classCallCheck(this,IfcRelAssignsToProduct);_this515=_super518.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this515.GlobalId=GlobalId;_this515.OwnerHistory=OwnerHistory;_this515.Name=Name;_this515.Description=Description;_this515.RelatedObjects=RelatedObjects;_this515.RelatedObjectsType=RelatedObjectsType;_this515.RelatingProduct=RelatingProduct;_this515.type=2857406711;return _this515;}return _createClass(IfcRelAssignsToProduct);}(IfcRelAssigns);IFC2X32.IfcRelAssignsToProduct=IfcRelAssignsToProduct;var IfcRelAssignsToProjectOrder=/*#__PURE__*/function(_IfcRelAssignsToContr){_inherits(IfcRelAssignsToProjectOrder,_IfcRelAssignsToContr);var _super519=_createSuper(IfcRelAssignsToProjectOrder);function IfcRelAssignsToProjectOrder(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl){var _this516;_classCallCheck(this,IfcRelAssignsToProjectOrder);_this516=_super519.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl);_this516.GlobalId=GlobalId;_this516.OwnerHistory=OwnerHistory;_this516.Name=Name;_this516.Description=Description;_this516.RelatedObjects=RelatedObjects;_this516.RelatedObjectsType=RelatedObjectsType;_this516.RelatingControl=RelatingControl;_this516.type=3372526763;return _this516;}return _createClass(IfcRelAssignsToProjectOrder);}(IfcRelAssignsToControl);IFC2X32.IfcRelAssignsToProjectOrder=IfcRelAssignsToProjectOrder;var IfcRelAssignsToResource=/*#__PURE__*/function(_IfcRelAssigns6){_inherits(IfcRelAssignsToResource,_IfcRelAssigns6);var _super520=_createSuper(IfcRelAssignsToResource);function IfcRelAssignsToResource(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingResource){var _this517;_classCallCheck(this,IfcRelAssignsToResource);_this517=_super520.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this517.GlobalId=GlobalId;_this517.OwnerHistory=OwnerHistory;_this517.Name=Name;_this517.Description=Description;_this517.RelatedObjects=RelatedObjects;_this517.RelatedObjectsType=RelatedObjectsType;_this517.RelatingResource=RelatingResource;_this517.type=205026976;return _this517;}return _createClass(IfcRelAssignsToResource);}(IfcRelAssigns);IFC2X32.IfcRelAssignsToResource=IfcRelAssignsToResource;var IfcRelAssociates=/*#__PURE__*/function(_IfcRelationship2){_inherits(IfcRelAssociates,_IfcRelationship2);var _super521=_createSuper(IfcRelAssociates);function IfcRelAssociates(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects){var _this518;_classCallCheck(this,IfcRelAssociates);_this518=_super521.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this518.GlobalId=GlobalId;_this518.OwnerHistory=OwnerHistory;_this518.Name=Name;_this518.Description=Description;_this518.RelatedObjects=RelatedObjects;_this518.type=1865459582;return _this518;}return _createClass(IfcRelAssociates);}(IfcRelationship);IFC2X32.IfcRelAssociates=IfcRelAssociates;var IfcRelAssociatesAppliedValue=/*#__PURE__*/function(_IfcRelAssociates){_inherits(IfcRelAssociatesAppliedValue,_IfcRelAssociates);var _super522=_createSuper(IfcRelAssociatesAppliedValue);function IfcRelAssociatesAppliedValue(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingAppliedValue){var _this519;_classCallCheck(this,IfcRelAssociatesAppliedValue);_this519=_super522.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this519.GlobalId=GlobalId;_this519.OwnerHistory=OwnerHistory;_this519.Name=Name;_this519.Description=Description;_this519.RelatedObjects=RelatedObjects;_this519.RelatingAppliedValue=RelatingAppliedValue;_this519.type=1327628568;return _this519;}return _createClass(IfcRelAssociatesAppliedValue);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesAppliedValue=IfcRelAssociatesAppliedValue;var IfcRelAssociatesApproval=/*#__PURE__*/function(_IfcRelAssociates2){_inherits(IfcRelAssociatesApproval,_IfcRelAssociates2);var _super523=_createSuper(IfcRelAssociatesApproval);function IfcRelAssociatesApproval(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingApproval){var _this520;_classCallCheck(this,IfcRelAssociatesApproval);_this520=_super523.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this520.GlobalId=GlobalId;_this520.OwnerHistory=OwnerHistory;_this520.Name=Name;_this520.Description=Description;_this520.RelatedObjects=RelatedObjects;_this520.RelatingApproval=RelatingApproval;_this520.type=4095574036;return _this520;}return _createClass(IfcRelAssociatesApproval);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesApproval=IfcRelAssociatesApproval;var IfcRelAssociatesClassification=/*#__PURE__*/function(_IfcRelAssociates3){_inherits(IfcRelAssociatesClassification,_IfcRelAssociates3);var _super524=_createSuper(IfcRelAssociatesClassification);function IfcRelAssociatesClassification(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingClassification){var _this521;_classCallCheck(this,IfcRelAssociatesClassification);_this521=_super524.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this521.GlobalId=GlobalId;_this521.OwnerHistory=OwnerHistory;_this521.Name=Name;_this521.Description=Description;_this521.RelatedObjects=RelatedObjects;_this521.RelatingClassification=RelatingClassification;_this521.type=919958153;return _this521;}return _createClass(IfcRelAssociatesClassification);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesClassification=IfcRelAssociatesClassification;var IfcRelAssociatesConstraint=/*#__PURE__*/function(_IfcRelAssociates4){_inherits(IfcRelAssociatesConstraint,_IfcRelAssociates4);var _super525=_createSuper(IfcRelAssociatesConstraint);function IfcRelAssociatesConstraint(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,Intent,RelatingConstraint){var _this522;_classCallCheck(this,IfcRelAssociatesConstraint);_this522=_super525.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this522.GlobalId=GlobalId;_this522.OwnerHistory=OwnerHistory;_this522.Name=Name;_this522.Description=Description;_this522.RelatedObjects=RelatedObjects;_this522.Intent=Intent;_this522.RelatingConstraint=RelatingConstraint;_this522.type=2728634034;return _this522;}return _createClass(IfcRelAssociatesConstraint);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesConstraint=IfcRelAssociatesConstraint;var IfcRelAssociatesDocument=/*#__PURE__*/function(_IfcRelAssociates5){_inherits(IfcRelAssociatesDocument,_IfcRelAssociates5);var _super526=_createSuper(IfcRelAssociatesDocument);function IfcRelAssociatesDocument(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingDocument){var _this523;_classCallCheck(this,IfcRelAssociatesDocument);_this523=_super526.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this523.GlobalId=GlobalId;_this523.OwnerHistory=OwnerHistory;_this523.Name=Name;_this523.Description=Description;_this523.RelatedObjects=RelatedObjects;_this523.RelatingDocument=RelatingDocument;_this523.type=982818633;return _this523;}return _createClass(IfcRelAssociatesDocument);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesDocument=IfcRelAssociatesDocument;var IfcRelAssociatesLibrary=/*#__PURE__*/function(_IfcRelAssociates6){_inherits(IfcRelAssociatesLibrary,_IfcRelAssociates6);var _super527=_createSuper(IfcRelAssociatesLibrary);function IfcRelAssociatesLibrary(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingLibrary){var _this524;_classCallCheck(this,IfcRelAssociatesLibrary);_this524=_super527.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this524.GlobalId=GlobalId;_this524.OwnerHistory=OwnerHistory;_this524.Name=Name;_this524.Description=Description;_this524.RelatedObjects=RelatedObjects;_this524.RelatingLibrary=RelatingLibrary;_this524.type=3840914261;return _this524;}return _createClass(IfcRelAssociatesLibrary);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesLibrary=IfcRelAssociatesLibrary;var IfcRelAssociatesMaterial=/*#__PURE__*/function(_IfcRelAssociates7){_inherits(IfcRelAssociatesMaterial,_IfcRelAssociates7);var _super528=_createSuper(IfcRelAssociatesMaterial);function IfcRelAssociatesMaterial(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingMaterial){var _this525;_classCallCheck(this,IfcRelAssociatesMaterial);_this525=_super528.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this525.GlobalId=GlobalId;_this525.OwnerHistory=OwnerHistory;_this525.Name=Name;_this525.Description=Description;_this525.RelatedObjects=RelatedObjects;_this525.RelatingMaterial=RelatingMaterial;_this525.type=2655215786;return _this525;}return _createClass(IfcRelAssociatesMaterial);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesMaterial=IfcRelAssociatesMaterial;var IfcRelAssociatesProfileProperties=/*#__PURE__*/function(_IfcRelAssociates8){_inherits(IfcRelAssociatesProfileProperties,_IfcRelAssociates8);var _super529=_createSuper(IfcRelAssociatesProfileProperties);function IfcRelAssociatesProfileProperties(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingProfileProperties,ProfileSectionLocation,ProfileOrientation){var _this526;_classCallCheck(this,IfcRelAssociatesProfileProperties);_this526=_super529.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this526.GlobalId=GlobalId;_this526.OwnerHistory=OwnerHistory;_this526.Name=Name;_this526.Description=Description;_this526.RelatedObjects=RelatedObjects;_this526.RelatingProfileProperties=RelatingProfileProperties;_this526.ProfileSectionLocation=ProfileSectionLocation;_this526.ProfileOrientation=ProfileOrientation;_this526.type=2851387026;return _this526;}return _createClass(IfcRelAssociatesProfileProperties);}(IfcRelAssociates);IFC2X32.IfcRelAssociatesProfileProperties=IfcRelAssociatesProfileProperties;var IfcRelConnects=/*#__PURE__*/function(_IfcRelationship3){_inherits(IfcRelConnects,_IfcRelationship3);var _super530=_createSuper(IfcRelConnects);function IfcRelConnects(expressID,GlobalId,OwnerHistory,Name,Description){var _this527;_classCallCheck(this,IfcRelConnects);_this527=_super530.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this527.GlobalId=GlobalId;_this527.OwnerHistory=OwnerHistory;_this527.Name=Name;_this527.Description=Description;_this527.type=826625072;return _this527;}return _createClass(IfcRelConnects);}(IfcRelationship);IFC2X32.IfcRelConnects=IfcRelConnects;var IfcRelConnectsElements=/*#__PURE__*/function(_IfcRelConnects){_inherits(IfcRelConnectsElements,_IfcRelConnects);var _super531=_createSuper(IfcRelConnectsElements);function IfcRelConnectsElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement){var _this528;_classCallCheck(this,IfcRelConnectsElements);_this528=_super531.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this528.GlobalId=GlobalId;_this528.OwnerHistory=OwnerHistory;_this528.Name=Name;_this528.Description=Description;_this528.ConnectionGeometry=ConnectionGeometry;_this528.RelatingElement=RelatingElement;_this528.RelatedElement=RelatedElement;_this528.type=1204542856;return _this528;}return _createClass(IfcRelConnectsElements);}(IfcRelConnects);IFC2X32.IfcRelConnectsElements=IfcRelConnectsElements;var IfcRelConnectsPathElements=/*#__PURE__*/function(_IfcRelConnectsElemen){_inherits(IfcRelConnectsPathElements,_IfcRelConnectsElemen);var _super532=_createSuper(IfcRelConnectsPathElements);function IfcRelConnectsPathElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement,RelatingPriorities,RelatedPriorities,RelatedConnectionType,RelatingConnectionType){var _this529;_classCallCheck(this,IfcRelConnectsPathElements);_this529=_super532.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement);_this529.GlobalId=GlobalId;_this529.OwnerHistory=OwnerHistory;_this529.Name=Name;_this529.Description=Description;_this529.ConnectionGeometry=ConnectionGeometry;_this529.RelatingElement=RelatingElement;_this529.RelatedElement=RelatedElement;_this529.RelatingPriorities=RelatingPriorities;_this529.RelatedPriorities=RelatedPriorities;_this529.RelatedConnectionType=RelatedConnectionType;_this529.RelatingConnectionType=RelatingConnectionType;_this529.type=3945020480;return _this529;}return _createClass(IfcRelConnectsPathElements);}(IfcRelConnectsElements);IFC2X32.IfcRelConnectsPathElements=IfcRelConnectsPathElements;var IfcRelConnectsPortToElement=/*#__PURE__*/function(_IfcRelConnects2){_inherits(IfcRelConnectsPortToElement,_IfcRelConnects2);var _super533=_createSuper(IfcRelConnectsPortToElement);function IfcRelConnectsPortToElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingPort,RelatedElement){var _this530;_classCallCheck(this,IfcRelConnectsPortToElement);_this530=_super533.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this530.GlobalId=GlobalId;_this530.OwnerHistory=OwnerHistory;_this530.Name=Name;_this530.Description=Description;_this530.RelatingPort=RelatingPort;_this530.RelatedElement=RelatedElement;_this530.type=4201705270;return _this530;}return _createClass(IfcRelConnectsPortToElement);}(IfcRelConnects);IFC2X32.IfcRelConnectsPortToElement=IfcRelConnectsPortToElement;var IfcRelConnectsPorts=/*#__PURE__*/function(_IfcRelConnects3){_inherits(IfcRelConnectsPorts,_IfcRelConnects3);var _super534=_createSuper(IfcRelConnectsPorts);function IfcRelConnectsPorts(expressID,GlobalId,OwnerHistory,Name,Description,RelatingPort,RelatedPort,RealizingElement){var _this531;_classCallCheck(this,IfcRelConnectsPorts);_this531=_super534.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this531.GlobalId=GlobalId;_this531.OwnerHistory=OwnerHistory;_this531.Name=Name;_this531.Description=Description;_this531.RelatingPort=RelatingPort;_this531.RelatedPort=RelatedPort;_this531.RealizingElement=RealizingElement;_this531.type=3190031847;return _this531;}return _createClass(IfcRelConnectsPorts);}(IfcRelConnects);IFC2X32.IfcRelConnectsPorts=IfcRelConnectsPorts;var IfcRelConnectsStructuralActivity=/*#__PURE__*/function(_IfcRelConnects4){_inherits(IfcRelConnectsStructuralActivity,_IfcRelConnects4);var _super535=_createSuper(IfcRelConnectsStructuralActivity);function IfcRelConnectsStructuralActivity(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedStructuralActivity){var _this532;_classCallCheck(this,IfcRelConnectsStructuralActivity);_this532=_super535.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this532.GlobalId=GlobalId;_this532.OwnerHistory=OwnerHistory;_this532.Name=Name;_this532.Description=Description;_this532.RelatingElement=RelatingElement;_this532.RelatedStructuralActivity=RelatedStructuralActivity;_this532.type=2127690289;return _this532;}return _createClass(IfcRelConnectsStructuralActivity);}(IfcRelConnects);IFC2X32.IfcRelConnectsStructuralActivity=IfcRelConnectsStructuralActivity;var IfcRelConnectsStructuralElement=/*#__PURE__*/function(_IfcRelConnects5){_inherits(IfcRelConnectsStructuralElement,_IfcRelConnects5);var _super536=_createSuper(IfcRelConnectsStructuralElement);function IfcRelConnectsStructuralElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedStructuralMember){var _this533;_classCallCheck(this,IfcRelConnectsStructuralElement);_this533=_super536.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this533.GlobalId=GlobalId;_this533.OwnerHistory=OwnerHistory;_this533.Name=Name;_this533.Description=Description;_this533.RelatingElement=RelatingElement;_this533.RelatedStructuralMember=RelatedStructuralMember;_this533.type=3912681535;return _this533;}return _createClass(IfcRelConnectsStructuralElement);}(IfcRelConnects);IFC2X32.IfcRelConnectsStructuralElement=IfcRelConnectsStructuralElement;var IfcRelConnectsStructuralMember=/*#__PURE__*/function(_IfcRelConnects6){_inherits(IfcRelConnectsStructuralMember,_IfcRelConnects6);var _super537=_createSuper(IfcRelConnectsStructuralMember);function IfcRelConnectsStructuralMember(expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem){var _this534;_classCallCheck(this,IfcRelConnectsStructuralMember);_this534=_super537.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this534.GlobalId=GlobalId;_this534.OwnerHistory=OwnerHistory;_this534.Name=Name;_this534.Description=Description;_this534.RelatingStructuralMember=RelatingStructuralMember;_this534.RelatedStructuralConnection=RelatedStructuralConnection;_this534.AppliedCondition=AppliedCondition;_this534.AdditionalConditions=AdditionalConditions;_this534.SupportedLength=SupportedLength;_this534.ConditionCoordinateSystem=ConditionCoordinateSystem;_this534.type=1638771189;return _this534;}return _createClass(IfcRelConnectsStructuralMember);}(IfcRelConnects);IFC2X32.IfcRelConnectsStructuralMember=IfcRelConnectsStructuralMember;var IfcRelConnectsWithEccentricity=/*#__PURE__*/function(_IfcRelConnectsStruct){_inherits(IfcRelConnectsWithEccentricity,_IfcRelConnectsStruct);var _super538=_createSuper(IfcRelConnectsWithEccentricity);function IfcRelConnectsWithEccentricity(expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem,ConnectionConstraint){var _this535;_classCallCheck(this,IfcRelConnectsWithEccentricity);_this535=_super538.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem);_this535.GlobalId=GlobalId;_this535.OwnerHistory=OwnerHistory;_this535.Name=Name;_this535.Description=Description;_this535.RelatingStructuralMember=RelatingStructuralMember;_this535.RelatedStructuralConnection=RelatedStructuralConnection;_this535.AppliedCondition=AppliedCondition;_this535.AdditionalConditions=AdditionalConditions;_this535.SupportedLength=SupportedLength;_this535.ConditionCoordinateSystem=ConditionCoordinateSystem;_this535.ConnectionConstraint=ConnectionConstraint;_this535.type=504942748;return _this535;}return _createClass(IfcRelConnectsWithEccentricity);}(IfcRelConnectsStructuralMember);IFC2X32.IfcRelConnectsWithEccentricity=IfcRelConnectsWithEccentricity;var IfcRelConnectsWithRealizingElements=/*#__PURE__*/function(_IfcRelConnectsElemen2){_inherits(IfcRelConnectsWithRealizingElements,_IfcRelConnectsElemen2);var _super539=_createSuper(IfcRelConnectsWithRealizingElements);function IfcRelConnectsWithRealizingElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement,RealizingElements,ConnectionType){var _this536;_classCallCheck(this,IfcRelConnectsWithRealizingElements);_this536=_super539.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement);_this536.GlobalId=GlobalId;_this536.OwnerHistory=OwnerHistory;_this536.Name=Name;_this536.Description=Description;_this536.ConnectionGeometry=ConnectionGeometry;_this536.RelatingElement=RelatingElement;_this536.RelatedElement=RelatedElement;_this536.RealizingElements=RealizingElements;_this536.ConnectionType=ConnectionType;_this536.type=3678494232;return _this536;}return _createClass(IfcRelConnectsWithRealizingElements);}(IfcRelConnectsElements);IFC2X32.IfcRelConnectsWithRealizingElements=IfcRelConnectsWithRealizingElements;var IfcRelContainedInSpatialStructure=/*#__PURE__*/function(_IfcRelConnects7){_inherits(IfcRelContainedInSpatialStructure,_IfcRelConnects7);var _super540=_createSuper(IfcRelContainedInSpatialStructure);function IfcRelContainedInSpatialStructure(expressID,GlobalId,OwnerHistory,Name,Description,RelatedElements,RelatingStructure){var _this537;_classCallCheck(this,IfcRelContainedInSpatialStructure);_this537=_super540.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this537.GlobalId=GlobalId;_this537.OwnerHistory=OwnerHistory;_this537.Name=Name;_this537.Description=Description;_this537.RelatedElements=RelatedElements;_this537.RelatingStructure=RelatingStructure;_this537.type=3242617779;return _this537;}return _createClass(IfcRelContainedInSpatialStructure);}(IfcRelConnects);IFC2X32.IfcRelContainedInSpatialStructure=IfcRelContainedInSpatialStructure;var IfcRelCoversBldgElements=/*#__PURE__*/function(_IfcRelConnects8){_inherits(IfcRelCoversBldgElements,_IfcRelConnects8);var _super541=_createSuper(IfcRelCoversBldgElements);function IfcRelCoversBldgElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatingBuildingElement,RelatedCoverings){var _this538;_classCallCheck(this,IfcRelCoversBldgElements);_this538=_super541.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this538.GlobalId=GlobalId;_this538.OwnerHistory=OwnerHistory;_this538.Name=Name;_this538.Description=Description;_this538.RelatingBuildingElement=RelatingBuildingElement;_this538.RelatedCoverings=RelatedCoverings;_this538.type=886880790;return _this538;}return _createClass(IfcRelCoversBldgElements);}(IfcRelConnects);IFC2X32.IfcRelCoversBldgElements=IfcRelCoversBldgElements;var IfcRelCoversSpaces=/*#__PURE__*/function(_IfcRelConnects9){_inherits(IfcRelCoversSpaces,_IfcRelConnects9);var _super542=_createSuper(IfcRelCoversSpaces);function IfcRelCoversSpaces(expressID,GlobalId,OwnerHistory,Name,Description,RelatedSpace,RelatedCoverings){var _this539;_classCallCheck(this,IfcRelCoversSpaces);_this539=_super542.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this539.GlobalId=GlobalId;_this539.OwnerHistory=OwnerHistory;_this539.Name=Name;_this539.Description=Description;_this539.RelatedSpace=RelatedSpace;_this539.RelatedCoverings=RelatedCoverings;_this539.type=2802773753;return _this539;}return _createClass(IfcRelCoversSpaces);}(IfcRelConnects);IFC2X32.IfcRelCoversSpaces=IfcRelCoversSpaces;var IfcRelDecomposes=/*#__PURE__*/function(_IfcRelationship4){_inherits(IfcRelDecomposes,_IfcRelationship4);var _super543=_createSuper(IfcRelDecomposes);function IfcRelDecomposes(expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects){var _this540;_classCallCheck(this,IfcRelDecomposes);_this540=_super543.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this540.GlobalId=GlobalId;_this540.OwnerHistory=OwnerHistory;_this540.Name=Name;_this540.Description=Description;_this540.RelatingObject=RelatingObject;_this540.RelatedObjects=RelatedObjects;_this540.type=2551354335;return _this540;}return _createClass(IfcRelDecomposes);}(IfcRelationship);IFC2X32.IfcRelDecomposes=IfcRelDecomposes;var IfcRelDefines=/*#__PURE__*/function(_IfcRelationship5){_inherits(IfcRelDefines,_IfcRelationship5);var _super544=_createSuper(IfcRelDefines);function IfcRelDefines(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects){var _this541;_classCallCheck(this,IfcRelDefines);_this541=_super544.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this541.GlobalId=GlobalId;_this541.OwnerHistory=OwnerHistory;_this541.Name=Name;_this541.Description=Description;_this541.RelatedObjects=RelatedObjects;_this541.type=693640335;return _this541;}return _createClass(IfcRelDefines);}(IfcRelationship);IFC2X32.IfcRelDefines=IfcRelDefines;var IfcRelDefinesByProperties=/*#__PURE__*/function(_IfcRelDefines){_inherits(IfcRelDefinesByProperties,_IfcRelDefines);var _super545=_createSuper(IfcRelDefinesByProperties);function IfcRelDefinesByProperties(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingPropertyDefinition){var _this542;_classCallCheck(this,IfcRelDefinesByProperties);_this542=_super545.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this542.GlobalId=GlobalId;_this542.OwnerHistory=OwnerHistory;_this542.Name=Name;_this542.Description=Description;_this542.RelatedObjects=RelatedObjects;_this542.RelatingPropertyDefinition=RelatingPropertyDefinition;_this542.type=4186316022;return _this542;}return _createClass(IfcRelDefinesByProperties);}(IfcRelDefines);IFC2X32.IfcRelDefinesByProperties=IfcRelDefinesByProperties;var IfcRelDefinesByType=/*#__PURE__*/function(_IfcRelDefines2){_inherits(IfcRelDefinesByType,_IfcRelDefines2);var _super546=_createSuper(IfcRelDefinesByType);function IfcRelDefinesByType(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingType){var _this543;_classCallCheck(this,IfcRelDefinesByType);_this543=_super546.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this543.GlobalId=GlobalId;_this543.OwnerHistory=OwnerHistory;_this543.Name=Name;_this543.Description=Description;_this543.RelatedObjects=RelatedObjects;_this543.RelatingType=RelatingType;_this543.type=781010003;return _this543;}return _createClass(IfcRelDefinesByType);}(IfcRelDefines);IFC2X32.IfcRelDefinesByType=IfcRelDefinesByType;var IfcRelFillsElement=/*#__PURE__*/function(_IfcRelConnects10){_inherits(IfcRelFillsElement,_IfcRelConnects10);var _super547=_createSuper(IfcRelFillsElement);function IfcRelFillsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingOpeningElement,RelatedBuildingElement){var _this544;_classCallCheck(this,IfcRelFillsElement);_this544=_super547.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this544.GlobalId=GlobalId;_this544.OwnerHistory=OwnerHistory;_this544.Name=Name;_this544.Description=Description;_this544.RelatingOpeningElement=RelatingOpeningElement;_this544.RelatedBuildingElement=RelatedBuildingElement;_this544.type=3940055652;return _this544;}return _createClass(IfcRelFillsElement);}(IfcRelConnects);IFC2X32.IfcRelFillsElement=IfcRelFillsElement;var IfcRelFlowControlElements=/*#__PURE__*/function(_IfcRelConnects11){_inherits(IfcRelFlowControlElements,_IfcRelConnects11);var _super548=_createSuper(IfcRelFlowControlElements);function IfcRelFlowControlElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatedControlElements,RelatingFlowElement){var _this545;_classCallCheck(this,IfcRelFlowControlElements);_this545=_super548.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this545.GlobalId=GlobalId;_this545.OwnerHistory=OwnerHistory;_this545.Name=Name;_this545.Description=Description;_this545.RelatedControlElements=RelatedControlElements;_this545.RelatingFlowElement=RelatingFlowElement;_this545.type=279856033;return _this545;}return _createClass(IfcRelFlowControlElements);}(IfcRelConnects);IFC2X32.IfcRelFlowControlElements=IfcRelFlowControlElements;var IfcRelInteractionRequirements=/*#__PURE__*/function(_IfcRelConnects12){_inherits(IfcRelInteractionRequirements,_IfcRelConnects12);var _super549=_createSuper(IfcRelInteractionRequirements);function IfcRelInteractionRequirements(expressID,GlobalId,OwnerHistory,Name,Description,DailyInteraction,ImportanceRating,LocationOfInteraction,RelatedSpaceProgram,RelatingSpaceProgram){var _this546;_classCallCheck(this,IfcRelInteractionRequirements);_this546=_super549.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this546.GlobalId=GlobalId;_this546.OwnerHistory=OwnerHistory;_this546.Name=Name;_this546.Description=Description;_this546.DailyInteraction=DailyInteraction;_this546.ImportanceRating=ImportanceRating;_this546.LocationOfInteraction=LocationOfInteraction;_this546.RelatedSpaceProgram=RelatedSpaceProgram;_this546.RelatingSpaceProgram=RelatingSpaceProgram;_this546.type=4189434867;return _this546;}return _createClass(IfcRelInteractionRequirements);}(IfcRelConnects);IFC2X32.IfcRelInteractionRequirements=IfcRelInteractionRequirements;var IfcRelNests=/*#__PURE__*/function(_IfcRelDecomposes){_inherits(IfcRelNests,_IfcRelDecomposes);var _super550=_createSuper(IfcRelNests);function IfcRelNests(expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects){var _this547;_classCallCheck(this,IfcRelNests);_this547=_super550.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects);_this547.GlobalId=GlobalId;_this547.OwnerHistory=OwnerHistory;_this547.Name=Name;_this547.Description=Description;_this547.RelatingObject=RelatingObject;_this547.RelatedObjects=RelatedObjects;_this547.type=3268803585;return _this547;}return _createClass(IfcRelNests);}(IfcRelDecomposes);IFC2X32.IfcRelNests=IfcRelNests;var IfcRelOccupiesSpaces=/*#__PURE__*/function(_IfcRelAssignsToActor){_inherits(IfcRelOccupiesSpaces,_IfcRelAssignsToActor);var _super551=_createSuper(IfcRelOccupiesSpaces);function IfcRelOccupiesSpaces(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingActor,ActingRole){var _this548;_classCallCheck(this,IfcRelOccupiesSpaces);_this548=_super551.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingActor,ActingRole);_this548.GlobalId=GlobalId;_this548.OwnerHistory=OwnerHistory;_this548.Name=Name;_this548.Description=Description;_this548.RelatedObjects=RelatedObjects;_this548.RelatedObjectsType=RelatedObjectsType;_this548.RelatingActor=RelatingActor;_this548.ActingRole=ActingRole;_this548.type=2051452291;return _this548;}return _createClass(IfcRelOccupiesSpaces);}(IfcRelAssignsToActor);IFC2X32.IfcRelOccupiesSpaces=IfcRelOccupiesSpaces;var IfcRelOverridesProperties=/*#__PURE__*/function(_IfcRelDefinesByPrope){_inherits(IfcRelOverridesProperties,_IfcRelDefinesByPrope);var _super552=_createSuper(IfcRelOverridesProperties);function IfcRelOverridesProperties(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingPropertyDefinition,OverridingProperties){var _this549;_classCallCheck(this,IfcRelOverridesProperties);_this549=_super552.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingPropertyDefinition);_this549.GlobalId=GlobalId;_this549.OwnerHistory=OwnerHistory;_this549.Name=Name;_this549.Description=Description;_this549.RelatedObjects=RelatedObjects;_this549.RelatingPropertyDefinition=RelatingPropertyDefinition;_this549.OverridingProperties=OverridingProperties;_this549.type=202636808;return _this549;}return _createClass(IfcRelOverridesProperties);}(IfcRelDefinesByProperties);IFC2X32.IfcRelOverridesProperties=IfcRelOverridesProperties;var IfcRelProjectsElement=/*#__PURE__*/function(_IfcRelConnects13){_inherits(IfcRelProjectsElement,_IfcRelConnects13);var _super553=_createSuper(IfcRelProjectsElement);function IfcRelProjectsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedFeatureElement){var _this550;_classCallCheck(this,IfcRelProjectsElement);_this550=_super553.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this550.GlobalId=GlobalId;_this550.OwnerHistory=OwnerHistory;_this550.Name=Name;_this550.Description=Description;_this550.RelatingElement=RelatingElement;_this550.RelatedFeatureElement=RelatedFeatureElement;_this550.type=750771296;return _this550;}return _createClass(IfcRelProjectsElement);}(IfcRelConnects);IFC2X32.IfcRelProjectsElement=IfcRelProjectsElement;var IfcRelReferencedInSpatialStructure=/*#__PURE__*/function(_IfcRelConnects14){_inherits(IfcRelReferencedInSpatialStructure,_IfcRelConnects14);var _super554=_createSuper(IfcRelReferencedInSpatialStructure);function IfcRelReferencedInSpatialStructure(expressID,GlobalId,OwnerHistory,Name,Description,RelatedElements,RelatingStructure){var _this551;_classCallCheck(this,IfcRelReferencedInSpatialStructure);_this551=_super554.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this551.GlobalId=GlobalId;_this551.OwnerHistory=OwnerHistory;_this551.Name=Name;_this551.Description=Description;_this551.RelatedElements=RelatedElements;_this551.RelatingStructure=RelatingStructure;_this551.type=1245217292;return _this551;}return _createClass(IfcRelReferencedInSpatialStructure);}(IfcRelConnects);IFC2X32.IfcRelReferencedInSpatialStructure=IfcRelReferencedInSpatialStructure;var IfcRelSchedulesCostItems=/*#__PURE__*/function(_IfcRelAssignsToContr2){_inherits(IfcRelSchedulesCostItems,_IfcRelAssignsToContr2);var _super555=_createSuper(IfcRelSchedulesCostItems);function IfcRelSchedulesCostItems(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl){var _this552;_classCallCheck(this,IfcRelSchedulesCostItems);_this552=_super555.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl);_this552.GlobalId=GlobalId;_this552.OwnerHistory=OwnerHistory;_this552.Name=Name;_this552.Description=Description;_this552.RelatedObjects=RelatedObjects;_this552.RelatedObjectsType=RelatedObjectsType;_this552.RelatingControl=RelatingControl;_this552.type=1058617721;return _this552;}return _createClass(IfcRelSchedulesCostItems);}(IfcRelAssignsToControl);IFC2X32.IfcRelSchedulesCostItems=IfcRelSchedulesCostItems;var IfcRelSequence=/*#__PURE__*/function(_IfcRelConnects15){_inherits(IfcRelSequence,_IfcRelConnects15);var _super556=_createSuper(IfcRelSequence);function IfcRelSequence(expressID,GlobalId,OwnerHistory,Name,Description,RelatingProcess,RelatedProcess,TimeLag,SequenceType){var _this553;_classCallCheck(this,IfcRelSequence);_this553=_super556.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this553.GlobalId=GlobalId;_this553.OwnerHistory=OwnerHistory;_this553.Name=Name;_this553.Description=Description;_this553.RelatingProcess=RelatingProcess;_this553.RelatedProcess=RelatedProcess;_this553.TimeLag=TimeLag;_this553.SequenceType=SequenceType;_this553.type=4122056220;return _this553;}return _createClass(IfcRelSequence);}(IfcRelConnects);IFC2X32.IfcRelSequence=IfcRelSequence;var IfcRelServicesBuildings=/*#__PURE__*/function(_IfcRelConnects16){_inherits(IfcRelServicesBuildings,_IfcRelConnects16);var _super557=_createSuper(IfcRelServicesBuildings);function IfcRelServicesBuildings(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSystem,RelatedBuildings){var _this554;_classCallCheck(this,IfcRelServicesBuildings);_this554=_super557.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this554.GlobalId=GlobalId;_this554.OwnerHistory=OwnerHistory;_this554.Name=Name;_this554.Description=Description;_this554.RelatingSystem=RelatingSystem;_this554.RelatedBuildings=RelatedBuildings;_this554.type=366585022;return _this554;}return _createClass(IfcRelServicesBuildings);}(IfcRelConnects);IFC2X32.IfcRelServicesBuildings=IfcRelServicesBuildings;var IfcRelSpaceBoundary=/*#__PURE__*/function(_IfcRelConnects17){_inherits(IfcRelSpaceBoundary,_IfcRelConnects17);var _super558=_createSuper(IfcRelSpaceBoundary);function IfcRelSpaceBoundary(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary){var _this555;_classCallCheck(this,IfcRelSpaceBoundary);_this555=_super558.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this555.GlobalId=GlobalId;_this555.OwnerHistory=OwnerHistory;_this555.Name=Name;_this555.Description=Description;_this555.RelatingSpace=RelatingSpace;_this555.RelatedBuildingElement=RelatedBuildingElement;_this555.ConnectionGeometry=ConnectionGeometry;_this555.PhysicalOrVirtualBoundary=PhysicalOrVirtualBoundary;_this555.InternalOrExternalBoundary=InternalOrExternalBoundary;_this555.type=3451746338;return _this555;}return _createClass(IfcRelSpaceBoundary);}(IfcRelConnects);IFC2X32.IfcRelSpaceBoundary=IfcRelSpaceBoundary;var IfcRelVoidsElement=/*#__PURE__*/function(_IfcRelConnects18){_inherits(IfcRelVoidsElement,_IfcRelConnects18);var _super559=_createSuper(IfcRelVoidsElement);function IfcRelVoidsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingBuildingElement,RelatedOpeningElement){var _this556;_classCallCheck(this,IfcRelVoidsElement);_this556=_super559.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this556.GlobalId=GlobalId;_this556.OwnerHistory=OwnerHistory;_this556.Name=Name;_this556.Description=Description;_this556.RelatingBuildingElement=RelatingBuildingElement;_this556.RelatedOpeningElement=RelatedOpeningElement;_this556.type=1401173127;return _this556;}return _createClass(IfcRelVoidsElement);}(IfcRelConnects);IFC2X32.IfcRelVoidsElement=IfcRelVoidsElement;var IfcResource=/*#__PURE__*/function(_IfcObject4){_inherits(IfcResource,_IfcObject4);var _super560=_createSuper(IfcResource);function IfcResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this557;_classCallCheck(this,IfcResource);_this557=_super560.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this557.GlobalId=GlobalId;_this557.OwnerHistory=OwnerHistory;_this557.Name=Name;_this557.Description=Description;_this557.ObjectType=ObjectType;_this557.type=2914609552;return _this557;}return _createClass(IfcResource);}(IfcObject);IFC2X32.IfcResource=IfcResource;var IfcRevolvedAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid2){_inherits(IfcRevolvedAreaSolid,_IfcSweptAreaSolid2);var _super561=_createSuper(IfcRevolvedAreaSolid);function IfcRevolvedAreaSolid(expressID,SweptArea,Position,Axis,Angle){var _this558;_classCallCheck(this,IfcRevolvedAreaSolid);_this558=_super561.call(this,expressID,SweptArea,Position);_this558.SweptArea=SweptArea;_this558.Position=Position;_this558.Axis=Axis;_this558.Angle=Angle;_this558.type=1856042241;return _this558;}return _createClass(IfcRevolvedAreaSolid);}(IfcSweptAreaSolid);IFC2X32.IfcRevolvedAreaSolid=IfcRevolvedAreaSolid;var IfcRightCircularCone=/*#__PURE__*/function(_IfcCsgPrimitive3D2){_inherits(IfcRightCircularCone,_IfcCsgPrimitive3D2);var _super562=_createSuper(IfcRightCircularCone);function IfcRightCircularCone(expressID,Position,Height,BottomRadius){var _this559;_classCallCheck(this,IfcRightCircularCone);_this559=_super562.call(this,expressID,Position);_this559.Position=Position;_this559.Height=Height;_this559.BottomRadius=BottomRadius;_this559.type=4158566097;return _this559;}return _createClass(IfcRightCircularCone);}(IfcCsgPrimitive3D);IFC2X32.IfcRightCircularCone=IfcRightCircularCone;var IfcRightCircularCylinder=/*#__PURE__*/function(_IfcCsgPrimitive3D3){_inherits(IfcRightCircularCylinder,_IfcCsgPrimitive3D3);var _super563=_createSuper(IfcRightCircularCylinder);function IfcRightCircularCylinder(expressID,Position,Height,Radius){var _this560;_classCallCheck(this,IfcRightCircularCylinder);_this560=_super563.call(this,expressID,Position);_this560.Position=Position;_this560.Height=Height;_this560.Radius=Radius;_this560.type=3626867408;return _this560;}return _createClass(IfcRightCircularCylinder);}(IfcCsgPrimitive3D);IFC2X32.IfcRightCircularCylinder=IfcRightCircularCylinder;var IfcSpatialStructureElement=/*#__PURE__*/function(_IfcProduct2){_inherits(IfcSpatialStructureElement,_IfcProduct2);var _super564=_createSuper(IfcSpatialStructureElement);function IfcSpatialStructureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType){var _this561;_classCallCheck(this,IfcSpatialStructureElement);_this561=_super564.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this561.GlobalId=GlobalId;_this561.OwnerHistory=OwnerHistory;_this561.Name=Name;_this561.Description=Description;_this561.ObjectType=ObjectType;_this561.ObjectPlacement=ObjectPlacement;_this561.Representation=Representation;_this561.LongName=LongName;_this561.CompositionType=CompositionType;_this561.type=2706606064;return _this561;}return _createClass(IfcSpatialStructureElement);}(IfcProduct);IFC2X32.IfcSpatialStructureElement=IfcSpatialStructureElement;var IfcSpatialStructureElementType=/*#__PURE__*/function(_IfcElementType2){_inherits(IfcSpatialStructureElementType,_IfcElementType2);var _super565=_createSuper(IfcSpatialStructureElementType);function IfcSpatialStructureElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this562;_classCallCheck(this,IfcSpatialStructureElementType);_this562=_super565.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this562.GlobalId=GlobalId;_this562.OwnerHistory=OwnerHistory;_this562.Name=Name;_this562.Description=Description;_this562.ApplicableOccurrence=ApplicableOccurrence;_this562.HasPropertySets=HasPropertySets;_this562.RepresentationMaps=RepresentationMaps;_this562.Tag=Tag;_this562.ElementType=ElementType;_this562.type=3893378262;return _this562;}return _createClass(IfcSpatialStructureElementType);}(IfcElementType);IFC2X32.IfcSpatialStructureElementType=IfcSpatialStructureElementType;var IfcSphere=/*#__PURE__*/function(_IfcCsgPrimitive3D4){_inherits(IfcSphere,_IfcCsgPrimitive3D4);var _super566=_createSuper(IfcSphere);function IfcSphere(expressID,Position,Radius){var _this563;_classCallCheck(this,IfcSphere);_this563=_super566.call(this,expressID,Position);_this563.Position=Position;_this563.Radius=Radius;_this563.type=451544542;return _this563;}return _createClass(IfcSphere);}(IfcCsgPrimitive3D);IFC2X32.IfcSphere=IfcSphere;var IfcStructuralActivity=/*#__PURE__*/function(_IfcProduct3){_inherits(IfcStructuralActivity,_IfcProduct3);var _super567=_createSuper(IfcStructuralActivity);function IfcStructuralActivity(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this564;_classCallCheck(this,IfcStructuralActivity);_this564=_super567.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this564.GlobalId=GlobalId;_this564.OwnerHistory=OwnerHistory;_this564.Name=Name;_this564.Description=Description;_this564.ObjectType=ObjectType;_this564.ObjectPlacement=ObjectPlacement;_this564.Representation=Representation;_this564.AppliedLoad=AppliedLoad;_this564.GlobalOrLocal=GlobalOrLocal;_this564.type=3544373492;return _this564;}return _createClass(IfcStructuralActivity);}(IfcProduct);IFC2X32.IfcStructuralActivity=IfcStructuralActivity;var IfcStructuralItem=/*#__PURE__*/function(_IfcProduct4){_inherits(IfcStructuralItem,_IfcProduct4);var _super568=_createSuper(IfcStructuralItem);function IfcStructuralItem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this565;_classCallCheck(this,IfcStructuralItem);_this565=_super568.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this565.GlobalId=GlobalId;_this565.OwnerHistory=OwnerHistory;_this565.Name=Name;_this565.Description=Description;_this565.ObjectType=ObjectType;_this565.ObjectPlacement=ObjectPlacement;_this565.Representation=Representation;_this565.type=3136571912;return _this565;}return _createClass(IfcStructuralItem);}(IfcProduct);IFC2X32.IfcStructuralItem=IfcStructuralItem;var IfcStructuralMember=/*#__PURE__*/function(_IfcStructuralItem){_inherits(IfcStructuralMember,_IfcStructuralItem);var _super569=_createSuper(IfcStructuralMember);function IfcStructuralMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this566;_classCallCheck(this,IfcStructuralMember);_this566=_super569.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this566.GlobalId=GlobalId;_this566.OwnerHistory=OwnerHistory;_this566.Name=Name;_this566.Description=Description;_this566.ObjectType=ObjectType;_this566.ObjectPlacement=ObjectPlacement;_this566.Representation=Representation;_this566.type=530289379;return _this566;}return _createClass(IfcStructuralMember);}(IfcStructuralItem);IFC2X32.IfcStructuralMember=IfcStructuralMember;var IfcStructuralReaction=/*#__PURE__*/function(_IfcStructuralActivit){_inherits(IfcStructuralReaction,_IfcStructuralActivit);var _super570=_createSuper(IfcStructuralReaction);function IfcStructuralReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this567;_classCallCheck(this,IfcStructuralReaction);_this567=_super570.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this567.GlobalId=GlobalId;_this567.OwnerHistory=OwnerHistory;_this567.Name=Name;_this567.Description=Description;_this567.ObjectType=ObjectType;_this567.ObjectPlacement=ObjectPlacement;_this567.Representation=Representation;_this567.AppliedLoad=AppliedLoad;_this567.GlobalOrLocal=GlobalOrLocal;_this567.type=3689010777;return _this567;}return _createClass(IfcStructuralReaction);}(IfcStructuralActivity);IFC2X32.IfcStructuralReaction=IfcStructuralReaction;var IfcStructuralSurfaceMember=/*#__PURE__*/function(_IfcStructuralMember){_inherits(IfcStructuralSurfaceMember,_IfcStructuralMember);var _super571=_createSuper(IfcStructuralSurfaceMember);function IfcStructuralSurfaceMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness){var _this568;_classCallCheck(this,IfcStructuralSurfaceMember);_this568=_super571.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this568.GlobalId=GlobalId;_this568.OwnerHistory=OwnerHistory;_this568.Name=Name;_this568.Description=Description;_this568.ObjectType=ObjectType;_this568.ObjectPlacement=ObjectPlacement;_this568.Representation=Representation;_this568.PredefinedType=PredefinedType;_this568.Thickness=Thickness;_this568.type=3979015343;return _this568;}return _createClass(IfcStructuralSurfaceMember);}(IfcStructuralMember);IFC2X32.IfcStructuralSurfaceMember=IfcStructuralSurfaceMember;var IfcStructuralSurfaceMemberVarying=/*#__PURE__*/function(_IfcStructuralSurface){_inherits(IfcStructuralSurfaceMemberVarying,_IfcStructuralSurface);var _super572=_createSuper(IfcStructuralSurfaceMemberVarying);function IfcStructuralSurfaceMemberVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness,SubsequentThickness,VaryingThicknessLocation){var _this569;_classCallCheck(this,IfcStructuralSurfaceMemberVarying);_this569=_super572.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness);_this569.GlobalId=GlobalId;_this569.OwnerHistory=OwnerHistory;_this569.Name=Name;_this569.Description=Description;_this569.ObjectType=ObjectType;_this569.ObjectPlacement=ObjectPlacement;_this569.Representation=Representation;_this569.PredefinedType=PredefinedType;_this569.Thickness=Thickness;_this569.SubsequentThickness=SubsequentThickness;_this569.VaryingThicknessLocation=VaryingThicknessLocation;_this569.type=2218152070;return _this569;}return _createClass(IfcStructuralSurfaceMemberVarying);}(IfcStructuralSurfaceMember);IFC2X32.IfcStructuralSurfaceMemberVarying=IfcStructuralSurfaceMemberVarying;var IfcStructuredDimensionCallout=/*#__PURE__*/function(_IfcDraughtingCallout3){_inherits(IfcStructuredDimensionCallout,_IfcDraughtingCallout3);var _super573=_createSuper(IfcStructuredDimensionCallout);function IfcStructuredDimensionCallout(expressID,Contents){var _this570;_classCallCheck(this,IfcStructuredDimensionCallout);_this570=_super573.call(this,expressID,Contents);_this570.Contents=Contents;_this570.type=4070609034;return _this570;}return _createClass(IfcStructuredDimensionCallout);}(IfcDraughtingCallout);IFC2X32.IfcStructuredDimensionCallout=IfcStructuredDimensionCallout;var IfcSurfaceCurveSweptAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid3){_inherits(IfcSurfaceCurveSweptAreaSolid,_IfcSweptAreaSolid3);var _super574=_createSuper(IfcSurfaceCurveSweptAreaSolid);function IfcSurfaceCurveSweptAreaSolid(expressID,SweptArea,Position,Directrix,StartParam,EndParam,ReferenceSurface){var _this571;_classCallCheck(this,IfcSurfaceCurveSweptAreaSolid);_this571=_super574.call(this,expressID,SweptArea,Position);_this571.SweptArea=SweptArea;_this571.Position=Position;_this571.Directrix=Directrix;_this571.StartParam=StartParam;_this571.EndParam=EndParam;_this571.ReferenceSurface=ReferenceSurface;_this571.type=2028607225;return _this571;}return _createClass(IfcSurfaceCurveSweptAreaSolid);}(IfcSweptAreaSolid);IFC2X32.IfcSurfaceCurveSweptAreaSolid=IfcSurfaceCurveSweptAreaSolid;var IfcSurfaceOfLinearExtrusion=/*#__PURE__*/function(_IfcSweptSurface){_inherits(IfcSurfaceOfLinearExtrusion,_IfcSweptSurface);var _super575=_createSuper(IfcSurfaceOfLinearExtrusion);function IfcSurfaceOfLinearExtrusion(expressID,SweptCurve,Position,ExtrudedDirection,Depth){var _this572;_classCallCheck(this,IfcSurfaceOfLinearExtrusion);_this572=_super575.call(this,expressID,SweptCurve,Position);_this572.SweptCurve=SweptCurve;_this572.Position=Position;_this572.ExtrudedDirection=ExtrudedDirection;_this572.Depth=Depth;_this572.type=2809605785;return _this572;}return _createClass(IfcSurfaceOfLinearExtrusion);}(IfcSweptSurface);IFC2X32.IfcSurfaceOfLinearExtrusion=IfcSurfaceOfLinearExtrusion;var IfcSurfaceOfRevolution=/*#__PURE__*/function(_IfcSweptSurface2){_inherits(IfcSurfaceOfRevolution,_IfcSweptSurface2);var _super576=_createSuper(IfcSurfaceOfRevolution);function IfcSurfaceOfRevolution(expressID,SweptCurve,Position,AxisPosition){var _this573;_classCallCheck(this,IfcSurfaceOfRevolution);_this573=_super576.call(this,expressID,SweptCurve,Position);_this573.SweptCurve=SweptCurve;_this573.Position=Position;_this573.AxisPosition=AxisPosition;_this573.type=4124788165;return _this573;}return _createClass(IfcSurfaceOfRevolution);}(IfcSweptSurface);IFC2X32.IfcSurfaceOfRevolution=IfcSurfaceOfRevolution;var IfcSystemFurnitureElementType=/*#__PURE__*/function(_IfcFurnishingElement2){_inherits(IfcSystemFurnitureElementType,_IfcFurnishingElement2);var _super577=_createSuper(IfcSystemFurnitureElementType);function IfcSystemFurnitureElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this574;_classCallCheck(this,IfcSystemFurnitureElementType);_this574=_super577.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this574.GlobalId=GlobalId;_this574.OwnerHistory=OwnerHistory;_this574.Name=Name;_this574.Description=Description;_this574.ApplicableOccurrence=ApplicableOccurrence;_this574.HasPropertySets=HasPropertySets;_this574.RepresentationMaps=RepresentationMaps;_this574.Tag=Tag;_this574.ElementType=ElementType;_this574.type=1580310250;return _this574;}return _createClass(IfcSystemFurnitureElementType);}(IfcFurnishingElementType);IFC2X32.IfcSystemFurnitureElementType=IfcSystemFurnitureElementType;var IfcTask=/*#__PURE__*/function(_IfcProcess){_inherits(IfcTask,_IfcProcess);var _super578=_createSuper(IfcTask);function IfcTask(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TaskId,Status,WorkMethod,IsMilestone,Priority){var _this575;_classCallCheck(this,IfcTask);_this575=_super578.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this575.GlobalId=GlobalId;_this575.OwnerHistory=OwnerHistory;_this575.Name=Name;_this575.Description=Description;_this575.ObjectType=ObjectType;_this575.TaskId=TaskId;_this575.Status=Status;_this575.WorkMethod=WorkMethod;_this575.IsMilestone=IsMilestone;_this575.Priority=Priority;_this575.type=3473067441;return _this575;}return _createClass(IfcTask);}(IfcProcess);IFC2X32.IfcTask=IfcTask;var IfcTransportElementType=/*#__PURE__*/function(_IfcElementType3){_inherits(IfcTransportElementType,_IfcElementType3);var _super579=_createSuper(IfcTransportElementType);function IfcTransportElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this576;_classCallCheck(this,IfcTransportElementType);_this576=_super579.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this576.GlobalId=GlobalId;_this576.OwnerHistory=OwnerHistory;_this576.Name=Name;_this576.Description=Description;_this576.ApplicableOccurrence=ApplicableOccurrence;_this576.HasPropertySets=HasPropertySets;_this576.RepresentationMaps=RepresentationMaps;_this576.Tag=Tag;_this576.ElementType=ElementType;_this576.PredefinedType=PredefinedType;_this576.type=2097647324;return _this576;}return _createClass(IfcTransportElementType);}(IfcElementType);IFC2X32.IfcTransportElementType=IfcTransportElementType;var IfcActor=/*#__PURE__*/function(_IfcObject5){_inherits(IfcActor,_IfcObject5);var _super580=_createSuper(IfcActor);function IfcActor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor){var _this577;_classCallCheck(this,IfcActor);_this577=_super580.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this577.GlobalId=GlobalId;_this577.OwnerHistory=OwnerHistory;_this577.Name=Name;_this577.Description=Description;_this577.ObjectType=ObjectType;_this577.TheActor=TheActor;_this577.type=2296667514;return _this577;}return _createClass(IfcActor);}(IfcObject);IFC2X32.IfcActor=IfcActor;var IfcAnnotation=/*#__PURE__*/function(_IfcProduct5){_inherits(IfcAnnotation,_IfcProduct5);var _super581=_createSuper(IfcAnnotation);function IfcAnnotation(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this578;_classCallCheck(this,IfcAnnotation);_this578=_super581.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this578.GlobalId=GlobalId;_this578.OwnerHistory=OwnerHistory;_this578.Name=Name;_this578.Description=Description;_this578.ObjectType=ObjectType;_this578.ObjectPlacement=ObjectPlacement;_this578.Representation=Representation;_this578.type=1674181508;return _this578;}return _createClass(IfcAnnotation);}(IfcProduct);IFC2X32.IfcAnnotation=IfcAnnotation;var IfcAsymmetricIShapeProfileDef=/*#__PURE__*/function(_IfcIShapeProfileDef){_inherits(IfcAsymmetricIShapeProfileDef,_IfcIShapeProfileDef);var _super582=_createSuper(IfcAsymmetricIShapeProfileDef);function IfcAsymmetricIShapeProfileDef(expressID,ProfileType,ProfileName,Position,OverallWidth,OverallDepth,WebThickness,FlangeThickness,FilletRadius,TopFlangeWidth,TopFlangeThickness,TopFlangeFilletRadius,CentreOfGravityInY){var _this579;_classCallCheck(this,IfcAsymmetricIShapeProfileDef);_this579=_super582.call(this,expressID,ProfileType,ProfileName,Position,OverallWidth,OverallDepth,WebThickness,FlangeThickness,FilletRadius);_this579.ProfileType=ProfileType;_this579.ProfileName=ProfileName;_this579.Position=Position;_this579.OverallWidth=OverallWidth;_this579.OverallDepth=OverallDepth;_this579.WebThickness=WebThickness;_this579.FlangeThickness=FlangeThickness;_this579.FilletRadius=FilletRadius;_this579.TopFlangeWidth=TopFlangeWidth;_this579.TopFlangeThickness=TopFlangeThickness;_this579.TopFlangeFilletRadius=TopFlangeFilletRadius;_this579.CentreOfGravityInY=CentreOfGravityInY;_this579.type=3207858831;return _this579;}return _createClass(IfcAsymmetricIShapeProfileDef);}(IfcIShapeProfileDef);IFC2X32.IfcAsymmetricIShapeProfileDef=IfcAsymmetricIShapeProfileDef;var IfcBlock=/*#__PURE__*/function(_IfcCsgPrimitive3D5){_inherits(IfcBlock,_IfcCsgPrimitive3D5);var _super583=_createSuper(IfcBlock);function IfcBlock(expressID,Position,XLength,YLength,ZLength){var _this580;_classCallCheck(this,IfcBlock);_this580=_super583.call(this,expressID,Position);_this580.Position=Position;_this580.XLength=XLength;_this580.YLength=YLength;_this580.ZLength=ZLength;_this580.type=1334484129;return _this580;}return _createClass(IfcBlock);}(IfcCsgPrimitive3D);IFC2X32.IfcBlock=IfcBlock;var IfcBooleanClippingResult=/*#__PURE__*/function(_IfcBooleanResult){_inherits(IfcBooleanClippingResult,_IfcBooleanResult);var _super584=_createSuper(IfcBooleanClippingResult);function IfcBooleanClippingResult(expressID,Operator,FirstOperand,SecondOperand){var _this581;_classCallCheck(this,IfcBooleanClippingResult);_this581=_super584.call(this,expressID,Operator,FirstOperand,SecondOperand);_this581.Operator=Operator;_this581.FirstOperand=FirstOperand;_this581.SecondOperand=SecondOperand;_this581.type=3649129432;return _this581;}return _createClass(IfcBooleanClippingResult);}(IfcBooleanResult);IFC2X32.IfcBooleanClippingResult=IfcBooleanClippingResult;var IfcBoundedCurve=/*#__PURE__*/function(_IfcCurve4){_inherits(IfcBoundedCurve,_IfcCurve4);var _super585=_createSuper(IfcBoundedCurve);function IfcBoundedCurve(expressID){var _this582;_classCallCheck(this,IfcBoundedCurve);_this582=_super585.call(this,expressID);_this582.type=1260505505;return _this582;}return _createClass(IfcBoundedCurve);}(IfcCurve);IFC2X32.IfcBoundedCurve=IfcBoundedCurve;var IfcBuilding=/*#__PURE__*/function(_IfcSpatialStructureE){_inherits(IfcBuilding,_IfcSpatialStructureE);var _super586=_createSuper(IfcBuilding);function IfcBuilding(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,ElevationOfRefHeight,ElevationOfTerrain,BuildingAddress){var _this583;_classCallCheck(this,IfcBuilding);_this583=_super586.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this583.GlobalId=GlobalId;_this583.OwnerHistory=OwnerHistory;_this583.Name=Name;_this583.Description=Description;_this583.ObjectType=ObjectType;_this583.ObjectPlacement=ObjectPlacement;_this583.Representation=Representation;_this583.LongName=LongName;_this583.CompositionType=CompositionType;_this583.ElevationOfRefHeight=ElevationOfRefHeight;_this583.ElevationOfTerrain=ElevationOfTerrain;_this583.BuildingAddress=BuildingAddress;_this583.type=4031249490;return _this583;}return _createClass(IfcBuilding);}(IfcSpatialStructureElement);IFC2X32.IfcBuilding=IfcBuilding;var IfcBuildingElementType=/*#__PURE__*/function(_IfcElementType4){_inherits(IfcBuildingElementType,_IfcElementType4);var _super587=_createSuper(IfcBuildingElementType);function IfcBuildingElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this584;_classCallCheck(this,IfcBuildingElementType);_this584=_super587.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this584.GlobalId=GlobalId;_this584.OwnerHistory=OwnerHistory;_this584.Name=Name;_this584.Description=Description;_this584.ApplicableOccurrence=ApplicableOccurrence;_this584.HasPropertySets=HasPropertySets;_this584.RepresentationMaps=RepresentationMaps;_this584.Tag=Tag;_this584.ElementType=ElementType;_this584.type=1950629157;return _this584;}return _createClass(IfcBuildingElementType);}(IfcElementType);IFC2X32.IfcBuildingElementType=IfcBuildingElementType;var IfcBuildingStorey=/*#__PURE__*/function(_IfcSpatialStructureE2){_inherits(IfcBuildingStorey,_IfcSpatialStructureE2);var _super588=_createSuper(IfcBuildingStorey);function IfcBuildingStorey(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,Elevation){var _this585;_classCallCheck(this,IfcBuildingStorey);_this585=_super588.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this585.GlobalId=GlobalId;_this585.OwnerHistory=OwnerHistory;_this585.Name=Name;_this585.Description=Description;_this585.ObjectType=ObjectType;_this585.ObjectPlacement=ObjectPlacement;_this585.Representation=Representation;_this585.LongName=LongName;_this585.CompositionType=CompositionType;_this585.Elevation=Elevation;_this585.type=3124254112;return _this585;}return _createClass(IfcBuildingStorey);}(IfcSpatialStructureElement);IFC2X32.IfcBuildingStorey=IfcBuildingStorey;var IfcCircleHollowProfileDef=/*#__PURE__*/function(_IfcCircleProfileDef){_inherits(IfcCircleHollowProfileDef,_IfcCircleProfileDef);var _super589=_createSuper(IfcCircleHollowProfileDef);function IfcCircleHollowProfileDef(expressID,ProfileType,ProfileName,Position,Radius,WallThickness){var _this586;_classCallCheck(this,IfcCircleHollowProfileDef);_this586=_super589.call(this,expressID,ProfileType,ProfileName,Position,Radius);_this586.ProfileType=ProfileType;_this586.ProfileName=ProfileName;_this586.Position=Position;_this586.Radius=Radius;_this586.WallThickness=WallThickness;_this586.type=2937912522;return _this586;}return _createClass(IfcCircleHollowProfileDef);}(IfcCircleProfileDef);IFC2X32.IfcCircleHollowProfileDef=IfcCircleHollowProfileDef;var IfcColumnType=/*#__PURE__*/function(_IfcBuildingElementTy){_inherits(IfcColumnType,_IfcBuildingElementTy);var _super590=_createSuper(IfcColumnType);function IfcColumnType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this587;_classCallCheck(this,IfcColumnType);_this587=_super590.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this587.GlobalId=GlobalId;_this587.OwnerHistory=OwnerHistory;_this587.Name=Name;_this587.Description=Description;_this587.ApplicableOccurrence=ApplicableOccurrence;_this587.HasPropertySets=HasPropertySets;_this587.RepresentationMaps=RepresentationMaps;_this587.Tag=Tag;_this587.ElementType=ElementType;_this587.PredefinedType=PredefinedType;_this587.type=300633059;return _this587;}return _createClass(IfcColumnType);}(IfcBuildingElementType);IFC2X32.IfcColumnType=IfcColumnType;var IfcCompositeCurve=/*#__PURE__*/function(_IfcBoundedCurve){_inherits(IfcCompositeCurve,_IfcBoundedCurve);var _super591=_createSuper(IfcCompositeCurve);function IfcCompositeCurve(expressID,Segments,SelfIntersect){var _this588;_classCallCheck(this,IfcCompositeCurve);_this588=_super591.call(this,expressID);_this588.Segments=Segments;_this588.SelfIntersect=SelfIntersect;_this588.type=3732776249;return _this588;}return _createClass(IfcCompositeCurve);}(IfcBoundedCurve);IFC2X32.IfcCompositeCurve=IfcCompositeCurve;var IfcConic=/*#__PURE__*/function(_IfcCurve5){_inherits(IfcConic,_IfcCurve5);var _super592=_createSuper(IfcConic);function IfcConic(expressID,Position){var _this589;_classCallCheck(this,IfcConic);_this589=_super592.call(this,expressID);_this589.Position=Position;_this589.type=2510884976;return _this589;}return _createClass(IfcConic);}(IfcCurve);IFC2X32.IfcConic=IfcConic;var IfcConstructionResource=/*#__PURE__*/function(_IfcResource){_inherits(IfcConstructionResource,_IfcResource);var _super593=_createSuper(IfcConstructionResource);function IfcConstructionResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity){var _this590;_classCallCheck(this,IfcConstructionResource);_this590=_super593.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this590.GlobalId=GlobalId;_this590.OwnerHistory=OwnerHistory;_this590.Name=Name;_this590.Description=Description;_this590.ObjectType=ObjectType;_this590.ResourceIdentifier=ResourceIdentifier;_this590.ResourceGroup=ResourceGroup;_this590.ResourceConsumption=ResourceConsumption;_this590.BaseQuantity=BaseQuantity;_this590.type=2559216714;return _this590;}return _createClass(IfcConstructionResource);}(IfcResource);IFC2X32.IfcConstructionResource=IfcConstructionResource;var IfcControl=/*#__PURE__*/function(_IfcObject6){_inherits(IfcControl,_IfcObject6);var _super594=_createSuper(IfcControl);function IfcControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this591;_classCallCheck(this,IfcControl);_this591=_super594.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this591.GlobalId=GlobalId;_this591.OwnerHistory=OwnerHistory;_this591.Name=Name;_this591.Description=Description;_this591.ObjectType=ObjectType;_this591.type=3293443760;return _this591;}return _createClass(IfcControl);}(IfcObject);IFC2X32.IfcControl=IfcControl;var IfcCostItem=/*#__PURE__*/function(_IfcControl){_inherits(IfcCostItem,_IfcControl);var _super595=_createSuper(IfcCostItem);function IfcCostItem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this592;_classCallCheck(this,IfcCostItem);_this592=_super595.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this592.GlobalId=GlobalId;_this592.OwnerHistory=OwnerHistory;_this592.Name=Name;_this592.Description=Description;_this592.ObjectType=ObjectType;_this592.type=3895139033;return _this592;}return _createClass(IfcCostItem);}(IfcControl);IFC2X32.IfcCostItem=IfcCostItem;var IfcCostSchedule=/*#__PURE__*/function(_IfcControl2){_inherits(IfcCostSchedule,_IfcControl2);var _super596=_createSuper(IfcCostSchedule);function IfcCostSchedule(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,SubmittedBy,PreparedBy,SubmittedOn,Status,TargetUsers,UpdateDate,ID,PredefinedType){var _this593;_classCallCheck(this,IfcCostSchedule);_this593=_super596.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this593.GlobalId=GlobalId;_this593.OwnerHistory=OwnerHistory;_this593.Name=Name;_this593.Description=Description;_this593.ObjectType=ObjectType;_this593.SubmittedBy=SubmittedBy;_this593.PreparedBy=PreparedBy;_this593.SubmittedOn=SubmittedOn;_this593.Status=Status;_this593.TargetUsers=TargetUsers;_this593.UpdateDate=UpdateDate;_this593.ID=ID;_this593.PredefinedType=PredefinedType;_this593.type=1419761937;return _this593;}return _createClass(IfcCostSchedule);}(IfcControl);IFC2X32.IfcCostSchedule=IfcCostSchedule;var IfcCoveringType=/*#__PURE__*/function(_IfcBuildingElementTy2){_inherits(IfcCoveringType,_IfcBuildingElementTy2);var _super597=_createSuper(IfcCoveringType);function IfcCoveringType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this594;_classCallCheck(this,IfcCoveringType);_this594=_super597.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this594.GlobalId=GlobalId;_this594.OwnerHistory=OwnerHistory;_this594.Name=Name;_this594.Description=Description;_this594.ApplicableOccurrence=ApplicableOccurrence;_this594.HasPropertySets=HasPropertySets;_this594.RepresentationMaps=RepresentationMaps;_this594.Tag=Tag;_this594.ElementType=ElementType;_this594.PredefinedType=PredefinedType;_this594.type=1916426348;return _this594;}return _createClass(IfcCoveringType);}(IfcBuildingElementType);IFC2X32.IfcCoveringType=IfcCoveringType;var IfcCrewResource=/*#__PURE__*/function(_IfcConstructionResou){_inherits(IfcCrewResource,_IfcConstructionResou);var _super598=_createSuper(IfcCrewResource);function IfcCrewResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity){var _this595;_classCallCheck(this,IfcCrewResource);_this595=_super598.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity);_this595.GlobalId=GlobalId;_this595.OwnerHistory=OwnerHistory;_this595.Name=Name;_this595.Description=Description;_this595.ObjectType=ObjectType;_this595.ResourceIdentifier=ResourceIdentifier;_this595.ResourceGroup=ResourceGroup;_this595.ResourceConsumption=ResourceConsumption;_this595.BaseQuantity=BaseQuantity;_this595.type=3295246426;return _this595;}return _createClass(IfcCrewResource);}(IfcConstructionResource);IFC2X32.IfcCrewResource=IfcCrewResource;var IfcCurtainWallType=/*#__PURE__*/function(_IfcBuildingElementTy3){_inherits(IfcCurtainWallType,_IfcBuildingElementTy3);var _super599=_createSuper(IfcCurtainWallType);function IfcCurtainWallType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this596;_classCallCheck(this,IfcCurtainWallType);_this596=_super599.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this596.GlobalId=GlobalId;_this596.OwnerHistory=OwnerHistory;_this596.Name=Name;_this596.Description=Description;_this596.ApplicableOccurrence=ApplicableOccurrence;_this596.HasPropertySets=HasPropertySets;_this596.RepresentationMaps=RepresentationMaps;_this596.Tag=Tag;_this596.ElementType=ElementType;_this596.PredefinedType=PredefinedType;_this596.type=1457835157;return _this596;}return _createClass(IfcCurtainWallType);}(IfcBuildingElementType);IFC2X32.IfcCurtainWallType=IfcCurtainWallType;var IfcDimensionCurveDirectedCallout=/*#__PURE__*/function(_IfcDraughtingCallout4){_inherits(IfcDimensionCurveDirectedCallout,_IfcDraughtingCallout4);var _super600=_createSuper(IfcDimensionCurveDirectedCallout);function IfcDimensionCurveDirectedCallout(expressID,Contents){var _this597;_classCallCheck(this,IfcDimensionCurveDirectedCallout);_this597=_super600.call(this,expressID,Contents);_this597.Contents=Contents;_this597.type=681481545;return _this597;}return _createClass(IfcDimensionCurveDirectedCallout);}(IfcDraughtingCallout);IFC2X32.IfcDimensionCurveDirectedCallout=IfcDimensionCurveDirectedCallout;var IfcDistributionElementType=/*#__PURE__*/function(_IfcElementType5){_inherits(IfcDistributionElementType,_IfcElementType5);var _super601=_createSuper(IfcDistributionElementType);function IfcDistributionElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this598;_classCallCheck(this,IfcDistributionElementType);_this598=_super601.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this598.GlobalId=GlobalId;_this598.OwnerHistory=OwnerHistory;_this598.Name=Name;_this598.Description=Description;_this598.ApplicableOccurrence=ApplicableOccurrence;_this598.HasPropertySets=HasPropertySets;_this598.RepresentationMaps=RepresentationMaps;_this598.Tag=Tag;_this598.ElementType=ElementType;_this598.type=3256556792;return _this598;}return _createClass(IfcDistributionElementType);}(IfcElementType);IFC2X32.IfcDistributionElementType=IfcDistributionElementType;var IfcDistributionFlowElementType=/*#__PURE__*/function(_IfcDistributionEleme){_inherits(IfcDistributionFlowElementType,_IfcDistributionEleme);var _super602=_createSuper(IfcDistributionFlowElementType);function IfcDistributionFlowElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this599;_classCallCheck(this,IfcDistributionFlowElementType);_this599=_super602.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this599.GlobalId=GlobalId;_this599.OwnerHistory=OwnerHistory;_this599.Name=Name;_this599.Description=Description;_this599.ApplicableOccurrence=ApplicableOccurrence;_this599.HasPropertySets=HasPropertySets;_this599.RepresentationMaps=RepresentationMaps;_this599.Tag=Tag;_this599.ElementType=ElementType;_this599.type=3849074793;return _this599;}return _createClass(IfcDistributionFlowElementType);}(IfcDistributionElementType);IFC2X32.IfcDistributionFlowElementType=IfcDistributionFlowElementType;var IfcElectricalBaseProperties=/*#__PURE__*/function(_IfcEnergyProperties){_inherits(IfcElectricalBaseProperties,_IfcEnergyProperties);var _super603=_createSuper(IfcElectricalBaseProperties);function IfcElectricalBaseProperties(expressID,GlobalId,OwnerHistory,Name,Description,EnergySequence,UserDefinedEnergySequence,ElectricCurrentType,InputVoltage,InputFrequency,FullLoadCurrent,MinimumCircuitCurrent,MaximumPowerInput,RatedPowerInput,InputPhase){var _this600;_classCallCheck(this,IfcElectricalBaseProperties);_this600=_super603.call(this,expressID,GlobalId,OwnerHistory,Name,Description,EnergySequence,UserDefinedEnergySequence);_this600.GlobalId=GlobalId;_this600.OwnerHistory=OwnerHistory;_this600.Name=Name;_this600.Description=Description;_this600.EnergySequence=EnergySequence;_this600.UserDefinedEnergySequence=UserDefinedEnergySequence;_this600.ElectricCurrentType=ElectricCurrentType;_this600.InputVoltage=InputVoltage;_this600.InputFrequency=InputFrequency;_this600.FullLoadCurrent=FullLoadCurrent;_this600.MinimumCircuitCurrent=MinimumCircuitCurrent;_this600.MaximumPowerInput=MaximumPowerInput;_this600.RatedPowerInput=RatedPowerInput;_this600.InputPhase=InputPhase;_this600.type=360485395;return _this600;}return _createClass(IfcElectricalBaseProperties);}(IfcEnergyProperties);IFC2X32.IfcElectricalBaseProperties=IfcElectricalBaseProperties;var IfcElement=/*#__PURE__*/function(_IfcProduct6){_inherits(IfcElement,_IfcProduct6);var _super604=_createSuper(IfcElement);function IfcElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this601;_classCallCheck(this,IfcElement);_this601=_super604.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this601.GlobalId=GlobalId;_this601.OwnerHistory=OwnerHistory;_this601.Name=Name;_this601.Description=Description;_this601.ObjectType=ObjectType;_this601.ObjectPlacement=ObjectPlacement;_this601.Representation=Representation;_this601.Tag=Tag;_this601.type=1758889154;return _this601;}return _createClass(IfcElement);}(IfcProduct);IFC2X32.IfcElement=IfcElement;var IfcElementAssembly=/*#__PURE__*/function(_IfcElement){_inherits(IfcElementAssembly,_IfcElement);var _super605=_createSuper(IfcElementAssembly);function IfcElementAssembly(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,AssemblyPlace,PredefinedType){var _this602;_classCallCheck(this,IfcElementAssembly);_this602=_super605.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this602.GlobalId=GlobalId;_this602.OwnerHistory=OwnerHistory;_this602.Name=Name;_this602.Description=Description;_this602.ObjectType=ObjectType;_this602.ObjectPlacement=ObjectPlacement;_this602.Representation=Representation;_this602.Tag=Tag;_this602.AssemblyPlace=AssemblyPlace;_this602.PredefinedType=PredefinedType;_this602.type=4123344466;return _this602;}return _createClass(IfcElementAssembly);}(IfcElement);IFC2X32.IfcElementAssembly=IfcElementAssembly;var IfcElementComponent=/*#__PURE__*/function(_IfcElement2){_inherits(IfcElementComponent,_IfcElement2);var _super606=_createSuper(IfcElementComponent);function IfcElementComponent(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this603;_classCallCheck(this,IfcElementComponent);_this603=_super606.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this603.GlobalId=GlobalId;_this603.OwnerHistory=OwnerHistory;_this603.Name=Name;_this603.Description=Description;_this603.ObjectType=ObjectType;_this603.ObjectPlacement=ObjectPlacement;_this603.Representation=Representation;_this603.Tag=Tag;_this603.type=1623761950;return _this603;}return _createClass(IfcElementComponent);}(IfcElement);IFC2X32.IfcElementComponent=IfcElementComponent;var IfcElementComponentType=/*#__PURE__*/function(_IfcElementType6){_inherits(IfcElementComponentType,_IfcElementType6);var _super607=_createSuper(IfcElementComponentType);function IfcElementComponentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this604;_classCallCheck(this,IfcElementComponentType);_this604=_super607.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this604.GlobalId=GlobalId;_this604.OwnerHistory=OwnerHistory;_this604.Name=Name;_this604.Description=Description;_this604.ApplicableOccurrence=ApplicableOccurrence;_this604.HasPropertySets=HasPropertySets;_this604.RepresentationMaps=RepresentationMaps;_this604.Tag=Tag;_this604.ElementType=ElementType;_this604.type=2590856083;return _this604;}return _createClass(IfcElementComponentType);}(IfcElementType);IFC2X32.IfcElementComponentType=IfcElementComponentType;var IfcEllipse=/*#__PURE__*/function(_IfcConic){_inherits(IfcEllipse,_IfcConic);var _super608=_createSuper(IfcEllipse);function IfcEllipse(expressID,Position,SemiAxis1,SemiAxis2){var _this605;_classCallCheck(this,IfcEllipse);_this605=_super608.call(this,expressID,Position);_this605.Position=Position;_this605.SemiAxis1=SemiAxis1;_this605.SemiAxis2=SemiAxis2;_this605.type=1704287377;return _this605;}return _createClass(IfcEllipse);}(IfcConic);IFC2X32.IfcEllipse=IfcEllipse;var IfcEnergyConversionDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE){_inherits(IfcEnergyConversionDeviceType,_IfcDistributionFlowE);var _super609=_createSuper(IfcEnergyConversionDeviceType);function IfcEnergyConversionDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this606;_classCallCheck(this,IfcEnergyConversionDeviceType);_this606=_super609.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this606.GlobalId=GlobalId;_this606.OwnerHistory=OwnerHistory;_this606.Name=Name;_this606.Description=Description;_this606.ApplicableOccurrence=ApplicableOccurrence;_this606.HasPropertySets=HasPropertySets;_this606.RepresentationMaps=RepresentationMaps;_this606.Tag=Tag;_this606.ElementType=ElementType;_this606.type=2107101300;return _this606;}return _createClass(IfcEnergyConversionDeviceType);}(IfcDistributionFlowElementType);IFC2X32.IfcEnergyConversionDeviceType=IfcEnergyConversionDeviceType;var IfcEquipmentElement=/*#__PURE__*/function(_IfcElement3){_inherits(IfcEquipmentElement,_IfcElement3);var _super610=_createSuper(IfcEquipmentElement);function IfcEquipmentElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this607;_classCallCheck(this,IfcEquipmentElement);_this607=_super610.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this607.GlobalId=GlobalId;_this607.OwnerHistory=OwnerHistory;_this607.Name=Name;_this607.Description=Description;_this607.ObjectType=ObjectType;_this607.ObjectPlacement=ObjectPlacement;_this607.Representation=Representation;_this607.Tag=Tag;_this607.type=1962604670;return _this607;}return _createClass(IfcEquipmentElement);}(IfcElement);IFC2X32.IfcEquipmentElement=IfcEquipmentElement;var IfcEquipmentStandard=/*#__PURE__*/function(_IfcControl3){_inherits(IfcEquipmentStandard,_IfcControl3);var _super611=_createSuper(IfcEquipmentStandard);function IfcEquipmentStandard(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this608;_classCallCheck(this,IfcEquipmentStandard);_this608=_super611.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this608.GlobalId=GlobalId;_this608.OwnerHistory=OwnerHistory;_this608.Name=Name;_this608.Description=Description;_this608.ObjectType=ObjectType;_this608.type=3272907226;return _this608;}return _createClass(IfcEquipmentStandard);}(IfcControl);IFC2X32.IfcEquipmentStandard=IfcEquipmentStandard;var IfcEvaporativeCoolerType=/*#__PURE__*/function(_IfcEnergyConversionD){_inherits(IfcEvaporativeCoolerType,_IfcEnergyConversionD);var _super612=_createSuper(IfcEvaporativeCoolerType);function IfcEvaporativeCoolerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this609;_classCallCheck(this,IfcEvaporativeCoolerType);_this609=_super612.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this609.GlobalId=GlobalId;_this609.OwnerHistory=OwnerHistory;_this609.Name=Name;_this609.Description=Description;_this609.ApplicableOccurrence=ApplicableOccurrence;_this609.HasPropertySets=HasPropertySets;_this609.RepresentationMaps=RepresentationMaps;_this609.Tag=Tag;_this609.ElementType=ElementType;_this609.PredefinedType=PredefinedType;_this609.type=3174744832;return _this609;}return _createClass(IfcEvaporativeCoolerType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcEvaporativeCoolerType=IfcEvaporativeCoolerType;var IfcEvaporatorType=/*#__PURE__*/function(_IfcEnergyConversionD2){_inherits(IfcEvaporatorType,_IfcEnergyConversionD2);var _super613=_createSuper(IfcEvaporatorType);function IfcEvaporatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this610;_classCallCheck(this,IfcEvaporatorType);_this610=_super613.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this610.GlobalId=GlobalId;_this610.OwnerHistory=OwnerHistory;_this610.Name=Name;_this610.Description=Description;_this610.ApplicableOccurrence=ApplicableOccurrence;_this610.HasPropertySets=HasPropertySets;_this610.RepresentationMaps=RepresentationMaps;_this610.Tag=Tag;_this610.ElementType=ElementType;_this610.PredefinedType=PredefinedType;_this610.type=3390157468;return _this610;}return _createClass(IfcEvaporatorType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcEvaporatorType=IfcEvaporatorType;var IfcFacetedBrep=/*#__PURE__*/function(_IfcManifoldSolidBrep){_inherits(IfcFacetedBrep,_IfcManifoldSolidBrep);var _super614=_createSuper(IfcFacetedBrep);function IfcFacetedBrep(expressID,Outer){var _this611;_classCallCheck(this,IfcFacetedBrep);_this611=_super614.call(this,expressID,Outer);_this611.Outer=Outer;_this611.type=807026263;return _this611;}return _createClass(IfcFacetedBrep);}(IfcManifoldSolidBrep);IFC2X32.IfcFacetedBrep=IfcFacetedBrep;var IfcFacetedBrepWithVoids=/*#__PURE__*/function(_IfcManifoldSolidBrep2){_inherits(IfcFacetedBrepWithVoids,_IfcManifoldSolidBrep2);var _super615=_createSuper(IfcFacetedBrepWithVoids);function IfcFacetedBrepWithVoids(expressID,Outer,Voids){var _this612;_classCallCheck(this,IfcFacetedBrepWithVoids);_this612=_super615.call(this,expressID,Outer);_this612.Outer=Outer;_this612.Voids=Voids;_this612.type=3737207727;return _this612;}return _createClass(IfcFacetedBrepWithVoids);}(IfcManifoldSolidBrep);IFC2X32.IfcFacetedBrepWithVoids=IfcFacetedBrepWithVoids;var IfcFastener=/*#__PURE__*/function(_IfcElementComponent){_inherits(IfcFastener,_IfcElementComponent);var _super616=_createSuper(IfcFastener);function IfcFastener(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this613;_classCallCheck(this,IfcFastener);_this613=_super616.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this613.GlobalId=GlobalId;_this613.OwnerHistory=OwnerHistory;_this613.Name=Name;_this613.Description=Description;_this613.ObjectType=ObjectType;_this613.ObjectPlacement=ObjectPlacement;_this613.Representation=Representation;_this613.Tag=Tag;_this613.type=647756555;return _this613;}return _createClass(IfcFastener);}(IfcElementComponent);IFC2X32.IfcFastener=IfcFastener;var IfcFastenerType=/*#__PURE__*/function(_IfcElementComponentT){_inherits(IfcFastenerType,_IfcElementComponentT);var _super617=_createSuper(IfcFastenerType);function IfcFastenerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this614;_classCallCheck(this,IfcFastenerType);_this614=_super617.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this614.GlobalId=GlobalId;_this614.OwnerHistory=OwnerHistory;_this614.Name=Name;_this614.Description=Description;_this614.ApplicableOccurrence=ApplicableOccurrence;_this614.HasPropertySets=HasPropertySets;_this614.RepresentationMaps=RepresentationMaps;_this614.Tag=Tag;_this614.ElementType=ElementType;_this614.type=2489546625;return _this614;}return _createClass(IfcFastenerType);}(IfcElementComponentType);IFC2X32.IfcFastenerType=IfcFastenerType;var IfcFeatureElement=/*#__PURE__*/function(_IfcElement4){_inherits(IfcFeatureElement,_IfcElement4);var _super618=_createSuper(IfcFeatureElement);function IfcFeatureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this615;_classCallCheck(this,IfcFeatureElement);_this615=_super618.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this615.GlobalId=GlobalId;_this615.OwnerHistory=OwnerHistory;_this615.Name=Name;_this615.Description=Description;_this615.ObjectType=ObjectType;_this615.ObjectPlacement=ObjectPlacement;_this615.Representation=Representation;_this615.Tag=Tag;_this615.type=2827207264;return _this615;}return _createClass(IfcFeatureElement);}(IfcElement);IFC2X32.IfcFeatureElement=IfcFeatureElement;var IfcFeatureElementAddition=/*#__PURE__*/function(_IfcFeatureElement){_inherits(IfcFeatureElementAddition,_IfcFeatureElement);var _super619=_createSuper(IfcFeatureElementAddition);function IfcFeatureElementAddition(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this616;_classCallCheck(this,IfcFeatureElementAddition);_this616=_super619.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this616.GlobalId=GlobalId;_this616.OwnerHistory=OwnerHistory;_this616.Name=Name;_this616.Description=Description;_this616.ObjectType=ObjectType;_this616.ObjectPlacement=ObjectPlacement;_this616.Representation=Representation;_this616.Tag=Tag;_this616.type=2143335405;return _this616;}return _createClass(IfcFeatureElementAddition);}(IfcFeatureElement);IFC2X32.IfcFeatureElementAddition=IfcFeatureElementAddition;var IfcFeatureElementSubtraction=/*#__PURE__*/function(_IfcFeatureElement2){_inherits(IfcFeatureElementSubtraction,_IfcFeatureElement2);var _super620=_createSuper(IfcFeatureElementSubtraction);function IfcFeatureElementSubtraction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this617;_classCallCheck(this,IfcFeatureElementSubtraction);_this617=_super620.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this617.GlobalId=GlobalId;_this617.OwnerHistory=OwnerHistory;_this617.Name=Name;_this617.Description=Description;_this617.ObjectType=ObjectType;_this617.ObjectPlacement=ObjectPlacement;_this617.Representation=Representation;_this617.Tag=Tag;_this617.type=1287392070;return _this617;}return _createClass(IfcFeatureElementSubtraction);}(IfcFeatureElement);IFC2X32.IfcFeatureElementSubtraction=IfcFeatureElementSubtraction;var IfcFlowControllerType=/*#__PURE__*/function(_IfcDistributionFlowE2){_inherits(IfcFlowControllerType,_IfcDistributionFlowE2);var _super621=_createSuper(IfcFlowControllerType);function IfcFlowControllerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this618;_classCallCheck(this,IfcFlowControllerType);_this618=_super621.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this618.GlobalId=GlobalId;_this618.OwnerHistory=OwnerHistory;_this618.Name=Name;_this618.Description=Description;_this618.ApplicableOccurrence=ApplicableOccurrence;_this618.HasPropertySets=HasPropertySets;_this618.RepresentationMaps=RepresentationMaps;_this618.Tag=Tag;_this618.ElementType=ElementType;_this618.type=3907093117;return _this618;}return _createClass(IfcFlowControllerType);}(IfcDistributionFlowElementType);IFC2X32.IfcFlowControllerType=IfcFlowControllerType;var IfcFlowFittingType=/*#__PURE__*/function(_IfcDistributionFlowE3){_inherits(IfcFlowFittingType,_IfcDistributionFlowE3);var _super622=_createSuper(IfcFlowFittingType);function IfcFlowFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this619;_classCallCheck(this,IfcFlowFittingType);_this619=_super622.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this619.GlobalId=GlobalId;_this619.OwnerHistory=OwnerHistory;_this619.Name=Name;_this619.Description=Description;_this619.ApplicableOccurrence=ApplicableOccurrence;_this619.HasPropertySets=HasPropertySets;_this619.RepresentationMaps=RepresentationMaps;_this619.Tag=Tag;_this619.ElementType=ElementType;_this619.type=3198132628;return _this619;}return _createClass(IfcFlowFittingType);}(IfcDistributionFlowElementType);IFC2X32.IfcFlowFittingType=IfcFlowFittingType;var IfcFlowMeterType=/*#__PURE__*/function(_IfcFlowControllerTyp){_inherits(IfcFlowMeterType,_IfcFlowControllerTyp);var _super623=_createSuper(IfcFlowMeterType);function IfcFlowMeterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this620;_classCallCheck(this,IfcFlowMeterType);_this620=_super623.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this620.GlobalId=GlobalId;_this620.OwnerHistory=OwnerHistory;_this620.Name=Name;_this620.Description=Description;_this620.ApplicableOccurrence=ApplicableOccurrence;_this620.HasPropertySets=HasPropertySets;_this620.RepresentationMaps=RepresentationMaps;_this620.Tag=Tag;_this620.ElementType=ElementType;_this620.PredefinedType=PredefinedType;_this620.type=3815607619;return _this620;}return _createClass(IfcFlowMeterType);}(IfcFlowControllerType);IFC2X32.IfcFlowMeterType=IfcFlowMeterType;var IfcFlowMovingDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE4){_inherits(IfcFlowMovingDeviceType,_IfcDistributionFlowE4);var _super624=_createSuper(IfcFlowMovingDeviceType);function IfcFlowMovingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this621;_classCallCheck(this,IfcFlowMovingDeviceType);_this621=_super624.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this621.GlobalId=GlobalId;_this621.OwnerHistory=OwnerHistory;_this621.Name=Name;_this621.Description=Description;_this621.ApplicableOccurrence=ApplicableOccurrence;_this621.HasPropertySets=HasPropertySets;_this621.RepresentationMaps=RepresentationMaps;_this621.Tag=Tag;_this621.ElementType=ElementType;_this621.type=1482959167;return _this621;}return _createClass(IfcFlowMovingDeviceType);}(IfcDistributionFlowElementType);IFC2X32.IfcFlowMovingDeviceType=IfcFlowMovingDeviceType;var IfcFlowSegmentType=/*#__PURE__*/function(_IfcDistributionFlowE5){_inherits(IfcFlowSegmentType,_IfcDistributionFlowE5);var _super625=_createSuper(IfcFlowSegmentType);function IfcFlowSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this622;_classCallCheck(this,IfcFlowSegmentType);_this622=_super625.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this622.GlobalId=GlobalId;_this622.OwnerHistory=OwnerHistory;_this622.Name=Name;_this622.Description=Description;_this622.ApplicableOccurrence=ApplicableOccurrence;_this622.HasPropertySets=HasPropertySets;_this622.RepresentationMaps=RepresentationMaps;_this622.Tag=Tag;_this622.ElementType=ElementType;_this622.type=1834744321;return _this622;}return _createClass(IfcFlowSegmentType);}(IfcDistributionFlowElementType);IFC2X32.IfcFlowSegmentType=IfcFlowSegmentType;var IfcFlowStorageDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE6){_inherits(IfcFlowStorageDeviceType,_IfcDistributionFlowE6);var _super626=_createSuper(IfcFlowStorageDeviceType);function IfcFlowStorageDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this623;_classCallCheck(this,IfcFlowStorageDeviceType);_this623=_super626.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this623.GlobalId=GlobalId;_this623.OwnerHistory=OwnerHistory;_this623.Name=Name;_this623.Description=Description;_this623.ApplicableOccurrence=ApplicableOccurrence;_this623.HasPropertySets=HasPropertySets;_this623.RepresentationMaps=RepresentationMaps;_this623.Tag=Tag;_this623.ElementType=ElementType;_this623.type=1339347760;return _this623;}return _createClass(IfcFlowStorageDeviceType);}(IfcDistributionFlowElementType);IFC2X32.IfcFlowStorageDeviceType=IfcFlowStorageDeviceType;var IfcFlowTerminalType=/*#__PURE__*/function(_IfcDistributionFlowE7){_inherits(IfcFlowTerminalType,_IfcDistributionFlowE7);var _super627=_createSuper(IfcFlowTerminalType);function IfcFlowTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this624;_classCallCheck(this,IfcFlowTerminalType);_this624=_super627.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this624.GlobalId=GlobalId;_this624.OwnerHistory=OwnerHistory;_this624.Name=Name;_this624.Description=Description;_this624.ApplicableOccurrence=ApplicableOccurrence;_this624.HasPropertySets=HasPropertySets;_this624.RepresentationMaps=RepresentationMaps;_this624.Tag=Tag;_this624.ElementType=ElementType;_this624.type=2297155007;return _this624;}return _createClass(IfcFlowTerminalType);}(IfcDistributionFlowElementType);IFC2X32.IfcFlowTerminalType=IfcFlowTerminalType;var IfcFlowTreatmentDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE8){_inherits(IfcFlowTreatmentDeviceType,_IfcDistributionFlowE8);var _super628=_createSuper(IfcFlowTreatmentDeviceType);function IfcFlowTreatmentDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this625;_classCallCheck(this,IfcFlowTreatmentDeviceType);_this625=_super628.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this625.GlobalId=GlobalId;_this625.OwnerHistory=OwnerHistory;_this625.Name=Name;_this625.Description=Description;_this625.ApplicableOccurrence=ApplicableOccurrence;_this625.HasPropertySets=HasPropertySets;_this625.RepresentationMaps=RepresentationMaps;_this625.Tag=Tag;_this625.ElementType=ElementType;_this625.type=3009222698;return _this625;}return _createClass(IfcFlowTreatmentDeviceType);}(IfcDistributionFlowElementType);IFC2X32.IfcFlowTreatmentDeviceType=IfcFlowTreatmentDeviceType;var IfcFurnishingElement=/*#__PURE__*/function(_IfcElement5){_inherits(IfcFurnishingElement,_IfcElement5);var _super629=_createSuper(IfcFurnishingElement);function IfcFurnishingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this626;_classCallCheck(this,IfcFurnishingElement);_this626=_super629.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this626.GlobalId=GlobalId;_this626.OwnerHistory=OwnerHistory;_this626.Name=Name;_this626.Description=Description;_this626.ObjectType=ObjectType;_this626.ObjectPlacement=ObjectPlacement;_this626.Representation=Representation;_this626.Tag=Tag;_this626.type=263784265;return _this626;}return _createClass(IfcFurnishingElement);}(IfcElement);IFC2X32.IfcFurnishingElement=IfcFurnishingElement;var IfcFurnitureStandard=/*#__PURE__*/function(_IfcControl4){_inherits(IfcFurnitureStandard,_IfcControl4);var _super630=_createSuper(IfcFurnitureStandard);function IfcFurnitureStandard(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this627;_classCallCheck(this,IfcFurnitureStandard);_this627=_super630.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this627.GlobalId=GlobalId;_this627.OwnerHistory=OwnerHistory;_this627.Name=Name;_this627.Description=Description;_this627.ObjectType=ObjectType;_this627.type=814719939;return _this627;}return _createClass(IfcFurnitureStandard);}(IfcControl);IFC2X32.IfcFurnitureStandard=IfcFurnitureStandard;var IfcGasTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType){_inherits(IfcGasTerminalType,_IfcFlowTerminalType);var _super631=_createSuper(IfcGasTerminalType);function IfcGasTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this628;_classCallCheck(this,IfcGasTerminalType);_this628=_super631.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this628.GlobalId=GlobalId;_this628.OwnerHistory=OwnerHistory;_this628.Name=Name;_this628.Description=Description;_this628.ApplicableOccurrence=ApplicableOccurrence;_this628.HasPropertySets=HasPropertySets;_this628.RepresentationMaps=RepresentationMaps;_this628.Tag=Tag;_this628.ElementType=ElementType;_this628.PredefinedType=PredefinedType;_this628.type=200128114;return _this628;}return _createClass(IfcGasTerminalType);}(IfcFlowTerminalType);IFC2X32.IfcGasTerminalType=IfcGasTerminalType;var IfcGrid=/*#__PURE__*/function(_IfcProduct7){_inherits(IfcGrid,_IfcProduct7);var _super632=_createSuper(IfcGrid);function IfcGrid(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,UAxes,VAxes,WAxes){var _this629;_classCallCheck(this,IfcGrid);_this629=_super632.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this629.GlobalId=GlobalId;_this629.OwnerHistory=OwnerHistory;_this629.Name=Name;_this629.Description=Description;_this629.ObjectType=ObjectType;_this629.ObjectPlacement=ObjectPlacement;_this629.Representation=Representation;_this629.UAxes=UAxes;_this629.VAxes=VAxes;_this629.WAxes=WAxes;_this629.type=3009204131;return _this629;}return _createClass(IfcGrid);}(IfcProduct);IFC2X32.IfcGrid=IfcGrid;var IfcGroup=/*#__PURE__*/function(_IfcObject7){_inherits(IfcGroup,_IfcObject7);var _super633=_createSuper(IfcGroup);function IfcGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this630;_classCallCheck(this,IfcGroup);_this630=_super633.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this630.GlobalId=GlobalId;_this630.OwnerHistory=OwnerHistory;_this630.Name=Name;_this630.Description=Description;_this630.ObjectType=ObjectType;_this630.type=2706460486;return _this630;}return _createClass(IfcGroup);}(IfcObject);IFC2X32.IfcGroup=IfcGroup;var IfcHeatExchangerType=/*#__PURE__*/function(_IfcEnergyConversionD3){_inherits(IfcHeatExchangerType,_IfcEnergyConversionD3);var _super634=_createSuper(IfcHeatExchangerType);function IfcHeatExchangerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this631;_classCallCheck(this,IfcHeatExchangerType);_this631=_super634.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this631.GlobalId=GlobalId;_this631.OwnerHistory=OwnerHistory;_this631.Name=Name;_this631.Description=Description;_this631.ApplicableOccurrence=ApplicableOccurrence;_this631.HasPropertySets=HasPropertySets;_this631.RepresentationMaps=RepresentationMaps;_this631.Tag=Tag;_this631.ElementType=ElementType;_this631.PredefinedType=PredefinedType;_this631.type=1251058090;return _this631;}return _createClass(IfcHeatExchangerType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcHeatExchangerType=IfcHeatExchangerType;var IfcHumidifierType=/*#__PURE__*/function(_IfcEnergyConversionD4){_inherits(IfcHumidifierType,_IfcEnergyConversionD4);var _super635=_createSuper(IfcHumidifierType);function IfcHumidifierType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this632;_classCallCheck(this,IfcHumidifierType);_this632=_super635.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this632.GlobalId=GlobalId;_this632.OwnerHistory=OwnerHistory;_this632.Name=Name;_this632.Description=Description;_this632.ApplicableOccurrence=ApplicableOccurrence;_this632.HasPropertySets=HasPropertySets;_this632.RepresentationMaps=RepresentationMaps;_this632.Tag=Tag;_this632.ElementType=ElementType;_this632.PredefinedType=PredefinedType;_this632.type=1806887404;return _this632;}return _createClass(IfcHumidifierType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcHumidifierType=IfcHumidifierType;var IfcInventory=/*#__PURE__*/function(_IfcGroup){_inherits(IfcInventory,_IfcGroup);var _super636=_createSuper(IfcInventory);function IfcInventory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,InventoryType,Jurisdiction,ResponsiblePersons,LastUpdateDate,CurrentValue,OriginalValue){var _this633;_classCallCheck(this,IfcInventory);_this633=_super636.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this633.GlobalId=GlobalId;_this633.OwnerHistory=OwnerHistory;_this633.Name=Name;_this633.Description=Description;_this633.ObjectType=ObjectType;_this633.InventoryType=InventoryType;_this633.Jurisdiction=Jurisdiction;_this633.ResponsiblePersons=ResponsiblePersons;_this633.LastUpdateDate=LastUpdateDate;_this633.CurrentValue=CurrentValue;_this633.OriginalValue=OriginalValue;_this633.type=2391368822;return _this633;}return _createClass(IfcInventory);}(IfcGroup);IFC2X32.IfcInventory=IfcInventory;var IfcJunctionBoxType=/*#__PURE__*/function(_IfcFlowFittingType){_inherits(IfcJunctionBoxType,_IfcFlowFittingType);var _super637=_createSuper(IfcJunctionBoxType);function IfcJunctionBoxType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this634;_classCallCheck(this,IfcJunctionBoxType);_this634=_super637.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this634.GlobalId=GlobalId;_this634.OwnerHistory=OwnerHistory;_this634.Name=Name;_this634.Description=Description;_this634.ApplicableOccurrence=ApplicableOccurrence;_this634.HasPropertySets=HasPropertySets;_this634.RepresentationMaps=RepresentationMaps;_this634.Tag=Tag;_this634.ElementType=ElementType;_this634.PredefinedType=PredefinedType;_this634.type=4288270099;return _this634;}return _createClass(IfcJunctionBoxType);}(IfcFlowFittingType);IFC2X32.IfcJunctionBoxType=IfcJunctionBoxType;var IfcLaborResource=/*#__PURE__*/function(_IfcConstructionResou2){_inherits(IfcLaborResource,_IfcConstructionResou2);var _super638=_createSuper(IfcLaborResource);function IfcLaborResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity,SkillSet){var _this635;_classCallCheck(this,IfcLaborResource);_this635=_super638.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity);_this635.GlobalId=GlobalId;_this635.OwnerHistory=OwnerHistory;_this635.Name=Name;_this635.Description=Description;_this635.ObjectType=ObjectType;_this635.ResourceIdentifier=ResourceIdentifier;_this635.ResourceGroup=ResourceGroup;_this635.ResourceConsumption=ResourceConsumption;_this635.BaseQuantity=BaseQuantity;_this635.SkillSet=SkillSet;_this635.type=3827777499;return _this635;}return _createClass(IfcLaborResource);}(IfcConstructionResource);IFC2X32.IfcLaborResource=IfcLaborResource;var IfcLampType=/*#__PURE__*/function(_IfcFlowTerminalType2){_inherits(IfcLampType,_IfcFlowTerminalType2);var _super639=_createSuper(IfcLampType);function IfcLampType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this636;_classCallCheck(this,IfcLampType);_this636=_super639.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this636.GlobalId=GlobalId;_this636.OwnerHistory=OwnerHistory;_this636.Name=Name;_this636.Description=Description;_this636.ApplicableOccurrence=ApplicableOccurrence;_this636.HasPropertySets=HasPropertySets;_this636.RepresentationMaps=RepresentationMaps;_this636.Tag=Tag;_this636.ElementType=ElementType;_this636.PredefinedType=PredefinedType;_this636.type=1051575348;return _this636;}return _createClass(IfcLampType);}(IfcFlowTerminalType);IFC2X32.IfcLampType=IfcLampType;var IfcLightFixtureType=/*#__PURE__*/function(_IfcFlowTerminalType3){_inherits(IfcLightFixtureType,_IfcFlowTerminalType3);var _super640=_createSuper(IfcLightFixtureType);function IfcLightFixtureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this637;_classCallCheck(this,IfcLightFixtureType);_this637=_super640.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this637.GlobalId=GlobalId;_this637.OwnerHistory=OwnerHistory;_this637.Name=Name;_this637.Description=Description;_this637.ApplicableOccurrence=ApplicableOccurrence;_this637.HasPropertySets=HasPropertySets;_this637.RepresentationMaps=RepresentationMaps;_this637.Tag=Tag;_this637.ElementType=ElementType;_this637.PredefinedType=PredefinedType;_this637.type=1161773419;return _this637;}return _createClass(IfcLightFixtureType);}(IfcFlowTerminalType);IFC2X32.IfcLightFixtureType=IfcLightFixtureType;var IfcLinearDimension=/*#__PURE__*/function(_IfcDimensionCurveDir){_inherits(IfcLinearDimension,_IfcDimensionCurveDir);var _super641=_createSuper(IfcLinearDimension);function IfcLinearDimension(expressID,Contents){var _this638;_classCallCheck(this,IfcLinearDimension);_this638=_super641.call(this,expressID,Contents);_this638.Contents=Contents;_this638.type=2506943328;return _this638;}return _createClass(IfcLinearDimension);}(IfcDimensionCurveDirectedCallout);IFC2X32.IfcLinearDimension=IfcLinearDimension;var IfcMechanicalFastener=/*#__PURE__*/function(_IfcFastener){_inherits(IfcMechanicalFastener,_IfcFastener);var _super642=_createSuper(IfcMechanicalFastener);function IfcMechanicalFastener(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,NominalDiameter,NominalLength){var _this639;_classCallCheck(this,IfcMechanicalFastener);_this639=_super642.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this639.GlobalId=GlobalId;_this639.OwnerHistory=OwnerHistory;_this639.Name=Name;_this639.Description=Description;_this639.ObjectType=ObjectType;_this639.ObjectPlacement=ObjectPlacement;_this639.Representation=Representation;_this639.Tag=Tag;_this639.NominalDiameter=NominalDiameter;_this639.NominalLength=NominalLength;_this639.type=377706215;return _this639;}return _createClass(IfcMechanicalFastener);}(IfcFastener);IFC2X32.IfcMechanicalFastener=IfcMechanicalFastener;var IfcMechanicalFastenerType=/*#__PURE__*/function(_IfcFastenerType){_inherits(IfcMechanicalFastenerType,_IfcFastenerType);var _super643=_createSuper(IfcMechanicalFastenerType);function IfcMechanicalFastenerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this640;_classCallCheck(this,IfcMechanicalFastenerType);_this640=_super643.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this640.GlobalId=GlobalId;_this640.OwnerHistory=OwnerHistory;_this640.Name=Name;_this640.Description=Description;_this640.ApplicableOccurrence=ApplicableOccurrence;_this640.HasPropertySets=HasPropertySets;_this640.RepresentationMaps=RepresentationMaps;_this640.Tag=Tag;_this640.ElementType=ElementType;_this640.type=2108223431;return _this640;}return _createClass(IfcMechanicalFastenerType);}(IfcFastenerType);IFC2X32.IfcMechanicalFastenerType=IfcMechanicalFastenerType;var IfcMemberType=/*#__PURE__*/function(_IfcBuildingElementTy4){_inherits(IfcMemberType,_IfcBuildingElementTy4);var _super644=_createSuper(IfcMemberType);function IfcMemberType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this641;_classCallCheck(this,IfcMemberType);_this641=_super644.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this641.GlobalId=GlobalId;_this641.OwnerHistory=OwnerHistory;_this641.Name=Name;_this641.Description=Description;_this641.ApplicableOccurrence=ApplicableOccurrence;_this641.HasPropertySets=HasPropertySets;_this641.RepresentationMaps=RepresentationMaps;_this641.Tag=Tag;_this641.ElementType=ElementType;_this641.PredefinedType=PredefinedType;_this641.type=3181161470;return _this641;}return _createClass(IfcMemberType);}(IfcBuildingElementType);IFC2X32.IfcMemberType=IfcMemberType;var IfcMotorConnectionType=/*#__PURE__*/function(_IfcEnergyConversionD5){_inherits(IfcMotorConnectionType,_IfcEnergyConversionD5);var _super645=_createSuper(IfcMotorConnectionType);function IfcMotorConnectionType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this642;_classCallCheck(this,IfcMotorConnectionType);_this642=_super645.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this642.GlobalId=GlobalId;_this642.OwnerHistory=OwnerHistory;_this642.Name=Name;_this642.Description=Description;_this642.ApplicableOccurrence=ApplicableOccurrence;_this642.HasPropertySets=HasPropertySets;_this642.RepresentationMaps=RepresentationMaps;_this642.Tag=Tag;_this642.ElementType=ElementType;_this642.PredefinedType=PredefinedType;_this642.type=977012517;return _this642;}return _createClass(IfcMotorConnectionType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcMotorConnectionType=IfcMotorConnectionType;var IfcMove=/*#__PURE__*/function(_IfcTask){_inherits(IfcMove,_IfcTask);var _super646=_createSuper(IfcMove);function IfcMove(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TaskId,Status,WorkMethod,IsMilestone,Priority,MoveFrom,MoveTo,PunchList){var _this643;_classCallCheck(this,IfcMove);_this643=_super646.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TaskId,Status,WorkMethod,IsMilestone,Priority);_this643.GlobalId=GlobalId;_this643.OwnerHistory=OwnerHistory;_this643.Name=Name;_this643.Description=Description;_this643.ObjectType=ObjectType;_this643.TaskId=TaskId;_this643.Status=Status;_this643.WorkMethod=WorkMethod;_this643.IsMilestone=IsMilestone;_this643.Priority=Priority;_this643.MoveFrom=MoveFrom;_this643.MoveTo=MoveTo;_this643.PunchList=PunchList;_this643.type=1916936684;return _this643;}return _createClass(IfcMove);}(IfcTask);IFC2X32.IfcMove=IfcMove;var IfcOccupant=/*#__PURE__*/function(_IfcActor){_inherits(IfcOccupant,_IfcActor);var _super647=_createSuper(IfcOccupant);function IfcOccupant(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor,PredefinedType){var _this644;_classCallCheck(this,IfcOccupant);_this644=_super647.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor);_this644.GlobalId=GlobalId;_this644.OwnerHistory=OwnerHistory;_this644.Name=Name;_this644.Description=Description;_this644.ObjectType=ObjectType;_this644.TheActor=TheActor;_this644.PredefinedType=PredefinedType;_this644.type=4143007308;return _this644;}return _createClass(IfcOccupant);}(IfcActor);IFC2X32.IfcOccupant=IfcOccupant;var IfcOpeningElement=/*#__PURE__*/function(_IfcFeatureElementSub){_inherits(IfcOpeningElement,_IfcFeatureElementSub);var _super648=_createSuper(IfcOpeningElement);function IfcOpeningElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this645;_classCallCheck(this,IfcOpeningElement);_this645=_super648.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this645.GlobalId=GlobalId;_this645.OwnerHistory=OwnerHistory;_this645.Name=Name;_this645.Description=Description;_this645.ObjectType=ObjectType;_this645.ObjectPlacement=ObjectPlacement;_this645.Representation=Representation;_this645.Tag=Tag;_this645.type=3588315303;return _this645;}return _createClass(IfcOpeningElement);}(IfcFeatureElementSubtraction);IFC2X32.IfcOpeningElement=IfcOpeningElement;var IfcOrderAction=/*#__PURE__*/function(_IfcTask2){_inherits(IfcOrderAction,_IfcTask2);var _super649=_createSuper(IfcOrderAction);function IfcOrderAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TaskId,Status,WorkMethod,IsMilestone,Priority,ActionID){var _this646;_classCallCheck(this,IfcOrderAction);_this646=_super649.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TaskId,Status,WorkMethod,IsMilestone,Priority);_this646.GlobalId=GlobalId;_this646.OwnerHistory=OwnerHistory;_this646.Name=Name;_this646.Description=Description;_this646.ObjectType=ObjectType;_this646.TaskId=TaskId;_this646.Status=Status;_this646.WorkMethod=WorkMethod;_this646.IsMilestone=IsMilestone;_this646.Priority=Priority;_this646.ActionID=ActionID;_this646.type=3425660407;return _this646;}return _createClass(IfcOrderAction);}(IfcTask);IFC2X32.IfcOrderAction=IfcOrderAction;var IfcOutletType=/*#__PURE__*/function(_IfcFlowTerminalType4){_inherits(IfcOutletType,_IfcFlowTerminalType4);var _super650=_createSuper(IfcOutletType);function IfcOutletType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this647;_classCallCheck(this,IfcOutletType);_this647=_super650.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this647.GlobalId=GlobalId;_this647.OwnerHistory=OwnerHistory;_this647.Name=Name;_this647.Description=Description;_this647.ApplicableOccurrence=ApplicableOccurrence;_this647.HasPropertySets=HasPropertySets;_this647.RepresentationMaps=RepresentationMaps;_this647.Tag=Tag;_this647.ElementType=ElementType;_this647.PredefinedType=PredefinedType;_this647.type=2837617999;return _this647;}return _createClass(IfcOutletType);}(IfcFlowTerminalType);IFC2X32.IfcOutletType=IfcOutletType;var IfcPerformanceHistory=/*#__PURE__*/function(_IfcControl5){_inherits(IfcPerformanceHistory,_IfcControl5);var _super651=_createSuper(IfcPerformanceHistory);function IfcPerformanceHistory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LifeCyclePhase){var _this648;_classCallCheck(this,IfcPerformanceHistory);_this648=_super651.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this648.GlobalId=GlobalId;_this648.OwnerHistory=OwnerHistory;_this648.Name=Name;_this648.Description=Description;_this648.ObjectType=ObjectType;_this648.LifeCyclePhase=LifeCyclePhase;_this648.type=2382730787;return _this648;}return _createClass(IfcPerformanceHistory);}(IfcControl);IFC2X32.IfcPerformanceHistory=IfcPerformanceHistory;var IfcPermit=/*#__PURE__*/function(_IfcControl6){_inherits(IfcPermit,_IfcControl6);var _super652=_createSuper(IfcPermit);function IfcPermit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PermitID){var _this649;_classCallCheck(this,IfcPermit);_this649=_super652.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this649.GlobalId=GlobalId;_this649.OwnerHistory=OwnerHistory;_this649.Name=Name;_this649.Description=Description;_this649.ObjectType=ObjectType;_this649.PermitID=PermitID;_this649.type=3327091369;return _this649;}return _createClass(IfcPermit);}(IfcControl);IFC2X32.IfcPermit=IfcPermit;var IfcPipeFittingType=/*#__PURE__*/function(_IfcFlowFittingType2){_inherits(IfcPipeFittingType,_IfcFlowFittingType2);var _super653=_createSuper(IfcPipeFittingType);function IfcPipeFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this650;_classCallCheck(this,IfcPipeFittingType);_this650=_super653.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this650.GlobalId=GlobalId;_this650.OwnerHistory=OwnerHistory;_this650.Name=Name;_this650.Description=Description;_this650.ApplicableOccurrence=ApplicableOccurrence;_this650.HasPropertySets=HasPropertySets;_this650.RepresentationMaps=RepresentationMaps;_this650.Tag=Tag;_this650.ElementType=ElementType;_this650.PredefinedType=PredefinedType;_this650.type=804291784;return _this650;}return _createClass(IfcPipeFittingType);}(IfcFlowFittingType);IFC2X32.IfcPipeFittingType=IfcPipeFittingType;var IfcPipeSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType){_inherits(IfcPipeSegmentType,_IfcFlowSegmentType);var _super654=_createSuper(IfcPipeSegmentType);function IfcPipeSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this651;_classCallCheck(this,IfcPipeSegmentType);_this651=_super654.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this651.GlobalId=GlobalId;_this651.OwnerHistory=OwnerHistory;_this651.Name=Name;_this651.Description=Description;_this651.ApplicableOccurrence=ApplicableOccurrence;_this651.HasPropertySets=HasPropertySets;_this651.RepresentationMaps=RepresentationMaps;_this651.Tag=Tag;_this651.ElementType=ElementType;_this651.PredefinedType=PredefinedType;_this651.type=4231323485;return _this651;}return _createClass(IfcPipeSegmentType);}(IfcFlowSegmentType);IFC2X32.IfcPipeSegmentType=IfcPipeSegmentType;var IfcPlateType=/*#__PURE__*/function(_IfcBuildingElementTy5){_inherits(IfcPlateType,_IfcBuildingElementTy5);var _super655=_createSuper(IfcPlateType);function IfcPlateType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this652;_classCallCheck(this,IfcPlateType);_this652=_super655.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this652.GlobalId=GlobalId;_this652.OwnerHistory=OwnerHistory;_this652.Name=Name;_this652.Description=Description;_this652.ApplicableOccurrence=ApplicableOccurrence;_this652.HasPropertySets=HasPropertySets;_this652.RepresentationMaps=RepresentationMaps;_this652.Tag=Tag;_this652.ElementType=ElementType;_this652.PredefinedType=PredefinedType;_this652.type=4017108033;return _this652;}return _createClass(IfcPlateType);}(IfcBuildingElementType);IFC2X32.IfcPlateType=IfcPlateType;var IfcPolyline=/*#__PURE__*/function(_IfcBoundedCurve2){_inherits(IfcPolyline,_IfcBoundedCurve2);var _super656=_createSuper(IfcPolyline);function IfcPolyline(expressID,Points){var _this653;_classCallCheck(this,IfcPolyline);_this653=_super656.call(this,expressID);_this653.Points=Points;_this653.type=3724593414;return _this653;}return _createClass(IfcPolyline);}(IfcBoundedCurve);IFC2X32.IfcPolyline=IfcPolyline;var IfcPort=/*#__PURE__*/function(_IfcProduct8){_inherits(IfcPort,_IfcProduct8);var _super657=_createSuper(IfcPort);function IfcPort(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this654;_classCallCheck(this,IfcPort);_this654=_super657.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this654.GlobalId=GlobalId;_this654.OwnerHistory=OwnerHistory;_this654.Name=Name;_this654.Description=Description;_this654.ObjectType=ObjectType;_this654.ObjectPlacement=ObjectPlacement;_this654.Representation=Representation;_this654.type=3740093272;return _this654;}return _createClass(IfcPort);}(IfcProduct);IFC2X32.IfcPort=IfcPort;var IfcProcedure=/*#__PURE__*/function(_IfcProcess2){_inherits(IfcProcedure,_IfcProcess2);var _super658=_createSuper(IfcProcedure);function IfcProcedure(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ProcedureID,ProcedureType,UserDefinedProcedureType){var _this655;_classCallCheck(this,IfcProcedure);_this655=_super658.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this655.GlobalId=GlobalId;_this655.OwnerHistory=OwnerHistory;_this655.Name=Name;_this655.Description=Description;_this655.ObjectType=ObjectType;_this655.ProcedureID=ProcedureID;_this655.ProcedureType=ProcedureType;_this655.UserDefinedProcedureType=UserDefinedProcedureType;_this655.type=2744685151;return _this655;}return _createClass(IfcProcedure);}(IfcProcess);IFC2X32.IfcProcedure=IfcProcedure;var IfcProjectOrder=/*#__PURE__*/function(_IfcControl7){_inherits(IfcProjectOrder,_IfcControl7);var _super659=_createSuper(IfcProjectOrder);function IfcProjectOrder(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ID,PredefinedType,Status){var _this656;_classCallCheck(this,IfcProjectOrder);_this656=_super659.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this656.GlobalId=GlobalId;_this656.OwnerHistory=OwnerHistory;_this656.Name=Name;_this656.Description=Description;_this656.ObjectType=ObjectType;_this656.ID=ID;_this656.PredefinedType=PredefinedType;_this656.Status=Status;_this656.type=2904328755;return _this656;}return _createClass(IfcProjectOrder);}(IfcControl);IFC2X32.IfcProjectOrder=IfcProjectOrder;var IfcProjectOrderRecord=/*#__PURE__*/function(_IfcControl8){_inherits(IfcProjectOrderRecord,_IfcControl8);var _super660=_createSuper(IfcProjectOrderRecord);function IfcProjectOrderRecord(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Records,PredefinedType){var _this657;_classCallCheck(this,IfcProjectOrderRecord);_this657=_super660.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this657.GlobalId=GlobalId;_this657.OwnerHistory=OwnerHistory;_this657.Name=Name;_this657.Description=Description;_this657.ObjectType=ObjectType;_this657.Records=Records;_this657.PredefinedType=PredefinedType;_this657.type=3642467123;return _this657;}return _createClass(IfcProjectOrderRecord);}(IfcControl);IFC2X32.IfcProjectOrderRecord=IfcProjectOrderRecord;var IfcProjectionElement=/*#__PURE__*/function(_IfcFeatureElementAdd){_inherits(IfcProjectionElement,_IfcFeatureElementAdd);var _super661=_createSuper(IfcProjectionElement);function IfcProjectionElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this658;_classCallCheck(this,IfcProjectionElement);_this658=_super661.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this658.GlobalId=GlobalId;_this658.OwnerHistory=OwnerHistory;_this658.Name=Name;_this658.Description=Description;_this658.ObjectType=ObjectType;_this658.ObjectPlacement=ObjectPlacement;_this658.Representation=Representation;_this658.Tag=Tag;_this658.type=3651124850;return _this658;}return _createClass(IfcProjectionElement);}(IfcFeatureElementAddition);IFC2X32.IfcProjectionElement=IfcProjectionElement;var IfcProtectiveDeviceType=/*#__PURE__*/function(_IfcFlowControllerTyp2){_inherits(IfcProtectiveDeviceType,_IfcFlowControllerTyp2);var _super662=_createSuper(IfcProtectiveDeviceType);function IfcProtectiveDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this659;_classCallCheck(this,IfcProtectiveDeviceType);_this659=_super662.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this659.GlobalId=GlobalId;_this659.OwnerHistory=OwnerHistory;_this659.Name=Name;_this659.Description=Description;_this659.ApplicableOccurrence=ApplicableOccurrence;_this659.HasPropertySets=HasPropertySets;_this659.RepresentationMaps=RepresentationMaps;_this659.Tag=Tag;_this659.ElementType=ElementType;_this659.PredefinedType=PredefinedType;_this659.type=1842657554;return _this659;}return _createClass(IfcProtectiveDeviceType);}(IfcFlowControllerType);IFC2X32.IfcProtectiveDeviceType=IfcProtectiveDeviceType;var IfcPumpType=/*#__PURE__*/function(_IfcFlowMovingDeviceT){_inherits(IfcPumpType,_IfcFlowMovingDeviceT);var _super663=_createSuper(IfcPumpType);function IfcPumpType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this660;_classCallCheck(this,IfcPumpType);_this660=_super663.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this660.GlobalId=GlobalId;_this660.OwnerHistory=OwnerHistory;_this660.Name=Name;_this660.Description=Description;_this660.ApplicableOccurrence=ApplicableOccurrence;_this660.HasPropertySets=HasPropertySets;_this660.RepresentationMaps=RepresentationMaps;_this660.Tag=Tag;_this660.ElementType=ElementType;_this660.PredefinedType=PredefinedType;_this660.type=2250791053;return _this660;}return _createClass(IfcPumpType);}(IfcFlowMovingDeviceType);IFC2X32.IfcPumpType=IfcPumpType;var IfcRadiusDimension=/*#__PURE__*/function(_IfcDimensionCurveDir2){_inherits(IfcRadiusDimension,_IfcDimensionCurveDir2);var _super664=_createSuper(IfcRadiusDimension);function IfcRadiusDimension(expressID,Contents){var _this661;_classCallCheck(this,IfcRadiusDimension);_this661=_super664.call(this,expressID,Contents);_this661.Contents=Contents;_this661.type=3248260540;return _this661;}return _createClass(IfcRadiusDimension);}(IfcDimensionCurveDirectedCallout);IFC2X32.IfcRadiusDimension=IfcRadiusDimension;var IfcRailingType=/*#__PURE__*/function(_IfcBuildingElementTy6){_inherits(IfcRailingType,_IfcBuildingElementTy6);var _super665=_createSuper(IfcRailingType);function IfcRailingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this662;_classCallCheck(this,IfcRailingType);_this662=_super665.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this662.GlobalId=GlobalId;_this662.OwnerHistory=OwnerHistory;_this662.Name=Name;_this662.Description=Description;_this662.ApplicableOccurrence=ApplicableOccurrence;_this662.HasPropertySets=HasPropertySets;_this662.RepresentationMaps=RepresentationMaps;_this662.Tag=Tag;_this662.ElementType=ElementType;_this662.PredefinedType=PredefinedType;_this662.type=2893384427;return _this662;}return _createClass(IfcRailingType);}(IfcBuildingElementType);IFC2X32.IfcRailingType=IfcRailingType;var IfcRampFlightType=/*#__PURE__*/function(_IfcBuildingElementTy7){_inherits(IfcRampFlightType,_IfcBuildingElementTy7);var _super666=_createSuper(IfcRampFlightType);function IfcRampFlightType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this663;_classCallCheck(this,IfcRampFlightType);_this663=_super666.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this663.GlobalId=GlobalId;_this663.OwnerHistory=OwnerHistory;_this663.Name=Name;_this663.Description=Description;_this663.ApplicableOccurrence=ApplicableOccurrence;_this663.HasPropertySets=HasPropertySets;_this663.RepresentationMaps=RepresentationMaps;_this663.Tag=Tag;_this663.ElementType=ElementType;_this663.PredefinedType=PredefinedType;_this663.type=2324767716;return _this663;}return _createClass(IfcRampFlightType);}(IfcBuildingElementType);IFC2X32.IfcRampFlightType=IfcRampFlightType;var IfcRelAggregates=/*#__PURE__*/function(_IfcRelDecomposes2){_inherits(IfcRelAggregates,_IfcRelDecomposes2);var _super667=_createSuper(IfcRelAggregates);function IfcRelAggregates(expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects){var _this664;_classCallCheck(this,IfcRelAggregates);_this664=_super667.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects);_this664.GlobalId=GlobalId;_this664.OwnerHistory=OwnerHistory;_this664.Name=Name;_this664.Description=Description;_this664.RelatingObject=RelatingObject;_this664.RelatedObjects=RelatedObjects;_this664.type=160246688;return _this664;}return _createClass(IfcRelAggregates);}(IfcRelDecomposes);IFC2X32.IfcRelAggregates=IfcRelAggregates;var IfcRelAssignsTasks=/*#__PURE__*/function(_IfcRelAssignsToContr3){_inherits(IfcRelAssignsTasks,_IfcRelAssignsToContr3);var _super668=_createSuper(IfcRelAssignsTasks);function IfcRelAssignsTasks(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl,TimeForTask){var _this665;_classCallCheck(this,IfcRelAssignsTasks);_this665=_super668.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl);_this665.GlobalId=GlobalId;_this665.OwnerHistory=OwnerHistory;_this665.Name=Name;_this665.Description=Description;_this665.RelatedObjects=RelatedObjects;_this665.RelatedObjectsType=RelatedObjectsType;_this665.RelatingControl=RelatingControl;_this665.TimeForTask=TimeForTask;_this665.type=2863920197;return _this665;}return _createClass(IfcRelAssignsTasks);}(IfcRelAssignsToControl);IFC2X32.IfcRelAssignsTasks=IfcRelAssignsTasks;var IfcSanitaryTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType5){_inherits(IfcSanitaryTerminalType,_IfcFlowTerminalType5);var _super669=_createSuper(IfcSanitaryTerminalType);function IfcSanitaryTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this666;_classCallCheck(this,IfcSanitaryTerminalType);_this666=_super669.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this666.GlobalId=GlobalId;_this666.OwnerHistory=OwnerHistory;_this666.Name=Name;_this666.Description=Description;_this666.ApplicableOccurrence=ApplicableOccurrence;_this666.HasPropertySets=HasPropertySets;_this666.RepresentationMaps=RepresentationMaps;_this666.Tag=Tag;_this666.ElementType=ElementType;_this666.PredefinedType=PredefinedType;_this666.type=1768891740;return _this666;}return _createClass(IfcSanitaryTerminalType);}(IfcFlowTerminalType);IFC2X32.IfcSanitaryTerminalType=IfcSanitaryTerminalType;var IfcScheduleTimeControl=/*#__PURE__*/function(_IfcControl9){_inherits(IfcScheduleTimeControl,_IfcControl9);var _super670=_createSuper(IfcScheduleTimeControl);function IfcScheduleTimeControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ActualStart,EarlyStart,LateStart,ScheduleStart,ActualFinish,EarlyFinish,LateFinish,ScheduleFinish,ScheduleDuration,ActualDuration,RemainingTime,FreeFloat,TotalFloat,IsCritical,StatusTime,StartFloat,FinishFloat,Completion){var _this667;_classCallCheck(this,IfcScheduleTimeControl);_this667=_super670.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this667.GlobalId=GlobalId;_this667.OwnerHistory=OwnerHistory;_this667.Name=Name;_this667.Description=Description;_this667.ObjectType=ObjectType;_this667.ActualStart=ActualStart;_this667.EarlyStart=EarlyStart;_this667.LateStart=LateStart;_this667.ScheduleStart=ScheduleStart;_this667.ActualFinish=ActualFinish;_this667.EarlyFinish=EarlyFinish;_this667.LateFinish=LateFinish;_this667.ScheduleFinish=ScheduleFinish;_this667.ScheduleDuration=ScheduleDuration;_this667.ActualDuration=ActualDuration;_this667.RemainingTime=RemainingTime;_this667.FreeFloat=FreeFloat;_this667.TotalFloat=TotalFloat;_this667.IsCritical=IsCritical;_this667.StatusTime=StatusTime;_this667.StartFloat=StartFloat;_this667.FinishFloat=FinishFloat;_this667.Completion=Completion;_this667.type=3517283431;return _this667;}return _createClass(IfcScheduleTimeControl);}(IfcControl);IFC2X32.IfcScheduleTimeControl=IfcScheduleTimeControl;var IfcServiceLife=/*#__PURE__*/function(_IfcControl10){_inherits(IfcServiceLife,_IfcControl10);var _super671=_createSuper(IfcServiceLife);function IfcServiceLife(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ServiceLifeType,ServiceLifeDuration){var _this668;_classCallCheck(this,IfcServiceLife);_this668=_super671.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this668.GlobalId=GlobalId;_this668.OwnerHistory=OwnerHistory;_this668.Name=Name;_this668.Description=Description;_this668.ObjectType=ObjectType;_this668.ServiceLifeType=ServiceLifeType;_this668.ServiceLifeDuration=ServiceLifeDuration;_this668.type=4105383287;return _this668;}return _createClass(IfcServiceLife);}(IfcControl);IFC2X32.IfcServiceLife=IfcServiceLife;var IfcSite=/*#__PURE__*/function(_IfcSpatialStructureE3){_inherits(IfcSite,_IfcSpatialStructureE3);var _super672=_createSuper(IfcSite);function IfcSite(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,RefLatitude,RefLongitude,RefElevation,LandTitleNumber,SiteAddress){var _this669;_classCallCheck(this,IfcSite);_this669=_super672.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this669.GlobalId=GlobalId;_this669.OwnerHistory=OwnerHistory;_this669.Name=Name;_this669.Description=Description;_this669.ObjectType=ObjectType;_this669.ObjectPlacement=ObjectPlacement;_this669.Representation=Representation;_this669.LongName=LongName;_this669.CompositionType=CompositionType;_this669.RefLatitude=RefLatitude;_this669.RefLongitude=RefLongitude;_this669.RefElevation=RefElevation;_this669.LandTitleNumber=LandTitleNumber;_this669.SiteAddress=SiteAddress;_this669.type=4097777520;return _this669;}return _createClass(IfcSite);}(IfcSpatialStructureElement);IFC2X32.IfcSite=IfcSite;var IfcSlabType=/*#__PURE__*/function(_IfcBuildingElementTy8){_inherits(IfcSlabType,_IfcBuildingElementTy8);var _super673=_createSuper(IfcSlabType);function IfcSlabType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this670;_classCallCheck(this,IfcSlabType);_this670=_super673.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this670.GlobalId=GlobalId;_this670.OwnerHistory=OwnerHistory;_this670.Name=Name;_this670.Description=Description;_this670.ApplicableOccurrence=ApplicableOccurrence;_this670.HasPropertySets=HasPropertySets;_this670.RepresentationMaps=RepresentationMaps;_this670.Tag=Tag;_this670.ElementType=ElementType;_this670.PredefinedType=PredefinedType;_this670.type=2533589738;return _this670;}return _createClass(IfcSlabType);}(IfcBuildingElementType);IFC2X32.IfcSlabType=IfcSlabType;var IfcSpace=/*#__PURE__*/function(_IfcSpatialStructureE4){_inherits(IfcSpace,_IfcSpatialStructureE4);var _super674=_createSuper(IfcSpace);function IfcSpace(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,InteriorOrExteriorSpace,ElevationWithFlooring){var _this671;_classCallCheck(this,IfcSpace);_this671=_super674.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this671.GlobalId=GlobalId;_this671.OwnerHistory=OwnerHistory;_this671.Name=Name;_this671.Description=Description;_this671.ObjectType=ObjectType;_this671.ObjectPlacement=ObjectPlacement;_this671.Representation=Representation;_this671.LongName=LongName;_this671.CompositionType=CompositionType;_this671.InteriorOrExteriorSpace=InteriorOrExteriorSpace;_this671.ElevationWithFlooring=ElevationWithFlooring;_this671.type=3856911033;return _this671;}return _createClass(IfcSpace);}(IfcSpatialStructureElement);IFC2X32.IfcSpace=IfcSpace;var IfcSpaceHeaterType=/*#__PURE__*/function(_IfcEnergyConversionD6){_inherits(IfcSpaceHeaterType,_IfcEnergyConversionD6);var _super675=_createSuper(IfcSpaceHeaterType);function IfcSpaceHeaterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this672;_classCallCheck(this,IfcSpaceHeaterType);_this672=_super675.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this672.GlobalId=GlobalId;_this672.OwnerHistory=OwnerHistory;_this672.Name=Name;_this672.Description=Description;_this672.ApplicableOccurrence=ApplicableOccurrence;_this672.HasPropertySets=HasPropertySets;_this672.RepresentationMaps=RepresentationMaps;_this672.Tag=Tag;_this672.ElementType=ElementType;_this672.PredefinedType=PredefinedType;_this672.type=1305183839;return _this672;}return _createClass(IfcSpaceHeaterType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcSpaceHeaterType=IfcSpaceHeaterType;var IfcSpaceProgram=/*#__PURE__*/function(_IfcControl11){_inherits(IfcSpaceProgram,_IfcControl11);var _super676=_createSuper(IfcSpaceProgram);function IfcSpaceProgram(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,SpaceProgramIdentifier,MaxRequiredArea,MinRequiredArea,RequestedLocation,StandardRequiredArea){var _this673;_classCallCheck(this,IfcSpaceProgram);_this673=_super676.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this673.GlobalId=GlobalId;_this673.OwnerHistory=OwnerHistory;_this673.Name=Name;_this673.Description=Description;_this673.ObjectType=ObjectType;_this673.SpaceProgramIdentifier=SpaceProgramIdentifier;_this673.MaxRequiredArea=MaxRequiredArea;_this673.MinRequiredArea=MinRequiredArea;_this673.RequestedLocation=RequestedLocation;_this673.StandardRequiredArea=StandardRequiredArea;_this673.type=652456506;return _this673;}return _createClass(IfcSpaceProgram);}(IfcControl);IFC2X32.IfcSpaceProgram=IfcSpaceProgram;var IfcSpaceType=/*#__PURE__*/function(_IfcSpatialStructureE5){_inherits(IfcSpaceType,_IfcSpatialStructureE5);var _super677=_createSuper(IfcSpaceType);function IfcSpaceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this674;_classCallCheck(this,IfcSpaceType);_this674=_super677.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this674.GlobalId=GlobalId;_this674.OwnerHistory=OwnerHistory;_this674.Name=Name;_this674.Description=Description;_this674.ApplicableOccurrence=ApplicableOccurrence;_this674.HasPropertySets=HasPropertySets;_this674.RepresentationMaps=RepresentationMaps;_this674.Tag=Tag;_this674.ElementType=ElementType;_this674.PredefinedType=PredefinedType;_this674.type=3812236995;return _this674;}return _createClass(IfcSpaceType);}(IfcSpatialStructureElementType);IFC2X32.IfcSpaceType=IfcSpaceType;var IfcStackTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType6){_inherits(IfcStackTerminalType,_IfcFlowTerminalType6);var _super678=_createSuper(IfcStackTerminalType);function IfcStackTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this675;_classCallCheck(this,IfcStackTerminalType);_this675=_super678.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this675.GlobalId=GlobalId;_this675.OwnerHistory=OwnerHistory;_this675.Name=Name;_this675.Description=Description;_this675.ApplicableOccurrence=ApplicableOccurrence;_this675.HasPropertySets=HasPropertySets;_this675.RepresentationMaps=RepresentationMaps;_this675.Tag=Tag;_this675.ElementType=ElementType;_this675.PredefinedType=PredefinedType;_this675.type=3112655638;return _this675;}return _createClass(IfcStackTerminalType);}(IfcFlowTerminalType);IFC2X32.IfcStackTerminalType=IfcStackTerminalType;var IfcStairFlightType=/*#__PURE__*/function(_IfcBuildingElementTy9){_inherits(IfcStairFlightType,_IfcBuildingElementTy9);var _super679=_createSuper(IfcStairFlightType);function IfcStairFlightType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this676;_classCallCheck(this,IfcStairFlightType);_this676=_super679.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this676.GlobalId=GlobalId;_this676.OwnerHistory=OwnerHistory;_this676.Name=Name;_this676.Description=Description;_this676.ApplicableOccurrence=ApplicableOccurrence;_this676.HasPropertySets=HasPropertySets;_this676.RepresentationMaps=RepresentationMaps;_this676.Tag=Tag;_this676.ElementType=ElementType;_this676.PredefinedType=PredefinedType;_this676.type=1039846685;return _this676;}return _createClass(IfcStairFlightType);}(IfcBuildingElementType);IFC2X32.IfcStairFlightType=IfcStairFlightType;var IfcStructuralAction=/*#__PURE__*/function(_IfcStructuralActivit2){_inherits(IfcStructuralAction,_IfcStructuralActivit2);var _super680=_createSuper(IfcStructuralAction);function IfcStructuralAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy){var _this677;_classCallCheck(this,IfcStructuralAction);_this677=_super680.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this677.GlobalId=GlobalId;_this677.OwnerHistory=OwnerHistory;_this677.Name=Name;_this677.Description=Description;_this677.ObjectType=ObjectType;_this677.ObjectPlacement=ObjectPlacement;_this677.Representation=Representation;_this677.AppliedLoad=AppliedLoad;_this677.GlobalOrLocal=GlobalOrLocal;_this677.DestabilizingLoad=DestabilizingLoad;_this677.CausedBy=CausedBy;_this677.type=682877961;return _this677;}return _createClass(IfcStructuralAction);}(IfcStructuralActivity);IFC2X32.IfcStructuralAction=IfcStructuralAction;var IfcStructuralConnection=/*#__PURE__*/function(_IfcStructuralItem2){_inherits(IfcStructuralConnection,_IfcStructuralItem2);var _super681=_createSuper(IfcStructuralConnection);function IfcStructuralConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this678;_classCallCheck(this,IfcStructuralConnection);_this678=_super681.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this678.GlobalId=GlobalId;_this678.OwnerHistory=OwnerHistory;_this678.Name=Name;_this678.Description=Description;_this678.ObjectType=ObjectType;_this678.ObjectPlacement=ObjectPlacement;_this678.Representation=Representation;_this678.AppliedCondition=AppliedCondition;_this678.type=1179482911;return _this678;}return _createClass(IfcStructuralConnection);}(IfcStructuralItem);IFC2X32.IfcStructuralConnection=IfcStructuralConnection;var IfcStructuralCurveConnection=/*#__PURE__*/function(_IfcStructuralConnect3){_inherits(IfcStructuralCurveConnection,_IfcStructuralConnect3);var _super682=_createSuper(IfcStructuralCurveConnection);function IfcStructuralCurveConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this679;_classCallCheck(this,IfcStructuralCurveConnection);_this679=_super682.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this679.GlobalId=GlobalId;_this679.OwnerHistory=OwnerHistory;_this679.Name=Name;_this679.Description=Description;_this679.ObjectType=ObjectType;_this679.ObjectPlacement=ObjectPlacement;_this679.Representation=Representation;_this679.AppliedCondition=AppliedCondition;_this679.type=4243806635;return _this679;}return _createClass(IfcStructuralCurveConnection);}(IfcStructuralConnection);IFC2X32.IfcStructuralCurveConnection=IfcStructuralCurveConnection;var IfcStructuralCurveMember=/*#__PURE__*/function(_IfcStructuralMember2){_inherits(IfcStructuralCurveMember,_IfcStructuralMember2);var _super683=_createSuper(IfcStructuralCurveMember);function IfcStructuralCurveMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType){var _this680;_classCallCheck(this,IfcStructuralCurveMember);_this680=_super683.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this680.GlobalId=GlobalId;_this680.OwnerHistory=OwnerHistory;_this680.Name=Name;_this680.Description=Description;_this680.ObjectType=ObjectType;_this680.ObjectPlacement=ObjectPlacement;_this680.Representation=Representation;_this680.PredefinedType=PredefinedType;_this680.type=214636428;return _this680;}return _createClass(IfcStructuralCurveMember);}(IfcStructuralMember);IFC2X32.IfcStructuralCurveMember=IfcStructuralCurveMember;var IfcStructuralCurveMemberVarying=/*#__PURE__*/function(_IfcStructuralCurveMe){_inherits(IfcStructuralCurveMemberVarying,_IfcStructuralCurveMe);var _super684=_createSuper(IfcStructuralCurveMemberVarying);function IfcStructuralCurveMemberVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType){var _this681;_classCallCheck(this,IfcStructuralCurveMemberVarying);_this681=_super684.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType);_this681.GlobalId=GlobalId;_this681.OwnerHistory=OwnerHistory;_this681.Name=Name;_this681.Description=Description;_this681.ObjectType=ObjectType;_this681.ObjectPlacement=ObjectPlacement;_this681.Representation=Representation;_this681.PredefinedType=PredefinedType;_this681.type=2445595289;return _this681;}return _createClass(IfcStructuralCurveMemberVarying);}(IfcStructuralCurveMember);IFC2X32.IfcStructuralCurveMemberVarying=IfcStructuralCurveMemberVarying;var IfcStructuralLinearAction=/*#__PURE__*/function(_IfcStructuralAction){_inherits(IfcStructuralLinearAction,_IfcStructuralAction);var _super685=_createSuper(IfcStructuralLinearAction);function IfcStructuralLinearAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy,ProjectedOrTrue){var _this682;_classCallCheck(this,IfcStructuralLinearAction);_this682=_super685.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy);_this682.GlobalId=GlobalId;_this682.OwnerHistory=OwnerHistory;_this682.Name=Name;_this682.Description=Description;_this682.ObjectType=ObjectType;_this682.ObjectPlacement=ObjectPlacement;_this682.Representation=Representation;_this682.AppliedLoad=AppliedLoad;_this682.GlobalOrLocal=GlobalOrLocal;_this682.DestabilizingLoad=DestabilizingLoad;_this682.CausedBy=CausedBy;_this682.ProjectedOrTrue=ProjectedOrTrue;_this682.type=1807405624;return _this682;}return _createClass(IfcStructuralLinearAction);}(IfcStructuralAction);IFC2X32.IfcStructuralLinearAction=IfcStructuralLinearAction;var IfcStructuralLinearActionVarying=/*#__PURE__*/function(_IfcStructuralLinearA){_inherits(IfcStructuralLinearActionVarying,_IfcStructuralLinearA);var _super686=_createSuper(IfcStructuralLinearActionVarying);function IfcStructuralLinearActionVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy,ProjectedOrTrue,VaryingAppliedLoadLocation,SubsequentAppliedLoads){var _this683;_classCallCheck(this,IfcStructuralLinearActionVarying);_this683=_super686.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy,ProjectedOrTrue);_this683.GlobalId=GlobalId;_this683.OwnerHistory=OwnerHistory;_this683.Name=Name;_this683.Description=Description;_this683.ObjectType=ObjectType;_this683.ObjectPlacement=ObjectPlacement;_this683.Representation=Representation;_this683.AppliedLoad=AppliedLoad;_this683.GlobalOrLocal=GlobalOrLocal;_this683.DestabilizingLoad=DestabilizingLoad;_this683.CausedBy=CausedBy;_this683.ProjectedOrTrue=ProjectedOrTrue;_this683.VaryingAppliedLoadLocation=VaryingAppliedLoadLocation;_this683.SubsequentAppliedLoads=SubsequentAppliedLoads;_this683.type=1721250024;return _this683;}return _createClass(IfcStructuralLinearActionVarying);}(IfcStructuralLinearAction);IFC2X32.IfcStructuralLinearActionVarying=IfcStructuralLinearActionVarying;var IfcStructuralLoadGroup=/*#__PURE__*/function(_IfcGroup2){_inherits(IfcStructuralLoadGroup,_IfcGroup2);var _super687=_createSuper(IfcStructuralLoadGroup);function IfcStructuralLoadGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,ActionType,ActionSource,Coefficient,Purpose){var _this684;_classCallCheck(this,IfcStructuralLoadGroup);_this684=_super687.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this684.GlobalId=GlobalId;_this684.OwnerHistory=OwnerHistory;_this684.Name=Name;_this684.Description=Description;_this684.ObjectType=ObjectType;_this684.PredefinedType=PredefinedType;_this684.ActionType=ActionType;_this684.ActionSource=ActionSource;_this684.Coefficient=Coefficient;_this684.Purpose=Purpose;_this684.type=1252848954;return _this684;}return _createClass(IfcStructuralLoadGroup);}(IfcGroup);IFC2X32.IfcStructuralLoadGroup=IfcStructuralLoadGroup;var IfcStructuralPlanarAction=/*#__PURE__*/function(_IfcStructuralAction2){_inherits(IfcStructuralPlanarAction,_IfcStructuralAction2);var _super688=_createSuper(IfcStructuralPlanarAction);function IfcStructuralPlanarAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy,ProjectedOrTrue){var _this685;_classCallCheck(this,IfcStructuralPlanarAction);_this685=_super688.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy);_this685.GlobalId=GlobalId;_this685.OwnerHistory=OwnerHistory;_this685.Name=Name;_this685.Description=Description;_this685.ObjectType=ObjectType;_this685.ObjectPlacement=ObjectPlacement;_this685.Representation=Representation;_this685.AppliedLoad=AppliedLoad;_this685.GlobalOrLocal=GlobalOrLocal;_this685.DestabilizingLoad=DestabilizingLoad;_this685.CausedBy=CausedBy;_this685.ProjectedOrTrue=ProjectedOrTrue;_this685.type=1621171031;return _this685;}return _createClass(IfcStructuralPlanarAction);}(IfcStructuralAction);IFC2X32.IfcStructuralPlanarAction=IfcStructuralPlanarAction;var IfcStructuralPlanarActionVarying=/*#__PURE__*/function(_IfcStructuralPlanarA){_inherits(IfcStructuralPlanarActionVarying,_IfcStructuralPlanarA);var _super689=_createSuper(IfcStructuralPlanarActionVarying);function IfcStructuralPlanarActionVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy,ProjectedOrTrue,VaryingAppliedLoadLocation,SubsequentAppliedLoads){var _this686;_classCallCheck(this,IfcStructuralPlanarActionVarying);_this686=_super689.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy,ProjectedOrTrue);_this686.GlobalId=GlobalId;_this686.OwnerHistory=OwnerHistory;_this686.Name=Name;_this686.Description=Description;_this686.ObjectType=ObjectType;_this686.ObjectPlacement=ObjectPlacement;_this686.Representation=Representation;_this686.AppliedLoad=AppliedLoad;_this686.GlobalOrLocal=GlobalOrLocal;_this686.DestabilizingLoad=DestabilizingLoad;_this686.CausedBy=CausedBy;_this686.ProjectedOrTrue=ProjectedOrTrue;_this686.VaryingAppliedLoadLocation=VaryingAppliedLoadLocation;_this686.SubsequentAppliedLoads=SubsequentAppliedLoads;_this686.type=3987759626;return _this686;}return _createClass(IfcStructuralPlanarActionVarying);}(IfcStructuralPlanarAction);IFC2X32.IfcStructuralPlanarActionVarying=IfcStructuralPlanarActionVarying;var IfcStructuralPointAction=/*#__PURE__*/function(_IfcStructuralAction3){_inherits(IfcStructuralPointAction,_IfcStructuralAction3);var _super690=_createSuper(IfcStructuralPointAction);function IfcStructuralPointAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy){var _this687;_classCallCheck(this,IfcStructuralPointAction);_this687=_super690.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,CausedBy);_this687.GlobalId=GlobalId;_this687.OwnerHistory=OwnerHistory;_this687.Name=Name;_this687.Description=Description;_this687.ObjectType=ObjectType;_this687.ObjectPlacement=ObjectPlacement;_this687.Representation=Representation;_this687.AppliedLoad=AppliedLoad;_this687.GlobalOrLocal=GlobalOrLocal;_this687.DestabilizingLoad=DestabilizingLoad;_this687.CausedBy=CausedBy;_this687.type=2082059205;return _this687;}return _createClass(IfcStructuralPointAction);}(IfcStructuralAction);IFC2X32.IfcStructuralPointAction=IfcStructuralPointAction;var IfcStructuralPointConnection=/*#__PURE__*/function(_IfcStructuralConnect4){_inherits(IfcStructuralPointConnection,_IfcStructuralConnect4);var _super691=_createSuper(IfcStructuralPointConnection);function IfcStructuralPointConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this688;_classCallCheck(this,IfcStructuralPointConnection);_this688=_super691.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this688.GlobalId=GlobalId;_this688.OwnerHistory=OwnerHistory;_this688.Name=Name;_this688.Description=Description;_this688.ObjectType=ObjectType;_this688.ObjectPlacement=ObjectPlacement;_this688.Representation=Representation;_this688.AppliedCondition=AppliedCondition;_this688.type=734778138;return _this688;}return _createClass(IfcStructuralPointConnection);}(IfcStructuralConnection);IFC2X32.IfcStructuralPointConnection=IfcStructuralPointConnection;var IfcStructuralPointReaction=/*#__PURE__*/function(_IfcStructuralReactio){_inherits(IfcStructuralPointReaction,_IfcStructuralReactio);var _super692=_createSuper(IfcStructuralPointReaction);function IfcStructuralPointReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this689;_classCallCheck(this,IfcStructuralPointReaction);_this689=_super692.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this689.GlobalId=GlobalId;_this689.OwnerHistory=OwnerHistory;_this689.Name=Name;_this689.Description=Description;_this689.ObjectType=ObjectType;_this689.ObjectPlacement=ObjectPlacement;_this689.Representation=Representation;_this689.AppliedLoad=AppliedLoad;_this689.GlobalOrLocal=GlobalOrLocal;_this689.type=1235345126;return _this689;}return _createClass(IfcStructuralPointReaction);}(IfcStructuralReaction);IFC2X32.IfcStructuralPointReaction=IfcStructuralPointReaction;var IfcStructuralResultGroup=/*#__PURE__*/function(_IfcGroup3){_inherits(IfcStructuralResultGroup,_IfcGroup3);var _super693=_createSuper(IfcStructuralResultGroup);function IfcStructuralResultGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheoryType,ResultForLoadGroup,IsLinear){var _this690;_classCallCheck(this,IfcStructuralResultGroup);_this690=_super693.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this690.GlobalId=GlobalId;_this690.OwnerHistory=OwnerHistory;_this690.Name=Name;_this690.Description=Description;_this690.ObjectType=ObjectType;_this690.TheoryType=TheoryType;_this690.ResultForLoadGroup=ResultForLoadGroup;_this690.IsLinear=IsLinear;_this690.type=2986769608;return _this690;}return _createClass(IfcStructuralResultGroup);}(IfcGroup);IFC2X32.IfcStructuralResultGroup=IfcStructuralResultGroup;var IfcStructuralSurfaceConnection=/*#__PURE__*/function(_IfcStructuralConnect5){_inherits(IfcStructuralSurfaceConnection,_IfcStructuralConnect5);var _super694=_createSuper(IfcStructuralSurfaceConnection);function IfcStructuralSurfaceConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this691;_classCallCheck(this,IfcStructuralSurfaceConnection);_this691=_super694.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this691.GlobalId=GlobalId;_this691.OwnerHistory=OwnerHistory;_this691.Name=Name;_this691.Description=Description;_this691.ObjectType=ObjectType;_this691.ObjectPlacement=ObjectPlacement;_this691.Representation=Representation;_this691.AppliedCondition=AppliedCondition;_this691.type=1975003073;return _this691;}return _createClass(IfcStructuralSurfaceConnection);}(IfcStructuralConnection);IFC2X32.IfcStructuralSurfaceConnection=IfcStructuralSurfaceConnection;var IfcSubContractResource=/*#__PURE__*/function(_IfcConstructionResou3){_inherits(IfcSubContractResource,_IfcConstructionResou3);var _super695=_createSuper(IfcSubContractResource);function IfcSubContractResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity,SubContractor,JobDescription){var _this692;_classCallCheck(this,IfcSubContractResource);_this692=_super695.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity);_this692.GlobalId=GlobalId;_this692.OwnerHistory=OwnerHistory;_this692.Name=Name;_this692.Description=Description;_this692.ObjectType=ObjectType;_this692.ResourceIdentifier=ResourceIdentifier;_this692.ResourceGroup=ResourceGroup;_this692.ResourceConsumption=ResourceConsumption;_this692.BaseQuantity=BaseQuantity;_this692.SubContractor=SubContractor;_this692.JobDescription=JobDescription;_this692.type=148013059;return _this692;}return _createClass(IfcSubContractResource);}(IfcConstructionResource);IFC2X32.IfcSubContractResource=IfcSubContractResource;var IfcSwitchingDeviceType=/*#__PURE__*/function(_IfcFlowControllerTyp3){_inherits(IfcSwitchingDeviceType,_IfcFlowControllerTyp3);var _super696=_createSuper(IfcSwitchingDeviceType);function IfcSwitchingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this693;_classCallCheck(this,IfcSwitchingDeviceType);_this693=_super696.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this693.GlobalId=GlobalId;_this693.OwnerHistory=OwnerHistory;_this693.Name=Name;_this693.Description=Description;_this693.ApplicableOccurrence=ApplicableOccurrence;_this693.HasPropertySets=HasPropertySets;_this693.RepresentationMaps=RepresentationMaps;_this693.Tag=Tag;_this693.ElementType=ElementType;_this693.PredefinedType=PredefinedType;_this693.type=2315554128;return _this693;}return _createClass(IfcSwitchingDeviceType);}(IfcFlowControllerType);IFC2X32.IfcSwitchingDeviceType=IfcSwitchingDeviceType;var IfcSystem=/*#__PURE__*/function(_IfcGroup4){_inherits(IfcSystem,_IfcGroup4);var _super697=_createSuper(IfcSystem);function IfcSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this694;_classCallCheck(this,IfcSystem);_this694=_super697.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this694.GlobalId=GlobalId;_this694.OwnerHistory=OwnerHistory;_this694.Name=Name;_this694.Description=Description;_this694.ObjectType=ObjectType;_this694.type=2254336722;return _this694;}return _createClass(IfcSystem);}(IfcGroup);IFC2X32.IfcSystem=IfcSystem;var IfcTankType=/*#__PURE__*/function(_IfcFlowStorageDevice){_inherits(IfcTankType,_IfcFlowStorageDevice);var _super698=_createSuper(IfcTankType);function IfcTankType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this695;_classCallCheck(this,IfcTankType);_this695=_super698.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this695.GlobalId=GlobalId;_this695.OwnerHistory=OwnerHistory;_this695.Name=Name;_this695.Description=Description;_this695.ApplicableOccurrence=ApplicableOccurrence;_this695.HasPropertySets=HasPropertySets;_this695.RepresentationMaps=RepresentationMaps;_this695.Tag=Tag;_this695.ElementType=ElementType;_this695.PredefinedType=PredefinedType;_this695.type=5716631;return _this695;}return _createClass(IfcTankType);}(IfcFlowStorageDeviceType);IFC2X32.IfcTankType=IfcTankType;var IfcTimeSeriesSchedule=/*#__PURE__*/function(_IfcControl12){_inherits(IfcTimeSeriesSchedule,_IfcControl12);var _super699=_createSuper(IfcTimeSeriesSchedule);function IfcTimeSeriesSchedule(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ApplicableDates,TimeSeriesScheduleType,TimeSeries){var _this696;_classCallCheck(this,IfcTimeSeriesSchedule);_this696=_super699.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this696.GlobalId=GlobalId;_this696.OwnerHistory=OwnerHistory;_this696.Name=Name;_this696.Description=Description;_this696.ObjectType=ObjectType;_this696.ApplicableDates=ApplicableDates;_this696.TimeSeriesScheduleType=TimeSeriesScheduleType;_this696.TimeSeries=TimeSeries;_this696.type=1637806684;return _this696;}return _createClass(IfcTimeSeriesSchedule);}(IfcControl);IFC2X32.IfcTimeSeriesSchedule=IfcTimeSeriesSchedule;var IfcTransformerType=/*#__PURE__*/function(_IfcEnergyConversionD7){_inherits(IfcTransformerType,_IfcEnergyConversionD7);var _super700=_createSuper(IfcTransformerType);function IfcTransformerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this697;_classCallCheck(this,IfcTransformerType);_this697=_super700.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this697.GlobalId=GlobalId;_this697.OwnerHistory=OwnerHistory;_this697.Name=Name;_this697.Description=Description;_this697.ApplicableOccurrence=ApplicableOccurrence;_this697.HasPropertySets=HasPropertySets;_this697.RepresentationMaps=RepresentationMaps;_this697.Tag=Tag;_this697.ElementType=ElementType;_this697.PredefinedType=PredefinedType;_this697.type=1692211062;return _this697;}return _createClass(IfcTransformerType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcTransformerType=IfcTransformerType;var IfcTransportElement=/*#__PURE__*/function(_IfcElement6){_inherits(IfcTransportElement,_IfcElement6);var _super701=_createSuper(IfcTransportElement);function IfcTransportElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OperationType,CapacityByWeight,CapacityByNumber){var _this698;_classCallCheck(this,IfcTransportElement);_this698=_super701.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this698.GlobalId=GlobalId;_this698.OwnerHistory=OwnerHistory;_this698.Name=Name;_this698.Description=Description;_this698.ObjectType=ObjectType;_this698.ObjectPlacement=ObjectPlacement;_this698.Representation=Representation;_this698.Tag=Tag;_this698.OperationType=OperationType;_this698.CapacityByWeight=CapacityByWeight;_this698.CapacityByNumber=CapacityByNumber;_this698.type=1620046519;return _this698;}return _createClass(IfcTransportElement);}(IfcElement);IFC2X32.IfcTransportElement=IfcTransportElement;var IfcTrimmedCurve=/*#__PURE__*/function(_IfcBoundedCurve3){_inherits(IfcTrimmedCurve,_IfcBoundedCurve3);var _super702=_createSuper(IfcTrimmedCurve);function IfcTrimmedCurve(expressID,BasisCurve,Trim1,Trim2,SenseAgreement,MasterRepresentation){var _this699;_classCallCheck(this,IfcTrimmedCurve);_this699=_super702.call(this,expressID);_this699.BasisCurve=BasisCurve;_this699.Trim1=Trim1;_this699.Trim2=Trim2;_this699.SenseAgreement=SenseAgreement;_this699.MasterRepresentation=MasterRepresentation;_this699.type=3593883385;return _this699;}return _createClass(IfcTrimmedCurve);}(IfcBoundedCurve);IFC2X32.IfcTrimmedCurve=IfcTrimmedCurve;var IfcTubeBundleType=/*#__PURE__*/function(_IfcEnergyConversionD8){_inherits(IfcTubeBundleType,_IfcEnergyConversionD8);var _super703=_createSuper(IfcTubeBundleType);function IfcTubeBundleType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this700;_classCallCheck(this,IfcTubeBundleType);_this700=_super703.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this700.GlobalId=GlobalId;_this700.OwnerHistory=OwnerHistory;_this700.Name=Name;_this700.Description=Description;_this700.ApplicableOccurrence=ApplicableOccurrence;_this700.HasPropertySets=HasPropertySets;_this700.RepresentationMaps=RepresentationMaps;_this700.Tag=Tag;_this700.ElementType=ElementType;_this700.PredefinedType=PredefinedType;_this700.type=1600972822;return _this700;}return _createClass(IfcTubeBundleType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcTubeBundleType=IfcTubeBundleType;var IfcUnitaryEquipmentType=/*#__PURE__*/function(_IfcEnergyConversionD9){_inherits(IfcUnitaryEquipmentType,_IfcEnergyConversionD9);var _super704=_createSuper(IfcUnitaryEquipmentType);function IfcUnitaryEquipmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this701;_classCallCheck(this,IfcUnitaryEquipmentType);_this701=_super704.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this701.GlobalId=GlobalId;_this701.OwnerHistory=OwnerHistory;_this701.Name=Name;_this701.Description=Description;_this701.ApplicableOccurrence=ApplicableOccurrence;_this701.HasPropertySets=HasPropertySets;_this701.RepresentationMaps=RepresentationMaps;_this701.Tag=Tag;_this701.ElementType=ElementType;_this701.PredefinedType=PredefinedType;_this701.type=1911125066;return _this701;}return _createClass(IfcUnitaryEquipmentType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcUnitaryEquipmentType=IfcUnitaryEquipmentType;var IfcValveType=/*#__PURE__*/function(_IfcFlowControllerTyp4){_inherits(IfcValveType,_IfcFlowControllerTyp4);var _super705=_createSuper(IfcValveType);function IfcValveType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this702;_classCallCheck(this,IfcValveType);_this702=_super705.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this702.GlobalId=GlobalId;_this702.OwnerHistory=OwnerHistory;_this702.Name=Name;_this702.Description=Description;_this702.ApplicableOccurrence=ApplicableOccurrence;_this702.HasPropertySets=HasPropertySets;_this702.RepresentationMaps=RepresentationMaps;_this702.Tag=Tag;_this702.ElementType=ElementType;_this702.PredefinedType=PredefinedType;_this702.type=728799441;return _this702;}return _createClass(IfcValveType);}(IfcFlowControllerType);IFC2X32.IfcValveType=IfcValveType;var IfcVirtualElement=/*#__PURE__*/function(_IfcElement7){_inherits(IfcVirtualElement,_IfcElement7);var _super706=_createSuper(IfcVirtualElement);function IfcVirtualElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this703;_classCallCheck(this,IfcVirtualElement);_this703=_super706.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this703.GlobalId=GlobalId;_this703.OwnerHistory=OwnerHistory;_this703.Name=Name;_this703.Description=Description;_this703.ObjectType=ObjectType;_this703.ObjectPlacement=ObjectPlacement;_this703.Representation=Representation;_this703.Tag=Tag;_this703.type=2769231204;return _this703;}return _createClass(IfcVirtualElement);}(IfcElement);IFC2X32.IfcVirtualElement=IfcVirtualElement;var IfcWallType=/*#__PURE__*/function(_IfcBuildingElementTy10){_inherits(IfcWallType,_IfcBuildingElementTy10);var _super707=_createSuper(IfcWallType);function IfcWallType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this704;_classCallCheck(this,IfcWallType);_this704=_super707.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this704.GlobalId=GlobalId;_this704.OwnerHistory=OwnerHistory;_this704.Name=Name;_this704.Description=Description;_this704.ApplicableOccurrence=ApplicableOccurrence;_this704.HasPropertySets=HasPropertySets;_this704.RepresentationMaps=RepresentationMaps;_this704.Tag=Tag;_this704.ElementType=ElementType;_this704.PredefinedType=PredefinedType;_this704.type=1898987631;return _this704;}return _createClass(IfcWallType);}(IfcBuildingElementType);IFC2X32.IfcWallType=IfcWallType;var IfcWasteTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType7){_inherits(IfcWasteTerminalType,_IfcFlowTerminalType7);var _super708=_createSuper(IfcWasteTerminalType);function IfcWasteTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this705;_classCallCheck(this,IfcWasteTerminalType);_this705=_super708.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this705.GlobalId=GlobalId;_this705.OwnerHistory=OwnerHistory;_this705.Name=Name;_this705.Description=Description;_this705.ApplicableOccurrence=ApplicableOccurrence;_this705.HasPropertySets=HasPropertySets;_this705.RepresentationMaps=RepresentationMaps;_this705.Tag=Tag;_this705.ElementType=ElementType;_this705.PredefinedType=PredefinedType;_this705.type=1133259667;return _this705;}return _createClass(IfcWasteTerminalType);}(IfcFlowTerminalType);IFC2X32.IfcWasteTerminalType=IfcWasteTerminalType;var IfcWorkControl=/*#__PURE__*/function(_IfcControl13){_inherits(IfcWorkControl,_IfcControl13);var _super709=_createSuper(IfcWorkControl);function IfcWorkControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identifier,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,WorkControlType,UserDefinedControlType){var _this706;_classCallCheck(this,IfcWorkControl);_this706=_super709.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this706.GlobalId=GlobalId;_this706.OwnerHistory=OwnerHistory;_this706.Name=Name;_this706.Description=Description;_this706.ObjectType=ObjectType;_this706.Identifier=Identifier;_this706.CreationDate=CreationDate;_this706.Creators=Creators;_this706.Purpose=Purpose;_this706.Duration=Duration;_this706.TotalFloat=TotalFloat;_this706.StartTime=StartTime;_this706.FinishTime=FinishTime;_this706.WorkControlType=WorkControlType;_this706.UserDefinedControlType=UserDefinedControlType;_this706.type=1028945134;return _this706;}return _createClass(IfcWorkControl);}(IfcControl);IFC2X32.IfcWorkControl=IfcWorkControl;var IfcWorkPlan=/*#__PURE__*/function(_IfcWorkControl){_inherits(IfcWorkPlan,_IfcWorkControl);var _super710=_createSuper(IfcWorkPlan);function IfcWorkPlan(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identifier,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,WorkControlType,UserDefinedControlType){var _this707;_classCallCheck(this,IfcWorkPlan);_this707=_super710.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identifier,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,WorkControlType,UserDefinedControlType);_this707.GlobalId=GlobalId;_this707.OwnerHistory=OwnerHistory;_this707.Name=Name;_this707.Description=Description;_this707.ObjectType=ObjectType;_this707.Identifier=Identifier;_this707.CreationDate=CreationDate;_this707.Creators=Creators;_this707.Purpose=Purpose;_this707.Duration=Duration;_this707.TotalFloat=TotalFloat;_this707.StartTime=StartTime;_this707.FinishTime=FinishTime;_this707.WorkControlType=WorkControlType;_this707.UserDefinedControlType=UserDefinedControlType;_this707.type=4218914973;return _this707;}return _createClass(IfcWorkPlan);}(IfcWorkControl);IFC2X32.IfcWorkPlan=IfcWorkPlan;var IfcWorkSchedule=/*#__PURE__*/function(_IfcWorkControl2){_inherits(IfcWorkSchedule,_IfcWorkControl2);var _super711=_createSuper(IfcWorkSchedule);function IfcWorkSchedule(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identifier,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,WorkControlType,UserDefinedControlType){var _this708;_classCallCheck(this,IfcWorkSchedule);_this708=_super711.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identifier,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,WorkControlType,UserDefinedControlType);_this708.GlobalId=GlobalId;_this708.OwnerHistory=OwnerHistory;_this708.Name=Name;_this708.Description=Description;_this708.ObjectType=ObjectType;_this708.Identifier=Identifier;_this708.CreationDate=CreationDate;_this708.Creators=Creators;_this708.Purpose=Purpose;_this708.Duration=Duration;_this708.TotalFloat=TotalFloat;_this708.StartTime=StartTime;_this708.FinishTime=FinishTime;_this708.WorkControlType=WorkControlType;_this708.UserDefinedControlType=UserDefinedControlType;_this708.type=3342526732;return _this708;}return _createClass(IfcWorkSchedule);}(IfcWorkControl);IFC2X32.IfcWorkSchedule=IfcWorkSchedule;var IfcZone=/*#__PURE__*/function(_IfcGroup5){_inherits(IfcZone,_IfcGroup5);var _super712=_createSuper(IfcZone);function IfcZone(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this709;_classCallCheck(this,IfcZone);_this709=_super712.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this709.GlobalId=GlobalId;_this709.OwnerHistory=OwnerHistory;_this709.Name=Name;_this709.Description=Description;_this709.ObjectType=ObjectType;_this709.type=1033361043;return _this709;}return _createClass(IfcZone);}(IfcGroup);IFC2X32.IfcZone=IfcZone;var Ifc2DCompositeCurve=/*#__PURE__*/function(_IfcCompositeCurve){_inherits(Ifc2DCompositeCurve,_IfcCompositeCurve);var _super713=_createSuper(Ifc2DCompositeCurve);function Ifc2DCompositeCurve(expressID,Segments,SelfIntersect){var _this710;_classCallCheck(this,Ifc2DCompositeCurve);_this710=_super713.call(this,expressID,Segments,SelfIntersect);_this710.Segments=Segments;_this710.SelfIntersect=SelfIntersect;_this710.type=1213861670;return _this710;}return _createClass(Ifc2DCompositeCurve);}(IfcCompositeCurve);IFC2X32.Ifc2DCompositeCurve=Ifc2DCompositeCurve;var IfcActionRequest=/*#__PURE__*/function(_IfcControl14){_inherits(IfcActionRequest,_IfcControl14);var _super714=_createSuper(IfcActionRequest);function IfcActionRequest(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,RequestID){var _this711;_classCallCheck(this,IfcActionRequest);_this711=_super714.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this711.GlobalId=GlobalId;_this711.OwnerHistory=OwnerHistory;_this711.Name=Name;_this711.Description=Description;_this711.ObjectType=ObjectType;_this711.RequestID=RequestID;_this711.type=3821786052;return _this711;}return _createClass(IfcActionRequest);}(IfcControl);IFC2X32.IfcActionRequest=IfcActionRequest;var IfcAirTerminalBoxType=/*#__PURE__*/function(_IfcFlowControllerTyp5){_inherits(IfcAirTerminalBoxType,_IfcFlowControllerTyp5);var _super715=_createSuper(IfcAirTerminalBoxType);function IfcAirTerminalBoxType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this712;_classCallCheck(this,IfcAirTerminalBoxType);_this712=_super715.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this712.GlobalId=GlobalId;_this712.OwnerHistory=OwnerHistory;_this712.Name=Name;_this712.Description=Description;_this712.ApplicableOccurrence=ApplicableOccurrence;_this712.HasPropertySets=HasPropertySets;_this712.RepresentationMaps=RepresentationMaps;_this712.Tag=Tag;_this712.ElementType=ElementType;_this712.PredefinedType=PredefinedType;_this712.type=1411407467;return _this712;}return _createClass(IfcAirTerminalBoxType);}(IfcFlowControllerType);IFC2X32.IfcAirTerminalBoxType=IfcAirTerminalBoxType;var IfcAirTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType8){_inherits(IfcAirTerminalType,_IfcFlowTerminalType8);var _super716=_createSuper(IfcAirTerminalType);function IfcAirTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this713;_classCallCheck(this,IfcAirTerminalType);_this713=_super716.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this713.GlobalId=GlobalId;_this713.OwnerHistory=OwnerHistory;_this713.Name=Name;_this713.Description=Description;_this713.ApplicableOccurrence=ApplicableOccurrence;_this713.HasPropertySets=HasPropertySets;_this713.RepresentationMaps=RepresentationMaps;_this713.Tag=Tag;_this713.ElementType=ElementType;_this713.PredefinedType=PredefinedType;_this713.type=3352864051;return _this713;}return _createClass(IfcAirTerminalType);}(IfcFlowTerminalType);IFC2X32.IfcAirTerminalType=IfcAirTerminalType;var IfcAirToAirHeatRecoveryType=/*#__PURE__*/function(_IfcEnergyConversionD10){_inherits(IfcAirToAirHeatRecoveryType,_IfcEnergyConversionD10);var _super717=_createSuper(IfcAirToAirHeatRecoveryType);function IfcAirToAirHeatRecoveryType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this714;_classCallCheck(this,IfcAirToAirHeatRecoveryType);_this714=_super717.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this714.GlobalId=GlobalId;_this714.OwnerHistory=OwnerHistory;_this714.Name=Name;_this714.Description=Description;_this714.ApplicableOccurrence=ApplicableOccurrence;_this714.HasPropertySets=HasPropertySets;_this714.RepresentationMaps=RepresentationMaps;_this714.Tag=Tag;_this714.ElementType=ElementType;_this714.PredefinedType=PredefinedType;_this714.type=1871374353;return _this714;}return _createClass(IfcAirToAirHeatRecoveryType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcAirToAirHeatRecoveryType=IfcAirToAirHeatRecoveryType;var IfcAngularDimension=/*#__PURE__*/function(_IfcDimensionCurveDir3){_inherits(IfcAngularDimension,_IfcDimensionCurveDir3);var _super718=_createSuper(IfcAngularDimension);function IfcAngularDimension(expressID,Contents){var _this715;_classCallCheck(this,IfcAngularDimension);_this715=_super718.call(this,expressID,Contents);_this715.Contents=Contents;_this715.type=2470393545;return _this715;}return _createClass(IfcAngularDimension);}(IfcDimensionCurveDirectedCallout);IFC2X32.IfcAngularDimension=IfcAngularDimension;var IfcAsset=/*#__PURE__*/function(_IfcGroup6){_inherits(IfcAsset,_IfcGroup6);var _super719=_createSuper(IfcAsset);function IfcAsset(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,AssetID,OriginalValue,CurrentValue,TotalReplacementCost,Owner,User,ResponsiblePerson,IncorporationDate,DepreciatedValue){var _this716;_classCallCheck(this,IfcAsset);_this716=_super719.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this716.GlobalId=GlobalId;_this716.OwnerHistory=OwnerHistory;_this716.Name=Name;_this716.Description=Description;_this716.ObjectType=ObjectType;_this716.AssetID=AssetID;_this716.OriginalValue=OriginalValue;_this716.CurrentValue=CurrentValue;_this716.TotalReplacementCost=TotalReplacementCost;_this716.Owner=Owner;_this716.User=User;_this716.ResponsiblePerson=ResponsiblePerson;_this716.IncorporationDate=IncorporationDate;_this716.DepreciatedValue=DepreciatedValue;_this716.type=3460190687;return _this716;}return _createClass(IfcAsset);}(IfcGroup);IFC2X32.IfcAsset=IfcAsset;var IfcBSplineCurve=/*#__PURE__*/function(_IfcBoundedCurve4){_inherits(IfcBSplineCurve,_IfcBoundedCurve4);var _super720=_createSuper(IfcBSplineCurve);function IfcBSplineCurve(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect){var _this717;_classCallCheck(this,IfcBSplineCurve);_this717=_super720.call(this,expressID);_this717.Degree=Degree;_this717.ControlPointsList=ControlPointsList;_this717.CurveForm=CurveForm;_this717.ClosedCurve=ClosedCurve;_this717.SelfIntersect=SelfIntersect;_this717.type=1967976161;return _this717;}return _createClass(IfcBSplineCurve);}(IfcBoundedCurve);IFC2X32.IfcBSplineCurve=IfcBSplineCurve;var IfcBeamType=/*#__PURE__*/function(_IfcBuildingElementTy11){_inherits(IfcBeamType,_IfcBuildingElementTy11);var _super721=_createSuper(IfcBeamType);function IfcBeamType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this718;_classCallCheck(this,IfcBeamType);_this718=_super721.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this718.GlobalId=GlobalId;_this718.OwnerHistory=OwnerHistory;_this718.Name=Name;_this718.Description=Description;_this718.ApplicableOccurrence=ApplicableOccurrence;_this718.HasPropertySets=HasPropertySets;_this718.RepresentationMaps=RepresentationMaps;_this718.Tag=Tag;_this718.ElementType=ElementType;_this718.PredefinedType=PredefinedType;_this718.type=819618141;return _this718;}return _createClass(IfcBeamType);}(IfcBuildingElementType);IFC2X32.IfcBeamType=IfcBeamType;var IfcBezierCurve=/*#__PURE__*/function(_IfcBSplineCurve){_inherits(IfcBezierCurve,_IfcBSplineCurve);var _super722=_createSuper(IfcBezierCurve);function IfcBezierCurve(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect){var _this719;_classCallCheck(this,IfcBezierCurve);_this719=_super722.call(this,expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect);_this719.Degree=Degree;_this719.ControlPointsList=ControlPointsList;_this719.CurveForm=CurveForm;_this719.ClosedCurve=ClosedCurve;_this719.SelfIntersect=SelfIntersect;_this719.type=1916977116;return _this719;}return _createClass(IfcBezierCurve);}(IfcBSplineCurve);IFC2X32.IfcBezierCurve=IfcBezierCurve;var IfcBoilerType=/*#__PURE__*/function(_IfcEnergyConversionD11){_inherits(IfcBoilerType,_IfcEnergyConversionD11);var _super723=_createSuper(IfcBoilerType);function IfcBoilerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this720;_classCallCheck(this,IfcBoilerType);_this720=_super723.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this720.GlobalId=GlobalId;_this720.OwnerHistory=OwnerHistory;_this720.Name=Name;_this720.Description=Description;_this720.ApplicableOccurrence=ApplicableOccurrence;_this720.HasPropertySets=HasPropertySets;_this720.RepresentationMaps=RepresentationMaps;_this720.Tag=Tag;_this720.ElementType=ElementType;_this720.PredefinedType=PredefinedType;_this720.type=231477066;return _this720;}return _createClass(IfcBoilerType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcBoilerType=IfcBoilerType;var IfcBuildingElement=/*#__PURE__*/function(_IfcElement8){_inherits(IfcBuildingElement,_IfcElement8);var _super724=_createSuper(IfcBuildingElement);function IfcBuildingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this721;_classCallCheck(this,IfcBuildingElement);_this721=_super724.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this721.GlobalId=GlobalId;_this721.OwnerHistory=OwnerHistory;_this721.Name=Name;_this721.Description=Description;_this721.ObjectType=ObjectType;_this721.ObjectPlacement=ObjectPlacement;_this721.Representation=Representation;_this721.Tag=Tag;_this721.type=3299480353;return _this721;}return _createClass(IfcBuildingElement);}(IfcElement);IFC2X32.IfcBuildingElement=IfcBuildingElement;var IfcBuildingElementComponent=/*#__PURE__*/function(_IfcBuildingElement){_inherits(IfcBuildingElementComponent,_IfcBuildingElement);var _super725=_createSuper(IfcBuildingElementComponent);function IfcBuildingElementComponent(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this722;_classCallCheck(this,IfcBuildingElementComponent);_this722=_super725.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this722.GlobalId=GlobalId;_this722.OwnerHistory=OwnerHistory;_this722.Name=Name;_this722.Description=Description;_this722.ObjectType=ObjectType;_this722.ObjectPlacement=ObjectPlacement;_this722.Representation=Representation;_this722.Tag=Tag;_this722.type=52481810;return _this722;}return _createClass(IfcBuildingElementComponent);}(IfcBuildingElement);IFC2X32.IfcBuildingElementComponent=IfcBuildingElementComponent;var IfcBuildingElementPart=/*#__PURE__*/function(_IfcBuildingElementCo){_inherits(IfcBuildingElementPart,_IfcBuildingElementCo);var _super726=_createSuper(IfcBuildingElementPart);function IfcBuildingElementPart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this723;_classCallCheck(this,IfcBuildingElementPart);_this723=_super726.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this723.GlobalId=GlobalId;_this723.OwnerHistory=OwnerHistory;_this723.Name=Name;_this723.Description=Description;_this723.ObjectType=ObjectType;_this723.ObjectPlacement=ObjectPlacement;_this723.Representation=Representation;_this723.Tag=Tag;_this723.type=2979338954;return _this723;}return _createClass(IfcBuildingElementPart);}(IfcBuildingElementComponent);IFC2X32.IfcBuildingElementPart=IfcBuildingElementPart;var IfcBuildingElementProxy=/*#__PURE__*/function(_IfcBuildingElement2){_inherits(IfcBuildingElementProxy,_IfcBuildingElement2);var _super727=_createSuper(IfcBuildingElementProxy);function IfcBuildingElementProxy(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,CompositionType){var _this724;_classCallCheck(this,IfcBuildingElementProxy);_this724=_super727.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this724.GlobalId=GlobalId;_this724.OwnerHistory=OwnerHistory;_this724.Name=Name;_this724.Description=Description;_this724.ObjectType=ObjectType;_this724.ObjectPlacement=ObjectPlacement;_this724.Representation=Representation;_this724.Tag=Tag;_this724.CompositionType=CompositionType;_this724.type=1095909175;return _this724;}return _createClass(IfcBuildingElementProxy);}(IfcBuildingElement);IFC2X32.IfcBuildingElementProxy=IfcBuildingElementProxy;var IfcBuildingElementProxyType=/*#__PURE__*/function(_IfcBuildingElementTy12){_inherits(IfcBuildingElementProxyType,_IfcBuildingElementTy12);var _super728=_createSuper(IfcBuildingElementProxyType);function IfcBuildingElementProxyType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this725;_classCallCheck(this,IfcBuildingElementProxyType);_this725=_super728.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this725.GlobalId=GlobalId;_this725.OwnerHistory=OwnerHistory;_this725.Name=Name;_this725.Description=Description;_this725.ApplicableOccurrence=ApplicableOccurrence;_this725.HasPropertySets=HasPropertySets;_this725.RepresentationMaps=RepresentationMaps;_this725.Tag=Tag;_this725.ElementType=ElementType;_this725.PredefinedType=PredefinedType;_this725.type=1909888760;return _this725;}return _createClass(IfcBuildingElementProxyType);}(IfcBuildingElementType);IFC2X32.IfcBuildingElementProxyType=IfcBuildingElementProxyType;var IfcCableCarrierFittingType=/*#__PURE__*/function(_IfcFlowFittingType3){_inherits(IfcCableCarrierFittingType,_IfcFlowFittingType3);var _super729=_createSuper(IfcCableCarrierFittingType);function IfcCableCarrierFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this726;_classCallCheck(this,IfcCableCarrierFittingType);_this726=_super729.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this726.GlobalId=GlobalId;_this726.OwnerHistory=OwnerHistory;_this726.Name=Name;_this726.Description=Description;_this726.ApplicableOccurrence=ApplicableOccurrence;_this726.HasPropertySets=HasPropertySets;_this726.RepresentationMaps=RepresentationMaps;_this726.Tag=Tag;_this726.ElementType=ElementType;_this726.PredefinedType=PredefinedType;_this726.type=395041908;return _this726;}return _createClass(IfcCableCarrierFittingType);}(IfcFlowFittingType);IFC2X32.IfcCableCarrierFittingType=IfcCableCarrierFittingType;var IfcCableCarrierSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType2){_inherits(IfcCableCarrierSegmentType,_IfcFlowSegmentType2);var _super730=_createSuper(IfcCableCarrierSegmentType);function IfcCableCarrierSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this727;_classCallCheck(this,IfcCableCarrierSegmentType);_this727=_super730.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this727.GlobalId=GlobalId;_this727.OwnerHistory=OwnerHistory;_this727.Name=Name;_this727.Description=Description;_this727.ApplicableOccurrence=ApplicableOccurrence;_this727.HasPropertySets=HasPropertySets;_this727.RepresentationMaps=RepresentationMaps;_this727.Tag=Tag;_this727.ElementType=ElementType;_this727.PredefinedType=PredefinedType;_this727.type=3293546465;return _this727;}return _createClass(IfcCableCarrierSegmentType);}(IfcFlowSegmentType);IFC2X32.IfcCableCarrierSegmentType=IfcCableCarrierSegmentType;var IfcCableSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType3){_inherits(IfcCableSegmentType,_IfcFlowSegmentType3);var _super731=_createSuper(IfcCableSegmentType);function IfcCableSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this728;_classCallCheck(this,IfcCableSegmentType);_this728=_super731.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this728.GlobalId=GlobalId;_this728.OwnerHistory=OwnerHistory;_this728.Name=Name;_this728.Description=Description;_this728.ApplicableOccurrence=ApplicableOccurrence;_this728.HasPropertySets=HasPropertySets;_this728.RepresentationMaps=RepresentationMaps;_this728.Tag=Tag;_this728.ElementType=ElementType;_this728.PredefinedType=PredefinedType;_this728.type=1285652485;return _this728;}return _createClass(IfcCableSegmentType);}(IfcFlowSegmentType);IFC2X32.IfcCableSegmentType=IfcCableSegmentType;var IfcChillerType=/*#__PURE__*/function(_IfcEnergyConversionD12){_inherits(IfcChillerType,_IfcEnergyConversionD12);var _super732=_createSuper(IfcChillerType);function IfcChillerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this729;_classCallCheck(this,IfcChillerType);_this729=_super732.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this729.GlobalId=GlobalId;_this729.OwnerHistory=OwnerHistory;_this729.Name=Name;_this729.Description=Description;_this729.ApplicableOccurrence=ApplicableOccurrence;_this729.HasPropertySets=HasPropertySets;_this729.RepresentationMaps=RepresentationMaps;_this729.Tag=Tag;_this729.ElementType=ElementType;_this729.PredefinedType=PredefinedType;_this729.type=2951183804;return _this729;}return _createClass(IfcChillerType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcChillerType=IfcChillerType;var IfcCircle=/*#__PURE__*/function(_IfcConic2){_inherits(IfcCircle,_IfcConic2);var _super733=_createSuper(IfcCircle);function IfcCircle(expressID,Position,Radius){var _this730;_classCallCheck(this,IfcCircle);_this730=_super733.call(this,expressID,Position);_this730.Position=Position;_this730.Radius=Radius;_this730.type=2611217952;return _this730;}return _createClass(IfcCircle);}(IfcConic);IFC2X32.IfcCircle=IfcCircle;var IfcCoilType=/*#__PURE__*/function(_IfcEnergyConversionD13){_inherits(IfcCoilType,_IfcEnergyConversionD13);var _super734=_createSuper(IfcCoilType);function IfcCoilType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this731;_classCallCheck(this,IfcCoilType);_this731=_super734.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this731.GlobalId=GlobalId;_this731.OwnerHistory=OwnerHistory;_this731.Name=Name;_this731.Description=Description;_this731.ApplicableOccurrence=ApplicableOccurrence;_this731.HasPropertySets=HasPropertySets;_this731.RepresentationMaps=RepresentationMaps;_this731.Tag=Tag;_this731.ElementType=ElementType;_this731.PredefinedType=PredefinedType;_this731.type=2301859152;return _this731;}return _createClass(IfcCoilType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcCoilType=IfcCoilType;var IfcColumn=/*#__PURE__*/function(_IfcBuildingElement3){_inherits(IfcColumn,_IfcBuildingElement3);var _super735=_createSuper(IfcColumn);function IfcColumn(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this732;_classCallCheck(this,IfcColumn);_this732=_super735.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this732.GlobalId=GlobalId;_this732.OwnerHistory=OwnerHistory;_this732.Name=Name;_this732.Description=Description;_this732.ObjectType=ObjectType;_this732.ObjectPlacement=ObjectPlacement;_this732.Representation=Representation;_this732.Tag=Tag;_this732.type=843113511;return _this732;}return _createClass(IfcColumn);}(IfcBuildingElement);IFC2X32.IfcColumn=IfcColumn;var IfcCompressorType=/*#__PURE__*/function(_IfcFlowMovingDeviceT2){_inherits(IfcCompressorType,_IfcFlowMovingDeviceT2);var _super736=_createSuper(IfcCompressorType);function IfcCompressorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this733;_classCallCheck(this,IfcCompressorType);_this733=_super736.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this733.GlobalId=GlobalId;_this733.OwnerHistory=OwnerHistory;_this733.Name=Name;_this733.Description=Description;_this733.ApplicableOccurrence=ApplicableOccurrence;_this733.HasPropertySets=HasPropertySets;_this733.RepresentationMaps=RepresentationMaps;_this733.Tag=Tag;_this733.ElementType=ElementType;_this733.PredefinedType=PredefinedType;_this733.type=3850581409;return _this733;}return _createClass(IfcCompressorType);}(IfcFlowMovingDeviceType);IFC2X32.IfcCompressorType=IfcCompressorType;var IfcCondenserType=/*#__PURE__*/function(_IfcEnergyConversionD14){_inherits(IfcCondenserType,_IfcEnergyConversionD14);var _super737=_createSuper(IfcCondenserType);function IfcCondenserType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this734;_classCallCheck(this,IfcCondenserType);_this734=_super737.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this734.GlobalId=GlobalId;_this734.OwnerHistory=OwnerHistory;_this734.Name=Name;_this734.Description=Description;_this734.ApplicableOccurrence=ApplicableOccurrence;_this734.HasPropertySets=HasPropertySets;_this734.RepresentationMaps=RepresentationMaps;_this734.Tag=Tag;_this734.ElementType=ElementType;_this734.PredefinedType=PredefinedType;_this734.type=2816379211;return _this734;}return _createClass(IfcCondenserType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcCondenserType=IfcCondenserType;var IfcCondition=/*#__PURE__*/function(_IfcGroup7){_inherits(IfcCondition,_IfcGroup7);var _super738=_createSuper(IfcCondition);function IfcCondition(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this735;_classCallCheck(this,IfcCondition);_this735=_super738.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this735.GlobalId=GlobalId;_this735.OwnerHistory=OwnerHistory;_this735.Name=Name;_this735.Description=Description;_this735.ObjectType=ObjectType;_this735.type=2188551683;return _this735;}return _createClass(IfcCondition);}(IfcGroup);IFC2X32.IfcCondition=IfcCondition;var IfcConditionCriterion=/*#__PURE__*/function(_IfcControl15){_inherits(IfcConditionCriterion,_IfcControl15);var _super739=_createSuper(IfcConditionCriterion);function IfcConditionCriterion(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Criterion,CriterionDateTime){var _this736;_classCallCheck(this,IfcConditionCriterion);_this736=_super739.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this736.GlobalId=GlobalId;_this736.OwnerHistory=OwnerHistory;_this736.Name=Name;_this736.Description=Description;_this736.ObjectType=ObjectType;_this736.Criterion=Criterion;_this736.CriterionDateTime=CriterionDateTime;_this736.type=1163958913;return _this736;}return _createClass(IfcConditionCriterion);}(IfcControl);IFC2X32.IfcConditionCriterion=IfcConditionCriterion;var IfcConstructionEquipmentResource=/*#__PURE__*/function(_IfcConstructionResou4){_inherits(IfcConstructionEquipmentResource,_IfcConstructionResou4);var _super740=_createSuper(IfcConstructionEquipmentResource);function IfcConstructionEquipmentResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity){var _this737;_classCallCheck(this,IfcConstructionEquipmentResource);_this737=_super740.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity);_this737.GlobalId=GlobalId;_this737.OwnerHistory=OwnerHistory;_this737.Name=Name;_this737.Description=Description;_this737.ObjectType=ObjectType;_this737.ResourceIdentifier=ResourceIdentifier;_this737.ResourceGroup=ResourceGroup;_this737.ResourceConsumption=ResourceConsumption;_this737.BaseQuantity=BaseQuantity;_this737.type=3898045240;return _this737;}return _createClass(IfcConstructionEquipmentResource);}(IfcConstructionResource);IFC2X32.IfcConstructionEquipmentResource=IfcConstructionEquipmentResource;var IfcConstructionMaterialResource=/*#__PURE__*/function(_IfcConstructionResou5){_inherits(IfcConstructionMaterialResource,_IfcConstructionResou5);var _super741=_createSuper(IfcConstructionMaterialResource);function IfcConstructionMaterialResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity,Suppliers,UsageRatio){var _this738;_classCallCheck(this,IfcConstructionMaterialResource);_this738=_super741.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity);_this738.GlobalId=GlobalId;_this738.OwnerHistory=OwnerHistory;_this738.Name=Name;_this738.Description=Description;_this738.ObjectType=ObjectType;_this738.ResourceIdentifier=ResourceIdentifier;_this738.ResourceGroup=ResourceGroup;_this738.ResourceConsumption=ResourceConsumption;_this738.BaseQuantity=BaseQuantity;_this738.Suppliers=Suppliers;_this738.UsageRatio=UsageRatio;_this738.type=1060000209;return _this738;}return _createClass(IfcConstructionMaterialResource);}(IfcConstructionResource);IFC2X32.IfcConstructionMaterialResource=IfcConstructionMaterialResource;var IfcConstructionProductResource=/*#__PURE__*/function(_IfcConstructionResou6){_inherits(IfcConstructionProductResource,_IfcConstructionResou6);var _super742=_createSuper(IfcConstructionProductResource);function IfcConstructionProductResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity){var _this739;_classCallCheck(this,IfcConstructionProductResource);_this739=_super742.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ResourceIdentifier,ResourceGroup,ResourceConsumption,BaseQuantity);_this739.GlobalId=GlobalId;_this739.OwnerHistory=OwnerHistory;_this739.Name=Name;_this739.Description=Description;_this739.ObjectType=ObjectType;_this739.ResourceIdentifier=ResourceIdentifier;_this739.ResourceGroup=ResourceGroup;_this739.ResourceConsumption=ResourceConsumption;_this739.BaseQuantity=BaseQuantity;_this739.type=488727124;return _this739;}return _createClass(IfcConstructionProductResource);}(IfcConstructionResource);IFC2X32.IfcConstructionProductResource=IfcConstructionProductResource;var IfcCooledBeamType=/*#__PURE__*/function(_IfcEnergyConversionD15){_inherits(IfcCooledBeamType,_IfcEnergyConversionD15);var _super743=_createSuper(IfcCooledBeamType);function IfcCooledBeamType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this740;_classCallCheck(this,IfcCooledBeamType);_this740=_super743.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this740.GlobalId=GlobalId;_this740.OwnerHistory=OwnerHistory;_this740.Name=Name;_this740.Description=Description;_this740.ApplicableOccurrence=ApplicableOccurrence;_this740.HasPropertySets=HasPropertySets;_this740.RepresentationMaps=RepresentationMaps;_this740.Tag=Tag;_this740.ElementType=ElementType;_this740.PredefinedType=PredefinedType;_this740.type=335055490;return _this740;}return _createClass(IfcCooledBeamType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcCooledBeamType=IfcCooledBeamType;var IfcCoolingTowerType=/*#__PURE__*/function(_IfcEnergyConversionD16){_inherits(IfcCoolingTowerType,_IfcEnergyConversionD16);var _super744=_createSuper(IfcCoolingTowerType);function IfcCoolingTowerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this741;_classCallCheck(this,IfcCoolingTowerType);_this741=_super744.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this741.GlobalId=GlobalId;_this741.OwnerHistory=OwnerHistory;_this741.Name=Name;_this741.Description=Description;_this741.ApplicableOccurrence=ApplicableOccurrence;_this741.HasPropertySets=HasPropertySets;_this741.RepresentationMaps=RepresentationMaps;_this741.Tag=Tag;_this741.ElementType=ElementType;_this741.PredefinedType=PredefinedType;_this741.type=2954562838;return _this741;}return _createClass(IfcCoolingTowerType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcCoolingTowerType=IfcCoolingTowerType;var IfcCovering=/*#__PURE__*/function(_IfcBuildingElement4){_inherits(IfcCovering,_IfcBuildingElement4);var _super745=_createSuper(IfcCovering);function IfcCovering(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this742;_classCallCheck(this,IfcCovering);_this742=_super745.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this742.GlobalId=GlobalId;_this742.OwnerHistory=OwnerHistory;_this742.Name=Name;_this742.Description=Description;_this742.ObjectType=ObjectType;_this742.ObjectPlacement=ObjectPlacement;_this742.Representation=Representation;_this742.Tag=Tag;_this742.PredefinedType=PredefinedType;_this742.type=1973544240;return _this742;}return _createClass(IfcCovering);}(IfcBuildingElement);IFC2X32.IfcCovering=IfcCovering;var IfcCurtainWall=/*#__PURE__*/function(_IfcBuildingElement5){_inherits(IfcCurtainWall,_IfcBuildingElement5);var _super746=_createSuper(IfcCurtainWall);function IfcCurtainWall(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this743;_classCallCheck(this,IfcCurtainWall);_this743=_super746.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this743.GlobalId=GlobalId;_this743.OwnerHistory=OwnerHistory;_this743.Name=Name;_this743.Description=Description;_this743.ObjectType=ObjectType;_this743.ObjectPlacement=ObjectPlacement;_this743.Representation=Representation;_this743.Tag=Tag;_this743.type=3495092785;return _this743;}return _createClass(IfcCurtainWall);}(IfcBuildingElement);IFC2X32.IfcCurtainWall=IfcCurtainWall;var IfcDamperType=/*#__PURE__*/function(_IfcFlowControllerTyp6){_inherits(IfcDamperType,_IfcFlowControllerTyp6);var _super747=_createSuper(IfcDamperType);function IfcDamperType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this744;_classCallCheck(this,IfcDamperType);_this744=_super747.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this744.GlobalId=GlobalId;_this744.OwnerHistory=OwnerHistory;_this744.Name=Name;_this744.Description=Description;_this744.ApplicableOccurrence=ApplicableOccurrence;_this744.HasPropertySets=HasPropertySets;_this744.RepresentationMaps=RepresentationMaps;_this744.Tag=Tag;_this744.ElementType=ElementType;_this744.PredefinedType=PredefinedType;_this744.type=3961806047;return _this744;}return _createClass(IfcDamperType);}(IfcFlowControllerType);IFC2X32.IfcDamperType=IfcDamperType;var IfcDiameterDimension=/*#__PURE__*/function(_IfcDimensionCurveDir4){_inherits(IfcDiameterDimension,_IfcDimensionCurveDir4);var _super748=_createSuper(IfcDiameterDimension);function IfcDiameterDimension(expressID,Contents){var _this745;_classCallCheck(this,IfcDiameterDimension);_this745=_super748.call(this,expressID,Contents);_this745.Contents=Contents;_this745.type=4147604152;return _this745;}return _createClass(IfcDiameterDimension);}(IfcDimensionCurveDirectedCallout);IFC2X32.IfcDiameterDimension=IfcDiameterDimension;var IfcDiscreteAccessory=/*#__PURE__*/function(_IfcElementComponent2){_inherits(IfcDiscreteAccessory,_IfcElementComponent2);var _super749=_createSuper(IfcDiscreteAccessory);function IfcDiscreteAccessory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this746;_classCallCheck(this,IfcDiscreteAccessory);_this746=_super749.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this746.GlobalId=GlobalId;_this746.OwnerHistory=OwnerHistory;_this746.Name=Name;_this746.Description=Description;_this746.ObjectType=ObjectType;_this746.ObjectPlacement=ObjectPlacement;_this746.Representation=Representation;_this746.Tag=Tag;_this746.type=1335981549;return _this746;}return _createClass(IfcDiscreteAccessory);}(IfcElementComponent);IFC2X32.IfcDiscreteAccessory=IfcDiscreteAccessory;var IfcDiscreteAccessoryType=/*#__PURE__*/function(_IfcElementComponentT2){_inherits(IfcDiscreteAccessoryType,_IfcElementComponentT2);var _super750=_createSuper(IfcDiscreteAccessoryType);function IfcDiscreteAccessoryType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this747;_classCallCheck(this,IfcDiscreteAccessoryType);_this747=_super750.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this747.GlobalId=GlobalId;_this747.OwnerHistory=OwnerHistory;_this747.Name=Name;_this747.Description=Description;_this747.ApplicableOccurrence=ApplicableOccurrence;_this747.HasPropertySets=HasPropertySets;_this747.RepresentationMaps=RepresentationMaps;_this747.Tag=Tag;_this747.ElementType=ElementType;_this747.type=2635815018;return _this747;}return _createClass(IfcDiscreteAccessoryType);}(IfcElementComponentType);IFC2X32.IfcDiscreteAccessoryType=IfcDiscreteAccessoryType;var IfcDistributionChamberElementType=/*#__PURE__*/function(_IfcDistributionFlowE9){_inherits(IfcDistributionChamberElementType,_IfcDistributionFlowE9);var _super751=_createSuper(IfcDistributionChamberElementType);function IfcDistributionChamberElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this748;_classCallCheck(this,IfcDistributionChamberElementType);_this748=_super751.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this748.GlobalId=GlobalId;_this748.OwnerHistory=OwnerHistory;_this748.Name=Name;_this748.Description=Description;_this748.ApplicableOccurrence=ApplicableOccurrence;_this748.HasPropertySets=HasPropertySets;_this748.RepresentationMaps=RepresentationMaps;_this748.Tag=Tag;_this748.ElementType=ElementType;_this748.PredefinedType=PredefinedType;_this748.type=1599208980;return _this748;}return _createClass(IfcDistributionChamberElementType);}(IfcDistributionFlowElementType);IFC2X32.IfcDistributionChamberElementType=IfcDistributionChamberElementType;var IfcDistributionControlElementType=/*#__PURE__*/function(_IfcDistributionEleme2){_inherits(IfcDistributionControlElementType,_IfcDistributionEleme2);var _super752=_createSuper(IfcDistributionControlElementType);function IfcDistributionControlElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this749;_classCallCheck(this,IfcDistributionControlElementType);_this749=_super752.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this749.GlobalId=GlobalId;_this749.OwnerHistory=OwnerHistory;_this749.Name=Name;_this749.Description=Description;_this749.ApplicableOccurrence=ApplicableOccurrence;_this749.HasPropertySets=HasPropertySets;_this749.RepresentationMaps=RepresentationMaps;_this749.Tag=Tag;_this749.ElementType=ElementType;_this749.type=2063403501;return _this749;}return _createClass(IfcDistributionControlElementType);}(IfcDistributionElementType);IFC2X32.IfcDistributionControlElementType=IfcDistributionControlElementType;var IfcDistributionElement=/*#__PURE__*/function(_IfcElement9){_inherits(IfcDistributionElement,_IfcElement9);var _super753=_createSuper(IfcDistributionElement);function IfcDistributionElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this750;_classCallCheck(this,IfcDistributionElement);_this750=_super753.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this750.GlobalId=GlobalId;_this750.OwnerHistory=OwnerHistory;_this750.Name=Name;_this750.Description=Description;_this750.ObjectType=ObjectType;_this750.ObjectPlacement=ObjectPlacement;_this750.Representation=Representation;_this750.Tag=Tag;_this750.type=1945004755;return _this750;}return _createClass(IfcDistributionElement);}(IfcElement);IFC2X32.IfcDistributionElement=IfcDistributionElement;var IfcDistributionFlowElement=/*#__PURE__*/function(_IfcDistributionEleme3){_inherits(IfcDistributionFlowElement,_IfcDistributionEleme3);var _super754=_createSuper(IfcDistributionFlowElement);function IfcDistributionFlowElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this751;_classCallCheck(this,IfcDistributionFlowElement);_this751=_super754.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this751.GlobalId=GlobalId;_this751.OwnerHistory=OwnerHistory;_this751.Name=Name;_this751.Description=Description;_this751.ObjectType=ObjectType;_this751.ObjectPlacement=ObjectPlacement;_this751.Representation=Representation;_this751.Tag=Tag;_this751.type=3040386961;return _this751;}return _createClass(IfcDistributionFlowElement);}(IfcDistributionElement);IFC2X32.IfcDistributionFlowElement=IfcDistributionFlowElement;var IfcDistributionPort=/*#__PURE__*/function(_IfcPort){_inherits(IfcDistributionPort,_IfcPort);var _super755=_createSuper(IfcDistributionPort);function IfcDistributionPort(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,FlowDirection){var _this752;_classCallCheck(this,IfcDistributionPort);_this752=_super755.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this752.GlobalId=GlobalId;_this752.OwnerHistory=OwnerHistory;_this752.Name=Name;_this752.Description=Description;_this752.ObjectType=ObjectType;_this752.ObjectPlacement=ObjectPlacement;_this752.Representation=Representation;_this752.FlowDirection=FlowDirection;_this752.type=3041715199;return _this752;}return _createClass(IfcDistributionPort);}(IfcPort);IFC2X32.IfcDistributionPort=IfcDistributionPort;var IfcDoor=/*#__PURE__*/function(_IfcBuildingElement6){_inherits(IfcDoor,_IfcBuildingElement6);var _super756=_createSuper(IfcDoor);function IfcDoor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth){var _this753;_classCallCheck(this,IfcDoor);_this753=_super756.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this753.GlobalId=GlobalId;_this753.OwnerHistory=OwnerHistory;_this753.Name=Name;_this753.Description=Description;_this753.ObjectType=ObjectType;_this753.ObjectPlacement=ObjectPlacement;_this753.Representation=Representation;_this753.Tag=Tag;_this753.OverallHeight=OverallHeight;_this753.OverallWidth=OverallWidth;_this753.type=395920057;return _this753;}return _createClass(IfcDoor);}(IfcBuildingElement);IFC2X32.IfcDoor=IfcDoor;var IfcDuctFittingType=/*#__PURE__*/function(_IfcFlowFittingType4){_inherits(IfcDuctFittingType,_IfcFlowFittingType4);var _super757=_createSuper(IfcDuctFittingType);function IfcDuctFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this754;_classCallCheck(this,IfcDuctFittingType);_this754=_super757.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this754.GlobalId=GlobalId;_this754.OwnerHistory=OwnerHistory;_this754.Name=Name;_this754.Description=Description;_this754.ApplicableOccurrence=ApplicableOccurrence;_this754.HasPropertySets=HasPropertySets;_this754.RepresentationMaps=RepresentationMaps;_this754.Tag=Tag;_this754.ElementType=ElementType;_this754.PredefinedType=PredefinedType;_this754.type=869906466;return _this754;}return _createClass(IfcDuctFittingType);}(IfcFlowFittingType);IFC2X32.IfcDuctFittingType=IfcDuctFittingType;var IfcDuctSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType4){_inherits(IfcDuctSegmentType,_IfcFlowSegmentType4);var _super758=_createSuper(IfcDuctSegmentType);function IfcDuctSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this755;_classCallCheck(this,IfcDuctSegmentType);_this755=_super758.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this755.GlobalId=GlobalId;_this755.OwnerHistory=OwnerHistory;_this755.Name=Name;_this755.Description=Description;_this755.ApplicableOccurrence=ApplicableOccurrence;_this755.HasPropertySets=HasPropertySets;_this755.RepresentationMaps=RepresentationMaps;_this755.Tag=Tag;_this755.ElementType=ElementType;_this755.PredefinedType=PredefinedType;_this755.type=3760055223;return _this755;}return _createClass(IfcDuctSegmentType);}(IfcFlowSegmentType);IFC2X32.IfcDuctSegmentType=IfcDuctSegmentType;var IfcDuctSilencerType=/*#__PURE__*/function(_IfcFlowTreatmentDevi){_inherits(IfcDuctSilencerType,_IfcFlowTreatmentDevi);var _super759=_createSuper(IfcDuctSilencerType);function IfcDuctSilencerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this756;_classCallCheck(this,IfcDuctSilencerType);_this756=_super759.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this756.GlobalId=GlobalId;_this756.OwnerHistory=OwnerHistory;_this756.Name=Name;_this756.Description=Description;_this756.ApplicableOccurrence=ApplicableOccurrence;_this756.HasPropertySets=HasPropertySets;_this756.RepresentationMaps=RepresentationMaps;_this756.Tag=Tag;_this756.ElementType=ElementType;_this756.PredefinedType=PredefinedType;_this756.type=2030761528;return _this756;}return _createClass(IfcDuctSilencerType);}(IfcFlowTreatmentDeviceType);IFC2X32.IfcDuctSilencerType=IfcDuctSilencerType;var IfcEdgeFeature=/*#__PURE__*/function(_IfcFeatureElementSub2){_inherits(IfcEdgeFeature,_IfcFeatureElementSub2);var _super760=_createSuper(IfcEdgeFeature);function IfcEdgeFeature(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,FeatureLength){var _this757;_classCallCheck(this,IfcEdgeFeature);_this757=_super760.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this757.GlobalId=GlobalId;_this757.OwnerHistory=OwnerHistory;_this757.Name=Name;_this757.Description=Description;_this757.ObjectType=ObjectType;_this757.ObjectPlacement=ObjectPlacement;_this757.Representation=Representation;_this757.Tag=Tag;_this757.FeatureLength=FeatureLength;_this757.type=855621170;return _this757;}return _createClass(IfcEdgeFeature);}(IfcFeatureElementSubtraction);IFC2X32.IfcEdgeFeature=IfcEdgeFeature;var IfcElectricApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType9){_inherits(IfcElectricApplianceType,_IfcFlowTerminalType9);var _super761=_createSuper(IfcElectricApplianceType);function IfcElectricApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this758;_classCallCheck(this,IfcElectricApplianceType);_this758=_super761.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this758.GlobalId=GlobalId;_this758.OwnerHistory=OwnerHistory;_this758.Name=Name;_this758.Description=Description;_this758.ApplicableOccurrence=ApplicableOccurrence;_this758.HasPropertySets=HasPropertySets;_this758.RepresentationMaps=RepresentationMaps;_this758.Tag=Tag;_this758.ElementType=ElementType;_this758.PredefinedType=PredefinedType;_this758.type=663422040;return _this758;}return _createClass(IfcElectricApplianceType);}(IfcFlowTerminalType);IFC2X32.IfcElectricApplianceType=IfcElectricApplianceType;var IfcElectricFlowStorageDeviceType=/*#__PURE__*/function(_IfcFlowStorageDevice2){_inherits(IfcElectricFlowStorageDeviceType,_IfcFlowStorageDevice2);var _super762=_createSuper(IfcElectricFlowStorageDeviceType);function IfcElectricFlowStorageDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this759;_classCallCheck(this,IfcElectricFlowStorageDeviceType);_this759=_super762.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this759.GlobalId=GlobalId;_this759.OwnerHistory=OwnerHistory;_this759.Name=Name;_this759.Description=Description;_this759.ApplicableOccurrence=ApplicableOccurrence;_this759.HasPropertySets=HasPropertySets;_this759.RepresentationMaps=RepresentationMaps;_this759.Tag=Tag;_this759.ElementType=ElementType;_this759.PredefinedType=PredefinedType;_this759.type=3277789161;return _this759;}return _createClass(IfcElectricFlowStorageDeviceType);}(IfcFlowStorageDeviceType);IFC2X32.IfcElectricFlowStorageDeviceType=IfcElectricFlowStorageDeviceType;var IfcElectricGeneratorType=/*#__PURE__*/function(_IfcEnergyConversionD17){_inherits(IfcElectricGeneratorType,_IfcEnergyConversionD17);var _super763=_createSuper(IfcElectricGeneratorType);function IfcElectricGeneratorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this760;_classCallCheck(this,IfcElectricGeneratorType);_this760=_super763.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this760.GlobalId=GlobalId;_this760.OwnerHistory=OwnerHistory;_this760.Name=Name;_this760.Description=Description;_this760.ApplicableOccurrence=ApplicableOccurrence;_this760.HasPropertySets=HasPropertySets;_this760.RepresentationMaps=RepresentationMaps;_this760.Tag=Tag;_this760.ElementType=ElementType;_this760.PredefinedType=PredefinedType;_this760.type=1534661035;return _this760;}return _createClass(IfcElectricGeneratorType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcElectricGeneratorType=IfcElectricGeneratorType;var IfcElectricHeaterType=/*#__PURE__*/function(_IfcFlowTerminalType10){_inherits(IfcElectricHeaterType,_IfcFlowTerminalType10);var _super764=_createSuper(IfcElectricHeaterType);function IfcElectricHeaterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this761;_classCallCheck(this,IfcElectricHeaterType);_this761=_super764.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this761.GlobalId=GlobalId;_this761.OwnerHistory=OwnerHistory;_this761.Name=Name;_this761.Description=Description;_this761.ApplicableOccurrence=ApplicableOccurrence;_this761.HasPropertySets=HasPropertySets;_this761.RepresentationMaps=RepresentationMaps;_this761.Tag=Tag;_this761.ElementType=ElementType;_this761.PredefinedType=PredefinedType;_this761.type=1365060375;return _this761;}return _createClass(IfcElectricHeaterType);}(IfcFlowTerminalType);IFC2X32.IfcElectricHeaterType=IfcElectricHeaterType;var IfcElectricMotorType=/*#__PURE__*/function(_IfcEnergyConversionD18){_inherits(IfcElectricMotorType,_IfcEnergyConversionD18);var _super765=_createSuper(IfcElectricMotorType);function IfcElectricMotorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this762;_classCallCheck(this,IfcElectricMotorType);_this762=_super765.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this762.GlobalId=GlobalId;_this762.OwnerHistory=OwnerHistory;_this762.Name=Name;_this762.Description=Description;_this762.ApplicableOccurrence=ApplicableOccurrence;_this762.HasPropertySets=HasPropertySets;_this762.RepresentationMaps=RepresentationMaps;_this762.Tag=Tag;_this762.ElementType=ElementType;_this762.PredefinedType=PredefinedType;_this762.type=1217240411;return _this762;}return _createClass(IfcElectricMotorType);}(IfcEnergyConversionDeviceType);IFC2X32.IfcElectricMotorType=IfcElectricMotorType;var IfcElectricTimeControlType=/*#__PURE__*/function(_IfcFlowControllerTyp7){_inherits(IfcElectricTimeControlType,_IfcFlowControllerTyp7);var _super766=_createSuper(IfcElectricTimeControlType);function IfcElectricTimeControlType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this763;_classCallCheck(this,IfcElectricTimeControlType);_this763=_super766.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this763.GlobalId=GlobalId;_this763.OwnerHistory=OwnerHistory;_this763.Name=Name;_this763.Description=Description;_this763.ApplicableOccurrence=ApplicableOccurrence;_this763.HasPropertySets=HasPropertySets;_this763.RepresentationMaps=RepresentationMaps;_this763.Tag=Tag;_this763.ElementType=ElementType;_this763.PredefinedType=PredefinedType;_this763.type=712377611;return _this763;}return _createClass(IfcElectricTimeControlType);}(IfcFlowControllerType);IFC2X32.IfcElectricTimeControlType=IfcElectricTimeControlType;var IfcElectricalCircuit=/*#__PURE__*/function(_IfcSystem){_inherits(IfcElectricalCircuit,_IfcSystem);var _super767=_createSuper(IfcElectricalCircuit);function IfcElectricalCircuit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this764;_classCallCheck(this,IfcElectricalCircuit);_this764=_super767.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this764.GlobalId=GlobalId;_this764.OwnerHistory=OwnerHistory;_this764.Name=Name;_this764.Description=Description;_this764.ObjectType=ObjectType;_this764.type=1634875225;return _this764;}return _createClass(IfcElectricalCircuit);}(IfcSystem);IFC2X32.IfcElectricalCircuit=IfcElectricalCircuit;var IfcElectricalElement=/*#__PURE__*/function(_IfcElement10){_inherits(IfcElectricalElement,_IfcElement10);var _super768=_createSuper(IfcElectricalElement);function IfcElectricalElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this765;_classCallCheck(this,IfcElectricalElement);_this765=_super768.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this765.GlobalId=GlobalId;_this765.OwnerHistory=OwnerHistory;_this765.Name=Name;_this765.Description=Description;_this765.ObjectType=ObjectType;_this765.ObjectPlacement=ObjectPlacement;_this765.Representation=Representation;_this765.Tag=Tag;_this765.type=857184966;return _this765;}return _createClass(IfcElectricalElement);}(IfcElement);IFC2X32.IfcElectricalElement=IfcElectricalElement;var IfcEnergyConversionDevice=/*#__PURE__*/function(_IfcDistributionFlowE10){_inherits(IfcEnergyConversionDevice,_IfcDistributionFlowE10);var _super769=_createSuper(IfcEnergyConversionDevice);function IfcEnergyConversionDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this766;_classCallCheck(this,IfcEnergyConversionDevice);_this766=_super769.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this766.GlobalId=GlobalId;_this766.OwnerHistory=OwnerHistory;_this766.Name=Name;_this766.Description=Description;_this766.ObjectType=ObjectType;_this766.ObjectPlacement=ObjectPlacement;_this766.Representation=Representation;_this766.Tag=Tag;_this766.type=1658829314;return _this766;}return _createClass(IfcEnergyConversionDevice);}(IfcDistributionFlowElement);IFC2X32.IfcEnergyConversionDevice=IfcEnergyConversionDevice;var IfcFanType=/*#__PURE__*/function(_IfcFlowMovingDeviceT3){_inherits(IfcFanType,_IfcFlowMovingDeviceT3);var _super770=_createSuper(IfcFanType);function IfcFanType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this767;_classCallCheck(this,IfcFanType);_this767=_super770.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this767.GlobalId=GlobalId;_this767.OwnerHistory=OwnerHistory;_this767.Name=Name;_this767.Description=Description;_this767.ApplicableOccurrence=ApplicableOccurrence;_this767.HasPropertySets=HasPropertySets;_this767.RepresentationMaps=RepresentationMaps;_this767.Tag=Tag;_this767.ElementType=ElementType;_this767.PredefinedType=PredefinedType;_this767.type=346874300;return _this767;}return _createClass(IfcFanType);}(IfcFlowMovingDeviceType);IFC2X32.IfcFanType=IfcFanType;var IfcFilterType=/*#__PURE__*/function(_IfcFlowTreatmentDevi2){_inherits(IfcFilterType,_IfcFlowTreatmentDevi2);var _super771=_createSuper(IfcFilterType);function IfcFilterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this768;_classCallCheck(this,IfcFilterType);_this768=_super771.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this768.GlobalId=GlobalId;_this768.OwnerHistory=OwnerHistory;_this768.Name=Name;_this768.Description=Description;_this768.ApplicableOccurrence=ApplicableOccurrence;_this768.HasPropertySets=HasPropertySets;_this768.RepresentationMaps=RepresentationMaps;_this768.Tag=Tag;_this768.ElementType=ElementType;_this768.PredefinedType=PredefinedType;_this768.type=1810631287;return _this768;}return _createClass(IfcFilterType);}(IfcFlowTreatmentDeviceType);IFC2X32.IfcFilterType=IfcFilterType;var IfcFireSuppressionTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType11){_inherits(IfcFireSuppressionTerminalType,_IfcFlowTerminalType11);var _super772=_createSuper(IfcFireSuppressionTerminalType);function IfcFireSuppressionTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this769;_classCallCheck(this,IfcFireSuppressionTerminalType);_this769=_super772.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this769.GlobalId=GlobalId;_this769.OwnerHistory=OwnerHistory;_this769.Name=Name;_this769.Description=Description;_this769.ApplicableOccurrence=ApplicableOccurrence;_this769.HasPropertySets=HasPropertySets;_this769.RepresentationMaps=RepresentationMaps;_this769.Tag=Tag;_this769.ElementType=ElementType;_this769.PredefinedType=PredefinedType;_this769.type=4222183408;return _this769;}return _createClass(IfcFireSuppressionTerminalType);}(IfcFlowTerminalType);IFC2X32.IfcFireSuppressionTerminalType=IfcFireSuppressionTerminalType;var IfcFlowController=/*#__PURE__*/function(_IfcDistributionFlowE11){_inherits(IfcFlowController,_IfcDistributionFlowE11);var _super773=_createSuper(IfcFlowController);function IfcFlowController(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this770;_classCallCheck(this,IfcFlowController);_this770=_super773.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this770.GlobalId=GlobalId;_this770.OwnerHistory=OwnerHistory;_this770.Name=Name;_this770.Description=Description;_this770.ObjectType=ObjectType;_this770.ObjectPlacement=ObjectPlacement;_this770.Representation=Representation;_this770.Tag=Tag;_this770.type=2058353004;return _this770;}return _createClass(IfcFlowController);}(IfcDistributionFlowElement);IFC2X32.IfcFlowController=IfcFlowController;var IfcFlowFitting=/*#__PURE__*/function(_IfcDistributionFlowE12){_inherits(IfcFlowFitting,_IfcDistributionFlowE12);var _super774=_createSuper(IfcFlowFitting);function IfcFlowFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this771;_classCallCheck(this,IfcFlowFitting);_this771=_super774.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this771.GlobalId=GlobalId;_this771.OwnerHistory=OwnerHistory;_this771.Name=Name;_this771.Description=Description;_this771.ObjectType=ObjectType;_this771.ObjectPlacement=ObjectPlacement;_this771.Representation=Representation;_this771.Tag=Tag;_this771.type=4278956645;return _this771;}return _createClass(IfcFlowFitting);}(IfcDistributionFlowElement);IFC2X32.IfcFlowFitting=IfcFlowFitting;var IfcFlowInstrumentType=/*#__PURE__*/function(_IfcDistributionContr){_inherits(IfcFlowInstrumentType,_IfcDistributionContr);var _super775=_createSuper(IfcFlowInstrumentType);function IfcFlowInstrumentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this772;_classCallCheck(this,IfcFlowInstrumentType);_this772=_super775.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this772.GlobalId=GlobalId;_this772.OwnerHistory=OwnerHistory;_this772.Name=Name;_this772.Description=Description;_this772.ApplicableOccurrence=ApplicableOccurrence;_this772.HasPropertySets=HasPropertySets;_this772.RepresentationMaps=RepresentationMaps;_this772.Tag=Tag;_this772.ElementType=ElementType;_this772.PredefinedType=PredefinedType;_this772.type=4037862832;return _this772;}return _createClass(IfcFlowInstrumentType);}(IfcDistributionControlElementType);IFC2X32.IfcFlowInstrumentType=IfcFlowInstrumentType;var IfcFlowMovingDevice=/*#__PURE__*/function(_IfcDistributionFlowE13){_inherits(IfcFlowMovingDevice,_IfcDistributionFlowE13);var _super776=_createSuper(IfcFlowMovingDevice);function IfcFlowMovingDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this773;_classCallCheck(this,IfcFlowMovingDevice);_this773=_super776.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this773.GlobalId=GlobalId;_this773.OwnerHistory=OwnerHistory;_this773.Name=Name;_this773.Description=Description;_this773.ObjectType=ObjectType;_this773.ObjectPlacement=ObjectPlacement;_this773.Representation=Representation;_this773.Tag=Tag;_this773.type=3132237377;return _this773;}return _createClass(IfcFlowMovingDevice);}(IfcDistributionFlowElement);IFC2X32.IfcFlowMovingDevice=IfcFlowMovingDevice;var IfcFlowSegment=/*#__PURE__*/function(_IfcDistributionFlowE14){_inherits(IfcFlowSegment,_IfcDistributionFlowE14);var _super777=_createSuper(IfcFlowSegment);function IfcFlowSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this774;_classCallCheck(this,IfcFlowSegment);_this774=_super777.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this774.GlobalId=GlobalId;_this774.OwnerHistory=OwnerHistory;_this774.Name=Name;_this774.Description=Description;_this774.ObjectType=ObjectType;_this774.ObjectPlacement=ObjectPlacement;_this774.Representation=Representation;_this774.Tag=Tag;_this774.type=987401354;return _this774;}return _createClass(IfcFlowSegment);}(IfcDistributionFlowElement);IFC2X32.IfcFlowSegment=IfcFlowSegment;var IfcFlowStorageDevice=/*#__PURE__*/function(_IfcDistributionFlowE15){_inherits(IfcFlowStorageDevice,_IfcDistributionFlowE15);var _super778=_createSuper(IfcFlowStorageDevice);function IfcFlowStorageDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this775;_classCallCheck(this,IfcFlowStorageDevice);_this775=_super778.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this775.GlobalId=GlobalId;_this775.OwnerHistory=OwnerHistory;_this775.Name=Name;_this775.Description=Description;_this775.ObjectType=ObjectType;_this775.ObjectPlacement=ObjectPlacement;_this775.Representation=Representation;_this775.Tag=Tag;_this775.type=707683696;return _this775;}return _createClass(IfcFlowStorageDevice);}(IfcDistributionFlowElement);IFC2X32.IfcFlowStorageDevice=IfcFlowStorageDevice;var IfcFlowTerminal=/*#__PURE__*/function(_IfcDistributionFlowE16){_inherits(IfcFlowTerminal,_IfcDistributionFlowE16);var _super779=_createSuper(IfcFlowTerminal);function IfcFlowTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this776;_classCallCheck(this,IfcFlowTerminal);_this776=_super779.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this776.GlobalId=GlobalId;_this776.OwnerHistory=OwnerHistory;_this776.Name=Name;_this776.Description=Description;_this776.ObjectType=ObjectType;_this776.ObjectPlacement=ObjectPlacement;_this776.Representation=Representation;_this776.Tag=Tag;_this776.type=2223149337;return _this776;}return _createClass(IfcFlowTerminal);}(IfcDistributionFlowElement);IFC2X32.IfcFlowTerminal=IfcFlowTerminal;var IfcFlowTreatmentDevice=/*#__PURE__*/function(_IfcDistributionFlowE17){_inherits(IfcFlowTreatmentDevice,_IfcDistributionFlowE17);var _super780=_createSuper(IfcFlowTreatmentDevice);function IfcFlowTreatmentDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this777;_classCallCheck(this,IfcFlowTreatmentDevice);_this777=_super780.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this777.GlobalId=GlobalId;_this777.OwnerHistory=OwnerHistory;_this777.Name=Name;_this777.Description=Description;_this777.ObjectType=ObjectType;_this777.ObjectPlacement=ObjectPlacement;_this777.Representation=Representation;_this777.Tag=Tag;_this777.type=3508470533;return _this777;}return _createClass(IfcFlowTreatmentDevice);}(IfcDistributionFlowElement);IFC2X32.IfcFlowTreatmentDevice=IfcFlowTreatmentDevice;var IfcFooting=/*#__PURE__*/function(_IfcBuildingElement7){_inherits(IfcFooting,_IfcBuildingElement7);var _super781=_createSuper(IfcFooting);function IfcFooting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this778;_classCallCheck(this,IfcFooting);_this778=_super781.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this778.GlobalId=GlobalId;_this778.OwnerHistory=OwnerHistory;_this778.Name=Name;_this778.Description=Description;_this778.ObjectType=ObjectType;_this778.ObjectPlacement=ObjectPlacement;_this778.Representation=Representation;_this778.Tag=Tag;_this778.PredefinedType=PredefinedType;_this778.type=900683007;return _this778;}return _createClass(IfcFooting);}(IfcBuildingElement);IFC2X32.IfcFooting=IfcFooting;var IfcMember=/*#__PURE__*/function(_IfcBuildingElement8){_inherits(IfcMember,_IfcBuildingElement8);var _super782=_createSuper(IfcMember);function IfcMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this779;_classCallCheck(this,IfcMember);_this779=_super782.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this779.GlobalId=GlobalId;_this779.OwnerHistory=OwnerHistory;_this779.Name=Name;_this779.Description=Description;_this779.ObjectType=ObjectType;_this779.ObjectPlacement=ObjectPlacement;_this779.Representation=Representation;_this779.Tag=Tag;_this779.type=1073191201;return _this779;}return _createClass(IfcMember);}(IfcBuildingElement);IFC2X32.IfcMember=IfcMember;var IfcPile=/*#__PURE__*/function(_IfcBuildingElement9){_inherits(IfcPile,_IfcBuildingElement9);var _super783=_createSuper(IfcPile);function IfcPile(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType,ConstructionType){var _this780;_classCallCheck(this,IfcPile);_this780=_super783.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this780.GlobalId=GlobalId;_this780.OwnerHistory=OwnerHistory;_this780.Name=Name;_this780.Description=Description;_this780.ObjectType=ObjectType;_this780.ObjectPlacement=ObjectPlacement;_this780.Representation=Representation;_this780.Tag=Tag;_this780.PredefinedType=PredefinedType;_this780.ConstructionType=ConstructionType;_this780.type=1687234759;return _this780;}return _createClass(IfcPile);}(IfcBuildingElement);IFC2X32.IfcPile=IfcPile;var IfcPlate=/*#__PURE__*/function(_IfcBuildingElement10){_inherits(IfcPlate,_IfcBuildingElement10);var _super784=_createSuper(IfcPlate);function IfcPlate(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this781;_classCallCheck(this,IfcPlate);_this781=_super784.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this781.GlobalId=GlobalId;_this781.OwnerHistory=OwnerHistory;_this781.Name=Name;_this781.Description=Description;_this781.ObjectType=ObjectType;_this781.ObjectPlacement=ObjectPlacement;_this781.Representation=Representation;_this781.Tag=Tag;_this781.type=3171933400;return _this781;}return _createClass(IfcPlate);}(IfcBuildingElement);IFC2X32.IfcPlate=IfcPlate;var IfcRailing=/*#__PURE__*/function(_IfcBuildingElement11){_inherits(IfcRailing,_IfcBuildingElement11);var _super785=_createSuper(IfcRailing);function IfcRailing(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this782;_classCallCheck(this,IfcRailing);_this782=_super785.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this782.GlobalId=GlobalId;_this782.OwnerHistory=OwnerHistory;_this782.Name=Name;_this782.Description=Description;_this782.ObjectType=ObjectType;_this782.ObjectPlacement=ObjectPlacement;_this782.Representation=Representation;_this782.Tag=Tag;_this782.PredefinedType=PredefinedType;_this782.type=2262370178;return _this782;}return _createClass(IfcRailing);}(IfcBuildingElement);IFC2X32.IfcRailing=IfcRailing;var IfcRamp=/*#__PURE__*/function(_IfcBuildingElement12){_inherits(IfcRamp,_IfcBuildingElement12);var _super786=_createSuper(IfcRamp);function IfcRamp(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,ShapeType){var _this783;_classCallCheck(this,IfcRamp);_this783=_super786.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this783.GlobalId=GlobalId;_this783.OwnerHistory=OwnerHistory;_this783.Name=Name;_this783.Description=Description;_this783.ObjectType=ObjectType;_this783.ObjectPlacement=ObjectPlacement;_this783.Representation=Representation;_this783.Tag=Tag;_this783.ShapeType=ShapeType;_this783.type=3024970846;return _this783;}return _createClass(IfcRamp);}(IfcBuildingElement);IFC2X32.IfcRamp=IfcRamp;var IfcRampFlight=/*#__PURE__*/function(_IfcBuildingElement13){_inherits(IfcRampFlight,_IfcBuildingElement13);var _super787=_createSuper(IfcRampFlight);function IfcRampFlight(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this784;_classCallCheck(this,IfcRampFlight);_this784=_super787.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this784.GlobalId=GlobalId;_this784.OwnerHistory=OwnerHistory;_this784.Name=Name;_this784.Description=Description;_this784.ObjectType=ObjectType;_this784.ObjectPlacement=ObjectPlacement;_this784.Representation=Representation;_this784.Tag=Tag;_this784.type=3283111854;return _this784;}return _createClass(IfcRampFlight);}(IfcBuildingElement);IFC2X32.IfcRampFlight=IfcRampFlight;var IfcRationalBezierCurve=/*#__PURE__*/function(_IfcBezierCurve){_inherits(IfcRationalBezierCurve,_IfcBezierCurve);var _super788=_createSuper(IfcRationalBezierCurve);function IfcRationalBezierCurve(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect,WeightsData){var _this785;_classCallCheck(this,IfcRationalBezierCurve);_this785=_super788.call(this,expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect);_this785.Degree=Degree;_this785.ControlPointsList=ControlPointsList;_this785.CurveForm=CurveForm;_this785.ClosedCurve=ClosedCurve;_this785.SelfIntersect=SelfIntersect;_this785.WeightsData=WeightsData;_this785.type=3055160366;return _this785;}return _createClass(IfcRationalBezierCurve);}(IfcBezierCurve);IFC2X32.IfcRationalBezierCurve=IfcRationalBezierCurve;var IfcReinforcingElement=/*#__PURE__*/function(_IfcBuildingElementCo2){_inherits(IfcReinforcingElement,_IfcBuildingElementCo2);var _super789=_createSuper(IfcReinforcingElement);function IfcReinforcingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade){var _this786;_classCallCheck(this,IfcReinforcingElement);_this786=_super789.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this786.GlobalId=GlobalId;_this786.OwnerHistory=OwnerHistory;_this786.Name=Name;_this786.Description=Description;_this786.ObjectType=ObjectType;_this786.ObjectPlacement=ObjectPlacement;_this786.Representation=Representation;_this786.Tag=Tag;_this786.SteelGrade=SteelGrade;_this786.type=3027567501;return _this786;}return _createClass(IfcReinforcingElement);}(IfcBuildingElementComponent);IFC2X32.IfcReinforcingElement=IfcReinforcingElement;var IfcReinforcingMesh=/*#__PURE__*/function(_IfcReinforcingElemen){_inherits(IfcReinforcingMesh,_IfcReinforcingElemen);var _super790=_createSuper(IfcReinforcingMesh);function IfcReinforcingMesh(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,MeshLength,MeshWidth,LongitudinalBarNominalDiameter,TransverseBarNominalDiameter,LongitudinalBarCrossSectionArea,TransverseBarCrossSectionArea,LongitudinalBarSpacing,TransverseBarSpacing){var _this787;_classCallCheck(this,IfcReinforcingMesh);_this787=_super790.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this787.GlobalId=GlobalId;_this787.OwnerHistory=OwnerHistory;_this787.Name=Name;_this787.Description=Description;_this787.ObjectType=ObjectType;_this787.ObjectPlacement=ObjectPlacement;_this787.Representation=Representation;_this787.Tag=Tag;_this787.SteelGrade=SteelGrade;_this787.MeshLength=MeshLength;_this787.MeshWidth=MeshWidth;_this787.LongitudinalBarNominalDiameter=LongitudinalBarNominalDiameter;_this787.TransverseBarNominalDiameter=TransverseBarNominalDiameter;_this787.LongitudinalBarCrossSectionArea=LongitudinalBarCrossSectionArea;_this787.TransverseBarCrossSectionArea=TransverseBarCrossSectionArea;_this787.LongitudinalBarSpacing=LongitudinalBarSpacing;_this787.TransverseBarSpacing=TransverseBarSpacing;_this787.type=2320036040;return _this787;}return _createClass(IfcReinforcingMesh);}(IfcReinforcingElement);IFC2X32.IfcReinforcingMesh=IfcReinforcingMesh;var IfcRoof=/*#__PURE__*/function(_IfcBuildingElement14){_inherits(IfcRoof,_IfcBuildingElement14);var _super791=_createSuper(IfcRoof);function IfcRoof(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,ShapeType){var _this788;_classCallCheck(this,IfcRoof);_this788=_super791.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this788.GlobalId=GlobalId;_this788.OwnerHistory=OwnerHistory;_this788.Name=Name;_this788.Description=Description;_this788.ObjectType=ObjectType;_this788.ObjectPlacement=ObjectPlacement;_this788.Representation=Representation;_this788.Tag=Tag;_this788.ShapeType=ShapeType;_this788.type=2016517767;return _this788;}return _createClass(IfcRoof);}(IfcBuildingElement);IFC2X32.IfcRoof=IfcRoof;var IfcRoundedEdgeFeature=/*#__PURE__*/function(_IfcEdgeFeature){_inherits(IfcRoundedEdgeFeature,_IfcEdgeFeature);var _super792=_createSuper(IfcRoundedEdgeFeature);function IfcRoundedEdgeFeature(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,FeatureLength,Radius){var _this789;_classCallCheck(this,IfcRoundedEdgeFeature);_this789=_super792.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,FeatureLength);_this789.GlobalId=GlobalId;_this789.OwnerHistory=OwnerHistory;_this789.Name=Name;_this789.Description=Description;_this789.ObjectType=ObjectType;_this789.ObjectPlacement=ObjectPlacement;_this789.Representation=Representation;_this789.Tag=Tag;_this789.FeatureLength=FeatureLength;_this789.Radius=Radius;_this789.type=1376911519;return _this789;}return _createClass(IfcRoundedEdgeFeature);}(IfcEdgeFeature);IFC2X32.IfcRoundedEdgeFeature=IfcRoundedEdgeFeature;var IfcSensorType=/*#__PURE__*/function(_IfcDistributionContr2){_inherits(IfcSensorType,_IfcDistributionContr2);var _super793=_createSuper(IfcSensorType);function IfcSensorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this790;_classCallCheck(this,IfcSensorType);_this790=_super793.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this790.GlobalId=GlobalId;_this790.OwnerHistory=OwnerHistory;_this790.Name=Name;_this790.Description=Description;_this790.ApplicableOccurrence=ApplicableOccurrence;_this790.HasPropertySets=HasPropertySets;_this790.RepresentationMaps=RepresentationMaps;_this790.Tag=Tag;_this790.ElementType=ElementType;_this790.PredefinedType=PredefinedType;_this790.type=1783015770;return _this790;}return _createClass(IfcSensorType);}(IfcDistributionControlElementType);IFC2X32.IfcSensorType=IfcSensorType;var IfcSlab=/*#__PURE__*/function(_IfcBuildingElement15){_inherits(IfcSlab,_IfcBuildingElement15);var _super794=_createSuper(IfcSlab);function IfcSlab(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this791;_classCallCheck(this,IfcSlab);_this791=_super794.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this791.GlobalId=GlobalId;_this791.OwnerHistory=OwnerHistory;_this791.Name=Name;_this791.Description=Description;_this791.ObjectType=ObjectType;_this791.ObjectPlacement=ObjectPlacement;_this791.Representation=Representation;_this791.Tag=Tag;_this791.PredefinedType=PredefinedType;_this791.type=1529196076;return _this791;}return _createClass(IfcSlab);}(IfcBuildingElement);IFC2X32.IfcSlab=IfcSlab;var IfcStair=/*#__PURE__*/function(_IfcBuildingElement16){_inherits(IfcStair,_IfcBuildingElement16);var _super795=_createSuper(IfcStair);function IfcStair(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,ShapeType){var _this792;_classCallCheck(this,IfcStair);_this792=_super795.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this792.GlobalId=GlobalId;_this792.OwnerHistory=OwnerHistory;_this792.Name=Name;_this792.Description=Description;_this792.ObjectType=ObjectType;_this792.ObjectPlacement=ObjectPlacement;_this792.Representation=Representation;_this792.Tag=Tag;_this792.ShapeType=ShapeType;_this792.type=331165859;return _this792;}return _createClass(IfcStair);}(IfcBuildingElement);IFC2X32.IfcStair=IfcStair;var IfcStairFlight=/*#__PURE__*/function(_IfcBuildingElement17){_inherits(IfcStairFlight,_IfcBuildingElement17);var _super796=_createSuper(IfcStairFlight);function IfcStairFlight(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,NumberOfRiser,NumberOfTreads,RiserHeight,TreadLength){var _this793;_classCallCheck(this,IfcStairFlight);_this793=_super796.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this793.GlobalId=GlobalId;_this793.OwnerHistory=OwnerHistory;_this793.Name=Name;_this793.Description=Description;_this793.ObjectType=ObjectType;_this793.ObjectPlacement=ObjectPlacement;_this793.Representation=Representation;_this793.Tag=Tag;_this793.NumberOfRiser=NumberOfRiser;_this793.NumberOfTreads=NumberOfTreads;_this793.RiserHeight=RiserHeight;_this793.TreadLength=TreadLength;_this793.type=4252922144;return _this793;}return _createClass(IfcStairFlight);}(IfcBuildingElement);IFC2X32.IfcStairFlight=IfcStairFlight;var IfcStructuralAnalysisModel=/*#__PURE__*/function(_IfcSystem2){_inherits(IfcStructuralAnalysisModel,_IfcSystem2);var _super797=_createSuper(IfcStructuralAnalysisModel);function IfcStructuralAnalysisModel(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,OrientationOf2DPlane,LoadedBy,HasResults){var _this794;_classCallCheck(this,IfcStructuralAnalysisModel);_this794=_super797.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this794.GlobalId=GlobalId;_this794.OwnerHistory=OwnerHistory;_this794.Name=Name;_this794.Description=Description;_this794.ObjectType=ObjectType;_this794.PredefinedType=PredefinedType;_this794.OrientationOf2DPlane=OrientationOf2DPlane;_this794.LoadedBy=LoadedBy;_this794.HasResults=HasResults;_this794.type=2515109513;return _this794;}return _createClass(IfcStructuralAnalysisModel);}(IfcSystem);IFC2X32.IfcStructuralAnalysisModel=IfcStructuralAnalysisModel;var IfcTendon=/*#__PURE__*/function(_IfcReinforcingElemen2){_inherits(IfcTendon,_IfcReinforcingElemen2);var _super798=_createSuper(IfcTendon);function IfcTendon(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,PredefinedType,NominalDiameter,CrossSectionArea,TensionForce,PreStress,FrictionCoefficient,AnchorageSlip,MinCurvatureRadius){var _this795;_classCallCheck(this,IfcTendon);_this795=_super798.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this795.GlobalId=GlobalId;_this795.OwnerHistory=OwnerHistory;_this795.Name=Name;_this795.Description=Description;_this795.ObjectType=ObjectType;_this795.ObjectPlacement=ObjectPlacement;_this795.Representation=Representation;_this795.Tag=Tag;_this795.SteelGrade=SteelGrade;_this795.PredefinedType=PredefinedType;_this795.NominalDiameter=NominalDiameter;_this795.CrossSectionArea=CrossSectionArea;_this795.TensionForce=TensionForce;_this795.PreStress=PreStress;_this795.FrictionCoefficient=FrictionCoefficient;_this795.AnchorageSlip=AnchorageSlip;_this795.MinCurvatureRadius=MinCurvatureRadius;_this795.type=3824725483;return _this795;}return _createClass(IfcTendon);}(IfcReinforcingElement);IFC2X32.IfcTendon=IfcTendon;var IfcTendonAnchor=/*#__PURE__*/function(_IfcReinforcingElemen3){_inherits(IfcTendonAnchor,_IfcReinforcingElemen3);var _super799=_createSuper(IfcTendonAnchor);function IfcTendonAnchor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade){var _this796;_classCallCheck(this,IfcTendonAnchor);_this796=_super799.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this796.GlobalId=GlobalId;_this796.OwnerHistory=OwnerHistory;_this796.Name=Name;_this796.Description=Description;_this796.ObjectType=ObjectType;_this796.ObjectPlacement=ObjectPlacement;_this796.Representation=Representation;_this796.Tag=Tag;_this796.SteelGrade=SteelGrade;_this796.type=2347447852;return _this796;}return _createClass(IfcTendonAnchor);}(IfcReinforcingElement);IFC2X32.IfcTendonAnchor=IfcTendonAnchor;var IfcVibrationIsolatorType=/*#__PURE__*/function(_IfcDiscreteAccessory){_inherits(IfcVibrationIsolatorType,_IfcDiscreteAccessory);var _super800=_createSuper(IfcVibrationIsolatorType);function IfcVibrationIsolatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this797;_classCallCheck(this,IfcVibrationIsolatorType);_this797=_super800.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this797.GlobalId=GlobalId;_this797.OwnerHistory=OwnerHistory;_this797.Name=Name;_this797.Description=Description;_this797.ApplicableOccurrence=ApplicableOccurrence;_this797.HasPropertySets=HasPropertySets;_this797.RepresentationMaps=RepresentationMaps;_this797.Tag=Tag;_this797.ElementType=ElementType;_this797.PredefinedType=PredefinedType;_this797.type=3313531582;return _this797;}return _createClass(IfcVibrationIsolatorType);}(IfcDiscreteAccessoryType);IFC2X32.IfcVibrationIsolatorType=IfcVibrationIsolatorType;var IfcWall=/*#__PURE__*/function(_IfcBuildingElement18){_inherits(IfcWall,_IfcBuildingElement18);var _super801=_createSuper(IfcWall);function IfcWall(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this798;_classCallCheck(this,IfcWall);_this798=_super801.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this798.GlobalId=GlobalId;_this798.OwnerHistory=OwnerHistory;_this798.Name=Name;_this798.Description=Description;_this798.ObjectType=ObjectType;_this798.ObjectPlacement=ObjectPlacement;_this798.Representation=Representation;_this798.Tag=Tag;_this798.type=2391406946;return _this798;}return _createClass(IfcWall);}(IfcBuildingElement);IFC2X32.IfcWall=IfcWall;var IfcWallStandardCase=/*#__PURE__*/function(_IfcWall){_inherits(IfcWallStandardCase,_IfcWall);var _super802=_createSuper(IfcWallStandardCase);function IfcWallStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this799;_classCallCheck(this,IfcWallStandardCase);_this799=_super802.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this799.GlobalId=GlobalId;_this799.OwnerHistory=OwnerHistory;_this799.Name=Name;_this799.Description=Description;_this799.ObjectType=ObjectType;_this799.ObjectPlacement=ObjectPlacement;_this799.Representation=Representation;_this799.Tag=Tag;_this799.type=3512223829;return _this799;}return _createClass(IfcWallStandardCase);}(IfcWall);IFC2X32.IfcWallStandardCase=IfcWallStandardCase;var IfcWindow=/*#__PURE__*/function(_IfcBuildingElement19){_inherits(IfcWindow,_IfcBuildingElement19);var _super803=_createSuper(IfcWindow);function IfcWindow(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth){var _this800;_classCallCheck(this,IfcWindow);_this800=_super803.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this800.GlobalId=GlobalId;_this800.OwnerHistory=OwnerHistory;_this800.Name=Name;_this800.Description=Description;_this800.ObjectType=ObjectType;_this800.ObjectPlacement=ObjectPlacement;_this800.Representation=Representation;_this800.Tag=Tag;_this800.OverallHeight=OverallHeight;_this800.OverallWidth=OverallWidth;_this800.type=3304561284;return _this800;}return _createClass(IfcWindow);}(IfcBuildingElement);IFC2X32.IfcWindow=IfcWindow;var IfcActuatorType=/*#__PURE__*/function(_IfcDistributionContr3){_inherits(IfcActuatorType,_IfcDistributionContr3);var _super804=_createSuper(IfcActuatorType);function IfcActuatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this801;_classCallCheck(this,IfcActuatorType);_this801=_super804.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this801.GlobalId=GlobalId;_this801.OwnerHistory=OwnerHistory;_this801.Name=Name;_this801.Description=Description;_this801.ApplicableOccurrence=ApplicableOccurrence;_this801.HasPropertySets=HasPropertySets;_this801.RepresentationMaps=RepresentationMaps;_this801.Tag=Tag;_this801.ElementType=ElementType;_this801.PredefinedType=PredefinedType;_this801.type=2874132201;return _this801;}return _createClass(IfcActuatorType);}(IfcDistributionControlElementType);IFC2X32.IfcActuatorType=IfcActuatorType;var IfcAlarmType=/*#__PURE__*/function(_IfcDistributionContr4){_inherits(IfcAlarmType,_IfcDistributionContr4);var _super805=_createSuper(IfcAlarmType);function IfcAlarmType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this802;_classCallCheck(this,IfcAlarmType);_this802=_super805.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this802.GlobalId=GlobalId;_this802.OwnerHistory=OwnerHistory;_this802.Name=Name;_this802.Description=Description;_this802.ApplicableOccurrence=ApplicableOccurrence;_this802.HasPropertySets=HasPropertySets;_this802.RepresentationMaps=RepresentationMaps;_this802.Tag=Tag;_this802.ElementType=ElementType;_this802.PredefinedType=PredefinedType;_this802.type=3001207471;return _this802;}return _createClass(IfcAlarmType);}(IfcDistributionControlElementType);IFC2X32.IfcAlarmType=IfcAlarmType;var IfcBeam=/*#__PURE__*/function(_IfcBuildingElement20){_inherits(IfcBeam,_IfcBuildingElement20);var _super806=_createSuper(IfcBeam);function IfcBeam(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this803;_classCallCheck(this,IfcBeam);_this803=_super806.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this803.GlobalId=GlobalId;_this803.OwnerHistory=OwnerHistory;_this803.Name=Name;_this803.Description=Description;_this803.ObjectType=ObjectType;_this803.ObjectPlacement=ObjectPlacement;_this803.Representation=Representation;_this803.Tag=Tag;_this803.type=753842376;return _this803;}return _createClass(IfcBeam);}(IfcBuildingElement);IFC2X32.IfcBeam=IfcBeam;var IfcChamferEdgeFeature=/*#__PURE__*/function(_IfcEdgeFeature2){_inherits(IfcChamferEdgeFeature,_IfcEdgeFeature2);var _super807=_createSuper(IfcChamferEdgeFeature);function IfcChamferEdgeFeature(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,FeatureLength,Width,Height){var _this804;_classCallCheck(this,IfcChamferEdgeFeature);_this804=_super807.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,FeatureLength);_this804.GlobalId=GlobalId;_this804.OwnerHistory=OwnerHistory;_this804.Name=Name;_this804.Description=Description;_this804.ObjectType=ObjectType;_this804.ObjectPlacement=ObjectPlacement;_this804.Representation=Representation;_this804.Tag=Tag;_this804.FeatureLength=FeatureLength;_this804.Width=Width;_this804.Height=Height;_this804.type=2454782716;return _this804;}return _createClass(IfcChamferEdgeFeature);}(IfcEdgeFeature);IFC2X32.IfcChamferEdgeFeature=IfcChamferEdgeFeature;var IfcControllerType=/*#__PURE__*/function(_IfcDistributionContr5){_inherits(IfcControllerType,_IfcDistributionContr5);var _super808=_createSuper(IfcControllerType);function IfcControllerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this805;_classCallCheck(this,IfcControllerType);_this805=_super808.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this805.GlobalId=GlobalId;_this805.OwnerHistory=OwnerHistory;_this805.Name=Name;_this805.Description=Description;_this805.ApplicableOccurrence=ApplicableOccurrence;_this805.HasPropertySets=HasPropertySets;_this805.RepresentationMaps=RepresentationMaps;_this805.Tag=Tag;_this805.ElementType=ElementType;_this805.PredefinedType=PredefinedType;_this805.type=578613899;return _this805;}return _createClass(IfcControllerType);}(IfcDistributionControlElementType);IFC2X32.IfcControllerType=IfcControllerType;var IfcDistributionChamberElement=/*#__PURE__*/function(_IfcDistributionFlowE18){_inherits(IfcDistributionChamberElement,_IfcDistributionFlowE18);var _super809=_createSuper(IfcDistributionChamberElement);function IfcDistributionChamberElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this806;_classCallCheck(this,IfcDistributionChamberElement);_this806=_super809.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this806.GlobalId=GlobalId;_this806.OwnerHistory=OwnerHistory;_this806.Name=Name;_this806.Description=Description;_this806.ObjectType=ObjectType;_this806.ObjectPlacement=ObjectPlacement;_this806.Representation=Representation;_this806.Tag=Tag;_this806.type=1052013943;return _this806;}return _createClass(IfcDistributionChamberElement);}(IfcDistributionFlowElement);IFC2X32.IfcDistributionChamberElement=IfcDistributionChamberElement;var IfcDistributionControlElement=/*#__PURE__*/function(_IfcDistributionEleme4){_inherits(IfcDistributionControlElement,_IfcDistributionEleme4);var _super810=_createSuper(IfcDistributionControlElement);function IfcDistributionControlElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,ControlElementId){var _this807;_classCallCheck(this,IfcDistributionControlElement);_this807=_super810.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this807.GlobalId=GlobalId;_this807.OwnerHistory=OwnerHistory;_this807.Name=Name;_this807.Description=Description;_this807.ObjectType=ObjectType;_this807.ObjectPlacement=ObjectPlacement;_this807.Representation=Representation;_this807.Tag=Tag;_this807.ControlElementId=ControlElementId;_this807.type=1062813311;return _this807;}return _createClass(IfcDistributionControlElement);}(IfcDistributionElement);IFC2X32.IfcDistributionControlElement=IfcDistributionControlElement;var IfcElectricDistributionPoint=/*#__PURE__*/function(_IfcFlowController){_inherits(IfcElectricDistributionPoint,_IfcFlowController);var _super811=_createSuper(IfcElectricDistributionPoint);function IfcElectricDistributionPoint(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,DistributionPointFunction,UserDefinedFunction){var _this808;_classCallCheck(this,IfcElectricDistributionPoint);_this808=_super811.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this808.GlobalId=GlobalId;_this808.OwnerHistory=OwnerHistory;_this808.Name=Name;_this808.Description=Description;_this808.ObjectType=ObjectType;_this808.ObjectPlacement=ObjectPlacement;_this808.Representation=Representation;_this808.Tag=Tag;_this808.DistributionPointFunction=DistributionPointFunction;_this808.UserDefinedFunction=UserDefinedFunction;_this808.type=3700593921;return _this808;}return _createClass(IfcElectricDistributionPoint);}(IfcFlowController);IFC2X32.IfcElectricDistributionPoint=IfcElectricDistributionPoint;var IfcReinforcingBar=/*#__PURE__*/function(_IfcReinforcingElemen4){_inherits(IfcReinforcingBar,_IfcReinforcingElemen4);var _super812=_createSuper(IfcReinforcingBar);function IfcReinforcingBar(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,NominalDiameter,CrossSectionArea,BarLength,BarRole,BarSurface){var _this809;_classCallCheck(this,IfcReinforcingBar);_this809=_super812.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this809.GlobalId=GlobalId;_this809.OwnerHistory=OwnerHistory;_this809.Name=Name;_this809.Description=Description;_this809.ObjectType=ObjectType;_this809.ObjectPlacement=ObjectPlacement;_this809.Representation=Representation;_this809.Tag=Tag;_this809.SteelGrade=SteelGrade;_this809.NominalDiameter=NominalDiameter;_this809.CrossSectionArea=CrossSectionArea;_this809.BarLength=BarLength;_this809.BarRole=BarRole;_this809.BarSurface=BarSurface;_this809.type=979691226;return _this809;}return _createClass(IfcReinforcingBar);}(IfcReinforcingElement);IFC2X32.IfcReinforcingBar=IfcReinforcingBar;})(IFC2X3||(IFC2X3={}));SchemaNames[2]="IFC4";FromRawLineData[2]={3630933823:function _(id,v){return new IFC4.IfcActorRole(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value));},618182010:function _(id,v){return new IFC4.IfcAddress(id,v[0],!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value));},639542469:function _(id,v){return new IFC4.IfcApplication(id,new Handle(v[0].value),new IFC4.IfcLabel(v[1].value),new IFC4.IfcLabel(v[2].value),new IFC4.IfcIdentifier(v[3].value));},411424972:function _(id,v){return new IFC4.IfcAppliedValue(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4.IfcDate(v[4].value),!v[5]?null:new IFC4.IfcDate(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],!v[9]?null:v[9].map(function(p){return new Handle(p.value);}));},130549933:function _(id,v){return new IFC4.IfcApproval(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value),!v[3]?null:new IFC4.IfcDateTime(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value));},4037036970:function _(id,v){return new IFC4.IfcBoundaryCondition(id,!v[0]?null:new IFC4.IfcLabel(v[0].value));},1560379544:function _(id,v){return new IFC4.IfcBoundaryEdgeCondition(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(2,v[1]),!v[2]?null:TypeInitialiser(2,v[2]),!v[3]?null:TypeInitialiser(2,v[3]),!v[4]?null:TypeInitialiser(2,v[4]),!v[5]?null:TypeInitialiser(2,v[5]),!v[6]?null:TypeInitialiser(2,v[6]));},3367102660:function _(id,v){return new IFC4.IfcBoundaryFaceCondition(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(2,v[1]),!v[2]?null:TypeInitialiser(2,v[2]),!v[3]?null:TypeInitialiser(2,v[3]));},1387855156:function _(id,v){return new IFC4.IfcBoundaryNodeCondition(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(2,v[1]),!v[2]?null:TypeInitialiser(2,v[2]),!v[3]?null:TypeInitialiser(2,v[3]),!v[4]?null:TypeInitialiser(2,v[4]),!v[5]?null:TypeInitialiser(2,v[5]),!v[6]?null:TypeInitialiser(2,v[6]));},2069777674:function _(id,v){return new IFC4.IfcBoundaryNodeConditionWarping(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(2,v[1]),!v[2]?null:TypeInitialiser(2,v[2]),!v[3]?null:TypeInitialiser(2,v[3]),!v[4]?null:TypeInitialiser(2,v[4]),!v[5]?null:TypeInitialiser(2,v[5]),!v[6]?null:TypeInitialiser(2,v[6]),!v[7]?null:TypeInitialiser(2,v[7]));},2859738748:function _(id,_44){return new IFC4.IfcConnectionGeometry(id);},2614616156:function _(id,v){return new IFC4.IfcConnectionPointGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},2732653382:function _(id,v){return new IFC4.IfcConnectionSurfaceGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},775493141:function _(id,v){return new IFC4.IfcConnectionVolumeGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1959218052:function _(id,v){return new IFC4.IfcConstraint(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2],!v[3]?null:new IFC4.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value));},1785450214:function _(id,v){return new IFC4.IfcCoordinateOperation(id,new Handle(v[0].value),new Handle(v[1].value));},1466758467:function _(id,v){return new IFC4.IfcCoordinateReferenceSystem(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new IFC4.IfcIdentifier(v[2].value),!v[3]?null:new IFC4.IfcIdentifier(v[3].value));},602808272:function _(id,v){return new IFC4.IfcCostValue(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4.IfcDate(v[4].value),!v[5]?null:new IFC4.IfcDate(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],!v[9]?null:v[9].map(function(p){return new Handle(p.value);}));},1765591967:function _(id,v){return new IFC4.IfcDerivedUnit(id,v[0].map(function(p){return new Handle(p.value);}),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value));},1045800335:function _(id,v){return new IFC4.IfcDerivedUnitElement(id,new Handle(v[0].value),v[1].value);},2949456006:function _(id,v){return new IFC4.IfcDimensionalExponents(id,v[0].value,v[1].value,v[2].value,v[3].value,v[4].value,v[5].value,v[6].value);},4294318154:function _(id,_45){return new IFC4.IfcExternalInformation(id);},3200245327:function _(id,v){return new IFC4.IfcExternalReference(id,!v[0]?null:new IFC4.IfcURIReference(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value));},2242383968:function _(id,v){return new IFC4.IfcExternallyDefinedHatchStyle(id,!v[0]?null:new IFC4.IfcURIReference(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value));},1040185647:function _(id,v){return new IFC4.IfcExternallyDefinedSurfaceStyle(id,!v[0]?null:new IFC4.IfcURIReference(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value));},3548104201:function _(id,v){return new IFC4.IfcExternallyDefinedTextFont(id,!v[0]?null:new IFC4.IfcURIReference(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value));},852622518:function _(id,v){return new IFC4.IfcGridAxis(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),new IFC4.IfcBoolean(v[2].value));},3020489413:function _(id,v){return new IFC4.IfcIrregularTimeSeriesValue(id,new IFC4.IfcDateTime(v[0].value),v[1].map(function(p){return TypeInitialiser(2,p);}));},2655187982:function _(id,v){return new IFC4.IfcLibraryInformation(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new IFC4.IfcDateTime(v[3].value),!v[4]?null:new IFC4.IfcURIReference(v[4].value),!v[5]?null:new IFC4.IfcText(v[5].value));},3452421091:function _(id,v){return new IFC4.IfcLibraryReference(id,!v[0]?null:new IFC4.IfcURIReference(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLanguageId(v[4].value),!v[5]?null:new Handle(v[5].value));},4162380809:function _(id,v){return new IFC4.IfcLightDistributionData(id,new IFC4.IfcPlaneAngleMeasure(v[0].value),v[1].map(function(p){return new IFC4.IfcPlaneAngleMeasure(p.value);}),v[2].map(function(p){return new IFC4.IfcLuminousIntensityDistributionMeasure(p.value);}));},1566485204:function _(id,v){return new IFC4.IfcLightIntensityDistribution(id,v[0],v[1].map(function(p){return new Handle(p.value);}));},3057273783:function _(id,v){return new IFC4.IfcMapConversion(id,new Handle(v[0].value),new Handle(v[1].value),new IFC4.IfcLengthMeasure(v[2].value),new IFC4.IfcLengthMeasure(v[3].value),new IFC4.IfcLengthMeasure(v[4].value),!v[5]?null:new IFC4.IfcReal(v[5].value),!v[6]?null:new IFC4.IfcReal(v[6].value),!v[7]?null:new IFC4.IfcReal(v[7].value));},1847130766:function _(id,v){return new IFC4.IfcMaterialClassificationRelationship(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value));},760658860:function _(id,_46){return new IFC4.IfcMaterialDefinition(id);},248100487:function _(id,v){return new IFC4.IfcMaterialLayer(id,!v[0]?null:new Handle(v[0].value),new IFC4.IfcNonNegativeLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcLogical(v[2].value),!v[3]?null:new IFC4.IfcLabel(v[3].value),!v[4]?null:new IFC4.IfcText(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcInteger(v[6].value));},3303938423:function _(id,v){return new IFC4.IfcMaterialLayerSet(id,v[0].map(function(p){return new Handle(p.value);}),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value));},1847252529:function _(id,v){return new IFC4.IfcMaterialLayerWithOffsets(id,!v[0]?null:new Handle(v[0].value),new IFC4.IfcNonNegativeLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcLogical(v[2].value),!v[3]?null:new IFC4.IfcLabel(v[3].value),!v[4]?null:new IFC4.IfcText(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcInteger(v[6].value),v[7],new IFC4.IfcLengthMeasure(v[8].value));},2199411900:function _(id,v){return new IFC4.IfcMaterialList(id,v[0].map(function(p){return new Handle(p.value);}));},2235152071:function _(id,v){return new IFC4.IfcMaterialProfile(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4.IfcInteger(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value));},164193824:function _(id,v){return new IFC4.IfcMaterialProfileSet(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new Handle(v[3].value));},552965576:function _(id,v){return new IFC4.IfcMaterialProfileWithOffsets(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4.IfcInteger(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),new IFC4.IfcLengthMeasure(v[6].value));},1507914824:function _(id,_47){return new IFC4.IfcMaterialUsageDefinition(id);},2597039031:function _(id,v){return new IFC4.IfcMeasureWithUnit(id,TypeInitialiser(2,v[0]),new Handle(v[1].value));},3368373690:function _(id,v){return new IFC4.IfcMetric(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2],!v[3]?null:new IFC4.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),v[7],!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value));},2706619895:function _(id,v){return new IFC4.IfcMonetaryUnit(id,new IFC4.IfcLabel(v[0].value));},1918398963:function _(id,v){return new IFC4.IfcNamedUnit(id,new Handle(v[0].value),v[1]);},3701648758:function _(id,_48){return new IFC4.IfcObjectPlacement(id);},2251480897:function _(id,v){return new IFC4.IfcObjective(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2],!v[3]?null:new IFC4.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),v[8],v[9],!v[10]?null:new IFC4.IfcLabel(v[10].value));},4251960020:function _(id,v){return new IFC4.IfcOrganization(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value),!v[3]?null:v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:v[4].map(function(p){return new Handle(p.value);}));},1207048766:function _(id,v){return new IFC4.IfcOwnerHistory(id,new Handle(v[0].value),new Handle(v[1].value),v[2],v[3],!v[4]?null:new IFC4.IfcTimeStamp(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new IFC4.IfcTimeStamp(v[7].value));},2077209135:function _(id,v){return new IFC4.IfcPerson(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4.IfcLabel(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC4.IfcLabel(p.value);}),!v[5]?null:v[5].map(function(p){return new IFC4.IfcLabel(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},101040310:function _(id,v){return new IFC4.IfcPersonAndOrganization(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2483315170:function _(id,v){return new IFC4.IfcPhysicalQuantity(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value));},2226359599:function _(id,v){return new IFC4.IfcPhysicalSimpleQuantity(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value));},3355820592:function _(id,v){return new IFC4.IfcPostalAddress(id,v[0],!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcLabel(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4.IfcLabel(p.value);}),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:new IFC4.IfcLabel(v[9].value));},677532197:function _(id,_49){return new IFC4.IfcPresentationItem(id);},2022622350:function _(id,v){return new IFC4.IfcPresentationLayerAssignment(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC4.IfcIdentifier(v[3].value));},1304840413:function _(id,v){return new IFC4.IfcPresentationLayerWithStyle(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC4.IfcIdentifier(v[3].value),new IFC4.IfcLogical(v[4].value),new IFC4.IfcLogical(v[5].value),new IFC4.IfcLogical(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},3119450353:function _(id,v){return new IFC4.IfcPresentationStyle(id,!v[0]?null:new IFC4.IfcLabel(v[0].value));},2417041796:function _(id,v){return new IFC4.IfcPresentationStyleAssignment(id,v[0].map(function(p){return new Handle(p.value);}));},2095639259:function _(id,v){return new IFC4.IfcProductRepresentation(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},3958567839:function _(id,v){return new IFC4.IfcProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value));},3843373140:function _(id,v){return new IFC4.IfcProjectedCRS(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new IFC4.IfcIdentifier(v[2].value),!v[3]?null:new IFC4.IfcIdentifier(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new Handle(v[6].value));},986844984:function _(id,_50){return new IFC4.IfcPropertyAbstraction(id);},3710013099:function _(id,v){return new IFC4.IfcPropertyEnumeration(id,new IFC4.IfcLabel(v[0].value),v[1].map(function(p){return TypeInitialiser(2,p);}),!v[2]?null:new Handle(v[2].value));},2044713172:function _(id,v){return new IFC4.IfcQuantityArea(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcAreaMeasure(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},2093928680:function _(id,v){return new IFC4.IfcQuantityCount(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcCountMeasure(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},931644368:function _(id,v){return new IFC4.IfcQuantityLength(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},3252649465:function _(id,v){return new IFC4.IfcQuantityTime(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcTimeMeasure(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},2405470396:function _(id,v){return new IFC4.IfcQuantityVolume(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcVolumeMeasure(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},825690147:function _(id,v){return new IFC4.IfcQuantityWeight(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcMassMeasure(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},3915482550:function _(id,v){return new IFC4.IfcRecurrencePattern(id,v[0],!v[1]?null:v[1].map(function(p){return new IFC4.IfcDayInMonthNumber(p.value);}),!v[2]?null:v[2].map(function(p){return new IFC4.IfcDayInWeekNumber(p.value);}),!v[3]?null:v[3].map(function(p){return new IFC4.IfcMonthInYearNumber(p.value);}),!v[4]?null:new IFC4.IfcInteger(v[4].value),!v[5]?null:new IFC4.IfcInteger(v[5].value),!v[6]?null:new IFC4.IfcInteger(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},2433181523:function _(id,v){return new IFC4.IfcReference(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4.IfcInteger(p.value);}),!v[4]?null:new Handle(v[4].value));},1076942058:function _(id,v){return new IFC4.IfcRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3377609919:function _(id,v){return new IFC4.IfcRepresentationContext(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value));},3008791417:function _(id,_51){return new IFC4.IfcRepresentationItem(id);},1660063152:function _(id,v){return new IFC4.IfcRepresentationMap(id,new Handle(v[0].value),new Handle(v[1].value));},2439245199:function _(id,v){return new IFC4.IfcResourceLevelRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value));},2341007311:function _(id,v){return new IFC4.IfcRoot(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},448429030:function _(id,v){return new IFC4.IfcSIUnit(id,v[0],v[1],v[2]);},1054537805:function _(id,v){return new IFC4.IfcSchedulingTime(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value));},867548509:function _(id,v){return new IFC4.IfcShapeAspect(id,v[0].map(function(p){return new Handle(p.value);}),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value),new IFC4.IfcLogical(v[3].value),!v[4]?null:new Handle(v[4].value));},3982875396:function _(id,v){return new IFC4.IfcShapeModel(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},4240577450:function _(id,v){return new IFC4.IfcShapeRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2273995522:function _(id,v){return new IFC4.IfcStructuralConnectionCondition(id,!v[0]?null:new IFC4.IfcLabel(v[0].value));},2162789131:function _(id,v){return new IFC4.IfcStructuralLoad(id,!v[0]?null:new IFC4.IfcLabel(v[0].value));},3478079324:function _(id,v){return new IFC4.IfcStructuralLoadConfiguration(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:v[2].map(function(p){return new IFC4.IfcLengthMeasure(p.value);}));},609421318:function _(id,v){return new IFC4.IfcStructuralLoadOrResult(id,!v[0]?null:new IFC4.IfcLabel(v[0].value));},2525727697:function _(id,v){return new IFC4.IfcStructuralLoadStatic(id,!v[0]?null:new IFC4.IfcLabel(v[0].value));},3408363356:function _(id,v){return new IFC4.IfcStructuralLoadTemperature(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcThermodynamicTemperatureMeasure(v[1].value),!v[2]?null:new IFC4.IfcThermodynamicTemperatureMeasure(v[2].value),!v[3]?null:new IFC4.IfcThermodynamicTemperatureMeasure(v[3].value));},2830218821:function _(id,v){return new IFC4.IfcStyleModel(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3958052878:function _(id,v){return new IFC4.IfcStyledItem(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC4.IfcLabel(v[2].value));},3049322572:function _(id,v){return new IFC4.IfcStyledRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2934153892:function _(id,v){return new IFC4.IfcSurfaceReinforcementArea(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:v[1].map(function(p){return new IFC4.IfcLengthMeasure(p.value);}),!v[2]?null:v[2].map(function(p){return new IFC4.IfcLengthMeasure(p.value);}),!v[3]?null:new IFC4.IfcRatioMeasure(v[3].value));},1300840506:function _(id,v){return new IFC4.IfcSurfaceStyle(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],v[2].map(function(p){return new Handle(p.value);}));},3303107099:function _(id,v){return new IFC4.IfcSurfaceStyleLighting(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},1607154358:function _(id,v){return new IFC4.IfcSurfaceStyleRefraction(id,!v[0]?null:new IFC4.IfcReal(v[0].value),!v[1]?null:new IFC4.IfcReal(v[1].value));},846575682:function _(id,v){return new IFC4.IfcSurfaceStyleShading(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcNormalisedRatioMeasure(v[1].value));},1351298697:function _(id,v){return new IFC4.IfcSurfaceStyleWithTextures(id,v[0].map(function(p){return new Handle(p.value);}));},626085974:function _(id,v){return new IFC4.IfcSurfaceTexture(id,new IFC4.IfcBoolean(v[0].value),new IFC4.IfcBoolean(v[1].value),!v[2]?null:new IFC4.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4.IfcIdentifier(p.value);}));},985171141:function _(id,v){return new IFC4.IfcTable(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2043862942:function _(id,v){return new IFC4.IfcTableColumn(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value));},531007025:function _(id,v){return new IFC4.IfcTableRow(id,!v[0]?null:v[0].map(function(p){return TypeInitialiser(2,p);}),!v[1]?null:new IFC4.IfcBoolean(v[1].value));},1549132990:function _(id,v){return new IFC4.IfcTaskTime(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3],!v[4]?null:new IFC4.IfcDuration(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new IFC4.IfcDateTime(v[6].value),!v[7]?null:new IFC4.IfcDateTime(v[7].value),!v[8]?null:new IFC4.IfcDateTime(v[8].value),!v[9]?null:new IFC4.IfcDateTime(v[9].value),!v[10]?null:new IFC4.IfcDateTime(v[10].value),!v[11]?null:new IFC4.IfcDuration(v[11].value),!v[12]?null:new IFC4.IfcDuration(v[12].value),!v[13]?null:new IFC4.IfcBoolean(v[13].value),!v[14]?null:new IFC4.IfcDateTime(v[14].value),!v[15]?null:new IFC4.IfcDuration(v[15].value),!v[16]?null:new IFC4.IfcDateTime(v[16].value),!v[17]?null:new IFC4.IfcDateTime(v[17].value),!v[18]?null:new IFC4.IfcDuration(v[18].value),!v[19]?null:new IFC4.IfcPositiveRatioMeasure(v[19].value));},2771591690:function _(id,v){return new IFC4.IfcTaskTimeRecurring(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3],!v[4]?null:new IFC4.IfcDuration(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new IFC4.IfcDateTime(v[6].value),!v[7]?null:new IFC4.IfcDateTime(v[7].value),!v[8]?null:new IFC4.IfcDateTime(v[8].value),!v[9]?null:new IFC4.IfcDateTime(v[9].value),!v[10]?null:new IFC4.IfcDateTime(v[10].value),!v[11]?null:new IFC4.IfcDuration(v[11].value),!v[12]?null:new IFC4.IfcDuration(v[12].value),!v[13]?null:new IFC4.IfcBoolean(v[13].value),!v[14]?null:new IFC4.IfcDateTime(v[14].value),!v[15]?null:new IFC4.IfcDuration(v[15].value),!v[16]?null:new IFC4.IfcDateTime(v[16].value),!v[17]?null:new IFC4.IfcDateTime(v[17].value),!v[18]?null:new IFC4.IfcDuration(v[18].value),!v[19]?null:new IFC4.IfcPositiveRatioMeasure(v[19].value),new Handle(v[20].value));},912023232:function _(id,v){return new IFC4.IfcTelecomAddress(id,v[0],!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4.IfcLabel(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC4.IfcLabel(p.value);}),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:v[6].map(function(p){return new IFC4.IfcLabel(p.value);}),!v[7]?null:new IFC4.IfcURIReference(v[7].value),!v[8]?null:v[8].map(function(p){return new IFC4.IfcURIReference(p.value);}));},1447204868:function _(id,v){return new IFC4.IfcTextStyle(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4.IfcBoolean(v[4].value));},2636378356:function _(id,v){return new IFC4.IfcTextStyleForDefinedFont(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1640371178:function _(id,v){return new IFC4.IfcTextStyleTextModel(id,!v[0]?null:TypeInitialiser(2,v[0]),!v[1]?null:new IFC4.IfcTextAlignment(v[1].value),!v[2]?null:new IFC4.IfcTextDecoration(v[2].value),!v[3]?null:TypeInitialiser(2,v[3]),!v[4]?null:TypeInitialiser(2,v[4]),!v[5]?null:new IFC4.IfcTextTransformation(v[5].value),!v[6]?null:TypeInitialiser(2,v[6]));},280115917:function _(id,v){return new IFC4.IfcTextureCoordinate(id,v[0].map(function(p){return new Handle(p.value);}));},1742049831:function _(id,v){return new IFC4.IfcTextureCoordinateGenerator(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4.IfcLabel(v[1].value),!v[2]?null:v[2].map(function(p){return new IFC4.IfcReal(p.value);}));},2552916305:function _(id,v){return new IFC4.IfcTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new Handle(p.value);}),new Handle(v[2].value));},1210645708:function _(id,v){return new IFC4.IfcTextureVertex(id,v[0].map(function(p){return new IFC4.IfcParameterValue(p.value);}));},3611470254:function _(id,v){return new IFC4.IfcTextureVertexList(id,v[0].map(function(p){return new IFC4.IfcParameterValue(p.value);}));},1199560280:function _(id,v){return new IFC4.IfcTimePeriod(id,new IFC4.IfcTime(v[0].value),new IFC4.IfcTime(v[1].value));},3101149627:function _(id,v){return new IFC4.IfcTimeSeries(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new IFC4.IfcDateTime(v[2].value),new IFC4.IfcDateTime(v[3].value),v[4],v[5],!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value));},581633288:function _(id,v){return new IFC4.IfcTimeSeriesValue(id,v[0].map(function(p){return TypeInitialiser(2,p);}));},1377556343:function _(id,_52){return new IFC4.IfcTopologicalRepresentationItem(id);},1735638870:function _(id,v){return new IFC4.IfcTopologyRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},180925521:function _(id,v){return new IFC4.IfcUnitAssignment(id,v[0].map(function(p){return new Handle(p.value);}));},2799835756:function _(id,_53){return new IFC4.IfcVertex(id);},1907098498:function _(id,v){return new IFC4.IfcVertexPoint(id,new Handle(v[0].value));},891718957:function _(id,v){return new IFC4.IfcVirtualGridIntersection(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new IFC4.IfcLengthMeasure(p.value);}));},1236880293:function _(id,v){return new IFC4.IfcWorkTime(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4.IfcDate(v[4].value),!v[5]?null:new IFC4.IfcDate(v[5].value));},3869604511:function _(id,v){return new IFC4.IfcApprovalRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3798115385:function _(id,v){return new IFC4.IfcArbitraryClosedProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),new Handle(v[2].value));},1310608509:function _(id,v){return new IFC4.IfcArbitraryOpenProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),new Handle(v[2].value));},2705031697:function _(id,v){return new IFC4.IfcArbitraryProfileDefWithVoids(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},616511568:function _(id,v){return new IFC4.IfcBlobTexture(id,new IFC4.IfcBoolean(v[0].value),new IFC4.IfcBoolean(v[1].value),!v[2]?null:new IFC4.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4.IfcIdentifier(p.value);}),new IFC4.IfcIdentifier(v[5].value),new IFC4.IfcBinary(v[6].value));},3150382593:function _(id,v){return new IFC4.IfcCenterLineProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value));},747523909:function _(id,v){return new IFC4.IfcClassification(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcDate(v[2].value),new IFC4.IfcLabel(v[3].value),!v[4]?null:new IFC4.IfcText(v[4].value),!v[5]?null:new IFC4.IfcURIReference(v[5].value),!v[6]?null:v[6].map(function(p){return new IFC4.IfcIdentifier(p.value);}));},647927063:function _(id,v){return new IFC4.IfcClassificationReference(id,!v[0]?null:new IFC4.IfcURIReference(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4.IfcText(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value));},3285139300:function _(id,v){return new IFC4.IfcColourRgbList(id,v[0].map(function(p){return new IFC4.IfcNormalisedRatioMeasure(p.value);}));},3264961684:function _(id,v){return new IFC4.IfcColourSpecification(id,!v[0]?null:new IFC4.IfcLabel(v[0].value));},1485152156:function _(id,v){return new IFC4.IfcCompositeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC4.IfcLabel(v[3].value));},370225590:function _(id,v){return new IFC4.IfcConnectedFaceSet(id,v[0].map(function(p){return new Handle(p.value);}));},1981873012:function _(id,v){return new IFC4.IfcConnectionCurveGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},45288368:function _(id,v){return new IFC4.IfcConnectionPointEccentricity(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4.IfcLengthMeasure(v[4].value));},3050246964:function _(id,v){return new IFC4.IfcContextDependentUnit(id,new Handle(v[0].value),v[1],new IFC4.IfcLabel(v[2].value));},2889183280:function _(id,v){return new IFC4.IfcConversionBasedUnit(id,new Handle(v[0].value),v[1],new IFC4.IfcLabel(v[2].value),new Handle(v[3].value));},2713554722:function _(id,v){return new IFC4.IfcConversionBasedUnitWithOffset(id,new Handle(v[0].value),v[1],new IFC4.IfcLabel(v[2].value),new Handle(v[3].value),new IFC4.IfcReal(v[4].value));},539742890:function _(id,v){return new IFC4.IfcCurrencyRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value),new IFC4.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new Handle(v[6].value));},3800577675:function _(id,v){return new IFC4.IfcCurveStyle(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:TypeInitialiser(2,v[2]),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4.IfcBoolean(v[4].value));},1105321065:function _(id,v){return new IFC4.IfcCurveStyleFont(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},2367409068:function _(id,v){return new IFC4.IfcCurveStyleFontAndScaling(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),new IFC4.IfcPositiveRatioMeasure(v[2].value));},3510044353:function _(id,v){return new IFC4.IfcCurveStyleFontPattern(id,new IFC4.IfcLengthMeasure(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value));},3632507154:function _(id,v){return new IFC4.IfcDerivedProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},1154170062:function _(id,v){return new IFC4.IfcDocumentInformation(id,new IFC4.IfcIdentifier(v[0].value),new IFC4.IfcLabel(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value),!v[3]?null:new IFC4.IfcURIReference(v[3].value),!v[4]?null:new IFC4.IfcText(v[4].value),!v[5]?null:new IFC4.IfcText(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new IFC4.IfcDateTime(v[10].value),!v[11]?null:new IFC4.IfcDateTime(v[11].value),!v[12]?null:new IFC4.IfcIdentifier(v[12].value),!v[13]?null:new IFC4.IfcDate(v[13].value),!v[14]?null:new IFC4.IfcDate(v[14].value),v[15],v[16]);},770865208:function _(id,v){return new IFC4.IfcDocumentInformationRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:new IFC4.IfcLabel(v[4].value));},3732053477:function _(id,v){return new IFC4.IfcDocumentReference(id,!v[0]?null:new IFC4.IfcURIReference(v[0].value),!v[1]?null:new IFC4.IfcIdentifier(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value));},3900360178:function _(id,v){return new IFC4.IfcEdge(id,new Handle(v[0].value),new Handle(v[1].value));},476780140:function _(id,v){return new IFC4.IfcEdgeCurve(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new IFC4.IfcBoolean(v[3].value));},211053100:function _(id,v){return new IFC4.IfcEventTime(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcDateTime(v[3].value),!v[4]?null:new IFC4.IfcDateTime(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new IFC4.IfcDateTime(v[6].value));},297599258:function _(id,v){return new IFC4.IfcExtendedProperties(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},1437805879:function _(id,v){return new IFC4.IfcExternalReferenceRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2556980723:function _(id,v){return new IFC4.IfcFace(id,v[0].map(function(p){return new Handle(p.value);}));},1809719519:function _(id,v){return new IFC4.IfcFaceBound(id,new Handle(v[0].value),new IFC4.IfcBoolean(v[1].value));},803316827:function _(id,v){return new IFC4.IfcFaceOuterBound(id,new Handle(v[0].value),new IFC4.IfcBoolean(v[1].value));},3008276851:function _(id,v){return new IFC4.IfcFaceSurface(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new IFC4.IfcBoolean(v[2].value));},4219587988:function _(id,v){return new IFC4.IfcFailureConnectionCondition(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcForceMeasure(v[1].value),!v[2]?null:new IFC4.IfcForceMeasure(v[2].value),!v[3]?null:new IFC4.IfcForceMeasure(v[3].value),!v[4]?null:new IFC4.IfcForceMeasure(v[4].value),!v[5]?null:new IFC4.IfcForceMeasure(v[5].value),!v[6]?null:new IFC4.IfcForceMeasure(v[6].value));},738692330:function _(id,v){return new IFC4.IfcFillAreaStyle(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC4.IfcBoolean(v[2].value));},3448662350:function _(id,v){return new IFC4.IfcGeometricRepresentationContext(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),new IFC4.IfcDimensionCount(v[2].value),!v[3]?null:new IFC4.IfcReal(v[3].value),new Handle(v[4].value),!v[5]?null:new Handle(v[5].value));},2453401579:function _(id,_54){return new IFC4.IfcGeometricRepresentationItem(id);},4142052618:function _(id,v){return new IFC4.IfcGeometricRepresentationSubContext(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLabel(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcPositiveRatioMeasure(v[3].value),v[4],!v[5]?null:new IFC4.IfcLabel(v[5].value));},3590301190:function _(id,v){return new IFC4.IfcGeometricSet(id,v[0].map(function(p){return new Handle(p.value);}));},178086475:function _(id,v){return new IFC4.IfcGridPlacement(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},812098782:function _(id,v){return new IFC4.IfcHalfSpaceSolid(id,new Handle(v[0].value),new IFC4.IfcBoolean(v[1].value));},3905492369:function _(id,v){return new IFC4.IfcImageTexture(id,new IFC4.IfcBoolean(v[0].value),new IFC4.IfcBoolean(v[1].value),!v[2]?null:new IFC4.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4.IfcIdentifier(p.value);}),new IFC4.IfcURIReference(v[5].value));},3570813810:function _(id,v){return new IFC4.IfcIndexedColourMap(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcNormalisedRatioMeasure(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}));},1437953363:function _(id,v){return new IFC4.IfcIndexedTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new Handle(v[2].value));},2133299955:function _(id,v){return new IFC4.IfcIndexedTriangleTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}));},3741457305:function _(id,v){return new IFC4.IfcIrregularTimeSeries(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new IFC4.IfcDateTime(v[2].value),new IFC4.IfcDateTime(v[3].value),v[4],v[5],!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),v[8].map(function(p){return new Handle(p.value);}));},1585845231:function _(id,v){return new IFC4.IfcLagTime(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value),TypeInitialiser(2,v[3]),v[4]);},1402838566:function _(id,v){return new IFC4.IfcLightSource(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4.IfcNormalisedRatioMeasure(v[3].value));},125510826:function _(id,v){return new IFC4.IfcLightSourceAmbient(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4.IfcNormalisedRatioMeasure(v[3].value));},2604431987:function _(id,v){return new IFC4.IfcLightSourceDirectional(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value));},4266656042:function _(id,v){return new IFC4.IfcLightSourceGoniometric(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),new IFC4.IfcThermodynamicTemperatureMeasure(v[6].value),new IFC4.IfcLuminousFluxMeasure(v[7].value),v[8],new Handle(v[9].value));},1520743889:function _(id,v){return new IFC4.IfcLightSourcePositional(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcReal(v[6].value),new IFC4.IfcReal(v[7].value),new IFC4.IfcReal(v[8].value));},3422422726:function _(id,v){return new IFC4.IfcLightSourceSpot(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcReal(v[6].value),new IFC4.IfcReal(v[7].value),new IFC4.IfcReal(v[8].value),new Handle(v[9].value),!v[10]?null:new IFC4.IfcReal(v[10].value),new IFC4.IfcPositivePlaneAngleMeasure(v[11].value),new IFC4.IfcPositivePlaneAngleMeasure(v[12].value));},2624227202:function _(id,v){return new IFC4.IfcLocalPlacement(id,!v[0]?null:new Handle(v[0].value),new Handle(v[1].value));},1008929658:function _(id,_55){return new IFC4.IfcLoop(id);},2347385850:function _(id,v){return new IFC4.IfcMappedItem(id,new Handle(v[0].value),new Handle(v[1].value));},1838606355:function _(id,v){return new IFC4.IfcMaterial(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value));},3708119e3:function _(id,v){return new IFC4.IfcMaterialConstituent(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcNormalisedRatioMeasure(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},2852063980:function _(id,v){return new IFC4.IfcMaterialConstituentSet(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2022407955:function _(id,v){return new IFC4.IfcMaterialDefinitionRepresentation(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},1303795690:function _(id,v){return new IFC4.IfcMaterialLayerSetUsage(id,new Handle(v[0].value),v[1],v[2],new IFC4.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4.IfcPositiveLengthMeasure(v[4].value));},3079605661:function _(id,v){return new IFC4.IfcMaterialProfileSetUsage(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcCardinalPointReference(v[1].value),!v[2]?null:new IFC4.IfcPositiveLengthMeasure(v[2].value));},3404854881:function _(id,v){return new IFC4.IfcMaterialProfileSetUsageTapering(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcCardinalPointReference(v[1].value),!v[2]?null:new IFC4.IfcPositiveLengthMeasure(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4.IfcCardinalPointReference(v[4].value));},3265635763:function _(id,v){return new IFC4.IfcMaterialProperties(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},853536259:function _(id,v){return new IFC4.IfcMaterialRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:new IFC4.IfcLabel(v[4].value));},2998442950:function _(id,v){return new IFC4.IfcMirroredProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcLabel(v[3].value));},219451334:function _(id,v){return new IFC4.IfcObjectDefinition(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},2665983363:function _(id,v){return new IFC4.IfcOpenShell(id,v[0].map(function(p){return new Handle(p.value);}));},1411181986:function _(id,v){return new IFC4.IfcOrganizationRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1029017970:function _(id,v){return new IFC4.IfcOrientedEdge(id,new Handle(v[0].value),new IFC4.IfcBoolean(v[1].value));},2529465313:function _(id,v){return new IFC4.IfcParameterizedProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value));},2519244187:function _(id,v){return new IFC4.IfcPath(id,v[0].map(function(p){return new Handle(p.value);}));},3021840470:function _(id,v){return new IFC4.IfcPhysicalComplexQuantity(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new IFC4.IfcLabel(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value));},597895409:function _(id,v){return new IFC4.IfcPixelTexture(id,new IFC4.IfcBoolean(v[0].value),new IFC4.IfcBoolean(v[1].value),!v[2]?null:new IFC4.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4.IfcIdentifier(p.value);}),new IFC4.IfcInteger(v[5].value),new IFC4.IfcInteger(v[6].value),new IFC4.IfcInteger(v[7].value),v[8].map(function(p){return new IFC4.IfcBinary(p.value);}));},2004835150:function _(id,v){return new IFC4.IfcPlacement(id,new Handle(v[0].value));},1663979128:function _(id,v){return new IFC4.IfcPlanarExtent(id,new IFC4.IfcLengthMeasure(v[0].value),new IFC4.IfcLengthMeasure(v[1].value));},2067069095:function _(id,_56){return new IFC4.IfcPoint(id);},4022376103:function _(id,v){return new IFC4.IfcPointOnCurve(id,new Handle(v[0].value),new IFC4.IfcParameterValue(v[1].value));},1423911732:function _(id,v){return new IFC4.IfcPointOnSurface(id,new Handle(v[0].value),new IFC4.IfcParameterValue(v[1].value),new IFC4.IfcParameterValue(v[2].value));},2924175390:function _(id,v){return new IFC4.IfcPolyLoop(id,v[0].map(function(p){return new Handle(p.value);}));},2775532180:function _(id,v){return new IFC4.IfcPolygonalBoundedHalfSpace(id,new Handle(v[0].value),new IFC4.IfcBoolean(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},3727388367:function _(id,v){return new IFC4.IfcPreDefinedItem(id,new IFC4.IfcLabel(v[0].value));},3778827333:function _(id,_57){return new IFC4.IfcPreDefinedProperties(id);},1775413392:function _(id,v){return new IFC4.IfcPreDefinedTextFont(id,new IFC4.IfcLabel(v[0].value));},673634403:function _(id,v){return new IFC4.IfcProductDefinitionShape(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},2802850158:function _(id,v){return new IFC4.IfcProfileProperties(id,!v[0]?null:new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},2598011224:function _(id,v){return new IFC4.IfcProperty(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value));},1680319473:function _(id,v){return new IFC4.IfcPropertyDefinition(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},148025276:function _(id,v){return new IFC4.IfcPropertyDependencyRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4.IfcText(v[4].value));},3357820518:function _(id,v){return new IFC4.IfcPropertySetDefinition(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},1482703590:function _(id,v){return new IFC4.IfcPropertyTemplateDefinition(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},2090586900:function _(id,v){return new IFC4.IfcQuantitySet(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},3615266464:function _(id,v){return new IFC4.IfcRectangleProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value));},3413951693:function _(id,v){return new IFC4.IfcRegularTimeSeries(id,new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new IFC4.IfcDateTime(v[2].value),new IFC4.IfcDateTime(v[3].value),v[4],v[5],!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),new IFC4.IfcTimeMeasure(v[8].value),v[9].map(function(p){return new Handle(p.value);}));},1580146022:function _(id,v){return new IFC4.IfcReinforcementBarProperties(id,new IFC4.IfcAreaMeasure(v[0].value),new IFC4.IfcLabel(v[1].value),v[2],!v[3]?null:new IFC4.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC4.IfcCountMeasure(v[5].value));},478536968:function _(id,v){return new IFC4.IfcRelationship(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},2943643501:function _(id,v){return new IFC4.IfcResourceApprovalRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},1608871552:function _(id,v){return new IFC4.IfcResourceConstraintRelationship(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1042787934:function _(id,v){return new IFC4.IfcResourceTime(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcDuration(v[3].value),!v[4]?null:new IFC4.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC4.IfcDateTime(v[5].value),!v[6]?null:new IFC4.IfcDateTime(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcDuration(v[8].value),!v[9]?null:new IFC4.IfcBoolean(v[9].value),!v[10]?null:new IFC4.IfcDateTime(v[10].value),!v[11]?null:new IFC4.IfcDuration(v[11].value),!v[12]?null:new IFC4.IfcPositiveRatioMeasure(v[12].value),!v[13]?null:new IFC4.IfcDateTime(v[13].value),!v[14]?null:new IFC4.IfcDateTime(v[14].value),!v[15]?null:new IFC4.IfcDuration(v[15].value),!v[16]?null:new IFC4.IfcPositiveRatioMeasure(v[16].value),!v[17]?null:new IFC4.IfcPositiveRatioMeasure(v[17].value));},2778083089:function _(id,v){return new IFC4.IfcRoundedRectangleProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value));},2042790032:function _(id,v){return new IFC4.IfcSectionProperties(id,v[0],new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},4165799628:function _(id,v){return new IFC4.IfcSectionReinforcementProperties(id,new IFC4.IfcLengthMeasure(v[0].value),new IFC4.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcLengthMeasure(v[2].value),v[3],new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},1509187699:function _(id,v){return new IFC4.IfcSectionedSpine(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}));},4124623270:function _(id,v){return new IFC4.IfcShellBasedSurfaceModel(id,v[0].map(function(p){return new Handle(p.value);}));},3692461612:function _(id,v){return new IFC4.IfcSimpleProperty(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value));},2609359061:function _(id,v){return new IFC4.IfcSlippageConnectionCondition(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4.IfcLengthMeasure(v[3].value));},723233188:function _(id,_58){return new IFC4.IfcSolidModel(id);},1595516126:function _(id,v){return new IFC4.IfcStructuralLoadLinearForce(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLinearForceMeasure(v[1].value),!v[2]?null:new IFC4.IfcLinearForceMeasure(v[2].value),!v[3]?null:new IFC4.IfcLinearForceMeasure(v[3].value),!v[4]?null:new IFC4.IfcLinearMomentMeasure(v[4].value),!v[5]?null:new IFC4.IfcLinearMomentMeasure(v[5].value),!v[6]?null:new IFC4.IfcLinearMomentMeasure(v[6].value));},2668620305:function _(id,v){return new IFC4.IfcStructuralLoadPlanarForce(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcPlanarForceMeasure(v[1].value),!v[2]?null:new IFC4.IfcPlanarForceMeasure(v[2].value),!v[3]?null:new IFC4.IfcPlanarForceMeasure(v[3].value));},2473145415:function _(id,v){return new IFC4.IfcStructuralLoadSingleDisplacement(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4.IfcPlaneAngleMeasure(v[4].value),!v[5]?null:new IFC4.IfcPlaneAngleMeasure(v[5].value),!v[6]?null:new IFC4.IfcPlaneAngleMeasure(v[6].value));},1973038258:function _(id,v){return new IFC4.IfcStructuralLoadSingleDisplacementDistortion(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4.IfcPlaneAngleMeasure(v[4].value),!v[5]?null:new IFC4.IfcPlaneAngleMeasure(v[5].value),!v[6]?null:new IFC4.IfcPlaneAngleMeasure(v[6].value),!v[7]?null:new IFC4.IfcCurvatureMeasure(v[7].value));},1597423693:function _(id,v){return new IFC4.IfcStructuralLoadSingleForce(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcForceMeasure(v[1].value),!v[2]?null:new IFC4.IfcForceMeasure(v[2].value),!v[3]?null:new IFC4.IfcForceMeasure(v[3].value),!v[4]?null:new IFC4.IfcTorqueMeasure(v[4].value),!v[5]?null:new IFC4.IfcTorqueMeasure(v[5].value),!v[6]?null:new IFC4.IfcTorqueMeasure(v[6].value));},1190533807:function _(id,v){return new IFC4.IfcStructuralLoadSingleForceWarping(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),!v[1]?null:new IFC4.IfcForceMeasure(v[1].value),!v[2]?null:new IFC4.IfcForceMeasure(v[2].value),!v[3]?null:new IFC4.IfcForceMeasure(v[3].value),!v[4]?null:new IFC4.IfcTorqueMeasure(v[4].value),!v[5]?null:new IFC4.IfcTorqueMeasure(v[5].value),!v[6]?null:new IFC4.IfcTorqueMeasure(v[6].value),!v[7]?null:new IFC4.IfcWarpingMomentMeasure(v[7].value));},2233826070:function _(id,v){return new IFC4.IfcSubedge(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value));},2513912981:function _(id,_59){return new IFC4.IfcSurface(id);},1878645084:function _(id,v){return new IFC4.IfcSurfaceStyleRendering(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcNormalisedRatioMeasure(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:TypeInitialiser(2,v[7]),v[8]);},2247615214:function _(id,v){return new IFC4.IfcSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1260650574:function _(id,v){return new IFC4.IfcSweptDiskSolid(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcPositiveLengthMeasure(v[2].value),!v[3]?null:new IFC4.IfcParameterValue(v[3].value),!v[4]?null:new IFC4.IfcParameterValue(v[4].value));},1096409881:function _(id,v){return new IFC4.IfcSweptDiskSolidPolygonal(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),!v[2]?null:new IFC4.IfcPositiveLengthMeasure(v[2].value),!v[3]?null:new IFC4.IfcParameterValue(v[3].value),!v[4]?null:new IFC4.IfcParameterValue(v[4].value),!v[5]?null:new IFC4.IfcPositiveLengthMeasure(v[5].value));},230924584:function _(id,v){return new IFC4.IfcSweptSurface(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},3071757647:function _(id,v){return new IFC4.IfcTShapeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcNonNegativeLengthMeasure(v[9].value),!v[10]?null:new IFC4.IfcPlaneAngleMeasure(v[10].value),!v[11]?null:new IFC4.IfcPlaneAngleMeasure(v[11].value));},901063453:function _(id,_60){return new IFC4.IfcTessellatedItem(id);},4282788508:function _(id,v){return new IFC4.IfcTextLiteral(id,new IFC4.IfcPresentableText(v[0].value),new Handle(v[1].value),v[2]);},3124975700:function _(id,v){return new IFC4.IfcTextLiteralWithExtent(id,new IFC4.IfcPresentableText(v[0].value),new Handle(v[1].value),v[2],new Handle(v[3].value),new IFC4.IfcBoxAlignment(v[4].value));},1983826977:function _(id,v){return new IFC4.IfcTextStyleFontModel(id,new IFC4.IfcLabel(v[0].value),v[1].map(function(p){return new IFC4.IfcTextFontName(p.value);}),!v[2]?null:new IFC4.IfcFontStyle(v[2].value),!v[3]?null:new IFC4.IfcFontVariant(v[3].value),!v[4]?null:new IFC4.IfcFontWeight(v[4].value),TypeInitialiser(2,v[5]));},2715220739:function _(id,v){return new IFC4.IfcTrapeziumProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcLengthMeasure(v[6].value));},1628702193:function _(id,v){return new IFC4.IfcTypeObject(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}));},3736923433:function _(id,v){return new IFC4.IfcTypeProcess(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},2347495698:function _(id,v){return new IFC4.IfcTypeProduct(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value));},3698973494:function _(id,v){return new IFC4.IfcTypeResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},427810014:function _(id,v){return new IFC4.IfcUShapeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPlaneAngleMeasure(v[9].value));},1417489154:function _(id,v){return new IFC4.IfcVector(id,new Handle(v[0].value),new IFC4.IfcLengthMeasure(v[1].value));},2759199220:function _(id,v){return new IFC4.IfcVertexLoop(id,new Handle(v[0].value));},1299126871:function _(id,v){return new IFC4.IfcWindowStyle(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],v[9],new IFC4.IfcBoolean(v[10].value),new IFC4.IfcBoolean(v[11].value));},2543172580:function _(id,v){return new IFC4.IfcZShapeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4.IfcNonNegativeLengthMeasure(v[8].value));},3406155212:function _(id,v){return new IFC4.IfcAdvancedFace(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new IFC4.IfcBoolean(v[2].value));},669184980:function _(id,v){return new IFC4.IfcAnnotationFillArea(id,new Handle(v[0].value),!v[1]?null:v[1].map(function(p){return new Handle(p.value);}));},3207858831:function _(id,v){return new IFC4.IfcAsymmetricIShapeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),new IFC4.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC4.IfcNonNegativeLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcNonNegativeLengthMeasure(v[11].value),!v[12]?null:new IFC4.IfcPlaneAngleMeasure(v[12].value),!v[13]?null:new IFC4.IfcNonNegativeLengthMeasure(v[13].value),!v[14]?null:new IFC4.IfcPlaneAngleMeasure(v[14].value));},4261334040:function _(id,v){return new IFC4.IfcAxis1Placement(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},3125803723:function _(id,v){return new IFC4.IfcAxis2Placement2D(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},2740243338:function _(id,v){return new IFC4.IfcAxis2Placement3D(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},2736907675:function _(id,v){return new IFC4.IfcBooleanResult(id,v[0],new Handle(v[1].value),new Handle(v[2].value));},4182860854:function _(id,_61){return new IFC4.IfcBoundedSurface(id);},2581212453:function _(id,v){return new IFC4.IfcBoundingBox(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),new IFC4.IfcPositiveLengthMeasure(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value));},2713105998:function _(id,v){return new IFC4.IfcBoxedHalfSpace(id,new Handle(v[0].value),new IFC4.IfcBoolean(v[1].value),new Handle(v[2].value));},2898889636:function _(id,v){return new IFC4.IfcCShapeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value));},1123145078:function _(id,v){return new IFC4.IfcCartesianPoint(id,v[0].map(function(p){return new IFC4.IfcLengthMeasure(p.value);}));},574549367:function _(id,_62){return new IFC4.IfcCartesianPointList(id);},1675464909:function _(id,v){return new IFC4.IfcCartesianPointList2D(id,v[0].map(function(p){return new IFC4.IfcLengthMeasure(p.value);}));},2059837836:function _(id,v){return new IFC4.IfcCartesianPointList3D(id,v[0].map(function(p){return new IFC4.IfcLengthMeasure(p.value);}));},59481748:function _(id,v){return new IFC4.IfcCartesianTransformationOperator(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcReal(v[3].value));},3749851601:function _(id,v){return new IFC4.IfcCartesianTransformationOperator2D(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcReal(v[3].value));},3486308946:function _(id,v){return new IFC4.IfcCartesianTransformationOperator2DnonUniform(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcReal(v[3].value),!v[4]?null:new IFC4.IfcReal(v[4].value));},3331915920:function _(id,v){return new IFC4.IfcCartesianTransformationOperator3D(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcReal(v[3].value),!v[4]?null:new Handle(v[4].value));},1416205885:function _(id,v){return new IFC4.IfcCartesianTransformationOperator3DnonUniform(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcReal(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4.IfcReal(v[5].value),!v[6]?null:new IFC4.IfcReal(v[6].value));},1383045692:function _(id,v){return new IFC4.IfcCircleProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value));},2205249479:function _(id,v){return new IFC4.IfcClosedShell(id,v[0].map(function(p){return new Handle(p.value);}));},776857604:function _(id,v){return new IFC4.IfcColourRgb(id,!v[0]?null:new IFC4.IfcLabel(v[0].value),new IFC4.IfcNormalisedRatioMeasure(v[1].value),new IFC4.IfcNormalisedRatioMeasure(v[2].value),new IFC4.IfcNormalisedRatioMeasure(v[3].value));},2542286263:function _(id,v){return new IFC4.IfcComplexProperty(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),new IFC4.IfcIdentifier(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2485617015:function _(id,v){return new IFC4.IfcCompositeCurveSegment(id,v[0],new IFC4.IfcBoolean(v[1].value),new Handle(v[2].value));},2574617495:function _(id,v){return new IFC4.IfcConstructionResourceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value));},3419103109:function _(id,v){return new IFC4.IfcContext(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new Handle(v[8].value));},1815067380:function _(id,v){return new IFC4.IfcCrewResourceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},2506170314:function _(id,v){return new IFC4.IfcCsgPrimitive3D(id,new Handle(v[0].value));},2147822146:function _(id,v){return new IFC4.IfcCsgSolid(id,new Handle(v[0].value));},2601014836:function _(id,_63){return new IFC4.IfcCurve(id);},2827736869:function _(id,v){return new IFC4.IfcCurveBoundedPlane(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2629017746:function _(id,v){return new IFC4.IfcCurveBoundedSurface(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),new IFC4.IfcBoolean(v[2].value));},32440307:function _(id,v){return new IFC4.IfcDirection(id,v[0].map(function(p){return new IFC4.IfcReal(p.value);}));},526551008:function _(id,v){return new IFC4.IfcDoorStyle(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],v[9],new IFC4.IfcBoolean(v[10].value),new IFC4.IfcBoolean(v[11].value));},1472233963:function _(id,v){return new IFC4.IfcEdgeLoop(id,v[0].map(function(p){return new Handle(p.value);}));},1883228015:function _(id,v){return new IFC4.IfcElementQuantity(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},339256511:function _(id,v){return new IFC4.IfcElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},2777663545:function _(id,v){return new IFC4.IfcElementarySurface(id,new Handle(v[0].value));},2835456948:function _(id,v){return new IFC4.IfcEllipseProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value));},4024345920:function _(id,v){return new IFC4.IfcEventType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],v[10],!v[11]?null:new IFC4.IfcLabel(v[11].value));},477187591:function _(id,v){return new IFC4.IfcExtrudedAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value));},2804161546:function _(id,v){return new IFC4.IfcExtrudedAreaSolidTapered(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new Handle(v[4].value));},2047409740:function _(id,v){return new IFC4.IfcFaceBasedSurfaceModel(id,v[0].map(function(p){return new Handle(p.value);}));},374418227:function _(id,v){return new IFC4.IfcFillAreaStyleHatching(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),new IFC4.IfcPlaneAngleMeasure(v[4].value));},315944413:function _(id,v){return new IFC4.IfcFillAreaStyleTiles(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new Handle(p.value);}),new IFC4.IfcPositiveRatioMeasure(v[2].value));},2652556860:function _(id,v){return new IFC4.IfcFixedReferenceSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcParameterValue(v[3].value),!v[4]?null:new IFC4.IfcParameterValue(v[4].value),new Handle(v[5].value));},4238390223:function _(id,v){return new IFC4.IfcFurnishingElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},1268542332:function _(id,v){return new IFC4.IfcFurnitureType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],v[10]);},4095422895:function _(id,v){return new IFC4.IfcGeographicElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},987898635:function _(id,v){return new IFC4.IfcGeometricCurveSet(id,v[0].map(function(p){return new Handle(p.value);}));},1484403080:function _(id,v){return new IFC4.IfcIShapeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPlaneAngleMeasure(v[9].value));},178912537:function _(id,v){return new IFC4.IfcIndexedPolygonalFace(id,v[0].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}));},2294589976:function _(id,v){return new IFC4.IfcIndexedPolygonalFaceWithVoids(id,v[0].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}),v[1].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}));},572779678:function _(id,v){return new IFC4.IfcLShapeProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),!v[4]?null:new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC4.IfcNonNegativeLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4.IfcPlaneAngleMeasure(v[8].value));},428585644:function _(id,v){return new IFC4.IfcLaborResourceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},1281925730:function _(id,v){return new IFC4.IfcLine(id,new Handle(v[0].value),new Handle(v[1].value));},1425443689:function _(id,v){return new IFC4.IfcManifoldSolidBrep(id,new Handle(v[0].value));},3888040117:function _(id,v){return new IFC4.IfcObject(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},3388369263:function _(id,v){return new IFC4.IfcOffsetCurve2D(id,new Handle(v[0].value),new IFC4.IfcLengthMeasure(v[1].value),new IFC4.IfcLogical(v[2].value));},3505215534:function _(id,v){return new IFC4.IfcOffsetCurve3D(id,new Handle(v[0].value),new IFC4.IfcLengthMeasure(v[1].value),new IFC4.IfcLogical(v[2].value),new Handle(v[3].value));},1682466193:function _(id,v){return new IFC4.IfcPcurve(id,new Handle(v[0].value),new Handle(v[1].value));},603570806:function _(id,v){return new IFC4.IfcPlanarBox(id,new IFC4.IfcLengthMeasure(v[0].value),new IFC4.IfcLengthMeasure(v[1].value),new Handle(v[2].value));},220341763:function _(id,v){return new IFC4.IfcPlane(id,new Handle(v[0].value));},759155922:function _(id,v){return new IFC4.IfcPreDefinedColour(id,new IFC4.IfcLabel(v[0].value));},2559016684:function _(id,v){return new IFC4.IfcPreDefinedCurveFont(id,new IFC4.IfcLabel(v[0].value));},3967405729:function _(id,v){return new IFC4.IfcPreDefinedPropertySet(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},569719735:function _(id,v){return new IFC4.IfcProcedureType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2945172077:function _(id,v){return new IFC4.IfcProcess(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value));},4208778838:function _(id,v){return new IFC4.IfcProduct(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},103090709:function _(id,v){return new IFC4.IfcProject(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new Handle(v[8].value));},653396225:function _(id,v){return new IFC4.IfcProjectLibrary(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new Handle(v[8].value));},871118103:function _(id,v){return new IFC4.IfcPropertyBoundedValue(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:TypeInitialiser(2,v[2]),!v[3]?null:TypeInitialiser(2,v[3]),!v[4]?null:new Handle(v[4].value),!v[5]?null:TypeInitialiser(2,v[5]));},4166981789:function _(id,v){return new IFC4.IfcPropertyEnumeratedValue(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return TypeInitialiser(2,p);}),!v[3]?null:new Handle(v[3].value));},2752243245:function _(id,v){return new IFC4.IfcPropertyListValue(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return TypeInitialiser(2,p);}),!v[3]?null:new Handle(v[3].value));},941946838:function _(id,v){return new IFC4.IfcPropertyReferenceValue(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:new IFC4.IfcText(v[2].value),!v[3]?null:new Handle(v[3].value));},1451395588:function _(id,v){return new IFC4.IfcPropertySet(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}));},492091185:function _(id,v){return new IFC4.IfcPropertySetTemplate(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4],!v[5]?null:new IFC4.IfcIdentifier(v[5].value),v[6].map(function(p){return new Handle(p.value);}));},3650150729:function _(id,v){return new IFC4.IfcPropertySingleValue(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:TypeInitialiser(2,v[2]),!v[3]?null:new Handle(v[3].value));},110355661:function _(id,v){return new IFC4.IfcPropertyTableValue(id,new IFC4.IfcIdentifier(v[0].value),!v[1]?null:new IFC4.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return TypeInitialiser(2,p);}),!v[3]?null:v[3].map(function(p){return TypeInitialiser(2,p);}),!v[4]?null:new IFC4.IfcText(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},3521284610:function _(id,v){return new IFC4.IfcPropertyTemplate(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},3219374653:function _(id,v){return new IFC4.IfcProxy(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC4.IfcLabel(v[8].value));},2770003689:function _(id,v){return new IFC4.IfcRectangleHollowProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value),new IFC4.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC4.IfcNonNegativeLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value));},2798486643:function _(id,v){return new IFC4.IfcRectangularPyramid(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),new IFC4.IfcPositiveLengthMeasure(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value));},3454111270:function _(id,v){return new IFC4.IfcRectangularTrimmedSurface(id,new Handle(v[0].value),new IFC4.IfcParameterValue(v[1].value),new IFC4.IfcParameterValue(v[2].value),new IFC4.IfcParameterValue(v[3].value),new IFC4.IfcParameterValue(v[4].value),new IFC4.IfcBoolean(v[5].value),new IFC4.IfcBoolean(v[6].value));},3765753017:function _(id,v){return new IFC4.IfcReinforcementDefinitionProperties(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},3939117080:function _(id,v){return new IFC4.IfcRelAssigns(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5]);},1683148259:function _(id,v){return new IFC4.IfcRelAssignsToActor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},2495723537:function _(id,v){return new IFC4.IfcRelAssignsToControl(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1307041759:function _(id,v){return new IFC4.IfcRelAssignsToGroup(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1027710054:function _(id,v){return new IFC4.IfcRelAssignsToGroupByFactor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),new IFC4.IfcRatioMeasure(v[7].value));},4278684876:function _(id,v){return new IFC4.IfcRelAssignsToProcess(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},2857406711:function _(id,v){return new IFC4.IfcRelAssignsToProduct(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},205026976:function _(id,v){return new IFC4.IfcRelAssignsToResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1865459582:function _(id,v){return new IFC4.IfcRelAssociates(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}));},4095574036:function _(id,v){return new IFC4.IfcRelAssociatesApproval(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},919958153:function _(id,v){return new IFC4.IfcRelAssociatesClassification(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},2728634034:function _(id,v){return new IFC4.IfcRelAssociatesConstraint(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),!v[5]?null:new IFC4.IfcLabel(v[5].value),new Handle(v[6].value));},982818633:function _(id,v){return new IFC4.IfcRelAssociatesDocument(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},3840914261:function _(id,v){return new IFC4.IfcRelAssociatesLibrary(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},2655215786:function _(id,v){return new IFC4.IfcRelAssociatesMaterial(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},826625072:function _(id,v){return new IFC4.IfcRelConnects(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},1204542856:function _(id,v){return new IFC4.IfcRelConnectsElements(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value));},3945020480:function _(id,v){return new IFC4.IfcRelConnectsPathElements(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value),v[7].map(function(p){return new IFC4.IfcInteger(p.value);}),v[8].map(function(p){return new IFC4.IfcInteger(p.value);}),v[9],v[10]);},4201705270:function _(id,v){return new IFC4.IfcRelConnectsPortToElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},3190031847:function _(id,v){return new IFC4.IfcRelConnectsPorts(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},2127690289:function _(id,v){return new IFC4.IfcRelConnectsStructuralActivity(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},1638771189:function _(id,v){return new IFC4.IfcRelConnectsStructuralMember(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC4.IfcLengthMeasure(v[8].value),!v[9]?null:new Handle(v[9].value));},504942748:function _(id,v){return new IFC4.IfcRelConnectsWithEccentricity(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC4.IfcLengthMeasure(v[8].value),!v[9]?null:new Handle(v[9].value),new Handle(v[10].value));},3678494232:function _(id,v){return new IFC4.IfcRelConnectsWithRealizingElements(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value),v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4.IfcLabel(v[8].value));},3242617779:function _(id,v){return new IFC4.IfcRelContainedInSpatialStructure(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},886880790:function _(id,v){return new IFC4.IfcRelCoversBldgElements(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2802773753:function _(id,v){return new IFC4.IfcRelCoversSpaces(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2565941209:function _(id,v){return new IFC4.IfcRelDeclares(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2551354335:function _(id,v){return new IFC4.IfcRelDecomposes(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},693640335:function _(id,v){return new IFC4.IfcRelDefines(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value));},1462361463:function _(id,v){return new IFC4.IfcRelDefinesByObject(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},4186316022:function _(id,v){return new IFC4.IfcRelDefinesByProperties(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},307848117:function _(id,v){return new IFC4.IfcRelDefinesByTemplate(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},781010003:function _(id,v){return new IFC4.IfcRelDefinesByType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},3940055652:function _(id,v){return new IFC4.IfcRelFillsElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},279856033:function _(id,v){return new IFC4.IfcRelFlowControlElements(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},427948657:function _(id,v){return new IFC4.IfcRelInterferesElements(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8].value);},3268803585:function _(id,v){return new IFC4.IfcRelNests(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},750771296:function _(id,v){return new IFC4.IfcRelProjectsElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},1245217292:function _(id,v){return new IFC4.IfcRelReferencedInSpatialStructure(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},4122056220:function _(id,v){return new IFC4.IfcRelSequence(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC4.IfcLabel(v[8].value));},366585022:function _(id,v){return new IFC4.IfcRelServicesBuildings(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},3451746338:function _(id,v){return new IFC4.IfcRelSpaceBoundary(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8]);},3523091289:function _(id,v){return new IFC4.IfcRelSpaceBoundary1stLevel(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8],!v[9]?null:new Handle(v[9].value));},1521410863:function _(id,v){return new IFC4.IfcRelSpaceBoundary2ndLevel(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8],!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value));},1401173127:function _(id,v){return new IFC4.IfcRelVoidsElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},816062949:function _(id,v){return new IFC4.IfcReparametrisedCompositeCurveSegment(id,v[0],new IFC4.IfcBoolean(v[1].value),new Handle(v[2].value),new IFC4.IfcParameterValue(v[3].value));},2914609552:function _(id,v){return new IFC4.IfcResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value));},1856042241:function _(id,v){return new IFC4.IfcRevolvedAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4.IfcPlaneAngleMeasure(v[3].value));},3243963512:function _(id,v){return new IFC4.IfcRevolvedAreaSolidTapered(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4.IfcPlaneAngleMeasure(v[3].value),new Handle(v[4].value));},4158566097:function _(id,v){return new IFC4.IfcRightCircularCone(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),new IFC4.IfcPositiveLengthMeasure(v[2].value));},3626867408:function _(id,v){return new IFC4.IfcRightCircularCylinder(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),new IFC4.IfcPositiveLengthMeasure(v[2].value));},3663146110:function _(id,v){return new IFC4.IfcSimplePropertyTemplate(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4],!v[5]?null:new IFC4.IfcLabel(v[5].value),!v[6]?null:new IFC4.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new IFC4.IfcLabel(v[10].value),v[11]);},1412071761:function _(id,v){return new IFC4.IfcSpatialElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value));},710998568:function _(id,v){return new IFC4.IfcSpatialElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},2706606064:function _(id,v){return new IFC4.IfcSpatialStructureElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8]);},3893378262:function _(id,v){return new IFC4.IfcSpatialStructureElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},463610769:function _(id,v){return new IFC4.IfcSpatialZone(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8]);},2481509218:function _(id,v){return new IFC4.IfcSpatialZoneType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcLabel(v[10].value));},451544542:function _(id,v){return new IFC4.IfcSphere(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value));},4015995234:function _(id,v){return new IFC4.IfcSphericalSurface(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value));},3544373492:function _(id,v){return new IFC4.IfcStructuralActivity(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},3136571912:function _(id,v){return new IFC4.IfcStructuralItem(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},530289379:function _(id,v){return new IFC4.IfcStructuralMember(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},3689010777:function _(id,v){return new IFC4.IfcStructuralReaction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},3979015343:function _(id,v){return new IFC4.IfcStructuralSurfaceMember(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC4.IfcPositiveLengthMeasure(v[8].value));},2218152070:function _(id,v){return new IFC4.IfcStructuralSurfaceMemberVarying(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC4.IfcPositiveLengthMeasure(v[8].value));},603775116:function _(id,v){return new IFC4.IfcStructuralSurfaceReaction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9]);},4095615324:function _(id,v){return new IFC4.IfcSubContractResourceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},699246055:function _(id,v){return new IFC4.IfcSurfaceCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2]);},2028607225:function _(id,v){return new IFC4.IfcSurfaceCurveSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4.IfcParameterValue(v[3].value),!v[4]?null:new IFC4.IfcParameterValue(v[4].value),new Handle(v[5].value));},2809605785:function _(id,v){return new IFC4.IfcSurfaceOfLinearExtrusion(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4.IfcLengthMeasure(v[3].value));},4124788165:function _(id,v){return new IFC4.IfcSurfaceOfRevolution(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value));},1580310250:function _(id,v){return new IFC4.IfcSystemFurnitureElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3473067441:function _(id,v){return new IFC4.IfcTask(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),new IFC4.IfcBoolean(v[9].value),!v[10]?null:new IFC4.IfcInteger(v[10].value),!v[11]?null:new Handle(v[11].value),v[12]);},3206491090:function _(id,v){return new IFC4.IfcTaskType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcLabel(v[10].value));},2387106220:function _(id,v){return new IFC4.IfcTessellatedFaceSet(id,new Handle(v[0].value));},1935646853:function _(id,v){return new IFC4.IfcToroidalSurface(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),new IFC4.IfcPositiveLengthMeasure(v[2].value));},2097647324:function _(id,v){return new IFC4.IfcTransportElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2916149573:function _(id,v){return new IFC4.IfcTriangulatedFaceSet(id,new Handle(v[0].value),!v[1]?null:v[1].map(function(p){return new IFC4.IfcParameterValue(p.value);}),!v[2]?null:new IFC4.IfcBoolean(v[2].value),v[3].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}));},336235671:function _(id,v){return new IFC4.IfcWindowLiningProperties(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC4.IfcNonNegativeLengthMeasure(v[5].value),!v[6]?null:new IFC4.IfcNonNegativeLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4.IfcNormalisedRatioMeasure(v[8].value),!v[9]?null:new IFC4.IfcNormalisedRatioMeasure(v[9].value),!v[10]?null:new IFC4.IfcNormalisedRatioMeasure(v[10].value),!v[11]?null:new IFC4.IfcNormalisedRatioMeasure(v[11].value),!v[12]?null:new Handle(v[12].value),!v[13]?null:new IFC4.IfcLengthMeasure(v[13].value),!v[14]?null:new IFC4.IfcLengthMeasure(v[14].value),!v[15]?null:new IFC4.IfcLengthMeasure(v[15].value));},512836454:function _(id,v){return new IFC4.IfcWindowPanelProperties(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4],v[5],!v[6]?null:new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new Handle(v[8].value));},2296667514:function _(id,v){return new IFC4.IfcActor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),new Handle(v[5].value));},1635779807:function _(id,v){return new IFC4.IfcAdvancedBrep(id,new Handle(v[0].value));},2603310189:function _(id,v){return new IFC4.IfcAdvancedBrepWithVoids(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},1674181508:function _(id,v){return new IFC4.IfcAnnotation(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},2887950389:function _(id,v){return new IFC4.IfcBSplineSurface(id,new IFC4.IfcInteger(v[0].value),new IFC4.IfcInteger(v[1].value),v[2].map(function(p){return new Handle(p.value);}),v[3],new IFC4.IfcLogical(v[4].value),new IFC4.IfcLogical(v[5].value),new IFC4.IfcLogical(v[6].value));},167062518:function _(id,v){return new IFC4.IfcBSplineSurfaceWithKnots(id,new IFC4.IfcInteger(v[0].value),new IFC4.IfcInteger(v[1].value),v[2].map(function(p){return new Handle(p.value);}),v[3],new IFC4.IfcLogical(v[4].value),new IFC4.IfcLogical(v[5].value),new IFC4.IfcLogical(v[6].value),v[7].map(function(p){return new IFC4.IfcInteger(p.value);}),v[8].map(function(p){return new IFC4.IfcInteger(p.value);}),v[9].map(function(p){return new IFC4.IfcParameterValue(p.value);}),v[10].map(function(p){return new IFC4.IfcParameterValue(p.value);}),v[11]);},1334484129:function _(id,v){return new IFC4.IfcBlock(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),new IFC4.IfcPositiveLengthMeasure(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value));},3649129432:function _(id,v){return new IFC4.IfcBooleanClippingResult(id,v[0],new Handle(v[1].value),new Handle(v[2].value));},1260505505:function _(id,_64){return new IFC4.IfcBoundedCurve(id);},4031249490:function _(id,v){return new IFC4.IfcBuilding(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC4.IfcLengthMeasure(v[9].value),!v[10]?null:new IFC4.IfcLengthMeasure(v[10].value),!v[11]?null:new Handle(v[11].value));},1950629157:function _(id,v){return new IFC4.IfcBuildingElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},3124254112:function _(id,v){return new IFC4.IfcBuildingStorey(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC4.IfcLengthMeasure(v[9].value));},2197970202:function _(id,v){return new IFC4.IfcChimneyType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2937912522:function _(id,v){return new IFC4.IfcCircleHollowProfileDef(id,v[0],!v[1]?null:new IFC4.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4.IfcPositiveLengthMeasure(v[3].value),new IFC4.IfcPositiveLengthMeasure(v[4].value));},3893394355:function _(id,v){return new IFC4.IfcCivilElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},300633059:function _(id,v){return new IFC4.IfcColumnType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3875453745:function _(id,v){return new IFC4.IfcComplexPropertyTemplate(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5],!v[6]?null:v[6].map(function(p){return new Handle(p.value);}));},3732776249:function _(id,v){return new IFC4.IfcCompositeCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4.IfcLogical(v[1].value));},15328376:function _(id,v){return new IFC4.IfcCompositeCurveOnSurface(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4.IfcLogical(v[1].value));},2510884976:function _(id,v){return new IFC4.IfcConic(id,new Handle(v[0].value));},2185764099:function _(id,v){return new IFC4.IfcConstructionEquipmentResourceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},4105962743:function _(id,v){return new IFC4.IfcConstructionMaterialResourceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},1525564444:function _(id,v){return new IFC4.IfcConstructionProductResourceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4.IfcIdentifier(v[6].value),!v[7]?null:new IFC4.IfcText(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},2559216714:function _(id,v){return new IFC4.IfcConstructionResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value));},3293443760:function _(id,v){return new IFC4.IfcControl(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value));},3895139033:function _(id,v){return new IFC4.IfcCostItem(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),v[6],!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}));},1419761937:function _(id,v){return new IFC4.IfcCostSchedule(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcDateTime(v[8].value),!v[9]?null:new IFC4.IfcDateTime(v[9].value));},1916426348:function _(id,v){return new IFC4.IfcCoveringType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3295246426:function _(id,v){return new IFC4.IfcCrewResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},1457835157:function _(id,v){return new IFC4.IfcCurtainWallType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1213902940:function _(id,v){return new IFC4.IfcCylindricalSurface(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value));},3256556792:function _(id,v){return new IFC4.IfcDistributionElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},3849074793:function _(id,v){return new IFC4.IfcDistributionFlowElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},2963535650:function _(id,v){return new IFC4.IfcDoorLiningProperties(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC4.IfcNonNegativeLengthMeasure(v[5].value),!v[6]?null:new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcLengthMeasure(v[9].value),!v[10]?null:new IFC4.IfcLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcLengthMeasure(v[11].value),!v[12]?null:new IFC4.IfcPositiveLengthMeasure(v[12].value),!v[13]?null:new IFC4.IfcPositiveLengthMeasure(v[13].value),!v[14]?null:new Handle(v[14].value),!v[15]?null:new IFC4.IfcLengthMeasure(v[15].value),!v[16]?null:new IFC4.IfcLengthMeasure(v[16].value));},1714330368:function _(id,v){return new IFC4.IfcDoorPanelProperties(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcPositiveLengthMeasure(v[4].value),v[5],!v[6]?null:new IFC4.IfcNormalisedRatioMeasure(v[6].value),v[7],!v[8]?null:new Handle(v[8].value));},2323601079:function _(id,v){return new IFC4.IfcDoorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],v[10],!v[11]?null:new IFC4.IfcBoolean(v[11].value),!v[12]?null:new IFC4.IfcLabel(v[12].value));},445594917:function _(id,v){return new IFC4.IfcDraughtingPreDefinedColour(id,new IFC4.IfcLabel(v[0].value));},4006246654:function _(id,v){return new IFC4.IfcDraughtingPreDefinedCurveFont(id,new IFC4.IfcLabel(v[0].value));},1758889154:function _(id,v){return new IFC4.IfcElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},4123344466:function _(id,v){return new IFC4.IfcElementAssembly(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8],v[9]);},2397081782:function _(id,v){return new IFC4.IfcElementAssemblyType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1623761950:function _(id,v){return new IFC4.IfcElementComponent(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},2590856083:function _(id,v){return new IFC4.IfcElementComponentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},1704287377:function _(id,v){return new IFC4.IfcEllipse(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value),new IFC4.IfcPositiveLengthMeasure(v[2].value));},2107101300:function _(id,v){return new IFC4.IfcEnergyConversionDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},132023988:function _(id,v){return new IFC4.IfcEngineType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3174744832:function _(id,v){return new IFC4.IfcEvaporativeCoolerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3390157468:function _(id,v){return new IFC4.IfcEvaporatorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4148101412:function _(id,v){return new IFC4.IfcEvent(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),v[7],v[8],!v[9]?null:new IFC4.IfcLabel(v[9].value),!v[10]?null:new Handle(v[10].value));},2853485674:function _(id,v){return new IFC4.IfcExternalSpatialStructureElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value));},807026263:function _(id,v){return new IFC4.IfcFacetedBrep(id,new Handle(v[0].value));},3737207727:function _(id,v){return new IFC4.IfcFacetedBrepWithVoids(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},647756555:function _(id,v){return new IFC4.IfcFastener(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2489546625:function _(id,v){return new IFC4.IfcFastenerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2827207264:function _(id,v){return new IFC4.IfcFeatureElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},2143335405:function _(id,v){return new IFC4.IfcFeatureElementAddition(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},1287392070:function _(id,v){return new IFC4.IfcFeatureElementSubtraction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},3907093117:function _(id,v){return new IFC4.IfcFlowControllerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},3198132628:function _(id,v){return new IFC4.IfcFlowFittingType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},3815607619:function _(id,v){return new IFC4.IfcFlowMeterType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1482959167:function _(id,v){return new IFC4.IfcFlowMovingDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},1834744321:function _(id,v){return new IFC4.IfcFlowSegmentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},1339347760:function _(id,v){return new IFC4.IfcFlowStorageDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},2297155007:function _(id,v){return new IFC4.IfcFlowTerminalType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},3009222698:function _(id,v){return new IFC4.IfcFlowTreatmentDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},1893162501:function _(id,v){return new IFC4.IfcFootingType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},263784265:function _(id,v){return new IFC4.IfcFurnishingElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},1509553395:function _(id,v){return new IFC4.IfcFurniture(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3493046030:function _(id,v){return new IFC4.IfcGeographicElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3009204131:function _(id,v){return new IFC4.IfcGrid(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7].map(function(p){return new Handle(p.value);}),v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),v[10]);},2706460486:function _(id,v){return new IFC4.IfcGroup(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},1251058090:function _(id,v){return new IFC4.IfcHeatExchangerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1806887404:function _(id,v){return new IFC4.IfcHumidifierType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2571569899:function _(id,v){return new IFC4.IfcIndexedPolyCurve(id,new Handle(v[0].value),!v[1]?null:v[1].map(function(p){return TypeInitialiser(2,p);}),!v[2]?null:new IFC4.IfcBoolean(v[2].value));},3946677679:function _(id,v){return new IFC4.IfcInterceptorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3113134337:function _(id,v){return new IFC4.IfcIntersectionCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2]);},2391368822:function _(id,v){return new IFC4.IfcInventory(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4.IfcDate(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value));},4288270099:function _(id,v){return new IFC4.IfcJunctionBoxType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3827777499:function _(id,v){return new IFC4.IfcLaborResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},1051575348:function _(id,v){return new IFC4.IfcLampType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1161773419:function _(id,v){return new IFC4.IfcLightFixtureType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},377706215:function _(id,v){return new IFC4.IfcMechanicalFastener(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),v[10]);},2108223431:function _(id,v){return new IFC4.IfcMechanicalFastenerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcPositiveLengthMeasure(v[11].value));},1114901282:function _(id,v){return new IFC4.IfcMedicalDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3181161470:function _(id,v){return new IFC4.IfcMemberType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},977012517:function _(id,v){return new IFC4.IfcMotorConnectionType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4143007308:function _(id,v){return new IFC4.IfcOccupant(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),new Handle(v[5].value),v[6]);},3588315303:function _(id,v){return new IFC4.IfcOpeningElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3079942009:function _(id,v){return new IFC4.IfcOpeningStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2837617999:function _(id,v){return new IFC4.IfcOutletType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2382730787:function _(id,v){return new IFC4.IfcPerformanceHistory(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),new IFC4.IfcLabel(v[6].value),v[7]);},3566463478:function _(id,v){return new IFC4.IfcPermeableCoveringProperties(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),v[4],v[5],!v[6]?null:new IFC4.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new Handle(v[8].value));},3327091369:function _(id,v){return new IFC4.IfcPermit(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcText(v[8].value));},1158309216:function _(id,v){return new IFC4.IfcPileType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},804291784:function _(id,v){return new IFC4.IfcPipeFittingType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4231323485:function _(id,v){return new IFC4.IfcPipeSegmentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4017108033:function _(id,v){return new IFC4.IfcPlateType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2839578677:function _(id,v){return new IFC4.IfcPolygonalFaceSet(id,new Handle(v[0].value),!v[1]?null:new IFC4.IfcBoolean(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:v[3].map(function(p){return new IFC4.IfcPositiveInteger(p.value);}));},3724593414:function _(id,v){return new IFC4.IfcPolyline(id,v[0].map(function(p){return new Handle(p.value);}));},3740093272:function _(id,v){return new IFC4.IfcPort(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},2744685151:function _(id,v){return new IFC4.IfcProcedure(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),v[7]);},2904328755:function _(id,v){return new IFC4.IfcProjectOrder(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcText(v[8].value));},3651124850:function _(id,v){return new IFC4.IfcProjectionElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1842657554:function _(id,v){return new IFC4.IfcProtectiveDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2250791053:function _(id,v){return new IFC4.IfcPumpType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2893384427:function _(id,v){return new IFC4.IfcRailingType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2324767716:function _(id,v){return new IFC4.IfcRampFlightType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1469900589:function _(id,v){return new IFC4.IfcRampType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},683857671:function _(id,v){return new IFC4.IfcRationalBSplineSurfaceWithKnots(id,new IFC4.IfcInteger(v[0].value),new IFC4.IfcInteger(v[1].value),v[2].map(function(p){return new Handle(p.value);}),v[3],new IFC4.IfcLogical(v[4].value),new IFC4.IfcLogical(v[5].value),new IFC4.IfcLogical(v[6].value),v[7].map(function(p){return new IFC4.IfcInteger(p.value);}),v[8].map(function(p){return new IFC4.IfcInteger(p.value);}),v[9].map(function(p){return new IFC4.IfcParameterValue(p.value);}),v[10].map(function(p){return new IFC4.IfcParameterValue(p.value);}),v[11],v[12].map(function(p){return new IFC4.IfcReal(p.value);}));},3027567501:function _(id,v){return new IFC4.IfcReinforcingElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},964333572:function _(id,v){return new IFC4.IfcReinforcingElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},2320036040:function _(id,v){return new IFC4.IfcReinforcingMesh(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC4.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcPositiveLengthMeasure(v[11].value),!v[12]?null:new IFC4.IfcPositiveLengthMeasure(v[12].value),!v[13]?null:new IFC4.IfcAreaMeasure(v[13].value),!v[14]?null:new IFC4.IfcAreaMeasure(v[14].value),!v[15]?null:new IFC4.IfcPositiveLengthMeasure(v[15].value),!v[16]?null:new IFC4.IfcPositiveLengthMeasure(v[16].value),v[17]);},2310774935:function _(id,v){return new IFC4.IfcReinforcingMeshType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcPositiveLengthMeasure(v[11].value),!v[12]?null:new IFC4.IfcPositiveLengthMeasure(v[12].value),!v[13]?null:new IFC4.IfcPositiveLengthMeasure(v[13].value),!v[14]?null:new IFC4.IfcAreaMeasure(v[14].value),!v[15]?null:new IFC4.IfcAreaMeasure(v[15].value),!v[16]?null:new IFC4.IfcPositiveLengthMeasure(v[16].value),!v[17]?null:new IFC4.IfcPositiveLengthMeasure(v[17].value),!v[18]?null:new IFC4.IfcLabel(v[18].value),!v[19]?null:v[19].map(function(p){return TypeInitialiser(2,p);}));},160246688:function _(id,v){return new IFC4.IfcRelAggregates(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2781568857:function _(id,v){return new IFC4.IfcRoofType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1768891740:function _(id,v){return new IFC4.IfcSanitaryTerminalType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2157484638:function _(id,v){return new IFC4.IfcSeamCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2]);},4074543187:function _(id,v){return new IFC4.IfcShadingDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4097777520:function _(id,v){return new IFC4.IfcSite(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC4.IfcCompoundPlaneAngleMeasure(v[9]),!v[10]?null:new IFC4.IfcCompoundPlaneAngleMeasure(v[10]),!v[11]?null:new IFC4.IfcLengthMeasure(v[11].value),!v[12]?null:new IFC4.IfcLabel(v[12].value),!v[13]?null:new Handle(v[13].value));},2533589738:function _(id,v){return new IFC4.IfcSlabType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1072016465:function _(id,v){return new IFC4.IfcSolarDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3856911033:function _(id,v){return new IFC4.IfcSpace(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8],v[9],!v[10]?null:new IFC4.IfcLengthMeasure(v[10].value));},1305183839:function _(id,v){return new IFC4.IfcSpaceHeaterType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3812236995:function _(id,v){return new IFC4.IfcSpaceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcLabel(v[10].value));},3112655638:function _(id,v){return new IFC4.IfcStackTerminalType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1039846685:function _(id,v){return new IFC4.IfcStairFlightType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},338393293:function _(id,v){return new IFC4.IfcStairType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},682877961:function _(id,v){return new IFC4.IfcStructuralAction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4.IfcBoolean(v[9].value));},1179482911:function _(id,v){return new IFC4.IfcStructuralConnection(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},1004757350:function _(id,v){return new IFC4.IfcStructuralCurveAction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4.IfcBoolean(v[9].value),v[10],v[11]);},4243806635:function _(id,v){return new IFC4.IfcStructuralCurveConnection(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),new Handle(v[8].value));},214636428:function _(id,v){return new IFC4.IfcStructuralCurveMember(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],new Handle(v[8].value));},2445595289:function _(id,v){return new IFC4.IfcStructuralCurveMemberVarying(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],new Handle(v[8].value));},2757150158:function _(id,v){return new IFC4.IfcStructuralCurveReaction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9]);},1807405624:function _(id,v){return new IFC4.IfcStructuralLinearAction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4.IfcBoolean(v[9].value),v[10],v[11]);},1252848954:function _(id,v){return new IFC4.IfcStructuralLoadGroup(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5],v[6],v[7],!v[8]?null:new IFC4.IfcRatioMeasure(v[8].value),!v[9]?null:new IFC4.IfcLabel(v[9].value));},2082059205:function _(id,v){return new IFC4.IfcStructuralPointAction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4.IfcBoolean(v[9].value));},734778138:function _(id,v){return new IFC4.IfcStructuralPointConnection(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value));},1235345126:function _(id,v){return new IFC4.IfcStructuralPointReaction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},2986769608:function _(id,v){return new IFC4.IfcStructuralResultGroup(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),new IFC4.IfcBoolean(v[7].value));},3657597509:function _(id,v){return new IFC4.IfcStructuralSurfaceAction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4.IfcBoolean(v[9].value),v[10],v[11]);},1975003073:function _(id,v){return new IFC4.IfcStructuralSurfaceConnection(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},148013059:function _(id,v){return new IFC4.IfcSubContractResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},3101698114:function _(id,v){return new IFC4.IfcSurfaceFeature(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2315554128:function _(id,v){return new IFC4.IfcSwitchingDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2254336722:function _(id,v){return new IFC4.IfcSystem(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value));},413509423:function _(id,v){return new IFC4.IfcSystemFurnitureElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},5716631:function _(id,v){return new IFC4.IfcTankType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3824725483:function _(id,v){return new IFC4.IfcTendon(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcAreaMeasure(v[11].value),!v[12]?null:new IFC4.IfcForceMeasure(v[12].value),!v[13]?null:new IFC4.IfcPressureMeasure(v[13].value),!v[14]?null:new IFC4.IfcNormalisedRatioMeasure(v[14].value),!v[15]?null:new IFC4.IfcPositiveLengthMeasure(v[15].value),!v[16]?null:new IFC4.IfcPositiveLengthMeasure(v[16].value));},2347447852:function _(id,v){return new IFC4.IfcTendonAnchor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3081323446:function _(id,v){return new IFC4.IfcTendonAnchorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2415094496:function _(id,v){return new IFC4.IfcTendonType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcAreaMeasure(v[11].value),!v[12]?null:new IFC4.IfcPositiveLengthMeasure(v[12].value));},1692211062:function _(id,v){return new IFC4.IfcTransformerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1620046519:function _(id,v){return new IFC4.IfcTransportElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3593883385:function _(id,v){return new IFC4.IfcTrimmedCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}),new IFC4.IfcBoolean(v[3].value),v[4]);},1600972822:function _(id,v){return new IFC4.IfcTubeBundleType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1911125066:function _(id,v){return new IFC4.IfcUnitaryEquipmentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},728799441:function _(id,v){return new IFC4.IfcValveType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2391383451:function _(id,v){return new IFC4.IfcVibrationIsolator(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3313531582:function _(id,v){return new IFC4.IfcVibrationIsolatorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2769231204:function _(id,v){return new IFC4.IfcVirtualElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},926996030:function _(id,v){return new IFC4.IfcVoidingFeature(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1898987631:function _(id,v){return new IFC4.IfcWallType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1133259667:function _(id,v){return new IFC4.IfcWasteTerminalType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4009809668:function _(id,v){return new IFC4.IfcWindowType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],v[10],!v[11]?null:new IFC4.IfcBoolean(v[11].value),!v[12]?null:new IFC4.IfcLabel(v[12].value));},4088093105:function _(id,v){return new IFC4.IfcWorkCalendar(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),v[8]);},1028945134:function _(id,v){return new IFC4.IfcWorkControl(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),new IFC4.IfcDateTime(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:new IFC4.IfcDuration(v[9].value),!v[10]?null:new IFC4.IfcDuration(v[10].value),new IFC4.IfcDateTime(v[11].value),!v[12]?null:new IFC4.IfcDateTime(v[12].value));},4218914973:function _(id,v){return new IFC4.IfcWorkPlan(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),new IFC4.IfcDateTime(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:new IFC4.IfcDuration(v[9].value),!v[10]?null:new IFC4.IfcDuration(v[10].value),new IFC4.IfcDateTime(v[11].value),!v[12]?null:new IFC4.IfcDateTime(v[12].value),v[13]);},3342526732:function _(id,v){return new IFC4.IfcWorkSchedule(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),new IFC4.IfcDateTime(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:new IFC4.IfcDuration(v[9].value),!v[10]?null:new IFC4.IfcDuration(v[10].value),new IFC4.IfcDateTime(v[11].value),!v[12]?null:new IFC4.IfcDateTime(v[12].value),v[13]);},1033361043:function _(id,v){return new IFC4.IfcZone(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value));},3821786052:function _(id,v){return new IFC4.IfcActionRequest(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcText(v[8].value));},1411407467:function _(id,v){return new IFC4.IfcAirTerminalBoxType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3352864051:function _(id,v){return new IFC4.IfcAirTerminalType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1871374353:function _(id,v){return new IFC4.IfcAirToAirHeatRecoveryType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3460190687:function _(id,v){return new IFC4.IfcAsset(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value),!v[11]?null:new Handle(v[11].value),!v[12]?null:new IFC4.IfcDate(v[12].value),!v[13]?null:new Handle(v[13].value));},1532957894:function _(id,v){return new IFC4.IfcAudioVisualApplianceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1967976161:function _(id,v){return new IFC4.IfcBSplineCurve(id,new IFC4.IfcInteger(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2],new IFC4.IfcLogical(v[3].value),new IFC4.IfcLogical(v[4].value));},2461110595:function _(id,v){return new IFC4.IfcBSplineCurveWithKnots(id,new IFC4.IfcInteger(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2],new IFC4.IfcLogical(v[3].value),new IFC4.IfcLogical(v[4].value),v[5].map(function(p){return new IFC4.IfcInteger(p.value);}),v[6].map(function(p){return new IFC4.IfcParameterValue(p.value);}),v[7]);},819618141:function _(id,v){return new IFC4.IfcBeamType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},231477066:function _(id,v){return new IFC4.IfcBoilerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1136057603:function _(id,v){return new IFC4.IfcBoundaryCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4.IfcLogical(v[1].value));},3299480353:function _(id,v){return new IFC4.IfcBuildingElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},2979338954:function _(id,v){return new IFC4.IfcBuildingElementPart(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},39481116:function _(id,v){return new IFC4.IfcBuildingElementPartType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1095909175:function _(id,v){return new IFC4.IfcBuildingElementProxy(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1909888760:function _(id,v){return new IFC4.IfcBuildingElementProxyType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1177604601:function _(id,v){return new IFC4.IfcBuildingSystem(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5],!v[6]?null:new IFC4.IfcLabel(v[6].value));},2188180465:function _(id,v){return new IFC4.IfcBurnerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},395041908:function _(id,v){return new IFC4.IfcCableCarrierFittingType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3293546465:function _(id,v){return new IFC4.IfcCableCarrierSegmentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2674252688:function _(id,v){return new IFC4.IfcCableFittingType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1285652485:function _(id,v){return new IFC4.IfcCableSegmentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2951183804:function _(id,v){return new IFC4.IfcChillerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3296154744:function _(id,v){return new IFC4.IfcChimney(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2611217952:function _(id,v){return new IFC4.IfcCircle(id,new Handle(v[0].value),new IFC4.IfcPositiveLengthMeasure(v[1].value));},1677625105:function _(id,v){return new IFC4.IfcCivilElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},2301859152:function _(id,v){return new IFC4.IfcCoilType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},843113511:function _(id,v){return new IFC4.IfcColumn(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},905975707:function _(id,v){return new IFC4.IfcColumnStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},400855858:function _(id,v){return new IFC4.IfcCommunicationsApplianceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3850581409:function _(id,v){return new IFC4.IfcCompressorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2816379211:function _(id,v){return new IFC4.IfcCondenserType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3898045240:function _(id,v){return new IFC4.IfcConstructionEquipmentResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},1060000209:function _(id,v){return new IFC4.IfcConstructionMaterialResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},488727124:function _(id,v){return new IFC4.IfcConstructionProductResource(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcIdentifier(v[5].value),!v[6]?null:new IFC4.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},335055490:function _(id,v){return new IFC4.IfcCooledBeamType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2954562838:function _(id,v){return new IFC4.IfcCoolingTowerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1973544240:function _(id,v){return new IFC4.IfcCovering(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3495092785:function _(id,v){return new IFC4.IfcCurtainWall(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3961806047:function _(id,v){return new IFC4.IfcDamperType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1335981549:function _(id,v){return new IFC4.IfcDiscreteAccessory(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2635815018:function _(id,v){return new IFC4.IfcDiscreteAccessoryType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1599208980:function _(id,v){return new IFC4.IfcDistributionChamberElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2063403501:function _(id,v){return new IFC4.IfcDistributionControlElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value));},1945004755:function _(id,v){return new IFC4.IfcDistributionElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},3040386961:function _(id,v){return new IFC4.IfcDistributionFlowElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},3041715199:function _(id,v){return new IFC4.IfcDistributionPort(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8],v[9]);},3205830791:function _(id,v){return new IFC4.IfcDistributionSystem(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),v[6]);},395920057:function _(id,v){return new IFC4.IfcDoor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),v[10],v[11],!v[12]?null:new IFC4.IfcLabel(v[12].value));},3242481149:function _(id,v){return new IFC4.IfcDoorStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),v[10],v[11],!v[12]?null:new IFC4.IfcLabel(v[12].value));},869906466:function _(id,v){return new IFC4.IfcDuctFittingType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3760055223:function _(id,v){return new IFC4.IfcDuctSegmentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2030761528:function _(id,v){return new IFC4.IfcDuctSilencerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},663422040:function _(id,v){return new IFC4.IfcElectricApplianceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2417008758:function _(id,v){return new IFC4.IfcElectricDistributionBoardType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},3277789161:function _(id,v){return new IFC4.IfcElectricFlowStorageDeviceType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1534661035:function _(id,v){return new IFC4.IfcElectricGeneratorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1217240411:function _(id,v){return new IFC4.IfcElectricMotorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},712377611:function _(id,v){return new IFC4.IfcElectricTimeControlType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1658829314:function _(id,v){return new IFC4.IfcEnergyConversionDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},2814081492:function _(id,v){return new IFC4.IfcEngine(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3747195512:function _(id,v){return new IFC4.IfcEvaporativeCooler(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},484807127:function _(id,v){return new IFC4.IfcEvaporator(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1209101575:function _(id,v){return new IFC4.IfcExternalSpatialElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcLabel(v[7].value),v[8]);},346874300:function _(id,v){return new IFC4.IfcFanType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1810631287:function _(id,v){return new IFC4.IfcFilterType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4222183408:function _(id,v){return new IFC4.IfcFireSuppressionTerminalType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2058353004:function _(id,v){return new IFC4.IfcFlowController(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},4278956645:function _(id,v){return new IFC4.IfcFlowFitting(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},4037862832:function _(id,v){return new IFC4.IfcFlowInstrumentType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},2188021234:function _(id,v){return new IFC4.IfcFlowMeter(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3132237377:function _(id,v){return new IFC4.IfcFlowMovingDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},987401354:function _(id,v){return new IFC4.IfcFlowSegment(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},707683696:function _(id,v){return new IFC4.IfcFlowStorageDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},2223149337:function _(id,v){return new IFC4.IfcFlowTerminal(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},3508470533:function _(id,v){return new IFC4.IfcFlowTreatmentDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},900683007:function _(id,v){return new IFC4.IfcFooting(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3319311131:function _(id,v){return new IFC4.IfcHeatExchanger(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2068733104:function _(id,v){return new IFC4.IfcHumidifier(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4175244083:function _(id,v){return new IFC4.IfcInterceptor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2176052936:function _(id,v){return new IFC4.IfcJunctionBox(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},76236018:function _(id,v){return new IFC4.IfcLamp(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},629592764:function _(id,v){return new IFC4.IfcLightFixture(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1437502449:function _(id,v){return new IFC4.IfcMedicalDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1073191201:function _(id,v){return new IFC4.IfcMember(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1911478936:function _(id,v){return new IFC4.IfcMemberStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2474470126:function _(id,v){return new IFC4.IfcMotorConnection(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},144952367:function _(id,v){return new IFC4.IfcOuterBoundaryCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4.IfcLogical(v[1].value));},3694346114:function _(id,v){return new IFC4.IfcOutlet(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1687234759:function _(id,v){return new IFC4.IfcPile(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8],v[9]);},310824031:function _(id,v){return new IFC4.IfcPipeFitting(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3612865200:function _(id,v){return new IFC4.IfcPipeSegment(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3171933400:function _(id,v){return new IFC4.IfcPlate(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1156407060:function _(id,v){return new IFC4.IfcPlateStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},738039164:function _(id,v){return new IFC4.IfcProtectiveDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},655969474:function _(id,v){return new IFC4.IfcProtectiveDeviceTrippingUnitType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},90941305:function _(id,v){return new IFC4.IfcPump(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2262370178:function _(id,v){return new IFC4.IfcRailing(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3024970846:function _(id,v){return new IFC4.IfcRamp(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3283111854:function _(id,v){return new IFC4.IfcRampFlight(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1232101972:function _(id,v){return new IFC4.IfcRationalBSplineCurveWithKnots(id,new IFC4.IfcInteger(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2],new IFC4.IfcLogical(v[3].value),new IFC4.IfcLogical(v[4].value),v[5].map(function(p){return new IFC4.IfcInteger(p.value);}),v[6].map(function(p){return new IFC4.IfcParameterValue(p.value);}),v[7],v[8].map(function(p){return new IFC4.IfcReal(p.value);}));},979691226:function _(id,v){return new IFC4.IfcReinforcingBar(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC4.IfcAreaMeasure(v[10].value),!v[11]?null:new IFC4.IfcPositiveLengthMeasure(v[11].value),v[12],v[13]);},2572171363:function _(id,v){return new IFC4.IfcReinforcingBarType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcAreaMeasure(v[11].value),!v[12]?null:new IFC4.IfcPositiveLengthMeasure(v[12].value),v[13],!v[14]?null:new IFC4.IfcLabel(v[14].value),!v[15]?null:v[15].map(function(p){return TypeInitialiser(2,p);}));},2016517767:function _(id,v){return new IFC4.IfcRoof(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3053780830:function _(id,v){return new IFC4.IfcSanitaryTerminal(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1783015770:function _(id,v){return new IFC4.IfcSensorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1329646415:function _(id,v){return new IFC4.IfcShadingDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1529196076:function _(id,v){return new IFC4.IfcSlab(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3127900445:function _(id,v){return new IFC4.IfcSlabElementedCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3027962421:function _(id,v){return new IFC4.IfcSlabStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3420628829:function _(id,v){return new IFC4.IfcSolarDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1999602285:function _(id,v){return new IFC4.IfcSpaceHeater(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1404847402:function _(id,v){return new IFC4.IfcStackTerminal(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},331165859:function _(id,v){return new IFC4.IfcStair(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4252922144:function _(id,v){return new IFC4.IfcStairFlight(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcInteger(v[8].value),!v[9]?null:new IFC4.IfcInteger(v[9].value),!v[10]?null:new IFC4.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4.IfcPositiveLengthMeasure(v[11].value),v[12]);},2515109513:function _(id,v){return new IFC4.IfcStructuralAnalysisModel(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value));},385403989:function _(id,v){return new IFC4.IfcStructuralLoadCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),v[5],v[6],v[7],!v[8]?null:new IFC4.IfcRatioMeasure(v[8].value),!v[9]?null:new IFC4.IfcLabel(v[9].value),!v[10]?null:v[10].map(function(p){return new IFC4.IfcRatioMeasure(p.value);}));},1621171031:function _(id,v){return new IFC4.IfcStructuralPlanarAction(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4.IfcBoolean(v[9].value),v[10],v[11]);},1162798199:function _(id,v){return new IFC4.IfcSwitchingDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},812556717:function _(id,v){return new IFC4.IfcTank(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3825984169:function _(id,v){return new IFC4.IfcTransformer(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3026737570:function _(id,v){return new IFC4.IfcTubeBundle(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3179687236:function _(id,v){return new IFC4.IfcUnitaryControlElementType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4292641817:function _(id,v){return new IFC4.IfcUnitaryEquipment(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4207607924:function _(id,v){return new IFC4.IfcValve(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2391406946:function _(id,v){return new IFC4.IfcWall(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4156078855:function _(id,v){return new IFC4.IfcWallElementedCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3512223829:function _(id,v){return new IFC4.IfcWallStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4237592921:function _(id,v){return new IFC4.IfcWasteTerminal(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3304561284:function _(id,v){return new IFC4.IfcWindow(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),v[10],v[11],!v[12]?null:new IFC4.IfcLabel(v[12].value));},486154966:function _(id,v){return new IFC4.IfcWindowStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),!v[8]?null:new IFC4.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4.IfcPositiveLengthMeasure(v[9].value),v[10],v[11],!v[12]?null:new IFC4.IfcLabel(v[12].value));},2874132201:function _(id,v){return new IFC4.IfcActuatorType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},1634111441:function _(id,v){return new IFC4.IfcAirTerminal(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},177149247:function _(id,v){return new IFC4.IfcAirTerminalBox(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2056796094:function _(id,v){return new IFC4.IfcAirToAirHeatRecovery(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3001207471:function _(id,v){return new IFC4.IfcAlarmType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},277319702:function _(id,v){return new IFC4.IfcAudioVisualAppliance(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},753842376:function _(id,v){return new IFC4.IfcBeam(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2906023776:function _(id,v){return new IFC4.IfcBeamStandardCase(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},32344328:function _(id,v){return new IFC4.IfcBoiler(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2938176219:function _(id,v){return new IFC4.IfcBurner(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},635142910:function _(id,v){return new IFC4.IfcCableCarrierFitting(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3758799889:function _(id,v){return new IFC4.IfcCableCarrierSegment(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1051757585:function _(id,v){return new IFC4.IfcCableFitting(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4217484030:function _(id,v){return new IFC4.IfcCableSegment(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3902619387:function _(id,v){return new IFC4.IfcChiller(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},639361253:function _(id,v){return new IFC4.IfcCoil(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3221913625:function _(id,v){return new IFC4.IfcCommunicationsAppliance(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3571504051:function _(id,v){return new IFC4.IfcCompressor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2272882330:function _(id,v){return new IFC4.IfcCondenser(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},578613899:function _(id,v){return new IFC4.IfcControllerType(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4.IfcLabel(v[7].value),!v[8]?null:new IFC4.IfcLabel(v[8].value),v[9]);},4136498852:function _(id,v){return new IFC4.IfcCooledBeam(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3640358203:function _(id,v){return new IFC4.IfcCoolingTower(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4074379575:function _(id,v){return new IFC4.IfcDamper(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1052013943:function _(id,v){return new IFC4.IfcDistributionChamberElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},562808652:function _(id,v){return new IFC4.IfcDistributionCircuit(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new IFC4.IfcLabel(v[5].value),v[6]);},1062813311:function _(id,v){return new IFC4.IfcDistributionControlElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value));},342316401:function _(id,v){return new IFC4.IfcDuctFitting(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3518393246:function _(id,v){return new IFC4.IfcDuctSegment(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1360408905:function _(id,v){return new IFC4.IfcDuctSilencer(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1904799276:function _(id,v){return new IFC4.IfcElectricAppliance(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},862014818:function _(id,v){return new IFC4.IfcElectricDistributionBoard(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3310460725:function _(id,v){return new IFC4.IfcElectricFlowStorageDevice(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},264262732:function _(id,v){return new IFC4.IfcElectricGenerator(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},402227799:function _(id,v){return new IFC4.IfcElectricMotor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1003880860:function _(id,v){return new IFC4.IfcElectricTimeControl(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3415622556:function _(id,v){return new IFC4.IfcFan(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},819412036:function _(id,v){return new IFC4.IfcFilter(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},1426591983:function _(id,v){return new IFC4.IfcFireSuppressionTerminal(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},182646315:function _(id,v){return new IFC4.IfcFlowInstrument(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},2295281155:function _(id,v){return new IFC4.IfcProtectiveDeviceTrippingUnit(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4086658281:function _(id,v){return new IFC4.IfcSensor(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},630975310:function _(id,v){return new IFC4.IfcUnitaryControlElement(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},4288193352:function _(id,v){return new IFC4.IfcActuator(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},3087945054:function _(id,v){return new IFC4.IfcAlarm(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);},25142252:function _(id,v){return new IFC4.IfcController(id,new IFC4.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4.IfcLabel(v[2].value),!v[3]?null:new IFC4.IfcText(v[3].value),!v[4]?null:new IFC4.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4.IfcIdentifier(v[7].value),v[8]);}};InheritanceDef[2]={618182010:[IFCTELECOMADDRESS,IFCPOSTALADDRESS],411424972:[IFCCOSTVALUE],4037036970:[IFCBOUNDARYNODECONDITIONWARPING,IFCBOUNDARYNODECONDITION,IFCBOUNDARYFACECONDITION,IFCBOUNDARYEDGECONDITION],1387855156:[IFCBOUNDARYNODECONDITIONWARPING],2859738748:[IFCCONNECTIONCURVEGEOMETRY,IFCCONNECTIONVOLUMEGEOMETRY,IFCCONNECTIONSURFACEGEOMETRY,IFCCONNECTIONPOINTECCENTRICITY,IFCCONNECTIONPOINTGEOMETRY],2614616156:[IFCCONNECTIONPOINTECCENTRICITY],1959218052:[IFCOBJECTIVE,IFCMETRIC],1785450214:[IFCMAPCONVERSION],1466758467:[IFCPROJECTEDCRS],4294318154:[IFCDOCUMENTINFORMATION,IFCCLASSIFICATION,IFCLIBRARYINFORMATION],3200245327:[IFCDOCUMENTREFERENCE,IFCCLASSIFICATIONREFERENCE,IFCLIBRARYREFERENCE,IFCEXTERNALLYDEFINEDTEXTFONT,IFCEXTERNALLYDEFINEDSURFACESTYLE,IFCEXTERNALLYDEFINEDHATCHSTYLE],760658860:[IFCMATERIALCONSTITUENTSET,IFCMATERIALCONSTITUENT,IFCMATERIAL,IFCMATERIALPROFILESET,IFCMATERIALPROFILEWITHOFFSETS,IFCMATERIALPROFILE,IFCMATERIALLAYERSET,IFCMATERIALLAYERWITHOFFSETS,IFCMATERIALLAYER],248100487:[IFCMATERIALLAYERWITHOFFSETS],2235152071:[IFCMATERIALPROFILEWITHOFFSETS],1507914824:[IFCMATERIALPROFILESETUSAGETAPERING,IFCMATERIALPROFILESETUSAGE,IFCMATERIALLAYERSETUSAGE],1918398963:[IFCCONVERSIONBASEDUNITWITHOFFSET,IFCCONVERSIONBASEDUNIT,IFCCONTEXTDEPENDENTUNIT,IFCSIUNIT],3701648758:[IFCLOCALPLACEMENT,IFCGRIDPLACEMENT],2483315170:[IFCPHYSICALCOMPLEXQUANTITY,IFCQUANTITYWEIGHT,IFCQUANTITYVOLUME,IFCQUANTITYTIME,IFCQUANTITYLENGTH,IFCQUANTITYCOUNT,IFCQUANTITYAREA,IFCPHYSICALSIMPLEQUANTITY],2226359599:[IFCQUANTITYWEIGHT,IFCQUANTITYVOLUME,IFCQUANTITYTIME,IFCQUANTITYLENGTH,IFCQUANTITYCOUNT,IFCQUANTITYAREA],677532197:[IFCDRAUGHTINGPREDEFINEDCURVEFONT,IFCPREDEFINEDCURVEFONT,IFCDRAUGHTINGPREDEFINEDCOLOUR,IFCPREDEFINEDCOLOUR,IFCTEXTSTYLEFONTMODEL,IFCPREDEFINEDTEXTFONT,IFCPREDEFINEDITEM,IFCINDEXEDCOLOURMAP,IFCCURVESTYLEFONTPATTERN,IFCCURVESTYLEFONTANDSCALING,IFCCURVESTYLEFONT,IFCCOLOURRGB,IFCCOLOURSPECIFICATION,IFCCOLOURRGBLIST,IFCTEXTUREVERTEXLIST,IFCTEXTUREVERTEX,IFCINDEXEDTRIANGLETEXTUREMAP,IFCINDEXEDTEXTUREMAP,IFCTEXTUREMAP,IFCTEXTURECOORDINATEGENERATOR,IFCTEXTURECOORDINATE,IFCTEXTSTYLETEXTMODEL,IFCTEXTSTYLEFORDEFINEDFONT,IFCPIXELTEXTURE,IFCIMAGETEXTURE,IFCBLOBTEXTURE,IFCSURFACETEXTURE,IFCSURFACESTYLEWITHTEXTURES,IFCSURFACESTYLERENDERING,IFCSURFACESTYLESHADING,IFCSURFACESTYLEREFRACTION,IFCSURFACESTYLELIGHTING],2022622350:[IFCPRESENTATIONLAYERWITHSTYLE],3119450353:[IFCFILLAREASTYLE,IFCCURVESTYLE,IFCTEXTSTYLE,IFCSURFACESTYLE],2095639259:[IFCPRODUCTDEFINITIONSHAPE,IFCMATERIALDEFINITIONREPRESENTATION],3958567839:[IFCLSHAPEPROFILEDEF,IFCISHAPEPROFILEDEF,IFCELLIPSEPROFILEDEF,IFCCIRCLEHOLLOWPROFILEDEF,IFCCIRCLEPROFILEDEF,IFCCSHAPEPROFILEDEF,IFCASYMMETRICISHAPEPROFILEDEF,IFCZSHAPEPROFILEDEF,IFCUSHAPEPROFILEDEF,IFCTRAPEZIUMPROFILEDEF,IFCTSHAPEPROFILEDEF,IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF,IFCRECTANGLEPROFILEDEF,IFCPARAMETERIZEDPROFILEDEF,IFCMIRROREDPROFILEDEF,IFCDERIVEDPROFILEDEF,IFCCOMPOSITEPROFILEDEF,IFCCENTERLINEPROFILEDEF,IFCARBITRARYOPENPROFILEDEF,IFCARBITRARYPROFILEDEFWITHVOIDS,IFCARBITRARYCLOSEDPROFILEDEF],986844984:[IFCCOMPLEXPROPERTY,IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE,IFCSIMPLEPROPERTY,IFCPROPERTY,IFCSECTIONREINFORCEMENTPROPERTIES,IFCSECTIONPROPERTIES,IFCREINFORCEMENTBARPROPERTIES,IFCPREDEFINEDPROPERTIES,IFCPROFILEPROPERTIES,IFCMATERIALPROPERTIES,IFCEXTENDEDPROPERTIES,IFCPROPERTYENUMERATION],1076942058:[IFCSTYLEDREPRESENTATION,IFCSTYLEMODEL,IFCTOPOLOGYREPRESENTATION,IFCSHAPEREPRESENTATION,IFCSHAPEMODEL],3377609919:[IFCGEOMETRICREPRESENTATIONSUBCONTEXT,IFCGEOMETRICREPRESENTATIONCONTEXT],3008791417:[IFCMAPPEDITEM,IFCFILLAREASTYLETILES,IFCFILLAREASTYLEHATCHING,IFCFACEBASEDSURFACEMODEL,IFCDIRECTION,IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCSEAMCURVE,IFCINTERSECTIONCURVE,IFCSURFACECURVE,IFCPCURVE,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCLINE,IFCCURVE,IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID,IFCCSGPRIMITIVE3D,IFCREPARAMETRISEDCOMPOSITECURVESEGMENT,IFCCOMPOSITECURVESEGMENT,IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D,IFCCARTESIANTRANSFORMATIONOPERATOR,IFCCARTESIANPOINTLIST3D,IFCCARTESIANPOINTLIST2D,IFCCARTESIANPOINTLIST,IFCBOUNDINGBOX,IFCBOOLEANCLIPPINGRESULT,IFCBOOLEANRESULT,IFCANNOTATIONFILLAREA,IFCVECTOR,IFCTEXTLITERALWITHEXTENT,IFCTEXTLITERAL,IFCPOLYGONALFACESET,IFCTRIANGULATEDFACESET,IFCTESSELLATEDFACESET,IFCINDEXEDPOLYGONALFACEWITHVOIDS,IFCINDEXEDPOLYGONALFACE,IFCTESSELLATEDITEM,IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE,IFCELEMENTARYSURFACE,IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE,IFCSURFACE,IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLIDPOLYGONAL,IFCSWEPTDISKSOLID,IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID,IFCSWEPTAREASOLID,IFCSOLIDMODEL,IFCSHELLBASEDSURFACEMODEL,IFCSECTIONEDSPINE,IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE,IFCPOINT,IFCPLANARBOX,IFCPLANAREXTENT,IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT,IFCPLACEMENT,IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT,IFCLIGHTSOURCE,IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE,IFCHALFSPACESOLID,IFCGEOMETRICCURVESET,IFCGEOMETRICSET,IFCGEOMETRICREPRESENTATIONITEM,IFCPATH,IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP,IFCLOOP,IFCFACEOUTERBOUND,IFCFACEBOUND,IFCADVANCEDFACE,IFCFACESURFACE,IFCFACE,IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE,IFCEDGE,IFCCLOSEDSHELL,IFCOPENSHELL,IFCCONNECTEDFACESET,IFCVERTEXPOINT,IFCVERTEX,IFCTOPOLOGICALREPRESENTATIONITEM,IFCSTYLEDITEM],2439245199:[IFCRESOURCECONSTRAINTRELATIONSHIP,IFCRESOURCEAPPROVALRELATIONSHIP,IFCPROPERTYDEPENDENCYRELATIONSHIP,IFCORGANIZATIONRELATIONSHIP,IFCMATERIALRELATIONSHIP,IFCEXTERNALREFERENCERELATIONSHIP,IFCDOCUMENTINFORMATIONRELATIONSHIP,IFCCURRENCYRELATIONSHIP,IFCAPPROVALRELATIONSHIP],2341007311:[IFCRELDEFINESBYTYPE,IFCRELDEFINESBYTEMPLATE,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINESBYOBJECT,IFCRELDEFINES,IFCRELAGGREGATES,IFCRELVOIDSELEMENT,IFCRELPROJECTSELEMENT,IFCRELNESTS,IFCRELDECOMPOSES,IFCRELDECLARES,IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELINTERFERESELEMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS,IFCRELCONNECTS,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL,IFCRELASSOCIATES,IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUPBYFACTOR,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTOCONTROL,IFCRELASSIGNSTOACTOR,IFCRELASSIGNS,IFCRELATIONSHIP,IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE,IFCPROPERTYTEMPLATE,IFCPROPERTYSETTEMPLATE,IFCPROPERTYTEMPLATEDEFINITION,IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPREDEFINEDPROPERTYSET,IFCELEMENTQUANTITY,IFCQUANTITYSET,IFCPROPERTYSETDEFINITION,IFCPROPERTYDEFINITION,IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBEAMSTANDARDCASE,IFCBEAM,IFCWINDOWSTANDARDCASE,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALLELEMENTEDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLABSTANDARDCASE,IFCSLABELEMENTEDCASE,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATESTANDARDCASE,IFCPLATE,IFCPILE,IFCMEMBERSTANDARDCASE,IFCMEMBER,IFCFOOTING,IFCDOORSTANDARDCASE,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMNSTANDARDCASE,IFCCOLUMN,IFCCHIMNEY,IFCBUILDINGELEMENTPROXY,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCVOIDINGFEATURE,IFCOPENINGSTANDARDCASE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT,IFCPROXY,IFCPRODUCT,IFCPROCEDURE,IFCEVENT,IFCTASK,IFCPROCESS,IFCOBJECT,IFCPROJECTLIBRARY,IFCPROJECT,IFCCONTEXT,IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE,IFCTYPERESOURCE,IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCPILETYPE,IFCMEMBERTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE,IFCTYPEPRODUCT,IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE,IFCTYPEPROCESS,IFCTYPEOBJECT,IFCOBJECTDEFINITION],1054537805:[IFCRESOURCETIME,IFCLAGTIME,IFCEVENTTIME,IFCWORKTIME,IFCTASKTIMERECURRING,IFCTASKTIME],3982875396:[IFCTOPOLOGYREPRESENTATION,IFCSHAPEREPRESENTATION],2273995522:[IFCSLIPPAGECONNECTIONCONDITION,IFCFAILURECONNECTIONCONDITION],2162789131:[IFCSURFACEREINFORCEMENTAREA,IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE,IFCSTRUCTURALLOADSTATIC,IFCSTRUCTURALLOADORRESULT,IFCSTRUCTURALLOADCONFIGURATION],609421318:[IFCSURFACEREINFORCEMENTAREA,IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE,IFCSTRUCTURALLOADSTATIC],2525727697:[IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE],2830218821:[IFCSTYLEDREPRESENTATION],846575682:[IFCSURFACESTYLERENDERING],626085974:[IFCPIXELTEXTURE,IFCIMAGETEXTURE,IFCBLOBTEXTURE],1549132990:[IFCTASKTIMERECURRING],280115917:[IFCINDEXEDTRIANGLETEXTUREMAP,IFCINDEXEDTEXTUREMAP,IFCTEXTUREMAP,IFCTEXTURECOORDINATEGENERATOR],3101149627:[IFCREGULARTIMESERIES,IFCIRREGULARTIMESERIES],1377556343:[IFCPATH,IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP,IFCLOOP,IFCFACEOUTERBOUND,IFCFACEBOUND,IFCADVANCEDFACE,IFCFACESURFACE,IFCFACE,IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE,IFCEDGE,IFCCLOSEDSHELL,IFCOPENSHELL,IFCCONNECTEDFACESET,IFCVERTEXPOINT,IFCVERTEX],2799835756:[IFCVERTEXPOINT],3798115385:[IFCARBITRARYPROFILEDEFWITHVOIDS],1310608509:[IFCCENTERLINEPROFILEDEF],3264961684:[IFCCOLOURRGB],370225590:[IFCCLOSEDSHELL,IFCOPENSHELL],2889183280:[IFCCONVERSIONBASEDUNITWITHOFFSET],3632507154:[IFCMIRROREDPROFILEDEF],3900360178:[IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE],297599258:[IFCPROFILEPROPERTIES,IFCMATERIALPROPERTIES],2556980723:[IFCADVANCEDFACE,IFCFACESURFACE],1809719519:[IFCFACEOUTERBOUND],3008276851:[IFCADVANCEDFACE],3448662350:[IFCGEOMETRICREPRESENTATIONSUBCONTEXT],2453401579:[IFCFILLAREASTYLETILES,IFCFILLAREASTYLEHATCHING,IFCFACEBASEDSURFACEMODEL,IFCDIRECTION,IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCSEAMCURVE,IFCINTERSECTIONCURVE,IFCSURFACECURVE,IFCPCURVE,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCLINE,IFCCURVE,IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID,IFCCSGPRIMITIVE3D,IFCREPARAMETRISEDCOMPOSITECURVESEGMENT,IFCCOMPOSITECURVESEGMENT,IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D,IFCCARTESIANTRANSFORMATIONOPERATOR,IFCCARTESIANPOINTLIST3D,IFCCARTESIANPOINTLIST2D,IFCCARTESIANPOINTLIST,IFCBOUNDINGBOX,IFCBOOLEANCLIPPINGRESULT,IFCBOOLEANRESULT,IFCANNOTATIONFILLAREA,IFCVECTOR,IFCTEXTLITERALWITHEXTENT,IFCTEXTLITERAL,IFCPOLYGONALFACESET,IFCTRIANGULATEDFACESET,IFCTESSELLATEDFACESET,IFCINDEXEDPOLYGONALFACEWITHVOIDS,IFCINDEXEDPOLYGONALFACE,IFCTESSELLATEDITEM,IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE,IFCELEMENTARYSURFACE,IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE,IFCSURFACE,IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLIDPOLYGONAL,IFCSWEPTDISKSOLID,IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID,IFCSWEPTAREASOLID,IFCSOLIDMODEL,IFCSHELLBASEDSURFACEMODEL,IFCSECTIONEDSPINE,IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE,IFCPOINT,IFCPLANARBOX,IFCPLANAREXTENT,IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT,IFCPLACEMENT,IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT,IFCLIGHTSOURCE,IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE,IFCHALFSPACESOLID,IFCGEOMETRICCURVESET,IFCGEOMETRICSET],3590301190:[IFCGEOMETRICCURVESET],812098782:[IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE],1437953363:[IFCINDEXEDTRIANGLETEXTUREMAP],1402838566:[IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT],1520743889:[IFCLIGHTSOURCESPOT],1008929658:[IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP],3079605661:[IFCMATERIALPROFILESETUSAGETAPERING],219451334:[IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBEAMSTANDARDCASE,IFCBEAM,IFCWINDOWSTANDARDCASE,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALLELEMENTEDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLABSTANDARDCASE,IFCSLABELEMENTEDCASE,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATESTANDARDCASE,IFCPLATE,IFCPILE,IFCMEMBERSTANDARDCASE,IFCMEMBER,IFCFOOTING,IFCDOORSTANDARDCASE,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMNSTANDARDCASE,IFCCOLUMN,IFCCHIMNEY,IFCBUILDINGELEMENTPROXY,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCVOIDINGFEATURE,IFCOPENINGSTANDARDCASE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT,IFCPROXY,IFCPRODUCT,IFCPROCEDURE,IFCEVENT,IFCTASK,IFCPROCESS,IFCOBJECT,IFCPROJECTLIBRARY,IFCPROJECT,IFCCONTEXT,IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE,IFCTYPERESOURCE,IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCPILETYPE,IFCMEMBERTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE,IFCTYPEPRODUCT,IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE,IFCTYPEPROCESS,IFCTYPEOBJECT],2529465313:[IFCLSHAPEPROFILEDEF,IFCISHAPEPROFILEDEF,IFCELLIPSEPROFILEDEF,IFCCIRCLEHOLLOWPROFILEDEF,IFCCIRCLEPROFILEDEF,IFCCSHAPEPROFILEDEF,IFCASYMMETRICISHAPEPROFILEDEF,IFCZSHAPEPROFILEDEF,IFCUSHAPEPROFILEDEF,IFCTRAPEZIUMPROFILEDEF,IFCTSHAPEPROFILEDEF,IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF,IFCRECTANGLEPROFILEDEF],2004835150:[IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT],1663979128:[IFCPLANARBOX],2067069095:[IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE],3727388367:[IFCDRAUGHTINGPREDEFINEDCURVEFONT,IFCPREDEFINEDCURVEFONT,IFCDRAUGHTINGPREDEFINEDCOLOUR,IFCPREDEFINEDCOLOUR,IFCTEXTSTYLEFONTMODEL,IFCPREDEFINEDTEXTFONT],3778827333:[IFCSECTIONREINFORCEMENTPROPERTIES,IFCSECTIONPROPERTIES,IFCREINFORCEMENTBARPROPERTIES],1775413392:[IFCTEXTSTYLEFONTMODEL],2598011224:[IFCCOMPLEXPROPERTY,IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE,IFCSIMPLEPROPERTY],1680319473:[IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE,IFCPROPERTYTEMPLATE,IFCPROPERTYSETTEMPLATE,IFCPROPERTYTEMPLATEDEFINITION,IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPREDEFINEDPROPERTYSET,IFCELEMENTQUANTITY,IFCQUANTITYSET,IFCPROPERTYSETDEFINITION],3357820518:[IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPREDEFINEDPROPERTYSET,IFCELEMENTQUANTITY,IFCQUANTITYSET],1482703590:[IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE,IFCPROPERTYTEMPLATE,IFCPROPERTYSETTEMPLATE],2090586900:[IFCELEMENTQUANTITY],3615266464:[IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF],478536968:[IFCRELDEFINESBYTYPE,IFCRELDEFINESBYTEMPLATE,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINESBYOBJECT,IFCRELDEFINES,IFCRELAGGREGATES,IFCRELVOIDSELEMENT,IFCRELPROJECTSELEMENT,IFCRELNESTS,IFCRELDECOMPOSES,IFCRELDECLARES,IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELINTERFERESELEMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS,IFCRELCONNECTS,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL,IFCRELASSOCIATES,IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUPBYFACTOR,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTOCONTROL,IFCRELASSIGNSTOACTOR,IFCRELASSIGNS],3692461612:[IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE],723233188:[IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLIDPOLYGONAL,IFCSWEPTDISKSOLID,IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID,IFCSWEPTAREASOLID],2473145415:[IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION],1597423693:[IFCSTRUCTURALLOADSINGLEFORCEWARPING],2513912981:[IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE,IFCELEMENTARYSURFACE,IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE],2247615214:[IFCSURFACECURVESWEPTAREASOLID,IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID],1260650574:[IFCSWEPTDISKSOLIDPOLYGONAL],230924584:[IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION],901063453:[IFCPOLYGONALFACESET,IFCTRIANGULATEDFACESET,IFCTESSELLATEDFACESET,IFCINDEXEDPOLYGONALFACEWITHVOIDS,IFCINDEXEDPOLYGONALFACE],4282788508:[IFCTEXTLITERALWITHEXTENT],1628702193:[IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE,IFCTYPERESOURCE,IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCPILETYPE,IFCMEMBERTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE,IFCTYPEPRODUCT,IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE,IFCTYPEPROCESS],3736923433:[IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE],2347495698:[IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCPILETYPE,IFCMEMBERTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCDOORSTYLE,IFCWINDOWSTYLE],3698973494:[IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE],2736907675:[IFCBOOLEANCLIPPINGRESULT],4182860854:[IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE],574549367:[IFCCARTESIANPOINTLIST3D,IFCCARTESIANPOINTLIST2D],59481748:[IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D],3749851601:[IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM],3331915920:[IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM],1383045692:[IFCCIRCLEHOLLOWPROFILEDEF],2485617015:[IFCREPARAMETRISEDCOMPOSITECURVESEGMENT],2574617495:[IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE],3419103109:[IFCPROJECTLIBRARY,IFCPROJECT],2506170314:[IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID],2601014836:[IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCSEAMCURVE,IFCINTERSECTIONCURVE,IFCSURFACECURVE,IFCPCURVE,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCLINE],339256511:[IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCPILETYPE,IFCMEMBERTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILDINGELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE],2777663545:[IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE],477187591:[IFCEXTRUDEDAREASOLIDTAPERED],4238390223:[IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE],178912537:[IFCINDEXEDPOLYGONALFACEWITHVOIDS],1425443689:[IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP],3888040117:[IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBEAMSTANDARDCASE,IFCBEAM,IFCWINDOWSTANDARDCASE,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALLELEMENTEDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLABSTANDARDCASE,IFCSLABELEMENTEDCASE,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATESTANDARDCASE,IFCPLATE,IFCPILE,IFCMEMBERSTANDARDCASE,IFCMEMBER,IFCFOOTING,IFCDOORSTANDARDCASE,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMNSTANDARDCASE,IFCCOLUMN,IFCCHIMNEY,IFCBUILDINGELEMENTPROXY,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCVOIDINGFEATURE,IFCOPENINGSTANDARDCASE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT,IFCPROXY,IFCPRODUCT,IFCPROCEDURE,IFCEVENT,IFCTASK,IFCPROCESS],759155922:[IFCDRAUGHTINGPREDEFINEDCOLOUR],2559016684:[IFCDRAUGHTINGPREDEFINEDCURVEFONT],3967405729:[IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES],2945172077:[IFCPROCEDURE,IFCEVENT,IFCTASK],4208778838:[IFCDISTRIBUTIONPORT,IFCPORT,IFCGRID,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBEAMSTANDARDCASE,IFCBEAM,IFCWINDOWSTANDARDCASE,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALLELEMENTEDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLABSTANDARDCASE,IFCSLABELEMENTEDCASE,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATESTANDARDCASE,IFCPLATE,IFCPILE,IFCMEMBERSTANDARDCASE,IFCMEMBER,IFCFOOTING,IFCDOORSTANDARDCASE,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMNSTANDARDCASE,IFCCOLUMN,IFCCHIMNEY,IFCBUILDINGELEMENTPROXY,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCVOIDINGFEATURE,IFCOPENINGSTANDARDCASE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT,IFCPROXY],3521284610:[IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE],3939117080:[IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUPBYFACTOR,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTOCONTROL,IFCRELASSIGNSTOACTOR],1307041759:[IFCRELASSIGNSTOGROUPBYFACTOR],1865459582:[IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL],826625072:[IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELINTERFERESELEMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS],1204542856:[IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS],1638771189:[IFCRELCONNECTSWITHECCENTRICITY],2551354335:[IFCRELAGGREGATES,IFCRELVOIDSELEMENT,IFCRELPROJECTSELEMENT,IFCRELNESTS],693640335:[IFCRELDEFINESBYTYPE,IFCRELDEFINESBYTEMPLATE,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINESBYOBJECT],3451746338:[IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL],3523091289:[IFCRELSPACEBOUNDARY2NDLEVEL],2914609552:[IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE],1856042241:[IFCREVOLVEDAREASOLIDTAPERED],1412071761:[IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING,IFCSPATIALSTRUCTUREELEMENT],710998568:[IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE],2706606064:[IFCSPACE,IFCSITE,IFCBUILDINGSTOREY,IFCBUILDING],3893378262:[IFCSPACETYPE],3544373492:[IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION],3136571912:[IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER],530289379:[IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER],3689010777:[IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION],3979015343:[IFCSTRUCTURALSURFACEMEMBERVARYING],699246055:[IFCSEAMCURVE,IFCINTERSECTIONCURVE],2387106220:[IFCPOLYGONALFACESET,IFCTRIANGULATEDFACESET],2296667514:[IFCOCCUPANT],1635779807:[IFCADVANCEDBREPWITHVOIDS],2887950389:[IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS],167062518:[IFCRATIONALBSPLINESURFACEWITHKNOTS],1260505505:[IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE],1950629157:[IFCBUILDINGELEMENTPROXYTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCPLATETYPE,IFCPILETYPE,IFCMEMBERTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE],3732776249:[IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE],15328376:[IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE],2510884976:[IFCCIRCLE,IFCELLIPSE],2559216714:[IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE],3293443760:[IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM],3256556792:[IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE],3849074793:[IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE],1758889154:[IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBEAMSTANDARDCASE,IFCBEAM,IFCWINDOWSTANDARDCASE,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALLELEMENTEDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLABSTANDARDCASE,IFCSLABELEMENTEDCASE,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATESTANDARDCASE,IFCPLATE,IFCPILE,IFCMEMBERSTANDARDCASE,IFCMEMBER,IFCFOOTING,IFCDOORSTANDARDCASE,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMNSTANDARDCASE,IFCCOLUMN,IFCCHIMNEY,IFCBUILDINGELEMENTPROXY,IFCBUILDINGELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCVOIDINGFEATURE,IFCOPENINGSTANDARDCASE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY],1623761950:[IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCFASTENER],2590856083:[IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCFASTENERTYPE],2107101300:[IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE],2853485674:[IFCEXTERNALSPATIALELEMENT],807026263:[IFCFACETEDBREPWITHVOIDS],2827207264:[IFCSURFACEFEATURE,IFCVOIDINGFEATURE,IFCOPENINGSTANDARDCASE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION],2143335405:[IFCPROJECTIONELEMENT],1287392070:[IFCVOIDINGFEATURE,IFCOPENINGSTANDARDCASE,IFCOPENINGELEMENT],3907093117:[IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE],3198132628:[IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE],1482959167:[IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE],1834744321:[IFCDUCTSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE],1339347760:[IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE],2297155007:[IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMEDICALDEVICETYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE],3009222698:[IFCFILTERTYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE],263784265:[IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE],2706460486:[IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY],3588315303:[IFCOPENINGSTANDARDCASE],3740093272:[IFCDISTRIBUTIONPORT],3027567501:[IFCREINFORCINGBAR,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH],964333572:[IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE],682877961:[IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION],1179482911:[IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION],1004757350:[IFCSTRUCTURALLINEARACTION],214636428:[IFCSTRUCTURALCURVEMEMBERVARYING],1252848954:[IFCSTRUCTURALLOADCASE],3657597509:[IFCSTRUCTURALPLANARACTION],2254336722:[IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILDINGSYSTEM,IFCZONE],1028945134:[IFCWORKSCHEDULE,IFCWORKPLAN],1967976161:[IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS],2461110595:[IFCRATIONALBSPLINECURVEWITHKNOTS],1136057603:[IFCOUTERBOUNDARYCURVE],3299480353:[IFCBEAMSTANDARDCASE,IFCBEAM,IFCWINDOWSTANDARDCASE,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALLELEMENTEDCASE,IFCWALL,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLABSTANDARDCASE,IFCSLABELEMENTEDCASE,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCPLATESTANDARDCASE,IFCPLATE,IFCPILE,IFCMEMBERSTANDARDCASE,IFCMEMBER,IFCFOOTING,IFCDOORSTANDARDCASE,IFCDOOR,IFCCURTAINWALL,IFCCOVERING,IFCCOLUMNSTANDARDCASE,IFCCOLUMN,IFCCHIMNEY,IFCBUILDINGELEMENTPROXY],843113511:[IFCCOLUMNSTANDARDCASE],2063403501:[IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE],1945004755:[IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT],3040386961:[IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE],3205830791:[IFCDISTRIBUTIONCIRCUIT],395920057:[IFCDOORSTANDARDCASE],1658829314:[IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE],2058353004:[IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER],4278956645:[IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX],3132237377:[IFCFAN,IFCCOMPRESSOR,IFCPUMP],987401354:[IFCDUCTSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT],707683696:[IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK],2223149337:[IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSANITARYTERMINAL,IFCOUTLET,IFCMEDICALDEVICE,IFCLIGHTFIXTURE,IFCLAMP],3508470533:[IFCFILTER,IFCDUCTSILENCER,IFCINTERCEPTOR],1073191201:[IFCMEMBERSTANDARDCASE],3171933400:[IFCPLATESTANDARDCASE],1529196076:[IFCSLABSTANDARDCASE,IFCSLABELEMENTEDCASE],2391406946:[IFCWALLSTANDARDCASE,IFCWALLELEMENTEDCASE],3304561284:[IFCWINDOWSTANDARDCASE],753842376:[IFCBEAMSTANDARDCASE],1062813311:[IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT]};InversePropertyDef[2]={3630933823:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],618182010:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],411424972:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],130549933:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["ApprovedObjects",IFCRELASSOCIATESAPPROVAL,5,true],["ApprovedResources",IFCRESOURCEAPPROVALRELATIONSHIP,3,true],["IsRelatedWith",IFCAPPROVALRELATIONSHIP,3,true],["Relates",IFCAPPROVALRELATIONSHIP,2,true]],1959218052:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PropertiesForConstraint",IFCRESOURCECONSTRAINTRELATIONSHIP,2,true]],1466758467:[["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],602808272:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],3200245327:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],2242383968:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],1040185647:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],3548104201:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],852622518:[["PartOfW",IFCGRID,9,true],["PartOfV",IFCGRID,8,true],["PartOfU",IFCGRID,7,true],["HasIntersections",IFCVIRTUALGRIDINTERSECTION,0,true]],2655187982:[["LibraryInfoForObjects",IFCRELASSOCIATESLIBRARY,5,true],["HasLibraryReferences",IFCLIBRARYREFERENCE,5,true]],3452421091:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true],["LibraryRefForObjects",IFCRELASSOCIATESLIBRARY,5,true]],760658860:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],248100487:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialLayerSet",IFCMATERIALLAYERSET,0,false]],3303938423:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],1847252529:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialLayerSet",IFCMATERIALLAYERSET,0,false]],2235152071:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialProfileSet",IFCMATERIALPROFILESET,2,false]],164193824:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],552965576:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialProfileSet",IFCMATERIALPROFILESET,2,false]],1507914824:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3368373690:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PropertiesForConstraint",IFCRESOURCECONSTRAINTRELATIONSHIP,2,true]],3701648758:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCLOCALPLACEMENT,0,true]],2251480897:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PropertiesForConstraint",IFCRESOURCECONSTRAINTRELATIONSHIP,2,true]],4251960020:[["IsRelatedBy",IFCORGANIZATIONRELATIONSHIP,3,true],["Relates",IFCORGANIZATIONRELATIONSHIP,2,true],["Engages",IFCPERSONANDORGANIZATION,1,true]],2077209135:[["EngagedIn",IFCPERSONANDORGANIZATION,0,true]],2483315170:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2226359599:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],3355820592:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],3958567839:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3843373140:[["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],986844984:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],3710013099:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2044713172:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2093928680:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],931644368:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],3252649465:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2405470396:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],825690147:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],1076942058:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],3377609919:[["RepresentationsInContext",IFCREPRESENTATION,0,true]],3008791417:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1660063152:[["HasShapeAspects",IFCSHAPEASPECT,4,true],["MapUsage",IFCMAPPEDITEM,0,true]],3982875396:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],4240577450:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],2830218821:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],3958052878:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3049322572:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],626085974:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],912023232:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],3101149627:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1377556343:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1735638870:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],2799835756:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1907098498:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3798115385:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1310608509:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2705031697:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],616511568:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],3150382593:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],747523909:[["ClassificationForObjects",IFCRELASSOCIATESCLASSIFICATION,5,true],["HasReferences",IFCCLASSIFICATIONREFERENCE,3,true]],647927063:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true],["ClassificationRefForObjects",IFCRELASSOCIATESCLASSIFICATION,5,true],["HasReferences",IFCCLASSIFICATIONREFERENCE,3,true]],1485152156:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],370225590:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3050246964:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2889183280:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2713554722:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],3632507154:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1154170062:[["DocumentInfoForObjects",IFCRELASSOCIATESDOCUMENT,5,true],["HasDocumentReferences",IFCDOCUMENTREFERENCE,4,true],["IsPointedTo",IFCDOCUMENTINFORMATIONRELATIONSHIP,3,true],["IsPointer",IFCDOCUMENTINFORMATIONRELATIONSHIP,2,true]],3732053477:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true],["DocumentRefForObjects",IFCRELASSOCIATESDOCUMENT,5,true]],3900360178:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],476780140:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],297599258:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2556980723:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasTextureMaps",IFCTEXTUREMAP,2,true]],1809719519:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],803316827:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3008276851:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasTextureMaps",IFCTEXTUREMAP,2,true]],3448662350:[["RepresentationsInContext",IFCREPRESENTATION,0,true],["HasSubContexts",IFCGEOMETRICREPRESENTATIONSUBCONTEXT,6,true],["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],2453401579:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4142052618:[["RepresentationsInContext",IFCREPRESENTATION,0,true],["HasSubContexts",IFCGEOMETRICREPRESENTATIONSUBCONTEXT,6,true],["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],3590301190:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],178086475:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCLOCALPLACEMENT,0,true]],812098782:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3905492369:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],3741457305:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1402838566:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],125510826:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2604431987:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4266656042:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1520743889:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3422422726:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2624227202:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCLOCALPLACEMENT,0,true]],1008929658:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2347385850:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1838606355:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["HasRepresentation",IFCMATERIALDEFINITIONREPRESENTATION,3,true],["IsRelatedWith",IFCMATERIALRELATIONSHIP,3,true],["RelatesTo",IFCMATERIALRELATIONSHIP,2,true]],3708119e3:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialConstituentSet",IFCMATERIALCONSTITUENTSET,2,false]],2852063980:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],1303795690:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3079605661:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3404854881:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3265635763:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2998442950:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],219451334:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true]],2665983363:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1029017970:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2529465313:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2519244187:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3021840470:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],597895409:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],2004835150:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1663979128:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2067069095:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4022376103:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1423911732:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2924175390:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2775532180:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3778827333:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],673634403:[["ShapeOfProduct",IFCPRODUCT,6,true],["HasShapeAspects",IFCSHAPEASPECT,4,true]],2802850158:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2598011224:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],1680319473:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true]],3357820518:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],1482703590:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true]],2090586900:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],3615266464:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3413951693:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1580146022:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2778083089:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2042790032:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],4165799628:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1509187699:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4124623270:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3692461612:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],723233188:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2233826070:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2513912981:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2247615214:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1260650574:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1096409881:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],230924584:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3071757647:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],901063453:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4282788508:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3124975700:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2715220739:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1628702193:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true]],3736923433:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2347495698:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3698973494:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],427810014:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1417489154:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2759199220:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1299126871:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2543172580:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3406155212:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasTextureMaps",IFCTEXTUREMAP,2,true]],669184980:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3207858831:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],4261334040:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3125803723:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2740243338:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2736907675:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4182860854:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2581212453:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2713105998:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2898889636:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1123145078:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],574549367:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1675464909:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2059837836:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],59481748:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3749851601:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3486308946:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3331915920:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1416205885:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1383045692:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2205249479:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2542286263:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],2485617015:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["UsingCurves",IFCCOMPOSITECURVE,0,true]],2574617495:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],3419103109:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Declares",IFCRELDECLARES,4,true]],1815067380:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],2506170314:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2147822146:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2601014836:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2827736869:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2629017746:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],32440307:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],526551008:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1472233963:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1883228015:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],339256511:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2777663545:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2835456948:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],4024345920:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],477187591:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2804161546:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2047409740:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],374418227:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],315944413:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2652556860:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4238390223:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1268542332:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4095422895:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],987898635:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1484403080:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],178912537:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["ToFaceSet",IFCPOLYGONALFACESET,2,true]],2294589976:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["ToFaceSet",IFCPOLYGONALFACESET,2,true]],572779678:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],428585644:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1281925730:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1425443689:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3888040117:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true]],3388369263:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3505215534:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1682466193:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],603570806:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],220341763:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3967405729:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],569719735:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2945172077:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],4208778838:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],103090709:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Declares",IFCRELDECLARES,4,true]],653396225:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Declares",IFCRELDECLARES,4,true]],871118103:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],4166981789:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],2752243245:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],941946838:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],1451395588:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],492091185:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Defines",IFCRELDEFINESBYTEMPLATE,5,true]],3650150729:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],110355661:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],3521284610:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["PartOfComplexTemplate",IFCCOMPLEXPROPERTYTEMPLATE,6,true],["PartOfPsetTemplate",IFCPROPERTYSETTEMPLATE,6,true]],3219374653:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2770003689:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2798486643:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3454111270:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3765753017:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],3523091289:[["InnerBoundaries",IFCRELSPACEBOUNDARY1STLEVEL,9,true]],1521410863:[["InnerBoundaries",IFCRELSPACEBOUNDARY1STLEVEL,9,true],["Corresponds",IFCRELSPACEBOUNDARY2NDLEVEL,10,true]],816062949:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["UsingCurves",IFCCOMPOSITECURVE,0,true]],2914609552:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1856042241:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3243963512:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4158566097:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3626867408:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3663146110:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["PartOfComplexTemplate",IFCCOMPLEXPROPERTYTEMPLATE,6,true],["PartOfPsetTemplate",IFCPROPERTYSETTEMPLATE,6,true]],1412071761:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true]],710998568:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2706606064:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true]],3893378262:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],463610769:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true]],2481509218:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],451544542:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4015995234:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3544373492:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],3136571912:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true]],530289379:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],3689010777:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],3979015343:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2218152070:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],603775116:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],4095615324:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],699246055:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2028607225:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2809605785:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4124788165:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1580310250:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3473067441:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],3206491090:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2387106220:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasColours",IFCINDEXEDCOLOURMAP,0,true],["HasTextures",IFCINDEXEDTEXTUREMAP,1,true]],1935646853:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2097647324:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2916149573:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasColours",IFCINDEXEDCOLOURMAP,0,true],["HasTextures",IFCINDEXEDTEXTUREMAP,1,true]],336235671:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],512836454:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],2296667514:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsActingUpon",IFCRELASSIGNSTOACTOR,6,true]],1635779807:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2603310189:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1674181508:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2887950389:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],167062518:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1334484129:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3649129432:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1260505505:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4031249490:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true]],1950629157:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3124254112:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true]],2197970202:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2937912522:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3893394355:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],300633059:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3875453745:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["PartOfComplexTemplate",IFCCOMPLEXPROPERTYTEMPLATE,6,true],["PartOfPsetTemplate",IFCPROPERTYSETTEMPLATE,6,true]],3732776249:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],15328376:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2510884976:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2185764099:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],4105962743:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1525564444:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],2559216714:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],3293443760:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3895139033:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1419761937:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1916426348:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3295246426:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1457835157:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1213902940:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3256556792:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3849074793:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2963535650:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],1714330368:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],2323601079:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1758889154:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],4123344466:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2397081782:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1623761950:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2590856083:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1704287377:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2107101300:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],132023988:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3174744832:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3390157468:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4148101412:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2853485674:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true]],807026263:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3737207727:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],647756555:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2489546625:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2827207264:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2143335405:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["ProjectsElements",IFCRELPROJECTSELEMENT,5,false]],1287392070:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],3907093117:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3198132628:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3815607619:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1482959167:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1834744321:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1339347760:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2297155007:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3009222698:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1893162501:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],263784265:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],1509553395:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3493046030:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3009204131:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2706460486:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true]],1251058090:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1806887404:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2571569899:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3946677679:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3113134337:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2391368822:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true]],4288270099:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3827777499:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1051575348:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1161773419:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],377706215:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2108223431:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1114901282:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3181161470:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],977012517:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4143007308:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsActingUpon",IFCRELASSIGNSTOACTOR,6,true]],3588315303:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false],["HasFillings",IFCRELFILLSELEMENT,4,true]],3079942009:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false],["HasFillings",IFCRELFILLSELEMENT,4,true]],2837617999:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2382730787:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3566463478:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],3327091369:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1158309216:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],804291784:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4231323485:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4017108033:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2839578677:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasColours",IFCINDEXEDCOLOURMAP,0,true],["HasTextures",IFCINDEXEDTEXTUREMAP,1,true]],3724593414:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3740093272:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedIn",IFCRELCONNECTSPORTTOELEMENT,4,true],["ConnectedFrom",IFCRELCONNECTSPORTS,5,true],["ConnectedTo",IFCRELCONNECTSPORTS,4,true]],2744685151:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2904328755:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3651124850:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["ProjectsElements",IFCRELPROJECTSELEMENT,5,false]],1842657554:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2250791053:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2893384427:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2324767716:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1469900589:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],683857671:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3027567501:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],964333572:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2320036040:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2310774935:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2781568857:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1768891740:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2157484638:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4074543187:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4097777520:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true]],2533589738:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1072016465:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3856911033:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["HasCoverings",IFCRELCOVERSSPACES,4,true],["BoundedBy",IFCRELSPACEBOUNDARY,4,true]],1305183839:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3812236995:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3112655638:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1039846685:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],338393293:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],682877961:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1179482911:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],1004757350:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],4243806635:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],214636428:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2445595289:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2757150158:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1807405624:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1252848954:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["SourceOfResultGroup",IFCSTRUCTURALRESULTGROUP,6,true],["LoadGroupFor",IFCSTRUCTURALANALYSISMODEL,7,true]],2082059205:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],734778138:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],1235345126:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],2986769608:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ResultGroupFor",IFCSTRUCTURALANALYSISMODEL,8,true]],3657597509:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1975003073:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],148013059:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],3101698114:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2315554128:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2254336722:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],413509423:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],5716631:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3824725483:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2347447852:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3081323446:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2415094496:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1692211062:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1620046519:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3593883385:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1600972822:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1911125066:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],728799441:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2391383451:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3313531582:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2769231204:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],926996030:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],1898987631:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1133259667:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4009809668:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4088093105:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1028945134:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],4218914973:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3342526732:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1033361043:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],3821786052:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1411407467:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3352864051:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1871374353:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3460190687:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true]],1532957894:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1967976161:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2461110595:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],819618141:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],231477066:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1136057603:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3299480353:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2979338954:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],39481116:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1095909175:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],1909888760:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1177604601:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],2188180465:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],395041908:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3293546465:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2674252688:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1285652485:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2951183804:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3296154744:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2611217952:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1677625105:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2301859152:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],843113511:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],905975707:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],400855858:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3850581409:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2816379211:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3898045240:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1060000209:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],488727124:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],335055490:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2954562838:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1973544240:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["CoversSpaces",IFCRELCOVERSSPACES,5,true],["CoversElements",IFCRELCOVERSBLDGELEMENTS,5,true]],3495092785:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3961806047:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1335981549:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2635815018:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1599208980:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2063403501:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1945004755:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true]],3040386961:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3041715199:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainedIn",IFCRELCONNECTSPORTTOELEMENT,4,true],["ConnectedFrom",IFCRELCONNECTSPORTS,5,true],["ConnectedTo",IFCRELCONNECTSPORTS,4,true]],3205830791:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],395920057:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3242481149:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],869906466:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3760055223:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2030761528:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],663422040:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2417008758:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3277789161:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1534661035:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1217240411:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],712377611:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1658829314:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2814081492:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3747195512:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],484807127:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1209101575:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["BoundedBy",IFCRELSPACEBOUNDARY,4,true]],346874300:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1810631287:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4222183408:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2058353004:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4278956645:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4037862832:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2188021234:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3132237377:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],987401354:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],707683696:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2223149337:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3508470533:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],900683007:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3319311131:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2068733104:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4175244083:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2176052936:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],76236018:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],629592764:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1437502449:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1073191201:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],1911478936:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2474470126:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],144952367:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3694346114:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1687234759:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],310824031:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3612865200:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3171933400:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],1156407060:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],738039164:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],655969474:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],90941305:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2262370178:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3024970846:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3283111854:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],1232101972:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],979691226:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2572171363:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2016517767:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3053780830:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1783015770:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1329646415:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],1529196076:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3127900445:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3027962421:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3420628829:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1999602285:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1404847402:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],331165859:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],4252922144:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2515109513:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],385403989:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["SourceOfResultGroup",IFCSTRUCTURALRESULTGROUP,6,true],["LoadGroupFor",IFCSTRUCTURALANALYSISMODEL,7,true]],1621171031:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1162798199:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],812556717:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3825984169:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3026737570:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3179687236:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4292641817:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4207607924:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2391406946:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],4156078855:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],3512223829:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],4237592921:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3304561284:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],486154966:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2874132201:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1634111441:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],177149247:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2056796094:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3001207471:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],277319702:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],753842376:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],2906023776:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true]],32344328:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2938176219:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],635142910:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3758799889:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1051757585:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4217484030:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3902619387:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],639361253:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3221913625:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3571504051:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2272882330:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],578613899:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4136498852:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3640358203:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4074379575:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1052013943:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],562808652:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true]],1062813311:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],342316401:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3518393246:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1360408905:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1904799276:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],862014818:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3310460725:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],264262732:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],402227799:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1003880860:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3415622556:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],819412036:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1426591983:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],182646315:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],2295281155:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],4086658281:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],630975310:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],4288193352:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],3087945054:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],25142252:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]]};Constructors[2]={3630933823:function _(ID,a){return new IFC4.IfcActorRole(ID,a[0],a[1],a[2]);},618182010:function _(ID,a){return new IFC4.IfcAddress(ID,a[0],a[1],a[2]);},639542469:function _(ID,a){return new IFC4.IfcApplication(ID,a[0],a[1],a[2],a[3]);},411424972:function _(ID,a){return new IFC4.IfcAppliedValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},130549933:function _(ID,a){return new IFC4.IfcApproval(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4037036970:function _(ID,a){return new IFC4.IfcBoundaryCondition(ID,a[0]);},1560379544:function _(ID,a){return new IFC4.IfcBoundaryEdgeCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3367102660:function _(ID,a){return new IFC4.IfcBoundaryFaceCondition(ID,a[0],a[1],a[2],a[3]);},1387855156:function _(ID,a){return new IFC4.IfcBoundaryNodeCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2069777674:function _(ID,a){return new IFC4.IfcBoundaryNodeConditionWarping(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2859738748:function _(ID,_65){return new IFC4.IfcConnectionGeometry(ID);},2614616156:function _(ID,a){return new IFC4.IfcConnectionPointGeometry(ID,a[0],a[1]);},2732653382:function _(ID,a){return new IFC4.IfcConnectionSurfaceGeometry(ID,a[0],a[1]);},775493141:function _(ID,a){return new IFC4.IfcConnectionVolumeGeometry(ID,a[0],a[1]);},1959218052:function _(ID,a){return new IFC4.IfcConstraint(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1785450214:function _(ID,a){return new IFC4.IfcCoordinateOperation(ID,a[0],a[1]);},1466758467:function _(ID,a){return new IFC4.IfcCoordinateReferenceSystem(ID,a[0],a[1],a[2],a[3]);},602808272:function _(ID,a){return new IFC4.IfcCostValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1765591967:function _(ID,a){return new IFC4.IfcDerivedUnit(ID,a[0],a[1],a[2]);},1045800335:function _(ID,a){return new IFC4.IfcDerivedUnitElement(ID,a[0],a[1]);},2949456006:function _(ID,a){return new IFC4.IfcDimensionalExponents(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},4294318154:function _(ID,_66){return new IFC4.IfcExternalInformation(ID);},3200245327:function _(ID,a){return new IFC4.IfcExternalReference(ID,a[0],a[1],a[2]);},2242383968:function _(ID,a){return new IFC4.IfcExternallyDefinedHatchStyle(ID,a[0],a[1],a[2]);},1040185647:function _(ID,a){return new IFC4.IfcExternallyDefinedSurfaceStyle(ID,a[0],a[1],a[2]);},3548104201:function _(ID,a){return new IFC4.IfcExternallyDefinedTextFont(ID,a[0],a[1],a[2]);},852622518:function _(ID,a){return new IFC4.IfcGridAxis(ID,a[0],a[1],a[2]);},3020489413:function _(ID,a){return new IFC4.IfcIrregularTimeSeriesValue(ID,a[0],a[1]);},2655187982:function _(ID,a){return new IFC4.IfcLibraryInformation(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3452421091:function _(ID,a){return new IFC4.IfcLibraryReference(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4162380809:function _(ID,a){return new IFC4.IfcLightDistributionData(ID,a[0],a[1],a[2]);},1566485204:function _(ID,a){return new IFC4.IfcLightIntensityDistribution(ID,a[0],a[1]);},3057273783:function _(ID,a){return new IFC4.IfcMapConversion(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1847130766:function _(ID,a){return new IFC4.IfcMaterialClassificationRelationship(ID,a[0],a[1]);},760658860:function _(ID,_67){return new IFC4.IfcMaterialDefinition(ID);},248100487:function _(ID,a){return new IFC4.IfcMaterialLayer(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3303938423:function _(ID,a){return new IFC4.IfcMaterialLayerSet(ID,a[0],a[1],a[2]);},1847252529:function _(ID,a){return new IFC4.IfcMaterialLayerWithOffsets(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2199411900:function _(ID,a){return new IFC4.IfcMaterialList(ID,a[0]);},2235152071:function _(ID,a){return new IFC4.IfcMaterialProfile(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},164193824:function _(ID,a){return new IFC4.IfcMaterialProfileSet(ID,a[0],a[1],a[2],a[3]);},552965576:function _(ID,a){return new IFC4.IfcMaterialProfileWithOffsets(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1507914824:function _(ID,_68){return new IFC4.IfcMaterialUsageDefinition(ID);},2597039031:function _(ID,a){return new IFC4.IfcMeasureWithUnit(ID,a[0],a[1]);},3368373690:function _(ID,a){return new IFC4.IfcMetric(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2706619895:function _(ID,a){return new IFC4.IfcMonetaryUnit(ID,a[0]);},1918398963:function _(ID,a){return new IFC4.IfcNamedUnit(ID,a[0],a[1]);},3701648758:function _(ID,_69){return new IFC4.IfcObjectPlacement(ID);},2251480897:function _(ID,a){return new IFC4.IfcObjective(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4251960020:function _(ID,a){return new IFC4.IfcOrganization(ID,a[0],a[1],a[2],a[3],a[4]);},1207048766:function _(ID,a){return new IFC4.IfcOwnerHistory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2077209135:function _(ID,a){return new IFC4.IfcPerson(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},101040310:function _(ID,a){return new IFC4.IfcPersonAndOrganization(ID,a[0],a[1],a[2]);},2483315170:function _(ID,a){return new IFC4.IfcPhysicalQuantity(ID,a[0],a[1]);},2226359599:function _(ID,a){return new IFC4.IfcPhysicalSimpleQuantity(ID,a[0],a[1],a[2]);},3355820592:function _(ID,a){return new IFC4.IfcPostalAddress(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},677532197:function _(ID,_70){return new IFC4.IfcPresentationItem(ID);},2022622350:function _(ID,a){return new IFC4.IfcPresentationLayerAssignment(ID,a[0],a[1],a[2],a[3]);},1304840413:function _(ID,a){return new IFC4.IfcPresentationLayerWithStyle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3119450353:function _(ID,a){return new IFC4.IfcPresentationStyle(ID,a[0]);},2417041796:function _(ID,a){return new IFC4.IfcPresentationStyleAssignment(ID,a[0]);},2095639259:function _(ID,a){return new IFC4.IfcProductRepresentation(ID,a[0],a[1],a[2]);},3958567839:function _(ID,a){return new IFC4.IfcProfileDef(ID,a[0],a[1]);},3843373140:function _(ID,a){return new IFC4.IfcProjectedCRS(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},986844984:function _(ID,_71){return new IFC4.IfcPropertyAbstraction(ID);},3710013099:function _(ID,a){return new IFC4.IfcPropertyEnumeration(ID,a[0],a[1],a[2]);},2044713172:function _(ID,a){return new IFC4.IfcQuantityArea(ID,a[0],a[1],a[2],a[3],a[4]);},2093928680:function _(ID,a){return new IFC4.IfcQuantityCount(ID,a[0],a[1],a[2],a[3],a[4]);},931644368:function _(ID,a){return new IFC4.IfcQuantityLength(ID,a[0],a[1],a[2],a[3],a[4]);},3252649465:function _(ID,a){return new IFC4.IfcQuantityTime(ID,a[0],a[1],a[2],a[3],a[4]);},2405470396:function _(ID,a){return new IFC4.IfcQuantityVolume(ID,a[0],a[1],a[2],a[3],a[4]);},825690147:function _(ID,a){return new IFC4.IfcQuantityWeight(ID,a[0],a[1],a[2],a[3],a[4]);},3915482550:function _(ID,a){return new IFC4.IfcRecurrencePattern(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2433181523:function _(ID,a){return new IFC4.IfcReference(ID,a[0],a[1],a[2],a[3],a[4]);},1076942058:function _(ID,a){return new IFC4.IfcRepresentation(ID,a[0],a[1],a[2],a[3]);},3377609919:function _(ID,a){return new IFC4.IfcRepresentationContext(ID,a[0],a[1]);},3008791417:function _(ID,_72){return new IFC4.IfcRepresentationItem(ID);},1660063152:function _(ID,a){return new IFC4.IfcRepresentationMap(ID,a[0],a[1]);},2439245199:function _(ID,a){return new IFC4.IfcResourceLevelRelationship(ID,a[0],a[1]);},2341007311:function _(ID,a){return new IFC4.IfcRoot(ID,a[0],a[1],a[2],a[3]);},448429030:function _(ID,a){return new IFC4.IfcSIUnit(ID,a[0],a[1],a[2]);},1054537805:function _(ID,a){return new IFC4.IfcSchedulingTime(ID,a[0],a[1],a[2]);},867548509:function _(ID,a){return new IFC4.IfcShapeAspect(ID,a[0],a[1],a[2],a[3],a[4]);},3982875396:function _(ID,a){return new IFC4.IfcShapeModel(ID,a[0],a[1],a[2],a[3]);},4240577450:function _(ID,a){return new IFC4.IfcShapeRepresentation(ID,a[0],a[1],a[2],a[3]);},2273995522:function _(ID,a){return new IFC4.IfcStructuralConnectionCondition(ID,a[0]);},2162789131:function _(ID,a){return new IFC4.IfcStructuralLoad(ID,a[0]);},3478079324:function _(ID,a){return new IFC4.IfcStructuralLoadConfiguration(ID,a[0],a[1],a[2]);},609421318:function _(ID,a){return new IFC4.IfcStructuralLoadOrResult(ID,a[0]);},2525727697:function _(ID,a){return new IFC4.IfcStructuralLoadStatic(ID,a[0]);},3408363356:function _(ID,a){return new IFC4.IfcStructuralLoadTemperature(ID,a[0],a[1],a[2],a[3]);},2830218821:function _(ID,a){return new IFC4.IfcStyleModel(ID,a[0],a[1],a[2],a[3]);},3958052878:function _(ID,a){return new IFC4.IfcStyledItem(ID,a[0],a[1],a[2]);},3049322572:function _(ID,a){return new IFC4.IfcStyledRepresentation(ID,a[0],a[1],a[2],a[3]);},2934153892:function _(ID,a){return new IFC4.IfcSurfaceReinforcementArea(ID,a[0],a[1],a[2],a[3]);},1300840506:function _(ID,a){return new IFC4.IfcSurfaceStyle(ID,a[0],a[1],a[2]);},3303107099:function _(ID,a){return new IFC4.IfcSurfaceStyleLighting(ID,a[0],a[1],a[2],a[3]);},1607154358:function _(ID,a){return new IFC4.IfcSurfaceStyleRefraction(ID,a[0],a[1]);},846575682:function _(ID,a){return new IFC4.IfcSurfaceStyleShading(ID,a[0],a[1]);},1351298697:function _(ID,a){return new IFC4.IfcSurfaceStyleWithTextures(ID,a[0]);},626085974:function _(ID,a){return new IFC4.IfcSurfaceTexture(ID,a[0],a[1],a[2],a[3],a[4]);},985171141:function _(ID,a){return new IFC4.IfcTable(ID,a[0],a[1],a[2]);},2043862942:function _(ID,a){return new IFC4.IfcTableColumn(ID,a[0],a[1],a[2],a[3],a[4]);},531007025:function _(ID,a){return new IFC4.IfcTableRow(ID,a[0],a[1]);},1549132990:function _(ID,a){return new IFC4.IfcTaskTime(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19]);},2771591690:function _(ID,a){return new IFC4.IfcTaskTimeRecurring(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19],a[20]);},912023232:function _(ID,a){return new IFC4.IfcTelecomAddress(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1447204868:function _(ID,a){return new IFC4.IfcTextStyle(ID,a[0],a[1],a[2],a[3],a[4]);},2636378356:function _(ID,a){return new IFC4.IfcTextStyleForDefinedFont(ID,a[0],a[1]);},1640371178:function _(ID,a){return new IFC4.IfcTextStyleTextModel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},280115917:function _(ID,a){return new IFC4.IfcTextureCoordinate(ID,a[0]);},1742049831:function _(ID,a){return new IFC4.IfcTextureCoordinateGenerator(ID,a[0],a[1],a[2]);},2552916305:function _(ID,a){return new IFC4.IfcTextureMap(ID,a[0],a[1],a[2]);},1210645708:function _(ID,a){return new IFC4.IfcTextureVertex(ID,a[0]);},3611470254:function _(ID,a){return new IFC4.IfcTextureVertexList(ID,a[0]);},1199560280:function _(ID,a){return new IFC4.IfcTimePeriod(ID,a[0],a[1]);},3101149627:function _(ID,a){return new IFC4.IfcTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},581633288:function _(ID,a){return new IFC4.IfcTimeSeriesValue(ID,a[0]);},1377556343:function _(ID,_73){return new IFC4.IfcTopologicalRepresentationItem(ID);},1735638870:function _(ID,a){return new IFC4.IfcTopologyRepresentation(ID,a[0],a[1],a[2],a[3]);},180925521:function _(ID,a){return new IFC4.IfcUnitAssignment(ID,a[0]);},2799835756:function _(ID,_74){return new IFC4.IfcVertex(ID);},1907098498:function _(ID,a){return new IFC4.IfcVertexPoint(ID,a[0]);},891718957:function _(ID,a){return new IFC4.IfcVirtualGridIntersection(ID,a[0],a[1]);},1236880293:function _(ID,a){return new IFC4.IfcWorkTime(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3869604511:function _(ID,a){return new IFC4.IfcApprovalRelationship(ID,a[0],a[1],a[2],a[3]);},3798115385:function _(ID,a){return new IFC4.IfcArbitraryClosedProfileDef(ID,a[0],a[1],a[2]);},1310608509:function _(ID,a){return new IFC4.IfcArbitraryOpenProfileDef(ID,a[0],a[1],a[2]);},2705031697:function _(ID,a){return new IFC4.IfcArbitraryProfileDefWithVoids(ID,a[0],a[1],a[2],a[3]);},616511568:function _(ID,a){return new IFC4.IfcBlobTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3150382593:function _(ID,a){return new IFC4.IfcCenterLineProfileDef(ID,a[0],a[1],a[2],a[3]);},747523909:function _(ID,a){return new IFC4.IfcClassification(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},647927063:function _(ID,a){return new IFC4.IfcClassificationReference(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3285139300:function _(ID,a){return new IFC4.IfcColourRgbList(ID,a[0]);},3264961684:function _(ID,a){return new IFC4.IfcColourSpecification(ID,a[0]);},1485152156:function _(ID,a){return new IFC4.IfcCompositeProfileDef(ID,a[0],a[1],a[2],a[3]);},370225590:function _(ID,a){return new IFC4.IfcConnectedFaceSet(ID,a[0]);},1981873012:function _(ID,a){return new IFC4.IfcConnectionCurveGeometry(ID,a[0],a[1]);},45288368:function _(ID,a){return new IFC4.IfcConnectionPointEccentricity(ID,a[0],a[1],a[2],a[3],a[4]);},3050246964:function _(ID,a){return new IFC4.IfcContextDependentUnit(ID,a[0],a[1],a[2]);},2889183280:function _(ID,a){return new IFC4.IfcConversionBasedUnit(ID,a[0],a[1],a[2],a[3]);},2713554722:function _(ID,a){return new IFC4.IfcConversionBasedUnitWithOffset(ID,a[0],a[1],a[2],a[3],a[4]);},539742890:function _(ID,a){return new IFC4.IfcCurrencyRelationship(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3800577675:function _(ID,a){return new IFC4.IfcCurveStyle(ID,a[0],a[1],a[2],a[3],a[4]);},1105321065:function _(ID,a){return new IFC4.IfcCurveStyleFont(ID,a[0],a[1]);},2367409068:function _(ID,a){return new IFC4.IfcCurveStyleFontAndScaling(ID,a[0],a[1],a[2]);},3510044353:function _(ID,a){return new IFC4.IfcCurveStyleFontPattern(ID,a[0],a[1]);},3632507154:function _(ID,a){return new IFC4.IfcDerivedProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},1154170062:function _(ID,a){return new IFC4.IfcDocumentInformation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},770865208:function _(ID,a){return new IFC4.IfcDocumentInformationRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},3732053477:function _(ID,a){return new IFC4.IfcDocumentReference(ID,a[0],a[1],a[2],a[3],a[4]);},3900360178:function _(ID,a){return new IFC4.IfcEdge(ID,a[0],a[1]);},476780140:function _(ID,a){return new IFC4.IfcEdgeCurve(ID,a[0],a[1],a[2],a[3]);},211053100:function _(ID,a){return new IFC4.IfcEventTime(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},297599258:function _(ID,a){return new IFC4.IfcExtendedProperties(ID,a[0],a[1],a[2]);},1437805879:function _(ID,a){return new IFC4.IfcExternalReferenceRelationship(ID,a[0],a[1],a[2],a[3]);},2556980723:function _(ID,a){return new IFC4.IfcFace(ID,a[0]);},1809719519:function _(ID,a){return new IFC4.IfcFaceBound(ID,a[0],a[1]);},803316827:function _(ID,a){return new IFC4.IfcFaceOuterBound(ID,a[0],a[1]);},3008276851:function _(ID,a){return new IFC4.IfcFaceSurface(ID,a[0],a[1],a[2]);},4219587988:function _(ID,a){return new IFC4.IfcFailureConnectionCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},738692330:function _(ID,a){return new IFC4.IfcFillAreaStyle(ID,a[0],a[1],a[2]);},3448662350:function _(ID,a){return new IFC4.IfcGeometricRepresentationContext(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2453401579:function _(ID,_75){return new IFC4.IfcGeometricRepresentationItem(ID);},4142052618:function _(ID,a){return new IFC4.IfcGeometricRepresentationSubContext(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3590301190:function _(ID,a){return new IFC4.IfcGeometricSet(ID,a[0]);},178086475:function _(ID,a){return new IFC4.IfcGridPlacement(ID,a[0],a[1]);},812098782:function _(ID,a){return new IFC4.IfcHalfSpaceSolid(ID,a[0],a[1]);},3905492369:function _(ID,a){return new IFC4.IfcImageTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3570813810:function _(ID,a){return new IFC4.IfcIndexedColourMap(ID,a[0],a[1],a[2],a[3]);},1437953363:function _(ID,a){return new IFC4.IfcIndexedTextureMap(ID,a[0],a[1],a[2]);},2133299955:function _(ID,a){return new IFC4.IfcIndexedTriangleTextureMap(ID,a[0],a[1],a[2],a[3]);},3741457305:function _(ID,a){return new IFC4.IfcIrregularTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1585845231:function _(ID,a){return new IFC4.IfcLagTime(ID,a[0],a[1],a[2],a[3],a[4]);},1402838566:function _(ID,a){return new IFC4.IfcLightSource(ID,a[0],a[1],a[2],a[3]);},125510826:function _(ID,a){return new IFC4.IfcLightSourceAmbient(ID,a[0],a[1],a[2],a[3]);},2604431987:function _(ID,a){return new IFC4.IfcLightSourceDirectional(ID,a[0],a[1],a[2],a[3],a[4]);},4266656042:function _(ID,a){return new IFC4.IfcLightSourceGoniometric(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1520743889:function _(ID,a){return new IFC4.IfcLightSourcePositional(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3422422726:function _(ID,a){return new IFC4.IfcLightSourceSpot(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},2624227202:function _(ID,a){return new IFC4.IfcLocalPlacement(ID,a[0],a[1]);},1008929658:function _(ID,_76){return new IFC4.IfcLoop(ID);},2347385850:function _(ID,a){return new IFC4.IfcMappedItem(ID,a[0],a[1]);},1838606355:function _(ID,a){return new IFC4.IfcMaterial(ID,a[0],a[1],a[2]);},3708119e3:function _(ID,a){return new IFC4.IfcMaterialConstituent(ID,a[0],a[1],a[2],a[3],a[4]);},2852063980:function _(ID,a){return new IFC4.IfcMaterialConstituentSet(ID,a[0],a[1],a[2]);},2022407955:function _(ID,a){return new IFC4.IfcMaterialDefinitionRepresentation(ID,a[0],a[1],a[2],a[3]);},1303795690:function _(ID,a){return new IFC4.IfcMaterialLayerSetUsage(ID,a[0],a[1],a[2],a[3],a[4]);},3079605661:function _(ID,a){return new IFC4.IfcMaterialProfileSetUsage(ID,a[0],a[1],a[2]);},3404854881:function _(ID,a){return new IFC4.IfcMaterialProfileSetUsageTapering(ID,a[0],a[1],a[2],a[3],a[4]);},3265635763:function _(ID,a){return new IFC4.IfcMaterialProperties(ID,a[0],a[1],a[2],a[3]);},853536259:function _(ID,a){return new IFC4.IfcMaterialRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},2998442950:function _(ID,a){return new IFC4.IfcMirroredProfileDef(ID,a[0],a[1],a[2],a[3]);},219451334:function _(ID,a){return new IFC4.IfcObjectDefinition(ID,a[0],a[1],a[2],a[3]);},2665983363:function _(ID,a){return new IFC4.IfcOpenShell(ID,a[0]);},1411181986:function _(ID,a){return new IFC4.IfcOrganizationRelationship(ID,a[0],a[1],a[2],a[3]);},1029017970:function _(ID,a){return new IFC4.IfcOrientedEdge(ID,a[0],a[1]);},2529465313:function _(ID,a){return new IFC4.IfcParameterizedProfileDef(ID,a[0],a[1],a[2]);},2519244187:function _(ID,a){return new IFC4.IfcPath(ID,a[0]);},3021840470:function _(ID,a){return new IFC4.IfcPhysicalComplexQuantity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},597895409:function _(ID,a){return new IFC4.IfcPixelTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2004835150:function _(ID,a){return new IFC4.IfcPlacement(ID,a[0]);},1663979128:function _(ID,a){return new IFC4.IfcPlanarExtent(ID,a[0],a[1]);},2067069095:function _(ID,_77){return new IFC4.IfcPoint(ID);},4022376103:function _(ID,a){return new IFC4.IfcPointOnCurve(ID,a[0],a[1]);},1423911732:function _(ID,a){return new IFC4.IfcPointOnSurface(ID,a[0],a[1],a[2]);},2924175390:function _(ID,a){return new IFC4.IfcPolyLoop(ID,a[0]);},2775532180:function _(ID,a){return new IFC4.IfcPolygonalBoundedHalfSpace(ID,a[0],a[1],a[2],a[3]);},3727388367:function _(ID,a){return new IFC4.IfcPreDefinedItem(ID,a[0]);},3778827333:function _(ID,_78){return new IFC4.IfcPreDefinedProperties(ID);},1775413392:function _(ID,a){return new IFC4.IfcPreDefinedTextFont(ID,a[0]);},673634403:function _(ID,a){return new IFC4.IfcProductDefinitionShape(ID,a[0],a[1],a[2]);},2802850158:function _(ID,a){return new IFC4.IfcProfileProperties(ID,a[0],a[1],a[2],a[3]);},2598011224:function _(ID,a){return new IFC4.IfcProperty(ID,a[0],a[1]);},1680319473:function _(ID,a){return new IFC4.IfcPropertyDefinition(ID,a[0],a[1],a[2],a[3]);},148025276:function _(ID,a){return new IFC4.IfcPropertyDependencyRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},3357820518:function _(ID,a){return new IFC4.IfcPropertySetDefinition(ID,a[0],a[1],a[2],a[3]);},1482703590:function _(ID,a){return new IFC4.IfcPropertyTemplateDefinition(ID,a[0],a[1],a[2],a[3]);},2090586900:function _(ID,a){return new IFC4.IfcQuantitySet(ID,a[0],a[1],a[2],a[3]);},3615266464:function _(ID,a){return new IFC4.IfcRectangleProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},3413951693:function _(ID,a){return new IFC4.IfcRegularTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1580146022:function _(ID,a){return new IFC4.IfcReinforcementBarProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},478536968:function _(ID,a){return new IFC4.IfcRelationship(ID,a[0],a[1],a[2],a[3]);},2943643501:function _(ID,a){return new IFC4.IfcResourceApprovalRelationship(ID,a[0],a[1],a[2],a[3]);},1608871552:function _(ID,a){return new IFC4.IfcResourceConstraintRelationship(ID,a[0],a[1],a[2],a[3]);},1042787934:function _(ID,a){return new IFC4.IfcResourceTime(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17]);},2778083089:function _(ID,a){return new IFC4.IfcRoundedRectangleProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2042790032:function _(ID,a){return new IFC4.IfcSectionProperties(ID,a[0],a[1],a[2]);},4165799628:function _(ID,a){return new IFC4.IfcSectionReinforcementProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1509187699:function _(ID,a){return new IFC4.IfcSectionedSpine(ID,a[0],a[1],a[2]);},4124623270:function _(ID,a){return new IFC4.IfcShellBasedSurfaceModel(ID,a[0]);},3692461612:function _(ID,a){return new IFC4.IfcSimpleProperty(ID,a[0],a[1]);},2609359061:function _(ID,a){return new IFC4.IfcSlippageConnectionCondition(ID,a[0],a[1],a[2],a[3]);},723233188:function _(ID,_79){return new IFC4.IfcSolidModel(ID);},1595516126:function _(ID,a){return new IFC4.IfcStructuralLoadLinearForce(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2668620305:function _(ID,a){return new IFC4.IfcStructuralLoadPlanarForce(ID,a[0],a[1],a[2],a[3]);},2473145415:function _(ID,a){return new IFC4.IfcStructuralLoadSingleDisplacement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1973038258:function _(ID,a){return new IFC4.IfcStructuralLoadSingleDisplacementDistortion(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1597423693:function _(ID,a){return new IFC4.IfcStructuralLoadSingleForce(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1190533807:function _(ID,a){return new IFC4.IfcStructuralLoadSingleForceWarping(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2233826070:function _(ID,a){return new IFC4.IfcSubedge(ID,a[0],a[1],a[2]);},2513912981:function _(ID,_80){return new IFC4.IfcSurface(ID);},1878645084:function _(ID,a){return new IFC4.IfcSurfaceStyleRendering(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2247615214:function _(ID,a){return new IFC4.IfcSweptAreaSolid(ID,a[0],a[1]);},1260650574:function _(ID,a){return new IFC4.IfcSweptDiskSolid(ID,a[0],a[1],a[2],a[3],a[4]);},1096409881:function _(ID,a){return new IFC4.IfcSweptDiskSolidPolygonal(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},230924584:function _(ID,a){return new IFC4.IfcSweptSurface(ID,a[0],a[1]);},3071757647:function _(ID,a){return new IFC4.IfcTShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},901063453:function _(ID,_81){return new IFC4.IfcTessellatedItem(ID);},4282788508:function _(ID,a){return new IFC4.IfcTextLiteral(ID,a[0],a[1],a[2]);},3124975700:function _(ID,a){return new IFC4.IfcTextLiteralWithExtent(ID,a[0],a[1],a[2],a[3],a[4]);},1983826977:function _(ID,a){return new IFC4.IfcTextStyleFontModel(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2715220739:function _(ID,a){return new IFC4.IfcTrapeziumProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1628702193:function _(ID,a){return new IFC4.IfcTypeObject(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3736923433:function _(ID,a){return new IFC4.IfcTypeProcess(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2347495698:function _(ID,a){return new IFC4.IfcTypeProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3698973494:function _(ID,a){return new IFC4.IfcTypeResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},427810014:function _(ID,a){return new IFC4.IfcUShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1417489154:function _(ID,a){return new IFC4.IfcVector(ID,a[0],a[1]);},2759199220:function _(ID,a){return new IFC4.IfcVertexLoop(ID,a[0]);},1299126871:function _(ID,a){return new IFC4.IfcWindowStyle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2543172580:function _(ID,a){return new IFC4.IfcZShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3406155212:function _(ID,a){return new IFC4.IfcAdvancedFace(ID,a[0],a[1],a[2]);},669184980:function _(ID,a){return new IFC4.IfcAnnotationFillArea(ID,a[0],a[1]);},3207858831:function _(ID,a){return new IFC4.IfcAsymmetricIShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14]);},4261334040:function _(ID,a){return new IFC4.IfcAxis1Placement(ID,a[0],a[1]);},3125803723:function _(ID,a){return new IFC4.IfcAxis2Placement2D(ID,a[0],a[1]);},2740243338:function _(ID,a){return new IFC4.IfcAxis2Placement3D(ID,a[0],a[1],a[2]);},2736907675:function _(ID,a){return new IFC4.IfcBooleanResult(ID,a[0],a[1],a[2]);},4182860854:function _(ID,_82){return new IFC4.IfcBoundedSurface(ID);},2581212453:function _(ID,a){return new IFC4.IfcBoundingBox(ID,a[0],a[1],a[2],a[3]);},2713105998:function _(ID,a){return new IFC4.IfcBoxedHalfSpace(ID,a[0],a[1],a[2]);},2898889636:function _(ID,a){return new IFC4.IfcCShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1123145078:function _(ID,a){return new IFC4.IfcCartesianPoint(ID,a[0]);},574549367:function _(ID,_83){return new IFC4.IfcCartesianPointList(ID);},1675464909:function _(ID,a){return new IFC4.IfcCartesianPointList2D(ID,a[0]);},2059837836:function _(ID,a){return new IFC4.IfcCartesianPointList3D(ID,a[0]);},59481748:function _(ID,a){return new IFC4.IfcCartesianTransformationOperator(ID,a[0],a[1],a[2],a[3]);},3749851601:function _(ID,a){return new IFC4.IfcCartesianTransformationOperator2D(ID,a[0],a[1],a[2],a[3]);},3486308946:function _(ID,a){return new IFC4.IfcCartesianTransformationOperator2DnonUniform(ID,a[0],a[1],a[2],a[3],a[4]);},3331915920:function _(ID,a){return new IFC4.IfcCartesianTransformationOperator3D(ID,a[0],a[1],a[2],a[3],a[4]);},1416205885:function _(ID,a){return new IFC4.IfcCartesianTransformationOperator3DnonUniform(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1383045692:function _(ID,a){return new IFC4.IfcCircleProfileDef(ID,a[0],a[1],a[2],a[3]);},2205249479:function _(ID,a){return new IFC4.IfcClosedShell(ID,a[0]);},776857604:function _(ID,a){return new IFC4.IfcColourRgb(ID,a[0],a[1],a[2],a[3]);},2542286263:function _(ID,a){return new IFC4.IfcComplexProperty(ID,a[0],a[1],a[2],a[3]);},2485617015:function _(ID,a){return new IFC4.IfcCompositeCurveSegment(ID,a[0],a[1],a[2]);},2574617495:function _(ID,a){return new IFC4.IfcConstructionResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3419103109:function _(ID,a){return new IFC4.IfcContext(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1815067380:function _(ID,a){return new IFC4.IfcCrewResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2506170314:function _(ID,a){return new IFC4.IfcCsgPrimitive3D(ID,a[0]);},2147822146:function _(ID,a){return new IFC4.IfcCsgSolid(ID,a[0]);},2601014836:function _(ID,_84){return new IFC4.IfcCurve(ID);},2827736869:function _(ID,a){return new IFC4.IfcCurveBoundedPlane(ID,a[0],a[1],a[2]);},2629017746:function _(ID,a){return new IFC4.IfcCurveBoundedSurface(ID,a[0],a[1],a[2]);},32440307:function _(ID,a){return new IFC4.IfcDirection(ID,a[0]);},526551008:function _(ID,a){return new IFC4.IfcDoorStyle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1472233963:function _(ID,a){return new IFC4.IfcEdgeLoop(ID,a[0]);},1883228015:function _(ID,a){return new IFC4.IfcElementQuantity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},339256511:function _(ID,a){return new IFC4.IfcElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2777663545:function _(ID,a){return new IFC4.IfcElementarySurface(ID,a[0]);},2835456948:function _(ID,a){return new IFC4.IfcEllipseProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},4024345920:function _(ID,a){return new IFC4.IfcEventType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},477187591:function _(ID,a){return new IFC4.IfcExtrudedAreaSolid(ID,a[0],a[1],a[2],a[3]);},2804161546:function _(ID,a){return new IFC4.IfcExtrudedAreaSolidTapered(ID,a[0],a[1],a[2],a[3],a[4]);},2047409740:function _(ID,a){return new IFC4.IfcFaceBasedSurfaceModel(ID,a[0]);},374418227:function _(ID,a){return new IFC4.IfcFillAreaStyleHatching(ID,a[0],a[1],a[2],a[3],a[4]);},315944413:function _(ID,a){return new IFC4.IfcFillAreaStyleTiles(ID,a[0],a[1],a[2]);},2652556860:function _(ID,a){return new IFC4.IfcFixedReferenceSweptAreaSolid(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4238390223:function _(ID,a){return new IFC4.IfcFurnishingElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1268542332:function _(ID,a){return new IFC4.IfcFurnitureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4095422895:function _(ID,a){return new IFC4.IfcGeographicElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},987898635:function _(ID,a){return new IFC4.IfcGeometricCurveSet(ID,a[0]);},1484403080:function _(ID,a){return new IFC4.IfcIShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},178912537:function _(ID,a){return new IFC4.IfcIndexedPolygonalFace(ID,a[0]);},2294589976:function _(ID,a){return new IFC4.IfcIndexedPolygonalFaceWithVoids(ID,a[0],a[1]);},572779678:function _(ID,a){return new IFC4.IfcLShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},428585644:function _(ID,a){return new IFC4.IfcLaborResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1281925730:function _(ID,a){return new IFC4.IfcLine(ID,a[0],a[1]);},1425443689:function _(ID,a){return new IFC4.IfcManifoldSolidBrep(ID,a[0]);},3888040117:function _(ID,a){return new IFC4.IfcObject(ID,a[0],a[1],a[2],a[3],a[4]);},3388369263:function _(ID,a){return new IFC4.IfcOffsetCurve2D(ID,a[0],a[1],a[2]);},3505215534:function _(ID,a){return new IFC4.IfcOffsetCurve3D(ID,a[0],a[1],a[2],a[3]);},1682466193:function _(ID,a){return new IFC4.IfcPcurve(ID,a[0],a[1]);},603570806:function _(ID,a){return new IFC4.IfcPlanarBox(ID,a[0],a[1],a[2]);},220341763:function _(ID,a){return new IFC4.IfcPlane(ID,a[0]);},759155922:function _(ID,a){return new IFC4.IfcPreDefinedColour(ID,a[0]);},2559016684:function _(ID,a){return new IFC4.IfcPreDefinedCurveFont(ID,a[0]);},3967405729:function _(ID,a){return new IFC4.IfcPreDefinedPropertySet(ID,a[0],a[1],a[2],a[3]);},569719735:function _(ID,a){return new IFC4.IfcProcedureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2945172077:function _(ID,a){return new IFC4.IfcProcess(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},4208778838:function _(ID,a){return new IFC4.IfcProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},103090709:function _(ID,a){return new IFC4.IfcProject(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},653396225:function _(ID,a){return new IFC4.IfcProjectLibrary(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},871118103:function _(ID,a){return new IFC4.IfcPropertyBoundedValue(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4166981789:function _(ID,a){return new IFC4.IfcPropertyEnumeratedValue(ID,a[0],a[1],a[2],a[3]);},2752243245:function _(ID,a){return new IFC4.IfcPropertyListValue(ID,a[0],a[1],a[2],a[3]);},941946838:function _(ID,a){return new IFC4.IfcPropertyReferenceValue(ID,a[0],a[1],a[2],a[3]);},1451395588:function _(ID,a){return new IFC4.IfcPropertySet(ID,a[0],a[1],a[2],a[3],a[4]);},492091185:function _(ID,a){return new IFC4.IfcPropertySetTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3650150729:function _(ID,a){return new IFC4.IfcPropertySingleValue(ID,a[0],a[1],a[2],a[3]);},110355661:function _(ID,a){return new IFC4.IfcPropertyTableValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3521284610:function _(ID,a){return new IFC4.IfcPropertyTemplate(ID,a[0],a[1],a[2],a[3]);},3219374653:function _(ID,a){return new IFC4.IfcProxy(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2770003689:function _(ID,a){return new IFC4.IfcRectangleHollowProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2798486643:function _(ID,a){return new IFC4.IfcRectangularPyramid(ID,a[0],a[1],a[2],a[3]);},3454111270:function _(ID,a){return new IFC4.IfcRectangularTrimmedSurface(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3765753017:function _(ID,a){return new IFC4.IfcReinforcementDefinitionProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3939117080:function _(ID,a){return new IFC4.IfcRelAssigns(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1683148259:function _(ID,a){return new IFC4.IfcRelAssignsToActor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2495723537:function _(ID,a){return new IFC4.IfcRelAssignsToControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1307041759:function _(ID,a){return new IFC4.IfcRelAssignsToGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1027710054:function _(ID,a){return new IFC4.IfcRelAssignsToGroupByFactor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4278684876:function _(ID,a){return new IFC4.IfcRelAssignsToProcess(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2857406711:function _(ID,a){return new IFC4.IfcRelAssignsToProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},205026976:function _(ID,a){return new IFC4.IfcRelAssignsToResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1865459582:function _(ID,a){return new IFC4.IfcRelAssociates(ID,a[0],a[1],a[2],a[3],a[4]);},4095574036:function _(ID,a){return new IFC4.IfcRelAssociatesApproval(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},919958153:function _(ID,a){return new IFC4.IfcRelAssociatesClassification(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2728634034:function _(ID,a){return new IFC4.IfcRelAssociatesConstraint(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},982818633:function _(ID,a){return new IFC4.IfcRelAssociatesDocument(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3840914261:function _(ID,a){return new IFC4.IfcRelAssociatesLibrary(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2655215786:function _(ID,a){return new IFC4.IfcRelAssociatesMaterial(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},826625072:function _(ID,a){return new IFC4.IfcRelConnects(ID,a[0],a[1],a[2],a[3]);},1204542856:function _(ID,a){return new IFC4.IfcRelConnectsElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3945020480:function _(ID,a){return new IFC4.IfcRelConnectsPathElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4201705270:function _(ID,a){return new IFC4.IfcRelConnectsPortToElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3190031847:function _(ID,a){return new IFC4.IfcRelConnectsPorts(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2127690289:function _(ID,a){return new IFC4.IfcRelConnectsStructuralActivity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1638771189:function _(ID,a){return new IFC4.IfcRelConnectsStructuralMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},504942748:function _(ID,a){return new IFC4.IfcRelConnectsWithEccentricity(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3678494232:function _(ID,a){return new IFC4.IfcRelConnectsWithRealizingElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3242617779:function _(ID,a){return new IFC4.IfcRelContainedInSpatialStructure(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},886880790:function _(ID,a){return new IFC4.IfcRelCoversBldgElements(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2802773753:function _(ID,a){return new IFC4.IfcRelCoversSpaces(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2565941209:function _(ID,a){return new IFC4.IfcRelDeclares(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2551354335:function _(ID,a){return new IFC4.IfcRelDecomposes(ID,a[0],a[1],a[2],a[3]);},693640335:function _(ID,a){return new IFC4.IfcRelDefines(ID,a[0],a[1],a[2],a[3]);},1462361463:function _(ID,a){return new IFC4.IfcRelDefinesByObject(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4186316022:function _(ID,a){return new IFC4.IfcRelDefinesByProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},307848117:function _(ID,a){return new IFC4.IfcRelDefinesByTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},781010003:function _(ID,a){return new IFC4.IfcRelDefinesByType(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3940055652:function _(ID,a){return new IFC4.IfcRelFillsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},279856033:function _(ID,a){return new IFC4.IfcRelFlowControlElements(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},427948657:function _(ID,a){return new IFC4.IfcRelInterferesElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3268803585:function _(ID,a){return new IFC4.IfcRelNests(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},750771296:function _(ID,a){return new IFC4.IfcRelProjectsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1245217292:function _(ID,a){return new IFC4.IfcRelReferencedInSpatialStructure(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4122056220:function _(ID,a){return new IFC4.IfcRelSequence(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},366585022:function _(ID,a){return new IFC4.IfcRelServicesBuildings(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3451746338:function _(ID,a){return new IFC4.IfcRelSpaceBoundary(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3523091289:function _(ID,a){return new IFC4.IfcRelSpaceBoundary1stLevel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1521410863:function _(ID,a){return new IFC4.IfcRelSpaceBoundary2ndLevel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1401173127:function _(ID,a){return new IFC4.IfcRelVoidsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},816062949:function _(ID,a){return new IFC4.IfcReparametrisedCompositeCurveSegment(ID,a[0],a[1],a[2],a[3]);},2914609552:function _(ID,a){return new IFC4.IfcResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1856042241:function _(ID,a){return new IFC4.IfcRevolvedAreaSolid(ID,a[0],a[1],a[2],a[3]);},3243963512:function _(ID,a){return new IFC4.IfcRevolvedAreaSolidTapered(ID,a[0],a[1],a[2],a[3],a[4]);},4158566097:function _(ID,a){return new IFC4.IfcRightCircularCone(ID,a[0],a[1],a[2]);},3626867408:function _(ID,a){return new IFC4.IfcRightCircularCylinder(ID,a[0],a[1],a[2]);},3663146110:function _(ID,a){return new IFC4.IfcSimplePropertyTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1412071761:function _(ID,a){return new IFC4.IfcSpatialElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},710998568:function _(ID,a){return new IFC4.IfcSpatialElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2706606064:function _(ID,a){return new IFC4.IfcSpatialStructureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3893378262:function _(ID,a){return new IFC4.IfcSpatialStructureElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},463610769:function _(ID,a){return new IFC4.IfcSpatialZone(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2481509218:function _(ID,a){return new IFC4.IfcSpatialZoneType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},451544542:function _(ID,a){return new IFC4.IfcSphere(ID,a[0],a[1]);},4015995234:function _(ID,a){return new IFC4.IfcSphericalSurface(ID,a[0],a[1]);},3544373492:function _(ID,a){return new IFC4.IfcStructuralActivity(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3136571912:function _(ID,a){return new IFC4.IfcStructuralItem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},530289379:function _(ID,a){return new IFC4.IfcStructuralMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3689010777:function _(ID,a){return new IFC4.IfcStructuralReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3979015343:function _(ID,a){return new IFC4.IfcStructuralSurfaceMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2218152070:function _(ID,a){return new IFC4.IfcStructuralSurfaceMemberVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},603775116:function _(ID,a){return new IFC4.IfcStructuralSurfaceReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4095615324:function _(ID,a){return new IFC4.IfcSubContractResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},699246055:function _(ID,a){return new IFC4.IfcSurfaceCurve(ID,a[0],a[1],a[2]);},2028607225:function _(ID,a){return new IFC4.IfcSurfaceCurveSweptAreaSolid(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2809605785:function _(ID,a){return new IFC4.IfcSurfaceOfLinearExtrusion(ID,a[0],a[1],a[2],a[3]);},4124788165:function _(ID,a){return new IFC4.IfcSurfaceOfRevolution(ID,a[0],a[1],a[2]);},1580310250:function _(ID,a){return new IFC4.IfcSystemFurnitureElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3473067441:function _(ID,a){return new IFC4.IfcTask(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},3206491090:function _(ID,a){return new IFC4.IfcTaskType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2387106220:function _(ID,a){return new IFC4.IfcTessellatedFaceSet(ID,a[0]);},1935646853:function _(ID,a){return new IFC4.IfcToroidalSurface(ID,a[0],a[1],a[2]);},2097647324:function _(ID,a){return new IFC4.IfcTransportElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2916149573:function _(ID,a){return new IFC4.IfcTriangulatedFaceSet(ID,a[0],a[1],a[2],a[3],a[4]);},336235671:function _(ID,a){return new IFC4.IfcWindowLiningProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]);},512836454:function _(ID,a){return new IFC4.IfcWindowPanelProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2296667514:function _(ID,a){return new IFC4.IfcActor(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1635779807:function _(ID,a){return new IFC4.IfcAdvancedBrep(ID,a[0]);},2603310189:function _(ID,a){return new IFC4.IfcAdvancedBrepWithVoids(ID,a[0],a[1]);},1674181508:function _(ID,a){return new IFC4.IfcAnnotation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2887950389:function _(ID,a){return new IFC4.IfcBSplineSurface(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},167062518:function _(ID,a){return new IFC4.IfcBSplineSurfaceWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1334484129:function _(ID,a){return new IFC4.IfcBlock(ID,a[0],a[1],a[2],a[3]);},3649129432:function _(ID,a){return new IFC4.IfcBooleanClippingResult(ID,a[0],a[1],a[2]);},1260505505:function _(ID,_85){return new IFC4.IfcBoundedCurve(ID);},4031249490:function _(ID,a){return new IFC4.IfcBuilding(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1950629157:function _(ID,a){return new IFC4.IfcBuildingElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3124254112:function _(ID,a){return new IFC4.IfcBuildingStorey(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2197970202:function _(ID,a){return new IFC4.IfcChimneyType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2937912522:function _(ID,a){return new IFC4.IfcCircleHollowProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},3893394355:function _(ID,a){return new IFC4.IfcCivilElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},300633059:function _(ID,a){return new IFC4.IfcColumnType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3875453745:function _(ID,a){return new IFC4.IfcComplexPropertyTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3732776249:function _(ID,a){return new IFC4.IfcCompositeCurve(ID,a[0],a[1]);},15328376:function _(ID,a){return new IFC4.IfcCompositeCurveOnSurface(ID,a[0],a[1]);},2510884976:function _(ID,a){return new IFC4.IfcConic(ID,a[0]);},2185764099:function _(ID,a){return new IFC4.IfcConstructionEquipmentResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},4105962743:function _(ID,a){return new IFC4.IfcConstructionMaterialResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1525564444:function _(ID,a){return new IFC4.IfcConstructionProductResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2559216714:function _(ID,a){return new IFC4.IfcConstructionResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3293443760:function _(ID,a){return new IFC4.IfcControl(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3895139033:function _(ID,a){return new IFC4.IfcCostItem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1419761937:function _(ID,a){return new IFC4.IfcCostSchedule(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1916426348:function _(ID,a){return new IFC4.IfcCoveringType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3295246426:function _(ID,a){return new IFC4.IfcCrewResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1457835157:function _(ID,a){return new IFC4.IfcCurtainWallType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1213902940:function _(ID,a){return new IFC4.IfcCylindricalSurface(ID,a[0],a[1]);},3256556792:function _(ID,a){return new IFC4.IfcDistributionElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3849074793:function _(ID,a){return new IFC4.IfcDistributionFlowElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2963535650:function _(ID,a){return new IFC4.IfcDoorLiningProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},1714330368:function _(ID,a){return new IFC4.IfcDoorPanelProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2323601079:function _(ID,a){return new IFC4.IfcDoorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},445594917:function _(ID,a){return new IFC4.IfcDraughtingPreDefinedColour(ID,a[0]);},4006246654:function _(ID,a){return new IFC4.IfcDraughtingPreDefinedCurveFont(ID,a[0]);},1758889154:function _(ID,a){return new IFC4.IfcElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4123344466:function _(ID,a){return new IFC4.IfcElementAssembly(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2397081782:function _(ID,a){return new IFC4.IfcElementAssemblyType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1623761950:function _(ID,a){return new IFC4.IfcElementComponent(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2590856083:function _(ID,a){return new IFC4.IfcElementComponentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1704287377:function _(ID,a){return new IFC4.IfcEllipse(ID,a[0],a[1],a[2]);},2107101300:function _(ID,a){return new IFC4.IfcEnergyConversionDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},132023988:function _(ID,a){return new IFC4.IfcEngineType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3174744832:function _(ID,a){return new IFC4.IfcEvaporativeCoolerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3390157468:function _(ID,a){return new IFC4.IfcEvaporatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4148101412:function _(ID,a){return new IFC4.IfcEvent(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2853485674:function _(ID,a){return new IFC4.IfcExternalSpatialStructureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},807026263:function _(ID,a){return new IFC4.IfcFacetedBrep(ID,a[0]);},3737207727:function _(ID,a){return new IFC4.IfcFacetedBrepWithVoids(ID,a[0],a[1]);},647756555:function _(ID,a){return new IFC4.IfcFastener(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2489546625:function _(ID,a){return new IFC4.IfcFastenerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2827207264:function _(ID,a){return new IFC4.IfcFeatureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2143335405:function _(ID,a){return new IFC4.IfcFeatureElementAddition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1287392070:function _(ID,a){return new IFC4.IfcFeatureElementSubtraction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3907093117:function _(ID,a){return new IFC4.IfcFlowControllerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3198132628:function _(ID,a){return new IFC4.IfcFlowFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3815607619:function _(ID,a){return new IFC4.IfcFlowMeterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1482959167:function _(ID,a){return new IFC4.IfcFlowMovingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1834744321:function _(ID,a){return new IFC4.IfcFlowSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1339347760:function _(ID,a){return new IFC4.IfcFlowStorageDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2297155007:function _(ID,a){return new IFC4.IfcFlowTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3009222698:function _(ID,a){return new IFC4.IfcFlowTreatmentDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1893162501:function _(ID,a){return new IFC4.IfcFootingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},263784265:function _(ID,a){return new IFC4.IfcFurnishingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1509553395:function _(ID,a){return new IFC4.IfcFurniture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3493046030:function _(ID,a){return new IFC4.IfcGeographicElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3009204131:function _(ID,a){return new IFC4.IfcGrid(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2706460486:function _(ID,a){return new IFC4.IfcGroup(ID,a[0],a[1],a[2],a[3],a[4]);},1251058090:function _(ID,a){return new IFC4.IfcHeatExchangerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1806887404:function _(ID,a){return new IFC4.IfcHumidifierType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2571569899:function _(ID,a){return new IFC4.IfcIndexedPolyCurve(ID,a[0],a[1],a[2]);},3946677679:function _(ID,a){return new IFC4.IfcInterceptorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3113134337:function _(ID,a){return new IFC4.IfcIntersectionCurve(ID,a[0],a[1],a[2]);},2391368822:function _(ID,a){return new IFC4.IfcInventory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4288270099:function _(ID,a){return new IFC4.IfcJunctionBoxType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3827777499:function _(ID,a){return new IFC4.IfcLaborResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1051575348:function _(ID,a){return new IFC4.IfcLampType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1161773419:function _(ID,a){return new IFC4.IfcLightFixtureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},377706215:function _(ID,a){return new IFC4.IfcMechanicalFastener(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2108223431:function _(ID,a){return new IFC4.IfcMechanicalFastenerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1114901282:function _(ID,a){return new IFC4.IfcMedicalDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3181161470:function _(ID,a){return new IFC4.IfcMemberType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},977012517:function _(ID,a){return new IFC4.IfcMotorConnectionType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4143007308:function _(ID,a){return new IFC4.IfcOccupant(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3588315303:function _(ID,a){return new IFC4.IfcOpeningElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3079942009:function _(ID,a){return new IFC4.IfcOpeningStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2837617999:function _(ID,a){return new IFC4.IfcOutletType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2382730787:function _(ID,a){return new IFC4.IfcPerformanceHistory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3566463478:function _(ID,a){return new IFC4.IfcPermeableCoveringProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3327091369:function _(ID,a){return new IFC4.IfcPermit(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1158309216:function _(ID,a){return new IFC4.IfcPileType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},804291784:function _(ID,a){return new IFC4.IfcPipeFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4231323485:function _(ID,a){return new IFC4.IfcPipeSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4017108033:function _(ID,a){return new IFC4.IfcPlateType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2839578677:function _(ID,a){return new IFC4.IfcPolygonalFaceSet(ID,a[0],a[1],a[2],a[3]);},3724593414:function _(ID,a){return new IFC4.IfcPolyline(ID,a[0]);},3740093272:function _(ID,a){return new IFC4.IfcPort(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2744685151:function _(ID,a){return new IFC4.IfcProcedure(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2904328755:function _(ID,a){return new IFC4.IfcProjectOrder(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3651124850:function _(ID,a){return new IFC4.IfcProjectionElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1842657554:function _(ID,a){return new IFC4.IfcProtectiveDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2250791053:function _(ID,a){return new IFC4.IfcPumpType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2893384427:function _(ID,a){return new IFC4.IfcRailingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2324767716:function _(ID,a){return new IFC4.IfcRampFlightType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1469900589:function _(ID,a){return new IFC4.IfcRampType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},683857671:function _(ID,a){return new IFC4.IfcRationalBSplineSurfaceWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},3027567501:function _(ID,a){return new IFC4.IfcReinforcingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},964333572:function _(ID,a){return new IFC4.IfcReinforcingElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2320036040:function _(ID,a){return new IFC4.IfcReinforcingMesh(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17]);},2310774935:function _(ID,a){return new IFC4.IfcReinforcingMeshType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19]);},160246688:function _(ID,a){return new IFC4.IfcRelAggregates(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2781568857:function _(ID,a){return new IFC4.IfcRoofType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1768891740:function _(ID,a){return new IFC4.IfcSanitaryTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2157484638:function _(ID,a){return new IFC4.IfcSeamCurve(ID,a[0],a[1],a[2]);},4074543187:function _(ID,a){return new IFC4.IfcShadingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4097777520:function _(ID,a){return new IFC4.IfcSite(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},2533589738:function _(ID,a){return new IFC4.IfcSlabType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1072016465:function _(ID,a){return new IFC4.IfcSolarDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3856911033:function _(ID,a){return new IFC4.IfcSpace(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1305183839:function _(ID,a){return new IFC4.IfcSpaceHeaterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3812236995:function _(ID,a){return new IFC4.IfcSpaceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3112655638:function _(ID,a){return new IFC4.IfcStackTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1039846685:function _(ID,a){return new IFC4.IfcStairFlightType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},338393293:function _(ID,a){return new IFC4.IfcStairType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},682877961:function _(ID,a){return new IFC4.IfcStructuralAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1179482911:function _(ID,a){return new IFC4.IfcStructuralConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1004757350:function _(ID,a){return new IFC4.IfcStructuralCurveAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},4243806635:function _(ID,a){return new IFC4.IfcStructuralCurveConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},214636428:function _(ID,a){return new IFC4.IfcStructuralCurveMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2445595289:function _(ID,a){return new IFC4.IfcStructuralCurveMemberVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2757150158:function _(ID,a){return new IFC4.IfcStructuralCurveReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1807405624:function _(ID,a){return new IFC4.IfcStructuralLinearAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1252848954:function _(ID,a){return new IFC4.IfcStructuralLoadGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2082059205:function _(ID,a){return new IFC4.IfcStructuralPointAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},734778138:function _(ID,a){return new IFC4.IfcStructuralPointConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1235345126:function _(ID,a){return new IFC4.IfcStructuralPointReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2986769608:function _(ID,a){return new IFC4.IfcStructuralResultGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3657597509:function _(ID,a){return new IFC4.IfcStructuralSurfaceAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1975003073:function _(ID,a){return new IFC4.IfcStructuralSurfaceConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},148013059:function _(ID,a){return new IFC4.IfcSubContractResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3101698114:function _(ID,a){return new IFC4.IfcSurfaceFeature(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2315554128:function _(ID,a){return new IFC4.IfcSwitchingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2254336722:function _(ID,a){return new IFC4.IfcSystem(ID,a[0],a[1],a[2],a[3],a[4]);},413509423:function _(ID,a){return new IFC4.IfcSystemFurnitureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},5716631:function _(ID,a){return new IFC4.IfcTankType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3824725483:function _(ID,a){return new IFC4.IfcTendon(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},2347447852:function _(ID,a){return new IFC4.IfcTendonAnchor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3081323446:function _(ID,a){return new IFC4.IfcTendonAnchorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2415094496:function _(ID,a){return new IFC4.IfcTendonType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},1692211062:function _(ID,a){return new IFC4.IfcTransformerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1620046519:function _(ID,a){return new IFC4.IfcTransportElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3593883385:function _(ID,a){return new IFC4.IfcTrimmedCurve(ID,a[0],a[1],a[2],a[3],a[4]);},1600972822:function _(ID,a){return new IFC4.IfcTubeBundleType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1911125066:function _(ID,a){return new IFC4.IfcUnitaryEquipmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},728799441:function _(ID,a){return new IFC4.IfcValveType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2391383451:function _(ID,a){return new IFC4.IfcVibrationIsolator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3313531582:function _(ID,a){return new IFC4.IfcVibrationIsolatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2769231204:function _(ID,a){return new IFC4.IfcVirtualElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},926996030:function _(ID,a){return new IFC4.IfcVoidingFeature(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1898987631:function _(ID,a){return new IFC4.IfcWallType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1133259667:function _(ID,a){return new IFC4.IfcWasteTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4009809668:function _(ID,a){return new IFC4.IfcWindowType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},4088093105:function _(ID,a){return new IFC4.IfcWorkCalendar(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1028945134:function _(ID,a){return new IFC4.IfcWorkControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},4218914973:function _(ID,a){return new IFC4.IfcWorkPlan(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},3342526732:function _(ID,a){return new IFC4.IfcWorkSchedule(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1033361043:function _(ID,a){return new IFC4.IfcZone(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3821786052:function _(ID,a){return new IFC4.IfcActionRequest(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1411407467:function _(ID,a){return new IFC4.IfcAirTerminalBoxType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3352864051:function _(ID,a){return new IFC4.IfcAirTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1871374353:function _(ID,a){return new IFC4.IfcAirToAirHeatRecoveryType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3460190687:function _(ID,a){return new IFC4.IfcAsset(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1532957894:function _(ID,a){return new IFC4.IfcAudioVisualApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1967976161:function _(ID,a){return new IFC4.IfcBSplineCurve(ID,a[0],a[1],a[2],a[3],a[4]);},2461110595:function _(ID,a){return new IFC4.IfcBSplineCurveWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},819618141:function _(ID,a){return new IFC4.IfcBeamType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},231477066:function _(ID,a){return new IFC4.IfcBoilerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1136057603:function _(ID,a){return new IFC4.IfcBoundaryCurve(ID,a[0],a[1]);},3299480353:function _(ID,a){return new IFC4.IfcBuildingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2979338954:function _(ID,a){return new IFC4.IfcBuildingElementPart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},39481116:function _(ID,a){return new IFC4.IfcBuildingElementPartType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1095909175:function _(ID,a){return new IFC4.IfcBuildingElementProxy(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1909888760:function _(ID,a){return new IFC4.IfcBuildingElementProxyType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1177604601:function _(ID,a){return new IFC4.IfcBuildingSystem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2188180465:function _(ID,a){return new IFC4.IfcBurnerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},395041908:function _(ID,a){return new IFC4.IfcCableCarrierFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3293546465:function _(ID,a){return new IFC4.IfcCableCarrierSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2674252688:function _(ID,a){return new IFC4.IfcCableFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1285652485:function _(ID,a){return new IFC4.IfcCableSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2951183804:function _(ID,a){return new IFC4.IfcChillerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3296154744:function _(ID,a){return new IFC4.IfcChimney(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2611217952:function _(ID,a){return new IFC4.IfcCircle(ID,a[0],a[1]);},1677625105:function _(ID,a){return new IFC4.IfcCivilElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2301859152:function _(ID,a){return new IFC4.IfcCoilType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},843113511:function _(ID,a){return new IFC4.IfcColumn(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},905975707:function _(ID,a){return new IFC4.IfcColumnStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},400855858:function _(ID,a){return new IFC4.IfcCommunicationsApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3850581409:function _(ID,a){return new IFC4.IfcCompressorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2816379211:function _(ID,a){return new IFC4.IfcCondenserType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3898045240:function _(ID,a){return new IFC4.IfcConstructionEquipmentResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1060000209:function _(ID,a){return new IFC4.IfcConstructionMaterialResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},488727124:function _(ID,a){return new IFC4.IfcConstructionProductResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},335055490:function _(ID,a){return new IFC4.IfcCooledBeamType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2954562838:function _(ID,a){return new IFC4.IfcCoolingTowerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1973544240:function _(ID,a){return new IFC4.IfcCovering(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3495092785:function _(ID,a){return new IFC4.IfcCurtainWall(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3961806047:function _(ID,a){return new IFC4.IfcDamperType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1335981549:function _(ID,a){return new IFC4.IfcDiscreteAccessory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2635815018:function _(ID,a){return new IFC4.IfcDiscreteAccessoryType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1599208980:function _(ID,a){return new IFC4.IfcDistributionChamberElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2063403501:function _(ID,a){return new IFC4.IfcDistributionControlElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1945004755:function _(ID,a){return new IFC4.IfcDistributionElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3040386961:function _(ID,a){return new IFC4.IfcDistributionFlowElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3041715199:function _(ID,a){return new IFC4.IfcDistributionPort(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3205830791:function _(ID,a){return new IFC4.IfcDistributionSystem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},395920057:function _(ID,a){return new IFC4.IfcDoor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},3242481149:function _(ID,a){return new IFC4.IfcDoorStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},869906466:function _(ID,a){return new IFC4.IfcDuctFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3760055223:function _(ID,a){return new IFC4.IfcDuctSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2030761528:function _(ID,a){return new IFC4.IfcDuctSilencerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},663422040:function _(ID,a){return new IFC4.IfcElectricApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2417008758:function _(ID,a){return new IFC4.IfcElectricDistributionBoardType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3277789161:function _(ID,a){return new IFC4.IfcElectricFlowStorageDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1534661035:function _(ID,a){return new IFC4.IfcElectricGeneratorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1217240411:function _(ID,a){return new IFC4.IfcElectricMotorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},712377611:function _(ID,a){return new IFC4.IfcElectricTimeControlType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1658829314:function _(ID,a){return new IFC4.IfcEnergyConversionDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2814081492:function _(ID,a){return new IFC4.IfcEngine(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3747195512:function _(ID,a){return new IFC4.IfcEvaporativeCooler(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},484807127:function _(ID,a){return new IFC4.IfcEvaporator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1209101575:function _(ID,a){return new IFC4.IfcExternalSpatialElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},346874300:function _(ID,a){return new IFC4.IfcFanType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1810631287:function _(ID,a){return new IFC4.IfcFilterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4222183408:function _(ID,a){return new IFC4.IfcFireSuppressionTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2058353004:function _(ID,a){return new IFC4.IfcFlowController(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4278956645:function _(ID,a){return new IFC4.IfcFlowFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4037862832:function _(ID,a){return new IFC4.IfcFlowInstrumentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2188021234:function _(ID,a){return new IFC4.IfcFlowMeter(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3132237377:function _(ID,a){return new IFC4.IfcFlowMovingDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},987401354:function _(ID,a){return new IFC4.IfcFlowSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},707683696:function _(ID,a){return new IFC4.IfcFlowStorageDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2223149337:function _(ID,a){return new IFC4.IfcFlowTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3508470533:function _(ID,a){return new IFC4.IfcFlowTreatmentDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},900683007:function _(ID,a){return new IFC4.IfcFooting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3319311131:function _(ID,a){return new IFC4.IfcHeatExchanger(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2068733104:function _(ID,a){return new IFC4.IfcHumidifier(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4175244083:function _(ID,a){return new IFC4.IfcInterceptor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2176052936:function _(ID,a){return new IFC4.IfcJunctionBox(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},76236018:function _(ID,a){return new IFC4.IfcLamp(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},629592764:function _(ID,a){return new IFC4.IfcLightFixture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1437502449:function _(ID,a){return new IFC4.IfcMedicalDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1073191201:function _(ID,a){return new IFC4.IfcMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1911478936:function _(ID,a){return new IFC4.IfcMemberStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2474470126:function _(ID,a){return new IFC4.IfcMotorConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},144952367:function _(ID,a){return new IFC4.IfcOuterBoundaryCurve(ID,a[0],a[1]);},3694346114:function _(ID,a){return new IFC4.IfcOutlet(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1687234759:function _(ID,a){return new IFC4.IfcPile(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},310824031:function _(ID,a){return new IFC4.IfcPipeFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3612865200:function _(ID,a){return new IFC4.IfcPipeSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3171933400:function _(ID,a){return new IFC4.IfcPlate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1156407060:function _(ID,a){return new IFC4.IfcPlateStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},738039164:function _(ID,a){return new IFC4.IfcProtectiveDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},655969474:function _(ID,a){return new IFC4.IfcProtectiveDeviceTrippingUnitType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},90941305:function _(ID,a){return new IFC4.IfcPump(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2262370178:function _(ID,a){return new IFC4.IfcRailing(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3024970846:function _(ID,a){return new IFC4.IfcRamp(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3283111854:function _(ID,a){return new IFC4.IfcRampFlight(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1232101972:function _(ID,a){return new IFC4.IfcRationalBSplineCurveWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},979691226:function _(ID,a){return new IFC4.IfcReinforcingBar(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},2572171363:function _(ID,a){return new IFC4.IfcReinforcingBarType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]);},2016517767:function _(ID,a){return new IFC4.IfcRoof(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3053780830:function _(ID,a){return new IFC4.IfcSanitaryTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1783015770:function _(ID,a){return new IFC4.IfcSensorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1329646415:function _(ID,a){return new IFC4.IfcShadingDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1529196076:function _(ID,a){return new IFC4.IfcSlab(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3127900445:function _(ID,a){return new IFC4.IfcSlabElementedCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3027962421:function _(ID,a){return new IFC4.IfcSlabStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3420628829:function _(ID,a){return new IFC4.IfcSolarDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1999602285:function _(ID,a){return new IFC4.IfcSpaceHeater(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1404847402:function _(ID,a){return new IFC4.IfcStackTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},331165859:function _(ID,a){return new IFC4.IfcStair(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4252922144:function _(ID,a){return new IFC4.IfcStairFlight(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},2515109513:function _(ID,a){return new IFC4.IfcStructuralAnalysisModel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},385403989:function _(ID,a){return new IFC4.IfcStructuralLoadCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1621171031:function _(ID,a){return new IFC4.IfcStructuralPlanarAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1162798199:function _(ID,a){return new IFC4.IfcSwitchingDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},812556717:function _(ID,a){return new IFC4.IfcTank(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3825984169:function _(ID,a){return new IFC4.IfcTransformer(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3026737570:function _(ID,a){return new IFC4.IfcTubeBundle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3179687236:function _(ID,a){return new IFC4.IfcUnitaryControlElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4292641817:function _(ID,a){return new IFC4.IfcUnitaryEquipment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4207607924:function _(ID,a){return new IFC4.IfcValve(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2391406946:function _(ID,a){return new IFC4.IfcWall(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4156078855:function _(ID,a){return new IFC4.IfcWallElementedCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3512223829:function _(ID,a){return new IFC4.IfcWallStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4237592921:function _(ID,a){return new IFC4.IfcWasteTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3304561284:function _(ID,a){return new IFC4.IfcWindow(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},486154966:function _(ID,a){return new IFC4.IfcWindowStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},2874132201:function _(ID,a){return new IFC4.IfcActuatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1634111441:function _(ID,a){return new IFC4.IfcAirTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},177149247:function _(ID,a){return new IFC4.IfcAirTerminalBox(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2056796094:function _(ID,a){return new IFC4.IfcAirToAirHeatRecovery(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3001207471:function _(ID,a){return new IFC4.IfcAlarmType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},277319702:function _(ID,a){return new IFC4.IfcAudioVisualAppliance(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},753842376:function _(ID,a){return new IFC4.IfcBeam(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2906023776:function _(ID,a){return new IFC4.IfcBeamStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},32344328:function _(ID,a){return new IFC4.IfcBoiler(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2938176219:function _(ID,a){return new IFC4.IfcBurner(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},635142910:function _(ID,a){return new IFC4.IfcCableCarrierFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3758799889:function _(ID,a){return new IFC4.IfcCableCarrierSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1051757585:function _(ID,a){return new IFC4.IfcCableFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4217484030:function _(ID,a){return new IFC4.IfcCableSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3902619387:function _(ID,a){return new IFC4.IfcChiller(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},639361253:function _(ID,a){return new IFC4.IfcCoil(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3221913625:function _(ID,a){return new IFC4.IfcCommunicationsAppliance(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3571504051:function _(ID,a){return new IFC4.IfcCompressor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2272882330:function _(ID,a){return new IFC4.IfcCondenser(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},578613899:function _(ID,a){return new IFC4.IfcControllerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4136498852:function _(ID,a){return new IFC4.IfcCooledBeam(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3640358203:function _(ID,a){return new IFC4.IfcCoolingTower(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4074379575:function _(ID,a){return new IFC4.IfcDamper(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1052013943:function _(ID,a){return new IFC4.IfcDistributionChamberElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},562808652:function _(ID,a){return new IFC4.IfcDistributionCircuit(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1062813311:function _(ID,a){return new IFC4.IfcDistributionControlElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},342316401:function _(ID,a){return new IFC4.IfcDuctFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3518393246:function _(ID,a){return new IFC4.IfcDuctSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1360408905:function _(ID,a){return new IFC4.IfcDuctSilencer(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1904799276:function _(ID,a){return new IFC4.IfcElectricAppliance(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},862014818:function _(ID,a){return new IFC4.IfcElectricDistributionBoard(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3310460725:function _(ID,a){return new IFC4.IfcElectricFlowStorageDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},264262732:function _(ID,a){return new IFC4.IfcElectricGenerator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},402227799:function _(ID,a){return new IFC4.IfcElectricMotor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1003880860:function _(ID,a){return new IFC4.IfcElectricTimeControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3415622556:function _(ID,a){return new IFC4.IfcFan(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},819412036:function _(ID,a){return new IFC4.IfcFilter(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1426591983:function _(ID,a){return new IFC4.IfcFireSuppressionTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},182646315:function _(ID,a){return new IFC4.IfcFlowInstrument(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2295281155:function _(ID,a){return new IFC4.IfcProtectiveDeviceTrippingUnit(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4086658281:function _(ID,a){return new IFC4.IfcSensor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},630975310:function _(ID,a){return new IFC4.IfcUnitaryControlElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4288193352:function _(ID,a){return new IFC4.IfcActuator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3087945054:function _(ID,a){return new IFC4.IfcAlarm(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},25142252:function _(ID,a){return new IFC4.IfcController(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);}};ToRawLineData[2]={3630933823:function _(i){return[i.Role,i.UserDefinedRole,i.Description];},618182010:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose];},639542469:function _(i){return[i.ApplicationDeveloper,i.Version,i.ApplicationFullName,i.ApplicationIdentifier];},411424972:function _(i){return[i.Name,i.Description,i.AppliedValue,i.UnitBasis,i.ApplicableDate,i.FixedUntilDate,i.Category,i.Condition,i.ArithmeticOperator,i.Components];},130549933:function _(i){return[i.Identifier,i.Name,i.Description,i.TimeOfApproval,i.Status,i.Level,i.Qualifier,i.RequestingApproval,i.GivingApproval];},4037036970:function _(i){return[i.Name];},1560379544:function _(i){return[i.Name,!i.TranslationalStiffnessByLengthX?null:Labelise(i.TranslationalStiffnessByLengthX),!i.TranslationalStiffnessByLengthY?null:Labelise(i.TranslationalStiffnessByLengthY),!i.TranslationalStiffnessByLengthZ?null:Labelise(i.TranslationalStiffnessByLengthZ),!i.RotationalStiffnessByLengthX?null:Labelise(i.RotationalStiffnessByLengthX),!i.RotationalStiffnessByLengthY?null:Labelise(i.RotationalStiffnessByLengthY),!i.RotationalStiffnessByLengthZ?null:Labelise(i.RotationalStiffnessByLengthZ)];},3367102660:function _(i){return[i.Name,!i.TranslationalStiffnessByAreaX?null:Labelise(i.TranslationalStiffnessByAreaX),!i.TranslationalStiffnessByAreaY?null:Labelise(i.TranslationalStiffnessByAreaY),!i.TranslationalStiffnessByAreaZ?null:Labelise(i.TranslationalStiffnessByAreaZ)];},1387855156:function _(i){return[i.Name,!i.TranslationalStiffnessX?null:Labelise(i.TranslationalStiffnessX),!i.TranslationalStiffnessY?null:Labelise(i.TranslationalStiffnessY),!i.TranslationalStiffnessZ?null:Labelise(i.TranslationalStiffnessZ),!i.RotationalStiffnessX?null:Labelise(i.RotationalStiffnessX),!i.RotationalStiffnessY?null:Labelise(i.RotationalStiffnessY),!i.RotationalStiffnessZ?null:Labelise(i.RotationalStiffnessZ)];},2069777674:function _(i){return[i.Name,!i.TranslationalStiffnessX?null:Labelise(i.TranslationalStiffnessX),!i.TranslationalStiffnessY?null:Labelise(i.TranslationalStiffnessY),!i.TranslationalStiffnessZ?null:Labelise(i.TranslationalStiffnessZ),!i.RotationalStiffnessX?null:Labelise(i.RotationalStiffnessX),!i.RotationalStiffnessY?null:Labelise(i.RotationalStiffnessY),!i.RotationalStiffnessZ?null:Labelise(i.RotationalStiffnessZ),!i.WarpingStiffness?null:Labelise(i.WarpingStiffness)];},2859738748:function _(_86){return[];},2614616156:function _(i){return[i.PointOnRelatingElement,i.PointOnRelatedElement];},2732653382:function _(i){return[i.SurfaceOnRelatingElement,i.SurfaceOnRelatedElement];},775493141:function _(i){return[i.VolumeOnRelatingElement,i.VolumeOnRelatedElement];},1959218052:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade];},1785450214:function _(i){return[i.SourceCRS,i.TargetCRS];},1466758467:function _(i){return[i.Name,i.Description,i.GeodeticDatum,i.VerticalDatum];},602808272:function _(i){return[i.Name,i.Description,i.AppliedValue,i.UnitBasis,i.ApplicableDate,i.FixedUntilDate,i.Category,i.Condition,i.ArithmeticOperator,i.Components];},1765591967:function _(i){return[i.Elements,i.UnitType,i.UserDefinedType];},1045800335:function _(i){return[i.Unit,i.Exponent];},2949456006:function _(i){return[i.LengthExponent,i.MassExponent,i.TimeExponent,i.ElectricCurrentExponent,i.ThermodynamicTemperatureExponent,i.AmountOfSubstanceExponent,i.LuminousIntensityExponent];},4294318154:function _(_87){return[];},3200245327:function _(i){return[i.Location,i.Identification,i.Name];},2242383968:function _(i){return[i.Location,i.Identification,i.Name];},1040185647:function _(i){return[i.Location,i.Identification,i.Name];},3548104201:function _(i){return[i.Location,i.Identification,i.Name];},852622518:function _(i){var _a;return[i.AxisTag,i.AxisCurve,(_a=i.SameSense)==null?void 0:_a.toString()];},3020489413:function _(i){return[i.TimeStamp,i.ListValues.map(function(p){return Labelise(p);})];},2655187982:function _(i){return[i.Name,i.Version,i.Publisher,i.VersionDate,i.Location,i.Description];},3452421091:function _(i){return[i.Location,i.Identification,i.Name,i.Description,i.Language,i.ReferencedLibrary];},4162380809:function _(i){return[i.MainPlaneAngle,i.SecondaryPlaneAngle,i.LuminousIntensity];},1566485204:function _(i){return[i.LightDistributionCurve,i.DistributionData];},3057273783:function _(i){return[i.SourceCRS,i.TargetCRS,i.Eastings,i.Northings,i.OrthogonalHeight,i.XAxisAbscissa,i.XAxisOrdinate,i.Scale];},1847130766:function _(i){return[i.MaterialClassifications,i.ClassifiedMaterial];},760658860:function _(_88){return[];},248100487:function _(i){var _a;return[i.Material,i.LayerThickness,(_a=i.IsVentilated)==null?void 0:_a.toString(),i.Name,i.Description,i.Category,i.Priority];},3303938423:function _(i){return[i.MaterialLayers,i.LayerSetName,i.Description];},1847252529:function _(i){var _a;return[i.Material,i.LayerThickness,(_a=i.IsVentilated)==null?void 0:_a.toString(),i.Name,i.Description,i.Category,i.Priority,i.OffsetDirection,i.OffsetValues];},2199411900:function _(i){return[i.Materials];},2235152071:function _(i){return[i.Name,i.Description,i.Material,i.Profile,i.Priority,i.Category];},164193824:function _(i){return[i.Name,i.Description,i.MaterialProfiles,i.CompositeProfile];},552965576:function _(i){return[i.Name,i.Description,i.Material,i.Profile,i.Priority,i.Category,i.OffsetValues];},1507914824:function _(_89){return[];},2597039031:function _(i){return[Labelise(i.ValueComponent),i.UnitComponent];},3368373690:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade,i.Benchmark,i.ValueSource,i.DataValue,i.ReferencePath];},2706619895:function _(i){return[i.Currency];},1918398963:function _(i){return[i.Dimensions,i.UnitType];},3701648758:function _(_90){return[];},2251480897:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade,i.BenchmarkValues,i.LogicalAggregator,i.ObjectiveQualifier,i.UserDefinedQualifier];},4251960020:function _(i){return[i.Identification,i.Name,i.Description,i.Roles,i.Addresses];},1207048766:function _(i){return[i.OwningUser,i.OwningApplication,i.State,i.ChangeAction,i.LastModifiedDate,i.LastModifyingUser,i.LastModifyingApplication,i.CreationDate];},2077209135:function _(i){return[i.Identification,i.FamilyName,i.GivenName,i.MiddleNames,i.PrefixTitles,i.SuffixTitles,i.Roles,i.Addresses];},101040310:function _(i){return[i.ThePerson,i.TheOrganization,i.Roles];},2483315170:function _(i){return[i.Name,i.Description];},2226359599:function _(i){return[i.Name,i.Description,i.Unit];},3355820592:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose,i.InternalLocation,i.AddressLines,i.PostalBox,i.Town,i.Region,i.PostalCode,i.Country];},677532197:function _(_91){return[];},2022622350:function _(i){return[i.Name,i.Description,i.AssignedItems,i.Identifier];},1304840413:function _(i){var _a,_b,_c;return[i.Name,i.Description,i.AssignedItems,i.Identifier,(_a=i.LayerOn)==null?void 0:_a.toString(),(_b=i.LayerFrozen)==null?void 0:_b.toString(),(_c=i.LayerBlocked)==null?void 0:_c.toString(),i.LayerStyles];},3119450353:function _(i){return[i.Name];},2417041796:function _(i){return[i.Styles];},2095639259:function _(i){return[i.Name,i.Description,i.Representations];},3958567839:function _(i){return[i.ProfileType,i.ProfileName];},3843373140:function _(i){return[i.Name,i.Description,i.GeodeticDatum,i.VerticalDatum,i.MapProjection,i.MapZone,i.MapUnit];},986844984:function _(_92){return[];},3710013099:function _(i){return[i.Name,i.EnumerationValues.map(function(p){return Labelise(p);}),i.Unit];},2044713172:function _(i){return[i.Name,i.Description,i.Unit,i.AreaValue,i.Formula];},2093928680:function _(i){return[i.Name,i.Description,i.Unit,i.CountValue,i.Formula];},931644368:function _(i){return[i.Name,i.Description,i.Unit,i.LengthValue,i.Formula];},3252649465:function _(i){return[i.Name,i.Description,i.Unit,i.TimeValue,i.Formula];},2405470396:function _(i){return[i.Name,i.Description,i.Unit,i.VolumeValue,i.Formula];},825690147:function _(i){return[i.Name,i.Description,i.Unit,i.WeightValue,i.Formula];},3915482550:function _(i){return[i.RecurrenceType,i.DayComponent,i.WeekdayComponent,i.MonthComponent,i.Position,i.Interval,i.Occurrences,i.TimePeriods];},2433181523:function _(i){return[i.TypeIdentifier,i.AttributeIdentifier,i.InstanceName,i.ListPositions,i.InnerReference];},1076942058:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},3377609919:function _(i){return[i.ContextIdentifier,i.ContextType];},3008791417:function _(_93){return[];},1660063152:function _(i){return[i.MappingOrigin,i.MappedRepresentation];},2439245199:function _(i){return[i.Name,i.Description];},2341007311:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},448429030:function _(i){return[i.Dimensions,i.UnitType,i.Prefix,i.Name];},1054537805:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin];},867548509:function _(i){var _a;return[i.ShapeRepresentations,i.Name,i.Description,(_a=i.ProductDefinitional)==null?void 0:_a.toString(),i.PartOfProductDefinitionShape];},3982875396:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},4240577450:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},2273995522:function _(i){return[i.Name];},2162789131:function _(i){return[i.Name];},3478079324:function _(i){return[i.Name,i.Values,i.Locations];},609421318:function _(i){return[i.Name];},2525727697:function _(i){return[i.Name];},3408363356:function _(i){return[i.Name,i.DeltaTConstant,i.DeltaTY,i.DeltaTZ];},2830218821:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},3958052878:function _(i){return[i.Item,i.Styles,i.Name];},3049322572:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},2934153892:function _(i){return[i.Name,i.SurfaceReinforcement1,i.SurfaceReinforcement2,i.ShearReinforcement];},1300840506:function _(i){return[i.Name,i.Side,i.Styles];},3303107099:function _(i){return[i.DiffuseTransmissionColour,i.DiffuseReflectionColour,i.TransmissionColour,i.ReflectanceColour];},1607154358:function _(i){return[i.RefractionIndex,i.DispersionFactor];},846575682:function _(i){return[i.SurfaceColour,i.Transparency];},1351298697:function _(i){return[i.Textures];},626085974:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter];},985171141:function _(i){return[i.Name,i.Rows,i.Columns];},2043862942:function _(i){return[i.Identifier,i.Name,i.Description,i.Unit,i.ReferencePath];},531007025:function _(i){var _a;return[!i.RowCells?null:i.RowCells.map(function(p){return Labelise(p);}),(_a=i.IsHeading)==null?void 0:_a.toString()];},1549132990:function _(i){var _a;return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.DurationType,i.ScheduleDuration,i.ScheduleStart,i.ScheduleFinish,i.EarlyStart,i.EarlyFinish,i.LateStart,i.LateFinish,i.FreeFloat,i.TotalFloat,(_a=i.IsCritical)==null?void 0:_a.toString(),i.StatusTime,i.ActualDuration,i.ActualStart,i.ActualFinish,i.RemainingTime,i.Completion];},2771591690:function _(i){var _a;return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.DurationType,i.ScheduleDuration,i.ScheduleStart,i.ScheduleFinish,i.EarlyStart,i.EarlyFinish,i.LateStart,i.LateFinish,i.FreeFloat,i.TotalFloat,(_a=i.IsCritical)==null?void 0:_a.toString(),i.StatusTime,i.ActualDuration,i.ActualStart,i.ActualFinish,i.RemainingTime,i.Completion,i.Recurrence];},912023232:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose,i.TelephoneNumbers,i.FacsimileNumbers,i.PagerNumber,i.ElectronicMailAddresses,i.WWWHomePageURL,i.MessagingIDs];},1447204868:function _(i){var _a;return[i.Name,i.TextCharacterAppearance,i.TextStyle,i.TextFontStyle,(_a=i.ModelOrDraughting)==null?void 0:_a.toString()];},2636378356:function _(i){return[i.Colour,i.BackgroundColour];},1640371178:function _(i){return[!i.TextIndent?null:Labelise(i.TextIndent),i.TextAlign,i.TextDecoration,!i.LetterSpacing?null:Labelise(i.LetterSpacing),!i.WordSpacing?null:Labelise(i.WordSpacing),i.TextTransform,!i.LineHeight?null:Labelise(i.LineHeight)];},280115917:function _(i){return[i.Maps];},1742049831:function _(i){return[i.Maps,i.Mode,i.Parameter];},2552916305:function _(i){return[i.Maps,i.Vertices,i.MappedTo];},1210645708:function _(i){return[i.Coordinates];},3611470254:function _(i){return[i.TexCoordsList];},1199560280:function _(i){return[i.StartTime,i.EndTime];},3101149627:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit];},581633288:function _(i){return[i.ListValues.map(function(p){return Labelise(p);})];},1377556343:function _(_94){return[];},1735638870:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},180925521:function _(i){return[i.Units];},2799835756:function _(_95){return[];},1907098498:function _(i){return[i.VertexGeometry];},891718957:function _(i){return[i.IntersectingAxes,i.OffsetDistances];},1236880293:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.RecurrencePattern,i.Start,i.Finish];},3869604511:function _(i){return[i.Name,i.Description,i.RelatingApproval,i.RelatedApprovals];},3798115385:function _(i){return[i.ProfileType,i.ProfileName,i.OuterCurve];},1310608509:function _(i){return[i.ProfileType,i.ProfileName,i.Curve];},2705031697:function _(i){return[i.ProfileType,i.ProfileName,i.OuterCurve,i.InnerCurves];},616511568:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter,i.RasterFormat,i.RasterCode];},3150382593:function _(i){return[i.ProfileType,i.ProfileName,i.Curve,i.Thickness];},747523909:function _(i){return[i.Source,i.Edition,i.EditionDate,i.Name,i.Description,i.Location,i.ReferenceTokens];},647927063:function _(i){return[i.Location,i.Identification,i.Name,i.ReferencedSource,i.Description,i.Sort];},3285139300:function _(i){return[i.ColourList];},3264961684:function _(i){return[i.Name];},1485152156:function _(i){return[i.ProfileType,i.ProfileName,i.Profiles,i.Label];},370225590:function _(i){return[i.CfsFaces];},1981873012:function _(i){return[i.CurveOnRelatingElement,i.CurveOnRelatedElement];},45288368:function _(i){return[i.PointOnRelatingElement,i.PointOnRelatedElement,i.EccentricityInX,i.EccentricityInY,i.EccentricityInZ];},3050246964:function _(i){return[i.Dimensions,i.UnitType,i.Name];},2889183280:function _(i){return[i.Dimensions,i.UnitType,i.Name,i.ConversionFactor];},2713554722:function _(i){return[i.Dimensions,i.UnitType,i.Name,i.ConversionFactor,i.ConversionOffset];},539742890:function _(i){return[i.Name,i.Description,i.RelatingMonetaryUnit,i.RelatedMonetaryUnit,i.ExchangeRate,i.RateDateTime,i.RateSource];},3800577675:function _(i){var _a;return[i.Name,i.CurveFont,!i.CurveWidth?null:Labelise(i.CurveWidth),i.CurveColour,(_a=i.ModelOrDraughting)==null?void 0:_a.toString()];},1105321065:function _(i){return[i.Name,i.PatternList];},2367409068:function _(i){return[i.Name,i.CurveFont,i.CurveFontScaling];},3510044353:function _(i){return[i.VisibleSegmentLength,i.InvisibleSegmentLength];},3632507154:function _(i){return[i.ProfileType,i.ProfileName,i.ParentProfile,i.Operator,i.Label];},1154170062:function _(i){return[i.Identification,i.Name,i.Description,i.Location,i.Purpose,i.IntendedUse,i.Scope,i.Revision,i.DocumentOwner,i.Editors,i.CreationTime,i.LastRevisionTime,i.ElectronicFormat,i.ValidFrom,i.ValidUntil,i.Confidentiality,i.Status];},770865208:function _(i){return[i.Name,i.Description,i.RelatingDocument,i.RelatedDocuments,i.RelationshipType];},3732053477:function _(i){return[i.Location,i.Identification,i.Name,i.Description,i.ReferencedDocument];},3900360178:function _(i){return[i.EdgeStart,i.EdgeEnd];},476780140:function _(i){var _a;return[i.EdgeStart,i.EdgeEnd,i.EdgeGeometry,(_a=i.SameSense)==null?void 0:_a.toString()];},211053100:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.ActualDate,i.EarlyDate,i.LateDate,i.ScheduleDate];},297599258:function _(i){return[i.Name,i.Description,i.Properties];},1437805879:function _(i){return[i.Name,i.Description,i.RelatingReference,i.RelatedResourceObjects];},2556980723:function _(i){return[i.Bounds];},1809719519:function _(i){var _a;return[i.Bound,(_a=i.Orientation)==null?void 0:_a.toString()];},803316827:function _(i){var _a;return[i.Bound,(_a=i.Orientation)==null?void 0:_a.toString()];},3008276851:function _(i){var _a;return[i.Bounds,i.FaceSurface,(_a=i.SameSense)==null?void 0:_a.toString()];},4219587988:function _(i){return[i.Name,i.TensionFailureX,i.TensionFailureY,i.TensionFailureZ,i.CompressionFailureX,i.CompressionFailureY,i.CompressionFailureZ];},738692330:function _(i){var _a;return[i.Name,i.FillStyles,(_a=i.ModelorDraughting)==null?void 0:_a.toString()];},3448662350:function _(i){return[i.ContextIdentifier,i.ContextType,i.CoordinateSpaceDimension,i.Precision,i.WorldCoordinateSystem,i.TrueNorth];},2453401579:function _(_96){return[];},4142052618:function _(i){return[i.ContextIdentifier,i.ContextType,i.CoordinateSpaceDimension,i.Precision,i.WorldCoordinateSystem,i.TrueNorth,i.ParentContext,i.TargetScale,i.TargetView,i.UserDefinedTargetView];},3590301190:function _(i){return[i.Elements];},178086475:function _(i){return[i.PlacementLocation,i.PlacementRefDirection];},812098782:function _(i){var _a;return[i.BaseSurface,(_a=i.AgreementFlag)==null?void 0:_a.toString()];},3905492369:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter,i.URLReference];},3570813810:function _(i){return[i.MappedTo,i.Opacity,i.Colours,i.ColourIndex];},1437953363:function _(i){return[i.Maps,i.MappedTo,i.TexCoords];},2133299955:function _(i){return[i.Maps,i.MappedTo,i.TexCoords,i.TexCoordIndex];},3741457305:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit,i.Values];},1585845231:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,Labelise(i.LagValue),i.DurationType];},1402838566:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity];},125510826:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity];},2604431987:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Orientation];},4266656042:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.ColourAppearance,i.ColourTemperature,i.LuminousFlux,i.LightEmissionSource,i.LightDistributionDataSource];},1520743889:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.Radius,i.ConstantAttenuation,i.DistanceAttenuation,i.QuadricAttenuation];},3422422726:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.Radius,i.ConstantAttenuation,i.DistanceAttenuation,i.QuadricAttenuation,i.Orientation,i.ConcentrationExponent,i.SpreadAngle,i.BeamWidthAngle];},2624227202:function _(i){return[i.PlacementRelTo,i.RelativePlacement];},1008929658:function _(_97){return[];},2347385850:function _(i){return[i.MappingSource,i.MappingTarget];},1838606355:function _(i){return[i.Name,i.Description,i.Category];},3708119e3:function _(i){return[i.Name,i.Description,i.Material,i.Fraction,i.Category];},2852063980:function _(i){return[i.Name,i.Description,i.MaterialConstituents];},2022407955:function _(i){return[i.Name,i.Description,i.Representations,i.RepresentedMaterial];},1303795690:function _(i){return[i.ForLayerSet,i.LayerSetDirection,i.DirectionSense,i.OffsetFromReferenceLine,i.ReferenceExtent];},3079605661:function _(i){return[i.ForProfileSet,i.CardinalPoint,i.ReferenceExtent];},3404854881:function _(i){return[i.ForProfileSet,i.CardinalPoint,i.ReferenceExtent,i.ForProfileEndSet,i.CardinalEndPoint];},3265635763:function _(i){return[i.Name,i.Description,i.Properties,i.Material];},853536259:function _(i){return[i.Name,i.Description,i.RelatingMaterial,i.RelatedMaterials,i.Expression];},2998442950:function _(i){return[i.ProfileType,i.ProfileName,i.ParentProfile,i.Operator,i.Label];},219451334:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2665983363:function _(i){return[i.CfsFaces];},1411181986:function _(i){return[i.Name,i.Description,i.RelatingOrganization,i.RelatedOrganizations];},1029017970:function _(i){var _a;return[i.EdgeStart,i.EdgeEnd,i.EdgeElement,(_a=i.Orientation)==null?void 0:_a.toString()];},2529465313:function _(i){return[i.ProfileType,i.ProfileName,i.Position];},2519244187:function _(i){return[i.EdgeList];},3021840470:function _(i){return[i.Name,i.Description,i.HasQuantities,i.Discrimination,i.Quality,i.Usage];},597895409:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter,i.Width,i.Height,i.ColourComponents,i.Pixel];},2004835150:function _(i){return[i.Location];},1663979128:function _(i){return[i.SizeInX,i.SizeInY];},2067069095:function _(_98){return[];},4022376103:function _(i){return[i.BasisCurve,i.PointParameter];},1423911732:function _(i){return[i.BasisSurface,i.PointParameterU,i.PointParameterV];},2924175390:function _(i){return[i.Polygon];},2775532180:function _(i){var _a;return[i.BaseSurface,(_a=i.AgreementFlag)==null?void 0:_a.toString(),i.Position,i.PolygonalBoundary];},3727388367:function _(i){return[i.Name];},3778827333:function _(_99){return[];},1775413392:function _(i){return[i.Name];},673634403:function _(i){return[i.Name,i.Description,i.Representations];},2802850158:function _(i){return[i.Name,i.Description,i.Properties,i.ProfileDefinition];},2598011224:function _(i){return[i.Name,i.Description];},1680319473:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},148025276:function _(i){return[i.Name,i.Description,i.DependingProperty,i.DependantProperty,i.Expression];},3357820518:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},1482703590:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2090586900:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},3615266464:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim];},3413951693:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit,i.TimeStep,i.Values];},1580146022:function _(i){return[i.TotalCrossSectionArea,i.SteelGrade,i.BarSurface,i.EffectiveDepth,i.NominalBarDiameter,i.BarCount];},478536968:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2943643501:function _(i){return[i.Name,i.Description,i.RelatedResourceObjects,i.RelatingApproval];},1608871552:function _(i){return[i.Name,i.Description,i.RelatingConstraint,i.RelatedResourceObjects];},1042787934:function _(i){var _a;return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.ScheduleWork,i.ScheduleUsage,i.ScheduleStart,i.ScheduleFinish,i.ScheduleContour,i.LevelingDelay,(_a=i.IsOverAllocated)==null?void 0:_a.toString(),i.StatusTime,i.ActualWork,i.ActualUsage,i.ActualStart,i.ActualFinish,i.RemainingWork,i.RemainingUsage,i.Completion];},2778083089:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim,i.RoundingRadius];},2042790032:function _(i){return[i.SectionType,i.StartProfile,i.EndProfile];},4165799628:function _(i){return[i.LongitudinalStartPosition,i.LongitudinalEndPosition,i.TransversePosition,i.ReinforcementRole,i.SectionDefinition,i.CrossSectionReinforcementDefinitions];},1509187699:function _(i){return[i.SpineCurve,i.CrossSections,i.CrossSectionPositions];},4124623270:function _(i){return[i.SbsmBoundary];},3692461612:function _(i){return[i.Name,i.Description];},2609359061:function _(i){return[i.Name,i.SlippageX,i.SlippageY,i.SlippageZ];},723233188:function _(_100){return[];},1595516126:function _(i){return[i.Name,i.LinearForceX,i.LinearForceY,i.LinearForceZ,i.LinearMomentX,i.LinearMomentY,i.LinearMomentZ];},2668620305:function _(i){return[i.Name,i.PlanarForceX,i.PlanarForceY,i.PlanarForceZ];},2473145415:function _(i){return[i.Name,i.DisplacementX,i.DisplacementY,i.DisplacementZ,i.RotationalDisplacementRX,i.RotationalDisplacementRY,i.RotationalDisplacementRZ];},1973038258:function _(i){return[i.Name,i.DisplacementX,i.DisplacementY,i.DisplacementZ,i.RotationalDisplacementRX,i.RotationalDisplacementRY,i.RotationalDisplacementRZ,i.Distortion];},1597423693:function _(i){return[i.Name,i.ForceX,i.ForceY,i.ForceZ,i.MomentX,i.MomentY,i.MomentZ];},1190533807:function _(i){return[i.Name,i.ForceX,i.ForceY,i.ForceZ,i.MomentX,i.MomentY,i.MomentZ,i.WarpingMoment];},2233826070:function _(i){return[i.EdgeStart,i.EdgeEnd,i.ParentEdge];},2513912981:function _(_101){return[];},1878645084:function _(i){return[i.SurfaceColour,i.Transparency,i.DiffuseColour,i.TransmissionColour,i.DiffuseTransmissionColour,i.ReflectionColour,i.SpecularColour,!i.SpecularHighlight?null:Labelise(i.SpecularHighlight),i.ReflectanceMethod];},2247615214:function _(i){return[i.SweptArea,i.Position];},1260650574:function _(i){return[i.Directrix,i.Radius,i.InnerRadius,i.StartParam,i.EndParam];},1096409881:function _(i){return[i.Directrix,i.Radius,i.InnerRadius,i.StartParam,i.EndParam,i.FilletRadius];},230924584:function _(i){return[i.SweptCurve,i.Position];},3071757647:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.FlangeEdgeRadius,i.WebEdgeRadius,i.WebSlope,i.FlangeSlope];},901063453:function _(_102){return[];},4282788508:function _(i){return[i.Literal,i.Placement,i.Path];},3124975700:function _(i){return[i.Literal,i.Placement,i.Path,i.Extent,i.BoxAlignment];},1983826977:function _(i){return[i.Name,i.FontFamily,i.FontStyle,i.FontVariant,i.FontWeight,Labelise(i.FontSize)];},2715220739:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.BottomXDim,i.TopXDim,i.YDim,i.TopXOffset];},1628702193:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets];},3736923433:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType];},2347495698:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag];},3698973494:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType];},427810014:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.EdgeRadius,i.FlangeSlope];},1417489154:function _(i){return[i.Orientation,i.Magnitude];},2759199220:function _(i){return[i.LoopVertex];},1299126871:function _(i){var _a,_b;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ConstructionType,i.OperationType,(_a=i.ParameterTakesPrecedence)==null?void 0:_a.toString(),(_b=i.Sizeable)==null?void 0:_b.toString()];},2543172580:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.EdgeRadius];},3406155212:function _(i){var _a;return[i.Bounds,i.FaceSurface,(_a=i.SameSense)==null?void 0:_a.toString()];},669184980:function _(i){return[i.OuterBoundary,i.InnerBoundaries];},3207858831:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.BottomFlangeWidth,i.OverallDepth,i.WebThickness,i.BottomFlangeThickness,i.BottomFlangeFilletRadius,i.TopFlangeWidth,i.TopFlangeThickness,i.TopFlangeFilletRadius,i.BottomFlangeEdgeRadius,i.BottomFlangeSlope,i.TopFlangeEdgeRadius,i.TopFlangeSlope];},4261334040:function _(i){return[i.Location,i.Axis];},3125803723:function _(i){return[i.Location,i.RefDirection];},2740243338:function _(i){return[i.Location,i.Axis,i.RefDirection];},2736907675:function _(i){return[i.Operator,i.FirstOperand,i.SecondOperand];},4182860854:function _(_103){return[];},2581212453:function _(i){return[i.Corner,i.XDim,i.YDim,i.ZDim];},2713105998:function _(i){var _a;return[i.BaseSurface,(_a=i.AgreementFlag)==null?void 0:_a.toString(),i.Enclosure];},2898889636:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.Width,i.WallThickness,i.Girth,i.InternalFilletRadius];},1123145078:function _(i){return[i.Coordinates];},574549367:function _(_104){return[];},1675464909:function _(i){return[i.CoordList];},2059837836:function _(i){return[i.CoordList];},59481748:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale];},3749851601:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale];},3486308946:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Scale2];},3331915920:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Axis3];},1416205885:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Axis3,i.Scale2,i.Scale3];},1383045692:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Radius];},2205249479:function _(i){return[i.CfsFaces];},776857604:function _(i){return[i.Name,i.Red,i.Green,i.Blue];},2542286263:function _(i){return[i.Name,i.Description,i.UsageName,i.HasProperties];},2485617015:function _(i){var _a;return[i.Transition,(_a=i.SameSense)==null?void 0:_a.toString(),i.ParentCurve];},2574617495:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity];},3419103109:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.Phase,i.RepresentationContexts,i.UnitsInContext];},1815067380:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},2506170314:function _(i){return[i.Position];},2147822146:function _(i){return[i.TreeRootExpression];},2601014836:function _(_105){return[];},2827736869:function _(i){return[i.BasisSurface,i.OuterBoundary,i.InnerBoundaries];},2629017746:function _(i){var _a;return[i.BasisSurface,i.Boundaries,(_a=i.ImplicitOuter)==null?void 0:_a.toString()];},32440307:function _(i){return[i.DirectionRatios];},526551008:function _(i){var _a,_b;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.OperationType,i.ConstructionType,(_a=i.ParameterTakesPrecedence)==null?void 0:_a.toString(),(_b=i.Sizeable)==null?void 0:_b.toString()];},1472233963:function _(i){return[i.EdgeList];},1883228015:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.MethodOfMeasurement,i.Quantities];},339256511:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2777663545:function _(i){return[i.Position];},2835456948:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.SemiAxis1,i.SemiAxis2];},4024345920:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType,i.PredefinedType,i.EventTriggerType,i.UserDefinedEventTriggerType];},477187591:function _(i){return[i.SweptArea,i.Position,i.ExtrudedDirection,i.Depth];},2804161546:function _(i){return[i.SweptArea,i.Position,i.ExtrudedDirection,i.Depth,i.EndSweptArea];},2047409740:function _(i){return[i.FbsmFaces];},374418227:function _(i){return[i.HatchLineAppearance,i.StartOfNextHatchLine,i.PointOfReferenceHatchLine,i.PatternStart,i.HatchLineAngle];},315944413:function _(i){return[i.TilingPattern,i.Tiles,i.TilingScale];},2652556860:function _(i){return[i.SweptArea,i.Position,i.Directrix,i.StartParam,i.EndParam,i.FixedReference];},4238390223:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1268542332:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.AssemblyPlace,i.PredefinedType];},4095422895:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},987898635:function _(i){return[i.Elements];},1484403080:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.OverallWidth,i.OverallDepth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.FlangeEdgeRadius,i.FlangeSlope];},178912537:function _(i){return[i.CoordIndex];},2294589976:function _(i){return[i.CoordIndex,i.InnerCoordIndices];},572779678:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.Width,i.Thickness,i.FilletRadius,i.EdgeRadius,i.LegSlope];},428585644:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1281925730:function _(i){return[i.Pnt,i.Dir];},1425443689:function _(i){return[i.Outer];},3888040117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},3388369263:function _(i){var _a;return[i.BasisCurve,i.Distance,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},3505215534:function _(i){var _a;return[i.BasisCurve,i.Distance,(_a=i.SelfIntersect)==null?void 0:_a.toString(),i.RefDirection];},1682466193:function _(i){return[i.BasisSurface,i.ReferenceCurve];},603570806:function _(i){return[i.SizeInX,i.SizeInY,i.Placement];},220341763:function _(i){return[i.Position];},759155922:function _(i){return[i.Name];},2559016684:function _(i){return[i.Name];},3967405729:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},569719735:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType,i.PredefinedType];},2945172077:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription];},4208778838:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},103090709:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.Phase,i.RepresentationContexts,i.UnitsInContext];},653396225:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.Phase,i.RepresentationContexts,i.UnitsInContext];},871118103:function _(i){return[i.Name,i.Description,!i.UpperBoundValue?null:Labelise(i.UpperBoundValue),!i.LowerBoundValue?null:Labelise(i.LowerBoundValue),i.Unit,!i.SetPointValue?null:Labelise(i.SetPointValue)];},4166981789:function _(i){return[i.Name,i.Description,!i.EnumerationValues?null:i.EnumerationValues.map(function(p){return Labelise(p);}),i.EnumerationReference];},2752243245:function _(i){return[i.Name,i.Description,!i.ListValues?null:i.ListValues.map(function(p){return Labelise(p);}),i.Unit];},941946838:function _(i){return[i.Name,i.Description,i.UsageName,i.PropertyReference];},1451395588:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.HasProperties];},492091185:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.TemplateType,i.ApplicableEntity,i.HasPropertyTemplates];},3650150729:function _(i){return[i.Name,i.Description,!i.NominalValue?null:Labelise(i.NominalValue),i.Unit];},110355661:function _(i){return[i.Name,i.Description,!i.DefiningValues?null:i.DefiningValues.map(function(p){return Labelise(p);}),!i.DefinedValues?null:i.DefinedValues.map(function(p){return Labelise(p);}),i.Expression,i.DefiningUnit,i.DefinedUnit,i.CurveInterpolation];},3521284610:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},3219374653:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.ProxyType,i.Tag];},2770003689:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim,i.WallThickness,i.InnerFilletRadius,i.OuterFilletRadius];},2798486643:function _(i){return[i.Position,i.XLength,i.YLength,i.Height];},3454111270:function _(i){var _a,_b;return[i.BasisSurface,i.U1,i.V1,i.U2,i.V2,(_a=i.Usense)==null?void 0:_a.toString(),(_b=i.Vsense)==null?void 0:_b.toString()];},3765753017:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.DefinitionType,i.ReinforcementSectionDefinitions];},3939117080:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType];},1683148259:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingActor,i.ActingRole];},2495723537:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingControl];},1307041759:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingGroup];},1027710054:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingGroup,i.Factor];},4278684876:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingProcess,i.QuantityInProcess];},2857406711:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingProduct];},205026976:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingResource];},1865459582:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects];},4095574036:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingApproval];},919958153:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingClassification];},2728634034:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.Intent,i.RelatingConstraint];},982818633:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingDocument];},3840914261:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingLibrary];},2655215786:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingMaterial];},826625072:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},1204542856:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement];},3945020480:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement,i.RelatingPriorities,i.RelatedPriorities,i.RelatedConnectionType,i.RelatingConnectionType];},4201705270:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingPort,i.RelatedElement];},3190031847:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingPort,i.RelatedPort,i.RealizingElement];},2127690289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedStructuralActivity];},1638771189:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingStructuralMember,i.RelatedStructuralConnection,i.AppliedCondition,i.AdditionalConditions,i.SupportedLength,i.ConditionCoordinateSystem];},504942748:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingStructuralMember,i.RelatedStructuralConnection,i.AppliedCondition,i.AdditionalConditions,i.SupportedLength,i.ConditionCoordinateSystem,i.ConnectionConstraint];},3678494232:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement,i.RealizingElements,i.ConnectionType];},3242617779:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedElements,i.RelatingStructure];},886880790:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingBuildingElement,i.RelatedCoverings];},2802773753:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedCoverings];},2565941209:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingContext,i.RelatedDefinitions];},2551354335:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},693640335:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},1462361463:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingObject];},4186316022:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingPropertyDefinition];},307848117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedPropertySets,i.RelatingTemplate];},781010003:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingType];},3940055652:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingOpeningElement,i.RelatedBuildingElement];},279856033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedControlElements,i.RelatingFlowElement];},427948657:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedElement,i.InterferenceGeometry,i.InterferenceType,i.ImpliedOrder];},3268803585:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingObject,i.RelatedObjects];},750771296:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedFeatureElement];},1245217292:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedElements,i.RelatingStructure];},4122056220:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingProcess,i.RelatedProcess,i.TimeLag,i.SequenceType,i.UserDefinedSequenceType];},366585022:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSystem,i.RelatedBuildings];},3451746338:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedBuildingElement,i.ConnectionGeometry,i.PhysicalOrVirtualBoundary,i.InternalOrExternalBoundary];},3523091289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedBuildingElement,i.ConnectionGeometry,i.PhysicalOrVirtualBoundary,i.InternalOrExternalBoundary,i.ParentBoundary];},1521410863:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedBuildingElement,i.ConnectionGeometry,i.PhysicalOrVirtualBoundary,i.InternalOrExternalBoundary,i.ParentBoundary,i.CorrespondingBoundary];},1401173127:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingBuildingElement,i.RelatedOpeningElement];},816062949:function _(i){var _a;return[i.Transition,(_a=i.SameSense)==null?void 0:_a.toString(),i.ParentCurve,i.ParamLength];},2914609552:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription];},1856042241:function _(i){return[i.SweptArea,i.Position,i.Axis,i.Angle];},3243963512:function _(i){return[i.SweptArea,i.Position,i.Axis,i.Angle,i.EndSweptArea];},4158566097:function _(i){return[i.Position,i.Height,i.BottomRadius];},3626867408:function _(i){return[i.Position,i.Height,i.Radius];},3663146110:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.TemplateType,i.PrimaryMeasureType,i.SecondaryMeasureType,i.Enumerators,i.PrimaryUnit,i.SecondaryUnit,i.Expression,i.AccessState];},1412071761:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName];},710998568:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2706606064:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType];},3893378262:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},463610769:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.PredefinedType];},2481509218:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.LongName];},451544542:function _(i){return[i.Position,i.Radius];},4015995234:function _(i){return[i.Position,i.Radius];},3544373492:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},3136571912:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},530289379:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},3689010777:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},3979015343:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Thickness];},2218152070:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Thickness];},603775116:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.PredefinedType];},4095615324:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},699246055:function _(i){return[i.Curve3D,i.AssociatedGeometry,i.MasterRepresentation];},2028607225:function _(i){return[i.SweptArea,i.Position,i.Directrix,i.StartParam,i.EndParam,i.ReferenceSurface];},2809605785:function _(i){return[i.SweptCurve,i.Position,i.ExtrudedDirection,i.Depth];},4124788165:function _(i){return[i.SweptCurve,i.Position,i.AxisPosition];},1580310250:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3473067441:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Status,i.WorkMethod,(_a=i.IsMilestone)==null?void 0:_a.toString(),i.Priority,i.TaskTime,i.PredefinedType];},3206491090:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType,i.PredefinedType,i.WorkMethod];},2387106220:function _(i){return[i.Coordinates];},1935646853:function _(i){return[i.Position,i.MajorRadius,i.MinorRadius];},2097647324:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2916149573:function _(i){var _a;return[i.Coordinates,i.Normals,(_a=i.Closed)==null?void 0:_a.toString(),i.CoordIndex,i.PnIndex];},336235671:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.LiningDepth,i.LiningThickness,i.TransomThickness,i.MullionThickness,i.FirstTransomOffset,i.SecondTransomOffset,i.FirstMullionOffset,i.SecondMullionOffset,i.ShapeAspectStyle,i.LiningOffset,i.LiningToPanelOffsetX,i.LiningToPanelOffsetY];},512836454:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.OperationType,i.PanelPosition,i.FrameDepth,i.FrameThickness,i.ShapeAspectStyle];},2296667514:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheActor];},1635779807:function _(i){return[i.Outer];},2603310189:function _(i){return[i.Outer,i.Voids];},1674181508:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},2887950389:function _(i){var _a,_b,_c;return[i.UDegree,i.VDegree,i.ControlPointsList,i.SurfaceForm,(_a=i.UClosed)==null?void 0:_a.toString(),(_b=i.VClosed)==null?void 0:_b.toString(),(_c=i.SelfIntersect)==null?void 0:_c.toString()];},167062518:function _(i){var _a,_b,_c;return[i.UDegree,i.VDegree,i.ControlPointsList,i.SurfaceForm,(_a=i.UClosed)==null?void 0:_a.toString(),(_b=i.VClosed)==null?void 0:_b.toString(),(_c=i.SelfIntersect)==null?void 0:_c.toString(),i.UMultiplicities,i.VMultiplicities,i.UKnots,i.VKnots,i.KnotSpec];},1334484129:function _(i){return[i.Position,i.XLength,i.YLength,i.ZLength];},3649129432:function _(i){return[i.Operator,i.FirstOperand,i.SecondOperand];},1260505505:function _(_106){return[];},4031249490:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.ElevationOfRefHeight,i.ElevationOfTerrain,i.BuildingAddress];},1950629157:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3124254112:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.Elevation];},2197970202:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2937912522:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Radius,i.WallThickness];},3893394355:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},300633059:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3875453745:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.UsageName,i.TemplateType,i.HasPropertyTemplates];},3732776249:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},15328376:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},2510884976:function _(i){return[i.Position];},2185764099:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},4105962743:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1525564444:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},2559216714:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity];},3293443760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification];},3895139033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.CostValues,i.CostQuantities];},1419761937:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.SubmittedOn,i.UpdateDate];},1916426348:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3295246426:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1457835157:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1213902940:function _(i){return[i.Position,i.Radius];},3256556792:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3849074793:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2963535650:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.LiningDepth,i.LiningThickness,i.ThresholdDepth,i.ThresholdThickness,i.TransomThickness,i.TransomOffset,i.LiningOffset,i.ThresholdOffset,i.CasingThickness,i.CasingDepth,i.ShapeAspectStyle,i.LiningToPanelOffsetX,i.LiningToPanelOffsetY];},1714330368:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.PanelDepth,i.PanelOperation,i.PanelWidth,i.PanelPosition,i.ShapeAspectStyle];},2323601079:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.OperationType,(_a=i.ParameterTakesPrecedence)==null?void 0:_a.toString(),i.UserDefinedOperationType];},445594917:function _(i){return[i.Name];},4006246654:function _(i){return[i.Name];},1758889154:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4123344466:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.AssemblyPlace,i.PredefinedType];},2397081782:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1623761950:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2590856083:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1704287377:function _(i){return[i.Position,i.SemiAxis1,i.SemiAxis2];},2107101300:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},132023988:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3174744832:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3390157468:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4148101412:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.PredefinedType,i.EventTriggerType,i.UserDefinedEventTriggerType,i.EventOccurenceTime];},2853485674:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName];},807026263:function _(i){return[i.Outer];},3737207727:function _(i){return[i.Outer,i.Voids];},647756555:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2489546625:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2827207264:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2143335405:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1287392070:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3907093117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3198132628:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3815607619:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1482959167:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1834744321:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1339347760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2297155007:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3009222698:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1893162501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},263784265:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1509553395:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3493046030:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3009204131:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.UAxes,i.VAxes,i.WAxes,i.PredefinedType];},2706460486:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},1251058090:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1806887404:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2571569899:function _(i){var _a;return[i.Points,!i.Segments?null:i.Segments.map(function(p){return Labelise(p);}),(_a=i.SelfIntersect)==null?void 0:_a.toString()];},3946677679:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3113134337:function _(i){return[i.Curve3D,i.AssociatedGeometry,i.MasterRepresentation];},2391368822:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.Jurisdiction,i.ResponsiblePersons,i.LastUpdateDate,i.CurrentValue,i.OriginalValue];},4288270099:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3827777499:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1051575348:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1161773419:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},377706215:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.NominalDiameter,i.NominalLength,i.PredefinedType];},2108223431:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.NominalDiameter,i.NominalLength];},1114901282:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3181161470:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},977012517:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4143007308:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheActor,i.PredefinedType];},3588315303:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3079942009:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2837617999:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2382730787:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LifeCyclePhase,i.PredefinedType];},3566463478:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.OperationType,i.PanelPosition,i.FrameDepth,i.FrameThickness,i.ShapeAspectStyle];},3327091369:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.LongDescription];},1158309216:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},804291784:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4231323485:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4017108033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2839578677:function _(i){var _a;return[i.Coordinates,(_a=i.Closed)==null?void 0:_a.toString(),i.Faces,i.PnIndex];},3724593414:function _(i){return[i.Points];},3740093272:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},2744685151:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.PredefinedType];},2904328755:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.LongDescription];},3651124850:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1842657554:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2250791053:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2893384427:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2324767716:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1469900589:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},683857671:function _(i){var _a,_b,_c;return[i.UDegree,i.VDegree,i.ControlPointsList,i.SurfaceForm,(_a=i.UClosed)==null?void 0:_a.toString(),(_b=i.VClosed)==null?void 0:_b.toString(),(_c=i.SelfIntersect)==null?void 0:_c.toString(),i.UMultiplicities,i.VMultiplicities,i.UKnots,i.VKnots,i.KnotSpec,i.WeightsData];},3027567501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade];},964333572:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2320036040:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.MeshLength,i.MeshWidth,i.LongitudinalBarNominalDiameter,i.TransverseBarNominalDiameter,i.LongitudinalBarCrossSectionArea,i.TransverseBarCrossSectionArea,i.LongitudinalBarSpacing,i.TransverseBarSpacing,i.PredefinedType];},2310774935:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.MeshLength,i.MeshWidth,i.LongitudinalBarNominalDiameter,i.TransverseBarNominalDiameter,i.LongitudinalBarCrossSectionArea,i.TransverseBarCrossSectionArea,i.LongitudinalBarSpacing,i.TransverseBarSpacing,i.BendingShapeCode,!i.BendingParameters?null:i.BendingParameters.map(function(p){return Labelise(p);})];},160246688:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingObject,i.RelatedObjects];},2781568857:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1768891740:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2157484638:function _(i){return[i.Curve3D,i.AssociatedGeometry,i.MasterRepresentation];},4074543187:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4097777520:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.RefLatitude,i.RefLongitude,i.RefElevation,i.LandTitleNumber,i.SiteAddress];},2533589738:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1072016465:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3856911033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.PredefinedType,i.ElevationWithFlooring];},1305183839:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3812236995:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.LongName];},3112655638:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1039846685:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},338393293:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},682877961:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString()];},1179482911:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},1004757350:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},4243806635:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition,i.Axis];},214636428:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Axis];},2445595289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Axis];},2757150158:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.PredefinedType];},1807405624:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},1252848954:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.ActionType,i.ActionSource,i.Coefficient,i.Purpose];},2082059205:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString()];},734778138:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition,i.ConditionCoordinateSystem];},1235345126:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},2986769608:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheoryType,i.ResultForLoadGroup,(_a=i.IsLinear)==null?void 0:_a.toString()];},3657597509:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},1975003073:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},148013059:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},3101698114:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2315554128:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2254336722:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},413509423:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},5716631:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3824725483:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.PredefinedType,i.NominalDiameter,i.CrossSectionArea,i.TensionForce,i.PreStress,i.FrictionCoefficient,i.AnchorageSlip,i.MinCurvatureRadius];},2347447852:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.PredefinedType];},3081323446:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2415094496:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.NominalDiameter,i.CrossSectionArea,i.SheathDiameter];},1692211062:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1620046519:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3593883385:function _(i){var _a;return[i.BasisCurve,i.Trim1,i.Trim2,(_a=i.SenseAgreement)==null?void 0:_a.toString(),i.MasterRepresentation];},1600972822:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1911125066:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},728799441:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2391383451:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3313531582:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2769231204:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},926996030:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1898987631:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1133259667:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4009809668:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.PartitioningType,(_a=i.ParameterTakesPrecedence)==null?void 0:_a.toString(),i.UserDefinedPartitioningType];},4088093105:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.WorkingTimes,i.ExceptionTimes,i.PredefinedType];},1028945134:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime];},4218914973:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime,i.PredefinedType];},3342526732:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime,i.PredefinedType];},1033361043:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName];},3821786052:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.LongDescription];},1411407467:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3352864051:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1871374353:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3460190687:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.OriginalValue,i.CurrentValue,i.TotalReplacementCost,i.Owner,i.User,i.ResponsiblePerson,i.IncorporationDate,i.DepreciatedValue];},1532957894:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1967976161:function _(i){var _a,_b;return[i.Degree,i.ControlPointsList,i.CurveForm,(_a=i.ClosedCurve)==null?void 0:_a.toString(),(_b=i.SelfIntersect)==null?void 0:_b.toString()];},2461110595:function _(i){var _a,_b;return[i.Degree,i.ControlPointsList,i.CurveForm,(_a=i.ClosedCurve)==null?void 0:_a.toString(),(_b=i.SelfIntersect)==null?void 0:_b.toString(),i.KnotMultiplicities,i.Knots,i.KnotSpec];},819618141:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},231477066:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1136057603:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},3299480353:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2979338954:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},39481116:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1095909175:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1909888760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1177604601:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.LongName];},2188180465:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},395041908:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3293546465:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2674252688:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1285652485:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2951183804:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3296154744:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2611217952:function _(i){return[i.Position,i.Radius];},1677625105:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2301859152:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},843113511:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},905975707:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},400855858:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3850581409:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2816379211:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3898045240:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1060000209:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},488727124:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},335055490:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2954562838:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1973544240:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3495092785:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3961806047:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1335981549:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2635815018:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1599208980:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2063403501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1945004755:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3040386961:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3041715199:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.FlowDirection,i.PredefinedType,i.SystemType];},3205830791:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.PredefinedType];},395920057:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth,i.PredefinedType,i.OperationType,i.UserDefinedOperationType];},3242481149:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth,i.PredefinedType,i.OperationType,i.UserDefinedOperationType];},869906466:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3760055223:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2030761528:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},663422040:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2417008758:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3277789161:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1534661035:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1217240411:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},712377611:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1658829314:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2814081492:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3747195512:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},484807127:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1209101575:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.PredefinedType];},346874300:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1810631287:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4222183408:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2058353004:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4278956645:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4037862832:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2188021234:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3132237377:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},987401354:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},707683696:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2223149337:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3508470533:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},900683007:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3319311131:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2068733104:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4175244083:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2176052936:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},76236018:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},629592764:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1437502449:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1073191201:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1911478936:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2474470126:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},144952367:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},3694346114:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1687234759:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType,i.ConstructionType];},310824031:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3612865200:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3171933400:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1156407060:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},738039164:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},655969474:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},90941305:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2262370178:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3024970846:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3283111854:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1232101972:function _(i){var _a,_b;return[i.Degree,i.ControlPointsList,i.CurveForm,(_a=i.ClosedCurve)==null?void 0:_a.toString(),(_b=i.SelfIntersect)==null?void 0:_b.toString(),i.KnotMultiplicities,i.Knots,i.KnotSpec,i.WeightsData];},979691226:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.NominalDiameter,i.CrossSectionArea,i.BarLength,i.PredefinedType,i.BarSurface];},2572171363:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.NominalDiameter,i.CrossSectionArea,i.BarLength,i.BarSurface,i.BendingShapeCode,!i.BendingParameters?null:i.BendingParameters.map(function(p){return Labelise(p);})];},2016517767:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3053780830:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1783015770:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1329646415:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1529196076:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3127900445:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3027962421:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3420628829:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1999602285:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1404847402:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},331165859:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4252922144:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.NumberOfRisers,i.NumberOfTreads,i.RiserHeight,i.TreadLength,i.PredefinedType];},2515109513:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.OrientationOf2DPlane,i.LoadedBy,i.HasResults,i.SharedPlacement];},385403989:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.ActionType,i.ActionSource,i.Coefficient,i.Purpose,i.SelfWeightCoefficients];},1621171031:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},1162798199:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},812556717:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3825984169:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3026737570:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3179687236:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4292641817:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4207607924:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2391406946:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4156078855:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3512223829:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4237592921:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3304561284:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth,i.PredefinedType,i.PartitioningType,i.UserDefinedPartitioningType];},486154966:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth,i.PredefinedType,i.PartitioningType,i.UserDefinedPartitioningType];},2874132201:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1634111441:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},177149247:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2056796094:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3001207471:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},277319702:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},753842376:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2906023776:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},32344328:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2938176219:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},635142910:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3758799889:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1051757585:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4217484030:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3902619387:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},639361253:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3221913625:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3571504051:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2272882330:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},578613899:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4136498852:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3640358203:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4074379575:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1052013943:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},562808652:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.PredefinedType];},1062813311:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},342316401:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3518393246:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1360408905:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1904799276:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},862014818:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3310460725:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},264262732:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},402227799:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1003880860:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3415622556:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},819412036:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1426591983:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},182646315:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2295281155:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4086658281:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},630975310:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4288193352:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3087945054:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},25142252:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];}};TypeInitialisers[2]={3699917729:function _(v){return new IFC4.IfcAbsorbedDoseMeasure(v);},4182062534:function _(v){return new IFC4.IfcAccelerationMeasure(v);},360377573:function _(v){return new IFC4.IfcAmountOfSubstanceMeasure(v);},632304761:function _(v){return new IFC4.IfcAngularVelocityMeasure(v);},3683503648:function _(v){return new IFC4.IfcArcIndex(v);},1500781891:function _(v){return new IFC4.IfcAreaDensityMeasure(v);},2650437152:function _(v){return new IFC4.IfcAreaMeasure(v);},2314439260:function _(v){return new IFC4.IfcBinary(v);},2735952531:function _(v){return new IFC4.IfcBoolean(v);},1867003952:function _(v){return new IFC4.IfcBoxAlignment(v);},1683019596:function _(v){return new IFC4.IfcCardinalPointReference(v);},2991860651:function _(v){return new IFC4.IfcComplexNumber(v);},3812528620:function _(v){return new IFC4.IfcCompoundPlaneAngleMeasure(v);},3238673880:function _(v){return new IFC4.IfcContextDependentMeasure(v);},1778710042:function _(v){return new IFC4.IfcCountMeasure(v);},94842927:function _(v){return new IFC4.IfcCurvatureMeasure(v);},937566702:function _(v){return new IFC4.IfcDate(v);},2195413836:function _(v){return new IFC4.IfcDateTime(v);},86635668:function _(v){return new IFC4.IfcDayInMonthNumber(v);},3701338814:function _(v){return new IFC4.IfcDayInWeekNumber(v);},1514641115:function _(v){return new IFC4.IfcDescriptiveMeasure(v);},4134073009:function _(v){return new IFC4.IfcDimensionCount(v);},524656162:function _(v){return new IFC4.IfcDoseEquivalentMeasure(v);},2541165894:function _(v){return new IFC4.IfcDuration(v);},69416015:function _(v){return new IFC4.IfcDynamicViscosityMeasure(v);},1827137117:function _(v){return new IFC4.IfcElectricCapacitanceMeasure(v);},3818826038:function _(v){return new IFC4.IfcElectricChargeMeasure(v);},2093906313:function _(v){return new IFC4.IfcElectricConductanceMeasure(v);},3790457270:function _(v){return new IFC4.IfcElectricCurrentMeasure(v);},2951915441:function _(v){return new IFC4.IfcElectricResistanceMeasure(v);},2506197118:function _(v){return new IFC4.IfcElectricVoltageMeasure(v);},2078135608:function _(v){return new IFC4.IfcEnergyMeasure(v);},1102727119:function _(v){return new IFC4.IfcFontStyle(v);},2715512545:function _(v){return new IFC4.IfcFontVariant(v);},2590844177:function _(v){return new IFC4.IfcFontWeight(v);},1361398929:function _(v){return new IFC4.IfcForceMeasure(v);},3044325142:function _(v){return new IFC4.IfcFrequencyMeasure(v);},3064340077:function _(v){return new IFC4.IfcGloballyUniqueId(v);},3113092358:function _(v){return new IFC4.IfcHeatFluxDensityMeasure(v);},1158859006:function _(v){return new IFC4.IfcHeatingValueMeasure(v);},983778844:function _(v){return new IFC4.IfcIdentifier(v);},3358199106:function _(v){return new IFC4.IfcIlluminanceMeasure(v);},2679005408:function _(v){return new IFC4.IfcInductanceMeasure(v);},1939436016:function _(v){return new IFC4.IfcInteger(v);},3809634241:function _(v){return new IFC4.IfcIntegerCountRateMeasure(v);},3686016028:function _(v){return new IFC4.IfcIonConcentrationMeasure(v);},3192672207:function _(v){return new IFC4.IfcIsothermalMoistureCapacityMeasure(v);},2054016361:function _(v){return new IFC4.IfcKinematicViscosityMeasure(v);},3258342251:function _(v){return new IFC4.IfcLabel(v);},1275358634:function _(v){return new IFC4.IfcLanguageId(v);},1243674935:function _(v){return new IFC4.IfcLengthMeasure(v);},1774176899:function _(v){return new IFC4.IfcLineIndex(v);},191860431:function _(v){return new IFC4.IfcLinearForceMeasure(v);},2128979029:function _(v){return new IFC4.IfcLinearMomentMeasure(v);},1307019551:function _(v){return new IFC4.IfcLinearStiffnessMeasure(v);},3086160713:function _(v){return new IFC4.IfcLinearVelocityMeasure(v);},503418787:function _(v){return new IFC4.IfcLogical(v);},2095003142:function _(v){return new IFC4.IfcLuminousFluxMeasure(v);},2755797622:function _(v){return new IFC4.IfcLuminousIntensityDistributionMeasure(v);},151039812:function _(v){return new IFC4.IfcLuminousIntensityMeasure(v);},286949696:function _(v){return new IFC4.IfcMagneticFluxDensityMeasure(v);},2486716878:function _(v){return new IFC4.IfcMagneticFluxMeasure(v);},1477762836:function _(v){return new IFC4.IfcMassDensityMeasure(v);},4017473158:function _(v){return new IFC4.IfcMassFlowRateMeasure(v);},3124614049:function _(v){return new IFC4.IfcMassMeasure(v);},3531705166:function _(v){return new IFC4.IfcMassPerLengthMeasure(v);},3341486342:function _(v){return new IFC4.IfcModulusOfElasticityMeasure(v);},2173214787:function _(v){return new IFC4.IfcModulusOfLinearSubgradeReactionMeasure(v);},1052454078:function _(v){return new IFC4.IfcModulusOfRotationalSubgradeReactionMeasure(v);},1753493141:function _(v){return new IFC4.IfcModulusOfSubgradeReactionMeasure(v);},3177669450:function _(v){return new IFC4.IfcMoistureDiffusivityMeasure(v);},1648970520:function _(v){return new IFC4.IfcMolecularWeightMeasure(v);},3114022597:function _(v){return new IFC4.IfcMomentOfInertiaMeasure(v);},2615040989:function _(v){return new IFC4.IfcMonetaryMeasure(v);},765770214:function _(v){return new IFC4.IfcMonthInYearNumber(v);},525895558:function _(v){return new IFC4.IfcNonNegativeLengthMeasure(v);},2095195183:function _(v){return new IFC4.IfcNormalisedRatioMeasure(v);},2395907400:function _(v){return new IFC4.IfcNumericMeasure(v);},929793134:function _(v){return new IFC4.IfcPHMeasure(v);},2260317790:function _(v){return new IFC4.IfcParameterValue(v);},2642773653:function _(v){return new IFC4.IfcPlanarForceMeasure(v);},4042175685:function _(v){return new IFC4.IfcPlaneAngleMeasure(v);},1790229001:function _(v){return new IFC4.IfcPositiveInteger(v);},2815919920:function _(v){return new IFC4.IfcPositiveLengthMeasure(v);},3054510233:function _(v){return new IFC4.IfcPositivePlaneAngleMeasure(v);},1245737093:function _(v){return new IFC4.IfcPositiveRatioMeasure(v);},1364037233:function _(v){return new IFC4.IfcPowerMeasure(v);},2169031380:function _(v){return new IFC4.IfcPresentableText(v);},3665567075:function _(v){return new IFC4.IfcPressureMeasure(v);},2798247006:function _(v){return new IFC4.IfcPropertySetDefinitionSet(v);},3972513137:function _(v){return new IFC4.IfcRadioActivityMeasure(v);},96294661:function _(v){return new IFC4.IfcRatioMeasure(v);},200335297:function _(v){return new IFC4.IfcReal(v);},2133746277:function _(v){return new IFC4.IfcRotationalFrequencyMeasure(v);},1755127002:function _(v){return new IFC4.IfcRotationalMassMeasure(v);},3211557302:function _(v){return new IFC4.IfcRotationalStiffnessMeasure(v);},3467162246:function _(v){return new IFC4.IfcSectionModulusMeasure(v);},2190458107:function _(v){return new IFC4.IfcSectionalAreaIntegralMeasure(v);},408310005:function _(v){return new IFC4.IfcShearModulusMeasure(v);},3471399674:function _(v){return new IFC4.IfcSolidAngleMeasure(v);},4157543285:function _(v){return new IFC4.IfcSoundPowerLevelMeasure(v);},846465480:function _(v){return new IFC4.IfcSoundPowerMeasure(v);},3457685358:function _(v){return new IFC4.IfcSoundPressureLevelMeasure(v);},993287707:function _(v){return new IFC4.IfcSoundPressureMeasure(v);},3477203348:function _(v){return new IFC4.IfcSpecificHeatCapacityMeasure(v);},2757832317:function _(v){return new IFC4.IfcSpecularExponent(v);},361837227:function _(v){return new IFC4.IfcSpecularRoughness(v);},58845555:function _(v){return new IFC4.IfcTemperatureGradientMeasure(v);},1209108979:function _(v){return new IFC4.IfcTemperatureRateOfChangeMeasure(v);},2801250643:function _(v){return new IFC4.IfcText(v);},1460886941:function _(v){return new IFC4.IfcTextAlignment(v);},3490877962:function _(v){return new IFC4.IfcTextDecoration(v);},603696268:function _(v){return new IFC4.IfcTextFontName(v);},296282323:function _(v){return new IFC4.IfcTextTransformation(v);},232962298:function _(v){return new IFC4.IfcThermalAdmittanceMeasure(v);},2645777649:function _(v){return new IFC4.IfcThermalConductivityMeasure(v);},2281867870:function _(v){return new IFC4.IfcThermalExpansionCoefficientMeasure(v);},857959152:function _(v){return new IFC4.IfcThermalResistanceMeasure(v);},2016195849:function _(v){return new IFC4.IfcThermalTransmittanceMeasure(v);},743184107:function _(v){return new IFC4.IfcThermodynamicTemperatureMeasure(v);},4075327185:function _(v){return new IFC4.IfcTime(v);},2726807636:function _(v){return new IFC4.IfcTimeMeasure(v);},2591213694:function _(v){return new IFC4.IfcTimeStamp(v);},1278329552:function _(v){return new IFC4.IfcTorqueMeasure(v);},950732822:function _(v){return new IFC4.IfcURIReference(v);},3345633955:function _(v){return new IFC4.IfcVaporPermeabilityMeasure(v);},3458127941:function _(v){return new IFC4.IfcVolumeMeasure(v);},2593997549:function _(v){return new IFC4.IfcVolumetricFlowRateMeasure(v);},51269191:function _(v){return new IFC4.IfcWarpingConstantMeasure(v);},1718600412:function _(v){return new IFC4.IfcWarpingMomentMeasure(v);}};var IFC4;(function(IFC42){var IfcAbsorbedDoseMeasure=/*#__PURE__*/_createClass(function IfcAbsorbedDoseMeasure(v){_classCallCheck(this,IfcAbsorbedDoseMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcAbsorbedDoseMeasure=IfcAbsorbedDoseMeasure;var IfcAccelerationMeasure=/*#__PURE__*/_createClass(function IfcAccelerationMeasure(v){_classCallCheck(this,IfcAccelerationMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcAccelerationMeasure=IfcAccelerationMeasure;var IfcAmountOfSubstanceMeasure=/*#__PURE__*/_createClass(function IfcAmountOfSubstanceMeasure(v){_classCallCheck(this,IfcAmountOfSubstanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcAmountOfSubstanceMeasure=IfcAmountOfSubstanceMeasure;var IfcAngularVelocityMeasure=/*#__PURE__*/_createClass(function IfcAngularVelocityMeasure(v){_classCallCheck(this,IfcAngularVelocityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcAngularVelocityMeasure=IfcAngularVelocityMeasure;var IfcArcIndex=/*#__PURE__*/_createClass(function IfcArcIndex(value){_classCallCheck(this,IfcArcIndex);this.value=value;});IFC42.IfcArcIndex=IfcArcIndex;var IfcAreaDensityMeasure=/*#__PURE__*/_createClass(function IfcAreaDensityMeasure(v){_classCallCheck(this,IfcAreaDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcAreaDensityMeasure=IfcAreaDensityMeasure;var IfcAreaMeasure=/*#__PURE__*/_createClass(function IfcAreaMeasure(v){_classCallCheck(this,IfcAreaMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcAreaMeasure=IfcAreaMeasure;var IfcBinary=/*#__PURE__*/_createClass(function IfcBinary(v){_classCallCheck(this,IfcBinary);this.type=4;this.value=parseFloat(v);});IFC42.IfcBinary=IfcBinary;var IfcBoolean=/*#__PURE__*/_createClass(function IfcBoolean(v){_classCallCheck(this,IfcBoolean);this.type=3;this.value=v=="true"?true:false;});IFC42.IfcBoolean=IfcBoolean;var IfcBoxAlignment=/*#__PURE__*/_createClass(function IfcBoxAlignment(value){_classCallCheck(this,IfcBoxAlignment);this.value=value;this.type=1;});IFC42.IfcBoxAlignment=IfcBoxAlignment;var IfcCardinalPointReference=/*#__PURE__*/_createClass(function IfcCardinalPointReference(v){_classCallCheck(this,IfcCardinalPointReference);this.type=4;this.value=parseFloat(v);});IFC42.IfcCardinalPointReference=IfcCardinalPointReference;var IfcComplexNumber=/*#__PURE__*/_createClass(function IfcComplexNumber(value){_classCallCheck(this,IfcComplexNumber);this.value=value;});IFC42.IfcComplexNumber=IfcComplexNumber;var IfcCompoundPlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcCompoundPlaneAngleMeasure(value){_classCallCheck(this,IfcCompoundPlaneAngleMeasure);this.value=value;});IFC42.IfcCompoundPlaneAngleMeasure=IfcCompoundPlaneAngleMeasure;var IfcContextDependentMeasure=/*#__PURE__*/_createClass(function IfcContextDependentMeasure(v){_classCallCheck(this,IfcContextDependentMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcContextDependentMeasure=IfcContextDependentMeasure;var IfcCountMeasure=/*#__PURE__*/_createClass(function IfcCountMeasure(v){_classCallCheck(this,IfcCountMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcCountMeasure=IfcCountMeasure;var IfcCurvatureMeasure=/*#__PURE__*/_createClass(function IfcCurvatureMeasure(v){_classCallCheck(this,IfcCurvatureMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcCurvatureMeasure=IfcCurvatureMeasure;var IfcDate=/*#__PURE__*/_createClass(function IfcDate(value){_classCallCheck(this,IfcDate);this.value=value;this.type=1;});IFC42.IfcDate=IfcDate;var IfcDateTime=/*#__PURE__*/_createClass(function IfcDateTime(value){_classCallCheck(this,IfcDateTime);this.value=value;this.type=1;});IFC42.IfcDateTime=IfcDateTime;var IfcDayInMonthNumber=/*#__PURE__*/_createClass(function IfcDayInMonthNumber(v){_classCallCheck(this,IfcDayInMonthNumber);this.type=4;this.value=parseFloat(v);});IFC42.IfcDayInMonthNumber=IfcDayInMonthNumber;var IfcDayInWeekNumber=/*#__PURE__*/_createClass(function IfcDayInWeekNumber(v){_classCallCheck(this,IfcDayInWeekNumber);this.type=4;this.value=parseFloat(v);});IFC42.IfcDayInWeekNumber=IfcDayInWeekNumber;var IfcDescriptiveMeasure=/*#__PURE__*/_createClass(function IfcDescriptiveMeasure(value){_classCallCheck(this,IfcDescriptiveMeasure);this.value=value;this.type=1;});IFC42.IfcDescriptiveMeasure=IfcDescriptiveMeasure;var IfcDimensionCount=/*#__PURE__*/_createClass(function IfcDimensionCount(v){_classCallCheck(this,IfcDimensionCount);this.type=4;this.value=parseFloat(v);});IFC42.IfcDimensionCount=IfcDimensionCount;var IfcDoseEquivalentMeasure=/*#__PURE__*/_createClass(function IfcDoseEquivalentMeasure(v){_classCallCheck(this,IfcDoseEquivalentMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcDoseEquivalentMeasure=IfcDoseEquivalentMeasure;var IfcDuration=/*#__PURE__*/_createClass(function IfcDuration(value){_classCallCheck(this,IfcDuration);this.value=value;this.type=1;});IFC42.IfcDuration=IfcDuration;var IfcDynamicViscosityMeasure=/*#__PURE__*/_createClass(function IfcDynamicViscosityMeasure(v){_classCallCheck(this,IfcDynamicViscosityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcDynamicViscosityMeasure=IfcDynamicViscosityMeasure;var IfcElectricCapacitanceMeasure=/*#__PURE__*/_createClass(function IfcElectricCapacitanceMeasure(v){_classCallCheck(this,IfcElectricCapacitanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcElectricCapacitanceMeasure=IfcElectricCapacitanceMeasure;var IfcElectricChargeMeasure=/*#__PURE__*/_createClass(function IfcElectricChargeMeasure(v){_classCallCheck(this,IfcElectricChargeMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcElectricChargeMeasure=IfcElectricChargeMeasure;var IfcElectricConductanceMeasure=/*#__PURE__*/_createClass(function IfcElectricConductanceMeasure(v){_classCallCheck(this,IfcElectricConductanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcElectricConductanceMeasure=IfcElectricConductanceMeasure;var IfcElectricCurrentMeasure=/*#__PURE__*/_createClass(function IfcElectricCurrentMeasure(v){_classCallCheck(this,IfcElectricCurrentMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcElectricCurrentMeasure=IfcElectricCurrentMeasure;var IfcElectricResistanceMeasure=/*#__PURE__*/_createClass(function IfcElectricResistanceMeasure(v){_classCallCheck(this,IfcElectricResistanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcElectricResistanceMeasure=IfcElectricResistanceMeasure;var IfcElectricVoltageMeasure=/*#__PURE__*/_createClass(function IfcElectricVoltageMeasure(v){_classCallCheck(this,IfcElectricVoltageMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcElectricVoltageMeasure=IfcElectricVoltageMeasure;var IfcEnergyMeasure=/*#__PURE__*/_createClass(function IfcEnergyMeasure(v){_classCallCheck(this,IfcEnergyMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcEnergyMeasure=IfcEnergyMeasure;var IfcFontStyle=/*#__PURE__*/_createClass(function IfcFontStyle(value){_classCallCheck(this,IfcFontStyle);this.value=value;this.type=1;});IFC42.IfcFontStyle=IfcFontStyle;var IfcFontVariant=/*#__PURE__*/_createClass(function IfcFontVariant(value){_classCallCheck(this,IfcFontVariant);this.value=value;this.type=1;});IFC42.IfcFontVariant=IfcFontVariant;var IfcFontWeight=/*#__PURE__*/_createClass(function IfcFontWeight(value){_classCallCheck(this,IfcFontWeight);this.value=value;this.type=1;});IFC42.IfcFontWeight=IfcFontWeight;var IfcForceMeasure=/*#__PURE__*/_createClass(function IfcForceMeasure(v){_classCallCheck(this,IfcForceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcForceMeasure=IfcForceMeasure;var IfcFrequencyMeasure=/*#__PURE__*/_createClass(function IfcFrequencyMeasure(v){_classCallCheck(this,IfcFrequencyMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcFrequencyMeasure=IfcFrequencyMeasure;var IfcGloballyUniqueId=/*#__PURE__*/_createClass(function IfcGloballyUniqueId(value){_classCallCheck(this,IfcGloballyUniqueId);this.value=value;this.type=1;});IFC42.IfcGloballyUniqueId=IfcGloballyUniqueId;var IfcHeatFluxDensityMeasure=/*#__PURE__*/_createClass(function IfcHeatFluxDensityMeasure(v){_classCallCheck(this,IfcHeatFluxDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcHeatFluxDensityMeasure=IfcHeatFluxDensityMeasure;var IfcHeatingValueMeasure=/*#__PURE__*/_createClass(function IfcHeatingValueMeasure(v){_classCallCheck(this,IfcHeatingValueMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcHeatingValueMeasure=IfcHeatingValueMeasure;var IfcIdentifier=/*#__PURE__*/_createClass(function IfcIdentifier(value){_classCallCheck(this,IfcIdentifier);this.value=value;this.type=1;});IFC42.IfcIdentifier=IfcIdentifier;var IfcIlluminanceMeasure=/*#__PURE__*/_createClass(function IfcIlluminanceMeasure(v){_classCallCheck(this,IfcIlluminanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcIlluminanceMeasure=IfcIlluminanceMeasure;var IfcInductanceMeasure=/*#__PURE__*/_createClass(function IfcInductanceMeasure(v){_classCallCheck(this,IfcInductanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcInductanceMeasure=IfcInductanceMeasure;var IfcInteger=/*#__PURE__*/_createClass(function IfcInteger(v){_classCallCheck(this,IfcInteger);this.type=4;this.value=parseFloat(v);});IFC42.IfcInteger=IfcInteger;var IfcIntegerCountRateMeasure=/*#__PURE__*/_createClass(function IfcIntegerCountRateMeasure(v){_classCallCheck(this,IfcIntegerCountRateMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcIntegerCountRateMeasure=IfcIntegerCountRateMeasure;var IfcIonConcentrationMeasure=/*#__PURE__*/_createClass(function IfcIonConcentrationMeasure(v){_classCallCheck(this,IfcIonConcentrationMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcIonConcentrationMeasure=IfcIonConcentrationMeasure;var IfcIsothermalMoistureCapacityMeasure=/*#__PURE__*/_createClass(function IfcIsothermalMoistureCapacityMeasure(v){_classCallCheck(this,IfcIsothermalMoistureCapacityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcIsothermalMoistureCapacityMeasure=IfcIsothermalMoistureCapacityMeasure;var IfcKinematicViscosityMeasure=/*#__PURE__*/_createClass(function IfcKinematicViscosityMeasure(v){_classCallCheck(this,IfcKinematicViscosityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcKinematicViscosityMeasure=IfcKinematicViscosityMeasure;var IfcLabel=/*#__PURE__*/_createClass(function IfcLabel(value){_classCallCheck(this,IfcLabel);this.value=value;this.type=1;});IFC42.IfcLabel=IfcLabel;var IfcLanguageId=/*#__PURE__*/_createClass(function IfcLanguageId(value){_classCallCheck(this,IfcLanguageId);this.value=value;this.type=1;});IFC42.IfcLanguageId=IfcLanguageId;var IfcLengthMeasure=/*#__PURE__*/_createClass(function IfcLengthMeasure(v){_classCallCheck(this,IfcLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLengthMeasure=IfcLengthMeasure;var IfcLineIndex=/*#__PURE__*/_createClass(function IfcLineIndex(value){_classCallCheck(this,IfcLineIndex);this.value=value;});IFC42.IfcLineIndex=IfcLineIndex;var IfcLinearForceMeasure=/*#__PURE__*/_createClass(function IfcLinearForceMeasure(v){_classCallCheck(this,IfcLinearForceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLinearForceMeasure=IfcLinearForceMeasure;var IfcLinearMomentMeasure=/*#__PURE__*/_createClass(function IfcLinearMomentMeasure(v){_classCallCheck(this,IfcLinearMomentMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLinearMomentMeasure=IfcLinearMomentMeasure;var IfcLinearStiffnessMeasure=/*#__PURE__*/_createClass(function IfcLinearStiffnessMeasure(v){_classCallCheck(this,IfcLinearStiffnessMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLinearStiffnessMeasure=IfcLinearStiffnessMeasure;var IfcLinearVelocityMeasure=/*#__PURE__*/_createClass(function IfcLinearVelocityMeasure(v){_classCallCheck(this,IfcLinearVelocityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLinearVelocityMeasure=IfcLinearVelocityMeasure;var IfcLogical=/*#__PURE__*/_createClass(function IfcLogical(v){_classCallCheck(this,IfcLogical);this.type=3;this.value=v=="true"?true:false;});IFC42.IfcLogical=IfcLogical;var IfcLuminousFluxMeasure=/*#__PURE__*/_createClass(function IfcLuminousFluxMeasure(v){_classCallCheck(this,IfcLuminousFluxMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLuminousFluxMeasure=IfcLuminousFluxMeasure;var IfcLuminousIntensityDistributionMeasure=/*#__PURE__*/_createClass(function IfcLuminousIntensityDistributionMeasure(v){_classCallCheck(this,IfcLuminousIntensityDistributionMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLuminousIntensityDistributionMeasure=IfcLuminousIntensityDistributionMeasure;var IfcLuminousIntensityMeasure=/*#__PURE__*/_createClass(function IfcLuminousIntensityMeasure(v){_classCallCheck(this,IfcLuminousIntensityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcLuminousIntensityMeasure=IfcLuminousIntensityMeasure;var IfcMagneticFluxDensityMeasure=/*#__PURE__*/_createClass(function IfcMagneticFluxDensityMeasure(v){_classCallCheck(this,IfcMagneticFluxDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMagneticFluxDensityMeasure=IfcMagneticFluxDensityMeasure;var IfcMagneticFluxMeasure=/*#__PURE__*/_createClass(function IfcMagneticFluxMeasure(v){_classCallCheck(this,IfcMagneticFluxMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMagneticFluxMeasure=IfcMagneticFluxMeasure;var IfcMassDensityMeasure=/*#__PURE__*/_createClass(function IfcMassDensityMeasure(v){_classCallCheck(this,IfcMassDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMassDensityMeasure=IfcMassDensityMeasure;var IfcMassFlowRateMeasure=/*#__PURE__*/_createClass(function IfcMassFlowRateMeasure(v){_classCallCheck(this,IfcMassFlowRateMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMassFlowRateMeasure=IfcMassFlowRateMeasure;var IfcMassMeasure=/*#__PURE__*/_createClass(function IfcMassMeasure(v){_classCallCheck(this,IfcMassMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMassMeasure=IfcMassMeasure;var IfcMassPerLengthMeasure=/*#__PURE__*/_createClass(function IfcMassPerLengthMeasure(v){_classCallCheck(this,IfcMassPerLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMassPerLengthMeasure=IfcMassPerLengthMeasure;var IfcModulusOfElasticityMeasure=/*#__PURE__*/_createClass(function IfcModulusOfElasticityMeasure(v){_classCallCheck(this,IfcModulusOfElasticityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcModulusOfElasticityMeasure=IfcModulusOfElasticityMeasure;var IfcModulusOfLinearSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfLinearSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfLinearSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcModulusOfLinearSubgradeReactionMeasure=IfcModulusOfLinearSubgradeReactionMeasure;var IfcModulusOfRotationalSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfRotationalSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfRotationalSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcModulusOfRotationalSubgradeReactionMeasure=IfcModulusOfRotationalSubgradeReactionMeasure;var IfcModulusOfSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcModulusOfSubgradeReactionMeasure=IfcModulusOfSubgradeReactionMeasure;var IfcMoistureDiffusivityMeasure=/*#__PURE__*/_createClass(function IfcMoistureDiffusivityMeasure(v){_classCallCheck(this,IfcMoistureDiffusivityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMoistureDiffusivityMeasure=IfcMoistureDiffusivityMeasure;var IfcMolecularWeightMeasure=/*#__PURE__*/_createClass(function IfcMolecularWeightMeasure(v){_classCallCheck(this,IfcMolecularWeightMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMolecularWeightMeasure=IfcMolecularWeightMeasure;var IfcMomentOfInertiaMeasure=/*#__PURE__*/_createClass(function IfcMomentOfInertiaMeasure(v){_classCallCheck(this,IfcMomentOfInertiaMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMomentOfInertiaMeasure=IfcMomentOfInertiaMeasure;var IfcMonetaryMeasure=/*#__PURE__*/_createClass(function IfcMonetaryMeasure(v){_classCallCheck(this,IfcMonetaryMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcMonetaryMeasure=IfcMonetaryMeasure;var IfcMonthInYearNumber=/*#__PURE__*/_createClass(function IfcMonthInYearNumber(v){_classCallCheck(this,IfcMonthInYearNumber);this.type=4;this.value=parseFloat(v);});IFC42.IfcMonthInYearNumber=IfcMonthInYearNumber;var IfcNonNegativeLengthMeasure=/*#__PURE__*/_createClass(function IfcNonNegativeLengthMeasure(v){_classCallCheck(this,IfcNonNegativeLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcNonNegativeLengthMeasure=IfcNonNegativeLengthMeasure;var IfcNormalisedRatioMeasure=/*#__PURE__*/_createClass(function IfcNormalisedRatioMeasure(v){_classCallCheck(this,IfcNormalisedRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcNormalisedRatioMeasure=IfcNormalisedRatioMeasure;var IfcNumericMeasure=/*#__PURE__*/_createClass(function IfcNumericMeasure(v){_classCallCheck(this,IfcNumericMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcNumericMeasure=IfcNumericMeasure;var IfcPHMeasure=/*#__PURE__*/_createClass(function IfcPHMeasure(v){_classCallCheck(this,IfcPHMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPHMeasure=IfcPHMeasure;var IfcParameterValue=/*#__PURE__*/_createClass(function IfcParameterValue(v){_classCallCheck(this,IfcParameterValue);this.type=4;this.value=parseFloat(v);});IFC42.IfcParameterValue=IfcParameterValue;var IfcPlanarForceMeasure=/*#__PURE__*/_createClass(function IfcPlanarForceMeasure(v){_classCallCheck(this,IfcPlanarForceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPlanarForceMeasure=IfcPlanarForceMeasure;var IfcPlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcPlaneAngleMeasure(v){_classCallCheck(this,IfcPlaneAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPlaneAngleMeasure=IfcPlaneAngleMeasure;var IfcPositiveInteger=/*#__PURE__*/_createClass(function IfcPositiveInteger(v){_classCallCheck(this,IfcPositiveInteger);this.type=4;this.value=parseFloat(v);});IFC42.IfcPositiveInteger=IfcPositiveInteger;var IfcPositiveLengthMeasure=/*#__PURE__*/_createClass(function IfcPositiveLengthMeasure(v){_classCallCheck(this,IfcPositiveLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPositiveLengthMeasure=IfcPositiveLengthMeasure;var IfcPositivePlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcPositivePlaneAngleMeasure(v){_classCallCheck(this,IfcPositivePlaneAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPositivePlaneAngleMeasure=IfcPositivePlaneAngleMeasure;var IfcPositiveRatioMeasure=/*#__PURE__*/_createClass(function IfcPositiveRatioMeasure(v){_classCallCheck(this,IfcPositiveRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPositiveRatioMeasure=IfcPositiveRatioMeasure;var IfcPowerMeasure=/*#__PURE__*/_createClass(function IfcPowerMeasure(v){_classCallCheck(this,IfcPowerMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPowerMeasure=IfcPowerMeasure;var IfcPresentableText=/*#__PURE__*/_createClass(function IfcPresentableText(value){_classCallCheck(this,IfcPresentableText);this.value=value;this.type=1;});IFC42.IfcPresentableText=IfcPresentableText;var IfcPressureMeasure=/*#__PURE__*/_createClass(function IfcPressureMeasure(v){_classCallCheck(this,IfcPressureMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcPressureMeasure=IfcPressureMeasure;var IfcPropertySetDefinitionSet=/*#__PURE__*/_createClass(function IfcPropertySetDefinitionSet(value){_classCallCheck(this,IfcPropertySetDefinitionSet);this.value=value;});IFC42.IfcPropertySetDefinitionSet=IfcPropertySetDefinitionSet;var IfcRadioActivityMeasure=/*#__PURE__*/_createClass(function IfcRadioActivityMeasure(v){_classCallCheck(this,IfcRadioActivityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcRadioActivityMeasure=IfcRadioActivityMeasure;var IfcRatioMeasure=/*#__PURE__*/_createClass(function IfcRatioMeasure(v){_classCallCheck(this,IfcRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcRatioMeasure=IfcRatioMeasure;var IfcReal=/*#__PURE__*/_createClass(function IfcReal(v){_classCallCheck(this,IfcReal);this.type=4;this.value=parseFloat(v);});IFC42.IfcReal=IfcReal;var IfcRotationalFrequencyMeasure=/*#__PURE__*/_createClass(function IfcRotationalFrequencyMeasure(v){_classCallCheck(this,IfcRotationalFrequencyMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcRotationalFrequencyMeasure=IfcRotationalFrequencyMeasure;var IfcRotationalMassMeasure=/*#__PURE__*/_createClass(function IfcRotationalMassMeasure(v){_classCallCheck(this,IfcRotationalMassMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcRotationalMassMeasure=IfcRotationalMassMeasure;var IfcRotationalStiffnessMeasure=/*#__PURE__*/_createClass(function IfcRotationalStiffnessMeasure(v){_classCallCheck(this,IfcRotationalStiffnessMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcRotationalStiffnessMeasure=IfcRotationalStiffnessMeasure;var IfcSectionModulusMeasure=/*#__PURE__*/_createClass(function IfcSectionModulusMeasure(v){_classCallCheck(this,IfcSectionModulusMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSectionModulusMeasure=IfcSectionModulusMeasure;var IfcSectionalAreaIntegralMeasure=/*#__PURE__*/_createClass(function IfcSectionalAreaIntegralMeasure(v){_classCallCheck(this,IfcSectionalAreaIntegralMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSectionalAreaIntegralMeasure=IfcSectionalAreaIntegralMeasure;var IfcShearModulusMeasure=/*#__PURE__*/_createClass(function IfcShearModulusMeasure(v){_classCallCheck(this,IfcShearModulusMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcShearModulusMeasure=IfcShearModulusMeasure;var IfcSolidAngleMeasure=/*#__PURE__*/_createClass(function IfcSolidAngleMeasure(v){_classCallCheck(this,IfcSolidAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSolidAngleMeasure=IfcSolidAngleMeasure;var IfcSoundPowerLevelMeasure=/*#__PURE__*/_createClass(function IfcSoundPowerLevelMeasure(v){_classCallCheck(this,IfcSoundPowerLevelMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSoundPowerLevelMeasure=IfcSoundPowerLevelMeasure;var IfcSoundPowerMeasure=/*#__PURE__*/_createClass(function IfcSoundPowerMeasure(v){_classCallCheck(this,IfcSoundPowerMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSoundPowerMeasure=IfcSoundPowerMeasure;var IfcSoundPressureLevelMeasure=/*#__PURE__*/_createClass(function IfcSoundPressureLevelMeasure(v){_classCallCheck(this,IfcSoundPressureLevelMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSoundPressureLevelMeasure=IfcSoundPressureLevelMeasure;var IfcSoundPressureMeasure=/*#__PURE__*/_createClass(function IfcSoundPressureMeasure(v){_classCallCheck(this,IfcSoundPressureMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSoundPressureMeasure=IfcSoundPressureMeasure;var IfcSpecificHeatCapacityMeasure=/*#__PURE__*/_createClass(function IfcSpecificHeatCapacityMeasure(v){_classCallCheck(this,IfcSpecificHeatCapacityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcSpecificHeatCapacityMeasure=IfcSpecificHeatCapacityMeasure;var IfcSpecularExponent=/*#__PURE__*/_createClass(function IfcSpecularExponent(v){_classCallCheck(this,IfcSpecularExponent);this.type=4;this.value=parseFloat(v);});IFC42.IfcSpecularExponent=IfcSpecularExponent;var IfcSpecularRoughness=/*#__PURE__*/_createClass(function IfcSpecularRoughness(v){_classCallCheck(this,IfcSpecularRoughness);this.type=4;this.value=parseFloat(v);});IFC42.IfcSpecularRoughness=IfcSpecularRoughness;var IfcTemperatureGradientMeasure=/*#__PURE__*/_createClass(function IfcTemperatureGradientMeasure(v){_classCallCheck(this,IfcTemperatureGradientMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcTemperatureGradientMeasure=IfcTemperatureGradientMeasure;var IfcTemperatureRateOfChangeMeasure=/*#__PURE__*/_createClass(function IfcTemperatureRateOfChangeMeasure(v){_classCallCheck(this,IfcTemperatureRateOfChangeMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcTemperatureRateOfChangeMeasure=IfcTemperatureRateOfChangeMeasure;var IfcText=/*#__PURE__*/_createClass(function IfcText(value){_classCallCheck(this,IfcText);this.value=value;this.type=1;});IFC42.IfcText=IfcText;var IfcTextAlignment=/*#__PURE__*/_createClass(function IfcTextAlignment(value){_classCallCheck(this,IfcTextAlignment);this.value=value;this.type=1;});IFC42.IfcTextAlignment=IfcTextAlignment;var IfcTextDecoration=/*#__PURE__*/_createClass(function IfcTextDecoration(value){_classCallCheck(this,IfcTextDecoration);this.value=value;this.type=1;});IFC42.IfcTextDecoration=IfcTextDecoration;var IfcTextFontName=/*#__PURE__*/_createClass(function IfcTextFontName(value){_classCallCheck(this,IfcTextFontName);this.value=value;this.type=1;});IFC42.IfcTextFontName=IfcTextFontName;var IfcTextTransformation=/*#__PURE__*/_createClass(function IfcTextTransformation(value){_classCallCheck(this,IfcTextTransformation);this.value=value;this.type=1;});IFC42.IfcTextTransformation=IfcTextTransformation;var IfcThermalAdmittanceMeasure=/*#__PURE__*/_createClass(function IfcThermalAdmittanceMeasure(v){_classCallCheck(this,IfcThermalAdmittanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcThermalAdmittanceMeasure=IfcThermalAdmittanceMeasure;var IfcThermalConductivityMeasure=/*#__PURE__*/_createClass(function IfcThermalConductivityMeasure(v){_classCallCheck(this,IfcThermalConductivityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcThermalConductivityMeasure=IfcThermalConductivityMeasure;var IfcThermalExpansionCoefficientMeasure=/*#__PURE__*/_createClass(function IfcThermalExpansionCoefficientMeasure(v){_classCallCheck(this,IfcThermalExpansionCoefficientMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcThermalExpansionCoefficientMeasure=IfcThermalExpansionCoefficientMeasure;var IfcThermalResistanceMeasure=/*#__PURE__*/_createClass(function IfcThermalResistanceMeasure(v){_classCallCheck(this,IfcThermalResistanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcThermalResistanceMeasure=IfcThermalResistanceMeasure;var IfcThermalTransmittanceMeasure=/*#__PURE__*/_createClass(function IfcThermalTransmittanceMeasure(v){_classCallCheck(this,IfcThermalTransmittanceMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcThermalTransmittanceMeasure=IfcThermalTransmittanceMeasure;var IfcThermodynamicTemperatureMeasure=/*#__PURE__*/_createClass(function IfcThermodynamicTemperatureMeasure(v){_classCallCheck(this,IfcThermodynamicTemperatureMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcThermodynamicTemperatureMeasure=IfcThermodynamicTemperatureMeasure;var IfcTime=/*#__PURE__*/_createClass(function IfcTime(value){_classCallCheck(this,IfcTime);this.value=value;this.type=1;});IFC42.IfcTime=IfcTime;var IfcTimeMeasure=/*#__PURE__*/_createClass(function IfcTimeMeasure(v){_classCallCheck(this,IfcTimeMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcTimeMeasure=IfcTimeMeasure;var IfcTimeStamp=/*#__PURE__*/_createClass(function IfcTimeStamp(v){_classCallCheck(this,IfcTimeStamp);this.type=4;this.value=parseFloat(v);});IFC42.IfcTimeStamp=IfcTimeStamp;var IfcTorqueMeasure=/*#__PURE__*/_createClass(function IfcTorqueMeasure(v){_classCallCheck(this,IfcTorqueMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcTorqueMeasure=IfcTorqueMeasure;var IfcURIReference=/*#__PURE__*/_createClass(function IfcURIReference(value){_classCallCheck(this,IfcURIReference);this.value=value;this.type=1;});IFC42.IfcURIReference=IfcURIReference;var IfcVaporPermeabilityMeasure=/*#__PURE__*/_createClass(function IfcVaporPermeabilityMeasure(v){_classCallCheck(this,IfcVaporPermeabilityMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcVaporPermeabilityMeasure=IfcVaporPermeabilityMeasure;var IfcVolumeMeasure=/*#__PURE__*/_createClass(function IfcVolumeMeasure(v){_classCallCheck(this,IfcVolumeMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcVolumeMeasure=IfcVolumeMeasure;var IfcVolumetricFlowRateMeasure=/*#__PURE__*/_createClass(function IfcVolumetricFlowRateMeasure(v){_classCallCheck(this,IfcVolumetricFlowRateMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcVolumetricFlowRateMeasure=IfcVolumetricFlowRateMeasure;var IfcWarpingConstantMeasure=/*#__PURE__*/_createClass(function IfcWarpingConstantMeasure(v){_classCallCheck(this,IfcWarpingConstantMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcWarpingConstantMeasure=IfcWarpingConstantMeasure;var IfcWarpingMomentMeasure=/*#__PURE__*/_createClass(function IfcWarpingMomentMeasure(v){_classCallCheck(this,IfcWarpingMomentMeasure);this.type=4;this.value=parseFloat(v);});IFC42.IfcWarpingMomentMeasure=IfcWarpingMomentMeasure;var IfcActionRequestTypeEnum=/*#__PURE__*/_createClass(function IfcActionRequestTypeEnum(){_classCallCheck(this,IfcActionRequestTypeEnum);});IfcActionRequestTypeEnum.EMAIL={type:3,value:"EMAIL"};IfcActionRequestTypeEnum.FAX={type:3,value:"FAX"};IfcActionRequestTypeEnum.PHONE={type:3,value:"PHONE"};IfcActionRequestTypeEnum.POST={type:3,value:"POST"};IfcActionRequestTypeEnum.VERBAL={type:3,value:"VERBAL"};IfcActionRequestTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionRequestTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcActionRequestTypeEnum=IfcActionRequestTypeEnum;var IfcActionSourceTypeEnum=/*#__PURE__*/_createClass(function IfcActionSourceTypeEnum(){_classCallCheck(this,IfcActionSourceTypeEnum);});IfcActionSourceTypeEnum.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"};IfcActionSourceTypeEnum.COMPLETION_G1={type:3,value:"COMPLETION_G1"};IfcActionSourceTypeEnum.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"};IfcActionSourceTypeEnum.SNOW_S={type:3,value:"SNOW_S"};IfcActionSourceTypeEnum.WIND_W={type:3,value:"WIND_W"};IfcActionSourceTypeEnum.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"};IfcActionSourceTypeEnum.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"};IfcActionSourceTypeEnum.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"};IfcActionSourceTypeEnum.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"};IfcActionSourceTypeEnum.FIRE={type:3,value:"FIRE"};IfcActionSourceTypeEnum.IMPULSE={type:3,value:"IMPULSE"};IfcActionSourceTypeEnum.IMPACT={type:3,value:"IMPACT"};IfcActionSourceTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcActionSourceTypeEnum.ERECTION={type:3,value:"ERECTION"};IfcActionSourceTypeEnum.PROPPING={type:3,value:"PROPPING"};IfcActionSourceTypeEnum.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"};IfcActionSourceTypeEnum.SHRINKAGE={type:3,value:"SHRINKAGE"};IfcActionSourceTypeEnum.CREEP={type:3,value:"CREEP"};IfcActionSourceTypeEnum.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"};IfcActionSourceTypeEnum.BUOYANCY={type:3,value:"BUOYANCY"};IfcActionSourceTypeEnum.ICE={type:3,value:"ICE"};IfcActionSourceTypeEnum.CURRENT={type:3,value:"CURRENT"};IfcActionSourceTypeEnum.WAVE={type:3,value:"WAVE"};IfcActionSourceTypeEnum.RAIN={type:3,value:"RAIN"};IfcActionSourceTypeEnum.BRAKES={type:3,value:"BRAKES"};IfcActionSourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionSourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcActionSourceTypeEnum=IfcActionSourceTypeEnum;var IfcActionTypeEnum=/*#__PURE__*/_createClass(function IfcActionTypeEnum(){_classCallCheck(this,IfcActionTypeEnum);});IfcActionTypeEnum.PERMANENT_G={type:3,value:"PERMANENT_G"};IfcActionTypeEnum.VARIABLE_Q={type:3,value:"VARIABLE_Q"};IfcActionTypeEnum.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"};IfcActionTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcActionTypeEnum=IfcActionTypeEnum;var IfcActuatorTypeEnum=/*#__PURE__*/_createClass(function IfcActuatorTypeEnum(){_classCallCheck(this,IfcActuatorTypeEnum);});IfcActuatorTypeEnum.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"};IfcActuatorTypeEnum.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"};IfcActuatorTypeEnum.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"};IfcActuatorTypeEnum.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"};IfcActuatorTypeEnum.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"};IfcActuatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActuatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcActuatorTypeEnum=IfcActuatorTypeEnum;var IfcAddressTypeEnum=/*#__PURE__*/_createClass(function IfcAddressTypeEnum(){_classCallCheck(this,IfcAddressTypeEnum);});IfcAddressTypeEnum.OFFICE={type:3,value:"OFFICE"};IfcAddressTypeEnum.SITE={type:3,value:"SITE"};IfcAddressTypeEnum.HOME={type:3,value:"HOME"};IfcAddressTypeEnum.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"};IfcAddressTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC42.IfcAddressTypeEnum=IfcAddressTypeEnum;var IfcAirTerminalBoxTypeEnum=/*#__PURE__*/_createClass(function IfcAirTerminalBoxTypeEnum(){_classCallCheck(this,IfcAirTerminalBoxTypeEnum);});IfcAirTerminalBoxTypeEnum.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"};IfcAirTerminalBoxTypeEnum.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"};IfcAirTerminalBoxTypeEnum.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"};IfcAirTerminalBoxTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirTerminalBoxTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAirTerminalBoxTypeEnum=IfcAirTerminalBoxTypeEnum;var IfcAirTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcAirTerminalTypeEnum(){_classCallCheck(this,IfcAirTerminalTypeEnum);});IfcAirTerminalTypeEnum.DIFFUSER={type:3,value:"DIFFUSER"};IfcAirTerminalTypeEnum.GRILLE={type:3,value:"GRILLE"};IfcAirTerminalTypeEnum.LOUVRE={type:3,value:"LOUVRE"};IfcAirTerminalTypeEnum.REGISTER={type:3,value:"REGISTER"};IfcAirTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAirTerminalTypeEnum=IfcAirTerminalTypeEnum;var IfcAirToAirHeatRecoveryTypeEnum=/*#__PURE__*/_createClass(function IfcAirToAirHeatRecoveryTypeEnum(){_classCallCheck(this,IfcAirToAirHeatRecoveryTypeEnum);});IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"};IfcAirToAirHeatRecoveryTypeEnum.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"};IfcAirToAirHeatRecoveryTypeEnum.HEATPIPE={type:3,value:"HEATPIPE"};IfcAirToAirHeatRecoveryTypeEnum.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"};IfcAirToAirHeatRecoveryTypeEnum.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"};IfcAirToAirHeatRecoveryTypeEnum.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"};IfcAirToAirHeatRecoveryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirToAirHeatRecoveryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAirToAirHeatRecoveryTypeEnum=IfcAirToAirHeatRecoveryTypeEnum;var IfcAlarmTypeEnum=/*#__PURE__*/_createClass(function IfcAlarmTypeEnum(){_classCallCheck(this,IfcAlarmTypeEnum);});IfcAlarmTypeEnum.BELL={type:3,value:"BELL"};IfcAlarmTypeEnum.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"};IfcAlarmTypeEnum.LIGHT={type:3,value:"LIGHT"};IfcAlarmTypeEnum.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"};IfcAlarmTypeEnum.SIREN={type:3,value:"SIREN"};IfcAlarmTypeEnum.WHISTLE={type:3,value:"WHISTLE"};IfcAlarmTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAlarmTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAlarmTypeEnum=IfcAlarmTypeEnum;var IfcAnalysisModelTypeEnum=/*#__PURE__*/_createClass(function IfcAnalysisModelTypeEnum(){_classCallCheck(this,IfcAnalysisModelTypeEnum);});IfcAnalysisModelTypeEnum.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"};IfcAnalysisModelTypeEnum.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"};IfcAnalysisModelTypeEnum.LOADING_3D={type:3,value:"LOADING_3D"};IfcAnalysisModelTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAnalysisModelTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAnalysisModelTypeEnum=IfcAnalysisModelTypeEnum;var IfcAnalysisTheoryTypeEnum=/*#__PURE__*/_createClass(function IfcAnalysisTheoryTypeEnum(){_classCallCheck(this,IfcAnalysisTheoryTypeEnum);});IfcAnalysisTheoryTypeEnum.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"};IfcAnalysisTheoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAnalysisTheoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAnalysisTheoryTypeEnum=IfcAnalysisTheoryTypeEnum;var IfcArithmeticOperatorEnum=/*#__PURE__*/_createClass(function IfcArithmeticOperatorEnum(){_classCallCheck(this,IfcArithmeticOperatorEnum);});IfcArithmeticOperatorEnum.ADD={type:3,value:"ADD"};IfcArithmeticOperatorEnum.DIVIDE={type:3,value:"DIVIDE"};IfcArithmeticOperatorEnum.MULTIPLY={type:3,value:"MULTIPLY"};IfcArithmeticOperatorEnum.SUBTRACT={type:3,value:"SUBTRACT"};IFC42.IfcArithmeticOperatorEnum=IfcArithmeticOperatorEnum;var IfcAssemblyPlaceEnum=/*#__PURE__*/_createClass(function IfcAssemblyPlaceEnum(){_classCallCheck(this,IfcAssemblyPlaceEnum);});IfcAssemblyPlaceEnum.SITE={type:3,value:"SITE"};IfcAssemblyPlaceEnum.FACTORY={type:3,value:"FACTORY"};IfcAssemblyPlaceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAssemblyPlaceEnum=IfcAssemblyPlaceEnum;var IfcAudioVisualApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcAudioVisualApplianceTypeEnum(){_classCallCheck(this,IfcAudioVisualApplianceTypeEnum);});IfcAudioVisualApplianceTypeEnum.AMPLIFIER={type:3,value:"AMPLIFIER"};IfcAudioVisualApplianceTypeEnum.CAMERA={type:3,value:"CAMERA"};IfcAudioVisualApplianceTypeEnum.DISPLAY={type:3,value:"DISPLAY"};IfcAudioVisualApplianceTypeEnum.MICROPHONE={type:3,value:"MICROPHONE"};IfcAudioVisualApplianceTypeEnum.PLAYER={type:3,value:"PLAYER"};IfcAudioVisualApplianceTypeEnum.PROJECTOR={type:3,value:"PROJECTOR"};IfcAudioVisualApplianceTypeEnum.RECEIVER={type:3,value:"RECEIVER"};IfcAudioVisualApplianceTypeEnum.SPEAKER={type:3,value:"SPEAKER"};IfcAudioVisualApplianceTypeEnum.SWITCHER={type:3,value:"SWITCHER"};IfcAudioVisualApplianceTypeEnum.TELEPHONE={type:3,value:"TELEPHONE"};IfcAudioVisualApplianceTypeEnum.TUNER={type:3,value:"TUNER"};IfcAudioVisualApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAudioVisualApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcAudioVisualApplianceTypeEnum=IfcAudioVisualApplianceTypeEnum;var IfcBSplineCurveForm=/*#__PURE__*/_createClass(function IfcBSplineCurveForm(){_classCallCheck(this,IfcBSplineCurveForm);});IfcBSplineCurveForm.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"};IfcBSplineCurveForm.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"};IfcBSplineCurveForm.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"};IfcBSplineCurveForm.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"};IfcBSplineCurveForm.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"};IfcBSplineCurveForm.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC42.IfcBSplineCurveForm=IfcBSplineCurveForm;var IfcBSplineSurfaceForm=/*#__PURE__*/_createClass(function IfcBSplineSurfaceForm(){_classCallCheck(this,IfcBSplineSurfaceForm);});IfcBSplineSurfaceForm.PLANE_SURF={type:3,value:"PLANE_SURF"};IfcBSplineSurfaceForm.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"};IfcBSplineSurfaceForm.CONICAL_SURF={type:3,value:"CONICAL_SURF"};IfcBSplineSurfaceForm.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"};IfcBSplineSurfaceForm.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"};IfcBSplineSurfaceForm.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"};IfcBSplineSurfaceForm.RULED_SURF={type:3,value:"RULED_SURF"};IfcBSplineSurfaceForm.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"};IfcBSplineSurfaceForm.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"};IfcBSplineSurfaceForm.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"};IfcBSplineSurfaceForm.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC42.IfcBSplineSurfaceForm=IfcBSplineSurfaceForm;var IfcBeamTypeEnum=/*#__PURE__*/_createClass(function IfcBeamTypeEnum(){_classCallCheck(this,IfcBeamTypeEnum);});IfcBeamTypeEnum.BEAM={type:3,value:"BEAM"};IfcBeamTypeEnum.JOIST={type:3,value:"JOIST"};IfcBeamTypeEnum.HOLLOWCORE={type:3,value:"HOLLOWCORE"};IfcBeamTypeEnum.LINTEL={type:3,value:"LINTEL"};IfcBeamTypeEnum.SPANDREL={type:3,value:"SPANDREL"};IfcBeamTypeEnum.T_BEAM={type:3,value:"T_BEAM"};IfcBeamTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBeamTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcBeamTypeEnum=IfcBeamTypeEnum;var IfcBenchmarkEnum=/*#__PURE__*/_createClass(function IfcBenchmarkEnum(){_classCallCheck(this,IfcBenchmarkEnum);});IfcBenchmarkEnum.GREATERTHAN={type:3,value:"GREATERTHAN"};IfcBenchmarkEnum.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"};IfcBenchmarkEnum.LESSTHAN={type:3,value:"LESSTHAN"};IfcBenchmarkEnum.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"};IfcBenchmarkEnum.EQUALTO={type:3,value:"EQUALTO"};IfcBenchmarkEnum.NOTEQUALTO={type:3,value:"NOTEQUALTO"};IfcBenchmarkEnum.INCLUDES={type:3,value:"INCLUDES"};IfcBenchmarkEnum.NOTINCLUDES={type:3,value:"NOTINCLUDES"};IfcBenchmarkEnum.INCLUDEDIN={type:3,value:"INCLUDEDIN"};IfcBenchmarkEnum.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"};IFC42.IfcBenchmarkEnum=IfcBenchmarkEnum;var IfcBoilerTypeEnum=/*#__PURE__*/_createClass(function IfcBoilerTypeEnum(){_classCallCheck(this,IfcBoilerTypeEnum);});IfcBoilerTypeEnum.WATER={type:3,value:"WATER"};IfcBoilerTypeEnum.STEAM={type:3,value:"STEAM"};IfcBoilerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBoilerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcBoilerTypeEnum=IfcBoilerTypeEnum;var IfcBooleanOperator=/*#__PURE__*/_createClass(function IfcBooleanOperator(){_classCallCheck(this,IfcBooleanOperator);});IfcBooleanOperator.UNION={type:3,value:"UNION"};IfcBooleanOperator.INTERSECTION={type:3,value:"INTERSECTION"};IfcBooleanOperator.DIFFERENCE={type:3,value:"DIFFERENCE"};IFC42.IfcBooleanOperator=IfcBooleanOperator;var IfcBuildingElementPartTypeEnum=/*#__PURE__*/_createClass(function IfcBuildingElementPartTypeEnum(){_classCallCheck(this,IfcBuildingElementPartTypeEnum);});IfcBuildingElementPartTypeEnum.INSULATION={type:3,value:"INSULATION"};IfcBuildingElementPartTypeEnum.PRECASTPANEL={type:3,value:"PRECASTPANEL"};IfcBuildingElementPartTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuildingElementPartTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcBuildingElementPartTypeEnum=IfcBuildingElementPartTypeEnum;var IfcBuildingElementProxyTypeEnum=/*#__PURE__*/_createClass(function IfcBuildingElementProxyTypeEnum(){_classCallCheck(this,IfcBuildingElementProxyTypeEnum);});IfcBuildingElementProxyTypeEnum.COMPLEX={type:3,value:"COMPLEX"};IfcBuildingElementProxyTypeEnum.ELEMENT={type:3,value:"ELEMENT"};IfcBuildingElementProxyTypeEnum.PARTIAL={type:3,value:"PARTIAL"};IfcBuildingElementProxyTypeEnum.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"};IfcBuildingElementProxyTypeEnum.PROVISIONFORSPACE={type:3,value:"PROVISIONFORSPACE"};IfcBuildingElementProxyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuildingElementProxyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcBuildingElementProxyTypeEnum=IfcBuildingElementProxyTypeEnum;var IfcBuildingSystemTypeEnum=/*#__PURE__*/_createClass(function IfcBuildingSystemTypeEnum(){_classCallCheck(this,IfcBuildingSystemTypeEnum);});IfcBuildingSystemTypeEnum.FENESTRATION={type:3,value:"FENESTRATION"};IfcBuildingSystemTypeEnum.FOUNDATION={type:3,value:"FOUNDATION"};IfcBuildingSystemTypeEnum.LOADBEARING={type:3,value:"LOADBEARING"};IfcBuildingSystemTypeEnum.OUTERSHELL={type:3,value:"OUTERSHELL"};IfcBuildingSystemTypeEnum.SHADING={type:3,value:"SHADING"};IfcBuildingSystemTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcBuildingSystemTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuildingSystemTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcBuildingSystemTypeEnum=IfcBuildingSystemTypeEnum;var IfcBurnerTypeEnum=/*#__PURE__*/_createClass(function IfcBurnerTypeEnum(){_classCallCheck(this,IfcBurnerTypeEnum);});IfcBurnerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBurnerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcBurnerTypeEnum=IfcBurnerTypeEnum;var IfcCableCarrierFittingTypeEnum=/*#__PURE__*/_createClass(function IfcCableCarrierFittingTypeEnum(){_classCallCheck(this,IfcCableCarrierFittingTypeEnum);});IfcCableCarrierFittingTypeEnum.BEND={type:3,value:"BEND"};IfcCableCarrierFittingTypeEnum.CROSS={type:3,value:"CROSS"};IfcCableCarrierFittingTypeEnum.REDUCER={type:3,value:"REDUCER"};IfcCableCarrierFittingTypeEnum.TEE={type:3,value:"TEE"};IfcCableCarrierFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableCarrierFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCableCarrierFittingTypeEnum=IfcCableCarrierFittingTypeEnum;var IfcCableCarrierSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcCableCarrierSegmentTypeEnum(){_classCallCheck(this,IfcCableCarrierSegmentTypeEnum);});IfcCableCarrierSegmentTypeEnum.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"};IfcCableCarrierSegmentTypeEnum.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"};IfcCableCarrierSegmentTypeEnum.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"};IfcCableCarrierSegmentTypeEnum.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"};IfcCableCarrierSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableCarrierSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCableCarrierSegmentTypeEnum=IfcCableCarrierSegmentTypeEnum;var IfcCableFittingTypeEnum=/*#__PURE__*/_createClass(function IfcCableFittingTypeEnum(){_classCallCheck(this,IfcCableFittingTypeEnum);});IfcCableFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcCableFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcCableFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcCableFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcCableFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcCableFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCableFittingTypeEnum=IfcCableFittingTypeEnum;var IfcCableSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcCableSegmentTypeEnum(){_classCallCheck(this,IfcCableSegmentTypeEnum);});IfcCableSegmentTypeEnum.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"};IfcCableSegmentTypeEnum.CABLESEGMENT={type:3,value:"CABLESEGMENT"};IfcCableSegmentTypeEnum.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"};IfcCableSegmentTypeEnum.CORESEGMENT={type:3,value:"CORESEGMENT"};IfcCableSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCableSegmentTypeEnum=IfcCableSegmentTypeEnum;var IfcChangeActionEnum=/*#__PURE__*/_createClass(function IfcChangeActionEnum(){_classCallCheck(this,IfcChangeActionEnum);});IfcChangeActionEnum.NOCHANGE={type:3,value:"NOCHANGE"};IfcChangeActionEnum.MODIFIED={type:3,value:"MODIFIED"};IfcChangeActionEnum.ADDED={type:3,value:"ADDED"};IfcChangeActionEnum.DELETED={type:3,value:"DELETED"};IfcChangeActionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcChangeActionEnum=IfcChangeActionEnum;var IfcChillerTypeEnum=/*#__PURE__*/_createClass(function IfcChillerTypeEnum(){_classCallCheck(this,IfcChillerTypeEnum);});IfcChillerTypeEnum.AIRCOOLED={type:3,value:"AIRCOOLED"};IfcChillerTypeEnum.WATERCOOLED={type:3,value:"WATERCOOLED"};IfcChillerTypeEnum.HEATRECOVERY={type:3,value:"HEATRECOVERY"};IfcChillerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcChillerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcChillerTypeEnum=IfcChillerTypeEnum;var IfcChimneyTypeEnum=/*#__PURE__*/_createClass(function IfcChimneyTypeEnum(){_classCallCheck(this,IfcChimneyTypeEnum);});IfcChimneyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcChimneyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcChimneyTypeEnum=IfcChimneyTypeEnum;var IfcCoilTypeEnum=/*#__PURE__*/_createClass(function IfcCoilTypeEnum(){_classCallCheck(this,IfcCoilTypeEnum);});IfcCoilTypeEnum.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"};IfcCoilTypeEnum.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"};IfcCoilTypeEnum.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"};IfcCoilTypeEnum.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"};IfcCoilTypeEnum.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"};IfcCoilTypeEnum.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"};IfcCoilTypeEnum.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"};IfcCoilTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoilTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCoilTypeEnum=IfcCoilTypeEnum;var IfcColumnTypeEnum=/*#__PURE__*/_createClass(function IfcColumnTypeEnum(){_classCallCheck(this,IfcColumnTypeEnum);});IfcColumnTypeEnum.COLUMN={type:3,value:"COLUMN"};IfcColumnTypeEnum.PILASTER={type:3,value:"PILASTER"};IfcColumnTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcColumnTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcColumnTypeEnum=IfcColumnTypeEnum;var IfcCommunicationsApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcCommunicationsApplianceTypeEnum(){_classCallCheck(this,IfcCommunicationsApplianceTypeEnum);});IfcCommunicationsApplianceTypeEnum.ANTENNA={type:3,value:"ANTENNA"};IfcCommunicationsApplianceTypeEnum.COMPUTER={type:3,value:"COMPUTER"};IfcCommunicationsApplianceTypeEnum.FAX={type:3,value:"FAX"};IfcCommunicationsApplianceTypeEnum.GATEWAY={type:3,value:"GATEWAY"};IfcCommunicationsApplianceTypeEnum.MODEM={type:3,value:"MODEM"};IfcCommunicationsApplianceTypeEnum.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"};IfcCommunicationsApplianceTypeEnum.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"};IfcCommunicationsApplianceTypeEnum.NETWORKHUB={type:3,value:"NETWORKHUB"};IfcCommunicationsApplianceTypeEnum.PRINTER={type:3,value:"PRINTER"};IfcCommunicationsApplianceTypeEnum.REPEATER={type:3,value:"REPEATER"};IfcCommunicationsApplianceTypeEnum.ROUTER={type:3,value:"ROUTER"};IfcCommunicationsApplianceTypeEnum.SCANNER={type:3,value:"SCANNER"};IfcCommunicationsApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCommunicationsApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCommunicationsApplianceTypeEnum=IfcCommunicationsApplianceTypeEnum;var IfcComplexPropertyTemplateTypeEnum=/*#__PURE__*/_createClass(function IfcComplexPropertyTemplateTypeEnum(){_classCallCheck(this,IfcComplexPropertyTemplateTypeEnum);});IfcComplexPropertyTemplateTypeEnum.P_COMPLEX={type:3,value:"P_COMPLEX"};IfcComplexPropertyTemplateTypeEnum.Q_COMPLEX={type:3,value:"Q_COMPLEX"};IFC42.IfcComplexPropertyTemplateTypeEnum=IfcComplexPropertyTemplateTypeEnum;var IfcCompressorTypeEnum=/*#__PURE__*/_createClass(function IfcCompressorTypeEnum(){_classCallCheck(this,IfcCompressorTypeEnum);});IfcCompressorTypeEnum.DYNAMIC={type:3,value:"DYNAMIC"};IfcCompressorTypeEnum.RECIPROCATING={type:3,value:"RECIPROCATING"};IfcCompressorTypeEnum.ROTARY={type:3,value:"ROTARY"};IfcCompressorTypeEnum.SCROLL={type:3,value:"SCROLL"};IfcCompressorTypeEnum.TROCHOIDAL={type:3,value:"TROCHOIDAL"};IfcCompressorTypeEnum.SINGLESTAGE={type:3,value:"SINGLESTAGE"};IfcCompressorTypeEnum.BOOSTER={type:3,value:"BOOSTER"};IfcCompressorTypeEnum.OPENTYPE={type:3,value:"OPENTYPE"};IfcCompressorTypeEnum.HERMETIC={type:3,value:"HERMETIC"};IfcCompressorTypeEnum.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"};IfcCompressorTypeEnum.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"};IfcCompressorTypeEnum.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"};IfcCompressorTypeEnum.ROTARYVANE={type:3,value:"ROTARYVANE"};IfcCompressorTypeEnum.SINGLESCREW={type:3,value:"SINGLESCREW"};IfcCompressorTypeEnum.TWINSCREW={type:3,value:"TWINSCREW"};IfcCompressorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCompressorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCompressorTypeEnum=IfcCompressorTypeEnum;var IfcCondenserTypeEnum=/*#__PURE__*/_createClass(function IfcCondenserTypeEnum(){_classCallCheck(this,IfcCondenserTypeEnum);});IfcCondenserTypeEnum.AIRCOOLED={type:3,value:"AIRCOOLED"};IfcCondenserTypeEnum.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"};IfcCondenserTypeEnum.WATERCOOLED={type:3,value:"WATERCOOLED"};IfcCondenserTypeEnum.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"};IfcCondenserTypeEnum.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"};IfcCondenserTypeEnum.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"};IfcCondenserTypeEnum.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"};IfcCondenserTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCondenserTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCondenserTypeEnum=IfcCondenserTypeEnum;var IfcConnectionTypeEnum=/*#__PURE__*/_createClass(function IfcConnectionTypeEnum(){_classCallCheck(this,IfcConnectionTypeEnum);});IfcConnectionTypeEnum.ATPATH={type:3,value:"ATPATH"};IfcConnectionTypeEnum.ATSTART={type:3,value:"ATSTART"};IfcConnectionTypeEnum.ATEND={type:3,value:"ATEND"};IfcConnectionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcConnectionTypeEnum=IfcConnectionTypeEnum;var IfcConstraintEnum=/*#__PURE__*/_createClass(function IfcConstraintEnum(){_classCallCheck(this,IfcConstraintEnum);});IfcConstraintEnum.HARD={type:3,value:"HARD"};IfcConstraintEnum.SOFT={type:3,value:"SOFT"};IfcConstraintEnum.ADVISORY={type:3,value:"ADVISORY"};IfcConstraintEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstraintEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcConstraintEnum=IfcConstraintEnum;var IfcConstructionEquipmentResourceTypeEnum=/*#__PURE__*/_createClass(function IfcConstructionEquipmentResourceTypeEnum(){_classCallCheck(this,IfcConstructionEquipmentResourceTypeEnum);});IfcConstructionEquipmentResourceTypeEnum.DEMOLISHING={type:3,value:"DEMOLISHING"};IfcConstructionEquipmentResourceTypeEnum.EARTHMOVING={type:3,value:"EARTHMOVING"};IfcConstructionEquipmentResourceTypeEnum.ERECTING={type:3,value:"ERECTING"};IfcConstructionEquipmentResourceTypeEnum.HEATING={type:3,value:"HEATING"};IfcConstructionEquipmentResourceTypeEnum.LIGHTING={type:3,value:"LIGHTING"};IfcConstructionEquipmentResourceTypeEnum.PAVING={type:3,value:"PAVING"};IfcConstructionEquipmentResourceTypeEnum.PUMPING={type:3,value:"PUMPING"};IfcConstructionEquipmentResourceTypeEnum.TRANSPORTING={type:3,value:"TRANSPORTING"};IfcConstructionEquipmentResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstructionEquipmentResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcConstructionEquipmentResourceTypeEnum=IfcConstructionEquipmentResourceTypeEnum;var IfcConstructionMaterialResourceTypeEnum=/*#__PURE__*/_createClass(function IfcConstructionMaterialResourceTypeEnum(){_classCallCheck(this,IfcConstructionMaterialResourceTypeEnum);});IfcConstructionMaterialResourceTypeEnum.AGGREGATES={type:3,value:"AGGREGATES"};IfcConstructionMaterialResourceTypeEnum.CONCRETE={type:3,value:"CONCRETE"};IfcConstructionMaterialResourceTypeEnum.DRYWALL={type:3,value:"DRYWALL"};IfcConstructionMaterialResourceTypeEnum.FUEL={type:3,value:"FUEL"};IfcConstructionMaterialResourceTypeEnum.GYPSUM={type:3,value:"GYPSUM"};IfcConstructionMaterialResourceTypeEnum.MASONRY={type:3,value:"MASONRY"};IfcConstructionMaterialResourceTypeEnum.METAL={type:3,value:"METAL"};IfcConstructionMaterialResourceTypeEnum.PLASTIC={type:3,value:"PLASTIC"};IfcConstructionMaterialResourceTypeEnum.WOOD={type:3,value:"WOOD"};IfcConstructionMaterialResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IfcConstructionMaterialResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC42.IfcConstructionMaterialResourceTypeEnum=IfcConstructionMaterialResourceTypeEnum;var IfcConstructionProductResourceTypeEnum=/*#__PURE__*/_createClass(function IfcConstructionProductResourceTypeEnum(){_classCallCheck(this,IfcConstructionProductResourceTypeEnum);});IfcConstructionProductResourceTypeEnum.ASSEMBLY={type:3,value:"ASSEMBLY"};IfcConstructionProductResourceTypeEnum.FORMWORK={type:3,value:"FORMWORK"};IfcConstructionProductResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstructionProductResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcConstructionProductResourceTypeEnum=IfcConstructionProductResourceTypeEnum;var IfcControllerTypeEnum=/*#__PURE__*/_createClass(function IfcControllerTypeEnum(){_classCallCheck(this,IfcControllerTypeEnum);});IfcControllerTypeEnum.FLOATING={type:3,value:"FLOATING"};IfcControllerTypeEnum.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"};IfcControllerTypeEnum.PROPORTIONAL={type:3,value:"PROPORTIONAL"};IfcControllerTypeEnum.MULTIPOSITION={type:3,value:"MULTIPOSITION"};IfcControllerTypeEnum.TWOPOSITION={type:3,value:"TWOPOSITION"};IfcControllerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcControllerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcControllerTypeEnum=IfcControllerTypeEnum;var IfcCooledBeamTypeEnum=/*#__PURE__*/_createClass(function IfcCooledBeamTypeEnum(){_classCallCheck(this,IfcCooledBeamTypeEnum);});IfcCooledBeamTypeEnum.ACTIVE={type:3,value:"ACTIVE"};IfcCooledBeamTypeEnum.PASSIVE={type:3,value:"PASSIVE"};IfcCooledBeamTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCooledBeamTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCooledBeamTypeEnum=IfcCooledBeamTypeEnum;var IfcCoolingTowerTypeEnum=/*#__PURE__*/_createClass(function IfcCoolingTowerTypeEnum(){_classCallCheck(this,IfcCoolingTowerTypeEnum);});IfcCoolingTowerTypeEnum.NATURALDRAFT={type:3,value:"NATURALDRAFT"};IfcCoolingTowerTypeEnum.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"};IfcCoolingTowerTypeEnum.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"};IfcCoolingTowerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoolingTowerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCoolingTowerTypeEnum=IfcCoolingTowerTypeEnum;var IfcCostItemTypeEnum=/*#__PURE__*/_createClass(function IfcCostItemTypeEnum(){_classCallCheck(this,IfcCostItemTypeEnum);});IfcCostItemTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCostItemTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCostItemTypeEnum=IfcCostItemTypeEnum;var IfcCostScheduleTypeEnum=/*#__PURE__*/_createClass(function IfcCostScheduleTypeEnum(){_classCallCheck(this,IfcCostScheduleTypeEnum);});IfcCostScheduleTypeEnum.BUDGET={type:3,value:"BUDGET"};IfcCostScheduleTypeEnum.COSTPLAN={type:3,value:"COSTPLAN"};IfcCostScheduleTypeEnum.ESTIMATE={type:3,value:"ESTIMATE"};IfcCostScheduleTypeEnum.TENDER={type:3,value:"TENDER"};IfcCostScheduleTypeEnum.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"};IfcCostScheduleTypeEnum.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"};IfcCostScheduleTypeEnum.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"};IfcCostScheduleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCostScheduleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCostScheduleTypeEnum=IfcCostScheduleTypeEnum;var IfcCoveringTypeEnum=/*#__PURE__*/_createClass(function IfcCoveringTypeEnum(){_classCallCheck(this,IfcCoveringTypeEnum);});IfcCoveringTypeEnum.CEILING={type:3,value:"CEILING"};IfcCoveringTypeEnum.FLOORING={type:3,value:"FLOORING"};IfcCoveringTypeEnum.CLADDING={type:3,value:"CLADDING"};IfcCoveringTypeEnum.ROOFING={type:3,value:"ROOFING"};IfcCoveringTypeEnum.MOLDING={type:3,value:"MOLDING"};IfcCoveringTypeEnum.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"};IfcCoveringTypeEnum.INSULATION={type:3,value:"INSULATION"};IfcCoveringTypeEnum.MEMBRANE={type:3,value:"MEMBRANE"};IfcCoveringTypeEnum.SLEEVING={type:3,value:"SLEEVING"};IfcCoveringTypeEnum.WRAPPING={type:3,value:"WRAPPING"};IfcCoveringTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoveringTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCoveringTypeEnum=IfcCoveringTypeEnum;var IfcCrewResourceTypeEnum=/*#__PURE__*/_createClass(function IfcCrewResourceTypeEnum(){_classCallCheck(this,IfcCrewResourceTypeEnum);});IfcCrewResourceTypeEnum.OFFICE={type:3,value:"OFFICE"};IfcCrewResourceTypeEnum.SITE={type:3,value:"SITE"};IfcCrewResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCrewResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCrewResourceTypeEnum=IfcCrewResourceTypeEnum;var IfcCurtainWallTypeEnum=/*#__PURE__*/_createClass(function IfcCurtainWallTypeEnum(){_classCallCheck(this,IfcCurtainWallTypeEnum);});IfcCurtainWallTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCurtainWallTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCurtainWallTypeEnum=IfcCurtainWallTypeEnum;var IfcCurveInterpolationEnum=/*#__PURE__*/_createClass(function IfcCurveInterpolationEnum(){_classCallCheck(this,IfcCurveInterpolationEnum);});IfcCurveInterpolationEnum.LINEAR={type:3,value:"LINEAR"};IfcCurveInterpolationEnum.LOG_LINEAR={type:3,value:"LOG_LINEAR"};IfcCurveInterpolationEnum.LOG_LOG={type:3,value:"LOG_LOG"};IfcCurveInterpolationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcCurveInterpolationEnum=IfcCurveInterpolationEnum;var IfcDamperTypeEnum=/*#__PURE__*/_createClass(function IfcDamperTypeEnum(){_classCallCheck(this,IfcDamperTypeEnum);});IfcDamperTypeEnum.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"};IfcDamperTypeEnum.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"};IfcDamperTypeEnum.BLASTDAMPER={type:3,value:"BLASTDAMPER"};IfcDamperTypeEnum.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"};IfcDamperTypeEnum.FIREDAMPER={type:3,value:"FIREDAMPER"};IfcDamperTypeEnum.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"};IfcDamperTypeEnum.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"};IfcDamperTypeEnum.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"};IfcDamperTypeEnum.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"};IfcDamperTypeEnum.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"};IfcDamperTypeEnum.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"};IfcDamperTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDamperTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDamperTypeEnum=IfcDamperTypeEnum;var IfcDataOriginEnum=/*#__PURE__*/_createClass(function IfcDataOriginEnum(){_classCallCheck(this,IfcDataOriginEnum);});IfcDataOriginEnum.MEASURED={type:3,value:"MEASURED"};IfcDataOriginEnum.PREDICTED={type:3,value:"PREDICTED"};IfcDataOriginEnum.SIMULATED={type:3,value:"SIMULATED"};IfcDataOriginEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDataOriginEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDataOriginEnum=IfcDataOriginEnum;var IfcDerivedUnitEnum=/*#__PURE__*/_createClass(function IfcDerivedUnitEnum(){_classCallCheck(this,IfcDerivedUnitEnum);});IfcDerivedUnitEnum.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"};IfcDerivedUnitEnum.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"};IfcDerivedUnitEnum.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"};IfcDerivedUnitEnum.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"};IfcDerivedUnitEnum.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"};IfcDerivedUnitEnum.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"};IfcDerivedUnitEnum.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"};IfcDerivedUnitEnum.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"};IfcDerivedUnitEnum.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"};IfcDerivedUnitEnum.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"};IfcDerivedUnitEnum.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"};IfcDerivedUnitEnum.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"};IfcDerivedUnitEnum.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"};IfcDerivedUnitEnum.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"};IfcDerivedUnitEnum.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"};IfcDerivedUnitEnum.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"};IfcDerivedUnitEnum.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"};IfcDerivedUnitEnum.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"};IfcDerivedUnitEnum.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"};IfcDerivedUnitEnum.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"};IfcDerivedUnitEnum.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"};IfcDerivedUnitEnum.TORQUEUNIT={type:3,value:"TORQUEUNIT"};IfcDerivedUnitEnum.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"};IfcDerivedUnitEnum.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"};IfcDerivedUnitEnum.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"};IfcDerivedUnitEnum.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"};IfcDerivedUnitEnum.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"};IfcDerivedUnitEnum.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"};IfcDerivedUnitEnum.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"};IfcDerivedUnitEnum.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"};IfcDerivedUnitEnum.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"};IfcDerivedUnitEnum.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"};IfcDerivedUnitEnum.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"};IfcDerivedUnitEnum.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"};IfcDerivedUnitEnum.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"};IfcDerivedUnitEnum.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"};IfcDerivedUnitEnum.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.PHUNIT={type:3,value:"PHUNIT"};IfcDerivedUnitEnum.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"};IfcDerivedUnitEnum.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"};IfcDerivedUnitEnum.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"};IfcDerivedUnitEnum.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"};IfcDerivedUnitEnum.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"};IfcDerivedUnitEnum.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"};IfcDerivedUnitEnum.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"};IfcDerivedUnitEnum.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"};IfcDerivedUnitEnum.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"};IfcDerivedUnitEnum.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"};IfcDerivedUnitEnum.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"};IfcDerivedUnitEnum.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"};IfcDerivedUnitEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC42.IfcDerivedUnitEnum=IfcDerivedUnitEnum;var IfcDirectionSenseEnum=/*#__PURE__*/_createClass(function IfcDirectionSenseEnum(){_classCallCheck(this,IfcDirectionSenseEnum);});IfcDirectionSenseEnum.POSITIVE={type:3,value:"POSITIVE"};IfcDirectionSenseEnum.NEGATIVE={type:3,value:"NEGATIVE"};IFC42.IfcDirectionSenseEnum=IfcDirectionSenseEnum;var IfcDiscreteAccessoryTypeEnum=/*#__PURE__*/_createClass(function IfcDiscreteAccessoryTypeEnum(){_classCallCheck(this,IfcDiscreteAccessoryTypeEnum);});IfcDiscreteAccessoryTypeEnum.ANCHORPLATE={type:3,value:"ANCHORPLATE"};IfcDiscreteAccessoryTypeEnum.BRACKET={type:3,value:"BRACKET"};IfcDiscreteAccessoryTypeEnum.SHOE={type:3,value:"SHOE"};IfcDiscreteAccessoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDiscreteAccessoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDiscreteAccessoryTypeEnum=IfcDiscreteAccessoryTypeEnum;var IfcDistributionChamberElementTypeEnum=/*#__PURE__*/_createClass(function IfcDistributionChamberElementTypeEnum(){_classCallCheck(this,IfcDistributionChamberElementTypeEnum);});IfcDistributionChamberElementTypeEnum.FORMEDDUCT={type:3,value:"FORMEDDUCT"};IfcDistributionChamberElementTypeEnum.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"};IfcDistributionChamberElementTypeEnum.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"};IfcDistributionChamberElementTypeEnum.MANHOLE={type:3,value:"MANHOLE"};IfcDistributionChamberElementTypeEnum.METERCHAMBER={type:3,value:"METERCHAMBER"};IfcDistributionChamberElementTypeEnum.SUMP={type:3,value:"SUMP"};IfcDistributionChamberElementTypeEnum.TRENCH={type:3,value:"TRENCH"};IfcDistributionChamberElementTypeEnum.VALVECHAMBER={type:3,value:"VALVECHAMBER"};IfcDistributionChamberElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionChamberElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDistributionChamberElementTypeEnum=IfcDistributionChamberElementTypeEnum;var IfcDistributionPortTypeEnum=/*#__PURE__*/_createClass(function IfcDistributionPortTypeEnum(){_classCallCheck(this,IfcDistributionPortTypeEnum);});IfcDistributionPortTypeEnum.CABLE={type:3,value:"CABLE"};IfcDistributionPortTypeEnum.CABLECARRIER={type:3,value:"CABLECARRIER"};IfcDistributionPortTypeEnum.DUCT={type:3,value:"DUCT"};IfcDistributionPortTypeEnum.PIPE={type:3,value:"PIPE"};IfcDistributionPortTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionPortTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDistributionPortTypeEnum=IfcDistributionPortTypeEnum;var IfcDistributionSystemEnum=/*#__PURE__*/_createClass(function IfcDistributionSystemEnum(){_classCallCheck(this,IfcDistributionSystemEnum);});IfcDistributionSystemEnum.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"};IfcDistributionSystemEnum.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"};IfcDistributionSystemEnum.CHEMICAL={type:3,value:"CHEMICAL"};IfcDistributionSystemEnum.CHILLEDWATER={type:3,value:"CHILLEDWATER"};IfcDistributionSystemEnum.COMMUNICATION={type:3,value:"COMMUNICATION"};IfcDistributionSystemEnum.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"};IfcDistributionSystemEnum.CONDENSERWATER={type:3,value:"CONDENSERWATER"};IfcDistributionSystemEnum.CONTROL={type:3,value:"CONTROL"};IfcDistributionSystemEnum.CONVEYING={type:3,value:"CONVEYING"};IfcDistributionSystemEnum.DATA={type:3,value:"DATA"};IfcDistributionSystemEnum.DISPOSAL={type:3,value:"DISPOSAL"};IfcDistributionSystemEnum.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"};IfcDistributionSystemEnum.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"};IfcDistributionSystemEnum.DRAINAGE={type:3,value:"DRAINAGE"};IfcDistributionSystemEnum.EARTHING={type:3,value:"EARTHING"};IfcDistributionSystemEnum.ELECTRICAL={type:3,value:"ELECTRICAL"};IfcDistributionSystemEnum.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"};IfcDistributionSystemEnum.EXHAUST={type:3,value:"EXHAUST"};IfcDistributionSystemEnum.FIREPROTECTION={type:3,value:"FIREPROTECTION"};IfcDistributionSystemEnum.FUEL={type:3,value:"FUEL"};IfcDistributionSystemEnum.GAS={type:3,value:"GAS"};IfcDistributionSystemEnum.HAZARDOUS={type:3,value:"HAZARDOUS"};IfcDistributionSystemEnum.HEATING={type:3,value:"HEATING"};IfcDistributionSystemEnum.LIGHTING={type:3,value:"LIGHTING"};IfcDistributionSystemEnum.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"};IfcDistributionSystemEnum.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"};IfcDistributionSystemEnum.OIL={type:3,value:"OIL"};IfcDistributionSystemEnum.OPERATIONAL={type:3,value:"OPERATIONAL"};IfcDistributionSystemEnum.POWERGENERATION={type:3,value:"POWERGENERATION"};IfcDistributionSystemEnum.RAINWATER={type:3,value:"RAINWATER"};IfcDistributionSystemEnum.REFRIGERATION={type:3,value:"REFRIGERATION"};IfcDistributionSystemEnum.SECURITY={type:3,value:"SECURITY"};IfcDistributionSystemEnum.SEWAGE={type:3,value:"SEWAGE"};IfcDistributionSystemEnum.SIGNAL={type:3,value:"SIGNAL"};IfcDistributionSystemEnum.STORMWATER={type:3,value:"STORMWATER"};IfcDistributionSystemEnum.TELEPHONE={type:3,value:"TELEPHONE"};IfcDistributionSystemEnum.TV={type:3,value:"TV"};IfcDistributionSystemEnum.VACUUM={type:3,value:"VACUUM"};IfcDistributionSystemEnum.VENT={type:3,value:"VENT"};IfcDistributionSystemEnum.VENTILATION={type:3,value:"VENTILATION"};IfcDistributionSystemEnum.WASTEWATER={type:3,value:"WASTEWATER"};IfcDistributionSystemEnum.WATERSUPPLY={type:3,value:"WATERSUPPLY"};IfcDistributionSystemEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionSystemEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDistributionSystemEnum=IfcDistributionSystemEnum;var IfcDocumentConfidentialityEnum=/*#__PURE__*/_createClass(function IfcDocumentConfidentialityEnum(){_classCallCheck(this,IfcDocumentConfidentialityEnum);});IfcDocumentConfidentialityEnum.PUBLIC={type:3,value:"PUBLIC"};IfcDocumentConfidentialityEnum.RESTRICTED={type:3,value:"RESTRICTED"};IfcDocumentConfidentialityEnum.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"};IfcDocumentConfidentialityEnum.PERSONAL={type:3,value:"PERSONAL"};IfcDocumentConfidentialityEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDocumentConfidentialityEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDocumentConfidentialityEnum=IfcDocumentConfidentialityEnum;var IfcDocumentStatusEnum=/*#__PURE__*/_createClass(function IfcDocumentStatusEnum(){_classCallCheck(this,IfcDocumentStatusEnum);});IfcDocumentStatusEnum.DRAFT={type:3,value:"DRAFT"};IfcDocumentStatusEnum.FINALDRAFT={type:3,value:"FINALDRAFT"};IfcDocumentStatusEnum.FINAL={type:3,value:"FINAL"};IfcDocumentStatusEnum.REVISION={type:3,value:"REVISION"};IfcDocumentStatusEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDocumentStatusEnum=IfcDocumentStatusEnum;var IfcDoorPanelOperationEnum=/*#__PURE__*/_createClass(function IfcDoorPanelOperationEnum(){_classCallCheck(this,IfcDoorPanelOperationEnum);});IfcDoorPanelOperationEnum.SWINGING={type:3,value:"SWINGING"};IfcDoorPanelOperationEnum.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"};IfcDoorPanelOperationEnum.SLIDING={type:3,value:"SLIDING"};IfcDoorPanelOperationEnum.FOLDING={type:3,value:"FOLDING"};IfcDoorPanelOperationEnum.REVOLVING={type:3,value:"REVOLVING"};IfcDoorPanelOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorPanelOperationEnum.FIXEDPANEL={type:3,value:"FIXEDPANEL"};IfcDoorPanelOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorPanelOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDoorPanelOperationEnum=IfcDoorPanelOperationEnum;var IfcDoorPanelPositionEnum=/*#__PURE__*/_createClass(function IfcDoorPanelPositionEnum(){_classCallCheck(this,IfcDoorPanelPositionEnum);});IfcDoorPanelPositionEnum.LEFT={type:3,value:"LEFT"};IfcDoorPanelPositionEnum.MIDDLE={type:3,value:"MIDDLE"};IfcDoorPanelPositionEnum.RIGHT={type:3,value:"RIGHT"};IfcDoorPanelPositionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDoorPanelPositionEnum=IfcDoorPanelPositionEnum;var IfcDoorStyleConstructionEnum=/*#__PURE__*/_createClass(function IfcDoorStyleConstructionEnum(){_classCallCheck(this,IfcDoorStyleConstructionEnum);});IfcDoorStyleConstructionEnum.ALUMINIUM={type:3,value:"ALUMINIUM"};IfcDoorStyleConstructionEnum.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"};IfcDoorStyleConstructionEnum.STEEL={type:3,value:"STEEL"};IfcDoorStyleConstructionEnum.WOOD={type:3,value:"WOOD"};IfcDoorStyleConstructionEnum.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"};IfcDoorStyleConstructionEnum.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"};IfcDoorStyleConstructionEnum.PLASTIC={type:3,value:"PLASTIC"};IfcDoorStyleConstructionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorStyleConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDoorStyleConstructionEnum=IfcDoorStyleConstructionEnum;var IfcDoorStyleOperationEnum=/*#__PURE__*/_createClass(function IfcDoorStyleOperationEnum(){_classCallCheck(this,IfcDoorStyleOperationEnum);});IfcDoorStyleOperationEnum.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"};IfcDoorStyleOperationEnum.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"};IfcDoorStyleOperationEnum.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"};IfcDoorStyleOperationEnum.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"};IfcDoorStyleOperationEnum.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"};IfcDoorStyleOperationEnum.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"};IfcDoorStyleOperationEnum.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"};IfcDoorStyleOperationEnum.REVOLVING={type:3,value:"REVOLVING"};IfcDoorStyleOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorStyleOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorStyleOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDoorStyleOperationEnum=IfcDoorStyleOperationEnum;var IfcDoorTypeEnum=/*#__PURE__*/_createClass(function IfcDoorTypeEnum(){_classCallCheck(this,IfcDoorTypeEnum);});IfcDoorTypeEnum.DOOR={type:3,value:"DOOR"};IfcDoorTypeEnum.GATE={type:3,value:"GATE"};IfcDoorTypeEnum.TRAPDOOR={type:3,value:"TRAPDOOR"};IfcDoorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDoorTypeEnum=IfcDoorTypeEnum;var IfcDoorTypeOperationEnum=/*#__PURE__*/_createClass(function IfcDoorTypeOperationEnum(){_classCallCheck(this,IfcDoorTypeOperationEnum);});IfcDoorTypeOperationEnum.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"};IfcDoorTypeOperationEnum.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"};IfcDoorTypeOperationEnum.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"};IfcDoorTypeOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"};IfcDoorTypeOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"};IfcDoorTypeOperationEnum.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"};IfcDoorTypeOperationEnum.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"};IfcDoorTypeOperationEnum.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"};IfcDoorTypeOperationEnum.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"};IfcDoorTypeOperationEnum.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"};IfcDoorTypeOperationEnum.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"};IfcDoorTypeOperationEnum.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"};IfcDoorTypeOperationEnum.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"};IfcDoorTypeOperationEnum.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"};IfcDoorTypeOperationEnum.REVOLVING={type:3,value:"REVOLVING"};IfcDoorTypeOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorTypeOperationEnum.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"};IfcDoorTypeOperationEnum.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"};IfcDoorTypeOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorTypeOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDoorTypeOperationEnum=IfcDoorTypeOperationEnum;var IfcDuctFittingTypeEnum=/*#__PURE__*/_createClass(function IfcDuctFittingTypeEnum(){_classCallCheck(this,IfcDuctFittingTypeEnum);});IfcDuctFittingTypeEnum.BEND={type:3,value:"BEND"};IfcDuctFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcDuctFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcDuctFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcDuctFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcDuctFittingTypeEnum.OBSTRUCTION={type:3,value:"OBSTRUCTION"};IfcDuctFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcDuctFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDuctFittingTypeEnum=IfcDuctFittingTypeEnum;var IfcDuctSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcDuctSegmentTypeEnum(){_classCallCheck(this,IfcDuctSegmentTypeEnum);});IfcDuctSegmentTypeEnum.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"};IfcDuctSegmentTypeEnum.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"};IfcDuctSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDuctSegmentTypeEnum=IfcDuctSegmentTypeEnum;var IfcDuctSilencerTypeEnum=/*#__PURE__*/_createClass(function IfcDuctSilencerTypeEnum(){_classCallCheck(this,IfcDuctSilencerTypeEnum);});IfcDuctSilencerTypeEnum.FLATOVAL={type:3,value:"FLATOVAL"};IfcDuctSilencerTypeEnum.RECTANGULAR={type:3,value:"RECTANGULAR"};IfcDuctSilencerTypeEnum.ROUND={type:3,value:"ROUND"};IfcDuctSilencerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctSilencerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcDuctSilencerTypeEnum=IfcDuctSilencerTypeEnum;var IfcElectricApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcElectricApplianceTypeEnum(){_classCallCheck(this,IfcElectricApplianceTypeEnum);});IfcElectricApplianceTypeEnum.DISHWASHER={type:3,value:"DISHWASHER"};IfcElectricApplianceTypeEnum.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"};IfcElectricApplianceTypeEnum.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"};IfcElectricApplianceTypeEnum.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"};IfcElectricApplianceTypeEnum.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"};IfcElectricApplianceTypeEnum.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"};IfcElectricApplianceTypeEnum.FREEZER={type:3,value:"FREEZER"};IfcElectricApplianceTypeEnum.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"};IfcElectricApplianceTypeEnum.HANDDRYER={type:3,value:"HANDDRYER"};IfcElectricApplianceTypeEnum.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"};IfcElectricApplianceTypeEnum.MICROWAVE={type:3,value:"MICROWAVE"};IfcElectricApplianceTypeEnum.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"};IfcElectricApplianceTypeEnum.REFRIGERATOR={type:3,value:"REFRIGERATOR"};IfcElectricApplianceTypeEnum.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"};IfcElectricApplianceTypeEnum.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"};IfcElectricApplianceTypeEnum.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"};IfcElectricApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcElectricApplianceTypeEnum=IfcElectricApplianceTypeEnum;var IfcElectricDistributionBoardTypeEnum=/*#__PURE__*/_createClass(function IfcElectricDistributionBoardTypeEnum(){_classCallCheck(this,IfcElectricDistributionBoardTypeEnum);});IfcElectricDistributionBoardTypeEnum.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"};IfcElectricDistributionBoardTypeEnum.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"};IfcElectricDistributionBoardTypeEnum.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"};IfcElectricDistributionBoardTypeEnum.SWITCHBOARD={type:3,value:"SWITCHBOARD"};IfcElectricDistributionBoardTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricDistributionBoardTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcElectricDistributionBoardTypeEnum=IfcElectricDistributionBoardTypeEnum;var IfcElectricFlowStorageDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcElectricFlowStorageDeviceTypeEnum(){_classCallCheck(this,IfcElectricFlowStorageDeviceTypeEnum);});IfcElectricFlowStorageDeviceTypeEnum.BATTERY={type:3,value:"BATTERY"};IfcElectricFlowStorageDeviceTypeEnum.CAPACITORBANK={type:3,value:"CAPACITORBANK"};IfcElectricFlowStorageDeviceTypeEnum.HARMONICFILTER={type:3,value:"HARMONICFILTER"};IfcElectricFlowStorageDeviceTypeEnum.INDUCTORBANK={type:3,value:"INDUCTORBANK"};IfcElectricFlowStorageDeviceTypeEnum.UPS={type:3,value:"UPS"};IfcElectricFlowStorageDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricFlowStorageDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcElectricFlowStorageDeviceTypeEnum=IfcElectricFlowStorageDeviceTypeEnum;var IfcElectricGeneratorTypeEnum=/*#__PURE__*/_createClass(function IfcElectricGeneratorTypeEnum(){_classCallCheck(this,IfcElectricGeneratorTypeEnum);});IfcElectricGeneratorTypeEnum.CHP={type:3,value:"CHP"};IfcElectricGeneratorTypeEnum.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"};IfcElectricGeneratorTypeEnum.STANDALONE={type:3,value:"STANDALONE"};IfcElectricGeneratorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricGeneratorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcElectricGeneratorTypeEnum=IfcElectricGeneratorTypeEnum;var IfcElectricMotorTypeEnum=/*#__PURE__*/_createClass(function IfcElectricMotorTypeEnum(){_classCallCheck(this,IfcElectricMotorTypeEnum);});IfcElectricMotorTypeEnum.DC={type:3,value:"DC"};IfcElectricMotorTypeEnum.INDUCTION={type:3,value:"INDUCTION"};IfcElectricMotorTypeEnum.POLYPHASE={type:3,value:"POLYPHASE"};IfcElectricMotorTypeEnum.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"};IfcElectricMotorTypeEnum.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"};IfcElectricMotorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricMotorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcElectricMotorTypeEnum=IfcElectricMotorTypeEnum;var IfcElectricTimeControlTypeEnum=/*#__PURE__*/_createClass(function IfcElectricTimeControlTypeEnum(){_classCallCheck(this,IfcElectricTimeControlTypeEnum);});IfcElectricTimeControlTypeEnum.TIMECLOCK={type:3,value:"TIMECLOCK"};IfcElectricTimeControlTypeEnum.TIMEDELAY={type:3,value:"TIMEDELAY"};IfcElectricTimeControlTypeEnum.RELAY={type:3,value:"RELAY"};IfcElectricTimeControlTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricTimeControlTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcElectricTimeControlTypeEnum=IfcElectricTimeControlTypeEnum;var IfcElementAssemblyTypeEnum=/*#__PURE__*/_createClass(function IfcElementAssemblyTypeEnum(){_classCallCheck(this,IfcElementAssemblyTypeEnum);});IfcElementAssemblyTypeEnum.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"};IfcElementAssemblyTypeEnum.ARCH={type:3,value:"ARCH"};IfcElementAssemblyTypeEnum.BEAM_GRID={type:3,value:"BEAM_GRID"};IfcElementAssemblyTypeEnum.BRACED_FRAME={type:3,value:"BRACED_FRAME"};IfcElementAssemblyTypeEnum.GIRDER={type:3,value:"GIRDER"};IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"};IfcElementAssemblyTypeEnum.RIGID_FRAME={type:3,value:"RIGID_FRAME"};IfcElementAssemblyTypeEnum.SLAB_FIELD={type:3,value:"SLAB_FIELD"};IfcElementAssemblyTypeEnum.TRUSS={type:3,value:"TRUSS"};IfcElementAssemblyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElementAssemblyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcElementAssemblyTypeEnum=IfcElementAssemblyTypeEnum;var IfcElementCompositionEnum=/*#__PURE__*/_createClass(function IfcElementCompositionEnum(){_classCallCheck(this,IfcElementCompositionEnum);});IfcElementCompositionEnum.COMPLEX={type:3,value:"COMPLEX"};IfcElementCompositionEnum.ELEMENT={type:3,value:"ELEMENT"};IfcElementCompositionEnum.PARTIAL={type:3,value:"PARTIAL"};IFC42.IfcElementCompositionEnum=IfcElementCompositionEnum;var IfcEngineTypeEnum=/*#__PURE__*/_createClass(function IfcEngineTypeEnum(){_classCallCheck(this,IfcEngineTypeEnum);});IfcEngineTypeEnum.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"};IfcEngineTypeEnum.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"};IfcEngineTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEngineTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcEngineTypeEnum=IfcEngineTypeEnum;var IfcEvaporativeCoolerTypeEnum=/*#__PURE__*/_createClass(function IfcEvaporativeCoolerTypeEnum(){_classCallCheck(this,IfcEvaporativeCoolerTypeEnum);});IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"};IfcEvaporativeCoolerTypeEnum.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"};IfcEvaporativeCoolerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEvaporativeCoolerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcEvaporativeCoolerTypeEnum=IfcEvaporativeCoolerTypeEnum;var IfcEvaporatorTypeEnum=/*#__PURE__*/_createClass(function IfcEvaporatorTypeEnum(){_classCallCheck(this,IfcEvaporatorTypeEnum);});IfcEvaporatorTypeEnum.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"};IfcEvaporatorTypeEnum.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"};IfcEvaporatorTypeEnum.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"};IfcEvaporatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEvaporatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcEvaporatorTypeEnum=IfcEvaporatorTypeEnum;var IfcEventTriggerTypeEnum=/*#__PURE__*/_createClass(function IfcEventTriggerTypeEnum(){_classCallCheck(this,IfcEventTriggerTypeEnum);});IfcEventTriggerTypeEnum.EVENTRULE={type:3,value:"EVENTRULE"};IfcEventTriggerTypeEnum.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"};IfcEventTriggerTypeEnum.EVENTTIME={type:3,value:"EVENTTIME"};IfcEventTriggerTypeEnum.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"};IfcEventTriggerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEventTriggerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcEventTriggerTypeEnum=IfcEventTriggerTypeEnum;var IfcEventTypeEnum=/*#__PURE__*/_createClass(function IfcEventTypeEnum(){_classCallCheck(this,IfcEventTypeEnum);});IfcEventTypeEnum.STARTEVENT={type:3,value:"STARTEVENT"};IfcEventTypeEnum.ENDEVENT={type:3,value:"ENDEVENT"};IfcEventTypeEnum.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"};IfcEventTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEventTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcEventTypeEnum=IfcEventTypeEnum;var IfcExternalSpatialElementTypeEnum=/*#__PURE__*/_createClass(function IfcExternalSpatialElementTypeEnum(){_classCallCheck(this,IfcExternalSpatialElementTypeEnum);});IfcExternalSpatialElementTypeEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcExternalSpatialElementTypeEnum.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"};IfcExternalSpatialElementTypeEnum.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"};IfcExternalSpatialElementTypeEnum.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"};IfcExternalSpatialElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcExternalSpatialElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcExternalSpatialElementTypeEnum=IfcExternalSpatialElementTypeEnum;var IfcFanTypeEnum=/*#__PURE__*/_createClass(function IfcFanTypeEnum(){_classCallCheck(this,IfcFanTypeEnum);});IfcFanTypeEnum.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"};IfcFanTypeEnum.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"};IfcFanTypeEnum.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"};IfcFanTypeEnum.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"};IfcFanTypeEnum.TUBEAXIAL={type:3,value:"TUBEAXIAL"};IfcFanTypeEnum.VANEAXIAL={type:3,value:"VANEAXIAL"};IfcFanTypeEnum.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"};IfcFanTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFanTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFanTypeEnum=IfcFanTypeEnum;var IfcFastenerTypeEnum=/*#__PURE__*/_createClass(function IfcFastenerTypeEnum(){_classCallCheck(this,IfcFastenerTypeEnum);});IfcFastenerTypeEnum.GLUE={type:3,value:"GLUE"};IfcFastenerTypeEnum.MORTAR={type:3,value:"MORTAR"};IfcFastenerTypeEnum.WELD={type:3,value:"WELD"};IfcFastenerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFastenerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFastenerTypeEnum=IfcFastenerTypeEnum;var IfcFilterTypeEnum=/*#__PURE__*/_createClass(function IfcFilterTypeEnum(){_classCallCheck(this,IfcFilterTypeEnum);});IfcFilterTypeEnum.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"};IfcFilterTypeEnum.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"};IfcFilterTypeEnum.ODORFILTER={type:3,value:"ODORFILTER"};IfcFilterTypeEnum.OILFILTER={type:3,value:"OILFILTER"};IfcFilterTypeEnum.STRAINER={type:3,value:"STRAINER"};IfcFilterTypeEnum.WATERFILTER={type:3,value:"WATERFILTER"};IfcFilterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFilterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFilterTypeEnum=IfcFilterTypeEnum;var IfcFireSuppressionTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcFireSuppressionTerminalTypeEnum(){_classCallCheck(this,IfcFireSuppressionTerminalTypeEnum);});IfcFireSuppressionTerminalTypeEnum.BREECHINGINLET={type:3,value:"BREECHINGINLET"};IfcFireSuppressionTerminalTypeEnum.FIREHYDRANT={type:3,value:"FIREHYDRANT"};IfcFireSuppressionTerminalTypeEnum.HOSEREEL={type:3,value:"HOSEREEL"};IfcFireSuppressionTerminalTypeEnum.SPRINKLER={type:3,value:"SPRINKLER"};IfcFireSuppressionTerminalTypeEnum.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"};IfcFireSuppressionTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFireSuppressionTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFireSuppressionTerminalTypeEnum=IfcFireSuppressionTerminalTypeEnum;var IfcFlowDirectionEnum=/*#__PURE__*/_createClass(function IfcFlowDirectionEnum(){_classCallCheck(this,IfcFlowDirectionEnum);});IfcFlowDirectionEnum.SOURCE={type:3,value:"SOURCE"};IfcFlowDirectionEnum.SINK={type:3,value:"SINK"};IfcFlowDirectionEnum.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"};IfcFlowDirectionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFlowDirectionEnum=IfcFlowDirectionEnum;var IfcFlowInstrumentTypeEnum=/*#__PURE__*/_createClass(function IfcFlowInstrumentTypeEnum(){_classCallCheck(this,IfcFlowInstrumentTypeEnum);});IfcFlowInstrumentTypeEnum.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"};IfcFlowInstrumentTypeEnum.THERMOMETER={type:3,value:"THERMOMETER"};IfcFlowInstrumentTypeEnum.AMMETER={type:3,value:"AMMETER"};IfcFlowInstrumentTypeEnum.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"};IfcFlowInstrumentTypeEnum.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"};IfcFlowInstrumentTypeEnum.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"};IfcFlowInstrumentTypeEnum.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"};IfcFlowInstrumentTypeEnum.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"};IfcFlowInstrumentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFlowInstrumentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFlowInstrumentTypeEnum=IfcFlowInstrumentTypeEnum;var IfcFlowMeterTypeEnum=/*#__PURE__*/_createClass(function IfcFlowMeterTypeEnum(){_classCallCheck(this,IfcFlowMeterTypeEnum);});IfcFlowMeterTypeEnum.ENERGYMETER={type:3,value:"ENERGYMETER"};IfcFlowMeterTypeEnum.GASMETER={type:3,value:"GASMETER"};IfcFlowMeterTypeEnum.OILMETER={type:3,value:"OILMETER"};IfcFlowMeterTypeEnum.WATERMETER={type:3,value:"WATERMETER"};IfcFlowMeterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFlowMeterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFlowMeterTypeEnum=IfcFlowMeterTypeEnum;var IfcFootingTypeEnum=/*#__PURE__*/_createClass(function IfcFootingTypeEnum(){_classCallCheck(this,IfcFootingTypeEnum);});IfcFootingTypeEnum.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"};IfcFootingTypeEnum.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"};IfcFootingTypeEnum.PAD_FOOTING={type:3,value:"PAD_FOOTING"};IfcFootingTypeEnum.PILE_CAP={type:3,value:"PILE_CAP"};IfcFootingTypeEnum.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"};IfcFootingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFootingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFootingTypeEnum=IfcFootingTypeEnum;var IfcFurnitureTypeEnum=/*#__PURE__*/_createClass(function IfcFurnitureTypeEnum(){_classCallCheck(this,IfcFurnitureTypeEnum);});IfcFurnitureTypeEnum.CHAIR={type:3,value:"CHAIR"};IfcFurnitureTypeEnum.TABLE={type:3,value:"TABLE"};IfcFurnitureTypeEnum.DESK={type:3,value:"DESK"};IfcFurnitureTypeEnum.BED={type:3,value:"BED"};IfcFurnitureTypeEnum.FILECABINET={type:3,value:"FILECABINET"};IfcFurnitureTypeEnum.SHELF={type:3,value:"SHELF"};IfcFurnitureTypeEnum.SOFA={type:3,value:"SOFA"};IfcFurnitureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFurnitureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcFurnitureTypeEnum=IfcFurnitureTypeEnum;var IfcGeographicElementTypeEnum=/*#__PURE__*/_createClass(function IfcGeographicElementTypeEnum(){_classCallCheck(this,IfcGeographicElementTypeEnum);});IfcGeographicElementTypeEnum.TERRAIN={type:3,value:"TERRAIN"};IfcGeographicElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGeographicElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcGeographicElementTypeEnum=IfcGeographicElementTypeEnum;var IfcGeometricProjectionEnum=/*#__PURE__*/_createClass(function IfcGeometricProjectionEnum(){_classCallCheck(this,IfcGeometricProjectionEnum);});IfcGeometricProjectionEnum.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"};IfcGeometricProjectionEnum.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"};IfcGeometricProjectionEnum.MODEL_VIEW={type:3,value:"MODEL_VIEW"};IfcGeometricProjectionEnum.PLAN_VIEW={type:3,value:"PLAN_VIEW"};IfcGeometricProjectionEnum.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"};IfcGeometricProjectionEnum.SECTION_VIEW={type:3,value:"SECTION_VIEW"};IfcGeometricProjectionEnum.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"};IfcGeometricProjectionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGeometricProjectionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcGeometricProjectionEnum=IfcGeometricProjectionEnum;var IfcGlobalOrLocalEnum=/*#__PURE__*/_createClass(function IfcGlobalOrLocalEnum(){_classCallCheck(this,IfcGlobalOrLocalEnum);});IfcGlobalOrLocalEnum.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"};IfcGlobalOrLocalEnum.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"};IFC42.IfcGlobalOrLocalEnum=IfcGlobalOrLocalEnum;var IfcGridTypeEnum=/*#__PURE__*/_createClass(function IfcGridTypeEnum(){_classCallCheck(this,IfcGridTypeEnum);});IfcGridTypeEnum.RECTANGULAR={type:3,value:"RECTANGULAR"};IfcGridTypeEnum.RADIAL={type:3,value:"RADIAL"};IfcGridTypeEnum.TRIANGULAR={type:3,value:"TRIANGULAR"};IfcGridTypeEnum.IRREGULAR={type:3,value:"IRREGULAR"};IfcGridTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGridTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcGridTypeEnum=IfcGridTypeEnum;var IfcHeatExchangerTypeEnum=/*#__PURE__*/_createClass(function IfcHeatExchangerTypeEnum(){_classCallCheck(this,IfcHeatExchangerTypeEnum);});IfcHeatExchangerTypeEnum.PLATE={type:3,value:"PLATE"};IfcHeatExchangerTypeEnum.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"};IfcHeatExchangerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcHeatExchangerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcHeatExchangerTypeEnum=IfcHeatExchangerTypeEnum;var IfcHumidifierTypeEnum=/*#__PURE__*/_createClass(function IfcHumidifierTypeEnum(){_classCallCheck(this,IfcHumidifierTypeEnum);});IfcHumidifierTypeEnum.STEAMINJECTION={type:3,value:"STEAMINJECTION"};IfcHumidifierTypeEnum.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"};IfcHumidifierTypeEnum.ADIABATICPAN={type:3,value:"ADIABATICPAN"};IfcHumidifierTypeEnum.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"};IfcHumidifierTypeEnum.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"};IfcHumidifierTypeEnum.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"};IfcHumidifierTypeEnum.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"};IfcHumidifierTypeEnum.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"};IfcHumidifierTypeEnum.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"};IfcHumidifierTypeEnum.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"};IfcHumidifierTypeEnum.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"};IfcHumidifierTypeEnum.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"};IfcHumidifierTypeEnum.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"};IfcHumidifierTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcHumidifierTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcHumidifierTypeEnum=IfcHumidifierTypeEnum;var IfcInterceptorTypeEnum=/*#__PURE__*/_createClass(function IfcInterceptorTypeEnum(){_classCallCheck(this,IfcInterceptorTypeEnum);});IfcInterceptorTypeEnum.CYCLONIC={type:3,value:"CYCLONIC"};IfcInterceptorTypeEnum.GREASE={type:3,value:"GREASE"};IfcInterceptorTypeEnum.OIL={type:3,value:"OIL"};IfcInterceptorTypeEnum.PETROL={type:3,value:"PETROL"};IfcInterceptorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcInterceptorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcInterceptorTypeEnum=IfcInterceptorTypeEnum;var IfcInternalOrExternalEnum=/*#__PURE__*/_createClass(function IfcInternalOrExternalEnum(){_classCallCheck(this,IfcInternalOrExternalEnum);});IfcInternalOrExternalEnum.INTERNAL={type:3,value:"INTERNAL"};IfcInternalOrExternalEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcInternalOrExternalEnum.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"};IfcInternalOrExternalEnum.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"};IfcInternalOrExternalEnum.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"};IfcInternalOrExternalEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcInternalOrExternalEnum=IfcInternalOrExternalEnum;var IfcInventoryTypeEnum=/*#__PURE__*/_createClass(function IfcInventoryTypeEnum(){_classCallCheck(this,IfcInventoryTypeEnum);});IfcInventoryTypeEnum.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"};IfcInventoryTypeEnum.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"};IfcInventoryTypeEnum.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"};IfcInventoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcInventoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcInventoryTypeEnum=IfcInventoryTypeEnum;var IfcJunctionBoxTypeEnum=/*#__PURE__*/_createClass(function IfcJunctionBoxTypeEnum(){_classCallCheck(this,IfcJunctionBoxTypeEnum);});IfcJunctionBoxTypeEnum.DATA={type:3,value:"DATA"};IfcJunctionBoxTypeEnum.POWER={type:3,value:"POWER"};IfcJunctionBoxTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcJunctionBoxTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcJunctionBoxTypeEnum=IfcJunctionBoxTypeEnum;var IfcKnotType=/*#__PURE__*/_createClass(function IfcKnotType(){_classCallCheck(this,IfcKnotType);});IfcKnotType.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"};IfcKnotType.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"};IfcKnotType.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"};IfcKnotType.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC42.IfcKnotType=IfcKnotType;var IfcLaborResourceTypeEnum=/*#__PURE__*/_createClass(function IfcLaborResourceTypeEnum(){_classCallCheck(this,IfcLaborResourceTypeEnum);});IfcLaborResourceTypeEnum.ADMINISTRATION={type:3,value:"ADMINISTRATION"};IfcLaborResourceTypeEnum.CARPENTRY={type:3,value:"CARPENTRY"};IfcLaborResourceTypeEnum.CLEANING={type:3,value:"CLEANING"};IfcLaborResourceTypeEnum.CONCRETE={type:3,value:"CONCRETE"};IfcLaborResourceTypeEnum.DRYWALL={type:3,value:"DRYWALL"};IfcLaborResourceTypeEnum.ELECTRIC={type:3,value:"ELECTRIC"};IfcLaborResourceTypeEnum.FINISHING={type:3,value:"FINISHING"};IfcLaborResourceTypeEnum.FLOORING={type:3,value:"FLOORING"};IfcLaborResourceTypeEnum.GENERAL={type:3,value:"GENERAL"};IfcLaborResourceTypeEnum.HVAC={type:3,value:"HVAC"};IfcLaborResourceTypeEnum.LANDSCAPING={type:3,value:"LANDSCAPING"};IfcLaborResourceTypeEnum.MASONRY={type:3,value:"MASONRY"};IfcLaborResourceTypeEnum.PAINTING={type:3,value:"PAINTING"};IfcLaborResourceTypeEnum.PAVING={type:3,value:"PAVING"};IfcLaborResourceTypeEnum.PLUMBING={type:3,value:"PLUMBING"};IfcLaborResourceTypeEnum.ROOFING={type:3,value:"ROOFING"};IfcLaborResourceTypeEnum.SITEGRADING={type:3,value:"SITEGRADING"};IfcLaborResourceTypeEnum.STEELWORK={type:3,value:"STEELWORK"};IfcLaborResourceTypeEnum.SURVEYING={type:3,value:"SURVEYING"};IfcLaborResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLaborResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcLaborResourceTypeEnum=IfcLaborResourceTypeEnum;var IfcLampTypeEnum=/*#__PURE__*/_createClass(function IfcLampTypeEnum(){_classCallCheck(this,IfcLampTypeEnum);});IfcLampTypeEnum.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"};IfcLampTypeEnum.FLUORESCENT={type:3,value:"FLUORESCENT"};IfcLampTypeEnum.HALOGEN={type:3,value:"HALOGEN"};IfcLampTypeEnum.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"};IfcLampTypeEnum.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"};IfcLampTypeEnum.LED={type:3,value:"LED"};IfcLampTypeEnum.METALHALIDE={type:3,value:"METALHALIDE"};IfcLampTypeEnum.OLED={type:3,value:"OLED"};IfcLampTypeEnum.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"};IfcLampTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLampTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcLampTypeEnum=IfcLampTypeEnum;var IfcLayerSetDirectionEnum=/*#__PURE__*/_createClass(function IfcLayerSetDirectionEnum(){_classCallCheck(this,IfcLayerSetDirectionEnum);});IfcLayerSetDirectionEnum.AXIS1={type:3,value:"AXIS1"};IfcLayerSetDirectionEnum.AXIS2={type:3,value:"AXIS2"};IfcLayerSetDirectionEnum.AXIS3={type:3,value:"AXIS3"};IFC42.IfcLayerSetDirectionEnum=IfcLayerSetDirectionEnum;var IfcLightDistributionCurveEnum=/*#__PURE__*/_createClass(function IfcLightDistributionCurveEnum(){_classCallCheck(this,IfcLightDistributionCurveEnum);});IfcLightDistributionCurveEnum.TYPE_A={type:3,value:"TYPE_A"};IfcLightDistributionCurveEnum.TYPE_B={type:3,value:"TYPE_B"};IfcLightDistributionCurveEnum.TYPE_C={type:3,value:"TYPE_C"};IfcLightDistributionCurveEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcLightDistributionCurveEnum=IfcLightDistributionCurveEnum;var IfcLightEmissionSourceEnum=/*#__PURE__*/_createClass(function IfcLightEmissionSourceEnum(){_classCallCheck(this,IfcLightEmissionSourceEnum);});IfcLightEmissionSourceEnum.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"};IfcLightEmissionSourceEnum.FLUORESCENT={type:3,value:"FLUORESCENT"};IfcLightEmissionSourceEnum.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"};IfcLightEmissionSourceEnum.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"};IfcLightEmissionSourceEnum.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"};IfcLightEmissionSourceEnum.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"};IfcLightEmissionSourceEnum.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"};IfcLightEmissionSourceEnum.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"};IfcLightEmissionSourceEnum.METALHALIDE={type:3,value:"METALHALIDE"};IfcLightEmissionSourceEnum.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"};IfcLightEmissionSourceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcLightEmissionSourceEnum=IfcLightEmissionSourceEnum;var IfcLightFixtureTypeEnum=/*#__PURE__*/_createClass(function IfcLightFixtureTypeEnum(){_classCallCheck(this,IfcLightFixtureTypeEnum);});IfcLightFixtureTypeEnum.POINTSOURCE={type:3,value:"POINTSOURCE"};IfcLightFixtureTypeEnum.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"};IfcLightFixtureTypeEnum.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"};IfcLightFixtureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLightFixtureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcLightFixtureTypeEnum=IfcLightFixtureTypeEnum;var IfcLoadGroupTypeEnum=/*#__PURE__*/_createClass(function IfcLoadGroupTypeEnum(){_classCallCheck(this,IfcLoadGroupTypeEnum);});IfcLoadGroupTypeEnum.LOAD_GROUP={type:3,value:"LOAD_GROUP"};IfcLoadGroupTypeEnum.LOAD_CASE={type:3,value:"LOAD_CASE"};IfcLoadGroupTypeEnum.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"};IfcLoadGroupTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLoadGroupTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcLoadGroupTypeEnum=IfcLoadGroupTypeEnum;var IfcLogicalOperatorEnum=/*#__PURE__*/_createClass(function IfcLogicalOperatorEnum(){_classCallCheck(this,IfcLogicalOperatorEnum);});IfcLogicalOperatorEnum.LOGICALAND={type:3,value:"LOGICALAND"};IfcLogicalOperatorEnum.LOGICALOR={type:3,value:"LOGICALOR"};IfcLogicalOperatorEnum.LOGICALXOR={type:3,value:"LOGICALXOR"};IfcLogicalOperatorEnum.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"};IfcLogicalOperatorEnum.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"};IFC42.IfcLogicalOperatorEnum=IfcLogicalOperatorEnum;var IfcMechanicalFastenerTypeEnum=/*#__PURE__*/_createClass(function IfcMechanicalFastenerTypeEnum(){_classCallCheck(this,IfcMechanicalFastenerTypeEnum);});IfcMechanicalFastenerTypeEnum.ANCHORBOLT={type:3,value:"ANCHORBOLT"};IfcMechanicalFastenerTypeEnum.BOLT={type:3,value:"BOLT"};IfcMechanicalFastenerTypeEnum.DOWEL={type:3,value:"DOWEL"};IfcMechanicalFastenerTypeEnum.NAIL={type:3,value:"NAIL"};IfcMechanicalFastenerTypeEnum.NAILPLATE={type:3,value:"NAILPLATE"};IfcMechanicalFastenerTypeEnum.RIVET={type:3,value:"RIVET"};IfcMechanicalFastenerTypeEnum.SCREW={type:3,value:"SCREW"};IfcMechanicalFastenerTypeEnum.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"};IfcMechanicalFastenerTypeEnum.STAPLE={type:3,value:"STAPLE"};IfcMechanicalFastenerTypeEnum.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"};IfcMechanicalFastenerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMechanicalFastenerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcMechanicalFastenerTypeEnum=IfcMechanicalFastenerTypeEnum;var IfcMedicalDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcMedicalDeviceTypeEnum(){_classCallCheck(this,IfcMedicalDeviceTypeEnum);});IfcMedicalDeviceTypeEnum.AIRSTATION={type:3,value:"AIRSTATION"};IfcMedicalDeviceTypeEnum.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"};IfcMedicalDeviceTypeEnum.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"};IfcMedicalDeviceTypeEnum.OXYGENPLANT={type:3,value:"OXYGENPLANT"};IfcMedicalDeviceTypeEnum.VACUUMSTATION={type:3,value:"VACUUMSTATION"};IfcMedicalDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMedicalDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcMedicalDeviceTypeEnum=IfcMedicalDeviceTypeEnum;var IfcMemberTypeEnum=/*#__PURE__*/_createClass(function IfcMemberTypeEnum(){_classCallCheck(this,IfcMemberTypeEnum);});IfcMemberTypeEnum.BRACE={type:3,value:"BRACE"};IfcMemberTypeEnum.CHORD={type:3,value:"CHORD"};IfcMemberTypeEnum.COLLAR={type:3,value:"COLLAR"};IfcMemberTypeEnum.MEMBER={type:3,value:"MEMBER"};IfcMemberTypeEnum.MULLION={type:3,value:"MULLION"};IfcMemberTypeEnum.PLATE={type:3,value:"PLATE"};IfcMemberTypeEnum.POST={type:3,value:"POST"};IfcMemberTypeEnum.PURLIN={type:3,value:"PURLIN"};IfcMemberTypeEnum.RAFTER={type:3,value:"RAFTER"};IfcMemberTypeEnum.STRINGER={type:3,value:"STRINGER"};IfcMemberTypeEnum.STRUT={type:3,value:"STRUT"};IfcMemberTypeEnum.STUD={type:3,value:"STUD"};IfcMemberTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMemberTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcMemberTypeEnum=IfcMemberTypeEnum;var IfcMotorConnectionTypeEnum=/*#__PURE__*/_createClass(function IfcMotorConnectionTypeEnum(){_classCallCheck(this,IfcMotorConnectionTypeEnum);});IfcMotorConnectionTypeEnum.BELTDRIVE={type:3,value:"BELTDRIVE"};IfcMotorConnectionTypeEnum.COUPLING={type:3,value:"COUPLING"};IfcMotorConnectionTypeEnum.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"};IfcMotorConnectionTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMotorConnectionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcMotorConnectionTypeEnum=IfcMotorConnectionTypeEnum;var IfcNullStyle=/*#__PURE__*/_createClass(function IfcNullStyle(){_classCallCheck(this,IfcNullStyle);});IfcNullStyle.NULL={type:3,value:"NULL"};IFC42.IfcNullStyle=IfcNullStyle;var IfcObjectTypeEnum=/*#__PURE__*/_createClass(function IfcObjectTypeEnum(){_classCallCheck(this,IfcObjectTypeEnum);});IfcObjectTypeEnum.PRODUCT={type:3,value:"PRODUCT"};IfcObjectTypeEnum.PROCESS={type:3,value:"PROCESS"};IfcObjectTypeEnum.CONTROL={type:3,value:"CONTROL"};IfcObjectTypeEnum.RESOURCE={type:3,value:"RESOURCE"};IfcObjectTypeEnum.ACTOR={type:3,value:"ACTOR"};IfcObjectTypeEnum.GROUP={type:3,value:"GROUP"};IfcObjectTypeEnum.PROJECT={type:3,value:"PROJECT"};IfcObjectTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcObjectTypeEnum=IfcObjectTypeEnum;var IfcObjectiveEnum=/*#__PURE__*/_createClass(function IfcObjectiveEnum(){_classCallCheck(this,IfcObjectiveEnum);});IfcObjectiveEnum.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"};IfcObjectiveEnum.CODEWAIVER={type:3,value:"CODEWAIVER"};IfcObjectiveEnum.DESIGNINTENT={type:3,value:"DESIGNINTENT"};IfcObjectiveEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcObjectiveEnum.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"};IfcObjectiveEnum.MERGECONFLICT={type:3,value:"MERGECONFLICT"};IfcObjectiveEnum.MODELVIEW={type:3,value:"MODELVIEW"};IfcObjectiveEnum.PARAMETER={type:3,value:"PARAMETER"};IfcObjectiveEnum.REQUIREMENT={type:3,value:"REQUIREMENT"};IfcObjectiveEnum.SPECIFICATION={type:3,value:"SPECIFICATION"};IfcObjectiveEnum.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"};IfcObjectiveEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcObjectiveEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcObjectiveEnum=IfcObjectiveEnum;var IfcOccupantTypeEnum=/*#__PURE__*/_createClass(function IfcOccupantTypeEnum(){_classCallCheck(this,IfcOccupantTypeEnum);});IfcOccupantTypeEnum.ASSIGNEE={type:3,value:"ASSIGNEE"};IfcOccupantTypeEnum.ASSIGNOR={type:3,value:"ASSIGNOR"};IfcOccupantTypeEnum.LESSEE={type:3,value:"LESSEE"};IfcOccupantTypeEnum.LESSOR={type:3,value:"LESSOR"};IfcOccupantTypeEnum.LETTINGAGENT={type:3,value:"LETTINGAGENT"};IfcOccupantTypeEnum.OWNER={type:3,value:"OWNER"};IfcOccupantTypeEnum.TENANT={type:3,value:"TENANT"};IfcOccupantTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOccupantTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcOccupantTypeEnum=IfcOccupantTypeEnum;var IfcOpeningElementTypeEnum=/*#__PURE__*/_createClass(function IfcOpeningElementTypeEnum(){_classCallCheck(this,IfcOpeningElementTypeEnum);});IfcOpeningElementTypeEnum.OPENING={type:3,value:"OPENING"};IfcOpeningElementTypeEnum.RECESS={type:3,value:"RECESS"};IfcOpeningElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOpeningElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcOpeningElementTypeEnum=IfcOpeningElementTypeEnum;var IfcOutletTypeEnum=/*#__PURE__*/_createClass(function IfcOutletTypeEnum(){_classCallCheck(this,IfcOutletTypeEnum);});IfcOutletTypeEnum.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"};IfcOutletTypeEnum.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"};IfcOutletTypeEnum.POWEROUTLET={type:3,value:"POWEROUTLET"};IfcOutletTypeEnum.DATAOUTLET={type:3,value:"DATAOUTLET"};IfcOutletTypeEnum.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"};IfcOutletTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOutletTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcOutletTypeEnum=IfcOutletTypeEnum;var IfcPerformanceHistoryTypeEnum=/*#__PURE__*/_createClass(function IfcPerformanceHistoryTypeEnum(){_classCallCheck(this,IfcPerformanceHistoryTypeEnum);});IfcPerformanceHistoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPerformanceHistoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPerformanceHistoryTypeEnum=IfcPerformanceHistoryTypeEnum;var IfcPermeableCoveringOperationEnum=/*#__PURE__*/_createClass(function IfcPermeableCoveringOperationEnum(){_classCallCheck(this,IfcPermeableCoveringOperationEnum);});IfcPermeableCoveringOperationEnum.GRILL={type:3,value:"GRILL"};IfcPermeableCoveringOperationEnum.LOUVER={type:3,value:"LOUVER"};IfcPermeableCoveringOperationEnum.SCREEN={type:3,value:"SCREEN"};IfcPermeableCoveringOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPermeableCoveringOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPermeableCoveringOperationEnum=IfcPermeableCoveringOperationEnum;var IfcPermitTypeEnum=/*#__PURE__*/_createClass(function IfcPermitTypeEnum(){_classCallCheck(this,IfcPermitTypeEnum);});IfcPermitTypeEnum.ACCESS={type:3,value:"ACCESS"};IfcPermitTypeEnum.BUILDING={type:3,value:"BUILDING"};IfcPermitTypeEnum.WORK={type:3,value:"WORK"};IfcPermitTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPermitTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPermitTypeEnum=IfcPermitTypeEnum;var IfcPhysicalOrVirtualEnum=/*#__PURE__*/_createClass(function IfcPhysicalOrVirtualEnum(){_classCallCheck(this,IfcPhysicalOrVirtualEnum);});IfcPhysicalOrVirtualEnum.PHYSICAL={type:3,value:"PHYSICAL"};IfcPhysicalOrVirtualEnum.VIRTUAL={type:3,value:"VIRTUAL"};IfcPhysicalOrVirtualEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPhysicalOrVirtualEnum=IfcPhysicalOrVirtualEnum;var IfcPileConstructionEnum=/*#__PURE__*/_createClass(function IfcPileConstructionEnum(){_classCallCheck(this,IfcPileConstructionEnum);});IfcPileConstructionEnum.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"};IfcPileConstructionEnum.COMPOSITE={type:3,value:"COMPOSITE"};IfcPileConstructionEnum.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"};IfcPileConstructionEnum.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"};IfcPileConstructionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPileConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPileConstructionEnum=IfcPileConstructionEnum;var IfcPileTypeEnum=/*#__PURE__*/_createClass(function IfcPileTypeEnum(){_classCallCheck(this,IfcPileTypeEnum);});IfcPileTypeEnum.BORED={type:3,value:"BORED"};IfcPileTypeEnum.DRIVEN={type:3,value:"DRIVEN"};IfcPileTypeEnum.JETGROUTING={type:3,value:"JETGROUTING"};IfcPileTypeEnum.COHESION={type:3,value:"COHESION"};IfcPileTypeEnum.FRICTION={type:3,value:"FRICTION"};IfcPileTypeEnum.SUPPORT={type:3,value:"SUPPORT"};IfcPileTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPileTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPileTypeEnum=IfcPileTypeEnum;var IfcPipeFittingTypeEnum=/*#__PURE__*/_createClass(function IfcPipeFittingTypeEnum(){_classCallCheck(this,IfcPipeFittingTypeEnum);});IfcPipeFittingTypeEnum.BEND={type:3,value:"BEND"};IfcPipeFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcPipeFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcPipeFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcPipeFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcPipeFittingTypeEnum.OBSTRUCTION={type:3,value:"OBSTRUCTION"};IfcPipeFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcPipeFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPipeFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPipeFittingTypeEnum=IfcPipeFittingTypeEnum;var IfcPipeSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcPipeSegmentTypeEnum(){_classCallCheck(this,IfcPipeSegmentTypeEnum);});IfcPipeSegmentTypeEnum.CULVERT={type:3,value:"CULVERT"};IfcPipeSegmentTypeEnum.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"};IfcPipeSegmentTypeEnum.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"};IfcPipeSegmentTypeEnum.GUTTER={type:3,value:"GUTTER"};IfcPipeSegmentTypeEnum.SPOOL={type:3,value:"SPOOL"};IfcPipeSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPipeSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPipeSegmentTypeEnum=IfcPipeSegmentTypeEnum;var IfcPlateTypeEnum=/*#__PURE__*/_createClass(function IfcPlateTypeEnum(){_classCallCheck(this,IfcPlateTypeEnum);});IfcPlateTypeEnum.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"};IfcPlateTypeEnum.SHEET={type:3,value:"SHEET"};IfcPlateTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPlateTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPlateTypeEnum=IfcPlateTypeEnum;var IfcPreferredSurfaceCurveRepresentation=/*#__PURE__*/_createClass(function IfcPreferredSurfaceCurveRepresentation(){_classCallCheck(this,IfcPreferredSurfaceCurveRepresentation);});IfcPreferredSurfaceCurveRepresentation.CURVE3D={type:3,value:"CURVE3D"};IfcPreferredSurfaceCurveRepresentation.PCURVE_S1={type:3,value:"PCURVE_S1"};IfcPreferredSurfaceCurveRepresentation.PCURVE_S2={type:3,value:"PCURVE_S2"};IFC42.IfcPreferredSurfaceCurveRepresentation=IfcPreferredSurfaceCurveRepresentation;var IfcProcedureTypeEnum=/*#__PURE__*/_createClass(function IfcProcedureTypeEnum(){_classCallCheck(this,IfcProcedureTypeEnum);});IfcProcedureTypeEnum.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"};IfcProcedureTypeEnum.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"};IfcProcedureTypeEnum.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"};IfcProcedureTypeEnum.CALIBRATION={type:3,value:"CALIBRATION"};IfcProcedureTypeEnum.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"};IfcProcedureTypeEnum.SHUTDOWN={type:3,value:"SHUTDOWN"};IfcProcedureTypeEnum.STARTUP={type:3,value:"STARTUP"};IfcProcedureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProcedureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcProcedureTypeEnum=IfcProcedureTypeEnum;var IfcProfileTypeEnum=/*#__PURE__*/_createClass(function IfcProfileTypeEnum(){_classCallCheck(this,IfcProfileTypeEnum);});IfcProfileTypeEnum.CURVE={type:3,value:"CURVE"};IfcProfileTypeEnum.AREA={type:3,value:"AREA"};IFC42.IfcProfileTypeEnum=IfcProfileTypeEnum;var IfcProjectOrderTypeEnum=/*#__PURE__*/_createClass(function IfcProjectOrderTypeEnum(){_classCallCheck(this,IfcProjectOrderTypeEnum);});IfcProjectOrderTypeEnum.CHANGEORDER={type:3,value:"CHANGEORDER"};IfcProjectOrderTypeEnum.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"};IfcProjectOrderTypeEnum.MOVEORDER={type:3,value:"MOVEORDER"};IfcProjectOrderTypeEnum.PURCHASEORDER={type:3,value:"PURCHASEORDER"};IfcProjectOrderTypeEnum.WORKORDER={type:3,value:"WORKORDER"};IfcProjectOrderTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProjectOrderTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcProjectOrderTypeEnum=IfcProjectOrderTypeEnum;var IfcProjectedOrTrueLengthEnum=/*#__PURE__*/_createClass(function IfcProjectedOrTrueLengthEnum(){_classCallCheck(this,IfcProjectedOrTrueLengthEnum);});IfcProjectedOrTrueLengthEnum.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"};IfcProjectedOrTrueLengthEnum.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"};IFC42.IfcProjectedOrTrueLengthEnum=IfcProjectedOrTrueLengthEnum;var IfcProjectionElementTypeEnum=/*#__PURE__*/_createClass(function IfcProjectionElementTypeEnum(){_classCallCheck(this,IfcProjectionElementTypeEnum);});IfcProjectionElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProjectionElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcProjectionElementTypeEnum=IfcProjectionElementTypeEnum;var IfcPropertySetTemplateTypeEnum=/*#__PURE__*/_createClass(function IfcPropertySetTemplateTypeEnum(){_classCallCheck(this,IfcPropertySetTemplateTypeEnum);});IfcPropertySetTemplateTypeEnum.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"};IfcPropertySetTemplateTypeEnum.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"};IfcPropertySetTemplateTypeEnum.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"};IfcPropertySetTemplateTypeEnum.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"};IfcPropertySetTemplateTypeEnum.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"};IfcPropertySetTemplateTypeEnum.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"};IfcPropertySetTemplateTypeEnum.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"};IfcPropertySetTemplateTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPropertySetTemplateTypeEnum=IfcPropertySetTemplateTypeEnum;var IfcProtectiveDeviceTrippingUnitTypeEnum=/*#__PURE__*/_createClass(function IfcProtectiveDeviceTrippingUnitTypeEnum(){_classCallCheck(this,IfcProtectiveDeviceTrippingUnitTypeEnum);});IfcProtectiveDeviceTrippingUnitTypeEnum.ELECTRONIC={type:3,value:"ELECTRONIC"};IfcProtectiveDeviceTrippingUnitTypeEnum.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"};IfcProtectiveDeviceTrippingUnitTypeEnum.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"};IfcProtectiveDeviceTrippingUnitTypeEnum.THERMAL={type:3,value:"THERMAL"};IfcProtectiveDeviceTrippingUnitTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProtectiveDeviceTrippingUnitTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcProtectiveDeviceTrippingUnitTypeEnum=IfcProtectiveDeviceTrippingUnitTypeEnum;var IfcProtectiveDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcProtectiveDeviceTypeEnum(){_classCallCheck(this,IfcProtectiveDeviceTypeEnum);});IfcProtectiveDeviceTypeEnum.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"};IfcProtectiveDeviceTypeEnum.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"};IfcProtectiveDeviceTypeEnum.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"};IfcProtectiveDeviceTypeEnum.VARISTOR={type:3,value:"VARISTOR"};IfcProtectiveDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProtectiveDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcProtectiveDeviceTypeEnum=IfcProtectiveDeviceTypeEnum;var IfcPumpTypeEnum=/*#__PURE__*/_createClass(function IfcPumpTypeEnum(){_classCallCheck(this,IfcPumpTypeEnum);});IfcPumpTypeEnum.CIRCULATOR={type:3,value:"CIRCULATOR"};IfcPumpTypeEnum.ENDSUCTION={type:3,value:"ENDSUCTION"};IfcPumpTypeEnum.SPLITCASE={type:3,value:"SPLITCASE"};IfcPumpTypeEnum.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"};IfcPumpTypeEnum.SUMPPUMP={type:3,value:"SUMPPUMP"};IfcPumpTypeEnum.VERTICALINLINE={type:3,value:"VERTICALINLINE"};IfcPumpTypeEnum.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"};IfcPumpTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPumpTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcPumpTypeEnum=IfcPumpTypeEnum;var IfcRailingTypeEnum=/*#__PURE__*/_createClass(function IfcRailingTypeEnum(){_classCallCheck(this,IfcRailingTypeEnum);});IfcRailingTypeEnum.HANDRAIL={type:3,value:"HANDRAIL"};IfcRailingTypeEnum.GUARDRAIL={type:3,value:"GUARDRAIL"};IfcRailingTypeEnum.BALUSTRADE={type:3,value:"BALUSTRADE"};IfcRailingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRailingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcRailingTypeEnum=IfcRailingTypeEnum;var IfcRampFlightTypeEnum=/*#__PURE__*/_createClass(function IfcRampFlightTypeEnum(){_classCallCheck(this,IfcRampFlightTypeEnum);});IfcRampFlightTypeEnum.STRAIGHT={type:3,value:"STRAIGHT"};IfcRampFlightTypeEnum.SPIRAL={type:3,value:"SPIRAL"};IfcRampFlightTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRampFlightTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcRampFlightTypeEnum=IfcRampFlightTypeEnum;var IfcRampTypeEnum=/*#__PURE__*/_createClass(function IfcRampTypeEnum(){_classCallCheck(this,IfcRampTypeEnum);});IfcRampTypeEnum.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"};IfcRampTypeEnum.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"};IfcRampTypeEnum.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"};IfcRampTypeEnum.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"};IfcRampTypeEnum.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"};IfcRampTypeEnum.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"};IfcRampTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRampTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcRampTypeEnum=IfcRampTypeEnum;var IfcRecurrenceTypeEnum=/*#__PURE__*/_createClass(function IfcRecurrenceTypeEnum(){_classCallCheck(this,IfcRecurrenceTypeEnum);});IfcRecurrenceTypeEnum.DAILY={type:3,value:"DAILY"};IfcRecurrenceTypeEnum.WEEKLY={type:3,value:"WEEKLY"};IfcRecurrenceTypeEnum.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"};IfcRecurrenceTypeEnum.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"};IfcRecurrenceTypeEnum.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"};IfcRecurrenceTypeEnum.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"};IfcRecurrenceTypeEnum.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"};IfcRecurrenceTypeEnum.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"};IFC42.IfcRecurrenceTypeEnum=IfcRecurrenceTypeEnum;var IfcReflectanceMethodEnum=/*#__PURE__*/_createClass(function IfcReflectanceMethodEnum(){_classCallCheck(this,IfcReflectanceMethodEnum);});IfcReflectanceMethodEnum.BLINN={type:3,value:"BLINN"};IfcReflectanceMethodEnum.FLAT={type:3,value:"FLAT"};IfcReflectanceMethodEnum.GLASS={type:3,value:"GLASS"};IfcReflectanceMethodEnum.MATT={type:3,value:"MATT"};IfcReflectanceMethodEnum.METAL={type:3,value:"METAL"};IfcReflectanceMethodEnum.MIRROR={type:3,value:"MIRROR"};IfcReflectanceMethodEnum.PHONG={type:3,value:"PHONG"};IfcReflectanceMethodEnum.PLASTIC={type:3,value:"PLASTIC"};IfcReflectanceMethodEnum.STRAUSS={type:3,value:"STRAUSS"};IfcReflectanceMethodEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcReflectanceMethodEnum=IfcReflectanceMethodEnum;var IfcReinforcingBarRoleEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarRoleEnum(){_classCallCheck(this,IfcReinforcingBarRoleEnum);});IfcReinforcingBarRoleEnum.MAIN={type:3,value:"MAIN"};IfcReinforcingBarRoleEnum.SHEAR={type:3,value:"SHEAR"};IfcReinforcingBarRoleEnum.LIGATURE={type:3,value:"LIGATURE"};IfcReinforcingBarRoleEnum.STUD={type:3,value:"STUD"};IfcReinforcingBarRoleEnum.PUNCHING={type:3,value:"PUNCHING"};IfcReinforcingBarRoleEnum.EDGE={type:3,value:"EDGE"};IfcReinforcingBarRoleEnum.RING={type:3,value:"RING"};IfcReinforcingBarRoleEnum.ANCHORING={type:3,value:"ANCHORING"};IfcReinforcingBarRoleEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcingBarRoleEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcReinforcingBarRoleEnum=IfcReinforcingBarRoleEnum;var IfcReinforcingBarSurfaceEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarSurfaceEnum(){_classCallCheck(this,IfcReinforcingBarSurfaceEnum);});IfcReinforcingBarSurfaceEnum.PLAIN={type:3,value:"PLAIN"};IfcReinforcingBarSurfaceEnum.TEXTURED={type:3,value:"TEXTURED"};IFC42.IfcReinforcingBarSurfaceEnum=IfcReinforcingBarSurfaceEnum;var IfcReinforcingBarTypeEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarTypeEnum(){_classCallCheck(this,IfcReinforcingBarTypeEnum);});IfcReinforcingBarTypeEnum.ANCHORING={type:3,value:"ANCHORING"};IfcReinforcingBarTypeEnum.EDGE={type:3,value:"EDGE"};IfcReinforcingBarTypeEnum.LIGATURE={type:3,value:"LIGATURE"};IfcReinforcingBarTypeEnum.MAIN={type:3,value:"MAIN"};IfcReinforcingBarTypeEnum.PUNCHING={type:3,value:"PUNCHING"};IfcReinforcingBarTypeEnum.RING={type:3,value:"RING"};IfcReinforcingBarTypeEnum.SHEAR={type:3,value:"SHEAR"};IfcReinforcingBarTypeEnum.STUD={type:3,value:"STUD"};IfcReinforcingBarTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcingBarTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcReinforcingBarTypeEnum=IfcReinforcingBarTypeEnum;var IfcReinforcingMeshTypeEnum=/*#__PURE__*/_createClass(function IfcReinforcingMeshTypeEnum(){_classCallCheck(this,IfcReinforcingMeshTypeEnum);});IfcReinforcingMeshTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcingMeshTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcReinforcingMeshTypeEnum=IfcReinforcingMeshTypeEnum;var IfcRoleEnum=/*#__PURE__*/_createClass(function IfcRoleEnum(){_classCallCheck(this,IfcRoleEnum);});IfcRoleEnum.SUPPLIER={type:3,value:"SUPPLIER"};IfcRoleEnum.MANUFACTURER={type:3,value:"MANUFACTURER"};IfcRoleEnum.CONTRACTOR={type:3,value:"CONTRACTOR"};IfcRoleEnum.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"};IfcRoleEnum.ARCHITECT={type:3,value:"ARCHITECT"};IfcRoleEnum.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"};IfcRoleEnum.COSTENGINEER={type:3,value:"COSTENGINEER"};IfcRoleEnum.CLIENT={type:3,value:"CLIENT"};IfcRoleEnum.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"};IfcRoleEnum.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"};IfcRoleEnum.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"};IfcRoleEnum.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"};IfcRoleEnum.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"};IfcRoleEnum.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"};IfcRoleEnum.CIVILENGINEER={type:3,value:"CIVILENGINEER"};IfcRoleEnum.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"};IfcRoleEnum.ENGINEER={type:3,value:"ENGINEER"};IfcRoleEnum.OWNER={type:3,value:"OWNER"};IfcRoleEnum.CONSULTANT={type:3,value:"CONSULTANT"};IfcRoleEnum.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"};IfcRoleEnum.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"};IfcRoleEnum.RESELLER={type:3,value:"RESELLER"};IfcRoleEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC42.IfcRoleEnum=IfcRoleEnum;var IfcRoofTypeEnum=/*#__PURE__*/_createClass(function IfcRoofTypeEnum(){_classCallCheck(this,IfcRoofTypeEnum);});IfcRoofTypeEnum.FLAT_ROOF={type:3,value:"FLAT_ROOF"};IfcRoofTypeEnum.SHED_ROOF={type:3,value:"SHED_ROOF"};IfcRoofTypeEnum.GABLE_ROOF={type:3,value:"GABLE_ROOF"};IfcRoofTypeEnum.HIP_ROOF={type:3,value:"HIP_ROOF"};IfcRoofTypeEnum.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"};IfcRoofTypeEnum.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"};IfcRoofTypeEnum.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"};IfcRoofTypeEnum.BARREL_ROOF={type:3,value:"BARREL_ROOF"};IfcRoofTypeEnum.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"};IfcRoofTypeEnum.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"};IfcRoofTypeEnum.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"};IfcRoofTypeEnum.DOME_ROOF={type:3,value:"DOME_ROOF"};IfcRoofTypeEnum.FREEFORM={type:3,value:"FREEFORM"};IfcRoofTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRoofTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcRoofTypeEnum=IfcRoofTypeEnum;var IfcSIPrefix=/*#__PURE__*/_createClass(function IfcSIPrefix(){_classCallCheck(this,IfcSIPrefix);});IfcSIPrefix.EXA={type:3,value:"EXA"};IfcSIPrefix.PETA={type:3,value:"PETA"};IfcSIPrefix.TERA={type:3,value:"TERA"};IfcSIPrefix.GIGA={type:3,value:"GIGA"};IfcSIPrefix.MEGA={type:3,value:"MEGA"};IfcSIPrefix.KILO={type:3,value:"KILO"};IfcSIPrefix.HECTO={type:3,value:"HECTO"};IfcSIPrefix.DECA={type:3,value:"DECA"};IfcSIPrefix.DECI={type:3,value:"DECI"};IfcSIPrefix.CENTI={type:3,value:"CENTI"};IfcSIPrefix.MILLI={type:3,value:"MILLI"};IfcSIPrefix.MICRO={type:3,value:"MICRO"};IfcSIPrefix.NANO={type:3,value:"NANO"};IfcSIPrefix.PICO={type:3,value:"PICO"};IfcSIPrefix.FEMTO={type:3,value:"FEMTO"};IfcSIPrefix.ATTO={type:3,value:"ATTO"};IFC42.IfcSIPrefix=IfcSIPrefix;var IfcSIUnitName=/*#__PURE__*/_createClass(function IfcSIUnitName(){_classCallCheck(this,IfcSIUnitName);});IfcSIUnitName.AMPERE={type:3,value:"AMPERE"};IfcSIUnitName.BECQUEREL={type:3,value:"BECQUEREL"};IfcSIUnitName.CANDELA={type:3,value:"CANDELA"};IfcSIUnitName.COULOMB={type:3,value:"COULOMB"};IfcSIUnitName.CUBIC_METRE={type:3,value:"CUBIC_METRE"};IfcSIUnitName.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"};IfcSIUnitName.FARAD={type:3,value:"FARAD"};IfcSIUnitName.GRAM={type:3,value:"GRAM"};IfcSIUnitName.GRAY={type:3,value:"GRAY"};IfcSIUnitName.HENRY={type:3,value:"HENRY"};IfcSIUnitName.HERTZ={type:3,value:"HERTZ"};IfcSIUnitName.JOULE={type:3,value:"JOULE"};IfcSIUnitName.KELVIN={type:3,value:"KELVIN"};IfcSIUnitName.LUMEN={type:3,value:"LUMEN"};IfcSIUnitName.LUX={type:3,value:"LUX"};IfcSIUnitName.METRE={type:3,value:"METRE"};IfcSIUnitName.MOLE={type:3,value:"MOLE"};IfcSIUnitName.NEWTON={type:3,value:"NEWTON"};IfcSIUnitName.OHM={type:3,value:"OHM"};IfcSIUnitName.PASCAL={type:3,value:"PASCAL"};IfcSIUnitName.RADIAN={type:3,value:"RADIAN"};IfcSIUnitName.SECOND={type:3,value:"SECOND"};IfcSIUnitName.SIEMENS={type:3,value:"SIEMENS"};IfcSIUnitName.SIEVERT={type:3,value:"SIEVERT"};IfcSIUnitName.SQUARE_METRE={type:3,value:"SQUARE_METRE"};IfcSIUnitName.STERADIAN={type:3,value:"STERADIAN"};IfcSIUnitName.TESLA={type:3,value:"TESLA"};IfcSIUnitName.VOLT={type:3,value:"VOLT"};IfcSIUnitName.WATT={type:3,value:"WATT"};IfcSIUnitName.WEBER={type:3,value:"WEBER"};IFC42.IfcSIUnitName=IfcSIUnitName;var IfcSanitaryTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcSanitaryTerminalTypeEnum(){_classCallCheck(this,IfcSanitaryTerminalTypeEnum);});IfcSanitaryTerminalTypeEnum.BATH={type:3,value:"BATH"};IfcSanitaryTerminalTypeEnum.BIDET={type:3,value:"BIDET"};IfcSanitaryTerminalTypeEnum.CISTERN={type:3,value:"CISTERN"};IfcSanitaryTerminalTypeEnum.SHOWER={type:3,value:"SHOWER"};IfcSanitaryTerminalTypeEnum.SINK={type:3,value:"SINK"};IfcSanitaryTerminalTypeEnum.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"};IfcSanitaryTerminalTypeEnum.TOILETPAN={type:3,value:"TOILETPAN"};IfcSanitaryTerminalTypeEnum.URINAL={type:3,value:"URINAL"};IfcSanitaryTerminalTypeEnum.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"};IfcSanitaryTerminalTypeEnum.WCSEAT={type:3,value:"WCSEAT"};IfcSanitaryTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSanitaryTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSanitaryTerminalTypeEnum=IfcSanitaryTerminalTypeEnum;var IfcSectionTypeEnum=/*#__PURE__*/_createClass(function IfcSectionTypeEnum(){_classCallCheck(this,IfcSectionTypeEnum);});IfcSectionTypeEnum.UNIFORM={type:3,value:"UNIFORM"};IfcSectionTypeEnum.TAPERED={type:3,value:"TAPERED"};IFC42.IfcSectionTypeEnum=IfcSectionTypeEnum;var IfcSensorTypeEnum=/*#__PURE__*/_createClass(function IfcSensorTypeEnum(){_classCallCheck(this,IfcSensorTypeEnum);});IfcSensorTypeEnum.COSENSOR={type:3,value:"COSENSOR"};IfcSensorTypeEnum.CO2SENSOR={type:3,value:"CO2SENSOR"};IfcSensorTypeEnum.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"};IfcSensorTypeEnum.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"};IfcSensorTypeEnum.FIRESENSOR={type:3,value:"FIRESENSOR"};IfcSensorTypeEnum.FLOWSENSOR={type:3,value:"FLOWSENSOR"};IfcSensorTypeEnum.FROSTSENSOR={type:3,value:"FROSTSENSOR"};IfcSensorTypeEnum.GASSENSOR={type:3,value:"GASSENSOR"};IfcSensorTypeEnum.HEATSENSOR={type:3,value:"HEATSENSOR"};IfcSensorTypeEnum.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"};IfcSensorTypeEnum.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"};IfcSensorTypeEnum.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"};IfcSensorTypeEnum.LEVELSENSOR={type:3,value:"LEVELSENSOR"};IfcSensorTypeEnum.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"};IfcSensorTypeEnum.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"};IfcSensorTypeEnum.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"};IfcSensorTypeEnum.PHSENSOR={type:3,value:"PHSENSOR"};IfcSensorTypeEnum.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"};IfcSensorTypeEnum.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"};IfcSensorTypeEnum.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"};IfcSensorTypeEnum.SMOKESENSOR={type:3,value:"SMOKESENSOR"};IfcSensorTypeEnum.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"};IfcSensorTypeEnum.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"};IfcSensorTypeEnum.WINDSENSOR={type:3,value:"WINDSENSOR"};IfcSensorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSensorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSensorTypeEnum=IfcSensorTypeEnum;var IfcSequenceEnum=/*#__PURE__*/_createClass(function IfcSequenceEnum(){_classCallCheck(this,IfcSequenceEnum);});IfcSequenceEnum.START_START={type:3,value:"START_START"};IfcSequenceEnum.START_FINISH={type:3,value:"START_FINISH"};IfcSequenceEnum.FINISH_START={type:3,value:"FINISH_START"};IfcSequenceEnum.FINISH_FINISH={type:3,value:"FINISH_FINISH"};IfcSequenceEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSequenceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSequenceEnum=IfcSequenceEnum;var IfcShadingDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcShadingDeviceTypeEnum(){_classCallCheck(this,IfcShadingDeviceTypeEnum);});IfcShadingDeviceTypeEnum.JALOUSIE={type:3,value:"JALOUSIE"};IfcShadingDeviceTypeEnum.SHUTTER={type:3,value:"SHUTTER"};IfcShadingDeviceTypeEnum.AWNING={type:3,value:"AWNING"};IfcShadingDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcShadingDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcShadingDeviceTypeEnum=IfcShadingDeviceTypeEnum;var IfcSimplePropertyTemplateTypeEnum=/*#__PURE__*/_createClass(function IfcSimplePropertyTemplateTypeEnum(){_classCallCheck(this,IfcSimplePropertyTemplateTypeEnum);});IfcSimplePropertyTemplateTypeEnum.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"};IfcSimplePropertyTemplateTypeEnum.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"};IfcSimplePropertyTemplateTypeEnum.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"};IfcSimplePropertyTemplateTypeEnum.P_LISTVALUE={type:3,value:"P_LISTVALUE"};IfcSimplePropertyTemplateTypeEnum.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"};IfcSimplePropertyTemplateTypeEnum.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"};IfcSimplePropertyTemplateTypeEnum.Q_LENGTH={type:3,value:"Q_LENGTH"};IfcSimplePropertyTemplateTypeEnum.Q_AREA={type:3,value:"Q_AREA"};IfcSimplePropertyTemplateTypeEnum.Q_VOLUME={type:3,value:"Q_VOLUME"};IfcSimplePropertyTemplateTypeEnum.Q_COUNT={type:3,value:"Q_COUNT"};IfcSimplePropertyTemplateTypeEnum.Q_WEIGHT={type:3,value:"Q_WEIGHT"};IfcSimplePropertyTemplateTypeEnum.Q_TIME={type:3,value:"Q_TIME"};IFC42.IfcSimplePropertyTemplateTypeEnum=IfcSimplePropertyTemplateTypeEnum;var IfcSlabTypeEnum=/*#__PURE__*/_createClass(function IfcSlabTypeEnum(){_classCallCheck(this,IfcSlabTypeEnum);});IfcSlabTypeEnum.FLOOR={type:3,value:"FLOOR"};IfcSlabTypeEnum.ROOF={type:3,value:"ROOF"};IfcSlabTypeEnum.LANDING={type:3,value:"LANDING"};IfcSlabTypeEnum.BASESLAB={type:3,value:"BASESLAB"};IfcSlabTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSlabTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSlabTypeEnum=IfcSlabTypeEnum;var IfcSolarDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcSolarDeviceTypeEnum(){_classCallCheck(this,IfcSolarDeviceTypeEnum);});IfcSolarDeviceTypeEnum.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"};IfcSolarDeviceTypeEnum.SOLARPANEL={type:3,value:"SOLARPANEL"};IfcSolarDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSolarDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSolarDeviceTypeEnum=IfcSolarDeviceTypeEnum;var IfcSpaceHeaterTypeEnum=/*#__PURE__*/_createClass(function IfcSpaceHeaterTypeEnum(){_classCallCheck(this,IfcSpaceHeaterTypeEnum);});IfcSpaceHeaterTypeEnum.CONVECTOR={type:3,value:"CONVECTOR"};IfcSpaceHeaterTypeEnum.RADIATOR={type:3,value:"RADIATOR"};IfcSpaceHeaterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpaceHeaterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSpaceHeaterTypeEnum=IfcSpaceHeaterTypeEnum;var IfcSpaceTypeEnum=/*#__PURE__*/_createClass(function IfcSpaceTypeEnum(){_classCallCheck(this,IfcSpaceTypeEnum);});IfcSpaceTypeEnum.SPACE={type:3,value:"SPACE"};IfcSpaceTypeEnum.PARKING={type:3,value:"PARKING"};IfcSpaceTypeEnum.GFA={type:3,value:"GFA"};IfcSpaceTypeEnum.INTERNAL={type:3,value:"INTERNAL"};IfcSpaceTypeEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcSpaceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpaceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSpaceTypeEnum=IfcSpaceTypeEnum;var IfcSpatialZoneTypeEnum=/*#__PURE__*/_createClass(function IfcSpatialZoneTypeEnum(){_classCallCheck(this,IfcSpatialZoneTypeEnum);});IfcSpatialZoneTypeEnum.CONSTRUCTION={type:3,value:"CONSTRUCTION"};IfcSpatialZoneTypeEnum.FIRESAFETY={type:3,value:"FIRESAFETY"};IfcSpatialZoneTypeEnum.LIGHTING={type:3,value:"LIGHTING"};IfcSpatialZoneTypeEnum.OCCUPANCY={type:3,value:"OCCUPANCY"};IfcSpatialZoneTypeEnum.SECURITY={type:3,value:"SECURITY"};IfcSpatialZoneTypeEnum.THERMAL={type:3,value:"THERMAL"};IfcSpatialZoneTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcSpatialZoneTypeEnum.VENTILATION={type:3,value:"VENTILATION"};IfcSpatialZoneTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpatialZoneTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSpatialZoneTypeEnum=IfcSpatialZoneTypeEnum;var IfcStackTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcStackTerminalTypeEnum(){_classCallCheck(this,IfcStackTerminalTypeEnum);});IfcStackTerminalTypeEnum.BIRDCAGE={type:3,value:"BIRDCAGE"};IfcStackTerminalTypeEnum.COWL={type:3,value:"COWL"};IfcStackTerminalTypeEnum.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"};IfcStackTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStackTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcStackTerminalTypeEnum=IfcStackTerminalTypeEnum;var IfcStairFlightTypeEnum=/*#__PURE__*/_createClass(function IfcStairFlightTypeEnum(){_classCallCheck(this,IfcStairFlightTypeEnum);});IfcStairFlightTypeEnum.STRAIGHT={type:3,value:"STRAIGHT"};IfcStairFlightTypeEnum.WINDER={type:3,value:"WINDER"};IfcStairFlightTypeEnum.SPIRAL={type:3,value:"SPIRAL"};IfcStairFlightTypeEnum.CURVED={type:3,value:"CURVED"};IfcStairFlightTypeEnum.FREEFORM={type:3,value:"FREEFORM"};IfcStairFlightTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStairFlightTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcStairFlightTypeEnum=IfcStairFlightTypeEnum;var IfcStairTypeEnum=/*#__PURE__*/_createClass(function IfcStairTypeEnum(){_classCallCheck(this,IfcStairTypeEnum);});IfcStairTypeEnum.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"};IfcStairTypeEnum.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"};IfcStairTypeEnum.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"};IfcStairTypeEnum.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"};IfcStairTypeEnum.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"};IfcStairTypeEnum.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"};IfcStairTypeEnum.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"};IfcStairTypeEnum.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"};IfcStairTypeEnum.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"};IfcStairTypeEnum.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"};IfcStairTypeEnum.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"};IfcStairTypeEnum.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"};IfcStairTypeEnum.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"};IfcStairTypeEnum.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"};IfcStairTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStairTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcStairTypeEnum=IfcStairTypeEnum;var IfcStateEnum=/*#__PURE__*/_createClass(function IfcStateEnum(){_classCallCheck(this,IfcStateEnum);});IfcStateEnum.READWRITE={type:3,value:"READWRITE"};IfcStateEnum.READONLY={type:3,value:"READONLY"};IfcStateEnum.LOCKED={type:3,value:"LOCKED"};IfcStateEnum.READWRITELOCKED={type:3,value:"READWRITELOCKED"};IfcStateEnum.READONLYLOCKED={type:3,value:"READONLYLOCKED"};IFC42.IfcStateEnum=IfcStateEnum;var IfcStructuralCurveActivityTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralCurveActivityTypeEnum(){_classCallCheck(this,IfcStructuralCurveActivityTypeEnum);});IfcStructuralCurveActivityTypeEnum.CONST={type:3,value:"CONST"};IfcStructuralCurveActivityTypeEnum.LINEAR={type:3,value:"LINEAR"};IfcStructuralCurveActivityTypeEnum.POLYGONAL={type:3,value:"POLYGONAL"};IfcStructuralCurveActivityTypeEnum.EQUIDISTANT={type:3,value:"EQUIDISTANT"};IfcStructuralCurveActivityTypeEnum.SINUS={type:3,value:"SINUS"};IfcStructuralCurveActivityTypeEnum.PARABOLA={type:3,value:"PARABOLA"};IfcStructuralCurveActivityTypeEnum.DISCRETE={type:3,value:"DISCRETE"};IfcStructuralCurveActivityTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralCurveActivityTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcStructuralCurveActivityTypeEnum=IfcStructuralCurveActivityTypeEnum;var IfcStructuralCurveMemberTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralCurveMemberTypeEnum(){_classCallCheck(this,IfcStructuralCurveMemberTypeEnum);});IfcStructuralCurveMemberTypeEnum.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"};IfcStructuralCurveMemberTypeEnum.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"};IfcStructuralCurveMemberTypeEnum.CABLE={type:3,value:"CABLE"};IfcStructuralCurveMemberTypeEnum.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"};IfcStructuralCurveMemberTypeEnum.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"};IfcStructuralCurveMemberTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralCurveMemberTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcStructuralCurveMemberTypeEnum=IfcStructuralCurveMemberTypeEnum;var IfcStructuralSurfaceActivityTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralSurfaceActivityTypeEnum(){_classCallCheck(this,IfcStructuralSurfaceActivityTypeEnum);});IfcStructuralSurfaceActivityTypeEnum.CONST={type:3,value:"CONST"};IfcStructuralSurfaceActivityTypeEnum.BILINEAR={type:3,value:"BILINEAR"};IfcStructuralSurfaceActivityTypeEnum.DISCRETE={type:3,value:"DISCRETE"};IfcStructuralSurfaceActivityTypeEnum.ISOCONTOUR={type:3,value:"ISOCONTOUR"};IfcStructuralSurfaceActivityTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralSurfaceActivityTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcStructuralSurfaceActivityTypeEnum=IfcStructuralSurfaceActivityTypeEnum;var IfcStructuralSurfaceMemberTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralSurfaceMemberTypeEnum(){_classCallCheck(this,IfcStructuralSurfaceMemberTypeEnum);});IfcStructuralSurfaceMemberTypeEnum.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"};IfcStructuralSurfaceMemberTypeEnum.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"};IfcStructuralSurfaceMemberTypeEnum.SHELL={type:3,value:"SHELL"};IfcStructuralSurfaceMemberTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralSurfaceMemberTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcStructuralSurfaceMemberTypeEnum=IfcStructuralSurfaceMemberTypeEnum;var IfcSubContractResourceTypeEnum=/*#__PURE__*/_createClass(function IfcSubContractResourceTypeEnum(){_classCallCheck(this,IfcSubContractResourceTypeEnum);});IfcSubContractResourceTypeEnum.PURCHASE={type:3,value:"PURCHASE"};IfcSubContractResourceTypeEnum.WORK={type:3,value:"WORK"};IfcSubContractResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSubContractResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSubContractResourceTypeEnum=IfcSubContractResourceTypeEnum;var IfcSurfaceFeatureTypeEnum=/*#__PURE__*/_createClass(function IfcSurfaceFeatureTypeEnum(){_classCallCheck(this,IfcSurfaceFeatureTypeEnum);});IfcSurfaceFeatureTypeEnum.MARK={type:3,value:"MARK"};IfcSurfaceFeatureTypeEnum.TAG={type:3,value:"TAG"};IfcSurfaceFeatureTypeEnum.TREATMENT={type:3,value:"TREATMENT"};IfcSurfaceFeatureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSurfaceFeatureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSurfaceFeatureTypeEnum=IfcSurfaceFeatureTypeEnum;var IfcSurfaceSide=/*#__PURE__*/_createClass(function IfcSurfaceSide(){_classCallCheck(this,IfcSurfaceSide);});IfcSurfaceSide.POSITIVE={type:3,value:"POSITIVE"};IfcSurfaceSide.NEGATIVE={type:3,value:"NEGATIVE"};IfcSurfaceSide.BOTH={type:3,value:"BOTH"};IFC42.IfcSurfaceSide=IfcSurfaceSide;var IfcSwitchingDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcSwitchingDeviceTypeEnum(){_classCallCheck(this,IfcSwitchingDeviceTypeEnum);});IfcSwitchingDeviceTypeEnum.CONTACTOR={type:3,value:"CONTACTOR"};IfcSwitchingDeviceTypeEnum.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"};IfcSwitchingDeviceTypeEnum.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"};IfcSwitchingDeviceTypeEnum.KEYPAD={type:3,value:"KEYPAD"};IfcSwitchingDeviceTypeEnum.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"};IfcSwitchingDeviceTypeEnum.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"};IfcSwitchingDeviceTypeEnum.STARTER={type:3,value:"STARTER"};IfcSwitchingDeviceTypeEnum.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"};IfcSwitchingDeviceTypeEnum.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"};IfcSwitchingDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSwitchingDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSwitchingDeviceTypeEnum=IfcSwitchingDeviceTypeEnum;var IfcSystemFurnitureElementTypeEnum=/*#__PURE__*/_createClass(function IfcSystemFurnitureElementTypeEnum(){_classCallCheck(this,IfcSystemFurnitureElementTypeEnum);});IfcSystemFurnitureElementTypeEnum.PANEL={type:3,value:"PANEL"};IfcSystemFurnitureElementTypeEnum.WORKSURFACE={type:3,value:"WORKSURFACE"};IfcSystemFurnitureElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSystemFurnitureElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcSystemFurnitureElementTypeEnum=IfcSystemFurnitureElementTypeEnum;var IfcTankTypeEnum=/*#__PURE__*/_createClass(function IfcTankTypeEnum(){_classCallCheck(this,IfcTankTypeEnum);});IfcTankTypeEnum.BASIN={type:3,value:"BASIN"};IfcTankTypeEnum.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"};IfcTankTypeEnum.EXPANSION={type:3,value:"EXPANSION"};IfcTankTypeEnum.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"};IfcTankTypeEnum.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"};IfcTankTypeEnum.STORAGE={type:3,value:"STORAGE"};IfcTankTypeEnum.VESSEL={type:3,value:"VESSEL"};IfcTankTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTankTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTankTypeEnum=IfcTankTypeEnum;var IfcTaskDurationEnum=/*#__PURE__*/_createClass(function IfcTaskDurationEnum(){_classCallCheck(this,IfcTaskDurationEnum);});IfcTaskDurationEnum.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"};IfcTaskDurationEnum.WORKTIME={type:3,value:"WORKTIME"};IfcTaskDurationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTaskDurationEnum=IfcTaskDurationEnum;var IfcTaskTypeEnum=/*#__PURE__*/_createClass(function IfcTaskTypeEnum(){_classCallCheck(this,IfcTaskTypeEnum);});IfcTaskTypeEnum.ATTENDANCE={type:3,value:"ATTENDANCE"};IfcTaskTypeEnum.CONSTRUCTION={type:3,value:"CONSTRUCTION"};IfcTaskTypeEnum.DEMOLITION={type:3,value:"DEMOLITION"};IfcTaskTypeEnum.DISMANTLE={type:3,value:"DISMANTLE"};IfcTaskTypeEnum.DISPOSAL={type:3,value:"DISPOSAL"};IfcTaskTypeEnum.INSTALLATION={type:3,value:"INSTALLATION"};IfcTaskTypeEnum.LOGISTIC={type:3,value:"LOGISTIC"};IfcTaskTypeEnum.MAINTENANCE={type:3,value:"MAINTENANCE"};IfcTaskTypeEnum.MOVE={type:3,value:"MOVE"};IfcTaskTypeEnum.OPERATION={type:3,value:"OPERATION"};IfcTaskTypeEnum.REMOVAL={type:3,value:"REMOVAL"};IfcTaskTypeEnum.RENOVATION={type:3,value:"RENOVATION"};IfcTaskTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTaskTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTaskTypeEnum=IfcTaskTypeEnum;var IfcTendonAnchorTypeEnum=/*#__PURE__*/_createClass(function IfcTendonAnchorTypeEnum(){_classCallCheck(this,IfcTendonAnchorTypeEnum);});IfcTendonAnchorTypeEnum.COUPLER={type:3,value:"COUPLER"};IfcTendonAnchorTypeEnum.FIXED_END={type:3,value:"FIXED_END"};IfcTendonAnchorTypeEnum.TENSIONING_END={type:3,value:"TENSIONING_END"};IfcTendonAnchorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTendonAnchorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTendonAnchorTypeEnum=IfcTendonAnchorTypeEnum;var IfcTendonTypeEnum=/*#__PURE__*/_createClass(function IfcTendonTypeEnum(){_classCallCheck(this,IfcTendonTypeEnum);});IfcTendonTypeEnum.BAR={type:3,value:"BAR"};IfcTendonTypeEnum.COATED={type:3,value:"COATED"};IfcTendonTypeEnum.STRAND={type:3,value:"STRAND"};IfcTendonTypeEnum.WIRE={type:3,value:"WIRE"};IfcTendonTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTendonTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTendonTypeEnum=IfcTendonTypeEnum;var IfcTextPath=/*#__PURE__*/_createClass(function IfcTextPath(){_classCallCheck(this,IfcTextPath);});IfcTextPath.LEFT={type:3,value:"LEFT"};IfcTextPath.RIGHT={type:3,value:"RIGHT"};IfcTextPath.UP={type:3,value:"UP"};IfcTextPath.DOWN={type:3,value:"DOWN"};IFC42.IfcTextPath=IfcTextPath;var IfcTimeSeriesDataTypeEnum=/*#__PURE__*/_createClass(function IfcTimeSeriesDataTypeEnum(){_classCallCheck(this,IfcTimeSeriesDataTypeEnum);});IfcTimeSeriesDataTypeEnum.CONTINUOUS={type:3,value:"CONTINUOUS"};IfcTimeSeriesDataTypeEnum.DISCRETE={type:3,value:"DISCRETE"};IfcTimeSeriesDataTypeEnum.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"};IfcTimeSeriesDataTypeEnum.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"};IfcTimeSeriesDataTypeEnum.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"};IfcTimeSeriesDataTypeEnum.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"};IfcTimeSeriesDataTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTimeSeriesDataTypeEnum=IfcTimeSeriesDataTypeEnum;var IfcTransformerTypeEnum=/*#__PURE__*/_createClass(function IfcTransformerTypeEnum(){_classCallCheck(this,IfcTransformerTypeEnum);});IfcTransformerTypeEnum.CURRENT={type:3,value:"CURRENT"};IfcTransformerTypeEnum.FREQUENCY={type:3,value:"FREQUENCY"};IfcTransformerTypeEnum.INVERTER={type:3,value:"INVERTER"};IfcTransformerTypeEnum.RECTIFIER={type:3,value:"RECTIFIER"};IfcTransformerTypeEnum.VOLTAGE={type:3,value:"VOLTAGE"};IfcTransformerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTransformerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTransformerTypeEnum=IfcTransformerTypeEnum;var IfcTransitionCode=/*#__PURE__*/_createClass(function IfcTransitionCode(){_classCallCheck(this,IfcTransitionCode);});IfcTransitionCode.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"};IfcTransitionCode.CONTINUOUS={type:3,value:"CONTINUOUS"};IfcTransitionCode.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"};IfcTransitionCode.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"};IFC42.IfcTransitionCode=IfcTransitionCode;var IfcTransportElementTypeEnum=/*#__PURE__*/_createClass(function IfcTransportElementTypeEnum(){_classCallCheck(this,IfcTransportElementTypeEnum);});IfcTransportElementTypeEnum.ELEVATOR={type:3,value:"ELEVATOR"};IfcTransportElementTypeEnum.ESCALATOR={type:3,value:"ESCALATOR"};IfcTransportElementTypeEnum.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"};IfcTransportElementTypeEnum.CRANEWAY={type:3,value:"CRANEWAY"};IfcTransportElementTypeEnum.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"};IfcTransportElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTransportElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTransportElementTypeEnum=IfcTransportElementTypeEnum;var IfcTrimmingPreference=/*#__PURE__*/_createClass(function IfcTrimmingPreference(){_classCallCheck(this,IfcTrimmingPreference);});IfcTrimmingPreference.CARTESIAN={type:3,value:"CARTESIAN"};IfcTrimmingPreference.PARAMETER={type:3,value:"PARAMETER"};IfcTrimmingPreference.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC42.IfcTrimmingPreference=IfcTrimmingPreference;var IfcTubeBundleTypeEnum=/*#__PURE__*/_createClass(function IfcTubeBundleTypeEnum(){_classCallCheck(this,IfcTubeBundleTypeEnum);});IfcTubeBundleTypeEnum.FINNED={type:3,value:"FINNED"};IfcTubeBundleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTubeBundleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcTubeBundleTypeEnum=IfcTubeBundleTypeEnum;var IfcUnitEnum=/*#__PURE__*/_createClass(function IfcUnitEnum(){_classCallCheck(this,IfcUnitEnum);});IfcUnitEnum.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"};IfcUnitEnum.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"};IfcUnitEnum.AREAUNIT={type:3,value:"AREAUNIT"};IfcUnitEnum.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"};IfcUnitEnum.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"};IfcUnitEnum.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"};IfcUnitEnum.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"};IfcUnitEnum.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"};IfcUnitEnum.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"};IfcUnitEnum.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"};IfcUnitEnum.ENERGYUNIT={type:3,value:"ENERGYUNIT"};IfcUnitEnum.FORCEUNIT={type:3,value:"FORCEUNIT"};IfcUnitEnum.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"};IfcUnitEnum.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"};IfcUnitEnum.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"};IfcUnitEnum.LENGTHUNIT={type:3,value:"LENGTHUNIT"};IfcUnitEnum.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"};IfcUnitEnum.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"};IfcUnitEnum.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"};IfcUnitEnum.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"};IfcUnitEnum.MASSUNIT={type:3,value:"MASSUNIT"};IfcUnitEnum.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"};IfcUnitEnum.POWERUNIT={type:3,value:"POWERUNIT"};IfcUnitEnum.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"};IfcUnitEnum.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"};IfcUnitEnum.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"};IfcUnitEnum.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"};IfcUnitEnum.TIMEUNIT={type:3,value:"TIMEUNIT"};IfcUnitEnum.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"};IfcUnitEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC42.IfcUnitEnum=IfcUnitEnum;var IfcUnitaryControlElementTypeEnum=/*#__PURE__*/_createClass(function IfcUnitaryControlElementTypeEnum(){_classCallCheck(this,IfcUnitaryControlElementTypeEnum);});IfcUnitaryControlElementTypeEnum.ALARMPANEL={type:3,value:"ALARMPANEL"};IfcUnitaryControlElementTypeEnum.CONTROLPANEL={type:3,value:"CONTROLPANEL"};IfcUnitaryControlElementTypeEnum.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"};IfcUnitaryControlElementTypeEnum.INDICATORPANEL={type:3,value:"INDICATORPANEL"};IfcUnitaryControlElementTypeEnum.MIMICPANEL={type:3,value:"MIMICPANEL"};IfcUnitaryControlElementTypeEnum.HUMIDISTAT={type:3,value:"HUMIDISTAT"};IfcUnitaryControlElementTypeEnum.THERMOSTAT={type:3,value:"THERMOSTAT"};IfcUnitaryControlElementTypeEnum.WEATHERSTATION={type:3,value:"WEATHERSTATION"};IfcUnitaryControlElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcUnitaryControlElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcUnitaryControlElementTypeEnum=IfcUnitaryControlElementTypeEnum;var IfcUnitaryEquipmentTypeEnum=/*#__PURE__*/_createClass(function IfcUnitaryEquipmentTypeEnum(){_classCallCheck(this,IfcUnitaryEquipmentTypeEnum);});IfcUnitaryEquipmentTypeEnum.AIRHANDLER={type:3,value:"AIRHANDLER"};IfcUnitaryEquipmentTypeEnum.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"};IfcUnitaryEquipmentTypeEnum.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"};IfcUnitaryEquipmentTypeEnum.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"};IfcUnitaryEquipmentTypeEnum.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"};IfcUnitaryEquipmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcUnitaryEquipmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcUnitaryEquipmentTypeEnum=IfcUnitaryEquipmentTypeEnum;var IfcValveTypeEnum=/*#__PURE__*/_createClass(function IfcValveTypeEnum(){_classCallCheck(this,IfcValveTypeEnum);});IfcValveTypeEnum.AIRRELEASE={type:3,value:"AIRRELEASE"};IfcValveTypeEnum.ANTIVACUUM={type:3,value:"ANTIVACUUM"};IfcValveTypeEnum.CHANGEOVER={type:3,value:"CHANGEOVER"};IfcValveTypeEnum.CHECK={type:3,value:"CHECK"};IfcValveTypeEnum.COMMISSIONING={type:3,value:"COMMISSIONING"};IfcValveTypeEnum.DIVERTING={type:3,value:"DIVERTING"};IfcValveTypeEnum.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"};IfcValveTypeEnum.DOUBLECHECK={type:3,value:"DOUBLECHECK"};IfcValveTypeEnum.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"};IfcValveTypeEnum.FAUCET={type:3,value:"FAUCET"};IfcValveTypeEnum.FLUSHING={type:3,value:"FLUSHING"};IfcValveTypeEnum.GASCOCK={type:3,value:"GASCOCK"};IfcValveTypeEnum.GASTAP={type:3,value:"GASTAP"};IfcValveTypeEnum.ISOLATING={type:3,value:"ISOLATING"};IfcValveTypeEnum.MIXING={type:3,value:"MIXING"};IfcValveTypeEnum.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"};IfcValveTypeEnum.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"};IfcValveTypeEnum.REGULATING={type:3,value:"REGULATING"};IfcValveTypeEnum.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"};IfcValveTypeEnum.STEAMTRAP={type:3,value:"STEAMTRAP"};IfcValveTypeEnum.STOPCOCK={type:3,value:"STOPCOCK"};IfcValveTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcValveTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcValveTypeEnum=IfcValveTypeEnum;var IfcVibrationIsolatorTypeEnum=/*#__PURE__*/_createClass(function IfcVibrationIsolatorTypeEnum(){_classCallCheck(this,IfcVibrationIsolatorTypeEnum);});IfcVibrationIsolatorTypeEnum.COMPRESSION={type:3,value:"COMPRESSION"};IfcVibrationIsolatorTypeEnum.SPRING={type:3,value:"SPRING"};IfcVibrationIsolatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVibrationIsolatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcVibrationIsolatorTypeEnum=IfcVibrationIsolatorTypeEnum;var IfcVoidingFeatureTypeEnum=/*#__PURE__*/_createClass(function IfcVoidingFeatureTypeEnum(){_classCallCheck(this,IfcVoidingFeatureTypeEnum);});IfcVoidingFeatureTypeEnum.CUTOUT={type:3,value:"CUTOUT"};IfcVoidingFeatureTypeEnum.NOTCH={type:3,value:"NOTCH"};IfcVoidingFeatureTypeEnum.HOLE={type:3,value:"HOLE"};IfcVoidingFeatureTypeEnum.MITER={type:3,value:"MITER"};IfcVoidingFeatureTypeEnum.CHAMFER={type:3,value:"CHAMFER"};IfcVoidingFeatureTypeEnum.EDGE={type:3,value:"EDGE"};IfcVoidingFeatureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVoidingFeatureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcVoidingFeatureTypeEnum=IfcVoidingFeatureTypeEnum;var IfcWallTypeEnum=/*#__PURE__*/_createClass(function IfcWallTypeEnum(){_classCallCheck(this,IfcWallTypeEnum);});IfcWallTypeEnum.MOVABLE={type:3,value:"MOVABLE"};IfcWallTypeEnum.PARAPET={type:3,value:"PARAPET"};IfcWallTypeEnum.PARTITIONING={type:3,value:"PARTITIONING"};IfcWallTypeEnum.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"};IfcWallTypeEnum.SHEAR={type:3,value:"SHEAR"};IfcWallTypeEnum.SOLIDWALL={type:3,value:"SOLIDWALL"};IfcWallTypeEnum.STANDARD={type:3,value:"STANDARD"};IfcWallTypeEnum.POLYGONAL={type:3,value:"POLYGONAL"};IfcWallTypeEnum.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"};IfcWallTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWallTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWallTypeEnum=IfcWallTypeEnum;var IfcWasteTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcWasteTerminalTypeEnum(){_classCallCheck(this,IfcWasteTerminalTypeEnum);});IfcWasteTerminalTypeEnum.FLOORTRAP={type:3,value:"FLOORTRAP"};IfcWasteTerminalTypeEnum.FLOORWASTE={type:3,value:"FLOORWASTE"};IfcWasteTerminalTypeEnum.GULLYSUMP={type:3,value:"GULLYSUMP"};IfcWasteTerminalTypeEnum.GULLYTRAP={type:3,value:"GULLYTRAP"};IfcWasteTerminalTypeEnum.ROOFDRAIN={type:3,value:"ROOFDRAIN"};IfcWasteTerminalTypeEnum.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"};IfcWasteTerminalTypeEnum.WASTETRAP={type:3,value:"WASTETRAP"};IfcWasteTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWasteTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWasteTerminalTypeEnum=IfcWasteTerminalTypeEnum;var IfcWindowPanelOperationEnum=/*#__PURE__*/_createClass(function IfcWindowPanelOperationEnum(){_classCallCheck(this,IfcWindowPanelOperationEnum);});IfcWindowPanelOperationEnum.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"};IfcWindowPanelOperationEnum.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"};IfcWindowPanelOperationEnum.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"};IfcWindowPanelOperationEnum.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"};IfcWindowPanelOperationEnum.TOPHUNG={type:3,value:"TOPHUNG"};IfcWindowPanelOperationEnum.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"};IfcWindowPanelOperationEnum.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"};IfcWindowPanelOperationEnum.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"};IfcWindowPanelOperationEnum.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"};IfcWindowPanelOperationEnum.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"};IfcWindowPanelOperationEnum.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"};IfcWindowPanelOperationEnum.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"};IfcWindowPanelOperationEnum.OTHEROPERATION={type:3,value:"OTHEROPERATION"};IfcWindowPanelOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWindowPanelOperationEnum=IfcWindowPanelOperationEnum;var IfcWindowPanelPositionEnum=/*#__PURE__*/_createClass(function IfcWindowPanelPositionEnum(){_classCallCheck(this,IfcWindowPanelPositionEnum);});IfcWindowPanelPositionEnum.LEFT={type:3,value:"LEFT"};IfcWindowPanelPositionEnum.MIDDLE={type:3,value:"MIDDLE"};IfcWindowPanelPositionEnum.RIGHT={type:3,value:"RIGHT"};IfcWindowPanelPositionEnum.BOTTOM={type:3,value:"BOTTOM"};IfcWindowPanelPositionEnum.TOP={type:3,value:"TOP"};IfcWindowPanelPositionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWindowPanelPositionEnum=IfcWindowPanelPositionEnum;var IfcWindowStyleConstructionEnum=/*#__PURE__*/_createClass(function IfcWindowStyleConstructionEnum(){_classCallCheck(this,IfcWindowStyleConstructionEnum);});IfcWindowStyleConstructionEnum.ALUMINIUM={type:3,value:"ALUMINIUM"};IfcWindowStyleConstructionEnum.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"};IfcWindowStyleConstructionEnum.STEEL={type:3,value:"STEEL"};IfcWindowStyleConstructionEnum.WOOD={type:3,value:"WOOD"};IfcWindowStyleConstructionEnum.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"};IfcWindowStyleConstructionEnum.PLASTIC={type:3,value:"PLASTIC"};IfcWindowStyleConstructionEnum.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"};IfcWindowStyleConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWindowStyleConstructionEnum=IfcWindowStyleConstructionEnum;var IfcWindowStyleOperationEnum=/*#__PURE__*/_createClass(function IfcWindowStyleOperationEnum(){_classCallCheck(this,IfcWindowStyleOperationEnum);});IfcWindowStyleOperationEnum.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"};IfcWindowStyleOperationEnum.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"};IfcWindowStyleOperationEnum.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"};IfcWindowStyleOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWindowStyleOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWindowStyleOperationEnum=IfcWindowStyleOperationEnum;var IfcWindowTypeEnum=/*#__PURE__*/_createClass(function IfcWindowTypeEnum(){_classCallCheck(this,IfcWindowTypeEnum);});IfcWindowTypeEnum.WINDOW={type:3,value:"WINDOW"};IfcWindowTypeEnum.SKYLIGHT={type:3,value:"SKYLIGHT"};IfcWindowTypeEnum.LIGHTDOME={type:3,value:"LIGHTDOME"};IfcWindowTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWindowTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWindowTypeEnum=IfcWindowTypeEnum;var IfcWindowTypePartitioningEnum=/*#__PURE__*/_createClass(function IfcWindowTypePartitioningEnum(){_classCallCheck(this,IfcWindowTypePartitioningEnum);});IfcWindowTypePartitioningEnum.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"};IfcWindowTypePartitioningEnum.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"};IfcWindowTypePartitioningEnum.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"};IfcWindowTypePartitioningEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWindowTypePartitioningEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWindowTypePartitioningEnum=IfcWindowTypePartitioningEnum;var IfcWorkCalendarTypeEnum=/*#__PURE__*/_createClass(function IfcWorkCalendarTypeEnum(){_classCallCheck(this,IfcWorkCalendarTypeEnum);});IfcWorkCalendarTypeEnum.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"};IfcWorkCalendarTypeEnum.SECONDSHIFT={type:3,value:"SECONDSHIFT"};IfcWorkCalendarTypeEnum.THIRDSHIFT={type:3,value:"THIRDSHIFT"};IfcWorkCalendarTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWorkCalendarTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWorkCalendarTypeEnum=IfcWorkCalendarTypeEnum;var IfcWorkPlanTypeEnum=/*#__PURE__*/_createClass(function IfcWorkPlanTypeEnum(){_classCallCheck(this,IfcWorkPlanTypeEnum);});IfcWorkPlanTypeEnum.ACTUAL={type:3,value:"ACTUAL"};IfcWorkPlanTypeEnum.BASELINE={type:3,value:"BASELINE"};IfcWorkPlanTypeEnum.PLANNED={type:3,value:"PLANNED"};IfcWorkPlanTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWorkPlanTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWorkPlanTypeEnum=IfcWorkPlanTypeEnum;var IfcWorkScheduleTypeEnum=/*#__PURE__*/_createClass(function IfcWorkScheduleTypeEnum(){_classCallCheck(this,IfcWorkScheduleTypeEnum);});IfcWorkScheduleTypeEnum.ACTUAL={type:3,value:"ACTUAL"};IfcWorkScheduleTypeEnum.BASELINE={type:3,value:"BASELINE"};IfcWorkScheduleTypeEnum.PLANNED={type:3,value:"PLANNED"};IfcWorkScheduleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWorkScheduleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC42.IfcWorkScheduleTypeEnum=IfcWorkScheduleTypeEnum;var IfcActorRole=/*#__PURE__*/function(_IfcLineObject102){_inherits(IfcActorRole,_IfcLineObject102);var _super813=_createSuper(IfcActorRole);function IfcActorRole(expressID,Role,UserDefinedRole,Description){var _this810;_classCallCheck(this,IfcActorRole);_this810=_super813.call(this,expressID);_this810.Role=Role;_this810.UserDefinedRole=UserDefinedRole;_this810.Description=Description;_this810.type=3630933823;return _this810;}return _createClass(IfcActorRole);}(IfcLineObject);IFC42.IfcActorRole=IfcActorRole;var IfcAddress=/*#__PURE__*/function(_IfcLineObject103){_inherits(IfcAddress,_IfcLineObject103);var _super814=_createSuper(IfcAddress);function IfcAddress(expressID,Purpose,Description,UserDefinedPurpose){var _this811;_classCallCheck(this,IfcAddress);_this811=_super814.call(this,expressID);_this811.Purpose=Purpose;_this811.Description=Description;_this811.UserDefinedPurpose=UserDefinedPurpose;_this811.type=618182010;return _this811;}return _createClass(IfcAddress);}(IfcLineObject);IFC42.IfcAddress=IfcAddress;var IfcApplication=/*#__PURE__*/function(_IfcLineObject104){_inherits(IfcApplication,_IfcLineObject104);var _super815=_createSuper(IfcApplication);function IfcApplication(expressID,ApplicationDeveloper,Version,ApplicationFullName,ApplicationIdentifier){var _this812;_classCallCheck(this,IfcApplication);_this812=_super815.call(this,expressID);_this812.ApplicationDeveloper=ApplicationDeveloper;_this812.Version=Version;_this812.ApplicationFullName=ApplicationFullName;_this812.ApplicationIdentifier=ApplicationIdentifier;_this812.type=639542469;return _this812;}return _createClass(IfcApplication);}(IfcLineObject);IFC42.IfcApplication=IfcApplication;var IfcAppliedValue=/*#__PURE__*/function(_IfcLineObject105){_inherits(IfcAppliedValue,_IfcLineObject105);var _super816=_createSuper(IfcAppliedValue);function IfcAppliedValue(expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,Category,Condition,ArithmeticOperator,Components){var _this813;_classCallCheck(this,IfcAppliedValue);_this813=_super816.call(this,expressID);_this813.Name=Name;_this813.Description=Description;_this813.AppliedValue=AppliedValue;_this813.UnitBasis=UnitBasis;_this813.ApplicableDate=ApplicableDate;_this813.FixedUntilDate=FixedUntilDate;_this813.Category=Category;_this813.Condition=Condition;_this813.ArithmeticOperator=ArithmeticOperator;_this813.Components=Components;_this813.type=411424972;return _this813;}return _createClass(IfcAppliedValue);}(IfcLineObject);IFC42.IfcAppliedValue=IfcAppliedValue;var IfcApproval=/*#__PURE__*/function(_IfcLineObject106){_inherits(IfcApproval,_IfcLineObject106);var _super817=_createSuper(IfcApproval);function IfcApproval(expressID,Identifier,Name,Description,TimeOfApproval,Status,Level,Qualifier,RequestingApproval,GivingApproval){var _this814;_classCallCheck(this,IfcApproval);_this814=_super817.call(this,expressID);_this814.Identifier=Identifier;_this814.Name=Name;_this814.Description=Description;_this814.TimeOfApproval=TimeOfApproval;_this814.Status=Status;_this814.Level=Level;_this814.Qualifier=Qualifier;_this814.RequestingApproval=RequestingApproval;_this814.GivingApproval=GivingApproval;_this814.type=130549933;return _this814;}return _createClass(IfcApproval);}(IfcLineObject);IFC42.IfcApproval=IfcApproval;var IfcBoundaryCondition=/*#__PURE__*/function(_IfcLineObject107){_inherits(IfcBoundaryCondition,_IfcLineObject107);var _super818=_createSuper(IfcBoundaryCondition);function IfcBoundaryCondition(expressID,Name){var _this815;_classCallCheck(this,IfcBoundaryCondition);_this815=_super818.call(this,expressID);_this815.Name=Name;_this815.type=4037036970;return _this815;}return _createClass(IfcBoundaryCondition);}(IfcLineObject);IFC42.IfcBoundaryCondition=IfcBoundaryCondition;var IfcBoundaryEdgeCondition=/*#__PURE__*/function(_IfcBoundaryCondition4){_inherits(IfcBoundaryEdgeCondition,_IfcBoundaryCondition4);var _super819=_createSuper(IfcBoundaryEdgeCondition);function IfcBoundaryEdgeCondition(expressID,Name,TranslationalStiffnessByLengthX,TranslationalStiffnessByLengthY,TranslationalStiffnessByLengthZ,RotationalStiffnessByLengthX,RotationalStiffnessByLengthY,RotationalStiffnessByLengthZ){var _this816;_classCallCheck(this,IfcBoundaryEdgeCondition);_this816=_super819.call(this,expressID,Name);_this816.Name=Name;_this816.TranslationalStiffnessByLengthX=TranslationalStiffnessByLengthX;_this816.TranslationalStiffnessByLengthY=TranslationalStiffnessByLengthY;_this816.TranslationalStiffnessByLengthZ=TranslationalStiffnessByLengthZ;_this816.RotationalStiffnessByLengthX=RotationalStiffnessByLengthX;_this816.RotationalStiffnessByLengthY=RotationalStiffnessByLengthY;_this816.RotationalStiffnessByLengthZ=RotationalStiffnessByLengthZ;_this816.type=1560379544;return _this816;}return _createClass(IfcBoundaryEdgeCondition);}(IfcBoundaryCondition);IFC42.IfcBoundaryEdgeCondition=IfcBoundaryEdgeCondition;var IfcBoundaryFaceCondition=/*#__PURE__*/function(_IfcBoundaryCondition5){_inherits(IfcBoundaryFaceCondition,_IfcBoundaryCondition5);var _super820=_createSuper(IfcBoundaryFaceCondition);function IfcBoundaryFaceCondition(expressID,Name,TranslationalStiffnessByAreaX,TranslationalStiffnessByAreaY,TranslationalStiffnessByAreaZ){var _this817;_classCallCheck(this,IfcBoundaryFaceCondition);_this817=_super820.call(this,expressID,Name);_this817.Name=Name;_this817.TranslationalStiffnessByAreaX=TranslationalStiffnessByAreaX;_this817.TranslationalStiffnessByAreaY=TranslationalStiffnessByAreaY;_this817.TranslationalStiffnessByAreaZ=TranslationalStiffnessByAreaZ;_this817.type=3367102660;return _this817;}return _createClass(IfcBoundaryFaceCondition);}(IfcBoundaryCondition);IFC42.IfcBoundaryFaceCondition=IfcBoundaryFaceCondition;var IfcBoundaryNodeCondition=/*#__PURE__*/function(_IfcBoundaryCondition6){_inherits(IfcBoundaryNodeCondition,_IfcBoundaryCondition6);var _super821=_createSuper(IfcBoundaryNodeCondition);function IfcBoundaryNodeCondition(expressID,Name,TranslationalStiffnessX,TranslationalStiffnessY,TranslationalStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ){var _this818;_classCallCheck(this,IfcBoundaryNodeCondition);_this818=_super821.call(this,expressID,Name);_this818.Name=Name;_this818.TranslationalStiffnessX=TranslationalStiffnessX;_this818.TranslationalStiffnessY=TranslationalStiffnessY;_this818.TranslationalStiffnessZ=TranslationalStiffnessZ;_this818.RotationalStiffnessX=RotationalStiffnessX;_this818.RotationalStiffnessY=RotationalStiffnessY;_this818.RotationalStiffnessZ=RotationalStiffnessZ;_this818.type=1387855156;return _this818;}return _createClass(IfcBoundaryNodeCondition);}(IfcBoundaryCondition);IFC42.IfcBoundaryNodeCondition=IfcBoundaryNodeCondition;var IfcBoundaryNodeConditionWarping=/*#__PURE__*/function(_IfcBoundaryNodeCondi2){_inherits(IfcBoundaryNodeConditionWarping,_IfcBoundaryNodeCondi2);var _super822=_createSuper(IfcBoundaryNodeConditionWarping);function IfcBoundaryNodeConditionWarping(expressID,Name,TranslationalStiffnessX,TranslationalStiffnessY,TranslationalStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ,WarpingStiffness){var _this819;_classCallCheck(this,IfcBoundaryNodeConditionWarping);_this819=_super822.call(this,expressID,Name,TranslationalStiffnessX,TranslationalStiffnessY,TranslationalStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ);_this819.Name=Name;_this819.TranslationalStiffnessX=TranslationalStiffnessX;_this819.TranslationalStiffnessY=TranslationalStiffnessY;_this819.TranslationalStiffnessZ=TranslationalStiffnessZ;_this819.RotationalStiffnessX=RotationalStiffnessX;_this819.RotationalStiffnessY=RotationalStiffnessY;_this819.RotationalStiffnessZ=RotationalStiffnessZ;_this819.WarpingStiffness=WarpingStiffness;_this819.type=2069777674;return _this819;}return _createClass(IfcBoundaryNodeConditionWarping);}(IfcBoundaryNodeCondition);IFC42.IfcBoundaryNodeConditionWarping=IfcBoundaryNodeConditionWarping;var IfcConnectionGeometry=/*#__PURE__*/function(_IfcLineObject108){_inherits(IfcConnectionGeometry,_IfcLineObject108);var _super823=_createSuper(IfcConnectionGeometry);function IfcConnectionGeometry(expressID){var _this820;_classCallCheck(this,IfcConnectionGeometry);_this820=_super823.call(this,expressID);_this820.type=2859738748;return _this820;}return _createClass(IfcConnectionGeometry);}(IfcLineObject);IFC42.IfcConnectionGeometry=IfcConnectionGeometry;var IfcConnectionPointGeometry=/*#__PURE__*/function(_IfcConnectionGeometr5){_inherits(IfcConnectionPointGeometry,_IfcConnectionGeometr5);var _super824=_createSuper(IfcConnectionPointGeometry);function IfcConnectionPointGeometry(expressID,PointOnRelatingElement,PointOnRelatedElement){var _this821;_classCallCheck(this,IfcConnectionPointGeometry);_this821=_super824.call(this,expressID);_this821.PointOnRelatingElement=PointOnRelatingElement;_this821.PointOnRelatedElement=PointOnRelatedElement;_this821.type=2614616156;return _this821;}return _createClass(IfcConnectionPointGeometry);}(IfcConnectionGeometry);IFC42.IfcConnectionPointGeometry=IfcConnectionPointGeometry;var IfcConnectionSurfaceGeometry=/*#__PURE__*/function(_IfcConnectionGeometr6){_inherits(IfcConnectionSurfaceGeometry,_IfcConnectionGeometr6);var _super825=_createSuper(IfcConnectionSurfaceGeometry);function IfcConnectionSurfaceGeometry(expressID,SurfaceOnRelatingElement,SurfaceOnRelatedElement){var _this822;_classCallCheck(this,IfcConnectionSurfaceGeometry);_this822=_super825.call(this,expressID);_this822.SurfaceOnRelatingElement=SurfaceOnRelatingElement;_this822.SurfaceOnRelatedElement=SurfaceOnRelatedElement;_this822.type=2732653382;return _this822;}return _createClass(IfcConnectionSurfaceGeometry);}(IfcConnectionGeometry);IFC42.IfcConnectionSurfaceGeometry=IfcConnectionSurfaceGeometry;var IfcConnectionVolumeGeometry=/*#__PURE__*/function(_IfcConnectionGeometr7){_inherits(IfcConnectionVolumeGeometry,_IfcConnectionGeometr7);var _super826=_createSuper(IfcConnectionVolumeGeometry);function IfcConnectionVolumeGeometry(expressID,VolumeOnRelatingElement,VolumeOnRelatedElement){var _this823;_classCallCheck(this,IfcConnectionVolumeGeometry);_this823=_super826.call(this,expressID);_this823.VolumeOnRelatingElement=VolumeOnRelatingElement;_this823.VolumeOnRelatedElement=VolumeOnRelatedElement;_this823.type=775493141;return _this823;}return _createClass(IfcConnectionVolumeGeometry);}(IfcConnectionGeometry);IFC42.IfcConnectionVolumeGeometry=IfcConnectionVolumeGeometry;var IfcConstraint=/*#__PURE__*/function(_IfcLineObject109){_inherits(IfcConstraint,_IfcLineObject109);var _super827=_createSuper(IfcConstraint);function IfcConstraint(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade){var _this824;_classCallCheck(this,IfcConstraint);_this824=_super827.call(this,expressID);_this824.Name=Name;_this824.Description=Description;_this824.ConstraintGrade=ConstraintGrade;_this824.ConstraintSource=ConstraintSource;_this824.CreatingActor=CreatingActor;_this824.CreationTime=CreationTime;_this824.UserDefinedGrade=UserDefinedGrade;_this824.type=1959218052;return _this824;}return _createClass(IfcConstraint);}(IfcLineObject);IFC42.IfcConstraint=IfcConstraint;var IfcCoordinateOperation=/*#__PURE__*/function(_IfcLineObject110){_inherits(IfcCoordinateOperation,_IfcLineObject110);var _super828=_createSuper(IfcCoordinateOperation);function IfcCoordinateOperation(expressID,SourceCRS,TargetCRS){var _this825;_classCallCheck(this,IfcCoordinateOperation);_this825=_super828.call(this,expressID);_this825.SourceCRS=SourceCRS;_this825.TargetCRS=TargetCRS;_this825.type=1785450214;return _this825;}return _createClass(IfcCoordinateOperation);}(IfcLineObject);IFC42.IfcCoordinateOperation=IfcCoordinateOperation;var IfcCoordinateReferenceSystem=/*#__PURE__*/function(_IfcLineObject111){_inherits(IfcCoordinateReferenceSystem,_IfcLineObject111);var _super829=_createSuper(IfcCoordinateReferenceSystem);function IfcCoordinateReferenceSystem(expressID,Name,Description,GeodeticDatum,VerticalDatum){var _this826;_classCallCheck(this,IfcCoordinateReferenceSystem);_this826=_super829.call(this,expressID);_this826.Name=Name;_this826.Description=Description;_this826.GeodeticDatum=GeodeticDatum;_this826.VerticalDatum=VerticalDatum;_this826.type=1466758467;return _this826;}return _createClass(IfcCoordinateReferenceSystem);}(IfcLineObject);IFC42.IfcCoordinateReferenceSystem=IfcCoordinateReferenceSystem;var IfcCostValue=/*#__PURE__*/function(_IfcAppliedValue3){_inherits(IfcCostValue,_IfcAppliedValue3);var _super830=_createSuper(IfcCostValue);function IfcCostValue(expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,Category,Condition,ArithmeticOperator,Components){var _this827;_classCallCheck(this,IfcCostValue);_this827=_super830.call(this,expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,Category,Condition,ArithmeticOperator,Components);_this827.Name=Name;_this827.Description=Description;_this827.AppliedValue=AppliedValue;_this827.UnitBasis=UnitBasis;_this827.ApplicableDate=ApplicableDate;_this827.FixedUntilDate=FixedUntilDate;_this827.Category=Category;_this827.Condition=Condition;_this827.ArithmeticOperator=ArithmeticOperator;_this827.Components=Components;_this827.type=602808272;return _this827;}return _createClass(IfcCostValue);}(IfcAppliedValue);IFC42.IfcCostValue=IfcCostValue;var IfcDerivedUnit=/*#__PURE__*/function(_IfcLineObject112){_inherits(IfcDerivedUnit,_IfcLineObject112);var _super831=_createSuper(IfcDerivedUnit);function IfcDerivedUnit(expressID,Elements,UnitType,UserDefinedType){var _this828;_classCallCheck(this,IfcDerivedUnit);_this828=_super831.call(this,expressID);_this828.Elements=Elements;_this828.UnitType=UnitType;_this828.UserDefinedType=UserDefinedType;_this828.type=1765591967;return _this828;}return _createClass(IfcDerivedUnit);}(IfcLineObject);IFC42.IfcDerivedUnit=IfcDerivedUnit;var IfcDerivedUnitElement=/*#__PURE__*/function(_IfcLineObject113){_inherits(IfcDerivedUnitElement,_IfcLineObject113);var _super832=_createSuper(IfcDerivedUnitElement);function IfcDerivedUnitElement(expressID,Unit,Exponent){var _this829;_classCallCheck(this,IfcDerivedUnitElement);_this829=_super832.call(this,expressID);_this829.Unit=Unit;_this829.Exponent=Exponent;_this829.type=1045800335;return _this829;}return _createClass(IfcDerivedUnitElement);}(IfcLineObject);IFC42.IfcDerivedUnitElement=IfcDerivedUnitElement;var IfcDimensionalExponents=/*#__PURE__*/function(_IfcLineObject114){_inherits(IfcDimensionalExponents,_IfcLineObject114);var _super833=_createSuper(IfcDimensionalExponents);function IfcDimensionalExponents(expressID,LengthExponent,MassExponent,TimeExponent,ElectricCurrentExponent,ThermodynamicTemperatureExponent,AmountOfSubstanceExponent,LuminousIntensityExponent){var _this830;_classCallCheck(this,IfcDimensionalExponents);_this830=_super833.call(this,expressID);_this830.LengthExponent=LengthExponent;_this830.MassExponent=MassExponent;_this830.TimeExponent=TimeExponent;_this830.ElectricCurrentExponent=ElectricCurrentExponent;_this830.ThermodynamicTemperatureExponent=ThermodynamicTemperatureExponent;_this830.AmountOfSubstanceExponent=AmountOfSubstanceExponent;_this830.LuminousIntensityExponent=LuminousIntensityExponent;_this830.type=2949456006;return _this830;}return _createClass(IfcDimensionalExponents);}(IfcLineObject);IFC42.IfcDimensionalExponents=IfcDimensionalExponents;var IfcExternalInformation=/*#__PURE__*/function(_IfcLineObject115){_inherits(IfcExternalInformation,_IfcLineObject115);var _super834=_createSuper(IfcExternalInformation);function IfcExternalInformation(expressID){var _this831;_classCallCheck(this,IfcExternalInformation);_this831=_super834.call(this,expressID);_this831.type=4294318154;return _this831;}return _createClass(IfcExternalInformation);}(IfcLineObject);IFC42.IfcExternalInformation=IfcExternalInformation;var IfcExternalReference=/*#__PURE__*/function(_IfcLineObject116){_inherits(IfcExternalReference,_IfcLineObject116);var _super835=_createSuper(IfcExternalReference);function IfcExternalReference(expressID,Location,Identification,Name){var _this832;_classCallCheck(this,IfcExternalReference);_this832=_super835.call(this,expressID);_this832.Location=Location;_this832.Identification=Identification;_this832.Name=Name;_this832.type=3200245327;return _this832;}return _createClass(IfcExternalReference);}(IfcLineObject);IFC42.IfcExternalReference=IfcExternalReference;var IfcExternallyDefinedHatchStyle=/*#__PURE__*/function(_IfcExternalReference8){_inherits(IfcExternallyDefinedHatchStyle,_IfcExternalReference8);var _super836=_createSuper(IfcExternallyDefinedHatchStyle);function IfcExternallyDefinedHatchStyle(expressID,Location,Identification,Name){var _this833;_classCallCheck(this,IfcExternallyDefinedHatchStyle);_this833=_super836.call(this,expressID,Location,Identification,Name);_this833.Location=Location;_this833.Identification=Identification;_this833.Name=Name;_this833.type=2242383968;return _this833;}return _createClass(IfcExternallyDefinedHatchStyle);}(IfcExternalReference);IFC42.IfcExternallyDefinedHatchStyle=IfcExternallyDefinedHatchStyle;var IfcExternallyDefinedSurfaceStyle=/*#__PURE__*/function(_IfcExternalReference9){_inherits(IfcExternallyDefinedSurfaceStyle,_IfcExternalReference9);var _super837=_createSuper(IfcExternallyDefinedSurfaceStyle);function IfcExternallyDefinedSurfaceStyle(expressID,Location,Identification,Name){var _this834;_classCallCheck(this,IfcExternallyDefinedSurfaceStyle);_this834=_super837.call(this,expressID,Location,Identification,Name);_this834.Location=Location;_this834.Identification=Identification;_this834.Name=Name;_this834.type=1040185647;return _this834;}return _createClass(IfcExternallyDefinedSurfaceStyle);}(IfcExternalReference);IFC42.IfcExternallyDefinedSurfaceStyle=IfcExternallyDefinedSurfaceStyle;var IfcExternallyDefinedTextFont=/*#__PURE__*/function(_IfcExternalReference10){_inherits(IfcExternallyDefinedTextFont,_IfcExternalReference10);var _super838=_createSuper(IfcExternallyDefinedTextFont);function IfcExternallyDefinedTextFont(expressID,Location,Identification,Name){var _this835;_classCallCheck(this,IfcExternallyDefinedTextFont);_this835=_super838.call(this,expressID,Location,Identification,Name);_this835.Location=Location;_this835.Identification=Identification;_this835.Name=Name;_this835.type=3548104201;return _this835;}return _createClass(IfcExternallyDefinedTextFont);}(IfcExternalReference);IFC42.IfcExternallyDefinedTextFont=IfcExternallyDefinedTextFont;var IfcGridAxis=/*#__PURE__*/function(_IfcLineObject117){_inherits(IfcGridAxis,_IfcLineObject117);var _super839=_createSuper(IfcGridAxis);function IfcGridAxis(expressID,AxisTag,AxisCurve,SameSense){var _this836;_classCallCheck(this,IfcGridAxis);_this836=_super839.call(this,expressID);_this836.AxisTag=AxisTag;_this836.AxisCurve=AxisCurve;_this836.SameSense=SameSense;_this836.type=852622518;return _this836;}return _createClass(IfcGridAxis);}(IfcLineObject);IFC42.IfcGridAxis=IfcGridAxis;var IfcIrregularTimeSeriesValue=/*#__PURE__*/function(_IfcLineObject118){_inherits(IfcIrregularTimeSeriesValue,_IfcLineObject118);var _super840=_createSuper(IfcIrregularTimeSeriesValue);function IfcIrregularTimeSeriesValue(expressID,TimeStamp,ListValues){var _this837;_classCallCheck(this,IfcIrregularTimeSeriesValue);_this837=_super840.call(this,expressID);_this837.TimeStamp=TimeStamp;_this837.ListValues=ListValues;_this837.type=3020489413;return _this837;}return _createClass(IfcIrregularTimeSeriesValue);}(IfcLineObject);IFC42.IfcIrregularTimeSeriesValue=IfcIrregularTimeSeriesValue;var IfcLibraryInformation=/*#__PURE__*/function(_IfcExternalInformati){_inherits(IfcLibraryInformation,_IfcExternalInformati);var _super841=_createSuper(IfcLibraryInformation);function IfcLibraryInformation(expressID,Name,Version,Publisher,VersionDate,Location,Description){var _this838;_classCallCheck(this,IfcLibraryInformation);_this838=_super841.call(this,expressID);_this838.Name=Name;_this838.Version=Version;_this838.Publisher=Publisher;_this838.VersionDate=VersionDate;_this838.Location=Location;_this838.Description=Description;_this838.type=2655187982;return _this838;}return _createClass(IfcLibraryInformation);}(IfcExternalInformation);IFC42.IfcLibraryInformation=IfcLibraryInformation;var IfcLibraryReference=/*#__PURE__*/function(_IfcExternalReference11){_inherits(IfcLibraryReference,_IfcExternalReference11);var _super842=_createSuper(IfcLibraryReference);function IfcLibraryReference(expressID,Location,Identification,Name,Description,Language,ReferencedLibrary){var _this839;_classCallCheck(this,IfcLibraryReference);_this839=_super842.call(this,expressID,Location,Identification,Name);_this839.Location=Location;_this839.Identification=Identification;_this839.Name=Name;_this839.Description=Description;_this839.Language=Language;_this839.ReferencedLibrary=ReferencedLibrary;_this839.type=3452421091;return _this839;}return _createClass(IfcLibraryReference);}(IfcExternalReference);IFC42.IfcLibraryReference=IfcLibraryReference;var IfcLightDistributionData=/*#__PURE__*/function(_IfcLineObject119){_inherits(IfcLightDistributionData,_IfcLineObject119);var _super843=_createSuper(IfcLightDistributionData);function IfcLightDistributionData(expressID,MainPlaneAngle,SecondaryPlaneAngle,LuminousIntensity){var _this840;_classCallCheck(this,IfcLightDistributionData);_this840=_super843.call(this,expressID);_this840.MainPlaneAngle=MainPlaneAngle;_this840.SecondaryPlaneAngle=SecondaryPlaneAngle;_this840.LuminousIntensity=LuminousIntensity;_this840.type=4162380809;return _this840;}return _createClass(IfcLightDistributionData);}(IfcLineObject);IFC42.IfcLightDistributionData=IfcLightDistributionData;var IfcLightIntensityDistribution=/*#__PURE__*/function(_IfcLineObject120){_inherits(IfcLightIntensityDistribution,_IfcLineObject120);var _super844=_createSuper(IfcLightIntensityDistribution);function IfcLightIntensityDistribution(expressID,LightDistributionCurve,DistributionData){var _this841;_classCallCheck(this,IfcLightIntensityDistribution);_this841=_super844.call(this,expressID);_this841.LightDistributionCurve=LightDistributionCurve;_this841.DistributionData=DistributionData;_this841.type=1566485204;return _this841;}return _createClass(IfcLightIntensityDistribution);}(IfcLineObject);IFC42.IfcLightIntensityDistribution=IfcLightIntensityDistribution;var IfcMapConversion=/*#__PURE__*/function(_IfcCoordinateOperati){_inherits(IfcMapConversion,_IfcCoordinateOperati);var _super845=_createSuper(IfcMapConversion);function IfcMapConversion(expressID,SourceCRS,TargetCRS,Eastings,Northings,OrthogonalHeight,XAxisAbscissa,XAxisOrdinate,Scale){var _this842;_classCallCheck(this,IfcMapConversion);_this842=_super845.call(this,expressID,SourceCRS,TargetCRS);_this842.SourceCRS=SourceCRS;_this842.TargetCRS=TargetCRS;_this842.Eastings=Eastings;_this842.Northings=Northings;_this842.OrthogonalHeight=OrthogonalHeight;_this842.XAxisAbscissa=XAxisAbscissa;_this842.XAxisOrdinate=XAxisOrdinate;_this842.Scale=Scale;_this842.type=3057273783;return _this842;}return _createClass(IfcMapConversion);}(IfcCoordinateOperation);IFC42.IfcMapConversion=IfcMapConversion;var IfcMaterialClassificationRelationship=/*#__PURE__*/function(_IfcLineObject121){_inherits(IfcMaterialClassificationRelationship,_IfcLineObject121);var _super846=_createSuper(IfcMaterialClassificationRelationship);function IfcMaterialClassificationRelationship(expressID,MaterialClassifications,ClassifiedMaterial){var _this843;_classCallCheck(this,IfcMaterialClassificationRelationship);_this843=_super846.call(this,expressID);_this843.MaterialClassifications=MaterialClassifications;_this843.ClassifiedMaterial=ClassifiedMaterial;_this843.type=1847130766;return _this843;}return _createClass(IfcMaterialClassificationRelationship);}(IfcLineObject);IFC42.IfcMaterialClassificationRelationship=IfcMaterialClassificationRelationship;var IfcMaterialDefinition=/*#__PURE__*/function(_IfcLineObject122){_inherits(IfcMaterialDefinition,_IfcLineObject122);var _super847=_createSuper(IfcMaterialDefinition);function IfcMaterialDefinition(expressID){var _this844;_classCallCheck(this,IfcMaterialDefinition);_this844=_super847.call(this,expressID);_this844.type=760658860;return _this844;}return _createClass(IfcMaterialDefinition);}(IfcLineObject);IFC42.IfcMaterialDefinition=IfcMaterialDefinition;var IfcMaterialLayer=/*#__PURE__*/function(_IfcMaterialDefinitio){_inherits(IfcMaterialLayer,_IfcMaterialDefinitio);var _super848=_createSuper(IfcMaterialLayer);function IfcMaterialLayer(expressID,Material,LayerThickness,IsVentilated,Name,Description,Category,Priority){var _this845;_classCallCheck(this,IfcMaterialLayer);_this845=_super848.call(this,expressID);_this845.Material=Material;_this845.LayerThickness=LayerThickness;_this845.IsVentilated=IsVentilated;_this845.Name=Name;_this845.Description=Description;_this845.Category=Category;_this845.Priority=Priority;_this845.type=248100487;return _this845;}return _createClass(IfcMaterialLayer);}(IfcMaterialDefinition);IFC42.IfcMaterialLayer=IfcMaterialLayer;var IfcMaterialLayerSet=/*#__PURE__*/function(_IfcMaterialDefinitio2){_inherits(IfcMaterialLayerSet,_IfcMaterialDefinitio2);var _super849=_createSuper(IfcMaterialLayerSet);function IfcMaterialLayerSet(expressID,MaterialLayers,LayerSetName,Description){var _this846;_classCallCheck(this,IfcMaterialLayerSet);_this846=_super849.call(this,expressID);_this846.MaterialLayers=MaterialLayers;_this846.LayerSetName=LayerSetName;_this846.Description=Description;_this846.type=3303938423;return _this846;}return _createClass(IfcMaterialLayerSet);}(IfcMaterialDefinition);IFC42.IfcMaterialLayerSet=IfcMaterialLayerSet;var IfcMaterialLayerWithOffsets=/*#__PURE__*/function(_IfcMaterialLayer){_inherits(IfcMaterialLayerWithOffsets,_IfcMaterialLayer);var _super850=_createSuper(IfcMaterialLayerWithOffsets);function IfcMaterialLayerWithOffsets(expressID,Material,LayerThickness,IsVentilated,Name,Description,Category,Priority,OffsetDirection,OffsetValues){var _this847;_classCallCheck(this,IfcMaterialLayerWithOffsets);_this847=_super850.call(this,expressID,Material,LayerThickness,IsVentilated,Name,Description,Category,Priority);_this847.Material=Material;_this847.LayerThickness=LayerThickness;_this847.IsVentilated=IsVentilated;_this847.Name=Name;_this847.Description=Description;_this847.Category=Category;_this847.Priority=Priority;_this847.OffsetDirection=OffsetDirection;_this847.OffsetValues=OffsetValues;_this847.type=1847252529;return _this847;}return _createClass(IfcMaterialLayerWithOffsets);}(IfcMaterialLayer);IFC42.IfcMaterialLayerWithOffsets=IfcMaterialLayerWithOffsets;var IfcMaterialList=/*#__PURE__*/function(_IfcLineObject123){_inherits(IfcMaterialList,_IfcLineObject123);var _super851=_createSuper(IfcMaterialList);function IfcMaterialList(expressID,Materials){var _this848;_classCallCheck(this,IfcMaterialList);_this848=_super851.call(this,expressID);_this848.Materials=Materials;_this848.type=2199411900;return _this848;}return _createClass(IfcMaterialList);}(IfcLineObject);IFC42.IfcMaterialList=IfcMaterialList;var IfcMaterialProfile=/*#__PURE__*/function(_IfcMaterialDefinitio3){_inherits(IfcMaterialProfile,_IfcMaterialDefinitio3);var _super852=_createSuper(IfcMaterialProfile);function IfcMaterialProfile(expressID,Name,Description,Material,Profile,Priority,Category){var _this849;_classCallCheck(this,IfcMaterialProfile);_this849=_super852.call(this,expressID);_this849.Name=Name;_this849.Description=Description;_this849.Material=Material;_this849.Profile=Profile;_this849.Priority=Priority;_this849.Category=Category;_this849.type=2235152071;return _this849;}return _createClass(IfcMaterialProfile);}(IfcMaterialDefinition);IFC42.IfcMaterialProfile=IfcMaterialProfile;var IfcMaterialProfileSet=/*#__PURE__*/function(_IfcMaterialDefinitio4){_inherits(IfcMaterialProfileSet,_IfcMaterialDefinitio4);var _super853=_createSuper(IfcMaterialProfileSet);function IfcMaterialProfileSet(expressID,Name,Description,MaterialProfiles,CompositeProfile){var _this850;_classCallCheck(this,IfcMaterialProfileSet);_this850=_super853.call(this,expressID);_this850.Name=Name;_this850.Description=Description;_this850.MaterialProfiles=MaterialProfiles;_this850.CompositeProfile=CompositeProfile;_this850.type=164193824;return _this850;}return _createClass(IfcMaterialProfileSet);}(IfcMaterialDefinition);IFC42.IfcMaterialProfileSet=IfcMaterialProfileSet;var IfcMaterialProfileWithOffsets=/*#__PURE__*/function(_IfcMaterialProfile){_inherits(IfcMaterialProfileWithOffsets,_IfcMaterialProfile);var _super854=_createSuper(IfcMaterialProfileWithOffsets);function IfcMaterialProfileWithOffsets(expressID,Name,Description,Material,Profile,Priority,Category,OffsetValues){var _this851;_classCallCheck(this,IfcMaterialProfileWithOffsets);_this851=_super854.call(this,expressID,Name,Description,Material,Profile,Priority,Category);_this851.Name=Name;_this851.Description=Description;_this851.Material=Material;_this851.Profile=Profile;_this851.Priority=Priority;_this851.Category=Category;_this851.OffsetValues=OffsetValues;_this851.type=552965576;return _this851;}return _createClass(IfcMaterialProfileWithOffsets);}(IfcMaterialProfile);IFC42.IfcMaterialProfileWithOffsets=IfcMaterialProfileWithOffsets;var IfcMaterialUsageDefinition=/*#__PURE__*/function(_IfcLineObject124){_inherits(IfcMaterialUsageDefinition,_IfcLineObject124);var _super855=_createSuper(IfcMaterialUsageDefinition);function IfcMaterialUsageDefinition(expressID){var _this852;_classCallCheck(this,IfcMaterialUsageDefinition);_this852=_super855.call(this,expressID);_this852.type=1507914824;return _this852;}return _createClass(IfcMaterialUsageDefinition);}(IfcLineObject);IFC42.IfcMaterialUsageDefinition=IfcMaterialUsageDefinition;var IfcMeasureWithUnit=/*#__PURE__*/function(_IfcLineObject125){_inherits(IfcMeasureWithUnit,_IfcLineObject125);var _super856=_createSuper(IfcMeasureWithUnit);function IfcMeasureWithUnit(expressID,ValueComponent,UnitComponent){var _this853;_classCallCheck(this,IfcMeasureWithUnit);_this853=_super856.call(this,expressID);_this853.ValueComponent=ValueComponent;_this853.UnitComponent=UnitComponent;_this853.type=2597039031;return _this853;}return _createClass(IfcMeasureWithUnit);}(IfcLineObject);IFC42.IfcMeasureWithUnit=IfcMeasureWithUnit;var IfcMetric=/*#__PURE__*/function(_IfcConstraint3){_inherits(IfcMetric,_IfcConstraint3);var _super857=_createSuper(IfcMetric);function IfcMetric(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade,Benchmark,ValueSource,DataValue,ReferencePath){var _this854;_classCallCheck(this,IfcMetric);_this854=_super857.call(this,expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade);_this854.Name=Name;_this854.Description=Description;_this854.ConstraintGrade=ConstraintGrade;_this854.ConstraintSource=ConstraintSource;_this854.CreatingActor=CreatingActor;_this854.CreationTime=CreationTime;_this854.UserDefinedGrade=UserDefinedGrade;_this854.Benchmark=Benchmark;_this854.ValueSource=ValueSource;_this854.DataValue=DataValue;_this854.ReferencePath=ReferencePath;_this854.type=3368373690;return _this854;}return _createClass(IfcMetric);}(IfcConstraint);IFC42.IfcMetric=IfcMetric;var IfcMonetaryUnit=/*#__PURE__*/function(_IfcLineObject126){_inherits(IfcMonetaryUnit,_IfcLineObject126);var _super858=_createSuper(IfcMonetaryUnit);function IfcMonetaryUnit(expressID,Currency){var _this855;_classCallCheck(this,IfcMonetaryUnit);_this855=_super858.call(this,expressID);_this855.Currency=Currency;_this855.type=2706619895;return _this855;}return _createClass(IfcMonetaryUnit);}(IfcLineObject);IFC42.IfcMonetaryUnit=IfcMonetaryUnit;var IfcNamedUnit=/*#__PURE__*/function(_IfcLineObject127){_inherits(IfcNamedUnit,_IfcLineObject127);var _super859=_createSuper(IfcNamedUnit);function IfcNamedUnit(expressID,Dimensions,UnitType){var _this856;_classCallCheck(this,IfcNamedUnit);_this856=_super859.call(this,expressID);_this856.Dimensions=Dimensions;_this856.UnitType=UnitType;_this856.type=1918398963;return _this856;}return _createClass(IfcNamedUnit);}(IfcLineObject);IFC42.IfcNamedUnit=IfcNamedUnit;var IfcObjectPlacement=/*#__PURE__*/function(_IfcLineObject128){_inherits(IfcObjectPlacement,_IfcLineObject128);var _super860=_createSuper(IfcObjectPlacement);function IfcObjectPlacement(expressID){var _this857;_classCallCheck(this,IfcObjectPlacement);_this857=_super860.call(this,expressID);_this857.type=3701648758;return _this857;}return _createClass(IfcObjectPlacement);}(IfcLineObject);IFC42.IfcObjectPlacement=IfcObjectPlacement;var IfcObjective=/*#__PURE__*/function(_IfcConstraint4){_inherits(IfcObjective,_IfcConstraint4);var _super861=_createSuper(IfcObjective);function IfcObjective(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade,BenchmarkValues,LogicalAggregator,ObjectiveQualifier,UserDefinedQualifier){var _this858;_classCallCheck(this,IfcObjective);_this858=_super861.call(this,expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade);_this858.Name=Name;_this858.Description=Description;_this858.ConstraintGrade=ConstraintGrade;_this858.ConstraintSource=ConstraintSource;_this858.CreatingActor=CreatingActor;_this858.CreationTime=CreationTime;_this858.UserDefinedGrade=UserDefinedGrade;_this858.BenchmarkValues=BenchmarkValues;_this858.LogicalAggregator=LogicalAggregator;_this858.ObjectiveQualifier=ObjectiveQualifier;_this858.UserDefinedQualifier=UserDefinedQualifier;_this858.type=2251480897;return _this858;}return _createClass(IfcObjective);}(IfcConstraint);IFC42.IfcObjective=IfcObjective;var IfcOrganization=/*#__PURE__*/function(_IfcLineObject129){_inherits(IfcOrganization,_IfcLineObject129);var _super862=_createSuper(IfcOrganization);function IfcOrganization(expressID,Identification,Name,Description,Roles,Addresses){var _this859;_classCallCheck(this,IfcOrganization);_this859=_super862.call(this,expressID);_this859.Identification=Identification;_this859.Name=Name;_this859.Description=Description;_this859.Roles=Roles;_this859.Addresses=Addresses;_this859.type=4251960020;return _this859;}return _createClass(IfcOrganization);}(IfcLineObject);IFC42.IfcOrganization=IfcOrganization;var IfcOwnerHistory=/*#__PURE__*/function(_IfcLineObject130){_inherits(IfcOwnerHistory,_IfcLineObject130);var _super863=_createSuper(IfcOwnerHistory);function IfcOwnerHistory(expressID,OwningUser,OwningApplication,State,ChangeAction,LastModifiedDate,LastModifyingUser,LastModifyingApplication,CreationDate){var _this860;_classCallCheck(this,IfcOwnerHistory);_this860=_super863.call(this,expressID);_this860.OwningUser=OwningUser;_this860.OwningApplication=OwningApplication;_this860.State=State;_this860.ChangeAction=ChangeAction;_this860.LastModifiedDate=LastModifiedDate;_this860.LastModifyingUser=LastModifyingUser;_this860.LastModifyingApplication=LastModifyingApplication;_this860.CreationDate=CreationDate;_this860.type=1207048766;return _this860;}return _createClass(IfcOwnerHistory);}(IfcLineObject);IFC42.IfcOwnerHistory=IfcOwnerHistory;var IfcPerson=/*#__PURE__*/function(_IfcLineObject131){_inherits(IfcPerson,_IfcLineObject131);var _super864=_createSuper(IfcPerson);function IfcPerson(expressID,Identification,FamilyName,GivenName,MiddleNames,PrefixTitles,SuffixTitles,Roles,Addresses){var _this861;_classCallCheck(this,IfcPerson);_this861=_super864.call(this,expressID);_this861.Identification=Identification;_this861.FamilyName=FamilyName;_this861.GivenName=GivenName;_this861.MiddleNames=MiddleNames;_this861.PrefixTitles=PrefixTitles;_this861.SuffixTitles=SuffixTitles;_this861.Roles=Roles;_this861.Addresses=Addresses;_this861.type=2077209135;return _this861;}return _createClass(IfcPerson);}(IfcLineObject);IFC42.IfcPerson=IfcPerson;var IfcPersonAndOrganization=/*#__PURE__*/function(_IfcLineObject132){_inherits(IfcPersonAndOrganization,_IfcLineObject132);var _super865=_createSuper(IfcPersonAndOrganization);function IfcPersonAndOrganization(expressID,ThePerson,TheOrganization,Roles){var _this862;_classCallCheck(this,IfcPersonAndOrganization);_this862=_super865.call(this,expressID);_this862.ThePerson=ThePerson;_this862.TheOrganization=TheOrganization;_this862.Roles=Roles;_this862.type=101040310;return _this862;}return _createClass(IfcPersonAndOrganization);}(IfcLineObject);IFC42.IfcPersonAndOrganization=IfcPersonAndOrganization;var IfcPhysicalQuantity=/*#__PURE__*/function(_IfcLineObject133){_inherits(IfcPhysicalQuantity,_IfcLineObject133);var _super866=_createSuper(IfcPhysicalQuantity);function IfcPhysicalQuantity(expressID,Name,Description){var _this863;_classCallCheck(this,IfcPhysicalQuantity);_this863=_super866.call(this,expressID);_this863.Name=Name;_this863.Description=Description;_this863.type=2483315170;return _this863;}return _createClass(IfcPhysicalQuantity);}(IfcLineObject);IFC42.IfcPhysicalQuantity=IfcPhysicalQuantity;var IfcPhysicalSimpleQuantity=/*#__PURE__*/function(_IfcPhysicalQuantity3){_inherits(IfcPhysicalSimpleQuantity,_IfcPhysicalQuantity3);var _super867=_createSuper(IfcPhysicalSimpleQuantity);function IfcPhysicalSimpleQuantity(expressID,Name,Description,Unit){var _this864;_classCallCheck(this,IfcPhysicalSimpleQuantity);_this864=_super867.call(this,expressID,Name,Description);_this864.Name=Name;_this864.Description=Description;_this864.Unit=Unit;_this864.type=2226359599;return _this864;}return _createClass(IfcPhysicalSimpleQuantity);}(IfcPhysicalQuantity);IFC42.IfcPhysicalSimpleQuantity=IfcPhysicalSimpleQuantity;var IfcPostalAddress=/*#__PURE__*/function(_IfcAddress3){_inherits(IfcPostalAddress,_IfcAddress3);var _super868=_createSuper(IfcPostalAddress);function IfcPostalAddress(expressID,Purpose,Description,UserDefinedPurpose,InternalLocation,AddressLines,PostalBox,Town,Region,PostalCode,Country){var _this865;_classCallCheck(this,IfcPostalAddress);_this865=_super868.call(this,expressID,Purpose,Description,UserDefinedPurpose);_this865.Purpose=Purpose;_this865.Description=Description;_this865.UserDefinedPurpose=UserDefinedPurpose;_this865.InternalLocation=InternalLocation;_this865.AddressLines=AddressLines;_this865.PostalBox=PostalBox;_this865.Town=Town;_this865.Region=Region;_this865.PostalCode=PostalCode;_this865.Country=Country;_this865.type=3355820592;return _this865;}return _createClass(IfcPostalAddress);}(IfcAddress);IFC42.IfcPostalAddress=IfcPostalAddress;var IfcPresentationItem=/*#__PURE__*/function(_IfcLineObject134){_inherits(IfcPresentationItem,_IfcLineObject134);var _super869=_createSuper(IfcPresentationItem);function IfcPresentationItem(expressID){var _this866;_classCallCheck(this,IfcPresentationItem);_this866=_super869.call(this,expressID);_this866.type=677532197;return _this866;}return _createClass(IfcPresentationItem);}(IfcLineObject);IFC42.IfcPresentationItem=IfcPresentationItem;var IfcPresentationLayerAssignment=/*#__PURE__*/function(_IfcLineObject135){_inherits(IfcPresentationLayerAssignment,_IfcLineObject135);var _super870=_createSuper(IfcPresentationLayerAssignment);function IfcPresentationLayerAssignment(expressID,Name,Description,AssignedItems,Identifier){var _this867;_classCallCheck(this,IfcPresentationLayerAssignment);_this867=_super870.call(this,expressID);_this867.Name=Name;_this867.Description=Description;_this867.AssignedItems=AssignedItems;_this867.Identifier=Identifier;_this867.type=2022622350;return _this867;}return _createClass(IfcPresentationLayerAssignment);}(IfcLineObject);IFC42.IfcPresentationLayerAssignment=IfcPresentationLayerAssignment;var IfcPresentationLayerWithStyle=/*#__PURE__*/function(_IfcPresentationLayer2){_inherits(IfcPresentationLayerWithStyle,_IfcPresentationLayer2);var _super871=_createSuper(IfcPresentationLayerWithStyle);function IfcPresentationLayerWithStyle(expressID,Name,Description,AssignedItems,Identifier,LayerOn,LayerFrozen,LayerBlocked,LayerStyles){var _this868;_classCallCheck(this,IfcPresentationLayerWithStyle);_this868=_super871.call(this,expressID,Name,Description,AssignedItems,Identifier);_this868.Name=Name;_this868.Description=Description;_this868.AssignedItems=AssignedItems;_this868.Identifier=Identifier;_this868.LayerOn=LayerOn;_this868.LayerFrozen=LayerFrozen;_this868.LayerBlocked=LayerBlocked;_this868.LayerStyles=LayerStyles;_this868.type=1304840413;return _this868;}return _createClass(IfcPresentationLayerWithStyle);}(IfcPresentationLayerAssignment);IFC42.IfcPresentationLayerWithStyle=IfcPresentationLayerWithStyle;var IfcPresentationStyle=/*#__PURE__*/function(_IfcLineObject136){_inherits(IfcPresentationStyle,_IfcLineObject136);var _super872=_createSuper(IfcPresentationStyle);function IfcPresentationStyle(expressID,Name){var _this869;_classCallCheck(this,IfcPresentationStyle);_this869=_super872.call(this,expressID);_this869.Name=Name;_this869.type=3119450353;return _this869;}return _createClass(IfcPresentationStyle);}(IfcLineObject);IFC42.IfcPresentationStyle=IfcPresentationStyle;var IfcPresentationStyleAssignment=/*#__PURE__*/function(_IfcLineObject137){_inherits(IfcPresentationStyleAssignment,_IfcLineObject137);var _super873=_createSuper(IfcPresentationStyleAssignment);function IfcPresentationStyleAssignment(expressID,Styles){var _this870;_classCallCheck(this,IfcPresentationStyleAssignment);_this870=_super873.call(this,expressID);_this870.Styles=Styles;_this870.type=2417041796;return _this870;}return _createClass(IfcPresentationStyleAssignment);}(IfcLineObject);IFC42.IfcPresentationStyleAssignment=IfcPresentationStyleAssignment;var IfcProductRepresentation=/*#__PURE__*/function(_IfcLineObject138){_inherits(IfcProductRepresentation,_IfcLineObject138);var _super874=_createSuper(IfcProductRepresentation);function IfcProductRepresentation(expressID,Name,Description,Representations){var _this871;_classCallCheck(this,IfcProductRepresentation);_this871=_super874.call(this,expressID);_this871.Name=Name;_this871.Description=Description;_this871.Representations=Representations;_this871.type=2095639259;return _this871;}return _createClass(IfcProductRepresentation);}(IfcLineObject);IFC42.IfcProductRepresentation=IfcProductRepresentation;var IfcProfileDef=/*#__PURE__*/function(_IfcLineObject139){_inherits(IfcProfileDef,_IfcLineObject139);var _super875=_createSuper(IfcProfileDef);function IfcProfileDef(expressID,ProfileType,ProfileName){var _this872;_classCallCheck(this,IfcProfileDef);_this872=_super875.call(this,expressID);_this872.ProfileType=ProfileType;_this872.ProfileName=ProfileName;_this872.type=3958567839;return _this872;}return _createClass(IfcProfileDef);}(IfcLineObject);IFC42.IfcProfileDef=IfcProfileDef;var IfcProjectedCRS=/*#__PURE__*/function(_IfcCoordinateReferen){_inherits(IfcProjectedCRS,_IfcCoordinateReferen);var _super876=_createSuper(IfcProjectedCRS);function IfcProjectedCRS(expressID,Name,Description,GeodeticDatum,VerticalDatum,MapProjection,MapZone,MapUnit){var _this873;_classCallCheck(this,IfcProjectedCRS);_this873=_super876.call(this,expressID,Name,Description,GeodeticDatum,VerticalDatum);_this873.Name=Name;_this873.Description=Description;_this873.GeodeticDatum=GeodeticDatum;_this873.VerticalDatum=VerticalDatum;_this873.MapProjection=MapProjection;_this873.MapZone=MapZone;_this873.MapUnit=MapUnit;_this873.type=3843373140;return _this873;}return _createClass(IfcProjectedCRS);}(IfcCoordinateReferenceSystem);IFC42.IfcProjectedCRS=IfcProjectedCRS;var IfcPropertyAbstraction=/*#__PURE__*/function(_IfcLineObject140){_inherits(IfcPropertyAbstraction,_IfcLineObject140);var _super877=_createSuper(IfcPropertyAbstraction);function IfcPropertyAbstraction(expressID){var _this874;_classCallCheck(this,IfcPropertyAbstraction);_this874=_super877.call(this,expressID);_this874.type=986844984;return _this874;}return _createClass(IfcPropertyAbstraction);}(IfcLineObject);IFC42.IfcPropertyAbstraction=IfcPropertyAbstraction;var IfcPropertyEnumeration=/*#__PURE__*/function(_IfcPropertyAbstracti){_inherits(IfcPropertyEnumeration,_IfcPropertyAbstracti);var _super878=_createSuper(IfcPropertyEnumeration);function IfcPropertyEnumeration(expressID,Name,EnumerationValues,Unit){var _this875;_classCallCheck(this,IfcPropertyEnumeration);_this875=_super878.call(this,expressID);_this875.Name=Name;_this875.EnumerationValues=EnumerationValues;_this875.Unit=Unit;_this875.type=3710013099;return _this875;}return _createClass(IfcPropertyEnumeration);}(IfcPropertyAbstraction);IFC42.IfcPropertyEnumeration=IfcPropertyEnumeration;var IfcQuantityArea=/*#__PURE__*/function(_IfcPhysicalSimpleQua7){_inherits(IfcQuantityArea,_IfcPhysicalSimpleQua7);var _super879=_createSuper(IfcQuantityArea);function IfcQuantityArea(expressID,Name,Description,Unit,AreaValue,Formula){var _this876;_classCallCheck(this,IfcQuantityArea);_this876=_super879.call(this,expressID,Name,Description,Unit);_this876.Name=Name;_this876.Description=Description;_this876.Unit=Unit;_this876.AreaValue=AreaValue;_this876.Formula=Formula;_this876.type=2044713172;return _this876;}return _createClass(IfcQuantityArea);}(IfcPhysicalSimpleQuantity);IFC42.IfcQuantityArea=IfcQuantityArea;var IfcQuantityCount=/*#__PURE__*/function(_IfcPhysicalSimpleQua8){_inherits(IfcQuantityCount,_IfcPhysicalSimpleQua8);var _super880=_createSuper(IfcQuantityCount);function IfcQuantityCount(expressID,Name,Description,Unit,CountValue,Formula){var _this877;_classCallCheck(this,IfcQuantityCount);_this877=_super880.call(this,expressID,Name,Description,Unit);_this877.Name=Name;_this877.Description=Description;_this877.Unit=Unit;_this877.CountValue=CountValue;_this877.Formula=Formula;_this877.type=2093928680;return _this877;}return _createClass(IfcQuantityCount);}(IfcPhysicalSimpleQuantity);IFC42.IfcQuantityCount=IfcQuantityCount;var IfcQuantityLength=/*#__PURE__*/function(_IfcPhysicalSimpleQua9){_inherits(IfcQuantityLength,_IfcPhysicalSimpleQua9);var _super881=_createSuper(IfcQuantityLength);function IfcQuantityLength(expressID,Name,Description,Unit,LengthValue,Formula){var _this878;_classCallCheck(this,IfcQuantityLength);_this878=_super881.call(this,expressID,Name,Description,Unit);_this878.Name=Name;_this878.Description=Description;_this878.Unit=Unit;_this878.LengthValue=LengthValue;_this878.Formula=Formula;_this878.type=931644368;return _this878;}return _createClass(IfcQuantityLength);}(IfcPhysicalSimpleQuantity);IFC42.IfcQuantityLength=IfcQuantityLength;var IfcQuantityTime=/*#__PURE__*/function(_IfcPhysicalSimpleQua10){_inherits(IfcQuantityTime,_IfcPhysicalSimpleQua10);var _super882=_createSuper(IfcQuantityTime);function IfcQuantityTime(expressID,Name,Description,Unit,TimeValue,Formula){var _this879;_classCallCheck(this,IfcQuantityTime);_this879=_super882.call(this,expressID,Name,Description,Unit);_this879.Name=Name;_this879.Description=Description;_this879.Unit=Unit;_this879.TimeValue=TimeValue;_this879.Formula=Formula;_this879.type=3252649465;return _this879;}return _createClass(IfcQuantityTime);}(IfcPhysicalSimpleQuantity);IFC42.IfcQuantityTime=IfcQuantityTime;var IfcQuantityVolume=/*#__PURE__*/function(_IfcPhysicalSimpleQua11){_inherits(IfcQuantityVolume,_IfcPhysicalSimpleQua11);var _super883=_createSuper(IfcQuantityVolume);function IfcQuantityVolume(expressID,Name,Description,Unit,VolumeValue,Formula){var _this880;_classCallCheck(this,IfcQuantityVolume);_this880=_super883.call(this,expressID,Name,Description,Unit);_this880.Name=Name;_this880.Description=Description;_this880.Unit=Unit;_this880.VolumeValue=VolumeValue;_this880.Formula=Formula;_this880.type=2405470396;return _this880;}return _createClass(IfcQuantityVolume);}(IfcPhysicalSimpleQuantity);IFC42.IfcQuantityVolume=IfcQuantityVolume;var IfcQuantityWeight=/*#__PURE__*/function(_IfcPhysicalSimpleQua12){_inherits(IfcQuantityWeight,_IfcPhysicalSimpleQua12);var _super884=_createSuper(IfcQuantityWeight);function IfcQuantityWeight(expressID,Name,Description,Unit,WeightValue,Formula){var _this881;_classCallCheck(this,IfcQuantityWeight);_this881=_super884.call(this,expressID,Name,Description,Unit);_this881.Name=Name;_this881.Description=Description;_this881.Unit=Unit;_this881.WeightValue=WeightValue;_this881.Formula=Formula;_this881.type=825690147;return _this881;}return _createClass(IfcQuantityWeight);}(IfcPhysicalSimpleQuantity);IFC42.IfcQuantityWeight=IfcQuantityWeight;var IfcRecurrencePattern=/*#__PURE__*/function(_IfcLineObject141){_inherits(IfcRecurrencePattern,_IfcLineObject141);var _super885=_createSuper(IfcRecurrencePattern);function IfcRecurrencePattern(expressID,RecurrenceType,DayComponent,WeekdayComponent,MonthComponent,Position,Interval,Occurrences,TimePeriods){var _this882;_classCallCheck(this,IfcRecurrencePattern);_this882=_super885.call(this,expressID);_this882.RecurrenceType=RecurrenceType;_this882.DayComponent=DayComponent;_this882.WeekdayComponent=WeekdayComponent;_this882.MonthComponent=MonthComponent;_this882.Position=Position;_this882.Interval=Interval;_this882.Occurrences=Occurrences;_this882.TimePeriods=TimePeriods;_this882.type=3915482550;return _this882;}return _createClass(IfcRecurrencePattern);}(IfcLineObject);IFC42.IfcRecurrencePattern=IfcRecurrencePattern;var IfcReference=/*#__PURE__*/function(_IfcLineObject142){_inherits(IfcReference,_IfcLineObject142);var _super886=_createSuper(IfcReference);function IfcReference(expressID,TypeIdentifier,AttributeIdentifier,InstanceName,ListPositions,InnerReference){var _this883;_classCallCheck(this,IfcReference);_this883=_super886.call(this,expressID);_this883.TypeIdentifier=TypeIdentifier;_this883.AttributeIdentifier=AttributeIdentifier;_this883.InstanceName=InstanceName;_this883.ListPositions=ListPositions;_this883.InnerReference=InnerReference;_this883.type=2433181523;return _this883;}return _createClass(IfcReference);}(IfcLineObject);IFC42.IfcReference=IfcReference;var IfcRepresentation=/*#__PURE__*/function(_IfcLineObject143){_inherits(IfcRepresentation,_IfcLineObject143);var _super887=_createSuper(IfcRepresentation);function IfcRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this884;_classCallCheck(this,IfcRepresentation);_this884=_super887.call(this,expressID);_this884.ContextOfItems=ContextOfItems;_this884.RepresentationIdentifier=RepresentationIdentifier;_this884.RepresentationType=RepresentationType;_this884.Items=Items;_this884.type=1076942058;return _this884;}return _createClass(IfcRepresentation);}(IfcLineObject);IFC42.IfcRepresentation=IfcRepresentation;var IfcRepresentationContext=/*#__PURE__*/function(_IfcLineObject144){_inherits(IfcRepresentationContext,_IfcLineObject144);var _super888=_createSuper(IfcRepresentationContext);function IfcRepresentationContext(expressID,ContextIdentifier,ContextType){var _this885;_classCallCheck(this,IfcRepresentationContext);_this885=_super888.call(this,expressID);_this885.ContextIdentifier=ContextIdentifier;_this885.ContextType=ContextType;_this885.type=3377609919;return _this885;}return _createClass(IfcRepresentationContext);}(IfcLineObject);IFC42.IfcRepresentationContext=IfcRepresentationContext;var IfcRepresentationItem=/*#__PURE__*/function(_IfcLineObject145){_inherits(IfcRepresentationItem,_IfcLineObject145);var _super889=_createSuper(IfcRepresentationItem);function IfcRepresentationItem(expressID){var _this886;_classCallCheck(this,IfcRepresentationItem);_this886=_super889.call(this,expressID);_this886.type=3008791417;return _this886;}return _createClass(IfcRepresentationItem);}(IfcLineObject);IFC42.IfcRepresentationItem=IfcRepresentationItem;var IfcRepresentationMap=/*#__PURE__*/function(_IfcLineObject146){_inherits(IfcRepresentationMap,_IfcLineObject146);var _super890=_createSuper(IfcRepresentationMap);function IfcRepresentationMap(expressID,MappingOrigin,MappedRepresentation){var _this887;_classCallCheck(this,IfcRepresentationMap);_this887=_super890.call(this,expressID);_this887.MappingOrigin=MappingOrigin;_this887.MappedRepresentation=MappedRepresentation;_this887.type=1660063152;return _this887;}return _createClass(IfcRepresentationMap);}(IfcLineObject);IFC42.IfcRepresentationMap=IfcRepresentationMap;var IfcResourceLevelRelationship=/*#__PURE__*/function(_IfcLineObject147){_inherits(IfcResourceLevelRelationship,_IfcLineObject147);var _super891=_createSuper(IfcResourceLevelRelationship);function IfcResourceLevelRelationship(expressID,Name,Description){var _this888;_classCallCheck(this,IfcResourceLevelRelationship);_this888=_super891.call(this,expressID);_this888.Name=Name;_this888.Description=Description;_this888.type=2439245199;return _this888;}return _createClass(IfcResourceLevelRelationship);}(IfcLineObject);IFC42.IfcResourceLevelRelationship=IfcResourceLevelRelationship;var IfcRoot=/*#__PURE__*/function(_IfcLineObject148){_inherits(IfcRoot,_IfcLineObject148);var _super892=_createSuper(IfcRoot);function IfcRoot(expressID,GlobalId,OwnerHistory,Name,Description){var _this889;_classCallCheck(this,IfcRoot);_this889=_super892.call(this,expressID);_this889.GlobalId=GlobalId;_this889.OwnerHistory=OwnerHistory;_this889.Name=Name;_this889.Description=Description;_this889.type=2341007311;return _this889;}return _createClass(IfcRoot);}(IfcLineObject);IFC42.IfcRoot=IfcRoot;var IfcSIUnit=/*#__PURE__*/function(_IfcNamedUnit4){_inherits(IfcSIUnit,_IfcNamedUnit4);var _super893=_createSuper(IfcSIUnit);function IfcSIUnit(expressID,UnitType,Prefix,Name){var _this890;_classCallCheck(this,IfcSIUnit);_this890=_super893.call(this,expressID,new Handle(0),UnitType);_this890.UnitType=UnitType;_this890.Prefix=Prefix;_this890.Name=Name;_this890.type=448429030;return _this890;}return _createClass(IfcSIUnit);}(IfcNamedUnit);IFC42.IfcSIUnit=IfcSIUnit;var IfcSchedulingTime=/*#__PURE__*/function(_IfcLineObject149){_inherits(IfcSchedulingTime,_IfcLineObject149);var _super894=_createSuper(IfcSchedulingTime);function IfcSchedulingTime(expressID,Name,DataOrigin,UserDefinedDataOrigin){var _this891;_classCallCheck(this,IfcSchedulingTime);_this891=_super894.call(this,expressID);_this891.Name=Name;_this891.DataOrigin=DataOrigin;_this891.UserDefinedDataOrigin=UserDefinedDataOrigin;_this891.type=1054537805;return _this891;}return _createClass(IfcSchedulingTime);}(IfcLineObject);IFC42.IfcSchedulingTime=IfcSchedulingTime;var IfcShapeAspect=/*#__PURE__*/function(_IfcLineObject150){_inherits(IfcShapeAspect,_IfcLineObject150);var _super895=_createSuper(IfcShapeAspect);function IfcShapeAspect(expressID,ShapeRepresentations,Name,Description,ProductDefinitional,PartOfProductDefinitionShape){var _this892;_classCallCheck(this,IfcShapeAspect);_this892=_super895.call(this,expressID);_this892.ShapeRepresentations=ShapeRepresentations;_this892.Name=Name;_this892.Description=Description;_this892.ProductDefinitional=ProductDefinitional;_this892.PartOfProductDefinitionShape=PartOfProductDefinitionShape;_this892.type=867548509;return _this892;}return _createClass(IfcShapeAspect);}(IfcLineObject);IFC42.IfcShapeAspect=IfcShapeAspect;var IfcShapeModel=/*#__PURE__*/function(_IfcRepresentation3){_inherits(IfcShapeModel,_IfcRepresentation3);var _super896=_createSuper(IfcShapeModel);function IfcShapeModel(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this893;_classCallCheck(this,IfcShapeModel);_this893=_super896.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this893.ContextOfItems=ContextOfItems;_this893.RepresentationIdentifier=RepresentationIdentifier;_this893.RepresentationType=RepresentationType;_this893.Items=Items;_this893.type=3982875396;return _this893;}return _createClass(IfcShapeModel);}(IfcRepresentation);IFC42.IfcShapeModel=IfcShapeModel;var IfcShapeRepresentation=/*#__PURE__*/function(_IfcShapeModel3){_inherits(IfcShapeRepresentation,_IfcShapeModel3);var _super897=_createSuper(IfcShapeRepresentation);function IfcShapeRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this894;_classCallCheck(this,IfcShapeRepresentation);_this894=_super897.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this894.ContextOfItems=ContextOfItems;_this894.RepresentationIdentifier=RepresentationIdentifier;_this894.RepresentationType=RepresentationType;_this894.Items=Items;_this894.type=4240577450;return _this894;}return _createClass(IfcShapeRepresentation);}(IfcShapeModel);IFC42.IfcShapeRepresentation=IfcShapeRepresentation;var IfcStructuralConnectionCondition=/*#__PURE__*/function(_IfcLineObject151){_inherits(IfcStructuralConnectionCondition,_IfcLineObject151);var _super898=_createSuper(IfcStructuralConnectionCondition);function IfcStructuralConnectionCondition(expressID,Name){var _this895;_classCallCheck(this,IfcStructuralConnectionCondition);_this895=_super898.call(this,expressID);_this895.Name=Name;_this895.type=2273995522;return _this895;}return _createClass(IfcStructuralConnectionCondition);}(IfcLineObject);IFC42.IfcStructuralConnectionCondition=IfcStructuralConnectionCondition;var IfcStructuralLoad=/*#__PURE__*/function(_IfcLineObject152){_inherits(IfcStructuralLoad,_IfcLineObject152);var _super899=_createSuper(IfcStructuralLoad);function IfcStructuralLoad(expressID,Name){var _this896;_classCallCheck(this,IfcStructuralLoad);_this896=_super899.call(this,expressID);_this896.Name=Name;_this896.type=2162789131;return _this896;}return _createClass(IfcStructuralLoad);}(IfcLineObject);IFC42.IfcStructuralLoad=IfcStructuralLoad;var IfcStructuralLoadConfiguration=/*#__PURE__*/function(_IfcStructuralLoad2){_inherits(IfcStructuralLoadConfiguration,_IfcStructuralLoad2);var _super900=_createSuper(IfcStructuralLoadConfiguration);function IfcStructuralLoadConfiguration(expressID,Name,Values,Locations){var _this897;_classCallCheck(this,IfcStructuralLoadConfiguration);_this897=_super900.call(this,expressID,Name);_this897.Name=Name;_this897.Values=Values;_this897.Locations=Locations;_this897.type=3478079324;return _this897;}return _createClass(IfcStructuralLoadConfiguration);}(IfcStructuralLoad);IFC42.IfcStructuralLoadConfiguration=IfcStructuralLoadConfiguration;var IfcStructuralLoadOrResult=/*#__PURE__*/function(_IfcStructuralLoad3){_inherits(IfcStructuralLoadOrResult,_IfcStructuralLoad3);var _super901=_createSuper(IfcStructuralLoadOrResult);function IfcStructuralLoadOrResult(expressID,Name){var _this898;_classCallCheck(this,IfcStructuralLoadOrResult);_this898=_super901.call(this,expressID,Name);_this898.Name=Name;_this898.type=609421318;return _this898;}return _createClass(IfcStructuralLoadOrResult);}(IfcStructuralLoad);IFC42.IfcStructuralLoadOrResult=IfcStructuralLoadOrResult;var IfcStructuralLoadStatic=/*#__PURE__*/function(_IfcStructuralLoadOrR){_inherits(IfcStructuralLoadStatic,_IfcStructuralLoadOrR);var _super902=_createSuper(IfcStructuralLoadStatic);function IfcStructuralLoadStatic(expressID,Name){var _this899;_classCallCheck(this,IfcStructuralLoadStatic);_this899=_super902.call(this,expressID,Name);_this899.Name=Name;_this899.type=2525727697;return _this899;}return _createClass(IfcStructuralLoadStatic);}(IfcStructuralLoadOrResult);IFC42.IfcStructuralLoadStatic=IfcStructuralLoadStatic;var IfcStructuralLoadTemperature=/*#__PURE__*/function(_IfcStructuralLoadSta6){_inherits(IfcStructuralLoadTemperature,_IfcStructuralLoadSta6);var _super903=_createSuper(IfcStructuralLoadTemperature);function IfcStructuralLoadTemperature(expressID,Name,DeltaTConstant,DeltaTY,DeltaTZ){var _this900;_classCallCheck(this,IfcStructuralLoadTemperature);_this900=_super903.call(this,expressID,Name);_this900.Name=Name;_this900.DeltaTConstant=DeltaTConstant;_this900.DeltaTY=DeltaTY;_this900.DeltaTZ=DeltaTZ;_this900.type=3408363356;return _this900;}return _createClass(IfcStructuralLoadTemperature);}(IfcStructuralLoadStatic);IFC42.IfcStructuralLoadTemperature=IfcStructuralLoadTemperature;var IfcStyleModel=/*#__PURE__*/function(_IfcRepresentation4){_inherits(IfcStyleModel,_IfcRepresentation4);var _super904=_createSuper(IfcStyleModel);function IfcStyleModel(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this901;_classCallCheck(this,IfcStyleModel);_this901=_super904.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this901.ContextOfItems=ContextOfItems;_this901.RepresentationIdentifier=RepresentationIdentifier;_this901.RepresentationType=RepresentationType;_this901.Items=Items;_this901.type=2830218821;return _this901;}return _createClass(IfcStyleModel);}(IfcRepresentation);IFC42.IfcStyleModel=IfcStyleModel;var IfcStyledItem=/*#__PURE__*/function(_IfcRepresentationIte5){_inherits(IfcStyledItem,_IfcRepresentationIte5);var _super905=_createSuper(IfcStyledItem);function IfcStyledItem(expressID,Item,Styles,Name){var _this902;_classCallCheck(this,IfcStyledItem);_this902=_super905.call(this,expressID);_this902.Item=Item;_this902.Styles=Styles;_this902.Name=Name;_this902.type=3958052878;return _this902;}return _createClass(IfcStyledItem);}(IfcRepresentationItem);IFC42.IfcStyledItem=IfcStyledItem;var IfcStyledRepresentation=/*#__PURE__*/function(_IfcStyleModel2){_inherits(IfcStyledRepresentation,_IfcStyleModel2);var _super906=_createSuper(IfcStyledRepresentation);function IfcStyledRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this903;_classCallCheck(this,IfcStyledRepresentation);_this903=_super906.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this903.ContextOfItems=ContextOfItems;_this903.RepresentationIdentifier=RepresentationIdentifier;_this903.RepresentationType=RepresentationType;_this903.Items=Items;_this903.type=3049322572;return _this903;}return _createClass(IfcStyledRepresentation);}(IfcStyleModel);IFC42.IfcStyledRepresentation=IfcStyledRepresentation;var IfcSurfaceReinforcementArea=/*#__PURE__*/function(_IfcStructuralLoadOrR2){_inherits(IfcSurfaceReinforcementArea,_IfcStructuralLoadOrR2);var _super907=_createSuper(IfcSurfaceReinforcementArea);function IfcSurfaceReinforcementArea(expressID,Name,SurfaceReinforcement1,SurfaceReinforcement2,ShearReinforcement){var _this904;_classCallCheck(this,IfcSurfaceReinforcementArea);_this904=_super907.call(this,expressID,Name);_this904.Name=Name;_this904.SurfaceReinforcement1=SurfaceReinforcement1;_this904.SurfaceReinforcement2=SurfaceReinforcement2;_this904.ShearReinforcement=ShearReinforcement;_this904.type=2934153892;return _this904;}return _createClass(IfcSurfaceReinforcementArea);}(IfcStructuralLoadOrResult);IFC42.IfcSurfaceReinforcementArea=IfcSurfaceReinforcementArea;var IfcSurfaceStyle=/*#__PURE__*/function(_IfcPresentationStyle6){_inherits(IfcSurfaceStyle,_IfcPresentationStyle6);var _super908=_createSuper(IfcSurfaceStyle);function IfcSurfaceStyle(expressID,Name,Side,Styles){var _this905;_classCallCheck(this,IfcSurfaceStyle);_this905=_super908.call(this,expressID,Name);_this905.Name=Name;_this905.Side=Side;_this905.Styles=Styles;_this905.type=1300840506;return _this905;}return _createClass(IfcSurfaceStyle);}(IfcPresentationStyle);IFC42.IfcSurfaceStyle=IfcSurfaceStyle;var IfcSurfaceStyleLighting=/*#__PURE__*/function(_IfcPresentationItem){_inherits(IfcSurfaceStyleLighting,_IfcPresentationItem);var _super909=_createSuper(IfcSurfaceStyleLighting);function IfcSurfaceStyleLighting(expressID,DiffuseTransmissionColour,DiffuseReflectionColour,TransmissionColour,ReflectanceColour){var _this906;_classCallCheck(this,IfcSurfaceStyleLighting);_this906=_super909.call(this,expressID);_this906.DiffuseTransmissionColour=DiffuseTransmissionColour;_this906.DiffuseReflectionColour=DiffuseReflectionColour;_this906.TransmissionColour=TransmissionColour;_this906.ReflectanceColour=ReflectanceColour;_this906.type=3303107099;return _this906;}return _createClass(IfcSurfaceStyleLighting);}(IfcPresentationItem);IFC42.IfcSurfaceStyleLighting=IfcSurfaceStyleLighting;var IfcSurfaceStyleRefraction=/*#__PURE__*/function(_IfcPresentationItem2){_inherits(IfcSurfaceStyleRefraction,_IfcPresentationItem2);var _super910=_createSuper(IfcSurfaceStyleRefraction);function IfcSurfaceStyleRefraction(expressID,RefractionIndex,DispersionFactor){var _this907;_classCallCheck(this,IfcSurfaceStyleRefraction);_this907=_super910.call(this,expressID);_this907.RefractionIndex=RefractionIndex;_this907.DispersionFactor=DispersionFactor;_this907.type=1607154358;return _this907;}return _createClass(IfcSurfaceStyleRefraction);}(IfcPresentationItem);IFC42.IfcSurfaceStyleRefraction=IfcSurfaceStyleRefraction;var IfcSurfaceStyleShading=/*#__PURE__*/function(_IfcPresentationItem3){_inherits(IfcSurfaceStyleShading,_IfcPresentationItem3);var _super911=_createSuper(IfcSurfaceStyleShading);function IfcSurfaceStyleShading(expressID,SurfaceColour,Transparency){var _this908;_classCallCheck(this,IfcSurfaceStyleShading);_this908=_super911.call(this,expressID);_this908.SurfaceColour=SurfaceColour;_this908.Transparency=Transparency;_this908.type=846575682;return _this908;}return _createClass(IfcSurfaceStyleShading);}(IfcPresentationItem);IFC42.IfcSurfaceStyleShading=IfcSurfaceStyleShading;var IfcSurfaceStyleWithTextures=/*#__PURE__*/function(_IfcPresentationItem4){_inherits(IfcSurfaceStyleWithTextures,_IfcPresentationItem4);var _super912=_createSuper(IfcSurfaceStyleWithTextures);function IfcSurfaceStyleWithTextures(expressID,Textures){var _this909;_classCallCheck(this,IfcSurfaceStyleWithTextures);_this909=_super912.call(this,expressID);_this909.Textures=Textures;_this909.type=1351298697;return _this909;}return _createClass(IfcSurfaceStyleWithTextures);}(IfcPresentationItem);IFC42.IfcSurfaceStyleWithTextures=IfcSurfaceStyleWithTextures;var IfcSurfaceTexture=/*#__PURE__*/function(_IfcPresentationItem5){_inherits(IfcSurfaceTexture,_IfcPresentationItem5);var _super913=_createSuper(IfcSurfaceTexture);function IfcSurfaceTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter){var _this910;_classCallCheck(this,IfcSurfaceTexture);_this910=_super913.call(this,expressID);_this910.RepeatS=RepeatS;_this910.RepeatT=RepeatT;_this910.Mode=Mode;_this910.TextureTransform=TextureTransform;_this910.Parameter=Parameter;_this910.type=626085974;return _this910;}return _createClass(IfcSurfaceTexture);}(IfcPresentationItem);IFC42.IfcSurfaceTexture=IfcSurfaceTexture;var IfcTable=/*#__PURE__*/function(_IfcLineObject153){_inherits(IfcTable,_IfcLineObject153);var _super914=_createSuper(IfcTable);function IfcTable(expressID,Name,Rows,Columns){var _this911;_classCallCheck(this,IfcTable);_this911=_super914.call(this,expressID);_this911.Name=Name;_this911.Rows=Rows;_this911.Columns=Columns;_this911.type=985171141;return _this911;}return _createClass(IfcTable);}(IfcLineObject);IFC42.IfcTable=IfcTable;var IfcTableColumn=/*#__PURE__*/function(_IfcLineObject154){_inherits(IfcTableColumn,_IfcLineObject154);var _super915=_createSuper(IfcTableColumn);function IfcTableColumn(expressID,Identifier,Name,Description,Unit,ReferencePath){var _this912;_classCallCheck(this,IfcTableColumn);_this912=_super915.call(this,expressID);_this912.Identifier=Identifier;_this912.Name=Name;_this912.Description=Description;_this912.Unit=Unit;_this912.ReferencePath=ReferencePath;_this912.type=2043862942;return _this912;}return _createClass(IfcTableColumn);}(IfcLineObject);IFC42.IfcTableColumn=IfcTableColumn;var IfcTableRow=/*#__PURE__*/function(_IfcLineObject155){_inherits(IfcTableRow,_IfcLineObject155);var _super916=_createSuper(IfcTableRow);function IfcTableRow(expressID,RowCells,IsHeading){var _this913;_classCallCheck(this,IfcTableRow);_this913=_super916.call(this,expressID);_this913.RowCells=RowCells;_this913.IsHeading=IsHeading;_this913.type=531007025;return _this913;}return _createClass(IfcTableRow);}(IfcLineObject);IFC42.IfcTableRow=IfcTableRow;var IfcTaskTime=/*#__PURE__*/function(_IfcSchedulingTime){_inherits(IfcTaskTime,_IfcSchedulingTime);var _super917=_createSuper(IfcTaskTime);function IfcTaskTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,DurationType,ScheduleDuration,ScheduleStart,ScheduleFinish,EarlyStart,EarlyFinish,LateStart,LateFinish,FreeFloat,TotalFloat,IsCritical,StatusTime,ActualDuration,ActualStart,ActualFinish,RemainingTime,Completion){var _this914;_classCallCheck(this,IfcTaskTime);_this914=_super917.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this914.Name=Name;_this914.DataOrigin=DataOrigin;_this914.UserDefinedDataOrigin=UserDefinedDataOrigin;_this914.DurationType=DurationType;_this914.ScheduleDuration=ScheduleDuration;_this914.ScheduleStart=ScheduleStart;_this914.ScheduleFinish=ScheduleFinish;_this914.EarlyStart=EarlyStart;_this914.EarlyFinish=EarlyFinish;_this914.LateStart=LateStart;_this914.LateFinish=LateFinish;_this914.FreeFloat=FreeFloat;_this914.TotalFloat=TotalFloat;_this914.IsCritical=IsCritical;_this914.StatusTime=StatusTime;_this914.ActualDuration=ActualDuration;_this914.ActualStart=ActualStart;_this914.ActualFinish=ActualFinish;_this914.RemainingTime=RemainingTime;_this914.Completion=Completion;_this914.type=1549132990;return _this914;}return _createClass(IfcTaskTime);}(IfcSchedulingTime);IFC42.IfcTaskTime=IfcTaskTime;var IfcTaskTimeRecurring=/*#__PURE__*/function(_IfcTaskTime){_inherits(IfcTaskTimeRecurring,_IfcTaskTime);var _super918=_createSuper(IfcTaskTimeRecurring);function IfcTaskTimeRecurring(expressID,Name,DataOrigin,UserDefinedDataOrigin,DurationType,ScheduleDuration,ScheduleStart,ScheduleFinish,EarlyStart,EarlyFinish,LateStart,LateFinish,FreeFloat,TotalFloat,IsCritical,StatusTime,ActualDuration,ActualStart,ActualFinish,RemainingTime,Completion,Recurrence){var _this915;_classCallCheck(this,IfcTaskTimeRecurring);_this915=_super918.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin,DurationType,ScheduleDuration,ScheduleStart,ScheduleFinish,EarlyStart,EarlyFinish,LateStart,LateFinish,FreeFloat,TotalFloat,IsCritical,StatusTime,ActualDuration,ActualStart,ActualFinish,RemainingTime,Completion);_this915.Name=Name;_this915.DataOrigin=DataOrigin;_this915.UserDefinedDataOrigin=UserDefinedDataOrigin;_this915.DurationType=DurationType;_this915.ScheduleDuration=ScheduleDuration;_this915.ScheduleStart=ScheduleStart;_this915.ScheduleFinish=ScheduleFinish;_this915.EarlyStart=EarlyStart;_this915.EarlyFinish=EarlyFinish;_this915.LateStart=LateStart;_this915.LateFinish=LateFinish;_this915.FreeFloat=FreeFloat;_this915.TotalFloat=TotalFloat;_this915.IsCritical=IsCritical;_this915.StatusTime=StatusTime;_this915.ActualDuration=ActualDuration;_this915.ActualStart=ActualStart;_this915.ActualFinish=ActualFinish;_this915.RemainingTime=RemainingTime;_this915.Completion=Completion;_this915.Recurrence=Recurrence;_this915.type=2771591690;return _this915;}return _createClass(IfcTaskTimeRecurring);}(IfcTaskTime);IFC42.IfcTaskTimeRecurring=IfcTaskTimeRecurring;var IfcTelecomAddress=/*#__PURE__*/function(_IfcAddress4){_inherits(IfcTelecomAddress,_IfcAddress4);var _super919=_createSuper(IfcTelecomAddress);function IfcTelecomAddress(expressID,Purpose,Description,UserDefinedPurpose,TelephoneNumbers,FacsimileNumbers,PagerNumber,ElectronicMailAddresses,WWWHomePageURL,MessagingIDs){var _this916;_classCallCheck(this,IfcTelecomAddress);_this916=_super919.call(this,expressID,Purpose,Description,UserDefinedPurpose);_this916.Purpose=Purpose;_this916.Description=Description;_this916.UserDefinedPurpose=UserDefinedPurpose;_this916.TelephoneNumbers=TelephoneNumbers;_this916.FacsimileNumbers=FacsimileNumbers;_this916.PagerNumber=PagerNumber;_this916.ElectronicMailAddresses=ElectronicMailAddresses;_this916.WWWHomePageURL=WWWHomePageURL;_this916.MessagingIDs=MessagingIDs;_this916.type=912023232;return _this916;}return _createClass(IfcTelecomAddress);}(IfcAddress);IFC42.IfcTelecomAddress=IfcTelecomAddress;var IfcTextStyle=/*#__PURE__*/function(_IfcPresentationStyle7){_inherits(IfcTextStyle,_IfcPresentationStyle7);var _super920=_createSuper(IfcTextStyle);function IfcTextStyle(expressID,Name,TextCharacterAppearance,TextStyle,TextFontStyle,ModelOrDraughting){var _this917;_classCallCheck(this,IfcTextStyle);_this917=_super920.call(this,expressID,Name);_this917.Name=Name;_this917.TextCharacterAppearance=TextCharacterAppearance;_this917.TextStyle=TextStyle;_this917.TextFontStyle=TextFontStyle;_this917.ModelOrDraughting=ModelOrDraughting;_this917.type=1447204868;return _this917;}return _createClass(IfcTextStyle);}(IfcPresentationStyle);IFC42.IfcTextStyle=IfcTextStyle;var IfcTextStyleForDefinedFont=/*#__PURE__*/function(_IfcPresentationItem6){_inherits(IfcTextStyleForDefinedFont,_IfcPresentationItem6);var _super921=_createSuper(IfcTextStyleForDefinedFont);function IfcTextStyleForDefinedFont(expressID,Colour,BackgroundColour){var _this918;_classCallCheck(this,IfcTextStyleForDefinedFont);_this918=_super921.call(this,expressID);_this918.Colour=Colour;_this918.BackgroundColour=BackgroundColour;_this918.type=2636378356;return _this918;}return _createClass(IfcTextStyleForDefinedFont);}(IfcPresentationItem);IFC42.IfcTextStyleForDefinedFont=IfcTextStyleForDefinedFont;var IfcTextStyleTextModel=/*#__PURE__*/function(_IfcPresentationItem7){_inherits(IfcTextStyleTextModel,_IfcPresentationItem7);var _super922=_createSuper(IfcTextStyleTextModel);function IfcTextStyleTextModel(expressID,TextIndent,TextAlign,TextDecoration,LetterSpacing,WordSpacing,TextTransform,LineHeight){var _this919;_classCallCheck(this,IfcTextStyleTextModel);_this919=_super922.call(this,expressID);_this919.TextIndent=TextIndent;_this919.TextAlign=TextAlign;_this919.TextDecoration=TextDecoration;_this919.LetterSpacing=LetterSpacing;_this919.WordSpacing=WordSpacing;_this919.TextTransform=TextTransform;_this919.LineHeight=LineHeight;_this919.type=1640371178;return _this919;}return _createClass(IfcTextStyleTextModel);}(IfcPresentationItem);IFC42.IfcTextStyleTextModel=IfcTextStyleTextModel;var IfcTextureCoordinate=/*#__PURE__*/function(_IfcPresentationItem8){_inherits(IfcTextureCoordinate,_IfcPresentationItem8);var _super923=_createSuper(IfcTextureCoordinate);function IfcTextureCoordinate(expressID,Maps){var _this920;_classCallCheck(this,IfcTextureCoordinate);_this920=_super923.call(this,expressID);_this920.Maps=Maps;_this920.type=280115917;return _this920;}return _createClass(IfcTextureCoordinate);}(IfcPresentationItem);IFC42.IfcTextureCoordinate=IfcTextureCoordinate;var IfcTextureCoordinateGenerator=/*#__PURE__*/function(_IfcTextureCoordinate3){_inherits(IfcTextureCoordinateGenerator,_IfcTextureCoordinate3);var _super924=_createSuper(IfcTextureCoordinateGenerator);function IfcTextureCoordinateGenerator(expressID,Maps,Mode,Parameter){var _this921;_classCallCheck(this,IfcTextureCoordinateGenerator);_this921=_super924.call(this,expressID,Maps);_this921.Maps=Maps;_this921.Mode=Mode;_this921.Parameter=Parameter;_this921.type=1742049831;return _this921;}return _createClass(IfcTextureCoordinateGenerator);}(IfcTextureCoordinate);IFC42.IfcTextureCoordinateGenerator=IfcTextureCoordinateGenerator;var IfcTextureMap=/*#__PURE__*/function(_IfcTextureCoordinate4){_inherits(IfcTextureMap,_IfcTextureCoordinate4);var _super925=_createSuper(IfcTextureMap);function IfcTextureMap(expressID,Maps,Vertices,MappedTo){var _this922;_classCallCheck(this,IfcTextureMap);_this922=_super925.call(this,expressID,Maps);_this922.Maps=Maps;_this922.Vertices=Vertices;_this922.MappedTo=MappedTo;_this922.type=2552916305;return _this922;}return _createClass(IfcTextureMap);}(IfcTextureCoordinate);IFC42.IfcTextureMap=IfcTextureMap;var IfcTextureVertex=/*#__PURE__*/function(_IfcPresentationItem9){_inherits(IfcTextureVertex,_IfcPresentationItem9);var _super926=_createSuper(IfcTextureVertex);function IfcTextureVertex(expressID,Coordinates){var _this923;_classCallCheck(this,IfcTextureVertex);_this923=_super926.call(this,expressID);_this923.Coordinates=Coordinates;_this923.type=1210645708;return _this923;}return _createClass(IfcTextureVertex);}(IfcPresentationItem);IFC42.IfcTextureVertex=IfcTextureVertex;var IfcTextureVertexList=/*#__PURE__*/function(_IfcPresentationItem10){_inherits(IfcTextureVertexList,_IfcPresentationItem10);var _super927=_createSuper(IfcTextureVertexList);function IfcTextureVertexList(expressID,TexCoordsList){var _this924;_classCallCheck(this,IfcTextureVertexList);_this924=_super927.call(this,expressID);_this924.TexCoordsList=TexCoordsList;_this924.type=3611470254;return _this924;}return _createClass(IfcTextureVertexList);}(IfcPresentationItem);IFC42.IfcTextureVertexList=IfcTextureVertexList;var IfcTimePeriod=/*#__PURE__*/function(_IfcLineObject156){_inherits(IfcTimePeriod,_IfcLineObject156);var _super928=_createSuper(IfcTimePeriod);function IfcTimePeriod(expressID,StartTime,EndTime){var _this925;_classCallCheck(this,IfcTimePeriod);_this925=_super928.call(this,expressID);_this925.StartTime=StartTime;_this925.EndTime=EndTime;_this925.type=1199560280;return _this925;}return _createClass(IfcTimePeriod);}(IfcLineObject);IFC42.IfcTimePeriod=IfcTimePeriod;var IfcTimeSeries=/*#__PURE__*/function(_IfcLineObject157){_inherits(IfcTimeSeries,_IfcLineObject157);var _super929=_createSuper(IfcTimeSeries);function IfcTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit){var _this926;_classCallCheck(this,IfcTimeSeries);_this926=_super929.call(this,expressID);_this926.Name=Name;_this926.Description=Description;_this926.StartTime=StartTime;_this926.EndTime=EndTime;_this926.TimeSeriesDataType=TimeSeriesDataType;_this926.DataOrigin=DataOrigin;_this926.UserDefinedDataOrigin=UserDefinedDataOrigin;_this926.Unit=Unit;_this926.type=3101149627;return _this926;}return _createClass(IfcTimeSeries);}(IfcLineObject);IFC42.IfcTimeSeries=IfcTimeSeries;var IfcTimeSeriesValue=/*#__PURE__*/function(_IfcLineObject158){_inherits(IfcTimeSeriesValue,_IfcLineObject158);var _super930=_createSuper(IfcTimeSeriesValue);function IfcTimeSeriesValue(expressID,ListValues){var _this927;_classCallCheck(this,IfcTimeSeriesValue);_this927=_super930.call(this,expressID);_this927.ListValues=ListValues;_this927.type=581633288;return _this927;}return _createClass(IfcTimeSeriesValue);}(IfcLineObject);IFC42.IfcTimeSeriesValue=IfcTimeSeriesValue;var IfcTopologicalRepresentationItem=/*#__PURE__*/function(_IfcRepresentationIte6){_inherits(IfcTopologicalRepresentationItem,_IfcRepresentationIte6);var _super931=_createSuper(IfcTopologicalRepresentationItem);function IfcTopologicalRepresentationItem(expressID){var _this928;_classCallCheck(this,IfcTopologicalRepresentationItem);_this928=_super931.call(this,expressID);_this928.type=1377556343;return _this928;}return _createClass(IfcTopologicalRepresentationItem);}(IfcRepresentationItem);IFC42.IfcTopologicalRepresentationItem=IfcTopologicalRepresentationItem;var IfcTopologyRepresentation=/*#__PURE__*/function(_IfcShapeModel4){_inherits(IfcTopologyRepresentation,_IfcShapeModel4);var _super932=_createSuper(IfcTopologyRepresentation);function IfcTopologyRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this929;_classCallCheck(this,IfcTopologyRepresentation);_this929=_super932.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this929.ContextOfItems=ContextOfItems;_this929.RepresentationIdentifier=RepresentationIdentifier;_this929.RepresentationType=RepresentationType;_this929.Items=Items;_this929.type=1735638870;return _this929;}return _createClass(IfcTopologyRepresentation);}(IfcShapeModel);IFC42.IfcTopologyRepresentation=IfcTopologyRepresentation;var IfcUnitAssignment=/*#__PURE__*/function(_IfcLineObject159){_inherits(IfcUnitAssignment,_IfcLineObject159);var _super933=_createSuper(IfcUnitAssignment);function IfcUnitAssignment(expressID,Units){var _this930;_classCallCheck(this,IfcUnitAssignment);_this930=_super933.call(this,expressID);_this930.Units=Units;_this930.type=180925521;return _this930;}return _createClass(IfcUnitAssignment);}(IfcLineObject);IFC42.IfcUnitAssignment=IfcUnitAssignment;var IfcVertex=/*#__PURE__*/function(_IfcTopologicalRepres8){_inherits(IfcVertex,_IfcTopologicalRepres8);var _super934=_createSuper(IfcVertex);function IfcVertex(expressID){var _this931;_classCallCheck(this,IfcVertex);_this931=_super934.call(this,expressID);_this931.type=2799835756;return _this931;}return _createClass(IfcVertex);}(IfcTopologicalRepresentationItem);IFC42.IfcVertex=IfcVertex;var IfcVertexPoint=/*#__PURE__*/function(_IfcVertex2){_inherits(IfcVertexPoint,_IfcVertex2);var _super935=_createSuper(IfcVertexPoint);function IfcVertexPoint(expressID,VertexGeometry){var _this932;_classCallCheck(this,IfcVertexPoint);_this932=_super935.call(this,expressID);_this932.VertexGeometry=VertexGeometry;_this932.type=1907098498;return _this932;}return _createClass(IfcVertexPoint);}(IfcVertex);IFC42.IfcVertexPoint=IfcVertexPoint;var IfcVirtualGridIntersection=/*#__PURE__*/function(_IfcLineObject160){_inherits(IfcVirtualGridIntersection,_IfcLineObject160);var _super936=_createSuper(IfcVirtualGridIntersection);function IfcVirtualGridIntersection(expressID,IntersectingAxes,OffsetDistances){var _this933;_classCallCheck(this,IfcVirtualGridIntersection);_this933=_super936.call(this,expressID);_this933.IntersectingAxes=IntersectingAxes;_this933.OffsetDistances=OffsetDistances;_this933.type=891718957;return _this933;}return _createClass(IfcVirtualGridIntersection);}(IfcLineObject);IFC42.IfcVirtualGridIntersection=IfcVirtualGridIntersection;var IfcWorkTime=/*#__PURE__*/function(_IfcSchedulingTime2){_inherits(IfcWorkTime,_IfcSchedulingTime2);var _super937=_createSuper(IfcWorkTime);function IfcWorkTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,RecurrencePattern,Start,Finish){var _this934;_classCallCheck(this,IfcWorkTime);_this934=_super937.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this934.Name=Name;_this934.DataOrigin=DataOrigin;_this934.UserDefinedDataOrigin=UserDefinedDataOrigin;_this934.RecurrencePattern=RecurrencePattern;_this934.Start=Start;_this934.Finish=Finish;_this934.type=1236880293;return _this934;}return _createClass(IfcWorkTime);}(IfcSchedulingTime);IFC42.IfcWorkTime=IfcWorkTime;var IfcApprovalRelationship=/*#__PURE__*/function(_IfcResourceLevelRela){_inherits(IfcApprovalRelationship,_IfcResourceLevelRela);var _super938=_createSuper(IfcApprovalRelationship);function IfcApprovalRelationship(expressID,Name,Description,RelatingApproval,RelatedApprovals){var _this935;_classCallCheck(this,IfcApprovalRelationship);_this935=_super938.call(this,expressID,Name,Description);_this935.Name=Name;_this935.Description=Description;_this935.RelatingApproval=RelatingApproval;_this935.RelatedApprovals=RelatedApprovals;_this935.type=3869604511;return _this935;}return _createClass(IfcApprovalRelationship);}(IfcResourceLevelRelationship);IFC42.IfcApprovalRelationship=IfcApprovalRelationship;var IfcArbitraryClosedProfileDef=/*#__PURE__*/function(_IfcProfileDef6){_inherits(IfcArbitraryClosedProfileDef,_IfcProfileDef6);var _super939=_createSuper(IfcArbitraryClosedProfileDef);function IfcArbitraryClosedProfileDef(expressID,ProfileType,ProfileName,OuterCurve){var _this936;_classCallCheck(this,IfcArbitraryClosedProfileDef);_this936=_super939.call(this,expressID,ProfileType,ProfileName);_this936.ProfileType=ProfileType;_this936.ProfileName=ProfileName;_this936.OuterCurve=OuterCurve;_this936.type=3798115385;return _this936;}return _createClass(IfcArbitraryClosedProfileDef);}(IfcProfileDef);IFC42.IfcArbitraryClosedProfileDef=IfcArbitraryClosedProfileDef;var IfcArbitraryOpenProfileDef=/*#__PURE__*/function(_IfcProfileDef7){_inherits(IfcArbitraryOpenProfileDef,_IfcProfileDef7);var _super940=_createSuper(IfcArbitraryOpenProfileDef);function IfcArbitraryOpenProfileDef(expressID,ProfileType,ProfileName,Curve){var _this937;_classCallCheck(this,IfcArbitraryOpenProfileDef);_this937=_super940.call(this,expressID,ProfileType,ProfileName);_this937.ProfileType=ProfileType;_this937.ProfileName=ProfileName;_this937.Curve=Curve;_this937.type=1310608509;return _this937;}return _createClass(IfcArbitraryOpenProfileDef);}(IfcProfileDef);IFC42.IfcArbitraryOpenProfileDef=IfcArbitraryOpenProfileDef;var IfcArbitraryProfileDefWithVoids=/*#__PURE__*/function(_IfcArbitraryClosedPr2){_inherits(IfcArbitraryProfileDefWithVoids,_IfcArbitraryClosedPr2);var _super941=_createSuper(IfcArbitraryProfileDefWithVoids);function IfcArbitraryProfileDefWithVoids(expressID,ProfileType,ProfileName,OuterCurve,InnerCurves){var _this938;_classCallCheck(this,IfcArbitraryProfileDefWithVoids);_this938=_super941.call(this,expressID,ProfileType,ProfileName,OuterCurve);_this938.ProfileType=ProfileType;_this938.ProfileName=ProfileName;_this938.OuterCurve=OuterCurve;_this938.InnerCurves=InnerCurves;_this938.type=2705031697;return _this938;}return _createClass(IfcArbitraryProfileDefWithVoids);}(IfcArbitraryClosedProfileDef);IFC42.IfcArbitraryProfileDefWithVoids=IfcArbitraryProfileDefWithVoids;var IfcBlobTexture=/*#__PURE__*/function(_IfcSurfaceTexture4){_inherits(IfcBlobTexture,_IfcSurfaceTexture4);var _super942=_createSuper(IfcBlobTexture);function IfcBlobTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter,RasterFormat,RasterCode){var _this939;_classCallCheck(this,IfcBlobTexture);_this939=_super942.call(this,expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter);_this939.RepeatS=RepeatS;_this939.RepeatT=RepeatT;_this939.Mode=Mode;_this939.TextureTransform=TextureTransform;_this939.Parameter=Parameter;_this939.RasterFormat=RasterFormat;_this939.RasterCode=RasterCode;_this939.type=616511568;return _this939;}return _createClass(IfcBlobTexture);}(IfcSurfaceTexture);IFC42.IfcBlobTexture=IfcBlobTexture;var IfcCenterLineProfileDef=/*#__PURE__*/function(_IfcArbitraryOpenProf2){_inherits(IfcCenterLineProfileDef,_IfcArbitraryOpenProf2);var _super943=_createSuper(IfcCenterLineProfileDef);function IfcCenterLineProfileDef(expressID,ProfileType,ProfileName,Curve,Thickness){var _this940;_classCallCheck(this,IfcCenterLineProfileDef);_this940=_super943.call(this,expressID,ProfileType,ProfileName,Curve);_this940.ProfileType=ProfileType;_this940.ProfileName=ProfileName;_this940.Curve=Curve;_this940.Thickness=Thickness;_this940.type=3150382593;return _this940;}return _createClass(IfcCenterLineProfileDef);}(IfcArbitraryOpenProfileDef);IFC42.IfcCenterLineProfileDef=IfcCenterLineProfileDef;var IfcClassification=/*#__PURE__*/function(_IfcExternalInformati2){_inherits(IfcClassification,_IfcExternalInformati2);var _super944=_createSuper(IfcClassification);function IfcClassification(expressID,Source,Edition,EditionDate,Name,Description,Location,ReferenceTokens){var _this941;_classCallCheck(this,IfcClassification);_this941=_super944.call(this,expressID);_this941.Source=Source;_this941.Edition=Edition;_this941.EditionDate=EditionDate;_this941.Name=Name;_this941.Description=Description;_this941.Location=Location;_this941.ReferenceTokens=ReferenceTokens;_this941.type=747523909;return _this941;}return _createClass(IfcClassification);}(IfcExternalInformation);IFC42.IfcClassification=IfcClassification;var IfcClassificationReference=/*#__PURE__*/function(_IfcExternalReference12){_inherits(IfcClassificationReference,_IfcExternalReference12);var _super945=_createSuper(IfcClassificationReference);function IfcClassificationReference(expressID,Location,Identification,Name,ReferencedSource,Description,Sort){var _this942;_classCallCheck(this,IfcClassificationReference);_this942=_super945.call(this,expressID,Location,Identification,Name);_this942.Location=Location;_this942.Identification=Identification;_this942.Name=Name;_this942.ReferencedSource=ReferencedSource;_this942.Description=Description;_this942.Sort=Sort;_this942.type=647927063;return _this942;}return _createClass(IfcClassificationReference);}(IfcExternalReference);IFC42.IfcClassificationReference=IfcClassificationReference;var IfcColourRgbList=/*#__PURE__*/function(_IfcPresentationItem11){_inherits(IfcColourRgbList,_IfcPresentationItem11);var _super946=_createSuper(IfcColourRgbList);function IfcColourRgbList(expressID,ColourList){var _this943;_classCallCheck(this,IfcColourRgbList);_this943=_super946.call(this,expressID);_this943.ColourList=ColourList;_this943.type=3285139300;return _this943;}return _createClass(IfcColourRgbList);}(IfcPresentationItem);IFC42.IfcColourRgbList=IfcColourRgbList;var IfcColourSpecification=/*#__PURE__*/function(_IfcPresentationItem12){_inherits(IfcColourSpecification,_IfcPresentationItem12);var _super947=_createSuper(IfcColourSpecification);function IfcColourSpecification(expressID,Name){var _this944;_classCallCheck(this,IfcColourSpecification);_this944=_super947.call(this,expressID);_this944.Name=Name;_this944.type=3264961684;return _this944;}return _createClass(IfcColourSpecification);}(IfcPresentationItem);IFC42.IfcColourSpecification=IfcColourSpecification;var IfcCompositeProfileDef=/*#__PURE__*/function(_IfcProfileDef8){_inherits(IfcCompositeProfileDef,_IfcProfileDef8);var _super948=_createSuper(IfcCompositeProfileDef);function IfcCompositeProfileDef(expressID,ProfileType,ProfileName,Profiles,Label){var _this945;_classCallCheck(this,IfcCompositeProfileDef);_this945=_super948.call(this,expressID,ProfileType,ProfileName);_this945.ProfileType=ProfileType;_this945.ProfileName=ProfileName;_this945.Profiles=Profiles;_this945.Label=Label;_this945.type=1485152156;return _this945;}return _createClass(IfcCompositeProfileDef);}(IfcProfileDef);IFC42.IfcCompositeProfileDef=IfcCompositeProfileDef;var IfcConnectedFaceSet=/*#__PURE__*/function(_IfcTopologicalRepres9){_inherits(IfcConnectedFaceSet,_IfcTopologicalRepres9);var _super949=_createSuper(IfcConnectedFaceSet);function IfcConnectedFaceSet(expressID,CfsFaces){var _this946;_classCallCheck(this,IfcConnectedFaceSet);_this946=_super949.call(this,expressID);_this946.CfsFaces=CfsFaces;_this946.type=370225590;return _this946;}return _createClass(IfcConnectedFaceSet);}(IfcTopologicalRepresentationItem);IFC42.IfcConnectedFaceSet=IfcConnectedFaceSet;var IfcConnectionCurveGeometry=/*#__PURE__*/function(_IfcConnectionGeometr8){_inherits(IfcConnectionCurveGeometry,_IfcConnectionGeometr8);var _super950=_createSuper(IfcConnectionCurveGeometry);function IfcConnectionCurveGeometry(expressID,CurveOnRelatingElement,CurveOnRelatedElement){var _this947;_classCallCheck(this,IfcConnectionCurveGeometry);_this947=_super950.call(this,expressID);_this947.CurveOnRelatingElement=CurveOnRelatingElement;_this947.CurveOnRelatedElement=CurveOnRelatedElement;_this947.type=1981873012;return _this947;}return _createClass(IfcConnectionCurveGeometry);}(IfcConnectionGeometry);IFC42.IfcConnectionCurveGeometry=IfcConnectionCurveGeometry;var IfcConnectionPointEccentricity=/*#__PURE__*/function(_IfcConnectionPointGe2){_inherits(IfcConnectionPointEccentricity,_IfcConnectionPointGe2);var _super951=_createSuper(IfcConnectionPointEccentricity);function IfcConnectionPointEccentricity(expressID,PointOnRelatingElement,PointOnRelatedElement,EccentricityInX,EccentricityInY,EccentricityInZ){var _this948;_classCallCheck(this,IfcConnectionPointEccentricity);_this948=_super951.call(this,expressID,PointOnRelatingElement,PointOnRelatedElement);_this948.PointOnRelatingElement=PointOnRelatingElement;_this948.PointOnRelatedElement=PointOnRelatedElement;_this948.EccentricityInX=EccentricityInX;_this948.EccentricityInY=EccentricityInY;_this948.EccentricityInZ=EccentricityInZ;_this948.type=45288368;return _this948;}return _createClass(IfcConnectionPointEccentricity);}(IfcConnectionPointGeometry);IFC42.IfcConnectionPointEccentricity=IfcConnectionPointEccentricity;var IfcContextDependentUnit=/*#__PURE__*/function(_IfcNamedUnit5){_inherits(IfcContextDependentUnit,_IfcNamedUnit5);var _super952=_createSuper(IfcContextDependentUnit);function IfcContextDependentUnit(expressID,Dimensions,UnitType,Name){var _this949;_classCallCheck(this,IfcContextDependentUnit);_this949=_super952.call(this,expressID,Dimensions,UnitType);_this949.Dimensions=Dimensions;_this949.UnitType=UnitType;_this949.Name=Name;_this949.type=3050246964;return _this949;}return _createClass(IfcContextDependentUnit);}(IfcNamedUnit);IFC42.IfcContextDependentUnit=IfcContextDependentUnit;var IfcConversionBasedUnit=/*#__PURE__*/function(_IfcNamedUnit6){_inherits(IfcConversionBasedUnit,_IfcNamedUnit6);var _super953=_createSuper(IfcConversionBasedUnit);function IfcConversionBasedUnit(expressID,Dimensions,UnitType,Name,ConversionFactor){var _this950;_classCallCheck(this,IfcConversionBasedUnit);_this950=_super953.call(this,expressID,Dimensions,UnitType);_this950.Dimensions=Dimensions;_this950.UnitType=UnitType;_this950.Name=Name;_this950.ConversionFactor=ConversionFactor;_this950.type=2889183280;return _this950;}return _createClass(IfcConversionBasedUnit);}(IfcNamedUnit);IFC42.IfcConversionBasedUnit=IfcConversionBasedUnit;var IfcConversionBasedUnitWithOffset=/*#__PURE__*/function(_IfcConversionBasedUn){_inherits(IfcConversionBasedUnitWithOffset,_IfcConversionBasedUn);var _super954=_createSuper(IfcConversionBasedUnitWithOffset);function IfcConversionBasedUnitWithOffset(expressID,Dimensions,UnitType,Name,ConversionFactor,ConversionOffset){var _this951;_classCallCheck(this,IfcConversionBasedUnitWithOffset);_this951=_super954.call(this,expressID,Dimensions,UnitType,Name,ConversionFactor);_this951.Dimensions=Dimensions;_this951.UnitType=UnitType;_this951.Name=Name;_this951.ConversionFactor=ConversionFactor;_this951.ConversionOffset=ConversionOffset;_this951.type=2713554722;return _this951;}return _createClass(IfcConversionBasedUnitWithOffset);}(IfcConversionBasedUnit);IFC42.IfcConversionBasedUnitWithOffset=IfcConversionBasedUnitWithOffset;var IfcCurrencyRelationship=/*#__PURE__*/function(_IfcResourceLevelRela2){_inherits(IfcCurrencyRelationship,_IfcResourceLevelRela2);var _super955=_createSuper(IfcCurrencyRelationship);function IfcCurrencyRelationship(expressID,Name,Description,RelatingMonetaryUnit,RelatedMonetaryUnit,ExchangeRate,RateDateTime,RateSource){var _this952;_classCallCheck(this,IfcCurrencyRelationship);_this952=_super955.call(this,expressID,Name,Description);_this952.Name=Name;_this952.Description=Description;_this952.RelatingMonetaryUnit=RelatingMonetaryUnit;_this952.RelatedMonetaryUnit=RelatedMonetaryUnit;_this952.ExchangeRate=ExchangeRate;_this952.RateDateTime=RateDateTime;_this952.RateSource=RateSource;_this952.type=539742890;return _this952;}return _createClass(IfcCurrencyRelationship);}(IfcResourceLevelRelationship);IFC42.IfcCurrencyRelationship=IfcCurrencyRelationship;var IfcCurveStyle=/*#__PURE__*/function(_IfcPresentationStyle8){_inherits(IfcCurveStyle,_IfcPresentationStyle8);var _super956=_createSuper(IfcCurveStyle);function IfcCurveStyle(expressID,Name,CurveFont,CurveWidth,CurveColour,ModelOrDraughting){var _this953;_classCallCheck(this,IfcCurveStyle);_this953=_super956.call(this,expressID,Name);_this953.Name=Name;_this953.CurveFont=CurveFont;_this953.CurveWidth=CurveWidth;_this953.CurveColour=CurveColour;_this953.ModelOrDraughting=ModelOrDraughting;_this953.type=3800577675;return _this953;}return _createClass(IfcCurveStyle);}(IfcPresentationStyle);IFC42.IfcCurveStyle=IfcCurveStyle;var IfcCurveStyleFont=/*#__PURE__*/function(_IfcPresentationItem13){_inherits(IfcCurveStyleFont,_IfcPresentationItem13);var _super957=_createSuper(IfcCurveStyleFont);function IfcCurveStyleFont(expressID,Name,PatternList){var _this954;_classCallCheck(this,IfcCurveStyleFont);_this954=_super957.call(this,expressID);_this954.Name=Name;_this954.PatternList=PatternList;_this954.type=1105321065;return _this954;}return _createClass(IfcCurveStyleFont);}(IfcPresentationItem);IFC42.IfcCurveStyleFont=IfcCurveStyleFont;var IfcCurveStyleFontAndScaling=/*#__PURE__*/function(_IfcPresentationItem14){_inherits(IfcCurveStyleFontAndScaling,_IfcPresentationItem14);var _super958=_createSuper(IfcCurveStyleFontAndScaling);function IfcCurveStyleFontAndScaling(expressID,Name,CurveFont,CurveFontScaling){var _this955;_classCallCheck(this,IfcCurveStyleFontAndScaling);_this955=_super958.call(this,expressID);_this955.Name=Name;_this955.CurveFont=CurveFont;_this955.CurveFontScaling=CurveFontScaling;_this955.type=2367409068;return _this955;}return _createClass(IfcCurveStyleFontAndScaling);}(IfcPresentationItem);IFC42.IfcCurveStyleFontAndScaling=IfcCurveStyleFontAndScaling;var IfcCurveStyleFontPattern=/*#__PURE__*/function(_IfcPresentationItem15){_inherits(IfcCurveStyleFontPattern,_IfcPresentationItem15);var _super959=_createSuper(IfcCurveStyleFontPattern);function IfcCurveStyleFontPattern(expressID,VisibleSegmentLength,InvisibleSegmentLength){var _this956;_classCallCheck(this,IfcCurveStyleFontPattern);_this956=_super959.call(this,expressID);_this956.VisibleSegmentLength=VisibleSegmentLength;_this956.InvisibleSegmentLength=InvisibleSegmentLength;_this956.type=3510044353;return _this956;}return _createClass(IfcCurveStyleFontPattern);}(IfcPresentationItem);IFC42.IfcCurveStyleFontPattern=IfcCurveStyleFontPattern;var IfcDerivedProfileDef=/*#__PURE__*/function(_IfcProfileDef9){_inherits(IfcDerivedProfileDef,_IfcProfileDef9);var _super960=_createSuper(IfcDerivedProfileDef);function IfcDerivedProfileDef(expressID,ProfileType,ProfileName,ParentProfile,Operator,Label){var _this957;_classCallCheck(this,IfcDerivedProfileDef);_this957=_super960.call(this,expressID,ProfileType,ProfileName);_this957.ProfileType=ProfileType;_this957.ProfileName=ProfileName;_this957.ParentProfile=ParentProfile;_this957.Operator=Operator;_this957.Label=Label;_this957.type=3632507154;return _this957;}return _createClass(IfcDerivedProfileDef);}(IfcProfileDef);IFC42.IfcDerivedProfileDef=IfcDerivedProfileDef;var IfcDocumentInformation=/*#__PURE__*/function(_IfcExternalInformati3){_inherits(IfcDocumentInformation,_IfcExternalInformati3);var _super961=_createSuper(IfcDocumentInformation);function IfcDocumentInformation(expressID,Identification,Name,Description,Location,Purpose,IntendedUse,Scope,Revision,DocumentOwner,Editors,CreationTime,LastRevisionTime,ElectronicFormat,ValidFrom,ValidUntil,Confidentiality,Status){var _this958;_classCallCheck(this,IfcDocumentInformation);_this958=_super961.call(this,expressID);_this958.Identification=Identification;_this958.Name=Name;_this958.Description=Description;_this958.Location=Location;_this958.Purpose=Purpose;_this958.IntendedUse=IntendedUse;_this958.Scope=Scope;_this958.Revision=Revision;_this958.DocumentOwner=DocumentOwner;_this958.Editors=Editors;_this958.CreationTime=CreationTime;_this958.LastRevisionTime=LastRevisionTime;_this958.ElectronicFormat=ElectronicFormat;_this958.ValidFrom=ValidFrom;_this958.ValidUntil=ValidUntil;_this958.Confidentiality=Confidentiality;_this958.Status=Status;_this958.type=1154170062;return _this958;}return _createClass(IfcDocumentInformation);}(IfcExternalInformation);IFC42.IfcDocumentInformation=IfcDocumentInformation;var IfcDocumentInformationRelationship=/*#__PURE__*/function(_IfcResourceLevelRela3){_inherits(IfcDocumentInformationRelationship,_IfcResourceLevelRela3);var _super962=_createSuper(IfcDocumentInformationRelationship);function IfcDocumentInformationRelationship(expressID,Name,Description,RelatingDocument,RelatedDocuments,RelationshipType){var _this959;_classCallCheck(this,IfcDocumentInformationRelationship);_this959=_super962.call(this,expressID,Name,Description);_this959.Name=Name;_this959.Description=Description;_this959.RelatingDocument=RelatingDocument;_this959.RelatedDocuments=RelatedDocuments;_this959.RelationshipType=RelationshipType;_this959.type=770865208;return _this959;}return _createClass(IfcDocumentInformationRelationship);}(IfcResourceLevelRelationship);IFC42.IfcDocumentInformationRelationship=IfcDocumentInformationRelationship;var IfcDocumentReference=/*#__PURE__*/function(_IfcExternalReference13){_inherits(IfcDocumentReference,_IfcExternalReference13);var _super963=_createSuper(IfcDocumentReference);function IfcDocumentReference(expressID,Location,Identification,Name,Description,ReferencedDocument){var _this960;_classCallCheck(this,IfcDocumentReference);_this960=_super963.call(this,expressID,Location,Identification,Name);_this960.Location=Location;_this960.Identification=Identification;_this960.Name=Name;_this960.Description=Description;_this960.ReferencedDocument=ReferencedDocument;_this960.type=3732053477;return _this960;}return _createClass(IfcDocumentReference);}(IfcExternalReference);IFC42.IfcDocumentReference=IfcDocumentReference;var IfcEdge=/*#__PURE__*/function(_IfcTopologicalRepres10){_inherits(IfcEdge,_IfcTopologicalRepres10);var _super964=_createSuper(IfcEdge);function IfcEdge(expressID,EdgeStart,EdgeEnd){var _this961;_classCallCheck(this,IfcEdge);_this961=_super964.call(this,expressID);_this961.EdgeStart=EdgeStart;_this961.EdgeEnd=EdgeEnd;_this961.type=3900360178;return _this961;}return _createClass(IfcEdge);}(IfcTopologicalRepresentationItem);IFC42.IfcEdge=IfcEdge;var IfcEdgeCurve=/*#__PURE__*/function(_IfcEdge4){_inherits(IfcEdgeCurve,_IfcEdge4);var _super965=_createSuper(IfcEdgeCurve);function IfcEdgeCurve(expressID,EdgeStart,EdgeEnd,EdgeGeometry,SameSense){var _this962;_classCallCheck(this,IfcEdgeCurve);_this962=_super965.call(this,expressID,EdgeStart,EdgeEnd);_this962.EdgeStart=EdgeStart;_this962.EdgeEnd=EdgeEnd;_this962.EdgeGeometry=EdgeGeometry;_this962.SameSense=SameSense;_this962.type=476780140;return _this962;}return _createClass(IfcEdgeCurve);}(IfcEdge);IFC42.IfcEdgeCurve=IfcEdgeCurve;var IfcEventTime=/*#__PURE__*/function(_IfcSchedulingTime3){_inherits(IfcEventTime,_IfcSchedulingTime3);var _super966=_createSuper(IfcEventTime);function IfcEventTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,ActualDate,EarlyDate,LateDate,ScheduleDate){var _this963;_classCallCheck(this,IfcEventTime);_this963=_super966.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this963.Name=Name;_this963.DataOrigin=DataOrigin;_this963.UserDefinedDataOrigin=UserDefinedDataOrigin;_this963.ActualDate=ActualDate;_this963.EarlyDate=EarlyDate;_this963.LateDate=LateDate;_this963.ScheduleDate=ScheduleDate;_this963.type=211053100;return _this963;}return _createClass(IfcEventTime);}(IfcSchedulingTime);IFC42.IfcEventTime=IfcEventTime;var IfcExtendedProperties=/*#__PURE__*/function(_IfcPropertyAbstracti2){_inherits(IfcExtendedProperties,_IfcPropertyAbstracti2);var _super967=_createSuper(IfcExtendedProperties);function IfcExtendedProperties(expressID,Name,Description,Properties2){var _this964;_classCallCheck(this,IfcExtendedProperties);_this964=_super967.call(this,expressID);_this964.Name=Name;_this964.Description=Description;_this964.Properties=Properties2;_this964.type=297599258;return _this964;}return _createClass(IfcExtendedProperties);}(IfcPropertyAbstraction);IFC42.IfcExtendedProperties=IfcExtendedProperties;var IfcExternalReferenceRelationship=/*#__PURE__*/function(_IfcResourceLevelRela4){_inherits(IfcExternalReferenceRelationship,_IfcResourceLevelRela4);var _super968=_createSuper(IfcExternalReferenceRelationship);function IfcExternalReferenceRelationship(expressID,Name,Description,RelatingReference,RelatedResourceObjects){var _this965;_classCallCheck(this,IfcExternalReferenceRelationship);_this965=_super968.call(this,expressID,Name,Description);_this965.Name=Name;_this965.Description=Description;_this965.RelatingReference=RelatingReference;_this965.RelatedResourceObjects=RelatedResourceObjects;_this965.type=1437805879;return _this965;}return _createClass(IfcExternalReferenceRelationship);}(IfcResourceLevelRelationship);IFC42.IfcExternalReferenceRelationship=IfcExternalReferenceRelationship;var IfcFace=/*#__PURE__*/function(_IfcTopologicalRepres11){_inherits(IfcFace,_IfcTopologicalRepres11);var _super969=_createSuper(IfcFace);function IfcFace(expressID,Bounds){var _this966;_classCallCheck(this,IfcFace);_this966=_super969.call(this,expressID);_this966.Bounds=Bounds;_this966.type=2556980723;return _this966;}return _createClass(IfcFace);}(IfcTopologicalRepresentationItem);IFC42.IfcFace=IfcFace;var IfcFaceBound=/*#__PURE__*/function(_IfcTopologicalRepres12){_inherits(IfcFaceBound,_IfcTopologicalRepres12);var _super970=_createSuper(IfcFaceBound);function IfcFaceBound(expressID,Bound,Orientation){var _this967;_classCallCheck(this,IfcFaceBound);_this967=_super970.call(this,expressID);_this967.Bound=Bound;_this967.Orientation=Orientation;_this967.type=1809719519;return _this967;}return _createClass(IfcFaceBound);}(IfcTopologicalRepresentationItem);IFC42.IfcFaceBound=IfcFaceBound;var IfcFaceOuterBound=/*#__PURE__*/function(_IfcFaceBound2){_inherits(IfcFaceOuterBound,_IfcFaceBound2);var _super971=_createSuper(IfcFaceOuterBound);function IfcFaceOuterBound(expressID,Bound,Orientation){var _this968;_classCallCheck(this,IfcFaceOuterBound);_this968=_super971.call(this,expressID,Bound,Orientation);_this968.Bound=Bound;_this968.Orientation=Orientation;_this968.type=803316827;return _this968;}return _createClass(IfcFaceOuterBound);}(IfcFaceBound);IFC42.IfcFaceOuterBound=IfcFaceOuterBound;var IfcFaceSurface=/*#__PURE__*/function(_IfcFace2){_inherits(IfcFaceSurface,_IfcFace2);var _super972=_createSuper(IfcFaceSurface);function IfcFaceSurface(expressID,Bounds,FaceSurface,SameSense){var _this969;_classCallCheck(this,IfcFaceSurface);_this969=_super972.call(this,expressID,Bounds);_this969.Bounds=Bounds;_this969.FaceSurface=FaceSurface;_this969.SameSense=SameSense;_this969.type=3008276851;return _this969;}return _createClass(IfcFaceSurface);}(IfcFace);IFC42.IfcFaceSurface=IfcFaceSurface;var IfcFailureConnectionCondition=/*#__PURE__*/function(_IfcStructuralConnect6){_inherits(IfcFailureConnectionCondition,_IfcStructuralConnect6);var _super973=_createSuper(IfcFailureConnectionCondition);function IfcFailureConnectionCondition(expressID,Name,TensionFailureX,TensionFailureY,TensionFailureZ,CompressionFailureX,CompressionFailureY,CompressionFailureZ){var _this970;_classCallCheck(this,IfcFailureConnectionCondition);_this970=_super973.call(this,expressID,Name);_this970.Name=Name;_this970.TensionFailureX=TensionFailureX;_this970.TensionFailureY=TensionFailureY;_this970.TensionFailureZ=TensionFailureZ;_this970.CompressionFailureX=CompressionFailureX;_this970.CompressionFailureY=CompressionFailureY;_this970.CompressionFailureZ=CompressionFailureZ;_this970.type=4219587988;return _this970;}return _createClass(IfcFailureConnectionCondition);}(IfcStructuralConnectionCondition);IFC42.IfcFailureConnectionCondition=IfcFailureConnectionCondition;var IfcFillAreaStyle=/*#__PURE__*/function(_IfcPresentationStyle9){_inherits(IfcFillAreaStyle,_IfcPresentationStyle9);var _super974=_createSuper(IfcFillAreaStyle);function IfcFillAreaStyle(expressID,Name,FillStyles,ModelorDraughting){var _this971;_classCallCheck(this,IfcFillAreaStyle);_this971=_super974.call(this,expressID,Name);_this971.Name=Name;_this971.FillStyles=FillStyles;_this971.ModelorDraughting=ModelorDraughting;_this971.type=738692330;return _this971;}return _createClass(IfcFillAreaStyle);}(IfcPresentationStyle);IFC42.IfcFillAreaStyle=IfcFillAreaStyle;var IfcGeometricRepresentationContext=/*#__PURE__*/function(_IfcRepresentationCon2){_inherits(IfcGeometricRepresentationContext,_IfcRepresentationCon2);var _super975=_createSuper(IfcGeometricRepresentationContext);function IfcGeometricRepresentationContext(expressID,ContextIdentifier,ContextType,CoordinateSpaceDimension,Precision,WorldCoordinateSystem,TrueNorth){var _this972;_classCallCheck(this,IfcGeometricRepresentationContext);_this972=_super975.call(this,expressID,ContextIdentifier,ContextType);_this972.ContextIdentifier=ContextIdentifier;_this972.ContextType=ContextType;_this972.CoordinateSpaceDimension=CoordinateSpaceDimension;_this972.Precision=Precision;_this972.WorldCoordinateSystem=WorldCoordinateSystem;_this972.TrueNorth=TrueNorth;_this972.type=3448662350;return _this972;}return _createClass(IfcGeometricRepresentationContext);}(IfcRepresentationContext);IFC42.IfcGeometricRepresentationContext=IfcGeometricRepresentationContext;var IfcGeometricRepresentationItem=/*#__PURE__*/function(_IfcRepresentationIte7){_inherits(IfcGeometricRepresentationItem,_IfcRepresentationIte7);var _super976=_createSuper(IfcGeometricRepresentationItem);function IfcGeometricRepresentationItem(expressID){var _this973;_classCallCheck(this,IfcGeometricRepresentationItem);_this973=_super976.call(this,expressID);_this973.type=2453401579;return _this973;}return _createClass(IfcGeometricRepresentationItem);}(IfcRepresentationItem);IFC42.IfcGeometricRepresentationItem=IfcGeometricRepresentationItem;var IfcGeometricRepresentationSubContext=/*#__PURE__*/function(_IfcGeometricRepresen30){_inherits(IfcGeometricRepresentationSubContext,_IfcGeometricRepresen30);var _super977=_createSuper(IfcGeometricRepresentationSubContext);function IfcGeometricRepresentationSubContext(expressID,ContextIdentifier,ContextType,ParentContext,TargetScale,TargetView,UserDefinedTargetView){var _this974;_classCallCheck(this,IfcGeometricRepresentationSubContext);_this974=_super977.call(this,expressID,ContextIdentifier,ContextType,new IfcDimensionCount(0),null,new Handle(0),null);_this974.ContextIdentifier=ContextIdentifier;_this974.ContextType=ContextType;_this974.ParentContext=ParentContext;_this974.TargetScale=TargetScale;_this974.TargetView=TargetView;_this974.UserDefinedTargetView=UserDefinedTargetView;_this974.type=4142052618;return _this974;}return _createClass(IfcGeometricRepresentationSubContext);}(IfcGeometricRepresentationContext);IFC42.IfcGeometricRepresentationSubContext=IfcGeometricRepresentationSubContext;var IfcGeometricSet=/*#__PURE__*/function(_IfcGeometricRepresen31){_inherits(IfcGeometricSet,_IfcGeometricRepresen31);var _super978=_createSuper(IfcGeometricSet);function IfcGeometricSet(expressID,Elements){var _this975;_classCallCheck(this,IfcGeometricSet);_this975=_super978.call(this,expressID);_this975.Elements=Elements;_this975.type=3590301190;return _this975;}return _createClass(IfcGeometricSet);}(IfcGeometricRepresentationItem);IFC42.IfcGeometricSet=IfcGeometricSet;var IfcGridPlacement=/*#__PURE__*/function(_IfcObjectPlacement3){_inherits(IfcGridPlacement,_IfcObjectPlacement3);var _super979=_createSuper(IfcGridPlacement);function IfcGridPlacement(expressID,PlacementLocation,PlacementRefDirection){var _this976;_classCallCheck(this,IfcGridPlacement);_this976=_super979.call(this,expressID);_this976.PlacementLocation=PlacementLocation;_this976.PlacementRefDirection=PlacementRefDirection;_this976.type=178086475;return _this976;}return _createClass(IfcGridPlacement);}(IfcObjectPlacement);IFC42.IfcGridPlacement=IfcGridPlacement;var IfcHalfSpaceSolid=/*#__PURE__*/function(_IfcGeometricRepresen32){_inherits(IfcHalfSpaceSolid,_IfcGeometricRepresen32);var _super980=_createSuper(IfcHalfSpaceSolid);function IfcHalfSpaceSolid(expressID,BaseSurface,AgreementFlag){var _this977;_classCallCheck(this,IfcHalfSpaceSolid);_this977=_super980.call(this,expressID);_this977.BaseSurface=BaseSurface;_this977.AgreementFlag=AgreementFlag;_this977.type=812098782;return _this977;}return _createClass(IfcHalfSpaceSolid);}(IfcGeometricRepresentationItem);IFC42.IfcHalfSpaceSolid=IfcHalfSpaceSolid;var IfcImageTexture=/*#__PURE__*/function(_IfcSurfaceTexture5){_inherits(IfcImageTexture,_IfcSurfaceTexture5);var _super981=_createSuper(IfcImageTexture);function IfcImageTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter,URLReference){var _this978;_classCallCheck(this,IfcImageTexture);_this978=_super981.call(this,expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter);_this978.RepeatS=RepeatS;_this978.RepeatT=RepeatT;_this978.Mode=Mode;_this978.TextureTransform=TextureTransform;_this978.Parameter=Parameter;_this978.URLReference=URLReference;_this978.type=3905492369;return _this978;}return _createClass(IfcImageTexture);}(IfcSurfaceTexture);IFC42.IfcImageTexture=IfcImageTexture;var IfcIndexedColourMap=/*#__PURE__*/function(_IfcPresentationItem16){_inherits(IfcIndexedColourMap,_IfcPresentationItem16);var _super982=_createSuper(IfcIndexedColourMap);function IfcIndexedColourMap(expressID,MappedTo,Opacity,Colours,ColourIndex){var _this979;_classCallCheck(this,IfcIndexedColourMap);_this979=_super982.call(this,expressID);_this979.MappedTo=MappedTo;_this979.Opacity=Opacity;_this979.Colours=Colours;_this979.ColourIndex=ColourIndex;_this979.type=3570813810;return _this979;}return _createClass(IfcIndexedColourMap);}(IfcPresentationItem);IFC42.IfcIndexedColourMap=IfcIndexedColourMap;var IfcIndexedTextureMap=/*#__PURE__*/function(_IfcTextureCoordinate5){_inherits(IfcIndexedTextureMap,_IfcTextureCoordinate5);var _super983=_createSuper(IfcIndexedTextureMap);function IfcIndexedTextureMap(expressID,Maps,MappedTo,TexCoords){var _this980;_classCallCheck(this,IfcIndexedTextureMap);_this980=_super983.call(this,expressID,Maps);_this980.Maps=Maps;_this980.MappedTo=MappedTo;_this980.TexCoords=TexCoords;_this980.type=1437953363;return _this980;}return _createClass(IfcIndexedTextureMap);}(IfcTextureCoordinate);IFC42.IfcIndexedTextureMap=IfcIndexedTextureMap;var IfcIndexedTriangleTextureMap=/*#__PURE__*/function(_IfcIndexedTextureMap){_inherits(IfcIndexedTriangleTextureMap,_IfcIndexedTextureMap);var _super984=_createSuper(IfcIndexedTriangleTextureMap);function IfcIndexedTriangleTextureMap(expressID,Maps,MappedTo,TexCoords,TexCoordIndex){var _this981;_classCallCheck(this,IfcIndexedTriangleTextureMap);_this981=_super984.call(this,expressID,Maps,MappedTo,TexCoords);_this981.Maps=Maps;_this981.MappedTo=MappedTo;_this981.TexCoords=TexCoords;_this981.TexCoordIndex=TexCoordIndex;_this981.type=2133299955;return _this981;}return _createClass(IfcIndexedTriangleTextureMap);}(IfcIndexedTextureMap);IFC42.IfcIndexedTriangleTextureMap=IfcIndexedTriangleTextureMap;var IfcIrregularTimeSeries=/*#__PURE__*/function(_IfcTimeSeries3){_inherits(IfcIrregularTimeSeries,_IfcTimeSeries3);var _super985=_createSuper(IfcIrregularTimeSeries);function IfcIrregularTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit,Values){var _this982;_classCallCheck(this,IfcIrregularTimeSeries);_this982=_super985.call(this,expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit);_this982.Name=Name;_this982.Description=Description;_this982.StartTime=StartTime;_this982.EndTime=EndTime;_this982.TimeSeriesDataType=TimeSeriesDataType;_this982.DataOrigin=DataOrigin;_this982.UserDefinedDataOrigin=UserDefinedDataOrigin;_this982.Unit=Unit;_this982.Values=Values;_this982.type=3741457305;return _this982;}return _createClass(IfcIrregularTimeSeries);}(IfcTimeSeries);IFC42.IfcIrregularTimeSeries=IfcIrregularTimeSeries;var IfcLagTime=/*#__PURE__*/function(_IfcSchedulingTime4){_inherits(IfcLagTime,_IfcSchedulingTime4);var _super986=_createSuper(IfcLagTime);function IfcLagTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,LagValue,DurationType){var _this983;_classCallCheck(this,IfcLagTime);_this983=_super986.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this983.Name=Name;_this983.DataOrigin=DataOrigin;_this983.UserDefinedDataOrigin=UserDefinedDataOrigin;_this983.LagValue=LagValue;_this983.DurationType=DurationType;_this983.type=1585845231;return _this983;}return _createClass(IfcLagTime);}(IfcSchedulingTime);IFC42.IfcLagTime=IfcLagTime;var IfcLightSource=/*#__PURE__*/function(_IfcGeometricRepresen33){_inherits(IfcLightSource,_IfcGeometricRepresen33);var _super987=_createSuper(IfcLightSource);function IfcLightSource(expressID,Name,LightColour,AmbientIntensity,Intensity){var _this984;_classCallCheck(this,IfcLightSource);_this984=_super987.call(this,expressID);_this984.Name=Name;_this984.LightColour=LightColour;_this984.AmbientIntensity=AmbientIntensity;_this984.Intensity=Intensity;_this984.type=1402838566;return _this984;}return _createClass(IfcLightSource);}(IfcGeometricRepresentationItem);IFC42.IfcLightSource=IfcLightSource;var IfcLightSourceAmbient=/*#__PURE__*/function(_IfcLightSource5){_inherits(IfcLightSourceAmbient,_IfcLightSource5);var _super988=_createSuper(IfcLightSourceAmbient);function IfcLightSourceAmbient(expressID,Name,LightColour,AmbientIntensity,Intensity){var _this985;_classCallCheck(this,IfcLightSourceAmbient);_this985=_super988.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this985.Name=Name;_this985.LightColour=LightColour;_this985.AmbientIntensity=AmbientIntensity;_this985.Intensity=Intensity;_this985.type=125510826;return _this985;}return _createClass(IfcLightSourceAmbient);}(IfcLightSource);IFC42.IfcLightSourceAmbient=IfcLightSourceAmbient;var IfcLightSourceDirectional=/*#__PURE__*/function(_IfcLightSource6){_inherits(IfcLightSourceDirectional,_IfcLightSource6);var _super989=_createSuper(IfcLightSourceDirectional);function IfcLightSourceDirectional(expressID,Name,LightColour,AmbientIntensity,Intensity,Orientation){var _this986;_classCallCheck(this,IfcLightSourceDirectional);_this986=_super989.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this986.Name=Name;_this986.LightColour=LightColour;_this986.AmbientIntensity=AmbientIntensity;_this986.Intensity=Intensity;_this986.Orientation=Orientation;_this986.type=2604431987;return _this986;}return _createClass(IfcLightSourceDirectional);}(IfcLightSource);IFC42.IfcLightSourceDirectional=IfcLightSourceDirectional;var IfcLightSourceGoniometric=/*#__PURE__*/function(_IfcLightSource7){_inherits(IfcLightSourceGoniometric,_IfcLightSource7);var _super990=_createSuper(IfcLightSourceGoniometric);function IfcLightSourceGoniometric(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,ColourAppearance,ColourTemperature,LuminousFlux,LightEmissionSource,LightDistributionDataSource){var _this987;_classCallCheck(this,IfcLightSourceGoniometric);_this987=_super990.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this987.Name=Name;_this987.LightColour=LightColour;_this987.AmbientIntensity=AmbientIntensity;_this987.Intensity=Intensity;_this987.Position=Position;_this987.ColourAppearance=ColourAppearance;_this987.ColourTemperature=ColourTemperature;_this987.LuminousFlux=LuminousFlux;_this987.LightEmissionSource=LightEmissionSource;_this987.LightDistributionDataSource=LightDistributionDataSource;_this987.type=4266656042;return _this987;}return _createClass(IfcLightSourceGoniometric);}(IfcLightSource);IFC42.IfcLightSourceGoniometric=IfcLightSourceGoniometric;var IfcLightSourcePositional=/*#__PURE__*/function(_IfcLightSource8){_inherits(IfcLightSourcePositional,_IfcLightSource8);var _super991=_createSuper(IfcLightSourcePositional);function IfcLightSourcePositional(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation){var _this988;_classCallCheck(this,IfcLightSourcePositional);_this988=_super991.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this988.Name=Name;_this988.LightColour=LightColour;_this988.AmbientIntensity=AmbientIntensity;_this988.Intensity=Intensity;_this988.Position=Position;_this988.Radius=Radius;_this988.ConstantAttenuation=ConstantAttenuation;_this988.DistanceAttenuation=DistanceAttenuation;_this988.QuadricAttenuation=QuadricAttenuation;_this988.type=1520743889;return _this988;}return _createClass(IfcLightSourcePositional);}(IfcLightSource);IFC42.IfcLightSourcePositional=IfcLightSourcePositional;var IfcLightSourceSpot=/*#__PURE__*/function(_IfcLightSourcePositi2){_inherits(IfcLightSourceSpot,_IfcLightSourcePositi2);var _super992=_createSuper(IfcLightSourceSpot);function IfcLightSourceSpot(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation,Orientation,ConcentrationExponent,SpreadAngle,BeamWidthAngle){var _this989;_classCallCheck(this,IfcLightSourceSpot);_this989=_super992.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation);_this989.Name=Name;_this989.LightColour=LightColour;_this989.AmbientIntensity=AmbientIntensity;_this989.Intensity=Intensity;_this989.Position=Position;_this989.Radius=Radius;_this989.ConstantAttenuation=ConstantAttenuation;_this989.DistanceAttenuation=DistanceAttenuation;_this989.QuadricAttenuation=QuadricAttenuation;_this989.Orientation=Orientation;_this989.ConcentrationExponent=ConcentrationExponent;_this989.SpreadAngle=SpreadAngle;_this989.BeamWidthAngle=BeamWidthAngle;_this989.type=3422422726;return _this989;}return _createClass(IfcLightSourceSpot);}(IfcLightSourcePositional);IFC42.IfcLightSourceSpot=IfcLightSourceSpot;var IfcLocalPlacement=/*#__PURE__*/function(_IfcObjectPlacement4){_inherits(IfcLocalPlacement,_IfcObjectPlacement4);var _super993=_createSuper(IfcLocalPlacement);function IfcLocalPlacement(expressID,PlacementRelTo,RelativePlacement){var _this990;_classCallCheck(this,IfcLocalPlacement);_this990=_super993.call(this,expressID);_this990.PlacementRelTo=PlacementRelTo;_this990.RelativePlacement=RelativePlacement;_this990.type=2624227202;return _this990;}return _createClass(IfcLocalPlacement);}(IfcObjectPlacement);IFC42.IfcLocalPlacement=IfcLocalPlacement;var IfcLoop=/*#__PURE__*/function(_IfcTopologicalRepres13){_inherits(IfcLoop,_IfcTopologicalRepres13);var _super994=_createSuper(IfcLoop);function IfcLoop(expressID){var _this991;_classCallCheck(this,IfcLoop);_this991=_super994.call(this,expressID);_this991.type=1008929658;return _this991;}return _createClass(IfcLoop);}(IfcTopologicalRepresentationItem);IFC42.IfcLoop=IfcLoop;var IfcMappedItem=/*#__PURE__*/function(_IfcRepresentationIte8){_inherits(IfcMappedItem,_IfcRepresentationIte8);var _super995=_createSuper(IfcMappedItem);function IfcMappedItem(expressID,MappingSource,MappingTarget){var _this992;_classCallCheck(this,IfcMappedItem);_this992=_super995.call(this,expressID);_this992.MappingSource=MappingSource;_this992.MappingTarget=MappingTarget;_this992.type=2347385850;return _this992;}return _createClass(IfcMappedItem);}(IfcRepresentationItem);IFC42.IfcMappedItem=IfcMappedItem;var IfcMaterial=/*#__PURE__*/function(_IfcMaterialDefinitio5){_inherits(IfcMaterial,_IfcMaterialDefinitio5);var _super996=_createSuper(IfcMaterial);function IfcMaterial(expressID,Name,Description,Category){var _this993;_classCallCheck(this,IfcMaterial);_this993=_super996.call(this,expressID);_this993.Name=Name;_this993.Description=Description;_this993.Category=Category;_this993.type=1838606355;return _this993;}return _createClass(IfcMaterial);}(IfcMaterialDefinition);IFC42.IfcMaterial=IfcMaterial;var IfcMaterialConstituent=/*#__PURE__*/function(_IfcMaterialDefinitio6){_inherits(IfcMaterialConstituent,_IfcMaterialDefinitio6);var _super997=_createSuper(IfcMaterialConstituent);function IfcMaterialConstituent(expressID,Name,Description,Material,Fraction,Category){var _this994;_classCallCheck(this,IfcMaterialConstituent);_this994=_super997.call(this,expressID);_this994.Name=Name;_this994.Description=Description;_this994.Material=Material;_this994.Fraction=Fraction;_this994.Category=Category;_this994.type=3708119e3;return _this994;}return _createClass(IfcMaterialConstituent);}(IfcMaterialDefinition);IFC42.IfcMaterialConstituent=IfcMaterialConstituent;var IfcMaterialConstituentSet=/*#__PURE__*/function(_IfcMaterialDefinitio7){_inherits(IfcMaterialConstituentSet,_IfcMaterialDefinitio7);var _super998=_createSuper(IfcMaterialConstituentSet);function IfcMaterialConstituentSet(expressID,Name,Description,MaterialConstituents){var _this995;_classCallCheck(this,IfcMaterialConstituentSet);_this995=_super998.call(this,expressID);_this995.Name=Name;_this995.Description=Description;_this995.MaterialConstituents=MaterialConstituents;_this995.type=2852063980;return _this995;}return _createClass(IfcMaterialConstituentSet);}(IfcMaterialDefinition);IFC42.IfcMaterialConstituentSet=IfcMaterialConstituentSet;var IfcMaterialDefinitionRepresentation=/*#__PURE__*/function(_IfcProductRepresenta3){_inherits(IfcMaterialDefinitionRepresentation,_IfcProductRepresenta3);var _super999=_createSuper(IfcMaterialDefinitionRepresentation);function IfcMaterialDefinitionRepresentation(expressID,Name,Description,Representations,RepresentedMaterial){var _this996;_classCallCheck(this,IfcMaterialDefinitionRepresentation);_this996=_super999.call(this,expressID,Name,Description,Representations);_this996.Name=Name;_this996.Description=Description;_this996.Representations=Representations;_this996.RepresentedMaterial=RepresentedMaterial;_this996.type=2022407955;return _this996;}return _createClass(IfcMaterialDefinitionRepresentation);}(IfcProductRepresentation);IFC42.IfcMaterialDefinitionRepresentation=IfcMaterialDefinitionRepresentation;var IfcMaterialLayerSetUsage=/*#__PURE__*/function(_IfcMaterialUsageDefi){_inherits(IfcMaterialLayerSetUsage,_IfcMaterialUsageDefi);var _super1000=_createSuper(IfcMaterialLayerSetUsage);function IfcMaterialLayerSetUsage(expressID,ForLayerSet,LayerSetDirection,DirectionSense,OffsetFromReferenceLine,ReferenceExtent){var _this997;_classCallCheck(this,IfcMaterialLayerSetUsage);_this997=_super1000.call(this,expressID);_this997.ForLayerSet=ForLayerSet;_this997.LayerSetDirection=LayerSetDirection;_this997.DirectionSense=DirectionSense;_this997.OffsetFromReferenceLine=OffsetFromReferenceLine;_this997.ReferenceExtent=ReferenceExtent;_this997.type=1303795690;return _this997;}return _createClass(IfcMaterialLayerSetUsage);}(IfcMaterialUsageDefinition);IFC42.IfcMaterialLayerSetUsage=IfcMaterialLayerSetUsage;var IfcMaterialProfileSetUsage=/*#__PURE__*/function(_IfcMaterialUsageDefi2){_inherits(IfcMaterialProfileSetUsage,_IfcMaterialUsageDefi2);var _super1001=_createSuper(IfcMaterialProfileSetUsage);function IfcMaterialProfileSetUsage(expressID,ForProfileSet,CardinalPoint,ReferenceExtent){var _this998;_classCallCheck(this,IfcMaterialProfileSetUsage);_this998=_super1001.call(this,expressID);_this998.ForProfileSet=ForProfileSet;_this998.CardinalPoint=CardinalPoint;_this998.ReferenceExtent=ReferenceExtent;_this998.type=3079605661;return _this998;}return _createClass(IfcMaterialProfileSetUsage);}(IfcMaterialUsageDefinition);IFC42.IfcMaterialProfileSetUsage=IfcMaterialProfileSetUsage;var IfcMaterialProfileSetUsageTapering=/*#__PURE__*/function(_IfcMaterialProfileSe){_inherits(IfcMaterialProfileSetUsageTapering,_IfcMaterialProfileSe);var _super1002=_createSuper(IfcMaterialProfileSetUsageTapering);function IfcMaterialProfileSetUsageTapering(expressID,ForProfileSet,CardinalPoint,ReferenceExtent,ForProfileEndSet,CardinalEndPoint){var _this999;_classCallCheck(this,IfcMaterialProfileSetUsageTapering);_this999=_super1002.call(this,expressID,ForProfileSet,CardinalPoint,ReferenceExtent);_this999.ForProfileSet=ForProfileSet;_this999.CardinalPoint=CardinalPoint;_this999.ReferenceExtent=ReferenceExtent;_this999.ForProfileEndSet=ForProfileEndSet;_this999.CardinalEndPoint=CardinalEndPoint;_this999.type=3404854881;return _this999;}return _createClass(IfcMaterialProfileSetUsageTapering);}(IfcMaterialProfileSetUsage);IFC42.IfcMaterialProfileSetUsageTapering=IfcMaterialProfileSetUsageTapering;var IfcMaterialProperties=/*#__PURE__*/function(_IfcExtendedPropertie){_inherits(IfcMaterialProperties,_IfcExtendedPropertie);var _super1003=_createSuper(IfcMaterialProperties);function IfcMaterialProperties(expressID,Name,Description,Properties2,Material){var _this1000;_classCallCheck(this,IfcMaterialProperties);_this1000=_super1003.call(this,expressID,Name,Description,Properties2);_this1000.Name=Name;_this1000.Description=Description;_this1000.Properties=Properties2;_this1000.Material=Material;_this1000.type=3265635763;return _this1000;}return _createClass(IfcMaterialProperties);}(IfcExtendedProperties);IFC42.IfcMaterialProperties=IfcMaterialProperties;var IfcMaterialRelationship=/*#__PURE__*/function(_IfcResourceLevelRela5){_inherits(IfcMaterialRelationship,_IfcResourceLevelRela5);var _super1004=_createSuper(IfcMaterialRelationship);function IfcMaterialRelationship(expressID,Name,Description,RelatingMaterial,RelatedMaterials,Expression){var _this1001;_classCallCheck(this,IfcMaterialRelationship);_this1001=_super1004.call(this,expressID,Name,Description);_this1001.Name=Name;_this1001.Description=Description;_this1001.RelatingMaterial=RelatingMaterial;_this1001.RelatedMaterials=RelatedMaterials;_this1001.Expression=Expression;_this1001.type=853536259;return _this1001;}return _createClass(IfcMaterialRelationship);}(IfcResourceLevelRelationship);IFC42.IfcMaterialRelationship=IfcMaterialRelationship;var IfcMirroredProfileDef=/*#__PURE__*/function(_IfcDerivedProfileDef){_inherits(IfcMirroredProfileDef,_IfcDerivedProfileDef);var _super1005=_createSuper(IfcMirroredProfileDef);function IfcMirroredProfileDef(expressID,ProfileType,ProfileName,ParentProfile,Label){var _this1002;_classCallCheck(this,IfcMirroredProfileDef);_this1002=_super1005.call(this,expressID,ProfileType,ProfileName,ParentProfile,new Handle(0),Label);_this1002.ProfileType=ProfileType;_this1002.ProfileName=ProfileName;_this1002.ParentProfile=ParentProfile;_this1002.Label=Label;_this1002.type=2998442950;return _this1002;}return _createClass(IfcMirroredProfileDef);}(IfcDerivedProfileDef);IFC42.IfcMirroredProfileDef=IfcMirroredProfileDef;var IfcObjectDefinition=/*#__PURE__*/function(_IfcRoot4){_inherits(IfcObjectDefinition,_IfcRoot4);var _super1006=_createSuper(IfcObjectDefinition);function IfcObjectDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1003;_classCallCheck(this,IfcObjectDefinition);_this1003=_super1006.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1003.GlobalId=GlobalId;_this1003.OwnerHistory=OwnerHistory;_this1003.Name=Name;_this1003.Description=Description;_this1003.type=219451334;return _this1003;}return _createClass(IfcObjectDefinition);}(IfcRoot);IFC42.IfcObjectDefinition=IfcObjectDefinition;var IfcOpenShell=/*#__PURE__*/function(_IfcConnectedFaceSet3){_inherits(IfcOpenShell,_IfcConnectedFaceSet3);var _super1007=_createSuper(IfcOpenShell);function IfcOpenShell(expressID,CfsFaces){var _this1004;_classCallCheck(this,IfcOpenShell);_this1004=_super1007.call(this,expressID,CfsFaces);_this1004.CfsFaces=CfsFaces;_this1004.type=2665983363;return _this1004;}return _createClass(IfcOpenShell);}(IfcConnectedFaceSet);IFC42.IfcOpenShell=IfcOpenShell;var IfcOrganizationRelationship=/*#__PURE__*/function(_IfcResourceLevelRela6){_inherits(IfcOrganizationRelationship,_IfcResourceLevelRela6);var _super1008=_createSuper(IfcOrganizationRelationship);function IfcOrganizationRelationship(expressID,Name,Description,RelatingOrganization,RelatedOrganizations){var _this1005;_classCallCheck(this,IfcOrganizationRelationship);_this1005=_super1008.call(this,expressID,Name,Description);_this1005.Name=Name;_this1005.Description=Description;_this1005.RelatingOrganization=RelatingOrganization;_this1005.RelatedOrganizations=RelatedOrganizations;_this1005.type=1411181986;return _this1005;}return _createClass(IfcOrganizationRelationship);}(IfcResourceLevelRelationship);IFC42.IfcOrganizationRelationship=IfcOrganizationRelationship;var IfcOrientedEdge=/*#__PURE__*/function(_IfcEdge5){_inherits(IfcOrientedEdge,_IfcEdge5);var _super1009=_createSuper(IfcOrientedEdge);function IfcOrientedEdge(expressID,EdgeElement,Orientation){var _this1006;_classCallCheck(this,IfcOrientedEdge);_this1006=_super1009.call(this,expressID,new Handle(0),new Handle(0));_this1006.EdgeElement=EdgeElement;_this1006.Orientation=Orientation;_this1006.type=1029017970;return _this1006;}return _createClass(IfcOrientedEdge);}(IfcEdge);IFC42.IfcOrientedEdge=IfcOrientedEdge;var IfcParameterizedProfileDef=/*#__PURE__*/function(_IfcProfileDef10){_inherits(IfcParameterizedProfileDef,_IfcProfileDef10);var _super1010=_createSuper(IfcParameterizedProfileDef);function IfcParameterizedProfileDef(expressID,ProfileType,ProfileName,Position){var _this1007;_classCallCheck(this,IfcParameterizedProfileDef);_this1007=_super1010.call(this,expressID,ProfileType,ProfileName);_this1007.ProfileType=ProfileType;_this1007.ProfileName=ProfileName;_this1007.Position=Position;_this1007.type=2529465313;return _this1007;}return _createClass(IfcParameterizedProfileDef);}(IfcProfileDef);IFC42.IfcParameterizedProfileDef=IfcParameterizedProfileDef;var IfcPath=/*#__PURE__*/function(_IfcTopologicalRepres14){_inherits(IfcPath,_IfcTopologicalRepres14);var _super1011=_createSuper(IfcPath);function IfcPath(expressID,EdgeList){var _this1008;_classCallCheck(this,IfcPath);_this1008=_super1011.call(this,expressID);_this1008.EdgeList=EdgeList;_this1008.type=2519244187;return _this1008;}return _createClass(IfcPath);}(IfcTopologicalRepresentationItem);IFC42.IfcPath=IfcPath;var IfcPhysicalComplexQuantity=/*#__PURE__*/function(_IfcPhysicalQuantity4){_inherits(IfcPhysicalComplexQuantity,_IfcPhysicalQuantity4);var _super1012=_createSuper(IfcPhysicalComplexQuantity);function IfcPhysicalComplexQuantity(expressID,Name,Description,HasQuantities,Discrimination,Quality,Usage){var _this1009;_classCallCheck(this,IfcPhysicalComplexQuantity);_this1009=_super1012.call(this,expressID,Name,Description);_this1009.Name=Name;_this1009.Description=Description;_this1009.HasQuantities=HasQuantities;_this1009.Discrimination=Discrimination;_this1009.Quality=Quality;_this1009.Usage=Usage;_this1009.type=3021840470;return _this1009;}return _createClass(IfcPhysicalComplexQuantity);}(IfcPhysicalQuantity);IFC42.IfcPhysicalComplexQuantity=IfcPhysicalComplexQuantity;var IfcPixelTexture=/*#__PURE__*/function(_IfcSurfaceTexture6){_inherits(IfcPixelTexture,_IfcSurfaceTexture6);var _super1013=_createSuper(IfcPixelTexture);function IfcPixelTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter,Width,Height,ColourComponents,Pixel){var _this1010;_classCallCheck(this,IfcPixelTexture);_this1010=_super1013.call(this,expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter);_this1010.RepeatS=RepeatS;_this1010.RepeatT=RepeatT;_this1010.Mode=Mode;_this1010.TextureTransform=TextureTransform;_this1010.Parameter=Parameter;_this1010.Width=Width;_this1010.Height=Height;_this1010.ColourComponents=ColourComponents;_this1010.Pixel=Pixel;_this1010.type=597895409;return _this1010;}return _createClass(IfcPixelTexture);}(IfcSurfaceTexture);IFC42.IfcPixelTexture=IfcPixelTexture;var IfcPlacement=/*#__PURE__*/function(_IfcGeometricRepresen34){_inherits(IfcPlacement,_IfcGeometricRepresen34);var _super1014=_createSuper(IfcPlacement);function IfcPlacement(expressID,Location){var _this1011;_classCallCheck(this,IfcPlacement);_this1011=_super1014.call(this,expressID);_this1011.Location=Location;_this1011.type=2004835150;return _this1011;}return _createClass(IfcPlacement);}(IfcGeometricRepresentationItem);IFC42.IfcPlacement=IfcPlacement;var IfcPlanarExtent=/*#__PURE__*/function(_IfcGeometricRepresen35){_inherits(IfcPlanarExtent,_IfcGeometricRepresen35);var _super1015=_createSuper(IfcPlanarExtent);function IfcPlanarExtent(expressID,SizeInX,SizeInY){var _this1012;_classCallCheck(this,IfcPlanarExtent);_this1012=_super1015.call(this,expressID);_this1012.SizeInX=SizeInX;_this1012.SizeInY=SizeInY;_this1012.type=1663979128;return _this1012;}return _createClass(IfcPlanarExtent);}(IfcGeometricRepresentationItem);IFC42.IfcPlanarExtent=IfcPlanarExtent;var IfcPoint=/*#__PURE__*/function(_IfcGeometricRepresen36){_inherits(IfcPoint,_IfcGeometricRepresen36);var _super1016=_createSuper(IfcPoint);function IfcPoint(expressID){var _this1013;_classCallCheck(this,IfcPoint);_this1013=_super1016.call(this,expressID);_this1013.type=2067069095;return _this1013;}return _createClass(IfcPoint);}(IfcGeometricRepresentationItem);IFC42.IfcPoint=IfcPoint;var IfcPointOnCurve=/*#__PURE__*/function(_IfcPoint4){_inherits(IfcPointOnCurve,_IfcPoint4);var _super1017=_createSuper(IfcPointOnCurve);function IfcPointOnCurve(expressID,BasisCurve,PointParameter){var _this1014;_classCallCheck(this,IfcPointOnCurve);_this1014=_super1017.call(this,expressID);_this1014.BasisCurve=BasisCurve;_this1014.PointParameter=PointParameter;_this1014.type=4022376103;return _this1014;}return _createClass(IfcPointOnCurve);}(IfcPoint);IFC42.IfcPointOnCurve=IfcPointOnCurve;var IfcPointOnSurface=/*#__PURE__*/function(_IfcPoint5){_inherits(IfcPointOnSurface,_IfcPoint5);var _super1018=_createSuper(IfcPointOnSurface);function IfcPointOnSurface(expressID,BasisSurface,PointParameterU,PointParameterV){var _this1015;_classCallCheck(this,IfcPointOnSurface);_this1015=_super1018.call(this,expressID);_this1015.BasisSurface=BasisSurface;_this1015.PointParameterU=PointParameterU;_this1015.PointParameterV=PointParameterV;_this1015.type=1423911732;return _this1015;}return _createClass(IfcPointOnSurface);}(IfcPoint);IFC42.IfcPointOnSurface=IfcPointOnSurface;var IfcPolyLoop=/*#__PURE__*/function(_IfcLoop4){_inherits(IfcPolyLoop,_IfcLoop4);var _super1019=_createSuper(IfcPolyLoop);function IfcPolyLoop(expressID,Polygon){var _this1016;_classCallCheck(this,IfcPolyLoop);_this1016=_super1019.call(this,expressID);_this1016.Polygon=Polygon;_this1016.type=2924175390;return _this1016;}return _createClass(IfcPolyLoop);}(IfcLoop);IFC42.IfcPolyLoop=IfcPolyLoop;var IfcPolygonalBoundedHalfSpace=/*#__PURE__*/function(_IfcHalfSpaceSolid3){_inherits(IfcPolygonalBoundedHalfSpace,_IfcHalfSpaceSolid3);var _super1020=_createSuper(IfcPolygonalBoundedHalfSpace);function IfcPolygonalBoundedHalfSpace(expressID,BaseSurface,AgreementFlag,Position,PolygonalBoundary){var _this1017;_classCallCheck(this,IfcPolygonalBoundedHalfSpace);_this1017=_super1020.call(this,expressID,BaseSurface,AgreementFlag);_this1017.BaseSurface=BaseSurface;_this1017.AgreementFlag=AgreementFlag;_this1017.Position=Position;_this1017.PolygonalBoundary=PolygonalBoundary;_this1017.type=2775532180;return _this1017;}return _createClass(IfcPolygonalBoundedHalfSpace);}(IfcHalfSpaceSolid);IFC42.IfcPolygonalBoundedHalfSpace=IfcPolygonalBoundedHalfSpace;var IfcPreDefinedItem=/*#__PURE__*/function(_IfcPresentationItem17){_inherits(IfcPreDefinedItem,_IfcPresentationItem17);var _super1021=_createSuper(IfcPreDefinedItem);function IfcPreDefinedItem(expressID,Name){var _this1018;_classCallCheck(this,IfcPreDefinedItem);_this1018=_super1021.call(this,expressID);_this1018.Name=Name;_this1018.type=3727388367;return _this1018;}return _createClass(IfcPreDefinedItem);}(IfcPresentationItem);IFC42.IfcPreDefinedItem=IfcPreDefinedItem;var IfcPreDefinedProperties=/*#__PURE__*/function(_IfcPropertyAbstracti3){_inherits(IfcPreDefinedProperties,_IfcPropertyAbstracti3);var _super1022=_createSuper(IfcPreDefinedProperties);function IfcPreDefinedProperties(expressID){var _this1019;_classCallCheck(this,IfcPreDefinedProperties);_this1019=_super1022.call(this,expressID);_this1019.type=3778827333;return _this1019;}return _createClass(IfcPreDefinedProperties);}(IfcPropertyAbstraction);IFC42.IfcPreDefinedProperties=IfcPreDefinedProperties;var IfcPreDefinedTextFont=/*#__PURE__*/function(_IfcPreDefinedItem5){_inherits(IfcPreDefinedTextFont,_IfcPreDefinedItem5);var _super1023=_createSuper(IfcPreDefinedTextFont);function IfcPreDefinedTextFont(expressID,Name){var _this1020;_classCallCheck(this,IfcPreDefinedTextFont);_this1020=_super1023.call(this,expressID,Name);_this1020.Name=Name;_this1020.type=1775413392;return _this1020;}return _createClass(IfcPreDefinedTextFont);}(IfcPreDefinedItem);IFC42.IfcPreDefinedTextFont=IfcPreDefinedTextFont;var IfcProductDefinitionShape=/*#__PURE__*/function(_IfcProductRepresenta4){_inherits(IfcProductDefinitionShape,_IfcProductRepresenta4);var _super1024=_createSuper(IfcProductDefinitionShape);function IfcProductDefinitionShape(expressID,Name,Description,Representations){var _this1021;_classCallCheck(this,IfcProductDefinitionShape);_this1021=_super1024.call(this,expressID,Name,Description,Representations);_this1021.Name=Name;_this1021.Description=Description;_this1021.Representations=Representations;_this1021.type=673634403;return _this1021;}return _createClass(IfcProductDefinitionShape);}(IfcProductRepresentation);IFC42.IfcProductDefinitionShape=IfcProductDefinitionShape;var IfcProfileProperties=/*#__PURE__*/function(_IfcExtendedPropertie2){_inherits(IfcProfileProperties,_IfcExtendedPropertie2);var _super1025=_createSuper(IfcProfileProperties);function IfcProfileProperties(expressID,Name,Description,Properties2,ProfileDefinition){var _this1022;_classCallCheck(this,IfcProfileProperties);_this1022=_super1025.call(this,expressID,Name,Description,Properties2);_this1022.Name=Name;_this1022.Description=Description;_this1022.Properties=Properties2;_this1022.ProfileDefinition=ProfileDefinition;_this1022.type=2802850158;return _this1022;}return _createClass(IfcProfileProperties);}(IfcExtendedProperties);IFC42.IfcProfileProperties=IfcProfileProperties;var IfcProperty=/*#__PURE__*/function(_IfcPropertyAbstracti4){_inherits(IfcProperty,_IfcPropertyAbstracti4);var _super1026=_createSuper(IfcProperty);function IfcProperty(expressID,Name,Description){var _this1023;_classCallCheck(this,IfcProperty);_this1023=_super1026.call(this,expressID);_this1023.Name=Name;_this1023.Description=Description;_this1023.type=2598011224;return _this1023;}return _createClass(IfcProperty);}(IfcPropertyAbstraction);IFC42.IfcProperty=IfcProperty;var IfcPropertyDefinition=/*#__PURE__*/function(_IfcRoot5){_inherits(IfcPropertyDefinition,_IfcRoot5);var _super1027=_createSuper(IfcPropertyDefinition);function IfcPropertyDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1024;_classCallCheck(this,IfcPropertyDefinition);_this1024=_super1027.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1024.GlobalId=GlobalId;_this1024.OwnerHistory=OwnerHistory;_this1024.Name=Name;_this1024.Description=Description;_this1024.type=1680319473;return _this1024;}return _createClass(IfcPropertyDefinition);}(IfcRoot);IFC42.IfcPropertyDefinition=IfcPropertyDefinition;var IfcPropertyDependencyRelationship=/*#__PURE__*/function(_IfcResourceLevelRela7){_inherits(IfcPropertyDependencyRelationship,_IfcResourceLevelRela7);var _super1028=_createSuper(IfcPropertyDependencyRelationship);function IfcPropertyDependencyRelationship(expressID,Name,Description,DependingProperty,DependantProperty,Expression){var _this1025;_classCallCheck(this,IfcPropertyDependencyRelationship);_this1025=_super1028.call(this,expressID,Name,Description);_this1025.Name=Name;_this1025.Description=Description;_this1025.DependingProperty=DependingProperty;_this1025.DependantProperty=DependantProperty;_this1025.Expression=Expression;_this1025.type=148025276;return _this1025;}return _createClass(IfcPropertyDependencyRelationship);}(IfcResourceLevelRelationship);IFC42.IfcPropertyDependencyRelationship=IfcPropertyDependencyRelationship;var IfcPropertySetDefinition=/*#__PURE__*/function(_IfcPropertyDefinitio2){_inherits(IfcPropertySetDefinition,_IfcPropertyDefinitio2);var _super1029=_createSuper(IfcPropertySetDefinition);function IfcPropertySetDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1026;_classCallCheck(this,IfcPropertySetDefinition);_this1026=_super1029.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1026.GlobalId=GlobalId;_this1026.OwnerHistory=OwnerHistory;_this1026.Name=Name;_this1026.Description=Description;_this1026.type=3357820518;return _this1026;}return _createClass(IfcPropertySetDefinition);}(IfcPropertyDefinition);IFC42.IfcPropertySetDefinition=IfcPropertySetDefinition;var IfcPropertyTemplateDefinition=/*#__PURE__*/function(_IfcPropertyDefinitio3){_inherits(IfcPropertyTemplateDefinition,_IfcPropertyDefinitio3);var _super1030=_createSuper(IfcPropertyTemplateDefinition);function IfcPropertyTemplateDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1027;_classCallCheck(this,IfcPropertyTemplateDefinition);_this1027=_super1030.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1027.GlobalId=GlobalId;_this1027.OwnerHistory=OwnerHistory;_this1027.Name=Name;_this1027.Description=Description;_this1027.type=1482703590;return _this1027;}return _createClass(IfcPropertyTemplateDefinition);}(IfcPropertyDefinition);IFC42.IfcPropertyTemplateDefinition=IfcPropertyTemplateDefinition;var IfcQuantitySet=/*#__PURE__*/function(_IfcPropertySetDefini15){_inherits(IfcQuantitySet,_IfcPropertySetDefini15);var _super1031=_createSuper(IfcQuantitySet);function IfcQuantitySet(expressID,GlobalId,OwnerHistory,Name,Description){var _this1028;_classCallCheck(this,IfcQuantitySet);_this1028=_super1031.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1028.GlobalId=GlobalId;_this1028.OwnerHistory=OwnerHistory;_this1028.Name=Name;_this1028.Description=Description;_this1028.type=2090586900;return _this1028;}return _createClass(IfcQuantitySet);}(IfcPropertySetDefinition);IFC42.IfcQuantitySet=IfcQuantitySet;var IfcRectangleProfileDef=/*#__PURE__*/function(_IfcParameterizedProf13){_inherits(IfcRectangleProfileDef,_IfcParameterizedProf13);var _super1032=_createSuper(IfcRectangleProfileDef);function IfcRectangleProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim){var _this1029;_classCallCheck(this,IfcRectangleProfileDef);_this1029=_super1032.call(this,expressID,ProfileType,ProfileName,Position);_this1029.ProfileType=ProfileType;_this1029.ProfileName=ProfileName;_this1029.Position=Position;_this1029.XDim=XDim;_this1029.YDim=YDim;_this1029.type=3615266464;return _this1029;}return _createClass(IfcRectangleProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcRectangleProfileDef=IfcRectangleProfileDef;var IfcRegularTimeSeries=/*#__PURE__*/function(_IfcTimeSeries4){_inherits(IfcRegularTimeSeries,_IfcTimeSeries4);var _super1033=_createSuper(IfcRegularTimeSeries);function IfcRegularTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit,TimeStep,Values){var _this1030;_classCallCheck(this,IfcRegularTimeSeries);_this1030=_super1033.call(this,expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit);_this1030.Name=Name;_this1030.Description=Description;_this1030.StartTime=StartTime;_this1030.EndTime=EndTime;_this1030.TimeSeriesDataType=TimeSeriesDataType;_this1030.DataOrigin=DataOrigin;_this1030.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1030.Unit=Unit;_this1030.TimeStep=TimeStep;_this1030.Values=Values;_this1030.type=3413951693;return _this1030;}return _createClass(IfcRegularTimeSeries);}(IfcTimeSeries);IFC42.IfcRegularTimeSeries=IfcRegularTimeSeries;var IfcReinforcementBarProperties=/*#__PURE__*/function(_IfcPreDefinedPropert){_inherits(IfcReinforcementBarProperties,_IfcPreDefinedPropert);var _super1034=_createSuper(IfcReinforcementBarProperties);function IfcReinforcementBarProperties(expressID,TotalCrossSectionArea,SteelGrade,BarSurface,EffectiveDepth,NominalBarDiameter,BarCount){var _this1031;_classCallCheck(this,IfcReinforcementBarProperties);_this1031=_super1034.call(this,expressID);_this1031.TotalCrossSectionArea=TotalCrossSectionArea;_this1031.SteelGrade=SteelGrade;_this1031.BarSurface=BarSurface;_this1031.EffectiveDepth=EffectiveDepth;_this1031.NominalBarDiameter=NominalBarDiameter;_this1031.BarCount=BarCount;_this1031.type=1580146022;return _this1031;}return _createClass(IfcReinforcementBarProperties);}(IfcPreDefinedProperties);IFC42.IfcReinforcementBarProperties=IfcReinforcementBarProperties;var IfcRelationship=/*#__PURE__*/function(_IfcRoot6){_inherits(IfcRelationship,_IfcRoot6);var _super1035=_createSuper(IfcRelationship);function IfcRelationship(expressID,GlobalId,OwnerHistory,Name,Description){var _this1032;_classCallCheck(this,IfcRelationship);_this1032=_super1035.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1032.GlobalId=GlobalId;_this1032.OwnerHistory=OwnerHistory;_this1032.Name=Name;_this1032.Description=Description;_this1032.type=478536968;return _this1032;}return _createClass(IfcRelationship);}(IfcRoot);IFC42.IfcRelationship=IfcRelationship;var IfcResourceApprovalRelationship=/*#__PURE__*/function(_IfcResourceLevelRela8){_inherits(IfcResourceApprovalRelationship,_IfcResourceLevelRela8);var _super1036=_createSuper(IfcResourceApprovalRelationship);function IfcResourceApprovalRelationship(expressID,Name,Description,RelatedResourceObjects,RelatingApproval){var _this1033;_classCallCheck(this,IfcResourceApprovalRelationship);_this1033=_super1036.call(this,expressID,Name,Description);_this1033.Name=Name;_this1033.Description=Description;_this1033.RelatedResourceObjects=RelatedResourceObjects;_this1033.RelatingApproval=RelatingApproval;_this1033.type=2943643501;return _this1033;}return _createClass(IfcResourceApprovalRelationship);}(IfcResourceLevelRelationship);IFC42.IfcResourceApprovalRelationship=IfcResourceApprovalRelationship;var IfcResourceConstraintRelationship=/*#__PURE__*/function(_IfcResourceLevelRela9){_inherits(IfcResourceConstraintRelationship,_IfcResourceLevelRela9);var _super1037=_createSuper(IfcResourceConstraintRelationship);function IfcResourceConstraintRelationship(expressID,Name,Description,RelatingConstraint,RelatedResourceObjects){var _this1034;_classCallCheck(this,IfcResourceConstraintRelationship);_this1034=_super1037.call(this,expressID,Name,Description);_this1034.Name=Name;_this1034.Description=Description;_this1034.RelatingConstraint=RelatingConstraint;_this1034.RelatedResourceObjects=RelatedResourceObjects;_this1034.type=1608871552;return _this1034;}return _createClass(IfcResourceConstraintRelationship);}(IfcResourceLevelRelationship);IFC42.IfcResourceConstraintRelationship=IfcResourceConstraintRelationship;var IfcResourceTime=/*#__PURE__*/function(_IfcSchedulingTime5){_inherits(IfcResourceTime,_IfcSchedulingTime5);var _super1038=_createSuper(IfcResourceTime);function IfcResourceTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,ScheduleWork,ScheduleUsage,ScheduleStart,ScheduleFinish,ScheduleContour,LevelingDelay,IsOverAllocated,StatusTime,ActualWork,ActualUsage,ActualStart,ActualFinish,RemainingWork,RemainingUsage,Completion){var _this1035;_classCallCheck(this,IfcResourceTime);_this1035=_super1038.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this1035.Name=Name;_this1035.DataOrigin=DataOrigin;_this1035.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1035.ScheduleWork=ScheduleWork;_this1035.ScheduleUsage=ScheduleUsage;_this1035.ScheduleStart=ScheduleStart;_this1035.ScheduleFinish=ScheduleFinish;_this1035.ScheduleContour=ScheduleContour;_this1035.LevelingDelay=LevelingDelay;_this1035.IsOverAllocated=IsOverAllocated;_this1035.StatusTime=StatusTime;_this1035.ActualWork=ActualWork;_this1035.ActualUsage=ActualUsage;_this1035.ActualStart=ActualStart;_this1035.ActualFinish=ActualFinish;_this1035.RemainingWork=RemainingWork;_this1035.RemainingUsage=RemainingUsage;_this1035.Completion=Completion;_this1035.type=1042787934;return _this1035;}return _createClass(IfcResourceTime);}(IfcSchedulingTime);IFC42.IfcResourceTime=IfcResourceTime;var IfcRoundedRectangleProfileDef=/*#__PURE__*/function(_IfcRectangleProfileD3){_inherits(IfcRoundedRectangleProfileDef,_IfcRectangleProfileD3);var _super1039=_createSuper(IfcRoundedRectangleProfileDef);function IfcRoundedRectangleProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim,RoundingRadius){var _this1036;_classCallCheck(this,IfcRoundedRectangleProfileDef);_this1036=_super1039.call(this,expressID,ProfileType,ProfileName,Position,XDim,YDim);_this1036.ProfileType=ProfileType;_this1036.ProfileName=ProfileName;_this1036.Position=Position;_this1036.XDim=XDim;_this1036.YDim=YDim;_this1036.RoundingRadius=RoundingRadius;_this1036.type=2778083089;return _this1036;}return _createClass(IfcRoundedRectangleProfileDef);}(IfcRectangleProfileDef);IFC42.IfcRoundedRectangleProfileDef=IfcRoundedRectangleProfileDef;var IfcSectionProperties=/*#__PURE__*/function(_IfcPreDefinedPropert2){_inherits(IfcSectionProperties,_IfcPreDefinedPropert2);var _super1040=_createSuper(IfcSectionProperties);function IfcSectionProperties(expressID,SectionType,StartProfile,EndProfile){var _this1037;_classCallCheck(this,IfcSectionProperties);_this1037=_super1040.call(this,expressID);_this1037.SectionType=SectionType;_this1037.StartProfile=StartProfile;_this1037.EndProfile=EndProfile;_this1037.type=2042790032;return _this1037;}return _createClass(IfcSectionProperties);}(IfcPreDefinedProperties);IFC42.IfcSectionProperties=IfcSectionProperties;var IfcSectionReinforcementProperties=/*#__PURE__*/function(_IfcPreDefinedPropert3){_inherits(IfcSectionReinforcementProperties,_IfcPreDefinedPropert3);var _super1041=_createSuper(IfcSectionReinforcementProperties);function IfcSectionReinforcementProperties(expressID,LongitudinalStartPosition,LongitudinalEndPosition,TransversePosition,ReinforcementRole,SectionDefinition,CrossSectionReinforcementDefinitions){var _this1038;_classCallCheck(this,IfcSectionReinforcementProperties);_this1038=_super1041.call(this,expressID);_this1038.LongitudinalStartPosition=LongitudinalStartPosition;_this1038.LongitudinalEndPosition=LongitudinalEndPosition;_this1038.TransversePosition=TransversePosition;_this1038.ReinforcementRole=ReinforcementRole;_this1038.SectionDefinition=SectionDefinition;_this1038.CrossSectionReinforcementDefinitions=CrossSectionReinforcementDefinitions;_this1038.type=4165799628;return _this1038;}return _createClass(IfcSectionReinforcementProperties);}(IfcPreDefinedProperties);IFC42.IfcSectionReinforcementProperties=IfcSectionReinforcementProperties;var IfcSectionedSpine=/*#__PURE__*/function(_IfcGeometricRepresen37){_inherits(IfcSectionedSpine,_IfcGeometricRepresen37);var _super1042=_createSuper(IfcSectionedSpine);function IfcSectionedSpine(expressID,SpineCurve,CrossSections,CrossSectionPositions){var _this1039;_classCallCheck(this,IfcSectionedSpine);_this1039=_super1042.call(this,expressID);_this1039.SpineCurve=SpineCurve;_this1039.CrossSections=CrossSections;_this1039.CrossSectionPositions=CrossSectionPositions;_this1039.type=1509187699;return _this1039;}return _createClass(IfcSectionedSpine);}(IfcGeometricRepresentationItem);IFC42.IfcSectionedSpine=IfcSectionedSpine;var IfcShellBasedSurfaceModel=/*#__PURE__*/function(_IfcGeometricRepresen38){_inherits(IfcShellBasedSurfaceModel,_IfcGeometricRepresen38);var _super1043=_createSuper(IfcShellBasedSurfaceModel);function IfcShellBasedSurfaceModel(expressID,SbsmBoundary){var _this1040;_classCallCheck(this,IfcShellBasedSurfaceModel);_this1040=_super1043.call(this,expressID);_this1040.SbsmBoundary=SbsmBoundary;_this1040.type=4124623270;return _this1040;}return _createClass(IfcShellBasedSurfaceModel);}(IfcGeometricRepresentationItem);IFC42.IfcShellBasedSurfaceModel=IfcShellBasedSurfaceModel;var IfcSimpleProperty=/*#__PURE__*/function(_IfcProperty3){_inherits(IfcSimpleProperty,_IfcProperty3);var _super1044=_createSuper(IfcSimpleProperty);function IfcSimpleProperty(expressID,Name,Description){var _this1041;_classCallCheck(this,IfcSimpleProperty);_this1041=_super1044.call(this,expressID,Name,Description);_this1041.Name=Name;_this1041.Description=Description;_this1041.type=3692461612;return _this1041;}return _createClass(IfcSimpleProperty);}(IfcProperty);IFC42.IfcSimpleProperty=IfcSimpleProperty;var IfcSlippageConnectionCondition=/*#__PURE__*/function(_IfcStructuralConnect7){_inherits(IfcSlippageConnectionCondition,_IfcStructuralConnect7);var _super1045=_createSuper(IfcSlippageConnectionCondition);function IfcSlippageConnectionCondition(expressID,Name,SlippageX,SlippageY,SlippageZ){var _this1042;_classCallCheck(this,IfcSlippageConnectionCondition);_this1042=_super1045.call(this,expressID,Name);_this1042.Name=Name;_this1042.SlippageX=SlippageX;_this1042.SlippageY=SlippageY;_this1042.SlippageZ=SlippageZ;_this1042.type=2609359061;return _this1042;}return _createClass(IfcSlippageConnectionCondition);}(IfcStructuralConnectionCondition);IFC42.IfcSlippageConnectionCondition=IfcSlippageConnectionCondition;var IfcSolidModel=/*#__PURE__*/function(_IfcGeometricRepresen39){_inherits(IfcSolidModel,_IfcGeometricRepresen39);var _super1046=_createSuper(IfcSolidModel);function IfcSolidModel(expressID){var _this1043;_classCallCheck(this,IfcSolidModel);_this1043=_super1046.call(this,expressID);_this1043.type=723233188;return _this1043;}return _createClass(IfcSolidModel);}(IfcGeometricRepresentationItem);IFC42.IfcSolidModel=IfcSolidModel;var IfcStructuralLoadLinearForce=/*#__PURE__*/function(_IfcStructuralLoadSta7){_inherits(IfcStructuralLoadLinearForce,_IfcStructuralLoadSta7);var _super1047=_createSuper(IfcStructuralLoadLinearForce);function IfcStructuralLoadLinearForce(expressID,Name,LinearForceX,LinearForceY,LinearForceZ,LinearMomentX,LinearMomentY,LinearMomentZ){var _this1044;_classCallCheck(this,IfcStructuralLoadLinearForce);_this1044=_super1047.call(this,expressID,Name);_this1044.Name=Name;_this1044.LinearForceX=LinearForceX;_this1044.LinearForceY=LinearForceY;_this1044.LinearForceZ=LinearForceZ;_this1044.LinearMomentX=LinearMomentX;_this1044.LinearMomentY=LinearMomentY;_this1044.LinearMomentZ=LinearMomentZ;_this1044.type=1595516126;return _this1044;}return _createClass(IfcStructuralLoadLinearForce);}(IfcStructuralLoadStatic);IFC42.IfcStructuralLoadLinearForce=IfcStructuralLoadLinearForce;var IfcStructuralLoadPlanarForce=/*#__PURE__*/function(_IfcStructuralLoadSta8){_inherits(IfcStructuralLoadPlanarForce,_IfcStructuralLoadSta8);var _super1048=_createSuper(IfcStructuralLoadPlanarForce);function IfcStructuralLoadPlanarForce(expressID,Name,PlanarForceX,PlanarForceY,PlanarForceZ){var _this1045;_classCallCheck(this,IfcStructuralLoadPlanarForce);_this1045=_super1048.call(this,expressID,Name);_this1045.Name=Name;_this1045.PlanarForceX=PlanarForceX;_this1045.PlanarForceY=PlanarForceY;_this1045.PlanarForceZ=PlanarForceZ;_this1045.type=2668620305;return _this1045;}return _createClass(IfcStructuralLoadPlanarForce);}(IfcStructuralLoadStatic);IFC42.IfcStructuralLoadPlanarForce=IfcStructuralLoadPlanarForce;var IfcStructuralLoadSingleDisplacement=/*#__PURE__*/function(_IfcStructuralLoadSta9){_inherits(IfcStructuralLoadSingleDisplacement,_IfcStructuralLoadSta9);var _super1049=_createSuper(IfcStructuralLoadSingleDisplacement);function IfcStructuralLoadSingleDisplacement(expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ){var _this1046;_classCallCheck(this,IfcStructuralLoadSingleDisplacement);_this1046=_super1049.call(this,expressID,Name);_this1046.Name=Name;_this1046.DisplacementX=DisplacementX;_this1046.DisplacementY=DisplacementY;_this1046.DisplacementZ=DisplacementZ;_this1046.RotationalDisplacementRX=RotationalDisplacementRX;_this1046.RotationalDisplacementRY=RotationalDisplacementRY;_this1046.RotationalDisplacementRZ=RotationalDisplacementRZ;_this1046.type=2473145415;return _this1046;}return _createClass(IfcStructuralLoadSingleDisplacement);}(IfcStructuralLoadStatic);IFC42.IfcStructuralLoadSingleDisplacement=IfcStructuralLoadSingleDisplacement;var IfcStructuralLoadSingleDisplacementDistortion=/*#__PURE__*/function(_IfcStructuralLoadSin3){_inherits(IfcStructuralLoadSingleDisplacementDistortion,_IfcStructuralLoadSin3);var _super1050=_createSuper(IfcStructuralLoadSingleDisplacementDistortion);function IfcStructuralLoadSingleDisplacementDistortion(expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ,Distortion){var _this1047;_classCallCheck(this,IfcStructuralLoadSingleDisplacementDistortion);_this1047=_super1050.call(this,expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ);_this1047.Name=Name;_this1047.DisplacementX=DisplacementX;_this1047.DisplacementY=DisplacementY;_this1047.DisplacementZ=DisplacementZ;_this1047.RotationalDisplacementRX=RotationalDisplacementRX;_this1047.RotationalDisplacementRY=RotationalDisplacementRY;_this1047.RotationalDisplacementRZ=RotationalDisplacementRZ;_this1047.Distortion=Distortion;_this1047.type=1973038258;return _this1047;}return _createClass(IfcStructuralLoadSingleDisplacementDistortion);}(IfcStructuralLoadSingleDisplacement);IFC42.IfcStructuralLoadSingleDisplacementDistortion=IfcStructuralLoadSingleDisplacementDistortion;var IfcStructuralLoadSingleForce=/*#__PURE__*/function(_IfcStructuralLoadSta10){_inherits(IfcStructuralLoadSingleForce,_IfcStructuralLoadSta10);var _super1051=_createSuper(IfcStructuralLoadSingleForce);function IfcStructuralLoadSingleForce(expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ){var _this1048;_classCallCheck(this,IfcStructuralLoadSingleForce);_this1048=_super1051.call(this,expressID,Name);_this1048.Name=Name;_this1048.ForceX=ForceX;_this1048.ForceY=ForceY;_this1048.ForceZ=ForceZ;_this1048.MomentX=MomentX;_this1048.MomentY=MomentY;_this1048.MomentZ=MomentZ;_this1048.type=1597423693;return _this1048;}return _createClass(IfcStructuralLoadSingleForce);}(IfcStructuralLoadStatic);IFC42.IfcStructuralLoadSingleForce=IfcStructuralLoadSingleForce;var IfcStructuralLoadSingleForceWarping=/*#__PURE__*/function(_IfcStructuralLoadSin4){_inherits(IfcStructuralLoadSingleForceWarping,_IfcStructuralLoadSin4);var _super1052=_createSuper(IfcStructuralLoadSingleForceWarping);function IfcStructuralLoadSingleForceWarping(expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ,WarpingMoment){var _this1049;_classCallCheck(this,IfcStructuralLoadSingleForceWarping);_this1049=_super1052.call(this,expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ);_this1049.Name=Name;_this1049.ForceX=ForceX;_this1049.ForceY=ForceY;_this1049.ForceZ=ForceZ;_this1049.MomentX=MomentX;_this1049.MomentY=MomentY;_this1049.MomentZ=MomentZ;_this1049.WarpingMoment=WarpingMoment;_this1049.type=1190533807;return _this1049;}return _createClass(IfcStructuralLoadSingleForceWarping);}(IfcStructuralLoadSingleForce);IFC42.IfcStructuralLoadSingleForceWarping=IfcStructuralLoadSingleForceWarping;var IfcSubedge=/*#__PURE__*/function(_IfcEdge6){_inherits(IfcSubedge,_IfcEdge6);var _super1053=_createSuper(IfcSubedge);function IfcSubedge(expressID,EdgeStart,EdgeEnd,ParentEdge){var _this1050;_classCallCheck(this,IfcSubedge);_this1050=_super1053.call(this,expressID,EdgeStart,EdgeEnd);_this1050.EdgeStart=EdgeStart;_this1050.EdgeEnd=EdgeEnd;_this1050.ParentEdge=ParentEdge;_this1050.type=2233826070;return _this1050;}return _createClass(IfcSubedge);}(IfcEdge);IFC42.IfcSubedge=IfcSubedge;var IfcSurface=/*#__PURE__*/function(_IfcGeometricRepresen40){_inherits(IfcSurface,_IfcGeometricRepresen40);var _super1054=_createSuper(IfcSurface);function IfcSurface(expressID){var _this1051;_classCallCheck(this,IfcSurface);_this1051=_super1054.call(this,expressID);_this1051.type=2513912981;return _this1051;}return _createClass(IfcSurface);}(IfcGeometricRepresentationItem);IFC42.IfcSurface=IfcSurface;var IfcSurfaceStyleRendering=/*#__PURE__*/function(_IfcSurfaceStyleShadi2){_inherits(IfcSurfaceStyleRendering,_IfcSurfaceStyleShadi2);var _super1055=_createSuper(IfcSurfaceStyleRendering);function IfcSurfaceStyleRendering(expressID,SurfaceColour,Transparency,DiffuseColour,TransmissionColour,DiffuseTransmissionColour,ReflectionColour,SpecularColour,SpecularHighlight,ReflectanceMethod){var _this1052;_classCallCheck(this,IfcSurfaceStyleRendering);_this1052=_super1055.call(this,expressID,SurfaceColour,Transparency);_this1052.SurfaceColour=SurfaceColour;_this1052.Transparency=Transparency;_this1052.DiffuseColour=DiffuseColour;_this1052.TransmissionColour=TransmissionColour;_this1052.DiffuseTransmissionColour=DiffuseTransmissionColour;_this1052.ReflectionColour=ReflectionColour;_this1052.SpecularColour=SpecularColour;_this1052.SpecularHighlight=SpecularHighlight;_this1052.ReflectanceMethod=ReflectanceMethod;_this1052.type=1878645084;return _this1052;}return _createClass(IfcSurfaceStyleRendering);}(IfcSurfaceStyleShading);IFC42.IfcSurfaceStyleRendering=IfcSurfaceStyleRendering;var IfcSweptAreaSolid=/*#__PURE__*/function(_IfcSolidModel5){_inherits(IfcSweptAreaSolid,_IfcSolidModel5);var _super1056=_createSuper(IfcSweptAreaSolid);function IfcSweptAreaSolid(expressID,SweptArea,Position){var _this1053;_classCallCheck(this,IfcSweptAreaSolid);_this1053=_super1056.call(this,expressID);_this1053.SweptArea=SweptArea;_this1053.Position=Position;_this1053.type=2247615214;return _this1053;}return _createClass(IfcSweptAreaSolid);}(IfcSolidModel);IFC42.IfcSweptAreaSolid=IfcSweptAreaSolid;var IfcSweptDiskSolid=/*#__PURE__*/function(_IfcSolidModel6){_inherits(IfcSweptDiskSolid,_IfcSolidModel6);var _super1057=_createSuper(IfcSweptDiskSolid);function IfcSweptDiskSolid(expressID,Directrix,Radius,InnerRadius,StartParam,EndParam){var _this1054;_classCallCheck(this,IfcSweptDiskSolid);_this1054=_super1057.call(this,expressID);_this1054.Directrix=Directrix;_this1054.Radius=Radius;_this1054.InnerRadius=InnerRadius;_this1054.StartParam=StartParam;_this1054.EndParam=EndParam;_this1054.type=1260650574;return _this1054;}return _createClass(IfcSweptDiskSolid);}(IfcSolidModel);IFC42.IfcSweptDiskSolid=IfcSweptDiskSolid;var IfcSweptDiskSolidPolygonal=/*#__PURE__*/function(_IfcSweptDiskSolid){_inherits(IfcSweptDiskSolidPolygonal,_IfcSweptDiskSolid);var _super1058=_createSuper(IfcSweptDiskSolidPolygonal);function IfcSweptDiskSolidPolygonal(expressID,Directrix,Radius,InnerRadius,StartParam,EndParam,FilletRadius){var _this1055;_classCallCheck(this,IfcSweptDiskSolidPolygonal);_this1055=_super1058.call(this,expressID,Directrix,Radius,InnerRadius,StartParam,EndParam);_this1055.Directrix=Directrix;_this1055.Radius=Radius;_this1055.InnerRadius=InnerRadius;_this1055.StartParam=StartParam;_this1055.EndParam=EndParam;_this1055.FilletRadius=FilletRadius;_this1055.type=1096409881;return _this1055;}return _createClass(IfcSweptDiskSolidPolygonal);}(IfcSweptDiskSolid);IFC42.IfcSweptDiskSolidPolygonal=IfcSweptDiskSolidPolygonal;var IfcSweptSurface=/*#__PURE__*/function(_IfcSurface4){_inherits(IfcSweptSurface,_IfcSurface4);var _super1059=_createSuper(IfcSweptSurface);function IfcSweptSurface(expressID,SweptCurve,Position){var _this1056;_classCallCheck(this,IfcSweptSurface);_this1056=_super1059.call(this,expressID);_this1056.SweptCurve=SweptCurve;_this1056.Position=Position;_this1056.type=230924584;return _this1056;}return _createClass(IfcSweptSurface);}(IfcSurface);IFC42.IfcSweptSurface=IfcSweptSurface;var IfcTShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf14){_inherits(IfcTShapeProfileDef,_IfcParameterizedProf14);var _super1060=_createSuper(IfcTShapeProfileDef);function IfcTShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,FlangeEdgeRadius,WebEdgeRadius,WebSlope,FlangeSlope){var _this1057;_classCallCheck(this,IfcTShapeProfileDef);_this1057=_super1060.call(this,expressID,ProfileType,ProfileName,Position);_this1057.ProfileType=ProfileType;_this1057.ProfileName=ProfileName;_this1057.Position=Position;_this1057.Depth=Depth;_this1057.FlangeWidth=FlangeWidth;_this1057.WebThickness=WebThickness;_this1057.FlangeThickness=FlangeThickness;_this1057.FilletRadius=FilletRadius;_this1057.FlangeEdgeRadius=FlangeEdgeRadius;_this1057.WebEdgeRadius=WebEdgeRadius;_this1057.WebSlope=WebSlope;_this1057.FlangeSlope=FlangeSlope;_this1057.type=3071757647;return _this1057;}return _createClass(IfcTShapeProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcTShapeProfileDef=IfcTShapeProfileDef;var IfcTessellatedItem=/*#__PURE__*/function(_IfcGeometricRepresen41){_inherits(IfcTessellatedItem,_IfcGeometricRepresen41);var _super1061=_createSuper(IfcTessellatedItem);function IfcTessellatedItem(expressID){var _this1058;_classCallCheck(this,IfcTessellatedItem);_this1058=_super1061.call(this,expressID);_this1058.type=901063453;return _this1058;}return _createClass(IfcTessellatedItem);}(IfcGeometricRepresentationItem);IFC42.IfcTessellatedItem=IfcTessellatedItem;var IfcTextLiteral=/*#__PURE__*/function(_IfcGeometricRepresen42){_inherits(IfcTextLiteral,_IfcGeometricRepresen42);var _super1062=_createSuper(IfcTextLiteral);function IfcTextLiteral(expressID,Literal,Placement,Path){var _this1059;_classCallCheck(this,IfcTextLiteral);_this1059=_super1062.call(this,expressID);_this1059.Literal=Literal;_this1059.Placement=Placement;_this1059.Path=Path;_this1059.type=4282788508;return _this1059;}return _createClass(IfcTextLiteral);}(IfcGeometricRepresentationItem);IFC42.IfcTextLiteral=IfcTextLiteral;var IfcTextLiteralWithExtent=/*#__PURE__*/function(_IfcTextLiteral2){_inherits(IfcTextLiteralWithExtent,_IfcTextLiteral2);var _super1063=_createSuper(IfcTextLiteralWithExtent);function IfcTextLiteralWithExtent(expressID,Literal,Placement,Path,Extent,BoxAlignment){var _this1060;_classCallCheck(this,IfcTextLiteralWithExtent);_this1060=_super1063.call(this,expressID,Literal,Placement,Path);_this1060.Literal=Literal;_this1060.Placement=Placement;_this1060.Path=Path;_this1060.Extent=Extent;_this1060.BoxAlignment=BoxAlignment;_this1060.type=3124975700;return _this1060;}return _createClass(IfcTextLiteralWithExtent);}(IfcTextLiteral);IFC42.IfcTextLiteralWithExtent=IfcTextLiteralWithExtent;var IfcTextStyleFontModel=/*#__PURE__*/function(_IfcPreDefinedTextFon3){_inherits(IfcTextStyleFontModel,_IfcPreDefinedTextFon3);var _super1064=_createSuper(IfcTextStyleFontModel);function IfcTextStyleFontModel(expressID,Name,FontFamily,FontStyle,FontVariant,FontWeight,FontSize){var _this1061;_classCallCheck(this,IfcTextStyleFontModel);_this1061=_super1064.call(this,expressID,Name);_this1061.Name=Name;_this1061.FontFamily=FontFamily;_this1061.FontStyle=FontStyle;_this1061.FontVariant=FontVariant;_this1061.FontWeight=FontWeight;_this1061.FontSize=FontSize;_this1061.type=1983826977;return _this1061;}return _createClass(IfcTextStyleFontModel);}(IfcPreDefinedTextFont);IFC42.IfcTextStyleFontModel=IfcTextStyleFontModel;var IfcTrapeziumProfileDef=/*#__PURE__*/function(_IfcParameterizedProf15){_inherits(IfcTrapeziumProfileDef,_IfcParameterizedProf15);var _super1065=_createSuper(IfcTrapeziumProfileDef);function IfcTrapeziumProfileDef(expressID,ProfileType,ProfileName,Position,BottomXDim,TopXDim,YDim,TopXOffset){var _this1062;_classCallCheck(this,IfcTrapeziumProfileDef);_this1062=_super1065.call(this,expressID,ProfileType,ProfileName,Position);_this1062.ProfileType=ProfileType;_this1062.ProfileName=ProfileName;_this1062.Position=Position;_this1062.BottomXDim=BottomXDim;_this1062.TopXDim=TopXDim;_this1062.YDim=YDim;_this1062.TopXOffset=TopXOffset;_this1062.type=2715220739;return _this1062;}return _createClass(IfcTrapeziumProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcTrapeziumProfileDef=IfcTrapeziumProfileDef;var IfcTypeObject=/*#__PURE__*/function(_IfcObjectDefinition3){_inherits(IfcTypeObject,_IfcObjectDefinition3);var _super1066=_createSuper(IfcTypeObject);function IfcTypeObject(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets){var _this1063;_classCallCheck(this,IfcTypeObject);_this1063=_super1066.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1063.GlobalId=GlobalId;_this1063.OwnerHistory=OwnerHistory;_this1063.Name=Name;_this1063.Description=Description;_this1063.ApplicableOccurrence=ApplicableOccurrence;_this1063.HasPropertySets=HasPropertySets;_this1063.type=1628702193;return _this1063;}return _createClass(IfcTypeObject);}(IfcObjectDefinition);IFC42.IfcTypeObject=IfcTypeObject;var IfcTypeProcess=/*#__PURE__*/function(_IfcTypeObject2){_inherits(IfcTypeProcess,_IfcTypeObject2);var _super1067=_createSuper(IfcTypeProcess);function IfcTypeProcess(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType){var _this1064;_classCallCheck(this,IfcTypeProcess);_this1064=_super1067.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets);_this1064.GlobalId=GlobalId;_this1064.OwnerHistory=OwnerHistory;_this1064.Name=Name;_this1064.Description=Description;_this1064.ApplicableOccurrence=ApplicableOccurrence;_this1064.HasPropertySets=HasPropertySets;_this1064.Identification=Identification;_this1064.LongDescription=LongDescription;_this1064.ProcessType=ProcessType;_this1064.type=3736923433;return _this1064;}return _createClass(IfcTypeProcess);}(IfcTypeObject);IFC42.IfcTypeProcess=IfcTypeProcess;var IfcTypeProduct=/*#__PURE__*/function(_IfcTypeObject3){_inherits(IfcTypeProduct,_IfcTypeObject3);var _super1068=_createSuper(IfcTypeProduct);function IfcTypeProduct(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag){var _this1065;_classCallCheck(this,IfcTypeProduct);_this1065=_super1068.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets);_this1065.GlobalId=GlobalId;_this1065.OwnerHistory=OwnerHistory;_this1065.Name=Name;_this1065.Description=Description;_this1065.ApplicableOccurrence=ApplicableOccurrence;_this1065.HasPropertySets=HasPropertySets;_this1065.RepresentationMaps=RepresentationMaps;_this1065.Tag=Tag;_this1065.type=2347495698;return _this1065;}return _createClass(IfcTypeProduct);}(IfcTypeObject);IFC42.IfcTypeProduct=IfcTypeProduct;var IfcTypeResource=/*#__PURE__*/function(_IfcTypeObject4){_inherits(IfcTypeResource,_IfcTypeObject4);var _super1069=_createSuper(IfcTypeResource);function IfcTypeResource(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType){var _this1066;_classCallCheck(this,IfcTypeResource);_this1066=_super1069.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets);_this1066.GlobalId=GlobalId;_this1066.OwnerHistory=OwnerHistory;_this1066.Name=Name;_this1066.Description=Description;_this1066.ApplicableOccurrence=ApplicableOccurrence;_this1066.HasPropertySets=HasPropertySets;_this1066.Identification=Identification;_this1066.LongDescription=LongDescription;_this1066.ResourceType=ResourceType;_this1066.type=3698973494;return _this1066;}return _createClass(IfcTypeResource);}(IfcTypeObject);IFC42.IfcTypeResource=IfcTypeResource;var IfcUShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf16){_inherits(IfcUShapeProfileDef,_IfcParameterizedProf16);var _super1070=_createSuper(IfcUShapeProfileDef);function IfcUShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,EdgeRadius,FlangeSlope){var _this1067;_classCallCheck(this,IfcUShapeProfileDef);_this1067=_super1070.call(this,expressID,ProfileType,ProfileName,Position);_this1067.ProfileType=ProfileType;_this1067.ProfileName=ProfileName;_this1067.Position=Position;_this1067.Depth=Depth;_this1067.FlangeWidth=FlangeWidth;_this1067.WebThickness=WebThickness;_this1067.FlangeThickness=FlangeThickness;_this1067.FilletRadius=FilletRadius;_this1067.EdgeRadius=EdgeRadius;_this1067.FlangeSlope=FlangeSlope;_this1067.type=427810014;return _this1067;}return _createClass(IfcUShapeProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcUShapeProfileDef=IfcUShapeProfileDef;var IfcVector=/*#__PURE__*/function(_IfcGeometricRepresen43){_inherits(IfcVector,_IfcGeometricRepresen43);var _super1071=_createSuper(IfcVector);function IfcVector(expressID,Orientation,Magnitude){var _this1068;_classCallCheck(this,IfcVector);_this1068=_super1071.call(this,expressID);_this1068.Orientation=Orientation;_this1068.Magnitude=Magnitude;_this1068.type=1417489154;return _this1068;}return _createClass(IfcVector);}(IfcGeometricRepresentationItem);IFC42.IfcVector=IfcVector;var IfcVertexLoop=/*#__PURE__*/function(_IfcLoop5){_inherits(IfcVertexLoop,_IfcLoop5);var _super1072=_createSuper(IfcVertexLoop);function IfcVertexLoop(expressID,LoopVertex){var _this1069;_classCallCheck(this,IfcVertexLoop);_this1069=_super1072.call(this,expressID);_this1069.LoopVertex=LoopVertex;_this1069.type=2759199220;return _this1069;}return _createClass(IfcVertexLoop);}(IfcLoop);IFC42.IfcVertexLoop=IfcVertexLoop;var IfcWindowStyle=/*#__PURE__*/function(_IfcTypeProduct4){_inherits(IfcWindowStyle,_IfcTypeProduct4);var _super1073=_createSuper(IfcWindowStyle);function IfcWindowStyle(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ConstructionType,OperationType,ParameterTakesPrecedence,Sizeable){var _this1070;_classCallCheck(this,IfcWindowStyle);_this1070=_super1073.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this1070.GlobalId=GlobalId;_this1070.OwnerHistory=OwnerHistory;_this1070.Name=Name;_this1070.Description=Description;_this1070.ApplicableOccurrence=ApplicableOccurrence;_this1070.HasPropertySets=HasPropertySets;_this1070.RepresentationMaps=RepresentationMaps;_this1070.Tag=Tag;_this1070.ConstructionType=ConstructionType;_this1070.OperationType=OperationType;_this1070.ParameterTakesPrecedence=ParameterTakesPrecedence;_this1070.Sizeable=Sizeable;_this1070.type=1299126871;return _this1070;}return _createClass(IfcWindowStyle);}(IfcTypeProduct);IFC42.IfcWindowStyle=IfcWindowStyle;var IfcZShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf17){_inherits(IfcZShapeProfileDef,_IfcParameterizedProf17);var _super1074=_createSuper(IfcZShapeProfileDef);function IfcZShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,EdgeRadius){var _this1071;_classCallCheck(this,IfcZShapeProfileDef);_this1071=_super1074.call(this,expressID,ProfileType,ProfileName,Position);_this1071.ProfileType=ProfileType;_this1071.ProfileName=ProfileName;_this1071.Position=Position;_this1071.Depth=Depth;_this1071.FlangeWidth=FlangeWidth;_this1071.WebThickness=WebThickness;_this1071.FlangeThickness=FlangeThickness;_this1071.FilletRadius=FilletRadius;_this1071.EdgeRadius=EdgeRadius;_this1071.type=2543172580;return _this1071;}return _createClass(IfcZShapeProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcZShapeProfileDef=IfcZShapeProfileDef;var IfcAdvancedFace=/*#__PURE__*/function(_IfcFaceSurface){_inherits(IfcAdvancedFace,_IfcFaceSurface);var _super1075=_createSuper(IfcAdvancedFace);function IfcAdvancedFace(expressID,Bounds,FaceSurface,SameSense){var _this1072;_classCallCheck(this,IfcAdvancedFace);_this1072=_super1075.call(this,expressID,Bounds,FaceSurface,SameSense);_this1072.Bounds=Bounds;_this1072.FaceSurface=FaceSurface;_this1072.SameSense=SameSense;_this1072.type=3406155212;return _this1072;}return _createClass(IfcAdvancedFace);}(IfcFaceSurface);IFC42.IfcAdvancedFace=IfcAdvancedFace;var IfcAnnotationFillArea=/*#__PURE__*/function(_IfcGeometricRepresen44){_inherits(IfcAnnotationFillArea,_IfcGeometricRepresen44);var _super1076=_createSuper(IfcAnnotationFillArea);function IfcAnnotationFillArea(expressID,OuterBoundary,InnerBoundaries){var _this1073;_classCallCheck(this,IfcAnnotationFillArea);_this1073=_super1076.call(this,expressID);_this1073.OuterBoundary=OuterBoundary;_this1073.InnerBoundaries=InnerBoundaries;_this1073.type=669184980;return _this1073;}return _createClass(IfcAnnotationFillArea);}(IfcGeometricRepresentationItem);IFC42.IfcAnnotationFillArea=IfcAnnotationFillArea;var IfcAsymmetricIShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf18){_inherits(IfcAsymmetricIShapeProfileDef,_IfcParameterizedProf18);var _super1077=_createSuper(IfcAsymmetricIShapeProfileDef);function IfcAsymmetricIShapeProfileDef(expressID,ProfileType,ProfileName,Position,BottomFlangeWidth,OverallDepth,WebThickness,BottomFlangeThickness,BottomFlangeFilletRadius,TopFlangeWidth,TopFlangeThickness,TopFlangeFilletRadius,BottomFlangeEdgeRadius,BottomFlangeSlope,TopFlangeEdgeRadius,TopFlangeSlope){var _this1074;_classCallCheck(this,IfcAsymmetricIShapeProfileDef);_this1074=_super1077.call(this,expressID,ProfileType,ProfileName,Position);_this1074.ProfileType=ProfileType;_this1074.ProfileName=ProfileName;_this1074.Position=Position;_this1074.BottomFlangeWidth=BottomFlangeWidth;_this1074.OverallDepth=OverallDepth;_this1074.WebThickness=WebThickness;_this1074.BottomFlangeThickness=BottomFlangeThickness;_this1074.BottomFlangeFilletRadius=BottomFlangeFilletRadius;_this1074.TopFlangeWidth=TopFlangeWidth;_this1074.TopFlangeThickness=TopFlangeThickness;_this1074.TopFlangeFilletRadius=TopFlangeFilletRadius;_this1074.BottomFlangeEdgeRadius=BottomFlangeEdgeRadius;_this1074.BottomFlangeSlope=BottomFlangeSlope;_this1074.TopFlangeEdgeRadius=TopFlangeEdgeRadius;_this1074.TopFlangeSlope=TopFlangeSlope;_this1074.type=3207858831;return _this1074;}return _createClass(IfcAsymmetricIShapeProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcAsymmetricIShapeProfileDef=IfcAsymmetricIShapeProfileDef;var IfcAxis1Placement=/*#__PURE__*/function(_IfcPlacement4){_inherits(IfcAxis1Placement,_IfcPlacement4);var _super1078=_createSuper(IfcAxis1Placement);function IfcAxis1Placement(expressID,Location,Axis){var _this1075;_classCallCheck(this,IfcAxis1Placement);_this1075=_super1078.call(this,expressID,Location);_this1075.Location=Location;_this1075.Axis=Axis;_this1075.type=4261334040;return _this1075;}return _createClass(IfcAxis1Placement);}(IfcPlacement);IFC42.IfcAxis1Placement=IfcAxis1Placement;var IfcAxis2Placement2D=/*#__PURE__*/function(_IfcPlacement5){_inherits(IfcAxis2Placement2D,_IfcPlacement5);var _super1079=_createSuper(IfcAxis2Placement2D);function IfcAxis2Placement2D(expressID,Location,RefDirection){var _this1076;_classCallCheck(this,IfcAxis2Placement2D);_this1076=_super1079.call(this,expressID,Location);_this1076.Location=Location;_this1076.RefDirection=RefDirection;_this1076.type=3125803723;return _this1076;}return _createClass(IfcAxis2Placement2D);}(IfcPlacement);IFC42.IfcAxis2Placement2D=IfcAxis2Placement2D;var IfcAxis2Placement3D=/*#__PURE__*/function(_IfcPlacement6){_inherits(IfcAxis2Placement3D,_IfcPlacement6);var _super1080=_createSuper(IfcAxis2Placement3D);function IfcAxis2Placement3D(expressID,Location,Axis,RefDirection){var _this1077;_classCallCheck(this,IfcAxis2Placement3D);_this1077=_super1080.call(this,expressID,Location);_this1077.Location=Location;_this1077.Axis=Axis;_this1077.RefDirection=RefDirection;_this1077.type=2740243338;return _this1077;}return _createClass(IfcAxis2Placement3D);}(IfcPlacement);IFC42.IfcAxis2Placement3D=IfcAxis2Placement3D;var IfcBooleanResult=/*#__PURE__*/function(_IfcGeometricRepresen45){_inherits(IfcBooleanResult,_IfcGeometricRepresen45);var _super1081=_createSuper(IfcBooleanResult);function IfcBooleanResult(expressID,Operator,FirstOperand,SecondOperand){var _this1078;_classCallCheck(this,IfcBooleanResult);_this1078=_super1081.call(this,expressID);_this1078.Operator=Operator;_this1078.FirstOperand=FirstOperand;_this1078.SecondOperand=SecondOperand;_this1078.type=2736907675;return _this1078;}return _createClass(IfcBooleanResult);}(IfcGeometricRepresentationItem);IFC42.IfcBooleanResult=IfcBooleanResult;var IfcBoundedSurface=/*#__PURE__*/function(_IfcSurface5){_inherits(IfcBoundedSurface,_IfcSurface5);var _super1082=_createSuper(IfcBoundedSurface);function IfcBoundedSurface(expressID){var _this1079;_classCallCheck(this,IfcBoundedSurface);_this1079=_super1082.call(this,expressID);_this1079.type=4182860854;return _this1079;}return _createClass(IfcBoundedSurface);}(IfcSurface);IFC42.IfcBoundedSurface=IfcBoundedSurface;var IfcBoundingBox=/*#__PURE__*/function(_IfcGeometricRepresen46){_inherits(IfcBoundingBox,_IfcGeometricRepresen46);var _super1083=_createSuper(IfcBoundingBox);function IfcBoundingBox(expressID,Corner,XDim,YDim,ZDim){var _this1080;_classCallCheck(this,IfcBoundingBox);_this1080=_super1083.call(this,expressID);_this1080.Corner=Corner;_this1080.XDim=XDim;_this1080.YDim=YDim;_this1080.ZDim=ZDim;_this1080.type=2581212453;return _this1080;}return _createClass(IfcBoundingBox);}(IfcGeometricRepresentationItem);IFC42.IfcBoundingBox=IfcBoundingBox;var IfcBoxedHalfSpace=/*#__PURE__*/function(_IfcHalfSpaceSolid4){_inherits(IfcBoxedHalfSpace,_IfcHalfSpaceSolid4);var _super1084=_createSuper(IfcBoxedHalfSpace);function IfcBoxedHalfSpace(expressID,BaseSurface,AgreementFlag,Enclosure){var _this1081;_classCallCheck(this,IfcBoxedHalfSpace);_this1081=_super1084.call(this,expressID,BaseSurface,AgreementFlag);_this1081.BaseSurface=BaseSurface;_this1081.AgreementFlag=AgreementFlag;_this1081.Enclosure=Enclosure;_this1081.type=2713105998;return _this1081;}return _createClass(IfcBoxedHalfSpace);}(IfcHalfSpaceSolid);IFC42.IfcBoxedHalfSpace=IfcBoxedHalfSpace;var IfcCShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf19){_inherits(IfcCShapeProfileDef,_IfcParameterizedProf19);var _super1085=_createSuper(IfcCShapeProfileDef);function IfcCShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,Width,WallThickness,Girth,InternalFilletRadius){var _this1082;_classCallCheck(this,IfcCShapeProfileDef);_this1082=_super1085.call(this,expressID,ProfileType,ProfileName,Position);_this1082.ProfileType=ProfileType;_this1082.ProfileName=ProfileName;_this1082.Position=Position;_this1082.Depth=Depth;_this1082.Width=Width;_this1082.WallThickness=WallThickness;_this1082.Girth=Girth;_this1082.InternalFilletRadius=InternalFilletRadius;_this1082.type=2898889636;return _this1082;}return _createClass(IfcCShapeProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcCShapeProfileDef=IfcCShapeProfileDef;var IfcCartesianPoint=/*#__PURE__*/function(_IfcPoint6){_inherits(IfcCartesianPoint,_IfcPoint6);var _super1086=_createSuper(IfcCartesianPoint);function IfcCartesianPoint(expressID,Coordinates){var _this1083;_classCallCheck(this,IfcCartesianPoint);_this1083=_super1086.call(this,expressID);_this1083.Coordinates=Coordinates;_this1083.type=1123145078;return _this1083;}return _createClass(IfcCartesianPoint);}(IfcPoint);IFC42.IfcCartesianPoint=IfcCartesianPoint;var IfcCartesianPointList=/*#__PURE__*/function(_IfcGeometricRepresen47){_inherits(IfcCartesianPointList,_IfcGeometricRepresen47);var _super1087=_createSuper(IfcCartesianPointList);function IfcCartesianPointList(expressID){var _this1084;_classCallCheck(this,IfcCartesianPointList);_this1084=_super1087.call(this,expressID);_this1084.type=574549367;return _this1084;}return _createClass(IfcCartesianPointList);}(IfcGeometricRepresentationItem);IFC42.IfcCartesianPointList=IfcCartesianPointList;var IfcCartesianPointList2D=/*#__PURE__*/function(_IfcCartesianPointLis){_inherits(IfcCartesianPointList2D,_IfcCartesianPointLis);var _super1088=_createSuper(IfcCartesianPointList2D);function IfcCartesianPointList2D(expressID,CoordList){var _this1085;_classCallCheck(this,IfcCartesianPointList2D);_this1085=_super1088.call(this,expressID);_this1085.CoordList=CoordList;_this1085.type=1675464909;return _this1085;}return _createClass(IfcCartesianPointList2D);}(IfcCartesianPointList);IFC42.IfcCartesianPointList2D=IfcCartesianPointList2D;var IfcCartesianPointList3D=/*#__PURE__*/function(_IfcCartesianPointLis2){_inherits(IfcCartesianPointList3D,_IfcCartesianPointLis2);var _super1089=_createSuper(IfcCartesianPointList3D);function IfcCartesianPointList3D(expressID,CoordList){var _this1086;_classCallCheck(this,IfcCartesianPointList3D);_this1086=_super1089.call(this,expressID);_this1086.CoordList=CoordList;_this1086.type=2059837836;return _this1086;}return _createClass(IfcCartesianPointList3D);}(IfcCartesianPointList);IFC42.IfcCartesianPointList3D=IfcCartesianPointList3D;var IfcCartesianTransformationOperator=/*#__PURE__*/function(_IfcGeometricRepresen48){_inherits(IfcCartesianTransformationOperator,_IfcGeometricRepresen48);var _super1090=_createSuper(IfcCartesianTransformationOperator);function IfcCartesianTransformationOperator(expressID,Axis1,Axis2,LocalOrigin,Scale){var _this1087;_classCallCheck(this,IfcCartesianTransformationOperator);_this1087=_super1090.call(this,expressID);_this1087.Axis1=Axis1;_this1087.Axis2=Axis2;_this1087.LocalOrigin=LocalOrigin;_this1087.Scale=Scale;_this1087.type=59481748;return _this1087;}return _createClass(IfcCartesianTransformationOperator);}(IfcGeometricRepresentationItem);IFC42.IfcCartesianTransformationOperator=IfcCartesianTransformationOperator;var IfcCartesianTransformationOperator2D=/*#__PURE__*/function(_IfcCartesianTransfor5){_inherits(IfcCartesianTransformationOperator2D,_IfcCartesianTransfor5);var _super1091=_createSuper(IfcCartesianTransformationOperator2D);function IfcCartesianTransformationOperator2D(expressID,Axis1,Axis2,LocalOrigin,Scale){var _this1088;_classCallCheck(this,IfcCartesianTransformationOperator2D);_this1088=_super1091.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this1088.Axis1=Axis1;_this1088.Axis2=Axis2;_this1088.LocalOrigin=LocalOrigin;_this1088.Scale=Scale;_this1088.type=3749851601;return _this1088;}return _createClass(IfcCartesianTransformationOperator2D);}(IfcCartesianTransformationOperator);IFC42.IfcCartesianTransformationOperator2D=IfcCartesianTransformationOperator2D;var IfcCartesianTransformationOperator2DnonUniform=/*#__PURE__*/function(_IfcCartesianTransfor6){_inherits(IfcCartesianTransformationOperator2DnonUniform,_IfcCartesianTransfor6);var _super1092=_createSuper(IfcCartesianTransformationOperator2DnonUniform);function IfcCartesianTransformationOperator2DnonUniform(expressID,Axis1,Axis2,LocalOrigin,Scale,Scale2){var _this1089;_classCallCheck(this,IfcCartesianTransformationOperator2DnonUniform);_this1089=_super1092.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this1089.Axis1=Axis1;_this1089.Axis2=Axis2;_this1089.LocalOrigin=LocalOrigin;_this1089.Scale=Scale;_this1089.Scale2=Scale2;_this1089.type=3486308946;return _this1089;}return _createClass(IfcCartesianTransformationOperator2DnonUniform);}(IfcCartesianTransformationOperator2D);IFC42.IfcCartesianTransformationOperator2DnonUniform=IfcCartesianTransformationOperator2DnonUniform;var IfcCartesianTransformationOperator3D=/*#__PURE__*/function(_IfcCartesianTransfor7){_inherits(IfcCartesianTransformationOperator3D,_IfcCartesianTransfor7);var _super1093=_createSuper(IfcCartesianTransformationOperator3D);function IfcCartesianTransformationOperator3D(expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3){var _this1090;_classCallCheck(this,IfcCartesianTransformationOperator3D);_this1090=_super1093.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this1090.Axis1=Axis1;_this1090.Axis2=Axis2;_this1090.LocalOrigin=LocalOrigin;_this1090.Scale=Scale;_this1090.Axis3=Axis3;_this1090.type=3331915920;return _this1090;}return _createClass(IfcCartesianTransformationOperator3D);}(IfcCartesianTransformationOperator);IFC42.IfcCartesianTransformationOperator3D=IfcCartesianTransformationOperator3D;var IfcCartesianTransformationOperator3DnonUniform=/*#__PURE__*/function(_IfcCartesianTransfor8){_inherits(IfcCartesianTransformationOperator3DnonUniform,_IfcCartesianTransfor8);var _super1094=_createSuper(IfcCartesianTransformationOperator3DnonUniform);function IfcCartesianTransformationOperator3DnonUniform(expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3,Scale2,Scale3){var _this1091;_classCallCheck(this,IfcCartesianTransformationOperator3DnonUniform);_this1091=_super1094.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3);_this1091.Axis1=Axis1;_this1091.Axis2=Axis2;_this1091.LocalOrigin=LocalOrigin;_this1091.Scale=Scale;_this1091.Axis3=Axis3;_this1091.Scale2=Scale2;_this1091.Scale3=Scale3;_this1091.type=1416205885;return _this1091;}return _createClass(IfcCartesianTransformationOperator3DnonUniform);}(IfcCartesianTransformationOperator3D);IFC42.IfcCartesianTransformationOperator3DnonUniform=IfcCartesianTransformationOperator3DnonUniform;var IfcCircleProfileDef=/*#__PURE__*/function(_IfcParameterizedProf20){_inherits(IfcCircleProfileDef,_IfcParameterizedProf20);var _super1095=_createSuper(IfcCircleProfileDef);function IfcCircleProfileDef(expressID,ProfileType,ProfileName,Position,Radius){var _this1092;_classCallCheck(this,IfcCircleProfileDef);_this1092=_super1095.call(this,expressID,ProfileType,ProfileName,Position);_this1092.ProfileType=ProfileType;_this1092.ProfileName=ProfileName;_this1092.Position=Position;_this1092.Radius=Radius;_this1092.type=1383045692;return _this1092;}return _createClass(IfcCircleProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcCircleProfileDef=IfcCircleProfileDef;var IfcClosedShell=/*#__PURE__*/function(_IfcConnectedFaceSet4){_inherits(IfcClosedShell,_IfcConnectedFaceSet4);var _super1096=_createSuper(IfcClosedShell);function IfcClosedShell(expressID,CfsFaces){var _this1093;_classCallCheck(this,IfcClosedShell);_this1093=_super1096.call(this,expressID,CfsFaces);_this1093.CfsFaces=CfsFaces;_this1093.type=2205249479;return _this1093;}return _createClass(IfcClosedShell);}(IfcConnectedFaceSet);IFC42.IfcClosedShell=IfcClosedShell;var IfcColourRgb=/*#__PURE__*/function(_IfcColourSpecificati2){_inherits(IfcColourRgb,_IfcColourSpecificati2);var _super1097=_createSuper(IfcColourRgb);function IfcColourRgb(expressID,Name,Red,Green,Blue){var _this1094;_classCallCheck(this,IfcColourRgb);_this1094=_super1097.call(this,expressID,Name);_this1094.Name=Name;_this1094.Red=Red;_this1094.Green=Green;_this1094.Blue=Blue;_this1094.type=776857604;return _this1094;}return _createClass(IfcColourRgb);}(IfcColourSpecification);IFC42.IfcColourRgb=IfcColourRgb;var IfcComplexProperty=/*#__PURE__*/function(_IfcProperty4){_inherits(IfcComplexProperty,_IfcProperty4);var _super1098=_createSuper(IfcComplexProperty);function IfcComplexProperty(expressID,Name,Description,UsageName,HasProperties){var _this1095;_classCallCheck(this,IfcComplexProperty);_this1095=_super1098.call(this,expressID,Name,Description);_this1095.Name=Name;_this1095.Description=Description;_this1095.UsageName=UsageName;_this1095.HasProperties=HasProperties;_this1095.type=2542286263;return _this1095;}return _createClass(IfcComplexProperty);}(IfcProperty);IFC42.IfcComplexProperty=IfcComplexProperty;var IfcCompositeCurveSegment=/*#__PURE__*/function(_IfcGeometricRepresen49){_inherits(IfcCompositeCurveSegment,_IfcGeometricRepresen49);var _super1099=_createSuper(IfcCompositeCurveSegment);function IfcCompositeCurveSegment(expressID,Transition,SameSense,ParentCurve){var _this1096;_classCallCheck(this,IfcCompositeCurveSegment);_this1096=_super1099.call(this,expressID);_this1096.Transition=Transition;_this1096.SameSense=SameSense;_this1096.ParentCurve=ParentCurve;_this1096.type=2485617015;return _this1096;}return _createClass(IfcCompositeCurveSegment);}(IfcGeometricRepresentationItem);IFC42.IfcCompositeCurveSegment=IfcCompositeCurveSegment;var IfcConstructionResourceType=/*#__PURE__*/function(_IfcTypeResource){_inherits(IfcConstructionResourceType,_IfcTypeResource);var _super1100=_createSuper(IfcConstructionResourceType);function IfcConstructionResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity){var _this1097;_classCallCheck(this,IfcConstructionResourceType);_this1097=_super1100.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType);_this1097.GlobalId=GlobalId;_this1097.OwnerHistory=OwnerHistory;_this1097.Name=Name;_this1097.Description=Description;_this1097.ApplicableOccurrence=ApplicableOccurrence;_this1097.HasPropertySets=HasPropertySets;_this1097.Identification=Identification;_this1097.LongDescription=LongDescription;_this1097.ResourceType=ResourceType;_this1097.BaseCosts=BaseCosts;_this1097.BaseQuantity=BaseQuantity;_this1097.type=2574617495;return _this1097;}return _createClass(IfcConstructionResourceType);}(IfcTypeResource);IFC42.IfcConstructionResourceType=IfcConstructionResourceType;var IfcContext=/*#__PURE__*/function(_IfcObjectDefinition4){_inherits(IfcContext,_IfcObjectDefinition4);var _super1101=_createSuper(IfcContext);function IfcContext(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext){var _this1098;_classCallCheck(this,IfcContext);_this1098=_super1101.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1098.GlobalId=GlobalId;_this1098.OwnerHistory=OwnerHistory;_this1098.Name=Name;_this1098.Description=Description;_this1098.ObjectType=ObjectType;_this1098.LongName=LongName;_this1098.Phase=Phase;_this1098.RepresentationContexts=RepresentationContexts;_this1098.UnitsInContext=UnitsInContext;_this1098.type=3419103109;return _this1098;}return _createClass(IfcContext);}(IfcObjectDefinition);IFC42.IfcContext=IfcContext;var IfcCrewResourceType=/*#__PURE__*/function(_IfcConstructionResou7){_inherits(IfcCrewResourceType,_IfcConstructionResou7);var _super1102=_createSuper(IfcCrewResourceType);function IfcCrewResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1099;_classCallCheck(this,IfcCrewResourceType);_this1099=_super1102.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1099.GlobalId=GlobalId;_this1099.OwnerHistory=OwnerHistory;_this1099.Name=Name;_this1099.Description=Description;_this1099.ApplicableOccurrence=ApplicableOccurrence;_this1099.HasPropertySets=HasPropertySets;_this1099.Identification=Identification;_this1099.LongDescription=LongDescription;_this1099.ResourceType=ResourceType;_this1099.BaseCosts=BaseCosts;_this1099.BaseQuantity=BaseQuantity;_this1099.PredefinedType=PredefinedType;_this1099.type=1815067380;return _this1099;}return _createClass(IfcCrewResourceType);}(IfcConstructionResourceType);IFC42.IfcCrewResourceType=IfcCrewResourceType;var IfcCsgPrimitive3D=/*#__PURE__*/function(_IfcGeometricRepresen50){_inherits(IfcCsgPrimitive3D,_IfcGeometricRepresen50);var _super1103=_createSuper(IfcCsgPrimitive3D);function IfcCsgPrimitive3D(expressID,Position){var _this1100;_classCallCheck(this,IfcCsgPrimitive3D);_this1100=_super1103.call(this,expressID);_this1100.Position=Position;_this1100.type=2506170314;return _this1100;}return _createClass(IfcCsgPrimitive3D);}(IfcGeometricRepresentationItem);IFC42.IfcCsgPrimitive3D=IfcCsgPrimitive3D;var IfcCsgSolid=/*#__PURE__*/function(_IfcSolidModel7){_inherits(IfcCsgSolid,_IfcSolidModel7);var _super1104=_createSuper(IfcCsgSolid);function IfcCsgSolid(expressID,TreeRootExpression){var _this1101;_classCallCheck(this,IfcCsgSolid);_this1101=_super1104.call(this,expressID);_this1101.TreeRootExpression=TreeRootExpression;_this1101.type=2147822146;return _this1101;}return _createClass(IfcCsgSolid);}(IfcSolidModel);IFC42.IfcCsgSolid=IfcCsgSolid;var IfcCurve=/*#__PURE__*/function(_IfcGeometricRepresen51){_inherits(IfcCurve,_IfcGeometricRepresen51);var _super1105=_createSuper(IfcCurve);function IfcCurve(expressID){var _this1102;_classCallCheck(this,IfcCurve);_this1102=_super1105.call(this,expressID);_this1102.type=2601014836;return _this1102;}return _createClass(IfcCurve);}(IfcGeometricRepresentationItem);IFC42.IfcCurve=IfcCurve;var IfcCurveBoundedPlane=/*#__PURE__*/function(_IfcBoundedSurface3){_inherits(IfcCurveBoundedPlane,_IfcBoundedSurface3);var _super1106=_createSuper(IfcCurveBoundedPlane);function IfcCurveBoundedPlane(expressID,BasisSurface,OuterBoundary,InnerBoundaries){var _this1103;_classCallCheck(this,IfcCurveBoundedPlane);_this1103=_super1106.call(this,expressID);_this1103.BasisSurface=BasisSurface;_this1103.OuterBoundary=OuterBoundary;_this1103.InnerBoundaries=InnerBoundaries;_this1103.type=2827736869;return _this1103;}return _createClass(IfcCurveBoundedPlane);}(IfcBoundedSurface);IFC42.IfcCurveBoundedPlane=IfcCurveBoundedPlane;var IfcCurveBoundedSurface=/*#__PURE__*/function(_IfcBoundedSurface4){_inherits(IfcCurveBoundedSurface,_IfcBoundedSurface4);var _super1107=_createSuper(IfcCurveBoundedSurface);function IfcCurveBoundedSurface(expressID,BasisSurface,Boundaries,ImplicitOuter){var _this1104;_classCallCheck(this,IfcCurveBoundedSurface);_this1104=_super1107.call(this,expressID);_this1104.BasisSurface=BasisSurface;_this1104.Boundaries=Boundaries;_this1104.ImplicitOuter=ImplicitOuter;_this1104.type=2629017746;return _this1104;}return _createClass(IfcCurveBoundedSurface);}(IfcBoundedSurface);IFC42.IfcCurveBoundedSurface=IfcCurveBoundedSurface;var IfcDirection=/*#__PURE__*/function(_IfcGeometricRepresen52){_inherits(IfcDirection,_IfcGeometricRepresen52);var _super1108=_createSuper(IfcDirection);function IfcDirection(expressID,DirectionRatios){var _this1105;_classCallCheck(this,IfcDirection);_this1105=_super1108.call(this,expressID);_this1105.DirectionRatios=DirectionRatios;_this1105.type=32440307;return _this1105;}return _createClass(IfcDirection);}(IfcGeometricRepresentationItem);IFC42.IfcDirection=IfcDirection;var IfcDoorStyle=/*#__PURE__*/function(_IfcTypeProduct5){_inherits(IfcDoorStyle,_IfcTypeProduct5);var _super1109=_createSuper(IfcDoorStyle);function IfcDoorStyle(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,OperationType,ConstructionType,ParameterTakesPrecedence,Sizeable){var _this1106;_classCallCheck(this,IfcDoorStyle);_this1106=_super1109.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this1106.GlobalId=GlobalId;_this1106.OwnerHistory=OwnerHistory;_this1106.Name=Name;_this1106.Description=Description;_this1106.ApplicableOccurrence=ApplicableOccurrence;_this1106.HasPropertySets=HasPropertySets;_this1106.RepresentationMaps=RepresentationMaps;_this1106.Tag=Tag;_this1106.OperationType=OperationType;_this1106.ConstructionType=ConstructionType;_this1106.ParameterTakesPrecedence=ParameterTakesPrecedence;_this1106.Sizeable=Sizeable;_this1106.type=526551008;return _this1106;}return _createClass(IfcDoorStyle);}(IfcTypeProduct);IFC42.IfcDoorStyle=IfcDoorStyle;var IfcEdgeLoop=/*#__PURE__*/function(_IfcLoop6){_inherits(IfcEdgeLoop,_IfcLoop6);var _super1110=_createSuper(IfcEdgeLoop);function IfcEdgeLoop(expressID,EdgeList){var _this1107;_classCallCheck(this,IfcEdgeLoop);_this1107=_super1110.call(this,expressID);_this1107.EdgeList=EdgeList;_this1107.type=1472233963;return _this1107;}return _createClass(IfcEdgeLoop);}(IfcLoop);IFC42.IfcEdgeLoop=IfcEdgeLoop;var IfcElementQuantity=/*#__PURE__*/function(_IfcQuantitySet){_inherits(IfcElementQuantity,_IfcQuantitySet);var _super1111=_createSuper(IfcElementQuantity);function IfcElementQuantity(expressID,GlobalId,OwnerHistory,Name,Description,MethodOfMeasurement,Quantities){var _this1108;_classCallCheck(this,IfcElementQuantity);_this1108=_super1111.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1108.GlobalId=GlobalId;_this1108.OwnerHistory=OwnerHistory;_this1108.Name=Name;_this1108.Description=Description;_this1108.MethodOfMeasurement=MethodOfMeasurement;_this1108.Quantities=Quantities;_this1108.type=1883228015;return _this1108;}return _createClass(IfcElementQuantity);}(IfcQuantitySet);IFC42.IfcElementQuantity=IfcElementQuantity;var IfcElementType=/*#__PURE__*/function(_IfcTypeProduct6){_inherits(IfcElementType,_IfcTypeProduct6);var _super1112=_createSuper(IfcElementType);function IfcElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1109;_classCallCheck(this,IfcElementType);_this1109=_super1112.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this1109.GlobalId=GlobalId;_this1109.OwnerHistory=OwnerHistory;_this1109.Name=Name;_this1109.Description=Description;_this1109.ApplicableOccurrence=ApplicableOccurrence;_this1109.HasPropertySets=HasPropertySets;_this1109.RepresentationMaps=RepresentationMaps;_this1109.Tag=Tag;_this1109.ElementType=ElementType;_this1109.type=339256511;return _this1109;}return _createClass(IfcElementType);}(IfcTypeProduct);IFC42.IfcElementType=IfcElementType;var IfcElementarySurface=/*#__PURE__*/function(_IfcSurface6){_inherits(IfcElementarySurface,_IfcSurface6);var _super1113=_createSuper(IfcElementarySurface);function IfcElementarySurface(expressID,Position){var _this1110;_classCallCheck(this,IfcElementarySurface);_this1110=_super1113.call(this,expressID);_this1110.Position=Position;_this1110.type=2777663545;return _this1110;}return _createClass(IfcElementarySurface);}(IfcSurface);IFC42.IfcElementarySurface=IfcElementarySurface;var IfcEllipseProfileDef=/*#__PURE__*/function(_IfcParameterizedProf21){_inherits(IfcEllipseProfileDef,_IfcParameterizedProf21);var _super1114=_createSuper(IfcEllipseProfileDef);function IfcEllipseProfileDef(expressID,ProfileType,ProfileName,Position,SemiAxis1,SemiAxis2){var _this1111;_classCallCheck(this,IfcEllipseProfileDef);_this1111=_super1114.call(this,expressID,ProfileType,ProfileName,Position);_this1111.ProfileType=ProfileType;_this1111.ProfileName=ProfileName;_this1111.Position=Position;_this1111.SemiAxis1=SemiAxis1;_this1111.SemiAxis2=SemiAxis2;_this1111.type=2835456948;return _this1111;}return _createClass(IfcEllipseProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcEllipseProfileDef=IfcEllipseProfileDef;var IfcEventType=/*#__PURE__*/function(_IfcTypeProcess){_inherits(IfcEventType,_IfcTypeProcess);var _super1115=_createSuper(IfcEventType);function IfcEventType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType,PredefinedType,EventTriggerType,UserDefinedEventTriggerType){var _this1112;_classCallCheck(this,IfcEventType);_this1112=_super1115.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType);_this1112.GlobalId=GlobalId;_this1112.OwnerHistory=OwnerHistory;_this1112.Name=Name;_this1112.Description=Description;_this1112.ApplicableOccurrence=ApplicableOccurrence;_this1112.HasPropertySets=HasPropertySets;_this1112.Identification=Identification;_this1112.LongDescription=LongDescription;_this1112.ProcessType=ProcessType;_this1112.PredefinedType=PredefinedType;_this1112.EventTriggerType=EventTriggerType;_this1112.UserDefinedEventTriggerType=UserDefinedEventTriggerType;_this1112.type=4024345920;return _this1112;}return _createClass(IfcEventType);}(IfcTypeProcess);IFC42.IfcEventType=IfcEventType;var IfcExtrudedAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid4){_inherits(IfcExtrudedAreaSolid,_IfcSweptAreaSolid4);var _super1116=_createSuper(IfcExtrudedAreaSolid);function IfcExtrudedAreaSolid(expressID,SweptArea,Position,ExtrudedDirection,Depth){var _this1113;_classCallCheck(this,IfcExtrudedAreaSolid);_this1113=_super1116.call(this,expressID,SweptArea,Position);_this1113.SweptArea=SweptArea;_this1113.Position=Position;_this1113.ExtrudedDirection=ExtrudedDirection;_this1113.Depth=Depth;_this1113.type=477187591;return _this1113;}return _createClass(IfcExtrudedAreaSolid);}(IfcSweptAreaSolid);IFC42.IfcExtrudedAreaSolid=IfcExtrudedAreaSolid;var IfcExtrudedAreaSolidTapered=/*#__PURE__*/function(_IfcExtrudedAreaSolid){_inherits(IfcExtrudedAreaSolidTapered,_IfcExtrudedAreaSolid);var _super1117=_createSuper(IfcExtrudedAreaSolidTapered);function IfcExtrudedAreaSolidTapered(expressID,SweptArea,Position,ExtrudedDirection,Depth,EndSweptArea){var _this1114;_classCallCheck(this,IfcExtrudedAreaSolidTapered);_this1114=_super1117.call(this,expressID,SweptArea,Position,ExtrudedDirection,Depth);_this1114.SweptArea=SweptArea;_this1114.Position=Position;_this1114.ExtrudedDirection=ExtrudedDirection;_this1114.Depth=Depth;_this1114.EndSweptArea=EndSweptArea;_this1114.type=2804161546;return _this1114;}return _createClass(IfcExtrudedAreaSolidTapered);}(IfcExtrudedAreaSolid);IFC42.IfcExtrudedAreaSolidTapered=IfcExtrudedAreaSolidTapered;var IfcFaceBasedSurfaceModel=/*#__PURE__*/function(_IfcGeometricRepresen53){_inherits(IfcFaceBasedSurfaceModel,_IfcGeometricRepresen53);var _super1118=_createSuper(IfcFaceBasedSurfaceModel);function IfcFaceBasedSurfaceModel(expressID,FbsmFaces){var _this1115;_classCallCheck(this,IfcFaceBasedSurfaceModel);_this1115=_super1118.call(this,expressID);_this1115.FbsmFaces=FbsmFaces;_this1115.type=2047409740;return _this1115;}return _createClass(IfcFaceBasedSurfaceModel);}(IfcGeometricRepresentationItem);IFC42.IfcFaceBasedSurfaceModel=IfcFaceBasedSurfaceModel;var IfcFillAreaStyleHatching=/*#__PURE__*/function(_IfcGeometricRepresen54){_inherits(IfcFillAreaStyleHatching,_IfcGeometricRepresen54);var _super1119=_createSuper(IfcFillAreaStyleHatching);function IfcFillAreaStyleHatching(expressID,HatchLineAppearance,StartOfNextHatchLine,PointOfReferenceHatchLine,PatternStart,HatchLineAngle){var _this1116;_classCallCheck(this,IfcFillAreaStyleHatching);_this1116=_super1119.call(this,expressID);_this1116.HatchLineAppearance=HatchLineAppearance;_this1116.StartOfNextHatchLine=StartOfNextHatchLine;_this1116.PointOfReferenceHatchLine=PointOfReferenceHatchLine;_this1116.PatternStart=PatternStart;_this1116.HatchLineAngle=HatchLineAngle;_this1116.type=374418227;return _this1116;}return _createClass(IfcFillAreaStyleHatching);}(IfcGeometricRepresentationItem);IFC42.IfcFillAreaStyleHatching=IfcFillAreaStyleHatching;var IfcFillAreaStyleTiles=/*#__PURE__*/function(_IfcGeometricRepresen55){_inherits(IfcFillAreaStyleTiles,_IfcGeometricRepresen55);var _super1120=_createSuper(IfcFillAreaStyleTiles);function IfcFillAreaStyleTiles(expressID,TilingPattern,Tiles,TilingScale){var _this1117;_classCallCheck(this,IfcFillAreaStyleTiles);_this1117=_super1120.call(this,expressID);_this1117.TilingPattern=TilingPattern;_this1117.Tiles=Tiles;_this1117.TilingScale=TilingScale;_this1117.type=315944413;return _this1117;}return _createClass(IfcFillAreaStyleTiles);}(IfcGeometricRepresentationItem);IFC42.IfcFillAreaStyleTiles=IfcFillAreaStyleTiles;var IfcFixedReferenceSweptAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid5){_inherits(IfcFixedReferenceSweptAreaSolid,_IfcSweptAreaSolid5);var _super1121=_createSuper(IfcFixedReferenceSweptAreaSolid);function IfcFixedReferenceSweptAreaSolid(expressID,SweptArea,Position,Directrix,StartParam,EndParam,FixedReference){var _this1118;_classCallCheck(this,IfcFixedReferenceSweptAreaSolid);_this1118=_super1121.call(this,expressID,SweptArea,Position);_this1118.SweptArea=SweptArea;_this1118.Position=Position;_this1118.Directrix=Directrix;_this1118.StartParam=StartParam;_this1118.EndParam=EndParam;_this1118.FixedReference=FixedReference;_this1118.type=2652556860;return _this1118;}return _createClass(IfcFixedReferenceSweptAreaSolid);}(IfcSweptAreaSolid);IFC42.IfcFixedReferenceSweptAreaSolid=IfcFixedReferenceSweptAreaSolid;var IfcFurnishingElementType=/*#__PURE__*/function(_IfcElementType7){_inherits(IfcFurnishingElementType,_IfcElementType7);var _super1122=_createSuper(IfcFurnishingElementType);function IfcFurnishingElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1119;_classCallCheck(this,IfcFurnishingElementType);_this1119=_super1122.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1119.GlobalId=GlobalId;_this1119.OwnerHistory=OwnerHistory;_this1119.Name=Name;_this1119.Description=Description;_this1119.ApplicableOccurrence=ApplicableOccurrence;_this1119.HasPropertySets=HasPropertySets;_this1119.RepresentationMaps=RepresentationMaps;_this1119.Tag=Tag;_this1119.ElementType=ElementType;_this1119.type=4238390223;return _this1119;}return _createClass(IfcFurnishingElementType);}(IfcElementType);IFC42.IfcFurnishingElementType=IfcFurnishingElementType;var IfcFurnitureType=/*#__PURE__*/function(_IfcFurnishingElement3){_inherits(IfcFurnitureType,_IfcFurnishingElement3);var _super1123=_createSuper(IfcFurnitureType);function IfcFurnitureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,AssemblyPlace,PredefinedType){var _this1120;_classCallCheck(this,IfcFurnitureType);_this1120=_super1123.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1120.GlobalId=GlobalId;_this1120.OwnerHistory=OwnerHistory;_this1120.Name=Name;_this1120.Description=Description;_this1120.ApplicableOccurrence=ApplicableOccurrence;_this1120.HasPropertySets=HasPropertySets;_this1120.RepresentationMaps=RepresentationMaps;_this1120.Tag=Tag;_this1120.ElementType=ElementType;_this1120.AssemblyPlace=AssemblyPlace;_this1120.PredefinedType=PredefinedType;_this1120.type=1268542332;return _this1120;}return _createClass(IfcFurnitureType);}(IfcFurnishingElementType);IFC42.IfcFurnitureType=IfcFurnitureType;var IfcGeographicElementType=/*#__PURE__*/function(_IfcElementType8){_inherits(IfcGeographicElementType,_IfcElementType8);var _super1124=_createSuper(IfcGeographicElementType);function IfcGeographicElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1121;_classCallCheck(this,IfcGeographicElementType);_this1121=_super1124.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1121.GlobalId=GlobalId;_this1121.OwnerHistory=OwnerHistory;_this1121.Name=Name;_this1121.Description=Description;_this1121.ApplicableOccurrence=ApplicableOccurrence;_this1121.HasPropertySets=HasPropertySets;_this1121.RepresentationMaps=RepresentationMaps;_this1121.Tag=Tag;_this1121.ElementType=ElementType;_this1121.PredefinedType=PredefinedType;_this1121.type=4095422895;return _this1121;}return _createClass(IfcGeographicElementType);}(IfcElementType);IFC42.IfcGeographicElementType=IfcGeographicElementType;var IfcGeometricCurveSet=/*#__PURE__*/function(_IfcGeometricSet2){_inherits(IfcGeometricCurveSet,_IfcGeometricSet2);var _super1125=_createSuper(IfcGeometricCurveSet);function IfcGeometricCurveSet(expressID,Elements){var _this1122;_classCallCheck(this,IfcGeometricCurveSet);_this1122=_super1125.call(this,expressID,Elements);_this1122.Elements=Elements;_this1122.type=987898635;return _this1122;}return _createClass(IfcGeometricCurveSet);}(IfcGeometricSet);IFC42.IfcGeometricCurveSet=IfcGeometricCurveSet;var IfcIShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf22){_inherits(IfcIShapeProfileDef,_IfcParameterizedProf22);var _super1126=_createSuper(IfcIShapeProfileDef);function IfcIShapeProfileDef(expressID,ProfileType,ProfileName,Position,OverallWidth,OverallDepth,WebThickness,FlangeThickness,FilletRadius,FlangeEdgeRadius,FlangeSlope){var _this1123;_classCallCheck(this,IfcIShapeProfileDef);_this1123=_super1126.call(this,expressID,ProfileType,ProfileName,Position);_this1123.ProfileType=ProfileType;_this1123.ProfileName=ProfileName;_this1123.Position=Position;_this1123.OverallWidth=OverallWidth;_this1123.OverallDepth=OverallDepth;_this1123.WebThickness=WebThickness;_this1123.FlangeThickness=FlangeThickness;_this1123.FilletRadius=FilletRadius;_this1123.FlangeEdgeRadius=FlangeEdgeRadius;_this1123.FlangeSlope=FlangeSlope;_this1123.type=1484403080;return _this1123;}return _createClass(IfcIShapeProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcIShapeProfileDef=IfcIShapeProfileDef;var IfcIndexedPolygonalFace=/*#__PURE__*/function(_IfcTessellatedItem){_inherits(IfcIndexedPolygonalFace,_IfcTessellatedItem);var _super1127=_createSuper(IfcIndexedPolygonalFace);function IfcIndexedPolygonalFace(expressID,CoordIndex){var _this1124;_classCallCheck(this,IfcIndexedPolygonalFace);_this1124=_super1127.call(this,expressID);_this1124.CoordIndex=CoordIndex;_this1124.type=178912537;return _this1124;}return _createClass(IfcIndexedPolygonalFace);}(IfcTessellatedItem);IFC42.IfcIndexedPolygonalFace=IfcIndexedPolygonalFace;var IfcIndexedPolygonalFaceWithVoids=/*#__PURE__*/function(_IfcIndexedPolygonalF){_inherits(IfcIndexedPolygonalFaceWithVoids,_IfcIndexedPolygonalF);var _super1128=_createSuper(IfcIndexedPolygonalFaceWithVoids);function IfcIndexedPolygonalFaceWithVoids(expressID,CoordIndex,InnerCoordIndices){var _this1125;_classCallCheck(this,IfcIndexedPolygonalFaceWithVoids);_this1125=_super1128.call(this,expressID,CoordIndex);_this1125.CoordIndex=CoordIndex;_this1125.InnerCoordIndices=InnerCoordIndices;_this1125.type=2294589976;return _this1125;}return _createClass(IfcIndexedPolygonalFaceWithVoids);}(IfcIndexedPolygonalFace);IFC42.IfcIndexedPolygonalFaceWithVoids=IfcIndexedPolygonalFaceWithVoids;var IfcLShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf23){_inherits(IfcLShapeProfileDef,_IfcParameterizedProf23);var _super1129=_createSuper(IfcLShapeProfileDef);function IfcLShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,Width,Thickness,FilletRadius,EdgeRadius,LegSlope){var _this1126;_classCallCheck(this,IfcLShapeProfileDef);_this1126=_super1129.call(this,expressID,ProfileType,ProfileName,Position);_this1126.ProfileType=ProfileType;_this1126.ProfileName=ProfileName;_this1126.Position=Position;_this1126.Depth=Depth;_this1126.Width=Width;_this1126.Thickness=Thickness;_this1126.FilletRadius=FilletRadius;_this1126.EdgeRadius=EdgeRadius;_this1126.LegSlope=LegSlope;_this1126.type=572779678;return _this1126;}return _createClass(IfcLShapeProfileDef);}(IfcParameterizedProfileDef);IFC42.IfcLShapeProfileDef=IfcLShapeProfileDef;var IfcLaborResourceType=/*#__PURE__*/function(_IfcConstructionResou8){_inherits(IfcLaborResourceType,_IfcConstructionResou8);var _super1130=_createSuper(IfcLaborResourceType);function IfcLaborResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1127;_classCallCheck(this,IfcLaborResourceType);_this1127=_super1130.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1127.GlobalId=GlobalId;_this1127.OwnerHistory=OwnerHistory;_this1127.Name=Name;_this1127.Description=Description;_this1127.ApplicableOccurrence=ApplicableOccurrence;_this1127.HasPropertySets=HasPropertySets;_this1127.Identification=Identification;_this1127.LongDescription=LongDescription;_this1127.ResourceType=ResourceType;_this1127.BaseCosts=BaseCosts;_this1127.BaseQuantity=BaseQuantity;_this1127.PredefinedType=PredefinedType;_this1127.type=428585644;return _this1127;}return _createClass(IfcLaborResourceType);}(IfcConstructionResourceType);IFC42.IfcLaborResourceType=IfcLaborResourceType;var IfcLine=/*#__PURE__*/function(_IfcCurve6){_inherits(IfcLine,_IfcCurve6);var _super1131=_createSuper(IfcLine);function IfcLine(expressID,Pnt,Dir){var _this1128;_classCallCheck(this,IfcLine);_this1128=_super1131.call(this,expressID);_this1128.Pnt=Pnt;_this1128.Dir=Dir;_this1128.type=1281925730;return _this1128;}return _createClass(IfcLine);}(IfcCurve);IFC42.IfcLine=IfcLine;var IfcManifoldSolidBrep=/*#__PURE__*/function(_IfcSolidModel8){_inherits(IfcManifoldSolidBrep,_IfcSolidModel8);var _super1132=_createSuper(IfcManifoldSolidBrep);function IfcManifoldSolidBrep(expressID,Outer){var _this1129;_classCallCheck(this,IfcManifoldSolidBrep);_this1129=_super1132.call(this,expressID);_this1129.Outer=Outer;_this1129.type=1425443689;return _this1129;}return _createClass(IfcManifoldSolidBrep);}(IfcSolidModel);IFC42.IfcManifoldSolidBrep=IfcManifoldSolidBrep;var IfcObject=/*#__PURE__*/function(_IfcObjectDefinition5){_inherits(IfcObject,_IfcObjectDefinition5);var _super1133=_createSuper(IfcObject);function IfcObject(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this1130;_classCallCheck(this,IfcObject);_this1130=_super1133.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1130.GlobalId=GlobalId;_this1130.OwnerHistory=OwnerHistory;_this1130.Name=Name;_this1130.Description=Description;_this1130.ObjectType=ObjectType;_this1130.type=3888040117;return _this1130;}return _createClass(IfcObject);}(IfcObjectDefinition);IFC42.IfcObject=IfcObject;var IfcOffsetCurve2D=/*#__PURE__*/function(_IfcCurve7){_inherits(IfcOffsetCurve2D,_IfcCurve7);var _super1134=_createSuper(IfcOffsetCurve2D);function IfcOffsetCurve2D(expressID,BasisCurve,Distance,SelfIntersect){var _this1131;_classCallCheck(this,IfcOffsetCurve2D);_this1131=_super1134.call(this,expressID);_this1131.BasisCurve=BasisCurve;_this1131.Distance=Distance;_this1131.SelfIntersect=SelfIntersect;_this1131.type=3388369263;return _this1131;}return _createClass(IfcOffsetCurve2D);}(IfcCurve);IFC42.IfcOffsetCurve2D=IfcOffsetCurve2D;var IfcOffsetCurve3D=/*#__PURE__*/function(_IfcCurve8){_inherits(IfcOffsetCurve3D,_IfcCurve8);var _super1135=_createSuper(IfcOffsetCurve3D);function IfcOffsetCurve3D(expressID,BasisCurve,Distance,SelfIntersect,RefDirection){var _this1132;_classCallCheck(this,IfcOffsetCurve3D);_this1132=_super1135.call(this,expressID);_this1132.BasisCurve=BasisCurve;_this1132.Distance=Distance;_this1132.SelfIntersect=SelfIntersect;_this1132.RefDirection=RefDirection;_this1132.type=3505215534;return _this1132;}return _createClass(IfcOffsetCurve3D);}(IfcCurve);IFC42.IfcOffsetCurve3D=IfcOffsetCurve3D;var IfcPcurve=/*#__PURE__*/function(_IfcCurve9){_inherits(IfcPcurve,_IfcCurve9);var _super1136=_createSuper(IfcPcurve);function IfcPcurve(expressID,BasisSurface,ReferenceCurve){var _this1133;_classCallCheck(this,IfcPcurve);_this1133=_super1136.call(this,expressID);_this1133.BasisSurface=BasisSurface;_this1133.ReferenceCurve=ReferenceCurve;_this1133.type=1682466193;return _this1133;}return _createClass(IfcPcurve);}(IfcCurve);IFC42.IfcPcurve=IfcPcurve;var IfcPlanarBox=/*#__PURE__*/function(_IfcPlanarExtent2){_inherits(IfcPlanarBox,_IfcPlanarExtent2);var _super1137=_createSuper(IfcPlanarBox);function IfcPlanarBox(expressID,SizeInX,SizeInY,Placement){var _this1134;_classCallCheck(this,IfcPlanarBox);_this1134=_super1137.call(this,expressID,SizeInX,SizeInY);_this1134.SizeInX=SizeInX;_this1134.SizeInY=SizeInY;_this1134.Placement=Placement;_this1134.type=603570806;return _this1134;}return _createClass(IfcPlanarBox);}(IfcPlanarExtent);IFC42.IfcPlanarBox=IfcPlanarBox;var IfcPlane=/*#__PURE__*/function(_IfcElementarySurface2){_inherits(IfcPlane,_IfcElementarySurface2);var _super1138=_createSuper(IfcPlane);function IfcPlane(expressID,Position){var _this1135;_classCallCheck(this,IfcPlane);_this1135=_super1138.call(this,expressID,Position);_this1135.Position=Position;_this1135.type=220341763;return _this1135;}return _createClass(IfcPlane);}(IfcElementarySurface);IFC42.IfcPlane=IfcPlane;var IfcPreDefinedColour=/*#__PURE__*/function(_IfcPreDefinedItem6){_inherits(IfcPreDefinedColour,_IfcPreDefinedItem6);var _super1139=_createSuper(IfcPreDefinedColour);function IfcPreDefinedColour(expressID,Name){var _this1136;_classCallCheck(this,IfcPreDefinedColour);_this1136=_super1139.call(this,expressID,Name);_this1136.Name=Name;_this1136.type=759155922;return _this1136;}return _createClass(IfcPreDefinedColour);}(IfcPreDefinedItem);IFC42.IfcPreDefinedColour=IfcPreDefinedColour;var IfcPreDefinedCurveFont=/*#__PURE__*/function(_IfcPreDefinedItem7){_inherits(IfcPreDefinedCurveFont,_IfcPreDefinedItem7);var _super1140=_createSuper(IfcPreDefinedCurveFont);function IfcPreDefinedCurveFont(expressID,Name){var _this1137;_classCallCheck(this,IfcPreDefinedCurveFont);_this1137=_super1140.call(this,expressID,Name);_this1137.Name=Name;_this1137.type=2559016684;return _this1137;}return _createClass(IfcPreDefinedCurveFont);}(IfcPreDefinedItem);IFC42.IfcPreDefinedCurveFont=IfcPreDefinedCurveFont;var IfcPreDefinedPropertySet=/*#__PURE__*/function(_IfcPropertySetDefini16){_inherits(IfcPreDefinedPropertySet,_IfcPropertySetDefini16);var _super1141=_createSuper(IfcPreDefinedPropertySet);function IfcPreDefinedPropertySet(expressID,GlobalId,OwnerHistory,Name,Description){var _this1138;_classCallCheck(this,IfcPreDefinedPropertySet);_this1138=_super1141.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1138.GlobalId=GlobalId;_this1138.OwnerHistory=OwnerHistory;_this1138.Name=Name;_this1138.Description=Description;_this1138.type=3967405729;return _this1138;}return _createClass(IfcPreDefinedPropertySet);}(IfcPropertySetDefinition);IFC42.IfcPreDefinedPropertySet=IfcPreDefinedPropertySet;var IfcProcedureType=/*#__PURE__*/function(_IfcTypeProcess2){_inherits(IfcProcedureType,_IfcTypeProcess2);var _super1142=_createSuper(IfcProcedureType);function IfcProcedureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType,PredefinedType){var _this1139;_classCallCheck(this,IfcProcedureType);_this1139=_super1142.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType);_this1139.GlobalId=GlobalId;_this1139.OwnerHistory=OwnerHistory;_this1139.Name=Name;_this1139.Description=Description;_this1139.ApplicableOccurrence=ApplicableOccurrence;_this1139.HasPropertySets=HasPropertySets;_this1139.Identification=Identification;_this1139.LongDescription=LongDescription;_this1139.ProcessType=ProcessType;_this1139.PredefinedType=PredefinedType;_this1139.type=569719735;return _this1139;}return _createClass(IfcProcedureType);}(IfcTypeProcess);IFC42.IfcProcedureType=IfcProcedureType;var IfcProcess=/*#__PURE__*/function(_IfcObject8){_inherits(IfcProcess,_IfcObject8);var _super1143=_createSuper(IfcProcess);function IfcProcess(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription){var _this1140;_classCallCheck(this,IfcProcess);_this1140=_super1143.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1140.GlobalId=GlobalId;_this1140.OwnerHistory=OwnerHistory;_this1140.Name=Name;_this1140.Description=Description;_this1140.ObjectType=ObjectType;_this1140.Identification=Identification;_this1140.LongDescription=LongDescription;_this1140.type=2945172077;return _this1140;}return _createClass(IfcProcess);}(IfcObject);IFC42.IfcProcess=IfcProcess;var IfcProduct=/*#__PURE__*/function(_IfcObject9){_inherits(IfcProduct,_IfcObject9);var _super1144=_createSuper(IfcProduct);function IfcProduct(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this1141;_classCallCheck(this,IfcProduct);_this1141=_super1144.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1141.GlobalId=GlobalId;_this1141.OwnerHistory=OwnerHistory;_this1141.Name=Name;_this1141.Description=Description;_this1141.ObjectType=ObjectType;_this1141.ObjectPlacement=ObjectPlacement;_this1141.Representation=Representation;_this1141.type=4208778838;return _this1141;}return _createClass(IfcProduct);}(IfcObject);IFC42.IfcProduct=IfcProduct;var IfcProject=/*#__PURE__*/function(_IfcContext){_inherits(IfcProject,_IfcContext);var _super1145=_createSuper(IfcProject);function IfcProject(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext){var _this1142;_classCallCheck(this,IfcProject);_this1142=_super1145.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext);_this1142.GlobalId=GlobalId;_this1142.OwnerHistory=OwnerHistory;_this1142.Name=Name;_this1142.Description=Description;_this1142.ObjectType=ObjectType;_this1142.LongName=LongName;_this1142.Phase=Phase;_this1142.RepresentationContexts=RepresentationContexts;_this1142.UnitsInContext=UnitsInContext;_this1142.type=103090709;return _this1142;}return _createClass(IfcProject);}(IfcContext);IFC42.IfcProject=IfcProject;var IfcProjectLibrary=/*#__PURE__*/function(_IfcContext2){_inherits(IfcProjectLibrary,_IfcContext2);var _super1146=_createSuper(IfcProjectLibrary);function IfcProjectLibrary(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext){var _this1143;_classCallCheck(this,IfcProjectLibrary);_this1143=_super1146.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext);_this1143.GlobalId=GlobalId;_this1143.OwnerHistory=OwnerHistory;_this1143.Name=Name;_this1143.Description=Description;_this1143.ObjectType=ObjectType;_this1143.LongName=LongName;_this1143.Phase=Phase;_this1143.RepresentationContexts=RepresentationContexts;_this1143.UnitsInContext=UnitsInContext;_this1143.type=653396225;return _this1143;}return _createClass(IfcProjectLibrary);}(IfcContext);IFC42.IfcProjectLibrary=IfcProjectLibrary;var IfcPropertyBoundedValue=/*#__PURE__*/function(_IfcSimpleProperty7){_inherits(IfcPropertyBoundedValue,_IfcSimpleProperty7);var _super1147=_createSuper(IfcPropertyBoundedValue);function IfcPropertyBoundedValue(expressID,Name,Description,UpperBoundValue,LowerBoundValue,Unit,SetPointValue){var _this1144;_classCallCheck(this,IfcPropertyBoundedValue);_this1144=_super1147.call(this,expressID,Name,Description);_this1144.Name=Name;_this1144.Description=Description;_this1144.UpperBoundValue=UpperBoundValue;_this1144.LowerBoundValue=LowerBoundValue;_this1144.Unit=Unit;_this1144.SetPointValue=SetPointValue;_this1144.type=871118103;return _this1144;}return _createClass(IfcPropertyBoundedValue);}(IfcSimpleProperty);IFC42.IfcPropertyBoundedValue=IfcPropertyBoundedValue;var IfcPropertyEnumeratedValue=/*#__PURE__*/function(_IfcSimpleProperty8){_inherits(IfcPropertyEnumeratedValue,_IfcSimpleProperty8);var _super1148=_createSuper(IfcPropertyEnumeratedValue);function IfcPropertyEnumeratedValue(expressID,Name,Description,EnumerationValues,EnumerationReference){var _this1145;_classCallCheck(this,IfcPropertyEnumeratedValue);_this1145=_super1148.call(this,expressID,Name,Description);_this1145.Name=Name;_this1145.Description=Description;_this1145.EnumerationValues=EnumerationValues;_this1145.EnumerationReference=EnumerationReference;_this1145.type=4166981789;return _this1145;}return _createClass(IfcPropertyEnumeratedValue);}(IfcSimpleProperty);IFC42.IfcPropertyEnumeratedValue=IfcPropertyEnumeratedValue;var IfcPropertyListValue=/*#__PURE__*/function(_IfcSimpleProperty9){_inherits(IfcPropertyListValue,_IfcSimpleProperty9);var _super1149=_createSuper(IfcPropertyListValue);function IfcPropertyListValue(expressID,Name,Description,ListValues,Unit){var _this1146;_classCallCheck(this,IfcPropertyListValue);_this1146=_super1149.call(this,expressID,Name,Description);_this1146.Name=Name;_this1146.Description=Description;_this1146.ListValues=ListValues;_this1146.Unit=Unit;_this1146.type=2752243245;return _this1146;}return _createClass(IfcPropertyListValue);}(IfcSimpleProperty);IFC42.IfcPropertyListValue=IfcPropertyListValue;var IfcPropertyReferenceValue=/*#__PURE__*/function(_IfcSimpleProperty10){_inherits(IfcPropertyReferenceValue,_IfcSimpleProperty10);var _super1150=_createSuper(IfcPropertyReferenceValue);function IfcPropertyReferenceValue(expressID,Name,Description,UsageName,PropertyReference){var _this1147;_classCallCheck(this,IfcPropertyReferenceValue);_this1147=_super1150.call(this,expressID,Name,Description);_this1147.Name=Name;_this1147.Description=Description;_this1147.UsageName=UsageName;_this1147.PropertyReference=PropertyReference;_this1147.type=941946838;return _this1147;}return _createClass(IfcPropertyReferenceValue);}(IfcSimpleProperty);IFC42.IfcPropertyReferenceValue=IfcPropertyReferenceValue;var IfcPropertySet=/*#__PURE__*/function(_IfcPropertySetDefini17){_inherits(IfcPropertySet,_IfcPropertySetDefini17);var _super1151=_createSuper(IfcPropertySet);function IfcPropertySet(expressID,GlobalId,OwnerHistory,Name,Description,HasProperties){var _this1148;_classCallCheck(this,IfcPropertySet);_this1148=_super1151.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1148.GlobalId=GlobalId;_this1148.OwnerHistory=OwnerHistory;_this1148.Name=Name;_this1148.Description=Description;_this1148.HasProperties=HasProperties;_this1148.type=1451395588;return _this1148;}return _createClass(IfcPropertySet);}(IfcPropertySetDefinition);IFC42.IfcPropertySet=IfcPropertySet;var IfcPropertySetTemplate=/*#__PURE__*/function(_IfcPropertyTemplateD){_inherits(IfcPropertySetTemplate,_IfcPropertyTemplateD);var _super1152=_createSuper(IfcPropertySetTemplate);function IfcPropertySetTemplate(expressID,GlobalId,OwnerHistory,Name,Description,TemplateType,ApplicableEntity,HasPropertyTemplates){var _this1149;_classCallCheck(this,IfcPropertySetTemplate);_this1149=_super1152.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1149.GlobalId=GlobalId;_this1149.OwnerHistory=OwnerHistory;_this1149.Name=Name;_this1149.Description=Description;_this1149.TemplateType=TemplateType;_this1149.ApplicableEntity=ApplicableEntity;_this1149.HasPropertyTemplates=HasPropertyTemplates;_this1149.type=492091185;return _this1149;}return _createClass(IfcPropertySetTemplate);}(IfcPropertyTemplateDefinition);IFC42.IfcPropertySetTemplate=IfcPropertySetTemplate;var IfcPropertySingleValue=/*#__PURE__*/function(_IfcSimpleProperty11){_inherits(IfcPropertySingleValue,_IfcSimpleProperty11);var _super1153=_createSuper(IfcPropertySingleValue);function IfcPropertySingleValue(expressID,Name,Description,NominalValue,Unit){var _this1150;_classCallCheck(this,IfcPropertySingleValue);_this1150=_super1153.call(this,expressID,Name,Description);_this1150.Name=Name;_this1150.Description=Description;_this1150.NominalValue=NominalValue;_this1150.Unit=Unit;_this1150.type=3650150729;return _this1150;}return _createClass(IfcPropertySingleValue);}(IfcSimpleProperty);IFC42.IfcPropertySingleValue=IfcPropertySingleValue;var IfcPropertyTableValue=/*#__PURE__*/function(_IfcSimpleProperty12){_inherits(IfcPropertyTableValue,_IfcSimpleProperty12);var _super1154=_createSuper(IfcPropertyTableValue);function IfcPropertyTableValue(expressID,Name,Description,DefiningValues,DefinedValues,Expression,DefiningUnit,DefinedUnit,CurveInterpolation){var _this1151;_classCallCheck(this,IfcPropertyTableValue);_this1151=_super1154.call(this,expressID,Name,Description);_this1151.Name=Name;_this1151.Description=Description;_this1151.DefiningValues=DefiningValues;_this1151.DefinedValues=DefinedValues;_this1151.Expression=Expression;_this1151.DefiningUnit=DefiningUnit;_this1151.DefinedUnit=DefinedUnit;_this1151.CurveInterpolation=CurveInterpolation;_this1151.type=110355661;return _this1151;}return _createClass(IfcPropertyTableValue);}(IfcSimpleProperty);IFC42.IfcPropertyTableValue=IfcPropertyTableValue;var IfcPropertyTemplate=/*#__PURE__*/function(_IfcPropertyTemplateD2){_inherits(IfcPropertyTemplate,_IfcPropertyTemplateD2);var _super1155=_createSuper(IfcPropertyTemplate);function IfcPropertyTemplate(expressID,GlobalId,OwnerHistory,Name,Description){var _this1152;_classCallCheck(this,IfcPropertyTemplate);_this1152=_super1155.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1152.GlobalId=GlobalId;_this1152.OwnerHistory=OwnerHistory;_this1152.Name=Name;_this1152.Description=Description;_this1152.type=3521284610;return _this1152;}return _createClass(IfcPropertyTemplate);}(IfcPropertyTemplateDefinition);IFC42.IfcPropertyTemplate=IfcPropertyTemplate;var IfcProxy=/*#__PURE__*/function(_IfcProduct9){_inherits(IfcProxy,_IfcProduct9);var _super1156=_createSuper(IfcProxy);function IfcProxy(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,ProxyType,Tag){var _this1153;_classCallCheck(this,IfcProxy);_this1153=_super1156.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1153.GlobalId=GlobalId;_this1153.OwnerHistory=OwnerHistory;_this1153.Name=Name;_this1153.Description=Description;_this1153.ObjectType=ObjectType;_this1153.ObjectPlacement=ObjectPlacement;_this1153.Representation=Representation;_this1153.ProxyType=ProxyType;_this1153.Tag=Tag;_this1153.type=3219374653;return _this1153;}return _createClass(IfcProxy);}(IfcProduct);IFC42.IfcProxy=IfcProxy;var IfcRectangleHollowProfileDef=/*#__PURE__*/function(_IfcRectangleProfileD4){_inherits(IfcRectangleHollowProfileDef,_IfcRectangleProfileD4);var _super1157=_createSuper(IfcRectangleHollowProfileDef);function IfcRectangleHollowProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim,WallThickness,InnerFilletRadius,OuterFilletRadius){var _this1154;_classCallCheck(this,IfcRectangleHollowProfileDef);_this1154=_super1157.call(this,expressID,ProfileType,ProfileName,Position,XDim,YDim);_this1154.ProfileType=ProfileType;_this1154.ProfileName=ProfileName;_this1154.Position=Position;_this1154.XDim=XDim;_this1154.YDim=YDim;_this1154.WallThickness=WallThickness;_this1154.InnerFilletRadius=InnerFilletRadius;_this1154.OuterFilletRadius=OuterFilletRadius;_this1154.type=2770003689;return _this1154;}return _createClass(IfcRectangleHollowProfileDef);}(IfcRectangleProfileDef);IFC42.IfcRectangleHollowProfileDef=IfcRectangleHollowProfileDef;var IfcRectangularPyramid=/*#__PURE__*/function(_IfcCsgPrimitive3D6){_inherits(IfcRectangularPyramid,_IfcCsgPrimitive3D6);var _super1158=_createSuper(IfcRectangularPyramid);function IfcRectangularPyramid(expressID,Position,XLength,YLength,Height){var _this1155;_classCallCheck(this,IfcRectangularPyramid);_this1155=_super1158.call(this,expressID,Position);_this1155.Position=Position;_this1155.XLength=XLength;_this1155.YLength=YLength;_this1155.Height=Height;_this1155.type=2798486643;return _this1155;}return _createClass(IfcRectangularPyramid);}(IfcCsgPrimitive3D);IFC42.IfcRectangularPyramid=IfcRectangularPyramid;var IfcRectangularTrimmedSurface=/*#__PURE__*/function(_IfcBoundedSurface5){_inherits(IfcRectangularTrimmedSurface,_IfcBoundedSurface5);var _super1159=_createSuper(IfcRectangularTrimmedSurface);function IfcRectangularTrimmedSurface(expressID,BasisSurface,U1,V1,U2,V2,Usense,Vsense){var _this1156;_classCallCheck(this,IfcRectangularTrimmedSurface);_this1156=_super1159.call(this,expressID);_this1156.BasisSurface=BasisSurface;_this1156.U1=U1;_this1156.V1=V1;_this1156.U2=U2;_this1156.V2=V2;_this1156.Usense=Usense;_this1156.Vsense=Vsense;_this1156.type=3454111270;return _this1156;}return _createClass(IfcRectangularTrimmedSurface);}(IfcBoundedSurface);IFC42.IfcRectangularTrimmedSurface=IfcRectangularTrimmedSurface;var IfcReinforcementDefinitionProperties=/*#__PURE__*/function(_IfcPreDefinedPropert4){_inherits(IfcReinforcementDefinitionProperties,_IfcPreDefinedPropert4);var _super1160=_createSuper(IfcReinforcementDefinitionProperties);function IfcReinforcementDefinitionProperties(expressID,GlobalId,OwnerHistory,Name,Description,DefinitionType,ReinforcementSectionDefinitions){var _this1157;_classCallCheck(this,IfcReinforcementDefinitionProperties);_this1157=_super1160.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1157.GlobalId=GlobalId;_this1157.OwnerHistory=OwnerHistory;_this1157.Name=Name;_this1157.Description=Description;_this1157.DefinitionType=DefinitionType;_this1157.ReinforcementSectionDefinitions=ReinforcementSectionDefinitions;_this1157.type=3765753017;return _this1157;}return _createClass(IfcReinforcementDefinitionProperties);}(IfcPreDefinedPropertySet);IFC42.IfcReinforcementDefinitionProperties=IfcReinforcementDefinitionProperties;var IfcRelAssigns=/*#__PURE__*/function(_IfcRelationship6){_inherits(IfcRelAssigns,_IfcRelationship6);var _super1161=_createSuper(IfcRelAssigns);function IfcRelAssigns(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType){var _this1158;_classCallCheck(this,IfcRelAssigns);_this1158=_super1161.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1158.GlobalId=GlobalId;_this1158.OwnerHistory=OwnerHistory;_this1158.Name=Name;_this1158.Description=Description;_this1158.RelatedObjects=RelatedObjects;_this1158.RelatedObjectsType=RelatedObjectsType;_this1158.type=3939117080;return _this1158;}return _createClass(IfcRelAssigns);}(IfcRelationship);IFC42.IfcRelAssigns=IfcRelAssigns;var IfcRelAssignsToActor=/*#__PURE__*/function(_IfcRelAssigns7){_inherits(IfcRelAssignsToActor,_IfcRelAssigns7);var _super1162=_createSuper(IfcRelAssignsToActor);function IfcRelAssignsToActor(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingActor,ActingRole){var _this1159;_classCallCheck(this,IfcRelAssignsToActor);_this1159=_super1162.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1159.GlobalId=GlobalId;_this1159.OwnerHistory=OwnerHistory;_this1159.Name=Name;_this1159.Description=Description;_this1159.RelatedObjects=RelatedObjects;_this1159.RelatedObjectsType=RelatedObjectsType;_this1159.RelatingActor=RelatingActor;_this1159.ActingRole=ActingRole;_this1159.type=1683148259;return _this1159;}return _createClass(IfcRelAssignsToActor);}(IfcRelAssigns);IFC42.IfcRelAssignsToActor=IfcRelAssignsToActor;var IfcRelAssignsToControl=/*#__PURE__*/function(_IfcRelAssigns8){_inherits(IfcRelAssignsToControl,_IfcRelAssigns8);var _super1163=_createSuper(IfcRelAssignsToControl);function IfcRelAssignsToControl(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl){var _this1160;_classCallCheck(this,IfcRelAssignsToControl);_this1160=_super1163.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1160.GlobalId=GlobalId;_this1160.OwnerHistory=OwnerHistory;_this1160.Name=Name;_this1160.Description=Description;_this1160.RelatedObjects=RelatedObjects;_this1160.RelatedObjectsType=RelatedObjectsType;_this1160.RelatingControl=RelatingControl;_this1160.type=2495723537;return _this1160;}return _createClass(IfcRelAssignsToControl);}(IfcRelAssigns);IFC42.IfcRelAssignsToControl=IfcRelAssignsToControl;var IfcRelAssignsToGroup=/*#__PURE__*/function(_IfcRelAssigns9){_inherits(IfcRelAssignsToGroup,_IfcRelAssigns9);var _super1164=_createSuper(IfcRelAssignsToGroup);function IfcRelAssignsToGroup(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingGroup){var _this1161;_classCallCheck(this,IfcRelAssignsToGroup);_this1161=_super1164.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1161.GlobalId=GlobalId;_this1161.OwnerHistory=OwnerHistory;_this1161.Name=Name;_this1161.Description=Description;_this1161.RelatedObjects=RelatedObjects;_this1161.RelatedObjectsType=RelatedObjectsType;_this1161.RelatingGroup=RelatingGroup;_this1161.type=1307041759;return _this1161;}return _createClass(IfcRelAssignsToGroup);}(IfcRelAssigns);IFC42.IfcRelAssignsToGroup=IfcRelAssignsToGroup;var IfcRelAssignsToGroupByFactor=/*#__PURE__*/function(_IfcRelAssignsToGroup){_inherits(IfcRelAssignsToGroupByFactor,_IfcRelAssignsToGroup);var _super1165=_createSuper(IfcRelAssignsToGroupByFactor);function IfcRelAssignsToGroupByFactor(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingGroup,Factor){var _this1162;_classCallCheck(this,IfcRelAssignsToGroupByFactor);_this1162=_super1165.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingGroup);_this1162.GlobalId=GlobalId;_this1162.OwnerHistory=OwnerHistory;_this1162.Name=Name;_this1162.Description=Description;_this1162.RelatedObjects=RelatedObjects;_this1162.RelatedObjectsType=RelatedObjectsType;_this1162.RelatingGroup=RelatingGroup;_this1162.Factor=Factor;_this1162.type=1027710054;return _this1162;}return _createClass(IfcRelAssignsToGroupByFactor);}(IfcRelAssignsToGroup);IFC42.IfcRelAssignsToGroupByFactor=IfcRelAssignsToGroupByFactor;var IfcRelAssignsToProcess=/*#__PURE__*/function(_IfcRelAssigns10){_inherits(IfcRelAssignsToProcess,_IfcRelAssigns10);var _super1166=_createSuper(IfcRelAssignsToProcess);function IfcRelAssignsToProcess(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingProcess,QuantityInProcess){var _this1163;_classCallCheck(this,IfcRelAssignsToProcess);_this1163=_super1166.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1163.GlobalId=GlobalId;_this1163.OwnerHistory=OwnerHistory;_this1163.Name=Name;_this1163.Description=Description;_this1163.RelatedObjects=RelatedObjects;_this1163.RelatedObjectsType=RelatedObjectsType;_this1163.RelatingProcess=RelatingProcess;_this1163.QuantityInProcess=QuantityInProcess;_this1163.type=4278684876;return _this1163;}return _createClass(IfcRelAssignsToProcess);}(IfcRelAssigns);IFC42.IfcRelAssignsToProcess=IfcRelAssignsToProcess;var IfcRelAssignsToProduct=/*#__PURE__*/function(_IfcRelAssigns11){_inherits(IfcRelAssignsToProduct,_IfcRelAssigns11);var _super1167=_createSuper(IfcRelAssignsToProduct);function IfcRelAssignsToProduct(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingProduct){var _this1164;_classCallCheck(this,IfcRelAssignsToProduct);_this1164=_super1167.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1164.GlobalId=GlobalId;_this1164.OwnerHistory=OwnerHistory;_this1164.Name=Name;_this1164.Description=Description;_this1164.RelatedObjects=RelatedObjects;_this1164.RelatedObjectsType=RelatedObjectsType;_this1164.RelatingProduct=RelatingProduct;_this1164.type=2857406711;return _this1164;}return _createClass(IfcRelAssignsToProduct);}(IfcRelAssigns);IFC42.IfcRelAssignsToProduct=IfcRelAssignsToProduct;var IfcRelAssignsToResource=/*#__PURE__*/function(_IfcRelAssigns12){_inherits(IfcRelAssignsToResource,_IfcRelAssigns12);var _super1168=_createSuper(IfcRelAssignsToResource);function IfcRelAssignsToResource(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingResource){var _this1165;_classCallCheck(this,IfcRelAssignsToResource);_this1165=_super1168.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1165.GlobalId=GlobalId;_this1165.OwnerHistory=OwnerHistory;_this1165.Name=Name;_this1165.Description=Description;_this1165.RelatedObjects=RelatedObjects;_this1165.RelatedObjectsType=RelatedObjectsType;_this1165.RelatingResource=RelatingResource;_this1165.type=205026976;return _this1165;}return _createClass(IfcRelAssignsToResource);}(IfcRelAssigns);IFC42.IfcRelAssignsToResource=IfcRelAssignsToResource;var IfcRelAssociates=/*#__PURE__*/function(_IfcRelationship7){_inherits(IfcRelAssociates,_IfcRelationship7);var _super1169=_createSuper(IfcRelAssociates);function IfcRelAssociates(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects){var _this1166;_classCallCheck(this,IfcRelAssociates);_this1166=_super1169.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1166.GlobalId=GlobalId;_this1166.OwnerHistory=OwnerHistory;_this1166.Name=Name;_this1166.Description=Description;_this1166.RelatedObjects=RelatedObjects;_this1166.type=1865459582;return _this1166;}return _createClass(IfcRelAssociates);}(IfcRelationship);IFC42.IfcRelAssociates=IfcRelAssociates;var IfcRelAssociatesApproval=/*#__PURE__*/function(_IfcRelAssociates9){_inherits(IfcRelAssociatesApproval,_IfcRelAssociates9);var _super1170=_createSuper(IfcRelAssociatesApproval);function IfcRelAssociatesApproval(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingApproval){var _this1167;_classCallCheck(this,IfcRelAssociatesApproval);_this1167=_super1170.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1167.GlobalId=GlobalId;_this1167.OwnerHistory=OwnerHistory;_this1167.Name=Name;_this1167.Description=Description;_this1167.RelatedObjects=RelatedObjects;_this1167.RelatingApproval=RelatingApproval;_this1167.type=4095574036;return _this1167;}return _createClass(IfcRelAssociatesApproval);}(IfcRelAssociates);IFC42.IfcRelAssociatesApproval=IfcRelAssociatesApproval;var IfcRelAssociatesClassification=/*#__PURE__*/function(_IfcRelAssociates10){_inherits(IfcRelAssociatesClassification,_IfcRelAssociates10);var _super1171=_createSuper(IfcRelAssociatesClassification);function IfcRelAssociatesClassification(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingClassification){var _this1168;_classCallCheck(this,IfcRelAssociatesClassification);_this1168=_super1171.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1168.GlobalId=GlobalId;_this1168.OwnerHistory=OwnerHistory;_this1168.Name=Name;_this1168.Description=Description;_this1168.RelatedObjects=RelatedObjects;_this1168.RelatingClassification=RelatingClassification;_this1168.type=919958153;return _this1168;}return _createClass(IfcRelAssociatesClassification);}(IfcRelAssociates);IFC42.IfcRelAssociatesClassification=IfcRelAssociatesClassification;var IfcRelAssociatesConstraint=/*#__PURE__*/function(_IfcRelAssociates11){_inherits(IfcRelAssociatesConstraint,_IfcRelAssociates11);var _super1172=_createSuper(IfcRelAssociatesConstraint);function IfcRelAssociatesConstraint(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,Intent,RelatingConstraint){var _this1169;_classCallCheck(this,IfcRelAssociatesConstraint);_this1169=_super1172.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1169.GlobalId=GlobalId;_this1169.OwnerHistory=OwnerHistory;_this1169.Name=Name;_this1169.Description=Description;_this1169.RelatedObjects=RelatedObjects;_this1169.Intent=Intent;_this1169.RelatingConstraint=RelatingConstraint;_this1169.type=2728634034;return _this1169;}return _createClass(IfcRelAssociatesConstraint);}(IfcRelAssociates);IFC42.IfcRelAssociatesConstraint=IfcRelAssociatesConstraint;var IfcRelAssociatesDocument=/*#__PURE__*/function(_IfcRelAssociates12){_inherits(IfcRelAssociatesDocument,_IfcRelAssociates12);var _super1173=_createSuper(IfcRelAssociatesDocument);function IfcRelAssociatesDocument(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingDocument){var _this1170;_classCallCheck(this,IfcRelAssociatesDocument);_this1170=_super1173.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1170.GlobalId=GlobalId;_this1170.OwnerHistory=OwnerHistory;_this1170.Name=Name;_this1170.Description=Description;_this1170.RelatedObjects=RelatedObjects;_this1170.RelatingDocument=RelatingDocument;_this1170.type=982818633;return _this1170;}return _createClass(IfcRelAssociatesDocument);}(IfcRelAssociates);IFC42.IfcRelAssociatesDocument=IfcRelAssociatesDocument;var IfcRelAssociatesLibrary=/*#__PURE__*/function(_IfcRelAssociates13){_inherits(IfcRelAssociatesLibrary,_IfcRelAssociates13);var _super1174=_createSuper(IfcRelAssociatesLibrary);function IfcRelAssociatesLibrary(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingLibrary){var _this1171;_classCallCheck(this,IfcRelAssociatesLibrary);_this1171=_super1174.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1171.GlobalId=GlobalId;_this1171.OwnerHistory=OwnerHistory;_this1171.Name=Name;_this1171.Description=Description;_this1171.RelatedObjects=RelatedObjects;_this1171.RelatingLibrary=RelatingLibrary;_this1171.type=3840914261;return _this1171;}return _createClass(IfcRelAssociatesLibrary);}(IfcRelAssociates);IFC42.IfcRelAssociatesLibrary=IfcRelAssociatesLibrary;var IfcRelAssociatesMaterial=/*#__PURE__*/function(_IfcRelAssociates14){_inherits(IfcRelAssociatesMaterial,_IfcRelAssociates14);var _super1175=_createSuper(IfcRelAssociatesMaterial);function IfcRelAssociatesMaterial(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingMaterial){var _this1172;_classCallCheck(this,IfcRelAssociatesMaterial);_this1172=_super1175.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1172.GlobalId=GlobalId;_this1172.OwnerHistory=OwnerHistory;_this1172.Name=Name;_this1172.Description=Description;_this1172.RelatedObjects=RelatedObjects;_this1172.RelatingMaterial=RelatingMaterial;_this1172.type=2655215786;return _this1172;}return _createClass(IfcRelAssociatesMaterial);}(IfcRelAssociates);IFC42.IfcRelAssociatesMaterial=IfcRelAssociatesMaterial;var IfcRelConnects=/*#__PURE__*/function(_IfcRelationship8){_inherits(IfcRelConnects,_IfcRelationship8);var _super1176=_createSuper(IfcRelConnects);function IfcRelConnects(expressID,GlobalId,OwnerHistory,Name,Description){var _this1173;_classCallCheck(this,IfcRelConnects);_this1173=_super1176.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1173.GlobalId=GlobalId;_this1173.OwnerHistory=OwnerHistory;_this1173.Name=Name;_this1173.Description=Description;_this1173.type=826625072;return _this1173;}return _createClass(IfcRelConnects);}(IfcRelationship);IFC42.IfcRelConnects=IfcRelConnects;var IfcRelConnectsElements=/*#__PURE__*/function(_IfcRelConnects19){_inherits(IfcRelConnectsElements,_IfcRelConnects19);var _super1177=_createSuper(IfcRelConnectsElements);function IfcRelConnectsElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement){var _this1174;_classCallCheck(this,IfcRelConnectsElements);_this1174=_super1177.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1174.GlobalId=GlobalId;_this1174.OwnerHistory=OwnerHistory;_this1174.Name=Name;_this1174.Description=Description;_this1174.ConnectionGeometry=ConnectionGeometry;_this1174.RelatingElement=RelatingElement;_this1174.RelatedElement=RelatedElement;_this1174.type=1204542856;return _this1174;}return _createClass(IfcRelConnectsElements);}(IfcRelConnects);IFC42.IfcRelConnectsElements=IfcRelConnectsElements;var IfcRelConnectsPathElements=/*#__PURE__*/function(_IfcRelConnectsElemen3){_inherits(IfcRelConnectsPathElements,_IfcRelConnectsElemen3);var _super1178=_createSuper(IfcRelConnectsPathElements);function IfcRelConnectsPathElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement,RelatingPriorities,RelatedPriorities,RelatedConnectionType,RelatingConnectionType){var _this1175;_classCallCheck(this,IfcRelConnectsPathElements);_this1175=_super1178.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement);_this1175.GlobalId=GlobalId;_this1175.OwnerHistory=OwnerHistory;_this1175.Name=Name;_this1175.Description=Description;_this1175.ConnectionGeometry=ConnectionGeometry;_this1175.RelatingElement=RelatingElement;_this1175.RelatedElement=RelatedElement;_this1175.RelatingPriorities=RelatingPriorities;_this1175.RelatedPriorities=RelatedPriorities;_this1175.RelatedConnectionType=RelatedConnectionType;_this1175.RelatingConnectionType=RelatingConnectionType;_this1175.type=3945020480;return _this1175;}return _createClass(IfcRelConnectsPathElements);}(IfcRelConnectsElements);IFC42.IfcRelConnectsPathElements=IfcRelConnectsPathElements;var IfcRelConnectsPortToElement=/*#__PURE__*/function(_IfcRelConnects20){_inherits(IfcRelConnectsPortToElement,_IfcRelConnects20);var _super1179=_createSuper(IfcRelConnectsPortToElement);function IfcRelConnectsPortToElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingPort,RelatedElement){var _this1176;_classCallCheck(this,IfcRelConnectsPortToElement);_this1176=_super1179.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1176.GlobalId=GlobalId;_this1176.OwnerHistory=OwnerHistory;_this1176.Name=Name;_this1176.Description=Description;_this1176.RelatingPort=RelatingPort;_this1176.RelatedElement=RelatedElement;_this1176.type=4201705270;return _this1176;}return _createClass(IfcRelConnectsPortToElement);}(IfcRelConnects);IFC42.IfcRelConnectsPortToElement=IfcRelConnectsPortToElement;var IfcRelConnectsPorts=/*#__PURE__*/function(_IfcRelConnects21){_inherits(IfcRelConnectsPorts,_IfcRelConnects21);var _super1180=_createSuper(IfcRelConnectsPorts);function IfcRelConnectsPorts(expressID,GlobalId,OwnerHistory,Name,Description,RelatingPort,RelatedPort,RealizingElement){var _this1177;_classCallCheck(this,IfcRelConnectsPorts);_this1177=_super1180.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1177.GlobalId=GlobalId;_this1177.OwnerHistory=OwnerHistory;_this1177.Name=Name;_this1177.Description=Description;_this1177.RelatingPort=RelatingPort;_this1177.RelatedPort=RelatedPort;_this1177.RealizingElement=RealizingElement;_this1177.type=3190031847;return _this1177;}return _createClass(IfcRelConnectsPorts);}(IfcRelConnects);IFC42.IfcRelConnectsPorts=IfcRelConnectsPorts;var IfcRelConnectsStructuralActivity=/*#__PURE__*/function(_IfcRelConnects22){_inherits(IfcRelConnectsStructuralActivity,_IfcRelConnects22);var _super1181=_createSuper(IfcRelConnectsStructuralActivity);function IfcRelConnectsStructuralActivity(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedStructuralActivity){var _this1178;_classCallCheck(this,IfcRelConnectsStructuralActivity);_this1178=_super1181.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1178.GlobalId=GlobalId;_this1178.OwnerHistory=OwnerHistory;_this1178.Name=Name;_this1178.Description=Description;_this1178.RelatingElement=RelatingElement;_this1178.RelatedStructuralActivity=RelatedStructuralActivity;_this1178.type=2127690289;return _this1178;}return _createClass(IfcRelConnectsStructuralActivity);}(IfcRelConnects);IFC42.IfcRelConnectsStructuralActivity=IfcRelConnectsStructuralActivity;var IfcRelConnectsStructuralMember=/*#__PURE__*/function(_IfcRelConnects23){_inherits(IfcRelConnectsStructuralMember,_IfcRelConnects23);var _super1182=_createSuper(IfcRelConnectsStructuralMember);function IfcRelConnectsStructuralMember(expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem){var _this1179;_classCallCheck(this,IfcRelConnectsStructuralMember);_this1179=_super1182.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1179.GlobalId=GlobalId;_this1179.OwnerHistory=OwnerHistory;_this1179.Name=Name;_this1179.Description=Description;_this1179.RelatingStructuralMember=RelatingStructuralMember;_this1179.RelatedStructuralConnection=RelatedStructuralConnection;_this1179.AppliedCondition=AppliedCondition;_this1179.AdditionalConditions=AdditionalConditions;_this1179.SupportedLength=SupportedLength;_this1179.ConditionCoordinateSystem=ConditionCoordinateSystem;_this1179.type=1638771189;return _this1179;}return _createClass(IfcRelConnectsStructuralMember);}(IfcRelConnects);IFC42.IfcRelConnectsStructuralMember=IfcRelConnectsStructuralMember;var IfcRelConnectsWithEccentricity=/*#__PURE__*/function(_IfcRelConnectsStruct2){_inherits(IfcRelConnectsWithEccentricity,_IfcRelConnectsStruct2);var _super1183=_createSuper(IfcRelConnectsWithEccentricity);function IfcRelConnectsWithEccentricity(expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem,ConnectionConstraint){var _this1180;_classCallCheck(this,IfcRelConnectsWithEccentricity);_this1180=_super1183.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem);_this1180.GlobalId=GlobalId;_this1180.OwnerHistory=OwnerHistory;_this1180.Name=Name;_this1180.Description=Description;_this1180.RelatingStructuralMember=RelatingStructuralMember;_this1180.RelatedStructuralConnection=RelatedStructuralConnection;_this1180.AppliedCondition=AppliedCondition;_this1180.AdditionalConditions=AdditionalConditions;_this1180.SupportedLength=SupportedLength;_this1180.ConditionCoordinateSystem=ConditionCoordinateSystem;_this1180.ConnectionConstraint=ConnectionConstraint;_this1180.type=504942748;return _this1180;}return _createClass(IfcRelConnectsWithEccentricity);}(IfcRelConnectsStructuralMember);IFC42.IfcRelConnectsWithEccentricity=IfcRelConnectsWithEccentricity;var IfcRelConnectsWithRealizingElements=/*#__PURE__*/function(_IfcRelConnectsElemen4){_inherits(IfcRelConnectsWithRealizingElements,_IfcRelConnectsElemen4);var _super1184=_createSuper(IfcRelConnectsWithRealizingElements);function IfcRelConnectsWithRealizingElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement,RealizingElements,ConnectionType){var _this1181;_classCallCheck(this,IfcRelConnectsWithRealizingElements);_this1181=_super1184.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement);_this1181.GlobalId=GlobalId;_this1181.OwnerHistory=OwnerHistory;_this1181.Name=Name;_this1181.Description=Description;_this1181.ConnectionGeometry=ConnectionGeometry;_this1181.RelatingElement=RelatingElement;_this1181.RelatedElement=RelatedElement;_this1181.RealizingElements=RealizingElements;_this1181.ConnectionType=ConnectionType;_this1181.type=3678494232;return _this1181;}return _createClass(IfcRelConnectsWithRealizingElements);}(IfcRelConnectsElements);IFC42.IfcRelConnectsWithRealizingElements=IfcRelConnectsWithRealizingElements;var IfcRelContainedInSpatialStructure=/*#__PURE__*/function(_IfcRelConnects24){_inherits(IfcRelContainedInSpatialStructure,_IfcRelConnects24);var _super1185=_createSuper(IfcRelContainedInSpatialStructure);function IfcRelContainedInSpatialStructure(expressID,GlobalId,OwnerHistory,Name,Description,RelatedElements,RelatingStructure){var _this1182;_classCallCheck(this,IfcRelContainedInSpatialStructure);_this1182=_super1185.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1182.GlobalId=GlobalId;_this1182.OwnerHistory=OwnerHistory;_this1182.Name=Name;_this1182.Description=Description;_this1182.RelatedElements=RelatedElements;_this1182.RelatingStructure=RelatingStructure;_this1182.type=3242617779;return _this1182;}return _createClass(IfcRelContainedInSpatialStructure);}(IfcRelConnects);IFC42.IfcRelContainedInSpatialStructure=IfcRelContainedInSpatialStructure;var IfcRelCoversBldgElements=/*#__PURE__*/function(_IfcRelConnects25){_inherits(IfcRelCoversBldgElements,_IfcRelConnects25);var _super1186=_createSuper(IfcRelCoversBldgElements);function IfcRelCoversBldgElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatingBuildingElement,RelatedCoverings){var _this1183;_classCallCheck(this,IfcRelCoversBldgElements);_this1183=_super1186.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1183.GlobalId=GlobalId;_this1183.OwnerHistory=OwnerHistory;_this1183.Name=Name;_this1183.Description=Description;_this1183.RelatingBuildingElement=RelatingBuildingElement;_this1183.RelatedCoverings=RelatedCoverings;_this1183.type=886880790;return _this1183;}return _createClass(IfcRelCoversBldgElements);}(IfcRelConnects);IFC42.IfcRelCoversBldgElements=IfcRelCoversBldgElements;var IfcRelCoversSpaces=/*#__PURE__*/function(_IfcRelConnects26){_inherits(IfcRelCoversSpaces,_IfcRelConnects26);var _super1187=_createSuper(IfcRelCoversSpaces);function IfcRelCoversSpaces(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedCoverings){var _this1184;_classCallCheck(this,IfcRelCoversSpaces);_this1184=_super1187.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1184.GlobalId=GlobalId;_this1184.OwnerHistory=OwnerHistory;_this1184.Name=Name;_this1184.Description=Description;_this1184.RelatingSpace=RelatingSpace;_this1184.RelatedCoverings=RelatedCoverings;_this1184.type=2802773753;return _this1184;}return _createClass(IfcRelCoversSpaces);}(IfcRelConnects);IFC42.IfcRelCoversSpaces=IfcRelCoversSpaces;var IfcRelDeclares=/*#__PURE__*/function(_IfcRelationship9){_inherits(IfcRelDeclares,_IfcRelationship9);var _super1188=_createSuper(IfcRelDeclares);function IfcRelDeclares(expressID,GlobalId,OwnerHistory,Name,Description,RelatingContext,RelatedDefinitions){var _this1185;_classCallCheck(this,IfcRelDeclares);_this1185=_super1188.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1185.GlobalId=GlobalId;_this1185.OwnerHistory=OwnerHistory;_this1185.Name=Name;_this1185.Description=Description;_this1185.RelatingContext=RelatingContext;_this1185.RelatedDefinitions=RelatedDefinitions;_this1185.type=2565941209;return _this1185;}return _createClass(IfcRelDeclares);}(IfcRelationship);IFC42.IfcRelDeclares=IfcRelDeclares;var IfcRelDecomposes=/*#__PURE__*/function(_IfcRelationship10){_inherits(IfcRelDecomposes,_IfcRelationship10);var _super1189=_createSuper(IfcRelDecomposes);function IfcRelDecomposes(expressID,GlobalId,OwnerHistory,Name,Description){var _this1186;_classCallCheck(this,IfcRelDecomposes);_this1186=_super1189.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1186.GlobalId=GlobalId;_this1186.OwnerHistory=OwnerHistory;_this1186.Name=Name;_this1186.Description=Description;_this1186.type=2551354335;return _this1186;}return _createClass(IfcRelDecomposes);}(IfcRelationship);IFC42.IfcRelDecomposes=IfcRelDecomposes;var IfcRelDefines=/*#__PURE__*/function(_IfcRelationship11){_inherits(IfcRelDefines,_IfcRelationship11);var _super1190=_createSuper(IfcRelDefines);function IfcRelDefines(expressID,GlobalId,OwnerHistory,Name,Description){var _this1187;_classCallCheck(this,IfcRelDefines);_this1187=_super1190.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1187.GlobalId=GlobalId;_this1187.OwnerHistory=OwnerHistory;_this1187.Name=Name;_this1187.Description=Description;_this1187.type=693640335;return _this1187;}return _createClass(IfcRelDefines);}(IfcRelationship);IFC42.IfcRelDefines=IfcRelDefines;var IfcRelDefinesByObject=/*#__PURE__*/function(_IfcRelDefines3){_inherits(IfcRelDefinesByObject,_IfcRelDefines3);var _super1191=_createSuper(IfcRelDefinesByObject);function IfcRelDefinesByObject(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingObject){var _this1188;_classCallCheck(this,IfcRelDefinesByObject);_this1188=_super1191.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1188.GlobalId=GlobalId;_this1188.OwnerHistory=OwnerHistory;_this1188.Name=Name;_this1188.Description=Description;_this1188.RelatedObjects=RelatedObjects;_this1188.RelatingObject=RelatingObject;_this1188.type=1462361463;return _this1188;}return _createClass(IfcRelDefinesByObject);}(IfcRelDefines);IFC42.IfcRelDefinesByObject=IfcRelDefinesByObject;var IfcRelDefinesByProperties=/*#__PURE__*/function(_IfcRelDefines4){_inherits(IfcRelDefinesByProperties,_IfcRelDefines4);var _super1192=_createSuper(IfcRelDefinesByProperties);function IfcRelDefinesByProperties(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingPropertyDefinition){var _this1189;_classCallCheck(this,IfcRelDefinesByProperties);_this1189=_super1192.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1189.GlobalId=GlobalId;_this1189.OwnerHistory=OwnerHistory;_this1189.Name=Name;_this1189.Description=Description;_this1189.RelatedObjects=RelatedObjects;_this1189.RelatingPropertyDefinition=RelatingPropertyDefinition;_this1189.type=4186316022;return _this1189;}return _createClass(IfcRelDefinesByProperties);}(IfcRelDefines);IFC42.IfcRelDefinesByProperties=IfcRelDefinesByProperties;var IfcRelDefinesByTemplate=/*#__PURE__*/function(_IfcRelDefines5){_inherits(IfcRelDefinesByTemplate,_IfcRelDefines5);var _super1193=_createSuper(IfcRelDefinesByTemplate);function IfcRelDefinesByTemplate(expressID,GlobalId,OwnerHistory,Name,Description,RelatedPropertySets,RelatingTemplate){var _this1190;_classCallCheck(this,IfcRelDefinesByTemplate);_this1190=_super1193.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1190.GlobalId=GlobalId;_this1190.OwnerHistory=OwnerHistory;_this1190.Name=Name;_this1190.Description=Description;_this1190.RelatedPropertySets=RelatedPropertySets;_this1190.RelatingTemplate=RelatingTemplate;_this1190.type=307848117;return _this1190;}return _createClass(IfcRelDefinesByTemplate);}(IfcRelDefines);IFC42.IfcRelDefinesByTemplate=IfcRelDefinesByTemplate;var IfcRelDefinesByType=/*#__PURE__*/function(_IfcRelDefines6){_inherits(IfcRelDefinesByType,_IfcRelDefines6);var _super1194=_createSuper(IfcRelDefinesByType);function IfcRelDefinesByType(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingType){var _this1191;_classCallCheck(this,IfcRelDefinesByType);_this1191=_super1194.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1191.GlobalId=GlobalId;_this1191.OwnerHistory=OwnerHistory;_this1191.Name=Name;_this1191.Description=Description;_this1191.RelatedObjects=RelatedObjects;_this1191.RelatingType=RelatingType;_this1191.type=781010003;return _this1191;}return _createClass(IfcRelDefinesByType);}(IfcRelDefines);IFC42.IfcRelDefinesByType=IfcRelDefinesByType;var IfcRelFillsElement=/*#__PURE__*/function(_IfcRelConnects27){_inherits(IfcRelFillsElement,_IfcRelConnects27);var _super1195=_createSuper(IfcRelFillsElement);function IfcRelFillsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingOpeningElement,RelatedBuildingElement){var _this1192;_classCallCheck(this,IfcRelFillsElement);_this1192=_super1195.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1192.GlobalId=GlobalId;_this1192.OwnerHistory=OwnerHistory;_this1192.Name=Name;_this1192.Description=Description;_this1192.RelatingOpeningElement=RelatingOpeningElement;_this1192.RelatedBuildingElement=RelatedBuildingElement;_this1192.type=3940055652;return _this1192;}return _createClass(IfcRelFillsElement);}(IfcRelConnects);IFC42.IfcRelFillsElement=IfcRelFillsElement;var IfcRelFlowControlElements=/*#__PURE__*/function(_IfcRelConnects28){_inherits(IfcRelFlowControlElements,_IfcRelConnects28);var _super1196=_createSuper(IfcRelFlowControlElements);function IfcRelFlowControlElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatedControlElements,RelatingFlowElement){var _this1193;_classCallCheck(this,IfcRelFlowControlElements);_this1193=_super1196.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1193.GlobalId=GlobalId;_this1193.OwnerHistory=OwnerHistory;_this1193.Name=Name;_this1193.Description=Description;_this1193.RelatedControlElements=RelatedControlElements;_this1193.RelatingFlowElement=RelatingFlowElement;_this1193.type=279856033;return _this1193;}return _createClass(IfcRelFlowControlElements);}(IfcRelConnects);IFC42.IfcRelFlowControlElements=IfcRelFlowControlElements;var IfcRelInterferesElements=/*#__PURE__*/function(_IfcRelConnects29){_inherits(IfcRelInterferesElements,_IfcRelConnects29);var _super1197=_createSuper(IfcRelInterferesElements);function IfcRelInterferesElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedElement,InterferenceGeometry,InterferenceType,ImpliedOrder){var _this1194;_classCallCheck(this,IfcRelInterferesElements);_this1194=_super1197.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1194.GlobalId=GlobalId;_this1194.OwnerHistory=OwnerHistory;_this1194.Name=Name;_this1194.Description=Description;_this1194.RelatingElement=RelatingElement;_this1194.RelatedElement=RelatedElement;_this1194.InterferenceGeometry=InterferenceGeometry;_this1194.InterferenceType=InterferenceType;_this1194.ImpliedOrder=ImpliedOrder;_this1194.type=427948657;return _this1194;}return _createClass(IfcRelInterferesElements);}(IfcRelConnects);IFC42.IfcRelInterferesElements=IfcRelInterferesElements;var IfcRelNests=/*#__PURE__*/function(_IfcRelDecomposes3){_inherits(IfcRelNests,_IfcRelDecomposes3);var _super1198=_createSuper(IfcRelNests);function IfcRelNests(expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects){var _this1195;_classCallCheck(this,IfcRelNests);_this1195=_super1198.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1195.GlobalId=GlobalId;_this1195.OwnerHistory=OwnerHistory;_this1195.Name=Name;_this1195.Description=Description;_this1195.RelatingObject=RelatingObject;_this1195.RelatedObjects=RelatedObjects;_this1195.type=3268803585;return _this1195;}return _createClass(IfcRelNests);}(IfcRelDecomposes);IFC42.IfcRelNests=IfcRelNests;var IfcRelProjectsElement=/*#__PURE__*/function(_IfcRelDecomposes4){_inherits(IfcRelProjectsElement,_IfcRelDecomposes4);var _super1199=_createSuper(IfcRelProjectsElement);function IfcRelProjectsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedFeatureElement){var _this1196;_classCallCheck(this,IfcRelProjectsElement);_this1196=_super1199.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1196.GlobalId=GlobalId;_this1196.OwnerHistory=OwnerHistory;_this1196.Name=Name;_this1196.Description=Description;_this1196.RelatingElement=RelatingElement;_this1196.RelatedFeatureElement=RelatedFeatureElement;_this1196.type=750771296;return _this1196;}return _createClass(IfcRelProjectsElement);}(IfcRelDecomposes);IFC42.IfcRelProjectsElement=IfcRelProjectsElement;var IfcRelReferencedInSpatialStructure=/*#__PURE__*/function(_IfcRelConnects30){_inherits(IfcRelReferencedInSpatialStructure,_IfcRelConnects30);var _super1200=_createSuper(IfcRelReferencedInSpatialStructure);function IfcRelReferencedInSpatialStructure(expressID,GlobalId,OwnerHistory,Name,Description,RelatedElements,RelatingStructure){var _this1197;_classCallCheck(this,IfcRelReferencedInSpatialStructure);_this1197=_super1200.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1197.GlobalId=GlobalId;_this1197.OwnerHistory=OwnerHistory;_this1197.Name=Name;_this1197.Description=Description;_this1197.RelatedElements=RelatedElements;_this1197.RelatingStructure=RelatingStructure;_this1197.type=1245217292;return _this1197;}return _createClass(IfcRelReferencedInSpatialStructure);}(IfcRelConnects);IFC42.IfcRelReferencedInSpatialStructure=IfcRelReferencedInSpatialStructure;var IfcRelSequence=/*#__PURE__*/function(_IfcRelConnects31){_inherits(IfcRelSequence,_IfcRelConnects31);var _super1201=_createSuper(IfcRelSequence);function IfcRelSequence(expressID,GlobalId,OwnerHistory,Name,Description,RelatingProcess,RelatedProcess,TimeLag,SequenceType,UserDefinedSequenceType){var _this1198;_classCallCheck(this,IfcRelSequence);_this1198=_super1201.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1198.GlobalId=GlobalId;_this1198.OwnerHistory=OwnerHistory;_this1198.Name=Name;_this1198.Description=Description;_this1198.RelatingProcess=RelatingProcess;_this1198.RelatedProcess=RelatedProcess;_this1198.TimeLag=TimeLag;_this1198.SequenceType=SequenceType;_this1198.UserDefinedSequenceType=UserDefinedSequenceType;_this1198.type=4122056220;return _this1198;}return _createClass(IfcRelSequence);}(IfcRelConnects);IFC42.IfcRelSequence=IfcRelSequence;var IfcRelServicesBuildings=/*#__PURE__*/function(_IfcRelConnects32){_inherits(IfcRelServicesBuildings,_IfcRelConnects32);var _super1202=_createSuper(IfcRelServicesBuildings);function IfcRelServicesBuildings(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSystem,RelatedBuildings){var _this1199;_classCallCheck(this,IfcRelServicesBuildings);_this1199=_super1202.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1199.GlobalId=GlobalId;_this1199.OwnerHistory=OwnerHistory;_this1199.Name=Name;_this1199.Description=Description;_this1199.RelatingSystem=RelatingSystem;_this1199.RelatedBuildings=RelatedBuildings;_this1199.type=366585022;return _this1199;}return _createClass(IfcRelServicesBuildings);}(IfcRelConnects);IFC42.IfcRelServicesBuildings=IfcRelServicesBuildings;var IfcRelSpaceBoundary=/*#__PURE__*/function(_IfcRelConnects33){_inherits(IfcRelSpaceBoundary,_IfcRelConnects33);var _super1203=_createSuper(IfcRelSpaceBoundary);function IfcRelSpaceBoundary(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary){var _this1200;_classCallCheck(this,IfcRelSpaceBoundary);_this1200=_super1203.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1200.GlobalId=GlobalId;_this1200.OwnerHistory=OwnerHistory;_this1200.Name=Name;_this1200.Description=Description;_this1200.RelatingSpace=RelatingSpace;_this1200.RelatedBuildingElement=RelatedBuildingElement;_this1200.ConnectionGeometry=ConnectionGeometry;_this1200.PhysicalOrVirtualBoundary=PhysicalOrVirtualBoundary;_this1200.InternalOrExternalBoundary=InternalOrExternalBoundary;_this1200.type=3451746338;return _this1200;}return _createClass(IfcRelSpaceBoundary);}(IfcRelConnects);IFC42.IfcRelSpaceBoundary=IfcRelSpaceBoundary;var IfcRelSpaceBoundary1stLevel=/*#__PURE__*/function(_IfcRelSpaceBoundary){_inherits(IfcRelSpaceBoundary1stLevel,_IfcRelSpaceBoundary);var _super1204=_createSuper(IfcRelSpaceBoundary1stLevel);function IfcRelSpaceBoundary1stLevel(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary,ParentBoundary){var _this1201;_classCallCheck(this,IfcRelSpaceBoundary1stLevel);_this1201=_super1204.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary);_this1201.GlobalId=GlobalId;_this1201.OwnerHistory=OwnerHistory;_this1201.Name=Name;_this1201.Description=Description;_this1201.RelatingSpace=RelatingSpace;_this1201.RelatedBuildingElement=RelatedBuildingElement;_this1201.ConnectionGeometry=ConnectionGeometry;_this1201.PhysicalOrVirtualBoundary=PhysicalOrVirtualBoundary;_this1201.InternalOrExternalBoundary=InternalOrExternalBoundary;_this1201.ParentBoundary=ParentBoundary;_this1201.type=3523091289;return _this1201;}return _createClass(IfcRelSpaceBoundary1stLevel);}(IfcRelSpaceBoundary);IFC42.IfcRelSpaceBoundary1stLevel=IfcRelSpaceBoundary1stLevel;var IfcRelSpaceBoundary2ndLevel=/*#__PURE__*/function(_IfcRelSpaceBoundary2){_inherits(IfcRelSpaceBoundary2ndLevel,_IfcRelSpaceBoundary2);var _super1205=_createSuper(IfcRelSpaceBoundary2ndLevel);function IfcRelSpaceBoundary2ndLevel(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary,ParentBoundary,CorrespondingBoundary){var _this1202;_classCallCheck(this,IfcRelSpaceBoundary2ndLevel);_this1202=_super1205.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary,ParentBoundary);_this1202.GlobalId=GlobalId;_this1202.OwnerHistory=OwnerHistory;_this1202.Name=Name;_this1202.Description=Description;_this1202.RelatingSpace=RelatingSpace;_this1202.RelatedBuildingElement=RelatedBuildingElement;_this1202.ConnectionGeometry=ConnectionGeometry;_this1202.PhysicalOrVirtualBoundary=PhysicalOrVirtualBoundary;_this1202.InternalOrExternalBoundary=InternalOrExternalBoundary;_this1202.ParentBoundary=ParentBoundary;_this1202.CorrespondingBoundary=CorrespondingBoundary;_this1202.type=1521410863;return _this1202;}return _createClass(IfcRelSpaceBoundary2ndLevel);}(IfcRelSpaceBoundary1stLevel);IFC42.IfcRelSpaceBoundary2ndLevel=IfcRelSpaceBoundary2ndLevel;var IfcRelVoidsElement=/*#__PURE__*/function(_IfcRelDecomposes5){_inherits(IfcRelVoidsElement,_IfcRelDecomposes5);var _super1206=_createSuper(IfcRelVoidsElement);function IfcRelVoidsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingBuildingElement,RelatedOpeningElement){var _this1203;_classCallCheck(this,IfcRelVoidsElement);_this1203=_super1206.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1203.GlobalId=GlobalId;_this1203.OwnerHistory=OwnerHistory;_this1203.Name=Name;_this1203.Description=Description;_this1203.RelatingBuildingElement=RelatingBuildingElement;_this1203.RelatedOpeningElement=RelatedOpeningElement;_this1203.type=1401173127;return _this1203;}return _createClass(IfcRelVoidsElement);}(IfcRelDecomposes);IFC42.IfcRelVoidsElement=IfcRelVoidsElement;var IfcReparametrisedCompositeCurveSegment=/*#__PURE__*/function(_IfcCompositeCurveSeg){_inherits(IfcReparametrisedCompositeCurveSegment,_IfcCompositeCurveSeg);var _super1207=_createSuper(IfcReparametrisedCompositeCurveSegment);function IfcReparametrisedCompositeCurveSegment(expressID,Transition,SameSense,ParentCurve,ParamLength){var _this1204;_classCallCheck(this,IfcReparametrisedCompositeCurveSegment);_this1204=_super1207.call(this,expressID,Transition,SameSense,ParentCurve);_this1204.Transition=Transition;_this1204.SameSense=SameSense;_this1204.ParentCurve=ParentCurve;_this1204.ParamLength=ParamLength;_this1204.type=816062949;return _this1204;}return _createClass(IfcReparametrisedCompositeCurveSegment);}(IfcCompositeCurveSegment);IFC42.IfcReparametrisedCompositeCurveSegment=IfcReparametrisedCompositeCurveSegment;var IfcResource=/*#__PURE__*/function(_IfcObject10){_inherits(IfcResource,_IfcObject10);var _super1208=_createSuper(IfcResource);function IfcResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription){var _this1205;_classCallCheck(this,IfcResource);_this1205=_super1208.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1205.GlobalId=GlobalId;_this1205.OwnerHistory=OwnerHistory;_this1205.Name=Name;_this1205.Description=Description;_this1205.ObjectType=ObjectType;_this1205.Identification=Identification;_this1205.LongDescription=LongDescription;_this1205.type=2914609552;return _this1205;}return _createClass(IfcResource);}(IfcObject);IFC42.IfcResource=IfcResource;var IfcRevolvedAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid6){_inherits(IfcRevolvedAreaSolid,_IfcSweptAreaSolid6);var _super1209=_createSuper(IfcRevolvedAreaSolid);function IfcRevolvedAreaSolid(expressID,SweptArea,Position,Axis,Angle){var _this1206;_classCallCheck(this,IfcRevolvedAreaSolid);_this1206=_super1209.call(this,expressID,SweptArea,Position);_this1206.SweptArea=SweptArea;_this1206.Position=Position;_this1206.Axis=Axis;_this1206.Angle=Angle;_this1206.type=1856042241;return _this1206;}return _createClass(IfcRevolvedAreaSolid);}(IfcSweptAreaSolid);IFC42.IfcRevolvedAreaSolid=IfcRevolvedAreaSolid;var IfcRevolvedAreaSolidTapered=/*#__PURE__*/function(_IfcRevolvedAreaSolid){_inherits(IfcRevolvedAreaSolidTapered,_IfcRevolvedAreaSolid);var _super1210=_createSuper(IfcRevolvedAreaSolidTapered);function IfcRevolvedAreaSolidTapered(expressID,SweptArea,Position,Axis,Angle,EndSweptArea){var _this1207;_classCallCheck(this,IfcRevolvedAreaSolidTapered);_this1207=_super1210.call(this,expressID,SweptArea,Position,Axis,Angle);_this1207.SweptArea=SweptArea;_this1207.Position=Position;_this1207.Axis=Axis;_this1207.Angle=Angle;_this1207.EndSweptArea=EndSweptArea;_this1207.type=3243963512;return _this1207;}return _createClass(IfcRevolvedAreaSolidTapered);}(IfcRevolvedAreaSolid);IFC42.IfcRevolvedAreaSolidTapered=IfcRevolvedAreaSolidTapered;var IfcRightCircularCone=/*#__PURE__*/function(_IfcCsgPrimitive3D7){_inherits(IfcRightCircularCone,_IfcCsgPrimitive3D7);var _super1211=_createSuper(IfcRightCircularCone);function IfcRightCircularCone(expressID,Position,Height,BottomRadius){var _this1208;_classCallCheck(this,IfcRightCircularCone);_this1208=_super1211.call(this,expressID,Position);_this1208.Position=Position;_this1208.Height=Height;_this1208.BottomRadius=BottomRadius;_this1208.type=4158566097;return _this1208;}return _createClass(IfcRightCircularCone);}(IfcCsgPrimitive3D);IFC42.IfcRightCircularCone=IfcRightCircularCone;var IfcRightCircularCylinder=/*#__PURE__*/function(_IfcCsgPrimitive3D8){_inherits(IfcRightCircularCylinder,_IfcCsgPrimitive3D8);var _super1212=_createSuper(IfcRightCircularCylinder);function IfcRightCircularCylinder(expressID,Position,Height,Radius){var _this1209;_classCallCheck(this,IfcRightCircularCylinder);_this1209=_super1212.call(this,expressID,Position);_this1209.Position=Position;_this1209.Height=Height;_this1209.Radius=Radius;_this1209.type=3626867408;return _this1209;}return _createClass(IfcRightCircularCylinder);}(IfcCsgPrimitive3D);IFC42.IfcRightCircularCylinder=IfcRightCircularCylinder;var IfcSimplePropertyTemplate=/*#__PURE__*/function(_IfcPropertyTemplate){_inherits(IfcSimplePropertyTemplate,_IfcPropertyTemplate);var _super1213=_createSuper(IfcSimplePropertyTemplate);function IfcSimplePropertyTemplate(expressID,GlobalId,OwnerHistory,Name,Description,TemplateType,PrimaryMeasureType,SecondaryMeasureType,Enumerators,PrimaryUnit,SecondaryUnit,Expression,AccessState){var _this1210;_classCallCheck(this,IfcSimplePropertyTemplate);_this1210=_super1213.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1210.GlobalId=GlobalId;_this1210.OwnerHistory=OwnerHistory;_this1210.Name=Name;_this1210.Description=Description;_this1210.TemplateType=TemplateType;_this1210.PrimaryMeasureType=PrimaryMeasureType;_this1210.SecondaryMeasureType=SecondaryMeasureType;_this1210.Enumerators=Enumerators;_this1210.PrimaryUnit=PrimaryUnit;_this1210.SecondaryUnit=SecondaryUnit;_this1210.Expression=Expression;_this1210.AccessState=AccessState;_this1210.type=3663146110;return _this1210;}return _createClass(IfcSimplePropertyTemplate);}(IfcPropertyTemplate);IFC42.IfcSimplePropertyTemplate=IfcSimplePropertyTemplate;var IfcSpatialElement=/*#__PURE__*/function(_IfcProduct10){_inherits(IfcSpatialElement,_IfcProduct10);var _super1214=_createSuper(IfcSpatialElement);function IfcSpatialElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName){var _this1211;_classCallCheck(this,IfcSpatialElement);_this1211=_super1214.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1211.GlobalId=GlobalId;_this1211.OwnerHistory=OwnerHistory;_this1211.Name=Name;_this1211.Description=Description;_this1211.ObjectType=ObjectType;_this1211.ObjectPlacement=ObjectPlacement;_this1211.Representation=Representation;_this1211.LongName=LongName;_this1211.type=1412071761;return _this1211;}return _createClass(IfcSpatialElement);}(IfcProduct);IFC42.IfcSpatialElement=IfcSpatialElement;var IfcSpatialElementType=/*#__PURE__*/function(_IfcTypeProduct7){_inherits(IfcSpatialElementType,_IfcTypeProduct7);var _super1215=_createSuper(IfcSpatialElementType);function IfcSpatialElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1212;_classCallCheck(this,IfcSpatialElementType);_this1212=_super1215.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this1212.GlobalId=GlobalId;_this1212.OwnerHistory=OwnerHistory;_this1212.Name=Name;_this1212.Description=Description;_this1212.ApplicableOccurrence=ApplicableOccurrence;_this1212.HasPropertySets=HasPropertySets;_this1212.RepresentationMaps=RepresentationMaps;_this1212.Tag=Tag;_this1212.ElementType=ElementType;_this1212.type=710998568;return _this1212;}return _createClass(IfcSpatialElementType);}(IfcTypeProduct);IFC42.IfcSpatialElementType=IfcSpatialElementType;var IfcSpatialStructureElement=/*#__PURE__*/function(_IfcSpatialElement){_inherits(IfcSpatialStructureElement,_IfcSpatialElement);var _super1216=_createSuper(IfcSpatialStructureElement);function IfcSpatialStructureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType){var _this1213;_classCallCheck(this,IfcSpatialStructureElement);_this1213=_super1216.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this1213.GlobalId=GlobalId;_this1213.OwnerHistory=OwnerHistory;_this1213.Name=Name;_this1213.Description=Description;_this1213.ObjectType=ObjectType;_this1213.ObjectPlacement=ObjectPlacement;_this1213.Representation=Representation;_this1213.LongName=LongName;_this1213.CompositionType=CompositionType;_this1213.type=2706606064;return _this1213;}return _createClass(IfcSpatialStructureElement);}(IfcSpatialElement);IFC42.IfcSpatialStructureElement=IfcSpatialStructureElement;var IfcSpatialStructureElementType=/*#__PURE__*/function(_IfcSpatialElementTyp){_inherits(IfcSpatialStructureElementType,_IfcSpatialElementTyp);var _super1217=_createSuper(IfcSpatialStructureElementType);function IfcSpatialStructureElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1214;_classCallCheck(this,IfcSpatialStructureElementType);_this1214=_super1217.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1214.GlobalId=GlobalId;_this1214.OwnerHistory=OwnerHistory;_this1214.Name=Name;_this1214.Description=Description;_this1214.ApplicableOccurrence=ApplicableOccurrence;_this1214.HasPropertySets=HasPropertySets;_this1214.RepresentationMaps=RepresentationMaps;_this1214.Tag=Tag;_this1214.ElementType=ElementType;_this1214.type=3893378262;return _this1214;}return _createClass(IfcSpatialStructureElementType);}(IfcSpatialElementType);IFC42.IfcSpatialStructureElementType=IfcSpatialStructureElementType;var IfcSpatialZone=/*#__PURE__*/function(_IfcSpatialElement2){_inherits(IfcSpatialZone,_IfcSpatialElement2);var _super1218=_createSuper(IfcSpatialZone);function IfcSpatialZone(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,PredefinedType){var _this1215;_classCallCheck(this,IfcSpatialZone);_this1215=_super1218.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this1215.GlobalId=GlobalId;_this1215.OwnerHistory=OwnerHistory;_this1215.Name=Name;_this1215.Description=Description;_this1215.ObjectType=ObjectType;_this1215.ObjectPlacement=ObjectPlacement;_this1215.Representation=Representation;_this1215.LongName=LongName;_this1215.PredefinedType=PredefinedType;_this1215.type=463610769;return _this1215;}return _createClass(IfcSpatialZone);}(IfcSpatialElement);IFC42.IfcSpatialZone=IfcSpatialZone;var IfcSpatialZoneType=/*#__PURE__*/function(_IfcSpatialElementTyp2){_inherits(IfcSpatialZoneType,_IfcSpatialElementTyp2);var _super1219=_createSuper(IfcSpatialZoneType);function IfcSpatialZoneType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,LongName){var _this1216;_classCallCheck(this,IfcSpatialZoneType);_this1216=_super1219.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1216.GlobalId=GlobalId;_this1216.OwnerHistory=OwnerHistory;_this1216.Name=Name;_this1216.Description=Description;_this1216.ApplicableOccurrence=ApplicableOccurrence;_this1216.HasPropertySets=HasPropertySets;_this1216.RepresentationMaps=RepresentationMaps;_this1216.Tag=Tag;_this1216.ElementType=ElementType;_this1216.PredefinedType=PredefinedType;_this1216.LongName=LongName;_this1216.type=2481509218;return _this1216;}return _createClass(IfcSpatialZoneType);}(IfcSpatialElementType);IFC42.IfcSpatialZoneType=IfcSpatialZoneType;var IfcSphere=/*#__PURE__*/function(_IfcCsgPrimitive3D9){_inherits(IfcSphere,_IfcCsgPrimitive3D9);var _super1220=_createSuper(IfcSphere);function IfcSphere(expressID,Position,Radius){var _this1217;_classCallCheck(this,IfcSphere);_this1217=_super1220.call(this,expressID,Position);_this1217.Position=Position;_this1217.Radius=Radius;_this1217.type=451544542;return _this1217;}return _createClass(IfcSphere);}(IfcCsgPrimitive3D);IFC42.IfcSphere=IfcSphere;var IfcSphericalSurface=/*#__PURE__*/function(_IfcElementarySurface3){_inherits(IfcSphericalSurface,_IfcElementarySurface3);var _super1221=_createSuper(IfcSphericalSurface);function IfcSphericalSurface(expressID,Position,Radius){var _this1218;_classCallCheck(this,IfcSphericalSurface);_this1218=_super1221.call(this,expressID,Position);_this1218.Position=Position;_this1218.Radius=Radius;_this1218.type=4015995234;return _this1218;}return _createClass(IfcSphericalSurface);}(IfcElementarySurface);IFC42.IfcSphericalSurface=IfcSphericalSurface;var IfcStructuralActivity=/*#__PURE__*/function(_IfcProduct11){_inherits(IfcStructuralActivity,_IfcProduct11);var _super1222=_createSuper(IfcStructuralActivity);function IfcStructuralActivity(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this1219;_classCallCheck(this,IfcStructuralActivity);_this1219=_super1222.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1219.GlobalId=GlobalId;_this1219.OwnerHistory=OwnerHistory;_this1219.Name=Name;_this1219.Description=Description;_this1219.ObjectType=ObjectType;_this1219.ObjectPlacement=ObjectPlacement;_this1219.Representation=Representation;_this1219.AppliedLoad=AppliedLoad;_this1219.GlobalOrLocal=GlobalOrLocal;_this1219.type=3544373492;return _this1219;}return _createClass(IfcStructuralActivity);}(IfcProduct);IFC42.IfcStructuralActivity=IfcStructuralActivity;var IfcStructuralItem=/*#__PURE__*/function(_IfcProduct12){_inherits(IfcStructuralItem,_IfcProduct12);var _super1223=_createSuper(IfcStructuralItem);function IfcStructuralItem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this1220;_classCallCheck(this,IfcStructuralItem);_this1220=_super1223.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1220.GlobalId=GlobalId;_this1220.OwnerHistory=OwnerHistory;_this1220.Name=Name;_this1220.Description=Description;_this1220.ObjectType=ObjectType;_this1220.ObjectPlacement=ObjectPlacement;_this1220.Representation=Representation;_this1220.type=3136571912;return _this1220;}return _createClass(IfcStructuralItem);}(IfcProduct);IFC42.IfcStructuralItem=IfcStructuralItem;var IfcStructuralMember=/*#__PURE__*/function(_IfcStructuralItem3){_inherits(IfcStructuralMember,_IfcStructuralItem3);var _super1224=_createSuper(IfcStructuralMember);function IfcStructuralMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this1221;_classCallCheck(this,IfcStructuralMember);_this1221=_super1224.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1221.GlobalId=GlobalId;_this1221.OwnerHistory=OwnerHistory;_this1221.Name=Name;_this1221.Description=Description;_this1221.ObjectType=ObjectType;_this1221.ObjectPlacement=ObjectPlacement;_this1221.Representation=Representation;_this1221.type=530289379;return _this1221;}return _createClass(IfcStructuralMember);}(IfcStructuralItem);IFC42.IfcStructuralMember=IfcStructuralMember;var IfcStructuralReaction=/*#__PURE__*/function(_IfcStructuralActivit3){_inherits(IfcStructuralReaction,_IfcStructuralActivit3);var _super1225=_createSuper(IfcStructuralReaction);function IfcStructuralReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this1222;_classCallCheck(this,IfcStructuralReaction);_this1222=_super1225.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this1222.GlobalId=GlobalId;_this1222.OwnerHistory=OwnerHistory;_this1222.Name=Name;_this1222.Description=Description;_this1222.ObjectType=ObjectType;_this1222.ObjectPlacement=ObjectPlacement;_this1222.Representation=Representation;_this1222.AppliedLoad=AppliedLoad;_this1222.GlobalOrLocal=GlobalOrLocal;_this1222.type=3689010777;return _this1222;}return _createClass(IfcStructuralReaction);}(IfcStructuralActivity);IFC42.IfcStructuralReaction=IfcStructuralReaction;var IfcStructuralSurfaceMember=/*#__PURE__*/function(_IfcStructuralMember3){_inherits(IfcStructuralSurfaceMember,_IfcStructuralMember3);var _super1226=_createSuper(IfcStructuralSurfaceMember);function IfcStructuralSurfaceMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness){var _this1223;_classCallCheck(this,IfcStructuralSurfaceMember);_this1223=_super1226.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1223.GlobalId=GlobalId;_this1223.OwnerHistory=OwnerHistory;_this1223.Name=Name;_this1223.Description=Description;_this1223.ObjectType=ObjectType;_this1223.ObjectPlacement=ObjectPlacement;_this1223.Representation=Representation;_this1223.PredefinedType=PredefinedType;_this1223.Thickness=Thickness;_this1223.type=3979015343;return _this1223;}return _createClass(IfcStructuralSurfaceMember);}(IfcStructuralMember);IFC42.IfcStructuralSurfaceMember=IfcStructuralSurfaceMember;var IfcStructuralSurfaceMemberVarying=/*#__PURE__*/function(_IfcStructuralSurface2){_inherits(IfcStructuralSurfaceMemberVarying,_IfcStructuralSurface2);var _super1227=_createSuper(IfcStructuralSurfaceMemberVarying);function IfcStructuralSurfaceMemberVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness){var _this1224;_classCallCheck(this,IfcStructuralSurfaceMemberVarying);_this1224=_super1227.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness);_this1224.GlobalId=GlobalId;_this1224.OwnerHistory=OwnerHistory;_this1224.Name=Name;_this1224.Description=Description;_this1224.ObjectType=ObjectType;_this1224.ObjectPlacement=ObjectPlacement;_this1224.Representation=Representation;_this1224.PredefinedType=PredefinedType;_this1224.Thickness=Thickness;_this1224.type=2218152070;return _this1224;}return _createClass(IfcStructuralSurfaceMemberVarying);}(IfcStructuralSurfaceMember);IFC42.IfcStructuralSurfaceMemberVarying=IfcStructuralSurfaceMemberVarying;var IfcStructuralSurfaceReaction=/*#__PURE__*/function(_IfcStructuralReactio2){_inherits(IfcStructuralSurfaceReaction,_IfcStructuralReactio2);var _super1228=_createSuper(IfcStructuralSurfaceReaction);function IfcStructuralSurfaceReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,PredefinedType){var _this1225;_classCallCheck(this,IfcStructuralSurfaceReaction);_this1225=_super1228.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this1225.GlobalId=GlobalId;_this1225.OwnerHistory=OwnerHistory;_this1225.Name=Name;_this1225.Description=Description;_this1225.ObjectType=ObjectType;_this1225.ObjectPlacement=ObjectPlacement;_this1225.Representation=Representation;_this1225.AppliedLoad=AppliedLoad;_this1225.GlobalOrLocal=GlobalOrLocal;_this1225.PredefinedType=PredefinedType;_this1225.type=603775116;return _this1225;}return _createClass(IfcStructuralSurfaceReaction);}(IfcStructuralReaction);IFC42.IfcStructuralSurfaceReaction=IfcStructuralSurfaceReaction;var IfcSubContractResourceType=/*#__PURE__*/function(_IfcConstructionResou9){_inherits(IfcSubContractResourceType,_IfcConstructionResou9);var _super1229=_createSuper(IfcSubContractResourceType);function IfcSubContractResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1226;_classCallCheck(this,IfcSubContractResourceType);_this1226=_super1229.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1226.GlobalId=GlobalId;_this1226.OwnerHistory=OwnerHistory;_this1226.Name=Name;_this1226.Description=Description;_this1226.ApplicableOccurrence=ApplicableOccurrence;_this1226.HasPropertySets=HasPropertySets;_this1226.Identification=Identification;_this1226.LongDescription=LongDescription;_this1226.ResourceType=ResourceType;_this1226.BaseCosts=BaseCosts;_this1226.BaseQuantity=BaseQuantity;_this1226.PredefinedType=PredefinedType;_this1226.type=4095615324;return _this1226;}return _createClass(IfcSubContractResourceType);}(IfcConstructionResourceType);IFC42.IfcSubContractResourceType=IfcSubContractResourceType;var IfcSurfaceCurve=/*#__PURE__*/function(_IfcCurve10){_inherits(IfcSurfaceCurve,_IfcCurve10);var _super1230=_createSuper(IfcSurfaceCurve);function IfcSurfaceCurve(expressID,Curve3D,AssociatedGeometry,MasterRepresentation){var _this1227;_classCallCheck(this,IfcSurfaceCurve);_this1227=_super1230.call(this,expressID);_this1227.Curve3D=Curve3D;_this1227.AssociatedGeometry=AssociatedGeometry;_this1227.MasterRepresentation=MasterRepresentation;_this1227.type=699246055;return _this1227;}return _createClass(IfcSurfaceCurve);}(IfcCurve);IFC42.IfcSurfaceCurve=IfcSurfaceCurve;var IfcSurfaceCurveSweptAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid7){_inherits(IfcSurfaceCurveSweptAreaSolid,_IfcSweptAreaSolid7);var _super1231=_createSuper(IfcSurfaceCurveSweptAreaSolid);function IfcSurfaceCurveSweptAreaSolid(expressID,SweptArea,Position,Directrix,StartParam,EndParam,ReferenceSurface){var _this1228;_classCallCheck(this,IfcSurfaceCurveSweptAreaSolid);_this1228=_super1231.call(this,expressID,SweptArea,Position);_this1228.SweptArea=SweptArea;_this1228.Position=Position;_this1228.Directrix=Directrix;_this1228.StartParam=StartParam;_this1228.EndParam=EndParam;_this1228.ReferenceSurface=ReferenceSurface;_this1228.type=2028607225;return _this1228;}return _createClass(IfcSurfaceCurveSweptAreaSolid);}(IfcSweptAreaSolid);IFC42.IfcSurfaceCurveSweptAreaSolid=IfcSurfaceCurveSweptAreaSolid;var IfcSurfaceOfLinearExtrusion=/*#__PURE__*/function(_IfcSweptSurface3){_inherits(IfcSurfaceOfLinearExtrusion,_IfcSweptSurface3);var _super1232=_createSuper(IfcSurfaceOfLinearExtrusion);function IfcSurfaceOfLinearExtrusion(expressID,SweptCurve,Position,ExtrudedDirection,Depth){var _this1229;_classCallCheck(this,IfcSurfaceOfLinearExtrusion);_this1229=_super1232.call(this,expressID,SweptCurve,Position);_this1229.SweptCurve=SweptCurve;_this1229.Position=Position;_this1229.ExtrudedDirection=ExtrudedDirection;_this1229.Depth=Depth;_this1229.type=2809605785;return _this1229;}return _createClass(IfcSurfaceOfLinearExtrusion);}(IfcSweptSurface);IFC42.IfcSurfaceOfLinearExtrusion=IfcSurfaceOfLinearExtrusion;var IfcSurfaceOfRevolution=/*#__PURE__*/function(_IfcSweptSurface4){_inherits(IfcSurfaceOfRevolution,_IfcSweptSurface4);var _super1233=_createSuper(IfcSurfaceOfRevolution);function IfcSurfaceOfRevolution(expressID,SweptCurve,Position,AxisPosition){var _this1230;_classCallCheck(this,IfcSurfaceOfRevolution);_this1230=_super1233.call(this,expressID,SweptCurve,Position);_this1230.SweptCurve=SweptCurve;_this1230.Position=Position;_this1230.AxisPosition=AxisPosition;_this1230.type=4124788165;return _this1230;}return _createClass(IfcSurfaceOfRevolution);}(IfcSweptSurface);IFC42.IfcSurfaceOfRevolution=IfcSurfaceOfRevolution;var IfcSystemFurnitureElementType=/*#__PURE__*/function(_IfcFurnishingElement4){_inherits(IfcSystemFurnitureElementType,_IfcFurnishingElement4);var _super1234=_createSuper(IfcSystemFurnitureElementType);function IfcSystemFurnitureElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1231;_classCallCheck(this,IfcSystemFurnitureElementType);_this1231=_super1234.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1231.GlobalId=GlobalId;_this1231.OwnerHistory=OwnerHistory;_this1231.Name=Name;_this1231.Description=Description;_this1231.ApplicableOccurrence=ApplicableOccurrence;_this1231.HasPropertySets=HasPropertySets;_this1231.RepresentationMaps=RepresentationMaps;_this1231.Tag=Tag;_this1231.ElementType=ElementType;_this1231.PredefinedType=PredefinedType;_this1231.type=1580310250;return _this1231;}return _createClass(IfcSystemFurnitureElementType);}(IfcFurnishingElementType);IFC42.IfcSystemFurnitureElementType=IfcSystemFurnitureElementType;var IfcTask=/*#__PURE__*/function(_IfcProcess3){_inherits(IfcTask,_IfcProcess3);var _super1235=_createSuper(IfcTask);function IfcTask(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Status,WorkMethod,IsMilestone,Priority,TaskTime,PredefinedType){var _this1232;_classCallCheck(this,IfcTask);_this1232=_super1235.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this1232.GlobalId=GlobalId;_this1232.OwnerHistory=OwnerHistory;_this1232.Name=Name;_this1232.Description=Description;_this1232.ObjectType=ObjectType;_this1232.Identification=Identification;_this1232.LongDescription=LongDescription;_this1232.Status=Status;_this1232.WorkMethod=WorkMethod;_this1232.IsMilestone=IsMilestone;_this1232.Priority=Priority;_this1232.TaskTime=TaskTime;_this1232.PredefinedType=PredefinedType;_this1232.type=3473067441;return _this1232;}return _createClass(IfcTask);}(IfcProcess);IFC42.IfcTask=IfcTask;var IfcTaskType=/*#__PURE__*/function(_IfcTypeProcess3){_inherits(IfcTaskType,_IfcTypeProcess3);var _super1236=_createSuper(IfcTaskType);function IfcTaskType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType,PredefinedType,WorkMethod){var _this1233;_classCallCheck(this,IfcTaskType);_this1233=_super1236.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType);_this1233.GlobalId=GlobalId;_this1233.OwnerHistory=OwnerHistory;_this1233.Name=Name;_this1233.Description=Description;_this1233.ApplicableOccurrence=ApplicableOccurrence;_this1233.HasPropertySets=HasPropertySets;_this1233.Identification=Identification;_this1233.LongDescription=LongDescription;_this1233.ProcessType=ProcessType;_this1233.PredefinedType=PredefinedType;_this1233.WorkMethod=WorkMethod;_this1233.type=3206491090;return _this1233;}return _createClass(IfcTaskType);}(IfcTypeProcess);IFC42.IfcTaskType=IfcTaskType;var IfcTessellatedFaceSet=/*#__PURE__*/function(_IfcTessellatedItem2){_inherits(IfcTessellatedFaceSet,_IfcTessellatedItem2);var _super1237=_createSuper(IfcTessellatedFaceSet);function IfcTessellatedFaceSet(expressID,Coordinates){var _this1234;_classCallCheck(this,IfcTessellatedFaceSet);_this1234=_super1237.call(this,expressID);_this1234.Coordinates=Coordinates;_this1234.type=2387106220;return _this1234;}return _createClass(IfcTessellatedFaceSet);}(IfcTessellatedItem);IFC42.IfcTessellatedFaceSet=IfcTessellatedFaceSet;var IfcToroidalSurface=/*#__PURE__*/function(_IfcElementarySurface4){_inherits(IfcToroidalSurface,_IfcElementarySurface4);var _super1238=_createSuper(IfcToroidalSurface);function IfcToroidalSurface(expressID,Position,MajorRadius,MinorRadius){var _this1235;_classCallCheck(this,IfcToroidalSurface);_this1235=_super1238.call(this,expressID,Position);_this1235.Position=Position;_this1235.MajorRadius=MajorRadius;_this1235.MinorRadius=MinorRadius;_this1235.type=1935646853;return _this1235;}return _createClass(IfcToroidalSurface);}(IfcElementarySurface);IFC42.IfcToroidalSurface=IfcToroidalSurface;var IfcTransportElementType=/*#__PURE__*/function(_IfcElementType9){_inherits(IfcTransportElementType,_IfcElementType9);var _super1239=_createSuper(IfcTransportElementType);function IfcTransportElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1236;_classCallCheck(this,IfcTransportElementType);_this1236=_super1239.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1236.GlobalId=GlobalId;_this1236.OwnerHistory=OwnerHistory;_this1236.Name=Name;_this1236.Description=Description;_this1236.ApplicableOccurrence=ApplicableOccurrence;_this1236.HasPropertySets=HasPropertySets;_this1236.RepresentationMaps=RepresentationMaps;_this1236.Tag=Tag;_this1236.ElementType=ElementType;_this1236.PredefinedType=PredefinedType;_this1236.type=2097647324;return _this1236;}return _createClass(IfcTransportElementType);}(IfcElementType);IFC42.IfcTransportElementType=IfcTransportElementType;var IfcTriangulatedFaceSet=/*#__PURE__*/function(_IfcTessellatedFaceSe){_inherits(IfcTriangulatedFaceSet,_IfcTessellatedFaceSe);var _super1240=_createSuper(IfcTriangulatedFaceSet);function IfcTriangulatedFaceSet(expressID,Coordinates,Normals,Closed,CoordIndex,PnIndex){var _this1237;_classCallCheck(this,IfcTriangulatedFaceSet);_this1237=_super1240.call(this,expressID,Coordinates);_this1237.Coordinates=Coordinates;_this1237.Normals=Normals;_this1237.Closed=Closed;_this1237.CoordIndex=CoordIndex;_this1237.PnIndex=PnIndex;_this1237.type=2916149573;return _this1237;}return _createClass(IfcTriangulatedFaceSet);}(IfcTessellatedFaceSet);IFC42.IfcTriangulatedFaceSet=IfcTriangulatedFaceSet;var IfcWindowLiningProperties=/*#__PURE__*/function(_IfcPreDefinedPropert5){_inherits(IfcWindowLiningProperties,_IfcPreDefinedPropert5);var _super1241=_createSuper(IfcWindowLiningProperties);function IfcWindowLiningProperties(expressID,GlobalId,OwnerHistory,Name,Description,LiningDepth,LiningThickness,TransomThickness,MullionThickness,FirstTransomOffset,SecondTransomOffset,FirstMullionOffset,SecondMullionOffset,ShapeAspectStyle,LiningOffset,LiningToPanelOffsetX,LiningToPanelOffsetY){var _this1238;_classCallCheck(this,IfcWindowLiningProperties);_this1238=_super1241.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1238.GlobalId=GlobalId;_this1238.OwnerHistory=OwnerHistory;_this1238.Name=Name;_this1238.Description=Description;_this1238.LiningDepth=LiningDepth;_this1238.LiningThickness=LiningThickness;_this1238.TransomThickness=TransomThickness;_this1238.MullionThickness=MullionThickness;_this1238.FirstTransomOffset=FirstTransomOffset;_this1238.SecondTransomOffset=SecondTransomOffset;_this1238.FirstMullionOffset=FirstMullionOffset;_this1238.SecondMullionOffset=SecondMullionOffset;_this1238.ShapeAspectStyle=ShapeAspectStyle;_this1238.LiningOffset=LiningOffset;_this1238.LiningToPanelOffsetX=LiningToPanelOffsetX;_this1238.LiningToPanelOffsetY=LiningToPanelOffsetY;_this1238.type=336235671;return _this1238;}return _createClass(IfcWindowLiningProperties);}(IfcPreDefinedPropertySet);IFC42.IfcWindowLiningProperties=IfcWindowLiningProperties;var IfcWindowPanelProperties=/*#__PURE__*/function(_IfcPreDefinedPropert6){_inherits(IfcWindowPanelProperties,_IfcPreDefinedPropert6);var _super1242=_createSuper(IfcWindowPanelProperties);function IfcWindowPanelProperties(expressID,GlobalId,OwnerHistory,Name,Description,OperationType,PanelPosition,FrameDepth,FrameThickness,ShapeAspectStyle){var _this1239;_classCallCheck(this,IfcWindowPanelProperties);_this1239=_super1242.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1239.GlobalId=GlobalId;_this1239.OwnerHistory=OwnerHistory;_this1239.Name=Name;_this1239.Description=Description;_this1239.OperationType=OperationType;_this1239.PanelPosition=PanelPosition;_this1239.FrameDepth=FrameDepth;_this1239.FrameThickness=FrameThickness;_this1239.ShapeAspectStyle=ShapeAspectStyle;_this1239.type=512836454;return _this1239;}return _createClass(IfcWindowPanelProperties);}(IfcPreDefinedPropertySet);IFC42.IfcWindowPanelProperties=IfcWindowPanelProperties;var IfcActor=/*#__PURE__*/function(_IfcObject11){_inherits(IfcActor,_IfcObject11);var _super1243=_createSuper(IfcActor);function IfcActor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor){var _this1240;_classCallCheck(this,IfcActor);_this1240=_super1243.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1240.GlobalId=GlobalId;_this1240.OwnerHistory=OwnerHistory;_this1240.Name=Name;_this1240.Description=Description;_this1240.ObjectType=ObjectType;_this1240.TheActor=TheActor;_this1240.type=2296667514;return _this1240;}return _createClass(IfcActor);}(IfcObject);IFC42.IfcActor=IfcActor;var IfcAdvancedBrep=/*#__PURE__*/function(_IfcManifoldSolidBrep3){_inherits(IfcAdvancedBrep,_IfcManifoldSolidBrep3);var _super1244=_createSuper(IfcAdvancedBrep);function IfcAdvancedBrep(expressID,Outer){var _this1241;_classCallCheck(this,IfcAdvancedBrep);_this1241=_super1244.call(this,expressID,Outer);_this1241.Outer=Outer;_this1241.type=1635779807;return _this1241;}return _createClass(IfcAdvancedBrep);}(IfcManifoldSolidBrep);IFC42.IfcAdvancedBrep=IfcAdvancedBrep;var IfcAdvancedBrepWithVoids=/*#__PURE__*/function(_IfcAdvancedBrep){_inherits(IfcAdvancedBrepWithVoids,_IfcAdvancedBrep);var _super1245=_createSuper(IfcAdvancedBrepWithVoids);function IfcAdvancedBrepWithVoids(expressID,Outer,Voids){var _this1242;_classCallCheck(this,IfcAdvancedBrepWithVoids);_this1242=_super1245.call(this,expressID,Outer);_this1242.Outer=Outer;_this1242.Voids=Voids;_this1242.type=2603310189;return _this1242;}return _createClass(IfcAdvancedBrepWithVoids);}(IfcAdvancedBrep);IFC42.IfcAdvancedBrepWithVoids=IfcAdvancedBrepWithVoids;var IfcAnnotation=/*#__PURE__*/function(_IfcProduct13){_inherits(IfcAnnotation,_IfcProduct13);var _super1246=_createSuper(IfcAnnotation);function IfcAnnotation(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this1243;_classCallCheck(this,IfcAnnotation);_this1243=_super1246.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1243.GlobalId=GlobalId;_this1243.OwnerHistory=OwnerHistory;_this1243.Name=Name;_this1243.Description=Description;_this1243.ObjectType=ObjectType;_this1243.ObjectPlacement=ObjectPlacement;_this1243.Representation=Representation;_this1243.type=1674181508;return _this1243;}return _createClass(IfcAnnotation);}(IfcProduct);IFC42.IfcAnnotation=IfcAnnotation;var IfcBSplineSurface=/*#__PURE__*/function(_IfcBoundedSurface6){_inherits(IfcBSplineSurface,_IfcBoundedSurface6);var _super1247=_createSuper(IfcBSplineSurface);function IfcBSplineSurface(expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect){var _this1244;_classCallCheck(this,IfcBSplineSurface);_this1244=_super1247.call(this,expressID);_this1244.UDegree=UDegree;_this1244.VDegree=VDegree;_this1244.ControlPointsList=ControlPointsList;_this1244.SurfaceForm=SurfaceForm;_this1244.UClosed=UClosed;_this1244.VClosed=VClosed;_this1244.SelfIntersect=SelfIntersect;_this1244.type=2887950389;return _this1244;}return _createClass(IfcBSplineSurface);}(IfcBoundedSurface);IFC42.IfcBSplineSurface=IfcBSplineSurface;var IfcBSplineSurfaceWithKnots=/*#__PURE__*/function(_IfcBSplineSurface){_inherits(IfcBSplineSurfaceWithKnots,_IfcBSplineSurface);var _super1248=_createSuper(IfcBSplineSurfaceWithKnots);function IfcBSplineSurfaceWithKnots(expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect,UMultiplicities,VMultiplicities,UKnots,VKnots,KnotSpec){var _this1245;_classCallCheck(this,IfcBSplineSurfaceWithKnots);_this1245=_super1248.call(this,expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect);_this1245.UDegree=UDegree;_this1245.VDegree=VDegree;_this1245.ControlPointsList=ControlPointsList;_this1245.SurfaceForm=SurfaceForm;_this1245.UClosed=UClosed;_this1245.VClosed=VClosed;_this1245.SelfIntersect=SelfIntersect;_this1245.UMultiplicities=UMultiplicities;_this1245.VMultiplicities=VMultiplicities;_this1245.UKnots=UKnots;_this1245.VKnots=VKnots;_this1245.KnotSpec=KnotSpec;_this1245.type=167062518;return _this1245;}return _createClass(IfcBSplineSurfaceWithKnots);}(IfcBSplineSurface);IFC42.IfcBSplineSurfaceWithKnots=IfcBSplineSurfaceWithKnots;var IfcBlock=/*#__PURE__*/function(_IfcCsgPrimitive3D10){_inherits(IfcBlock,_IfcCsgPrimitive3D10);var _super1249=_createSuper(IfcBlock);function IfcBlock(expressID,Position,XLength,YLength,ZLength){var _this1246;_classCallCheck(this,IfcBlock);_this1246=_super1249.call(this,expressID,Position);_this1246.Position=Position;_this1246.XLength=XLength;_this1246.YLength=YLength;_this1246.ZLength=ZLength;_this1246.type=1334484129;return _this1246;}return _createClass(IfcBlock);}(IfcCsgPrimitive3D);IFC42.IfcBlock=IfcBlock;var IfcBooleanClippingResult=/*#__PURE__*/function(_IfcBooleanResult2){_inherits(IfcBooleanClippingResult,_IfcBooleanResult2);var _super1250=_createSuper(IfcBooleanClippingResult);function IfcBooleanClippingResult(expressID,Operator,FirstOperand,SecondOperand){var _this1247;_classCallCheck(this,IfcBooleanClippingResult);_this1247=_super1250.call(this,expressID,Operator,FirstOperand,SecondOperand);_this1247.Operator=Operator;_this1247.FirstOperand=FirstOperand;_this1247.SecondOperand=SecondOperand;_this1247.type=3649129432;return _this1247;}return _createClass(IfcBooleanClippingResult);}(IfcBooleanResult);IFC42.IfcBooleanClippingResult=IfcBooleanClippingResult;var IfcBoundedCurve=/*#__PURE__*/function(_IfcCurve11){_inherits(IfcBoundedCurve,_IfcCurve11);var _super1251=_createSuper(IfcBoundedCurve);function IfcBoundedCurve(expressID){var _this1248;_classCallCheck(this,IfcBoundedCurve);_this1248=_super1251.call(this,expressID);_this1248.type=1260505505;return _this1248;}return _createClass(IfcBoundedCurve);}(IfcCurve);IFC42.IfcBoundedCurve=IfcBoundedCurve;var IfcBuilding=/*#__PURE__*/function(_IfcSpatialStructureE6){_inherits(IfcBuilding,_IfcSpatialStructureE6);var _super1252=_createSuper(IfcBuilding);function IfcBuilding(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,ElevationOfRefHeight,ElevationOfTerrain,BuildingAddress){var _this1249;_classCallCheck(this,IfcBuilding);_this1249=_super1252.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this1249.GlobalId=GlobalId;_this1249.OwnerHistory=OwnerHistory;_this1249.Name=Name;_this1249.Description=Description;_this1249.ObjectType=ObjectType;_this1249.ObjectPlacement=ObjectPlacement;_this1249.Representation=Representation;_this1249.LongName=LongName;_this1249.CompositionType=CompositionType;_this1249.ElevationOfRefHeight=ElevationOfRefHeight;_this1249.ElevationOfTerrain=ElevationOfTerrain;_this1249.BuildingAddress=BuildingAddress;_this1249.type=4031249490;return _this1249;}return _createClass(IfcBuilding);}(IfcSpatialStructureElement);IFC42.IfcBuilding=IfcBuilding;var IfcBuildingElementType=/*#__PURE__*/function(_IfcElementType10){_inherits(IfcBuildingElementType,_IfcElementType10);var _super1253=_createSuper(IfcBuildingElementType);function IfcBuildingElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1250;_classCallCheck(this,IfcBuildingElementType);_this1250=_super1253.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1250.GlobalId=GlobalId;_this1250.OwnerHistory=OwnerHistory;_this1250.Name=Name;_this1250.Description=Description;_this1250.ApplicableOccurrence=ApplicableOccurrence;_this1250.HasPropertySets=HasPropertySets;_this1250.RepresentationMaps=RepresentationMaps;_this1250.Tag=Tag;_this1250.ElementType=ElementType;_this1250.type=1950629157;return _this1250;}return _createClass(IfcBuildingElementType);}(IfcElementType);IFC42.IfcBuildingElementType=IfcBuildingElementType;var IfcBuildingStorey=/*#__PURE__*/function(_IfcSpatialStructureE7){_inherits(IfcBuildingStorey,_IfcSpatialStructureE7);var _super1254=_createSuper(IfcBuildingStorey);function IfcBuildingStorey(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,Elevation){var _this1251;_classCallCheck(this,IfcBuildingStorey);_this1251=_super1254.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this1251.GlobalId=GlobalId;_this1251.OwnerHistory=OwnerHistory;_this1251.Name=Name;_this1251.Description=Description;_this1251.ObjectType=ObjectType;_this1251.ObjectPlacement=ObjectPlacement;_this1251.Representation=Representation;_this1251.LongName=LongName;_this1251.CompositionType=CompositionType;_this1251.Elevation=Elevation;_this1251.type=3124254112;return _this1251;}return _createClass(IfcBuildingStorey);}(IfcSpatialStructureElement);IFC42.IfcBuildingStorey=IfcBuildingStorey;var IfcChimneyType=/*#__PURE__*/function(_IfcBuildingElementTy13){_inherits(IfcChimneyType,_IfcBuildingElementTy13);var _super1255=_createSuper(IfcChimneyType);function IfcChimneyType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1252;_classCallCheck(this,IfcChimneyType);_this1252=_super1255.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1252.GlobalId=GlobalId;_this1252.OwnerHistory=OwnerHistory;_this1252.Name=Name;_this1252.Description=Description;_this1252.ApplicableOccurrence=ApplicableOccurrence;_this1252.HasPropertySets=HasPropertySets;_this1252.RepresentationMaps=RepresentationMaps;_this1252.Tag=Tag;_this1252.ElementType=ElementType;_this1252.PredefinedType=PredefinedType;_this1252.type=2197970202;return _this1252;}return _createClass(IfcChimneyType);}(IfcBuildingElementType);IFC42.IfcChimneyType=IfcChimneyType;var IfcCircleHollowProfileDef=/*#__PURE__*/function(_IfcCircleProfileDef2){_inherits(IfcCircleHollowProfileDef,_IfcCircleProfileDef2);var _super1256=_createSuper(IfcCircleHollowProfileDef);function IfcCircleHollowProfileDef(expressID,ProfileType,ProfileName,Position,Radius,WallThickness){var _this1253;_classCallCheck(this,IfcCircleHollowProfileDef);_this1253=_super1256.call(this,expressID,ProfileType,ProfileName,Position,Radius);_this1253.ProfileType=ProfileType;_this1253.ProfileName=ProfileName;_this1253.Position=Position;_this1253.Radius=Radius;_this1253.WallThickness=WallThickness;_this1253.type=2937912522;return _this1253;}return _createClass(IfcCircleHollowProfileDef);}(IfcCircleProfileDef);IFC42.IfcCircleHollowProfileDef=IfcCircleHollowProfileDef;var IfcCivilElementType=/*#__PURE__*/function(_IfcElementType11){_inherits(IfcCivilElementType,_IfcElementType11);var _super1257=_createSuper(IfcCivilElementType);function IfcCivilElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1254;_classCallCheck(this,IfcCivilElementType);_this1254=_super1257.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1254.GlobalId=GlobalId;_this1254.OwnerHistory=OwnerHistory;_this1254.Name=Name;_this1254.Description=Description;_this1254.ApplicableOccurrence=ApplicableOccurrence;_this1254.HasPropertySets=HasPropertySets;_this1254.RepresentationMaps=RepresentationMaps;_this1254.Tag=Tag;_this1254.ElementType=ElementType;_this1254.type=3893394355;return _this1254;}return _createClass(IfcCivilElementType);}(IfcElementType);IFC42.IfcCivilElementType=IfcCivilElementType;var IfcColumnType=/*#__PURE__*/function(_IfcBuildingElementTy14){_inherits(IfcColumnType,_IfcBuildingElementTy14);var _super1258=_createSuper(IfcColumnType);function IfcColumnType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1255;_classCallCheck(this,IfcColumnType);_this1255=_super1258.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1255.GlobalId=GlobalId;_this1255.OwnerHistory=OwnerHistory;_this1255.Name=Name;_this1255.Description=Description;_this1255.ApplicableOccurrence=ApplicableOccurrence;_this1255.HasPropertySets=HasPropertySets;_this1255.RepresentationMaps=RepresentationMaps;_this1255.Tag=Tag;_this1255.ElementType=ElementType;_this1255.PredefinedType=PredefinedType;_this1255.type=300633059;return _this1255;}return _createClass(IfcColumnType);}(IfcBuildingElementType);IFC42.IfcColumnType=IfcColumnType;var IfcComplexPropertyTemplate=/*#__PURE__*/function(_IfcPropertyTemplate2){_inherits(IfcComplexPropertyTemplate,_IfcPropertyTemplate2);var _super1259=_createSuper(IfcComplexPropertyTemplate);function IfcComplexPropertyTemplate(expressID,GlobalId,OwnerHistory,Name,Description,UsageName,TemplateType,HasPropertyTemplates){var _this1256;_classCallCheck(this,IfcComplexPropertyTemplate);_this1256=_super1259.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1256.GlobalId=GlobalId;_this1256.OwnerHistory=OwnerHistory;_this1256.Name=Name;_this1256.Description=Description;_this1256.UsageName=UsageName;_this1256.TemplateType=TemplateType;_this1256.HasPropertyTemplates=HasPropertyTemplates;_this1256.type=3875453745;return _this1256;}return _createClass(IfcComplexPropertyTemplate);}(IfcPropertyTemplate);IFC42.IfcComplexPropertyTemplate=IfcComplexPropertyTemplate;var IfcCompositeCurve=/*#__PURE__*/function(_IfcBoundedCurve5){_inherits(IfcCompositeCurve,_IfcBoundedCurve5);var _super1260=_createSuper(IfcCompositeCurve);function IfcCompositeCurve(expressID,Segments,SelfIntersect){var _this1257;_classCallCheck(this,IfcCompositeCurve);_this1257=_super1260.call(this,expressID);_this1257.Segments=Segments;_this1257.SelfIntersect=SelfIntersect;_this1257.type=3732776249;return _this1257;}return _createClass(IfcCompositeCurve);}(IfcBoundedCurve);IFC42.IfcCompositeCurve=IfcCompositeCurve;var IfcCompositeCurveOnSurface=/*#__PURE__*/function(_IfcCompositeCurve2){_inherits(IfcCompositeCurveOnSurface,_IfcCompositeCurve2);var _super1261=_createSuper(IfcCompositeCurveOnSurface);function IfcCompositeCurveOnSurface(expressID,Segments,SelfIntersect){var _this1258;_classCallCheck(this,IfcCompositeCurveOnSurface);_this1258=_super1261.call(this,expressID,Segments,SelfIntersect);_this1258.Segments=Segments;_this1258.SelfIntersect=SelfIntersect;_this1258.type=15328376;return _this1258;}return _createClass(IfcCompositeCurveOnSurface);}(IfcCompositeCurve);IFC42.IfcCompositeCurveOnSurface=IfcCompositeCurveOnSurface;var IfcConic=/*#__PURE__*/function(_IfcCurve12){_inherits(IfcConic,_IfcCurve12);var _super1262=_createSuper(IfcConic);function IfcConic(expressID,Position){var _this1259;_classCallCheck(this,IfcConic);_this1259=_super1262.call(this,expressID);_this1259.Position=Position;_this1259.type=2510884976;return _this1259;}return _createClass(IfcConic);}(IfcCurve);IFC42.IfcConic=IfcConic;var IfcConstructionEquipmentResourceType=/*#__PURE__*/function(_IfcConstructionResou10){_inherits(IfcConstructionEquipmentResourceType,_IfcConstructionResou10);var _super1263=_createSuper(IfcConstructionEquipmentResourceType);function IfcConstructionEquipmentResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1260;_classCallCheck(this,IfcConstructionEquipmentResourceType);_this1260=_super1263.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1260.GlobalId=GlobalId;_this1260.OwnerHistory=OwnerHistory;_this1260.Name=Name;_this1260.Description=Description;_this1260.ApplicableOccurrence=ApplicableOccurrence;_this1260.HasPropertySets=HasPropertySets;_this1260.Identification=Identification;_this1260.LongDescription=LongDescription;_this1260.ResourceType=ResourceType;_this1260.BaseCosts=BaseCosts;_this1260.BaseQuantity=BaseQuantity;_this1260.PredefinedType=PredefinedType;_this1260.type=2185764099;return _this1260;}return _createClass(IfcConstructionEquipmentResourceType);}(IfcConstructionResourceType);IFC42.IfcConstructionEquipmentResourceType=IfcConstructionEquipmentResourceType;var IfcConstructionMaterialResourceType=/*#__PURE__*/function(_IfcConstructionResou11){_inherits(IfcConstructionMaterialResourceType,_IfcConstructionResou11);var _super1264=_createSuper(IfcConstructionMaterialResourceType);function IfcConstructionMaterialResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1261;_classCallCheck(this,IfcConstructionMaterialResourceType);_this1261=_super1264.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1261.GlobalId=GlobalId;_this1261.OwnerHistory=OwnerHistory;_this1261.Name=Name;_this1261.Description=Description;_this1261.ApplicableOccurrence=ApplicableOccurrence;_this1261.HasPropertySets=HasPropertySets;_this1261.Identification=Identification;_this1261.LongDescription=LongDescription;_this1261.ResourceType=ResourceType;_this1261.BaseCosts=BaseCosts;_this1261.BaseQuantity=BaseQuantity;_this1261.PredefinedType=PredefinedType;_this1261.type=4105962743;return _this1261;}return _createClass(IfcConstructionMaterialResourceType);}(IfcConstructionResourceType);IFC42.IfcConstructionMaterialResourceType=IfcConstructionMaterialResourceType;var IfcConstructionProductResourceType=/*#__PURE__*/function(_IfcConstructionResou12){_inherits(IfcConstructionProductResourceType,_IfcConstructionResou12);var _super1265=_createSuper(IfcConstructionProductResourceType);function IfcConstructionProductResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1262;_classCallCheck(this,IfcConstructionProductResourceType);_this1262=_super1265.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1262.GlobalId=GlobalId;_this1262.OwnerHistory=OwnerHistory;_this1262.Name=Name;_this1262.Description=Description;_this1262.ApplicableOccurrence=ApplicableOccurrence;_this1262.HasPropertySets=HasPropertySets;_this1262.Identification=Identification;_this1262.LongDescription=LongDescription;_this1262.ResourceType=ResourceType;_this1262.BaseCosts=BaseCosts;_this1262.BaseQuantity=BaseQuantity;_this1262.PredefinedType=PredefinedType;_this1262.type=1525564444;return _this1262;}return _createClass(IfcConstructionProductResourceType);}(IfcConstructionResourceType);IFC42.IfcConstructionProductResourceType=IfcConstructionProductResourceType;var IfcConstructionResource=/*#__PURE__*/function(_IfcResource2){_inherits(IfcConstructionResource,_IfcResource2);var _super1266=_createSuper(IfcConstructionResource);function IfcConstructionResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity){var _this1263;_classCallCheck(this,IfcConstructionResource);_this1263=_super1266.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this1263.GlobalId=GlobalId;_this1263.OwnerHistory=OwnerHistory;_this1263.Name=Name;_this1263.Description=Description;_this1263.ObjectType=ObjectType;_this1263.Identification=Identification;_this1263.LongDescription=LongDescription;_this1263.Usage=Usage;_this1263.BaseCosts=BaseCosts;_this1263.BaseQuantity=BaseQuantity;_this1263.type=2559216714;return _this1263;}return _createClass(IfcConstructionResource);}(IfcResource);IFC42.IfcConstructionResource=IfcConstructionResource;var IfcControl=/*#__PURE__*/function(_IfcObject12){_inherits(IfcControl,_IfcObject12);var _super1267=_createSuper(IfcControl);function IfcControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification){var _this1264;_classCallCheck(this,IfcControl);_this1264=_super1267.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1264.GlobalId=GlobalId;_this1264.OwnerHistory=OwnerHistory;_this1264.Name=Name;_this1264.Description=Description;_this1264.ObjectType=ObjectType;_this1264.Identification=Identification;_this1264.type=3293443760;return _this1264;}return _createClass(IfcControl);}(IfcObject);IFC42.IfcControl=IfcControl;var IfcCostItem=/*#__PURE__*/function(_IfcControl16){_inherits(IfcCostItem,_IfcControl16);var _super1268=_createSuper(IfcCostItem);function IfcCostItem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,CostValues,CostQuantities){var _this1265;_classCallCheck(this,IfcCostItem);_this1265=_super1268.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1265.GlobalId=GlobalId;_this1265.OwnerHistory=OwnerHistory;_this1265.Name=Name;_this1265.Description=Description;_this1265.ObjectType=ObjectType;_this1265.Identification=Identification;_this1265.PredefinedType=PredefinedType;_this1265.CostValues=CostValues;_this1265.CostQuantities=CostQuantities;_this1265.type=3895139033;return _this1265;}return _createClass(IfcCostItem);}(IfcControl);IFC42.IfcCostItem=IfcCostItem;var IfcCostSchedule=/*#__PURE__*/function(_IfcControl17){_inherits(IfcCostSchedule,_IfcControl17);var _super1269=_createSuper(IfcCostSchedule);function IfcCostSchedule(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,SubmittedOn,UpdateDate){var _this1266;_classCallCheck(this,IfcCostSchedule);_this1266=_super1269.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1266.GlobalId=GlobalId;_this1266.OwnerHistory=OwnerHistory;_this1266.Name=Name;_this1266.Description=Description;_this1266.ObjectType=ObjectType;_this1266.Identification=Identification;_this1266.PredefinedType=PredefinedType;_this1266.Status=Status;_this1266.SubmittedOn=SubmittedOn;_this1266.UpdateDate=UpdateDate;_this1266.type=1419761937;return _this1266;}return _createClass(IfcCostSchedule);}(IfcControl);IFC42.IfcCostSchedule=IfcCostSchedule;var IfcCoveringType=/*#__PURE__*/function(_IfcBuildingElementTy15){_inherits(IfcCoveringType,_IfcBuildingElementTy15);var _super1270=_createSuper(IfcCoveringType);function IfcCoveringType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1267;_classCallCheck(this,IfcCoveringType);_this1267=_super1270.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1267.GlobalId=GlobalId;_this1267.OwnerHistory=OwnerHistory;_this1267.Name=Name;_this1267.Description=Description;_this1267.ApplicableOccurrence=ApplicableOccurrence;_this1267.HasPropertySets=HasPropertySets;_this1267.RepresentationMaps=RepresentationMaps;_this1267.Tag=Tag;_this1267.ElementType=ElementType;_this1267.PredefinedType=PredefinedType;_this1267.type=1916426348;return _this1267;}return _createClass(IfcCoveringType);}(IfcBuildingElementType);IFC42.IfcCoveringType=IfcCoveringType;var IfcCrewResource=/*#__PURE__*/function(_IfcConstructionResou13){_inherits(IfcCrewResource,_IfcConstructionResou13);var _super1271=_createSuper(IfcCrewResource);function IfcCrewResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this1268;_classCallCheck(this,IfcCrewResource);_this1268=_super1271.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this1268.GlobalId=GlobalId;_this1268.OwnerHistory=OwnerHistory;_this1268.Name=Name;_this1268.Description=Description;_this1268.ObjectType=ObjectType;_this1268.Identification=Identification;_this1268.LongDescription=LongDescription;_this1268.Usage=Usage;_this1268.BaseCosts=BaseCosts;_this1268.BaseQuantity=BaseQuantity;_this1268.PredefinedType=PredefinedType;_this1268.type=3295246426;return _this1268;}return _createClass(IfcCrewResource);}(IfcConstructionResource);IFC42.IfcCrewResource=IfcCrewResource;var IfcCurtainWallType=/*#__PURE__*/function(_IfcBuildingElementTy16){_inherits(IfcCurtainWallType,_IfcBuildingElementTy16);var _super1272=_createSuper(IfcCurtainWallType);function IfcCurtainWallType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1269;_classCallCheck(this,IfcCurtainWallType);_this1269=_super1272.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1269.GlobalId=GlobalId;_this1269.OwnerHistory=OwnerHistory;_this1269.Name=Name;_this1269.Description=Description;_this1269.ApplicableOccurrence=ApplicableOccurrence;_this1269.HasPropertySets=HasPropertySets;_this1269.RepresentationMaps=RepresentationMaps;_this1269.Tag=Tag;_this1269.ElementType=ElementType;_this1269.PredefinedType=PredefinedType;_this1269.type=1457835157;return _this1269;}return _createClass(IfcCurtainWallType);}(IfcBuildingElementType);IFC42.IfcCurtainWallType=IfcCurtainWallType;var IfcCylindricalSurface=/*#__PURE__*/function(_IfcElementarySurface5){_inherits(IfcCylindricalSurface,_IfcElementarySurface5);var _super1273=_createSuper(IfcCylindricalSurface);function IfcCylindricalSurface(expressID,Position,Radius){var _this1270;_classCallCheck(this,IfcCylindricalSurface);_this1270=_super1273.call(this,expressID,Position);_this1270.Position=Position;_this1270.Radius=Radius;_this1270.type=1213902940;return _this1270;}return _createClass(IfcCylindricalSurface);}(IfcElementarySurface);IFC42.IfcCylindricalSurface=IfcCylindricalSurface;var IfcDistributionElementType=/*#__PURE__*/function(_IfcElementType12){_inherits(IfcDistributionElementType,_IfcElementType12);var _super1274=_createSuper(IfcDistributionElementType);function IfcDistributionElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1271;_classCallCheck(this,IfcDistributionElementType);_this1271=_super1274.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1271.GlobalId=GlobalId;_this1271.OwnerHistory=OwnerHistory;_this1271.Name=Name;_this1271.Description=Description;_this1271.ApplicableOccurrence=ApplicableOccurrence;_this1271.HasPropertySets=HasPropertySets;_this1271.RepresentationMaps=RepresentationMaps;_this1271.Tag=Tag;_this1271.ElementType=ElementType;_this1271.type=3256556792;return _this1271;}return _createClass(IfcDistributionElementType);}(IfcElementType);IFC42.IfcDistributionElementType=IfcDistributionElementType;var IfcDistributionFlowElementType=/*#__PURE__*/function(_IfcDistributionEleme5){_inherits(IfcDistributionFlowElementType,_IfcDistributionEleme5);var _super1275=_createSuper(IfcDistributionFlowElementType);function IfcDistributionFlowElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1272;_classCallCheck(this,IfcDistributionFlowElementType);_this1272=_super1275.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1272.GlobalId=GlobalId;_this1272.OwnerHistory=OwnerHistory;_this1272.Name=Name;_this1272.Description=Description;_this1272.ApplicableOccurrence=ApplicableOccurrence;_this1272.HasPropertySets=HasPropertySets;_this1272.RepresentationMaps=RepresentationMaps;_this1272.Tag=Tag;_this1272.ElementType=ElementType;_this1272.type=3849074793;return _this1272;}return _createClass(IfcDistributionFlowElementType);}(IfcDistributionElementType);IFC42.IfcDistributionFlowElementType=IfcDistributionFlowElementType;var IfcDoorLiningProperties=/*#__PURE__*/function(_IfcPreDefinedPropert7){_inherits(IfcDoorLiningProperties,_IfcPreDefinedPropert7);var _super1276=_createSuper(IfcDoorLiningProperties);function IfcDoorLiningProperties(expressID,GlobalId,OwnerHistory,Name,Description,LiningDepth,LiningThickness,ThresholdDepth,ThresholdThickness,TransomThickness,TransomOffset,LiningOffset,ThresholdOffset,CasingThickness,CasingDepth,ShapeAspectStyle,LiningToPanelOffsetX,LiningToPanelOffsetY){var _this1273;_classCallCheck(this,IfcDoorLiningProperties);_this1273=_super1276.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1273.GlobalId=GlobalId;_this1273.OwnerHistory=OwnerHistory;_this1273.Name=Name;_this1273.Description=Description;_this1273.LiningDepth=LiningDepth;_this1273.LiningThickness=LiningThickness;_this1273.ThresholdDepth=ThresholdDepth;_this1273.ThresholdThickness=ThresholdThickness;_this1273.TransomThickness=TransomThickness;_this1273.TransomOffset=TransomOffset;_this1273.LiningOffset=LiningOffset;_this1273.ThresholdOffset=ThresholdOffset;_this1273.CasingThickness=CasingThickness;_this1273.CasingDepth=CasingDepth;_this1273.ShapeAspectStyle=ShapeAspectStyle;_this1273.LiningToPanelOffsetX=LiningToPanelOffsetX;_this1273.LiningToPanelOffsetY=LiningToPanelOffsetY;_this1273.type=2963535650;return _this1273;}return _createClass(IfcDoorLiningProperties);}(IfcPreDefinedPropertySet);IFC42.IfcDoorLiningProperties=IfcDoorLiningProperties;var IfcDoorPanelProperties=/*#__PURE__*/function(_IfcPreDefinedPropert8){_inherits(IfcDoorPanelProperties,_IfcPreDefinedPropert8);var _super1277=_createSuper(IfcDoorPanelProperties);function IfcDoorPanelProperties(expressID,GlobalId,OwnerHistory,Name,Description,PanelDepth,PanelOperation,PanelWidth,PanelPosition,ShapeAspectStyle){var _this1274;_classCallCheck(this,IfcDoorPanelProperties);_this1274=_super1277.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1274.GlobalId=GlobalId;_this1274.OwnerHistory=OwnerHistory;_this1274.Name=Name;_this1274.Description=Description;_this1274.PanelDepth=PanelDepth;_this1274.PanelOperation=PanelOperation;_this1274.PanelWidth=PanelWidth;_this1274.PanelPosition=PanelPosition;_this1274.ShapeAspectStyle=ShapeAspectStyle;_this1274.type=1714330368;return _this1274;}return _createClass(IfcDoorPanelProperties);}(IfcPreDefinedPropertySet);IFC42.IfcDoorPanelProperties=IfcDoorPanelProperties;var IfcDoorType=/*#__PURE__*/function(_IfcBuildingElementTy17){_inherits(IfcDoorType,_IfcBuildingElementTy17);var _super1278=_createSuper(IfcDoorType);function IfcDoorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,OperationType,ParameterTakesPrecedence,UserDefinedOperationType){var _this1275;_classCallCheck(this,IfcDoorType);_this1275=_super1278.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1275.GlobalId=GlobalId;_this1275.OwnerHistory=OwnerHistory;_this1275.Name=Name;_this1275.Description=Description;_this1275.ApplicableOccurrence=ApplicableOccurrence;_this1275.HasPropertySets=HasPropertySets;_this1275.RepresentationMaps=RepresentationMaps;_this1275.Tag=Tag;_this1275.ElementType=ElementType;_this1275.PredefinedType=PredefinedType;_this1275.OperationType=OperationType;_this1275.ParameterTakesPrecedence=ParameterTakesPrecedence;_this1275.UserDefinedOperationType=UserDefinedOperationType;_this1275.type=2323601079;return _this1275;}return _createClass(IfcDoorType);}(IfcBuildingElementType);IFC42.IfcDoorType=IfcDoorType;var IfcDraughtingPreDefinedColour=/*#__PURE__*/function(_IfcPreDefinedColour2){_inherits(IfcDraughtingPreDefinedColour,_IfcPreDefinedColour2);var _super1279=_createSuper(IfcDraughtingPreDefinedColour);function IfcDraughtingPreDefinedColour(expressID,Name){var _this1276;_classCallCheck(this,IfcDraughtingPreDefinedColour);_this1276=_super1279.call(this,expressID,Name);_this1276.Name=Name;_this1276.type=445594917;return _this1276;}return _createClass(IfcDraughtingPreDefinedColour);}(IfcPreDefinedColour);IFC42.IfcDraughtingPreDefinedColour=IfcDraughtingPreDefinedColour;var IfcDraughtingPreDefinedCurveFont=/*#__PURE__*/function(_IfcPreDefinedCurveFo2){_inherits(IfcDraughtingPreDefinedCurveFont,_IfcPreDefinedCurveFo2);var _super1280=_createSuper(IfcDraughtingPreDefinedCurveFont);function IfcDraughtingPreDefinedCurveFont(expressID,Name){var _this1277;_classCallCheck(this,IfcDraughtingPreDefinedCurveFont);_this1277=_super1280.call(this,expressID,Name);_this1277.Name=Name;_this1277.type=4006246654;return _this1277;}return _createClass(IfcDraughtingPreDefinedCurveFont);}(IfcPreDefinedCurveFont);IFC42.IfcDraughtingPreDefinedCurveFont=IfcDraughtingPreDefinedCurveFont;var IfcElement=/*#__PURE__*/function(_IfcProduct14){_inherits(IfcElement,_IfcProduct14);var _super1281=_createSuper(IfcElement);function IfcElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1278;_classCallCheck(this,IfcElement);_this1278=_super1281.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1278.GlobalId=GlobalId;_this1278.OwnerHistory=OwnerHistory;_this1278.Name=Name;_this1278.Description=Description;_this1278.ObjectType=ObjectType;_this1278.ObjectPlacement=ObjectPlacement;_this1278.Representation=Representation;_this1278.Tag=Tag;_this1278.type=1758889154;return _this1278;}return _createClass(IfcElement);}(IfcProduct);IFC42.IfcElement=IfcElement;var IfcElementAssembly=/*#__PURE__*/function(_IfcElement11){_inherits(IfcElementAssembly,_IfcElement11);var _super1282=_createSuper(IfcElementAssembly);function IfcElementAssembly(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,AssemblyPlace,PredefinedType){var _this1279;_classCallCheck(this,IfcElementAssembly);_this1279=_super1282.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1279.GlobalId=GlobalId;_this1279.OwnerHistory=OwnerHistory;_this1279.Name=Name;_this1279.Description=Description;_this1279.ObjectType=ObjectType;_this1279.ObjectPlacement=ObjectPlacement;_this1279.Representation=Representation;_this1279.Tag=Tag;_this1279.AssemblyPlace=AssemblyPlace;_this1279.PredefinedType=PredefinedType;_this1279.type=4123344466;return _this1279;}return _createClass(IfcElementAssembly);}(IfcElement);IFC42.IfcElementAssembly=IfcElementAssembly;var IfcElementAssemblyType=/*#__PURE__*/function(_IfcElementType13){_inherits(IfcElementAssemblyType,_IfcElementType13);var _super1283=_createSuper(IfcElementAssemblyType);function IfcElementAssemblyType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1280;_classCallCheck(this,IfcElementAssemblyType);_this1280=_super1283.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1280.GlobalId=GlobalId;_this1280.OwnerHistory=OwnerHistory;_this1280.Name=Name;_this1280.Description=Description;_this1280.ApplicableOccurrence=ApplicableOccurrence;_this1280.HasPropertySets=HasPropertySets;_this1280.RepresentationMaps=RepresentationMaps;_this1280.Tag=Tag;_this1280.ElementType=ElementType;_this1280.PredefinedType=PredefinedType;_this1280.type=2397081782;return _this1280;}return _createClass(IfcElementAssemblyType);}(IfcElementType);IFC42.IfcElementAssemblyType=IfcElementAssemblyType;var IfcElementComponent=/*#__PURE__*/function(_IfcElement12){_inherits(IfcElementComponent,_IfcElement12);var _super1284=_createSuper(IfcElementComponent);function IfcElementComponent(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1281;_classCallCheck(this,IfcElementComponent);_this1281=_super1284.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1281.GlobalId=GlobalId;_this1281.OwnerHistory=OwnerHistory;_this1281.Name=Name;_this1281.Description=Description;_this1281.ObjectType=ObjectType;_this1281.ObjectPlacement=ObjectPlacement;_this1281.Representation=Representation;_this1281.Tag=Tag;_this1281.type=1623761950;return _this1281;}return _createClass(IfcElementComponent);}(IfcElement);IFC42.IfcElementComponent=IfcElementComponent;var IfcElementComponentType=/*#__PURE__*/function(_IfcElementType14){_inherits(IfcElementComponentType,_IfcElementType14);var _super1285=_createSuper(IfcElementComponentType);function IfcElementComponentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1282;_classCallCheck(this,IfcElementComponentType);_this1282=_super1285.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1282.GlobalId=GlobalId;_this1282.OwnerHistory=OwnerHistory;_this1282.Name=Name;_this1282.Description=Description;_this1282.ApplicableOccurrence=ApplicableOccurrence;_this1282.HasPropertySets=HasPropertySets;_this1282.RepresentationMaps=RepresentationMaps;_this1282.Tag=Tag;_this1282.ElementType=ElementType;_this1282.type=2590856083;return _this1282;}return _createClass(IfcElementComponentType);}(IfcElementType);IFC42.IfcElementComponentType=IfcElementComponentType;var IfcEllipse=/*#__PURE__*/function(_IfcConic3){_inherits(IfcEllipse,_IfcConic3);var _super1286=_createSuper(IfcEllipse);function IfcEllipse(expressID,Position,SemiAxis1,SemiAxis2){var _this1283;_classCallCheck(this,IfcEllipse);_this1283=_super1286.call(this,expressID,Position);_this1283.Position=Position;_this1283.SemiAxis1=SemiAxis1;_this1283.SemiAxis2=SemiAxis2;_this1283.type=1704287377;return _this1283;}return _createClass(IfcEllipse);}(IfcConic);IFC42.IfcEllipse=IfcEllipse;var IfcEnergyConversionDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE19){_inherits(IfcEnergyConversionDeviceType,_IfcDistributionFlowE19);var _super1287=_createSuper(IfcEnergyConversionDeviceType);function IfcEnergyConversionDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1284;_classCallCheck(this,IfcEnergyConversionDeviceType);_this1284=_super1287.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1284.GlobalId=GlobalId;_this1284.OwnerHistory=OwnerHistory;_this1284.Name=Name;_this1284.Description=Description;_this1284.ApplicableOccurrence=ApplicableOccurrence;_this1284.HasPropertySets=HasPropertySets;_this1284.RepresentationMaps=RepresentationMaps;_this1284.Tag=Tag;_this1284.ElementType=ElementType;_this1284.type=2107101300;return _this1284;}return _createClass(IfcEnergyConversionDeviceType);}(IfcDistributionFlowElementType);IFC42.IfcEnergyConversionDeviceType=IfcEnergyConversionDeviceType;var IfcEngineType=/*#__PURE__*/function(_IfcEnergyConversionD19){_inherits(IfcEngineType,_IfcEnergyConversionD19);var _super1288=_createSuper(IfcEngineType);function IfcEngineType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1285;_classCallCheck(this,IfcEngineType);_this1285=_super1288.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1285.GlobalId=GlobalId;_this1285.OwnerHistory=OwnerHistory;_this1285.Name=Name;_this1285.Description=Description;_this1285.ApplicableOccurrence=ApplicableOccurrence;_this1285.HasPropertySets=HasPropertySets;_this1285.RepresentationMaps=RepresentationMaps;_this1285.Tag=Tag;_this1285.ElementType=ElementType;_this1285.PredefinedType=PredefinedType;_this1285.type=132023988;return _this1285;}return _createClass(IfcEngineType);}(IfcEnergyConversionDeviceType);IFC42.IfcEngineType=IfcEngineType;var IfcEvaporativeCoolerType=/*#__PURE__*/function(_IfcEnergyConversionD20){_inherits(IfcEvaporativeCoolerType,_IfcEnergyConversionD20);var _super1289=_createSuper(IfcEvaporativeCoolerType);function IfcEvaporativeCoolerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1286;_classCallCheck(this,IfcEvaporativeCoolerType);_this1286=_super1289.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1286.GlobalId=GlobalId;_this1286.OwnerHistory=OwnerHistory;_this1286.Name=Name;_this1286.Description=Description;_this1286.ApplicableOccurrence=ApplicableOccurrence;_this1286.HasPropertySets=HasPropertySets;_this1286.RepresentationMaps=RepresentationMaps;_this1286.Tag=Tag;_this1286.ElementType=ElementType;_this1286.PredefinedType=PredefinedType;_this1286.type=3174744832;return _this1286;}return _createClass(IfcEvaporativeCoolerType);}(IfcEnergyConversionDeviceType);IFC42.IfcEvaporativeCoolerType=IfcEvaporativeCoolerType;var IfcEvaporatorType=/*#__PURE__*/function(_IfcEnergyConversionD21){_inherits(IfcEvaporatorType,_IfcEnergyConversionD21);var _super1290=_createSuper(IfcEvaporatorType);function IfcEvaporatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1287;_classCallCheck(this,IfcEvaporatorType);_this1287=_super1290.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1287.GlobalId=GlobalId;_this1287.OwnerHistory=OwnerHistory;_this1287.Name=Name;_this1287.Description=Description;_this1287.ApplicableOccurrence=ApplicableOccurrence;_this1287.HasPropertySets=HasPropertySets;_this1287.RepresentationMaps=RepresentationMaps;_this1287.Tag=Tag;_this1287.ElementType=ElementType;_this1287.PredefinedType=PredefinedType;_this1287.type=3390157468;return _this1287;}return _createClass(IfcEvaporatorType);}(IfcEnergyConversionDeviceType);IFC42.IfcEvaporatorType=IfcEvaporatorType;var IfcEvent=/*#__PURE__*/function(_IfcProcess4){_inherits(IfcEvent,_IfcProcess4);var _super1291=_createSuper(IfcEvent);function IfcEvent(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,PredefinedType,EventTriggerType,UserDefinedEventTriggerType,EventOccurenceTime){var _this1288;_classCallCheck(this,IfcEvent);_this1288=_super1291.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this1288.GlobalId=GlobalId;_this1288.OwnerHistory=OwnerHistory;_this1288.Name=Name;_this1288.Description=Description;_this1288.ObjectType=ObjectType;_this1288.Identification=Identification;_this1288.LongDescription=LongDescription;_this1288.PredefinedType=PredefinedType;_this1288.EventTriggerType=EventTriggerType;_this1288.UserDefinedEventTriggerType=UserDefinedEventTriggerType;_this1288.EventOccurenceTime=EventOccurenceTime;_this1288.type=4148101412;return _this1288;}return _createClass(IfcEvent);}(IfcProcess);IFC42.IfcEvent=IfcEvent;var IfcExternalSpatialStructureElement=/*#__PURE__*/function(_IfcSpatialElement3){_inherits(IfcExternalSpatialStructureElement,_IfcSpatialElement3);var _super1292=_createSuper(IfcExternalSpatialStructureElement);function IfcExternalSpatialStructureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName){var _this1289;_classCallCheck(this,IfcExternalSpatialStructureElement);_this1289=_super1292.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this1289.GlobalId=GlobalId;_this1289.OwnerHistory=OwnerHistory;_this1289.Name=Name;_this1289.Description=Description;_this1289.ObjectType=ObjectType;_this1289.ObjectPlacement=ObjectPlacement;_this1289.Representation=Representation;_this1289.LongName=LongName;_this1289.type=2853485674;return _this1289;}return _createClass(IfcExternalSpatialStructureElement);}(IfcSpatialElement);IFC42.IfcExternalSpatialStructureElement=IfcExternalSpatialStructureElement;var IfcFacetedBrep=/*#__PURE__*/function(_IfcManifoldSolidBrep4){_inherits(IfcFacetedBrep,_IfcManifoldSolidBrep4);var _super1293=_createSuper(IfcFacetedBrep);function IfcFacetedBrep(expressID,Outer){var _this1290;_classCallCheck(this,IfcFacetedBrep);_this1290=_super1293.call(this,expressID,Outer);_this1290.Outer=Outer;_this1290.type=807026263;return _this1290;}return _createClass(IfcFacetedBrep);}(IfcManifoldSolidBrep);IFC42.IfcFacetedBrep=IfcFacetedBrep;var IfcFacetedBrepWithVoids=/*#__PURE__*/function(_IfcFacetedBrep){_inherits(IfcFacetedBrepWithVoids,_IfcFacetedBrep);var _super1294=_createSuper(IfcFacetedBrepWithVoids);function IfcFacetedBrepWithVoids(expressID,Outer,Voids){var _this1291;_classCallCheck(this,IfcFacetedBrepWithVoids);_this1291=_super1294.call(this,expressID,Outer);_this1291.Outer=Outer;_this1291.Voids=Voids;_this1291.type=3737207727;return _this1291;}return _createClass(IfcFacetedBrepWithVoids);}(IfcFacetedBrep);IFC42.IfcFacetedBrepWithVoids=IfcFacetedBrepWithVoids;var IfcFastener=/*#__PURE__*/function(_IfcElementComponent3){_inherits(IfcFastener,_IfcElementComponent3);var _super1295=_createSuper(IfcFastener);function IfcFastener(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1292;_classCallCheck(this,IfcFastener);_this1292=_super1295.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1292.GlobalId=GlobalId;_this1292.OwnerHistory=OwnerHistory;_this1292.Name=Name;_this1292.Description=Description;_this1292.ObjectType=ObjectType;_this1292.ObjectPlacement=ObjectPlacement;_this1292.Representation=Representation;_this1292.Tag=Tag;_this1292.PredefinedType=PredefinedType;_this1292.type=647756555;return _this1292;}return _createClass(IfcFastener);}(IfcElementComponent);IFC42.IfcFastener=IfcFastener;var IfcFastenerType=/*#__PURE__*/function(_IfcElementComponentT3){_inherits(IfcFastenerType,_IfcElementComponentT3);var _super1296=_createSuper(IfcFastenerType);function IfcFastenerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1293;_classCallCheck(this,IfcFastenerType);_this1293=_super1296.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1293.GlobalId=GlobalId;_this1293.OwnerHistory=OwnerHistory;_this1293.Name=Name;_this1293.Description=Description;_this1293.ApplicableOccurrence=ApplicableOccurrence;_this1293.HasPropertySets=HasPropertySets;_this1293.RepresentationMaps=RepresentationMaps;_this1293.Tag=Tag;_this1293.ElementType=ElementType;_this1293.PredefinedType=PredefinedType;_this1293.type=2489546625;return _this1293;}return _createClass(IfcFastenerType);}(IfcElementComponentType);IFC42.IfcFastenerType=IfcFastenerType;var IfcFeatureElement=/*#__PURE__*/function(_IfcElement13){_inherits(IfcFeatureElement,_IfcElement13);var _super1297=_createSuper(IfcFeatureElement);function IfcFeatureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1294;_classCallCheck(this,IfcFeatureElement);_this1294=_super1297.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1294.GlobalId=GlobalId;_this1294.OwnerHistory=OwnerHistory;_this1294.Name=Name;_this1294.Description=Description;_this1294.ObjectType=ObjectType;_this1294.ObjectPlacement=ObjectPlacement;_this1294.Representation=Representation;_this1294.Tag=Tag;_this1294.type=2827207264;return _this1294;}return _createClass(IfcFeatureElement);}(IfcElement);IFC42.IfcFeatureElement=IfcFeatureElement;var IfcFeatureElementAddition=/*#__PURE__*/function(_IfcFeatureElement3){_inherits(IfcFeatureElementAddition,_IfcFeatureElement3);var _super1298=_createSuper(IfcFeatureElementAddition);function IfcFeatureElementAddition(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1295;_classCallCheck(this,IfcFeatureElementAddition);_this1295=_super1298.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1295.GlobalId=GlobalId;_this1295.OwnerHistory=OwnerHistory;_this1295.Name=Name;_this1295.Description=Description;_this1295.ObjectType=ObjectType;_this1295.ObjectPlacement=ObjectPlacement;_this1295.Representation=Representation;_this1295.Tag=Tag;_this1295.type=2143335405;return _this1295;}return _createClass(IfcFeatureElementAddition);}(IfcFeatureElement);IFC42.IfcFeatureElementAddition=IfcFeatureElementAddition;var IfcFeatureElementSubtraction=/*#__PURE__*/function(_IfcFeatureElement4){_inherits(IfcFeatureElementSubtraction,_IfcFeatureElement4);var _super1299=_createSuper(IfcFeatureElementSubtraction);function IfcFeatureElementSubtraction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1296;_classCallCheck(this,IfcFeatureElementSubtraction);_this1296=_super1299.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1296.GlobalId=GlobalId;_this1296.OwnerHistory=OwnerHistory;_this1296.Name=Name;_this1296.Description=Description;_this1296.ObjectType=ObjectType;_this1296.ObjectPlacement=ObjectPlacement;_this1296.Representation=Representation;_this1296.Tag=Tag;_this1296.type=1287392070;return _this1296;}return _createClass(IfcFeatureElementSubtraction);}(IfcFeatureElement);IFC42.IfcFeatureElementSubtraction=IfcFeatureElementSubtraction;var IfcFlowControllerType=/*#__PURE__*/function(_IfcDistributionFlowE20){_inherits(IfcFlowControllerType,_IfcDistributionFlowE20);var _super1300=_createSuper(IfcFlowControllerType);function IfcFlowControllerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1297;_classCallCheck(this,IfcFlowControllerType);_this1297=_super1300.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1297.GlobalId=GlobalId;_this1297.OwnerHistory=OwnerHistory;_this1297.Name=Name;_this1297.Description=Description;_this1297.ApplicableOccurrence=ApplicableOccurrence;_this1297.HasPropertySets=HasPropertySets;_this1297.RepresentationMaps=RepresentationMaps;_this1297.Tag=Tag;_this1297.ElementType=ElementType;_this1297.type=3907093117;return _this1297;}return _createClass(IfcFlowControllerType);}(IfcDistributionFlowElementType);IFC42.IfcFlowControllerType=IfcFlowControllerType;var IfcFlowFittingType=/*#__PURE__*/function(_IfcDistributionFlowE21){_inherits(IfcFlowFittingType,_IfcDistributionFlowE21);var _super1301=_createSuper(IfcFlowFittingType);function IfcFlowFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1298;_classCallCheck(this,IfcFlowFittingType);_this1298=_super1301.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1298.GlobalId=GlobalId;_this1298.OwnerHistory=OwnerHistory;_this1298.Name=Name;_this1298.Description=Description;_this1298.ApplicableOccurrence=ApplicableOccurrence;_this1298.HasPropertySets=HasPropertySets;_this1298.RepresentationMaps=RepresentationMaps;_this1298.Tag=Tag;_this1298.ElementType=ElementType;_this1298.type=3198132628;return _this1298;}return _createClass(IfcFlowFittingType);}(IfcDistributionFlowElementType);IFC42.IfcFlowFittingType=IfcFlowFittingType;var IfcFlowMeterType=/*#__PURE__*/function(_IfcFlowControllerTyp8){_inherits(IfcFlowMeterType,_IfcFlowControllerTyp8);var _super1302=_createSuper(IfcFlowMeterType);function IfcFlowMeterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1299;_classCallCheck(this,IfcFlowMeterType);_this1299=_super1302.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1299.GlobalId=GlobalId;_this1299.OwnerHistory=OwnerHistory;_this1299.Name=Name;_this1299.Description=Description;_this1299.ApplicableOccurrence=ApplicableOccurrence;_this1299.HasPropertySets=HasPropertySets;_this1299.RepresentationMaps=RepresentationMaps;_this1299.Tag=Tag;_this1299.ElementType=ElementType;_this1299.PredefinedType=PredefinedType;_this1299.type=3815607619;return _this1299;}return _createClass(IfcFlowMeterType);}(IfcFlowControllerType);IFC42.IfcFlowMeterType=IfcFlowMeterType;var IfcFlowMovingDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE22){_inherits(IfcFlowMovingDeviceType,_IfcDistributionFlowE22);var _super1303=_createSuper(IfcFlowMovingDeviceType);function IfcFlowMovingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1300;_classCallCheck(this,IfcFlowMovingDeviceType);_this1300=_super1303.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1300.GlobalId=GlobalId;_this1300.OwnerHistory=OwnerHistory;_this1300.Name=Name;_this1300.Description=Description;_this1300.ApplicableOccurrence=ApplicableOccurrence;_this1300.HasPropertySets=HasPropertySets;_this1300.RepresentationMaps=RepresentationMaps;_this1300.Tag=Tag;_this1300.ElementType=ElementType;_this1300.type=1482959167;return _this1300;}return _createClass(IfcFlowMovingDeviceType);}(IfcDistributionFlowElementType);IFC42.IfcFlowMovingDeviceType=IfcFlowMovingDeviceType;var IfcFlowSegmentType=/*#__PURE__*/function(_IfcDistributionFlowE23){_inherits(IfcFlowSegmentType,_IfcDistributionFlowE23);var _super1304=_createSuper(IfcFlowSegmentType);function IfcFlowSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1301;_classCallCheck(this,IfcFlowSegmentType);_this1301=_super1304.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1301.GlobalId=GlobalId;_this1301.OwnerHistory=OwnerHistory;_this1301.Name=Name;_this1301.Description=Description;_this1301.ApplicableOccurrence=ApplicableOccurrence;_this1301.HasPropertySets=HasPropertySets;_this1301.RepresentationMaps=RepresentationMaps;_this1301.Tag=Tag;_this1301.ElementType=ElementType;_this1301.type=1834744321;return _this1301;}return _createClass(IfcFlowSegmentType);}(IfcDistributionFlowElementType);IFC42.IfcFlowSegmentType=IfcFlowSegmentType;var IfcFlowStorageDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE24){_inherits(IfcFlowStorageDeviceType,_IfcDistributionFlowE24);var _super1305=_createSuper(IfcFlowStorageDeviceType);function IfcFlowStorageDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1302;_classCallCheck(this,IfcFlowStorageDeviceType);_this1302=_super1305.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1302.GlobalId=GlobalId;_this1302.OwnerHistory=OwnerHistory;_this1302.Name=Name;_this1302.Description=Description;_this1302.ApplicableOccurrence=ApplicableOccurrence;_this1302.HasPropertySets=HasPropertySets;_this1302.RepresentationMaps=RepresentationMaps;_this1302.Tag=Tag;_this1302.ElementType=ElementType;_this1302.type=1339347760;return _this1302;}return _createClass(IfcFlowStorageDeviceType);}(IfcDistributionFlowElementType);IFC42.IfcFlowStorageDeviceType=IfcFlowStorageDeviceType;var IfcFlowTerminalType=/*#__PURE__*/function(_IfcDistributionFlowE25){_inherits(IfcFlowTerminalType,_IfcDistributionFlowE25);var _super1306=_createSuper(IfcFlowTerminalType);function IfcFlowTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1303;_classCallCheck(this,IfcFlowTerminalType);_this1303=_super1306.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1303.GlobalId=GlobalId;_this1303.OwnerHistory=OwnerHistory;_this1303.Name=Name;_this1303.Description=Description;_this1303.ApplicableOccurrence=ApplicableOccurrence;_this1303.HasPropertySets=HasPropertySets;_this1303.RepresentationMaps=RepresentationMaps;_this1303.Tag=Tag;_this1303.ElementType=ElementType;_this1303.type=2297155007;return _this1303;}return _createClass(IfcFlowTerminalType);}(IfcDistributionFlowElementType);IFC42.IfcFlowTerminalType=IfcFlowTerminalType;var IfcFlowTreatmentDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE26){_inherits(IfcFlowTreatmentDeviceType,_IfcDistributionFlowE26);var _super1307=_createSuper(IfcFlowTreatmentDeviceType);function IfcFlowTreatmentDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1304;_classCallCheck(this,IfcFlowTreatmentDeviceType);_this1304=_super1307.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1304.GlobalId=GlobalId;_this1304.OwnerHistory=OwnerHistory;_this1304.Name=Name;_this1304.Description=Description;_this1304.ApplicableOccurrence=ApplicableOccurrence;_this1304.HasPropertySets=HasPropertySets;_this1304.RepresentationMaps=RepresentationMaps;_this1304.Tag=Tag;_this1304.ElementType=ElementType;_this1304.type=3009222698;return _this1304;}return _createClass(IfcFlowTreatmentDeviceType);}(IfcDistributionFlowElementType);IFC42.IfcFlowTreatmentDeviceType=IfcFlowTreatmentDeviceType;var IfcFootingType=/*#__PURE__*/function(_IfcBuildingElementTy18){_inherits(IfcFootingType,_IfcBuildingElementTy18);var _super1308=_createSuper(IfcFootingType);function IfcFootingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1305;_classCallCheck(this,IfcFootingType);_this1305=_super1308.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1305.GlobalId=GlobalId;_this1305.OwnerHistory=OwnerHistory;_this1305.Name=Name;_this1305.Description=Description;_this1305.ApplicableOccurrence=ApplicableOccurrence;_this1305.HasPropertySets=HasPropertySets;_this1305.RepresentationMaps=RepresentationMaps;_this1305.Tag=Tag;_this1305.ElementType=ElementType;_this1305.PredefinedType=PredefinedType;_this1305.type=1893162501;return _this1305;}return _createClass(IfcFootingType);}(IfcBuildingElementType);IFC42.IfcFootingType=IfcFootingType;var IfcFurnishingElement=/*#__PURE__*/function(_IfcElement14){_inherits(IfcFurnishingElement,_IfcElement14);var _super1309=_createSuper(IfcFurnishingElement);function IfcFurnishingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1306;_classCallCheck(this,IfcFurnishingElement);_this1306=_super1309.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1306.GlobalId=GlobalId;_this1306.OwnerHistory=OwnerHistory;_this1306.Name=Name;_this1306.Description=Description;_this1306.ObjectType=ObjectType;_this1306.ObjectPlacement=ObjectPlacement;_this1306.Representation=Representation;_this1306.Tag=Tag;_this1306.type=263784265;return _this1306;}return _createClass(IfcFurnishingElement);}(IfcElement);IFC42.IfcFurnishingElement=IfcFurnishingElement;var IfcFurniture=/*#__PURE__*/function(_IfcFurnishingElement5){_inherits(IfcFurniture,_IfcFurnishingElement5);var _super1310=_createSuper(IfcFurniture);function IfcFurniture(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1307;_classCallCheck(this,IfcFurniture);_this1307=_super1310.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1307.GlobalId=GlobalId;_this1307.OwnerHistory=OwnerHistory;_this1307.Name=Name;_this1307.Description=Description;_this1307.ObjectType=ObjectType;_this1307.ObjectPlacement=ObjectPlacement;_this1307.Representation=Representation;_this1307.Tag=Tag;_this1307.PredefinedType=PredefinedType;_this1307.type=1509553395;return _this1307;}return _createClass(IfcFurniture);}(IfcFurnishingElement);IFC42.IfcFurniture=IfcFurniture;var IfcGeographicElement=/*#__PURE__*/function(_IfcElement15){_inherits(IfcGeographicElement,_IfcElement15);var _super1311=_createSuper(IfcGeographicElement);function IfcGeographicElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1308;_classCallCheck(this,IfcGeographicElement);_this1308=_super1311.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1308.GlobalId=GlobalId;_this1308.OwnerHistory=OwnerHistory;_this1308.Name=Name;_this1308.Description=Description;_this1308.ObjectType=ObjectType;_this1308.ObjectPlacement=ObjectPlacement;_this1308.Representation=Representation;_this1308.Tag=Tag;_this1308.PredefinedType=PredefinedType;_this1308.type=3493046030;return _this1308;}return _createClass(IfcGeographicElement);}(IfcElement);IFC42.IfcGeographicElement=IfcGeographicElement;var IfcGrid=/*#__PURE__*/function(_IfcProduct15){_inherits(IfcGrid,_IfcProduct15);var _super1312=_createSuper(IfcGrid);function IfcGrid(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,UAxes,VAxes,WAxes,PredefinedType){var _this1309;_classCallCheck(this,IfcGrid);_this1309=_super1312.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1309.GlobalId=GlobalId;_this1309.OwnerHistory=OwnerHistory;_this1309.Name=Name;_this1309.Description=Description;_this1309.ObjectType=ObjectType;_this1309.ObjectPlacement=ObjectPlacement;_this1309.Representation=Representation;_this1309.UAxes=UAxes;_this1309.VAxes=VAxes;_this1309.WAxes=WAxes;_this1309.PredefinedType=PredefinedType;_this1309.type=3009204131;return _this1309;}return _createClass(IfcGrid);}(IfcProduct);IFC42.IfcGrid=IfcGrid;var IfcGroup=/*#__PURE__*/function(_IfcObject13){_inherits(IfcGroup,_IfcObject13);var _super1313=_createSuper(IfcGroup);function IfcGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this1310;_classCallCheck(this,IfcGroup);_this1310=_super1313.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1310.GlobalId=GlobalId;_this1310.OwnerHistory=OwnerHistory;_this1310.Name=Name;_this1310.Description=Description;_this1310.ObjectType=ObjectType;_this1310.type=2706460486;return _this1310;}return _createClass(IfcGroup);}(IfcObject);IFC42.IfcGroup=IfcGroup;var IfcHeatExchangerType=/*#__PURE__*/function(_IfcEnergyConversionD22){_inherits(IfcHeatExchangerType,_IfcEnergyConversionD22);var _super1314=_createSuper(IfcHeatExchangerType);function IfcHeatExchangerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1311;_classCallCheck(this,IfcHeatExchangerType);_this1311=_super1314.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1311.GlobalId=GlobalId;_this1311.OwnerHistory=OwnerHistory;_this1311.Name=Name;_this1311.Description=Description;_this1311.ApplicableOccurrence=ApplicableOccurrence;_this1311.HasPropertySets=HasPropertySets;_this1311.RepresentationMaps=RepresentationMaps;_this1311.Tag=Tag;_this1311.ElementType=ElementType;_this1311.PredefinedType=PredefinedType;_this1311.type=1251058090;return _this1311;}return _createClass(IfcHeatExchangerType);}(IfcEnergyConversionDeviceType);IFC42.IfcHeatExchangerType=IfcHeatExchangerType;var IfcHumidifierType=/*#__PURE__*/function(_IfcEnergyConversionD23){_inherits(IfcHumidifierType,_IfcEnergyConversionD23);var _super1315=_createSuper(IfcHumidifierType);function IfcHumidifierType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1312;_classCallCheck(this,IfcHumidifierType);_this1312=_super1315.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1312.GlobalId=GlobalId;_this1312.OwnerHistory=OwnerHistory;_this1312.Name=Name;_this1312.Description=Description;_this1312.ApplicableOccurrence=ApplicableOccurrence;_this1312.HasPropertySets=HasPropertySets;_this1312.RepresentationMaps=RepresentationMaps;_this1312.Tag=Tag;_this1312.ElementType=ElementType;_this1312.PredefinedType=PredefinedType;_this1312.type=1806887404;return _this1312;}return _createClass(IfcHumidifierType);}(IfcEnergyConversionDeviceType);IFC42.IfcHumidifierType=IfcHumidifierType;var IfcIndexedPolyCurve=/*#__PURE__*/function(_IfcBoundedCurve6){_inherits(IfcIndexedPolyCurve,_IfcBoundedCurve6);var _super1316=_createSuper(IfcIndexedPolyCurve);function IfcIndexedPolyCurve(expressID,Points,Segments,SelfIntersect){var _this1313;_classCallCheck(this,IfcIndexedPolyCurve);_this1313=_super1316.call(this,expressID);_this1313.Points=Points;_this1313.Segments=Segments;_this1313.SelfIntersect=SelfIntersect;_this1313.type=2571569899;return _this1313;}return _createClass(IfcIndexedPolyCurve);}(IfcBoundedCurve);IFC42.IfcIndexedPolyCurve=IfcIndexedPolyCurve;var IfcInterceptorType=/*#__PURE__*/function(_IfcFlowTreatmentDevi3){_inherits(IfcInterceptorType,_IfcFlowTreatmentDevi3);var _super1317=_createSuper(IfcInterceptorType);function IfcInterceptorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1314;_classCallCheck(this,IfcInterceptorType);_this1314=_super1317.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1314.GlobalId=GlobalId;_this1314.OwnerHistory=OwnerHistory;_this1314.Name=Name;_this1314.Description=Description;_this1314.ApplicableOccurrence=ApplicableOccurrence;_this1314.HasPropertySets=HasPropertySets;_this1314.RepresentationMaps=RepresentationMaps;_this1314.Tag=Tag;_this1314.ElementType=ElementType;_this1314.PredefinedType=PredefinedType;_this1314.type=3946677679;return _this1314;}return _createClass(IfcInterceptorType);}(IfcFlowTreatmentDeviceType);IFC42.IfcInterceptorType=IfcInterceptorType;var IfcIntersectionCurve=/*#__PURE__*/function(_IfcSurfaceCurve){_inherits(IfcIntersectionCurve,_IfcSurfaceCurve);var _super1318=_createSuper(IfcIntersectionCurve);function IfcIntersectionCurve(expressID,Curve3D,AssociatedGeometry,MasterRepresentation){var _this1315;_classCallCheck(this,IfcIntersectionCurve);_this1315=_super1318.call(this,expressID,Curve3D,AssociatedGeometry,MasterRepresentation);_this1315.Curve3D=Curve3D;_this1315.AssociatedGeometry=AssociatedGeometry;_this1315.MasterRepresentation=MasterRepresentation;_this1315.type=3113134337;return _this1315;}return _createClass(IfcIntersectionCurve);}(IfcSurfaceCurve);IFC42.IfcIntersectionCurve=IfcIntersectionCurve;var IfcInventory=/*#__PURE__*/function(_IfcGroup8){_inherits(IfcInventory,_IfcGroup8);var _super1319=_createSuper(IfcInventory);function IfcInventory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,Jurisdiction,ResponsiblePersons,LastUpdateDate,CurrentValue,OriginalValue){var _this1316;_classCallCheck(this,IfcInventory);_this1316=_super1319.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1316.GlobalId=GlobalId;_this1316.OwnerHistory=OwnerHistory;_this1316.Name=Name;_this1316.Description=Description;_this1316.ObjectType=ObjectType;_this1316.PredefinedType=PredefinedType;_this1316.Jurisdiction=Jurisdiction;_this1316.ResponsiblePersons=ResponsiblePersons;_this1316.LastUpdateDate=LastUpdateDate;_this1316.CurrentValue=CurrentValue;_this1316.OriginalValue=OriginalValue;_this1316.type=2391368822;return _this1316;}return _createClass(IfcInventory);}(IfcGroup);IFC42.IfcInventory=IfcInventory;var IfcJunctionBoxType=/*#__PURE__*/function(_IfcFlowFittingType5){_inherits(IfcJunctionBoxType,_IfcFlowFittingType5);var _super1320=_createSuper(IfcJunctionBoxType);function IfcJunctionBoxType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1317;_classCallCheck(this,IfcJunctionBoxType);_this1317=_super1320.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1317.GlobalId=GlobalId;_this1317.OwnerHistory=OwnerHistory;_this1317.Name=Name;_this1317.Description=Description;_this1317.ApplicableOccurrence=ApplicableOccurrence;_this1317.HasPropertySets=HasPropertySets;_this1317.RepresentationMaps=RepresentationMaps;_this1317.Tag=Tag;_this1317.ElementType=ElementType;_this1317.PredefinedType=PredefinedType;_this1317.type=4288270099;return _this1317;}return _createClass(IfcJunctionBoxType);}(IfcFlowFittingType);IFC42.IfcJunctionBoxType=IfcJunctionBoxType;var IfcLaborResource=/*#__PURE__*/function(_IfcConstructionResou14){_inherits(IfcLaborResource,_IfcConstructionResou14);var _super1321=_createSuper(IfcLaborResource);function IfcLaborResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this1318;_classCallCheck(this,IfcLaborResource);_this1318=_super1321.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this1318.GlobalId=GlobalId;_this1318.OwnerHistory=OwnerHistory;_this1318.Name=Name;_this1318.Description=Description;_this1318.ObjectType=ObjectType;_this1318.Identification=Identification;_this1318.LongDescription=LongDescription;_this1318.Usage=Usage;_this1318.BaseCosts=BaseCosts;_this1318.BaseQuantity=BaseQuantity;_this1318.PredefinedType=PredefinedType;_this1318.type=3827777499;return _this1318;}return _createClass(IfcLaborResource);}(IfcConstructionResource);IFC42.IfcLaborResource=IfcLaborResource;var IfcLampType=/*#__PURE__*/function(_IfcFlowTerminalType12){_inherits(IfcLampType,_IfcFlowTerminalType12);var _super1322=_createSuper(IfcLampType);function IfcLampType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1319;_classCallCheck(this,IfcLampType);_this1319=_super1322.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1319.GlobalId=GlobalId;_this1319.OwnerHistory=OwnerHistory;_this1319.Name=Name;_this1319.Description=Description;_this1319.ApplicableOccurrence=ApplicableOccurrence;_this1319.HasPropertySets=HasPropertySets;_this1319.RepresentationMaps=RepresentationMaps;_this1319.Tag=Tag;_this1319.ElementType=ElementType;_this1319.PredefinedType=PredefinedType;_this1319.type=1051575348;return _this1319;}return _createClass(IfcLampType);}(IfcFlowTerminalType);IFC42.IfcLampType=IfcLampType;var IfcLightFixtureType=/*#__PURE__*/function(_IfcFlowTerminalType13){_inherits(IfcLightFixtureType,_IfcFlowTerminalType13);var _super1323=_createSuper(IfcLightFixtureType);function IfcLightFixtureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1320;_classCallCheck(this,IfcLightFixtureType);_this1320=_super1323.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1320.GlobalId=GlobalId;_this1320.OwnerHistory=OwnerHistory;_this1320.Name=Name;_this1320.Description=Description;_this1320.ApplicableOccurrence=ApplicableOccurrence;_this1320.HasPropertySets=HasPropertySets;_this1320.RepresentationMaps=RepresentationMaps;_this1320.Tag=Tag;_this1320.ElementType=ElementType;_this1320.PredefinedType=PredefinedType;_this1320.type=1161773419;return _this1320;}return _createClass(IfcLightFixtureType);}(IfcFlowTerminalType);IFC42.IfcLightFixtureType=IfcLightFixtureType;var IfcMechanicalFastener=/*#__PURE__*/function(_IfcElementComponent4){_inherits(IfcMechanicalFastener,_IfcElementComponent4);var _super1324=_createSuper(IfcMechanicalFastener);function IfcMechanicalFastener(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,NominalDiameter,NominalLength,PredefinedType){var _this1321;_classCallCheck(this,IfcMechanicalFastener);_this1321=_super1324.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1321.GlobalId=GlobalId;_this1321.OwnerHistory=OwnerHistory;_this1321.Name=Name;_this1321.Description=Description;_this1321.ObjectType=ObjectType;_this1321.ObjectPlacement=ObjectPlacement;_this1321.Representation=Representation;_this1321.Tag=Tag;_this1321.NominalDiameter=NominalDiameter;_this1321.NominalLength=NominalLength;_this1321.PredefinedType=PredefinedType;_this1321.type=377706215;return _this1321;}return _createClass(IfcMechanicalFastener);}(IfcElementComponent);IFC42.IfcMechanicalFastener=IfcMechanicalFastener;var IfcMechanicalFastenerType=/*#__PURE__*/function(_IfcElementComponentT4){_inherits(IfcMechanicalFastenerType,_IfcElementComponentT4);var _super1325=_createSuper(IfcMechanicalFastenerType);function IfcMechanicalFastenerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,NominalDiameter,NominalLength){var _this1322;_classCallCheck(this,IfcMechanicalFastenerType);_this1322=_super1325.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1322.GlobalId=GlobalId;_this1322.OwnerHistory=OwnerHistory;_this1322.Name=Name;_this1322.Description=Description;_this1322.ApplicableOccurrence=ApplicableOccurrence;_this1322.HasPropertySets=HasPropertySets;_this1322.RepresentationMaps=RepresentationMaps;_this1322.Tag=Tag;_this1322.ElementType=ElementType;_this1322.PredefinedType=PredefinedType;_this1322.NominalDiameter=NominalDiameter;_this1322.NominalLength=NominalLength;_this1322.type=2108223431;return _this1322;}return _createClass(IfcMechanicalFastenerType);}(IfcElementComponentType);IFC42.IfcMechanicalFastenerType=IfcMechanicalFastenerType;var IfcMedicalDeviceType=/*#__PURE__*/function(_IfcFlowTerminalType14){_inherits(IfcMedicalDeviceType,_IfcFlowTerminalType14);var _super1326=_createSuper(IfcMedicalDeviceType);function IfcMedicalDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1323;_classCallCheck(this,IfcMedicalDeviceType);_this1323=_super1326.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1323.GlobalId=GlobalId;_this1323.OwnerHistory=OwnerHistory;_this1323.Name=Name;_this1323.Description=Description;_this1323.ApplicableOccurrence=ApplicableOccurrence;_this1323.HasPropertySets=HasPropertySets;_this1323.RepresentationMaps=RepresentationMaps;_this1323.Tag=Tag;_this1323.ElementType=ElementType;_this1323.PredefinedType=PredefinedType;_this1323.type=1114901282;return _this1323;}return _createClass(IfcMedicalDeviceType);}(IfcFlowTerminalType);IFC42.IfcMedicalDeviceType=IfcMedicalDeviceType;var IfcMemberType=/*#__PURE__*/function(_IfcBuildingElementTy19){_inherits(IfcMemberType,_IfcBuildingElementTy19);var _super1327=_createSuper(IfcMemberType);function IfcMemberType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1324;_classCallCheck(this,IfcMemberType);_this1324=_super1327.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1324.GlobalId=GlobalId;_this1324.OwnerHistory=OwnerHistory;_this1324.Name=Name;_this1324.Description=Description;_this1324.ApplicableOccurrence=ApplicableOccurrence;_this1324.HasPropertySets=HasPropertySets;_this1324.RepresentationMaps=RepresentationMaps;_this1324.Tag=Tag;_this1324.ElementType=ElementType;_this1324.PredefinedType=PredefinedType;_this1324.type=3181161470;return _this1324;}return _createClass(IfcMemberType);}(IfcBuildingElementType);IFC42.IfcMemberType=IfcMemberType;var IfcMotorConnectionType=/*#__PURE__*/function(_IfcEnergyConversionD24){_inherits(IfcMotorConnectionType,_IfcEnergyConversionD24);var _super1328=_createSuper(IfcMotorConnectionType);function IfcMotorConnectionType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1325;_classCallCheck(this,IfcMotorConnectionType);_this1325=_super1328.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1325.GlobalId=GlobalId;_this1325.OwnerHistory=OwnerHistory;_this1325.Name=Name;_this1325.Description=Description;_this1325.ApplicableOccurrence=ApplicableOccurrence;_this1325.HasPropertySets=HasPropertySets;_this1325.RepresentationMaps=RepresentationMaps;_this1325.Tag=Tag;_this1325.ElementType=ElementType;_this1325.PredefinedType=PredefinedType;_this1325.type=977012517;return _this1325;}return _createClass(IfcMotorConnectionType);}(IfcEnergyConversionDeviceType);IFC42.IfcMotorConnectionType=IfcMotorConnectionType;var IfcOccupant=/*#__PURE__*/function(_IfcActor2){_inherits(IfcOccupant,_IfcActor2);var _super1329=_createSuper(IfcOccupant);function IfcOccupant(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor,PredefinedType){var _this1326;_classCallCheck(this,IfcOccupant);_this1326=_super1329.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor);_this1326.GlobalId=GlobalId;_this1326.OwnerHistory=OwnerHistory;_this1326.Name=Name;_this1326.Description=Description;_this1326.ObjectType=ObjectType;_this1326.TheActor=TheActor;_this1326.PredefinedType=PredefinedType;_this1326.type=4143007308;return _this1326;}return _createClass(IfcOccupant);}(IfcActor);IFC42.IfcOccupant=IfcOccupant;var IfcOpeningElement=/*#__PURE__*/function(_IfcFeatureElementSub3){_inherits(IfcOpeningElement,_IfcFeatureElementSub3);var _super1330=_createSuper(IfcOpeningElement);function IfcOpeningElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1327;_classCallCheck(this,IfcOpeningElement);_this1327=_super1330.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1327.GlobalId=GlobalId;_this1327.OwnerHistory=OwnerHistory;_this1327.Name=Name;_this1327.Description=Description;_this1327.ObjectType=ObjectType;_this1327.ObjectPlacement=ObjectPlacement;_this1327.Representation=Representation;_this1327.Tag=Tag;_this1327.PredefinedType=PredefinedType;_this1327.type=3588315303;return _this1327;}return _createClass(IfcOpeningElement);}(IfcFeatureElementSubtraction);IFC42.IfcOpeningElement=IfcOpeningElement;var IfcOpeningStandardCase=/*#__PURE__*/function(_IfcOpeningElement){_inherits(IfcOpeningStandardCase,_IfcOpeningElement);var _super1331=_createSuper(IfcOpeningStandardCase);function IfcOpeningStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1328;_classCallCheck(this,IfcOpeningStandardCase);_this1328=_super1331.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1328.GlobalId=GlobalId;_this1328.OwnerHistory=OwnerHistory;_this1328.Name=Name;_this1328.Description=Description;_this1328.ObjectType=ObjectType;_this1328.ObjectPlacement=ObjectPlacement;_this1328.Representation=Representation;_this1328.Tag=Tag;_this1328.PredefinedType=PredefinedType;_this1328.type=3079942009;return _this1328;}return _createClass(IfcOpeningStandardCase);}(IfcOpeningElement);IFC42.IfcOpeningStandardCase=IfcOpeningStandardCase;var IfcOutletType=/*#__PURE__*/function(_IfcFlowTerminalType15){_inherits(IfcOutletType,_IfcFlowTerminalType15);var _super1332=_createSuper(IfcOutletType);function IfcOutletType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1329;_classCallCheck(this,IfcOutletType);_this1329=_super1332.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1329.GlobalId=GlobalId;_this1329.OwnerHistory=OwnerHistory;_this1329.Name=Name;_this1329.Description=Description;_this1329.ApplicableOccurrence=ApplicableOccurrence;_this1329.HasPropertySets=HasPropertySets;_this1329.RepresentationMaps=RepresentationMaps;_this1329.Tag=Tag;_this1329.ElementType=ElementType;_this1329.PredefinedType=PredefinedType;_this1329.type=2837617999;return _this1329;}return _createClass(IfcOutletType);}(IfcFlowTerminalType);IFC42.IfcOutletType=IfcOutletType;var IfcPerformanceHistory=/*#__PURE__*/function(_IfcControl18){_inherits(IfcPerformanceHistory,_IfcControl18);var _super1333=_createSuper(IfcPerformanceHistory);function IfcPerformanceHistory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LifeCyclePhase,PredefinedType){var _this1330;_classCallCheck(this,IfcPerformanceHistory);_this1330=_super1333.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1330.GlobalId=GlobalId;_this1330.OwnerHistory=OwnerHistory;_this1330.Name=Name;_this1330.Description=Description;_this1330.ObjectType=ObjectType;_this1330.Identification=Identification;_this1330.LifeCyclePhase=LifeCyclePhase;_this1330.PredefinedType=PredefinedType;_this1330.type=2382730787;return _this1330;}return _createClass(IfcPerformanceHistory);}(IfcControl);IFC42.IfcPerformanceHistory=IfcPerformanceHistory;var IfcPermeableCoveringProperties=/*#__PURE__*/function(_IfcPreDefinedPropert9){_inherits(IfcPermeableCoveringProperties,_IfcPreDefinedPropert9);var _super1334=_createSuper(IfcPermeableCoveringProperties);function IfcPermeableCoveringProperties(expressID,GlobalId,OwnerHistory,Name,Description,OperationType,PanelPosition,FrameDepth,FrameThickness,ShapeAspectStyle){var _this1331;_classCallCheck(this,IfcPermeableCoveringProperties);_this1331=_super1334.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1331.GlobalId=GlobalId;_this1331.OwnerHistory=OwnerHistory;_this1331.Name=Name;_this1331.Description=Description;_this1331.OperationType=OperationType;_this1331.PanelPosition=PanelPosition;_this1331.FrameDepth=FrameDepth;_this1331.FrameThickness=FrameThickness;_this1331.ShapeAspectStyle=ShapeAspectStyle;_this1331.type=3566463478;return _this1331;}return _createClass(IfcPermeableCoveringProperties);}(IfcPreDefinedPropertySet);IFC42.IfcPermeableCoveringProperties=IfcPermeableCoveringProperties;var IfcPermit=/*#__PURE__*/function(_IfcControl19){_inherits(IfcPermit,_IfcControl19);var _super1335=_createSuper(IfcPermit);function IfcPermit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,LongDescription){var _this1332;_classCallCheck(this,IfcPermit);_this1332=_super1335.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1332.GlobalId=GlobalId;_this1332.OwnerHistory=OwnerHistory;_this1332.Name=Name;_this1332.Description=Description;_this1332.ObjectType=ObjectType;_this1332.Identification=Identification;_this1332.PredefinedType=PredefinedType;_this1332.Status=Status;_this1332.LongDescription=LongDescription;_this1332.type=3327091369;return _this1332;}return _createClass(IfcPermit);}(IfcControl);IFC42.IfcPermit=IfcPermit;var IfcPileType=/*#__PURE__*/function(_IfcBuildingElementTy20){_inherits(IfcPileType,_IfcBuildingElementTy20);var _super1336=_createSuper(IfcPileType);function IfcPileType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1333;_classCallCheck(this,IfcPileType);_this1333=_super1336.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1333.GlobalId=GlobalId;_this1333.OwnerHistory=OwnerHistory;_this1333.Name=Name;_this1333.Description=Description;_this1333.ApplicableOccurrence=ApplicableOccurrence;_this1333.HasPropertySets=HasPropertySets;_this1333.RepresentationMaps=RepresentationMaps;_this1333.Tag=Tag;_this1333.ElementType=ElementType;_this1333.PredefinedType=PredefinedType;_this1333.type=1158309216;return _this1333;}return _createClass(IfcPileType);}(IfcBuildingElementType);IFC42.IfcPileType=IfcPileType;var IfcPipeFittingType=/*#__PURE__*/function(_IfcFlowFittingType6){_inherits(IfcPipeFittingType,_IfcFlowFittingType6);var _super1337=_createSuper(IfcPipeFittingType);function IfcPipeFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1334;_classCallCheck(this,IfcPipeFittingType);_this1334=_super1337.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1334.GlobalId=GlobalId;_this1334.OwnerHistory=OwnerHistory;_this1334.Name=Name;_this1334.Description=Description;_this1334.ApplicableOccurrence=ApplicableOccurrence;_this1334.HasPropertySets=HasPropertySets;_this1334.RepresentationMaps=RepresentationMaps;_this1334.Tag=Tag;_this1334.ElementType=ElementType;_this1334.PredefinedType=PredefinedType;_this1334.type=804291784;return _this1334;}return _createClass(IfcPipeFittingType);}(IfcFlowFittingType);IFC42.IfcPipeFittingType=IfcPipeFittingType;var IfcPipeSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType5){_inherits(IfcPipeSegmentType,_IfcFlowSegmentType5);var _super1338=_createSuper(IfcPipeSegmentType);function IfcPipeSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1335;_classCallCheck(this,IfcPipeSegmentType);_this1335=_super1338.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1335.GlobalId=GlobalId;_this1335.OwnerHistory=OwnerHistory;_this1335.Name=Name;_this1335.Description=Description;_this1335.ApplicableOccurrence=ApplicableOccurrence;_this1335.HasPropertySets=HasPropertySets;_this1335.RepresentationMaps=RepresentationMaps;_this1335.Tag=Tag;_this1335.ElementType=ElementType;_this1335.PredefinedType=PredefinedType;_this1335.type=4231323485;return _this1335;}return _createClass(IfcPipeSegmentType);}(IfcFlowSegmentType);IFC42.IfcPipeSegmentType=IfcPipeSegmentType;var IfcPlateType=/*#__PURE__*/function(_IfcBuildingElementTy21){_inherits(IfcPlateType,_IfcBuildingElementTy21);var _super1339=_createSuper(IfcPlateType);function IfcPlateType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1336;_classCallCheck(this,IfcPlateType);_this1336=_super1339.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1336.GlobalId=GlobalId;_this1336.OwnerHistory=OwnerHistory;_this1336.Name=Name;_this1336.Description=Description;_this1336.ApplicableOccurrence=ApplicableOccurrence;_this1336.HasPropertySets=HasPropertySets;_this1336.RepresentationMaps=RepresentationMaps;_this1336.Tag=Tag;_this1336.ElementType=ElementType;_this1336.PredefinedType=PredefinedType;_this1336.type=4017108033;return _this1336;}return _createClass(IfcPlateType);}(IfcBuildingElementType);IFC42.IfcPlateType=IfcPlateType;var IfcPolygonalFaceSet=/*#__PURE__*/function(_IfcTessellatedFaceSe2){_inherits(IfcPolygonalFaceSet,_IfcTessellatedFaceSe2);var _super1340=_createSuper(IfcPolygonalFaceSet);function IfcPolygonalFaceSet(expressID,Coordinates,Closed,Faces,PnIndex){var _this1337;_classCallCheck(this,IfcPolygonalFaceSet);_this1337=_super1340.call(this,expressID,Coordinates);_this1337.Coordinates=Coordinates;_this1337.Closed=Closed;_this1337.Faces=Faces;_this1337.PnIndex=PnIndex;_this1337.type=2839578677;return _this1337;}return _createClass(IfcPolygonalFaceSet);}(IfcTessellatedFaceSet);IFC42.IfcPolygonalFaceSet=IfcPolygonalFaceSet;var IfcPolyline=/*#__PURE__*/function(_IfcBoundedCurve7){_inherits(IfcPolyline,_IfcBoundedCurve7);var _super1341=_createSuper(IfcPolyline);function IfcPolyline(expressID,Points){var _this1338;_classCallCheck(this,IfcPolyline);_this1338=_super1341.call(this,expressID);_this1338.Points=Points;_this1338.type=3724593414;return _this1338;}return _createClass(IfcPolyline);}(IfcBoundedCurve);IFC42.IfcPolyline=IfcPolyline;var IfcPort=/*#__PURE__*/function(_IfcProduct16){_inherits(IfcPort,_IfcProduct16);var _super1342=_createSuper(IfcPort);function IfcPort(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this1339;_classCallCheck(this,IfcPort);_this1339=_super1342.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1339.GlobalId=GlobalId;_this1339.OwnerHistory=OwnerHistory;_this1339.Name=Name;_this1339.Description=Description;_this1339.ObjectType=ObjectType;_this1339.ObjectPlacement=ObjectPlacement;_this1339.Representation=Representation;_this1339.type=3740093272;return _this1339;}return _createClass(IfcPort);}(IfcProduct);IFC42.IfcPort=IfcPort;var IfcProcedure=/*#__PURE__*/function(_IfcProcess5){_inherits(IfcProcedure,_IfcProcess5);var _super1343=_createSuper(IfcProcedure);function IfcProcedure(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,PredefinedType){var _this1340;_classCallCheck(this,IfcProcedure);_this1340=_super1343.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this1340.GlobalId=GlobalId;_this1340.OwnerHistory=OwnerHistory;_this1340.Name=Name;_this1340.Description=Description;_this1340.ObjectType=ObjectType;_this1340.Identification=Identification;_this1340.LongDescription=LongDescription;_this1340.PredefinedType=PredefinedType;_this1340.type=2744685151;return _this1340;}return _createClass(IfcProcedure);}(IfcProcess);IFC42.IfcProcedure=IfcProcedure;var IfcProjectOrder=/*#__PURE__*/function(_IfcControl20){_inherits(IfcProjectOrder,_IfcControl20);var _super1344=_createSuper(IfcProjectOrder);function IfcProjectOrder(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,LongDescription){var _this1341;_classCallCheck(this,IfcProjectOrder);_this1341=_super1344.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1341.GlobalId=GlobalId;_this1341.OwnerHistory=OwnerHistory;_this1341.Name=Name;_this1341.Description=Description;_this1341.ObjectType=ObjectType;_this1341.Identification=Identification;_this1341.PredefinedType=PredefinedType;_this1341.Status=Status;_this1341.LongDescription=LongDescription;_this1341.type=2904328755;return _this1341;}return _createClass(IfcProjectOrder);}(IfcControl);IFC42.IfcProjectOrder=IfcProjectOrder;var IfcProjectionElement=/*#__PURE__*/function(_IfcFeatureElementAdd2){_inherits(IfcProjectionElement,_IfcFeatureElementAdd2);var _super1345=_createSuper(IfcProjectionElement);function IfcProjectionElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1342;_classCallCheck(this,IfcProjectionElement);_this1342=_super1345.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1342.GlobalId=GlobalId;_this1342.OwnerHistory=OwnerHistory;_this1342.Name=Name;_this1342.Description=Description;_this1342.ObjectType=ObjectType;_this1342.ObjectPlacement=ObjectPlacement;_this1342.Representation=Representation;_this1342.Tag=Tag;_this1342.PredefinedType=PredefinedType;_this1342.type=3651124850;return _this1342;}return _createClass(IfcProjectionElement);}(IfcFeatureElementAddition);IFC42.IfcProjectionElement=IfcProjectionElement;var IfcProtectiveDeviceType=/*#__PURE__*/function(_IfcFlowControllerTyp9){_inherits(IfcProtectiveDeviceType,_IfcFlowControllerTyp9);var _super1346=_createSuper(IfcProtectiveDeviceType);function IfcProtectiveDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1343;_classCallCheck(this,IfcProtectiveDeviceType);_this1343=_super1346.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1343.GlobalId=GlobalId;_this1343.OwnerHistory=OwnerHistory;_this1343.Name=Name;_this1343.Description=Description;_this1343.ApplicableOccurrence=ApplicableOccurrence;_this1343.HasPropertySets=HasPropertySets;_this1343.RepresentationMaps=RepresentationMaps;_this1343.Tag=Tag;_this1343.ElementType=ElementType;_this1343.PredefinedType=PredefinedType;_this1343.type=1842657554;return _this1343;}return _createClass(IfcProtectiveDeviceType);}(IfcFlowControllerType);IFC42.IfcProtectiveDeviceType=IfcProtectiveDeviceType;var IfcPumpType=/*#__PURE__*/function(_IfcFlowMovingDeviceT4){_inherits(IfcPumpType,_IfcFlowMovingDeviceT4);var _super1347=_createSuper(IfcPumpType);function IfcPumpType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1344;_classCallCheck(this,IfcPumpType);_this1344=_super1347.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1344.GlobalId=GlobalId;_this1344.OwnerHistory=OwnerHistory;_this1344.Name=Name;_this1344.Description=Description;_this1344.ApplicableOccurrence=ApplicableOccurrence;_this1344.HasPropertySets=HasPropertySets;_this1344.RepresentationMaps=RepresentationMaps;_this1344.Tag=Tag;_this1344.ElementType=ElementType;_this1344.PredefinedType=PredefinedType;_this1344.type=2250791053;return _this1344;}return _createClass(IfcPumpType);}(IfcFlowMovingDeviceType);IFC42.IfcPumpType=IfcPumpType;var IfcRailingType=/*#__PURE__*/function(_IfcBuildingElementTy22){_inherits(IfcRailingType,_IfcBuildingElementTy22);var _super1348=_createSuper(IfcRailingType);function IfcRailingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1345;_classCallCheck(this,IfcRailingType);_this1345=_super1348.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1345.GlobalId=GlobalId;_this1345.OwnerHistory=OwnerHistory;_this1345.Name=Name;_this1345.Description=Description;_this1345.ApplicableOccurrence=ApplicableOccurrence;_this1345.HasPropertySets=HasPropertySets;_this1345.RepresentationMaps=RepresentationMaps;_this1345.Tag=Tag;_this1345.ElementType=ElementType;_this1345.PredefinedType=PredefinedType;_this1345.type=2893384427;return _this1345;}return _createClass(IfcRailingType);}(IfcBuildingElementType);IFC42.IfcRailingType=IfcRailingType;var IfcRampFlightType=/*#__PURE__*/function(_IfcBuildingElementTy23){_inherits(IfcRampFlightType,_IfcBuildingElementTy23);var _super1349=_createSuper(IfcRampFlightType);function IfcRampFlightType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1346;_classCallCheck(this,IfcRampFlightType);_this1346=_super1349.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1346.GlobalId=GlobalId;_this1346.OwnerHistory=OwnerHistory;_this1346.Name=Name;_this1346.Description=Description;_this1346.ApplicableOccurrence=ApplicableOccurrence;_this1346.HasPropertySets=HasPropertySets;_this1346.RepresentationMaps=RepresentationMaps;_this1346.Tag=Tag;_this1346.ElementType=ElementType;_this1346.PredefinedType=PredefinedType;_this1346.type=2324767716;return _this1346;}return _createClass(IfcRampFlightType);}(IfcBuildingElementType);IFC42.IfcRampFlightType=IfcRampFlightType;var IfcRampType=/*#__PURE__*/function(_IfcBuildingElementTy24){_inherits(IfcRampType,_IfcBuildingElementTy24);var _super1350=_createSuper(IfcRampType);function IfcRampType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1347;_classCallCheck(this,IfcRampType);_this1347=_super1350.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1347.GlobalId=GlobalId;_this1347.OwnerHistory=OwnerHistory;_this1347.Name=Name;_this1347.Description=Description;_this1347.ApplicableOccurrence=ApplicableOccurrence;_this1347.HasPropertySets=HasPropertySets;_this1347.RepresentationMaps=RepresentationMaps;_this1347.Tag=Tag;_this1347.ElementType=ElementType;_this1347.PredefinedType=PredefinedType;_this1347.type=1469900589;return _this1347;}return _createClass(IfcRampType);}(IfcBuildingElementType);IFC42.IfcRampType=IfcRampType;var IfcRationalBSplineSurfaceWithKnots=/*#__PURE__*/function(_IfcBSplineSurfaceWit){_inherits(IfcRationalBSplineSurfaceWithKnots,_IfcBSplineSurfaceWit);var _super1351=_createSuper(IfcRationalBSplineSurfaceWithKnots);function IfcRationalBSplineSurfaceWithKnots(expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect,UMultiplicities,VMultiplicities,UKnots,VKnots,KnotSpec,WeightsData){var _this1348;_classCallCheck(this,IfcRationalBSplineSurfaceWithKnots);_this1348=_super1351.call(this,expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect,UMultiplicities,VMultiplicities,UKnots,VKnots,KnotSpec);_this1348.UDegree=UDegree;_this1348.VDegree=VDegree;_this1348.ControlPointsList=ControlPointsList;_this1348.SurfaceForm=SurfaceForm;_this1348.UClosed=UClosed;_this1348.VClosed=VClosed;_this1348.SelfIntersect=SelfIntersect;_this1348.UMultiplicities=UMultiplicities;_this1348.VMultiplicities=VMultiplicities;_this1348.UKnots=UKnots;_this1348.VKnots=VKnots;_this1348.KnotSpec=KnotSpec;_this1348.WeightsData=WeightsData;_this1348.type=683857671;return _this1348;}return _createClass(IfcRationalBSplineSurfaceWithKnots);}(IfcBSplineSurfaceWithKnots);IFC42.IfcRationalBSplineSurfaceWithKnots=IfcRationalBSplineSurfaceWithKnots;var IfcReinforcingElement=/*#__PURE__*/function(_IfcElementComponent5){_inherits(IfcReinforcingElement,_IfcElementComponent5);var _super1352=_createSuper(IfcReinforcingElement);function IfcReinforcingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade){var _this1349;_classCallCheck(this,IfcReinforcingElement);_this1349=_super1352.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1349.GlobalId=GlobalId;_this1349.OwnerHistory=OwnerHistory;_this1349.Name=Name;_this1349.Description=Description;_this1349.ObjectType=ObjectType;_this1349.ObjectPlacement=ObjectPlacement;_this1349.Representation=Representation;_this1349.Tag=Tag;_this1349.SteelGrade=SteelGrade;_this1349.type=3027567501;return _this1349;}return _createClass(IfcReinforcingElement);}(IfcElementComponent);IFC42.IfcReinforcingElement=IfcReinforcingElement;var IfcReinforcingElementType=/*#__PURE__*/function(_IfcElementComponentT5){_inherits(IfcReinforcingElementType,_IfcElementComponentT5);var _super1353=_createSuper(IfcReinforcingElementType);function IfcReinforcingElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1350;_classCallCheck(this,IfcReinforcingElementType);_this1350=_super1353.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1350.GlobalId=GlobalId;_this1350.OwnerHistory=OwnerHistory;_this1350.Name=Name;_this1350.Description=Description;_this1350.ApplicableOccurrence=ApplicableOccurrence;_this1350.HasPropertySets=HasPropertySets;_this1350.RepresentationMaps=RepresentationMaps;_this1350.Tag=Tag;_this1350.ElementType=ElementType;_this1350.type=964333572;return _this1350;}return _createClass(IfcReinforcingElementType);}(IfcElementComponentType);IFC42.IfcReinforcingElementType=IfcReinforcingElementType;var IfcReinforcingMesh=/*#__PURE__*/function(_IfcReinforcingElemen5){_inherits(IfcReinforcingMesh,_IfcReinforcingElemen5);var _super1354=_createSuper(IfcReinforcingMesh);function IfcReinforcingMesh(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,MeshLength,MeshWidth,LongitudinalBarNominalDiameter,TransverseBarNominalDiameter,LongitudinalBarCrossSectionArea,TransverseBarCrossSectionArea,LongitudinalBarSpacing,TransverseBarSpacing,PredefinedType){var _this1351;_classCallCheck(this,IfcReinforcingMesh);_this1351=_super1354.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this1351.GlobalId=GlobalId;_this1351.OwnerHistory=OwnerHistory;_this1351.Name=Name;_this1351.Description=Description;_this1351.ObjectType=ObjectType;_this1351.ObjectPlacement=ObjectPlacement;_this1351.Representation=Representation;_this1351.Tag=Tag;_this1351.SteelGrade=SteelGrade;_this1351.MeshLength=MeshLength;_this1351.MeshWidth=MeshWidth;_this1351.LongitudinalBarNominalDiameter=LongitudinalBarNominalDiameter;_this1351.TransverseBarNominalDiameter=TransverseBarNominalDiameter;_this1351.LongitudinalBarCrossSectionArea=LongitudinalBarCrossSectionArea;_this1351.TransverseBarCrossSectionArea=TransverseBarCrossSectionArea;_this1351.LongitudinalBarSpacing=LongitudinalBarSpacing;_this1351.TransverseBarSpacing=TransverseBarSpacing;_this1351.PredefinedType=PredefinedType;_this1351.type=2320036040;return _this1351;}return _createClass(IfcReinforcingMesh);}(IfcReinforcingElement);IFC42.IfcReinforcingMesh=IfcReinforcingMesh;var IfcReinforcingMeshType=/*#__PURE__*/function(_IfcReinforcingElemen6){_inherits(IfcReinforcingMeshType,_IfcReinforcingElemen6);var _super1355=_createSuper(IfcReinforcingMeshType);function IfcReinforcingMeshType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,MeshLength,MeshWidth,LongitudinalBarNominalDiameter,TransverseBarNominalDiameter,LongitudinalBarCrossSectionArea,TransverseBarCrossSectionArea,LongitudinalBarSpacing,TransverseBarSpacing,BendingShapeCode,BendingParameters){var _this1352;_classCallCheck(this,IfcReinforcingMeshType);_this1352=_super1355.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1352.GlobalId=GlobalId;_this1352.OwnerHistory=OwnerHistory;_this1352.Name=Name;_this1352.Description=Description;_this1352.ApplicableOccurrence=ApplicableOccurrence;_this1352.HasPropertySets=HasPropertySets;_this1352.RepresentationMaps=RepresentationMaps;_this1352.Tag=Tag;_this1352.ElementType=ElementType;_this1352.PredefinedType=PredefinedType;_this1352.MeshLength=MeshLength;_this1352.MeshWidth=MeshWidth;_this1352.LongitudinalBarNominalDiameter=LongitudinalBarNominalDiameter;_this1352.TransverseBarNominalDiameter=TransverseBarNominalDiameter;_this1352.LongitudinalBarCrossSectionArea=LongitudinalBarCrossSectionArea;_this1352.TransverseBarCrossSectionArea=TransverseBarCrossSectionArea;_this1352.LongitudinalBarSpacing=LongitudinalBarSpacing;_this1352.TransverseBarSpacing=TransverseBarSpacing;_this1352.BendingShapeCode=BendingShapeCode;_this1352.BendingParameters=BendingParameters;_this1352.type=2310774935;return _this1352;}return _createClass(IfcReinforcingMeshType);}(IfcReinforcingElementType);IFC42.IfcReinforcingMeshType=IfcReinforcingMeshType;var IfcRelAggregates=/*#__PURE__*/function(_IfcRelDecomposes6){_inherits(IfcRelAggregates,_IfcRelDecomposes6);var _super1356=_createSuper(IfcRelAggregates);function IfcRelAggregates(expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects){var _this1353;_classCallCheck(this,IfcRelAggregates);_this1353=_super1356.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1353.GlobalId=GlobalId;_this1353.OwnerHistory=OwnerHistory;_this1353.Name=Name;_this1353.Description=Description;_this1353.RelatingObject=RelatingObject;_this1353.RelatedObjects=RelatedObjects;_this1353.type=160246688;return _this1353;}return _createClass(IfcRelAggregates);}(IfcRelDecomposes);IFC42.IfcRelAggregates=IfcRelAggregates;var IfcRoofType=/*#__PURE__*/function(_IfcBuildingElementTy25){_inherits(IfcRoofType,_IfcBuildingElementTy25);var _super1357=_createSuper(IfcRoofType);function IfcRoofType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1354;_classCallCheck(this,IfcRoofType);_this1354=_super1357.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1354.GlobalId=GlobalId;_this1354.OwnerHistory=OwnerHistory;_this1354.Name=Name;_this1354.Description=Description;_this1354.ApplicableOccurrence=ApplicableOccurrence;_this1354.HasPropertySets=HasPropertySets;_this1354.RepresentationMaps=RepresentationMaps;_this1354.Tag=Tag;_this1354.ElementType=ElementType;_this1354.PredefinedType=PredefinedType;_this1354.type=2781568857;return _this1354;}return _createClass(IfcRoofType);}(IfcBuildingElementType);IFC42.IfcRoofType=IfcRoofType;var IfcSanitaryTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType16){_inherits(IfcSanitaryTerminalType,_IfcFlowTerminalType16);var _super1358=_createSuper(IfcSanitaryTerminalType);function IfcSanitaryTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1355;_classCallCheck(this,IfcSanitaryTerminalType);_this1355=_super1358.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1355.GlobalId=GlobalId;_this1355.OwnerHistory=OwnerHistory;_this1355.Name=Name;_this1355.Description=Description;_this1355.ApplicableOccurrence=ApplicableOccurrence;_this1355.HasPropertySets=HasPropertySets;_this1355.RepresentationMaps=RepresentationMaps;_this1355.Tag=Tag;_this1355.ElementType=ElementType;_this1355.PredefinedType=PredefinedType;_this1355.type=1768891740;return _this1355;}return _createClass(IfcSanitaryTerminalType);}(IfcFlowTerminalType);IFC42.IfcSanitaryTerminalType=IfcSanitaryTerminalType;var IfcSeamCurve=/*#__PURE__*/function(_IfcSurfaceCurve2){_inherits(IfcSeamCurve,_IfcSurfaceCurve2);var _super1359=_createSuper(IfcSeamCurve);function IfcSeamCurve(expressID,Curve3D,AssociatedGeometry,MasterRepresentation){var _this1356;_classCallCheck(this,IfcSeamCurve);_this1356=_super1359.call(this,expressID,Curve3D,AssociatedGeometry,MasterRepresentation);_this1356.Curve3D=Curve3D;_this1356.AssociatedGeometry=AssociatedGeometry;_this1356.MasterRepresentation=MasterRepresentation;_this1356.type=2157484638;return _this1356;}return _createClass(IfcSeamCurve);}(IfcSurfaceCurve);IFC42.IfcSeamCurve=IfcSeamCurve;var IfcShadingDeviceType=/*#__PURE__*/function(_IfcBuildingElementTy26){_inherits(IfcShadingDeviceType,_IfcBuildingElementTy26);var _super1360=_createSuper(IfcShadingDeviceType);function IfcShadingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1357;_classCallCheck(this,IfcShadingDeviceType);_this1357=_super1360.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1357.GlobalId=GlobalId;_this1357.OwnerHistory=OwnerHistory;_this1357.Name=Name;_this1357.Description=Description;_this1357.ApplicableOccurrence=ApplicableOccurrence;_this1357.HasPropertySets=HasPropertySets;_this1357.RepresentationMaps=RepresentationMaps;_this1357.Tag=Tag;_this1357.ElementType=ElementType;_this1357.PredefinedType=PredefinedType;_this1357.type=4074543187;return _this1357;}return _createClass(IfcShadingDeviceType);}(IfcBuildingElementType);IFC42.IfcShadingDeviceType=IfcShadingDeviceType;var IfcSite=/*#__PURE__*/function(_IfcSpatialStructureE8){_inherits(IfcSite,_IfcSpatialStructureE8);var _super1361=_createSuper(IfcSite);function IfcSite(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,RefLatitude,RefLongitude,RefElevation,LandTitleNumber,SiteAddress){var _this1358;_classCallCheck(this,IfcSite);_this1358=_super1361.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this1358.GlobalId=GlobalId;_this1358.OwnerHistory=OwnerHistory;_this1358.Name=Name;_this1358.Description=Description;_this1358.ObjectType=ObjectType;_this1358.ObjectPlacement=ObjectPlacement;_this1358.Representation=Representation;_this1358.LongName=LongName;_this1358.CompositionType=CompositionType;_this1358.RefLatitude=RefLatitude;_this1358.RefLongitude=RefLongitude;_this1358.RefElevation=RefElevation;_this1358.LandTitleNumber=LandTitleNumber;_this1358.SiteAddress=SiteAddress;_this1358.type=4097777520;return _this1358;}return _createClass(IfcSite);}(IfcSpatialStructureElement);IFC42.IfcSite=IfcSite;var IfcSlabType=/*#__PURE__*/function(_IfcBuildingElementTy27){_inherits(IfcSlabType,_IfcBuildingElementTy27);var _super1362=_createSuper(IfcSlabType);function IfcSlabType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1359;_classCallCheck(this,IfcSlabType);_this1359=_super1362.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1359.GlobalId=GlobalId;_this1359.OwnerHistory=OwnerHistory;_this1359.Name=Name;_this1359.Description=Description;_this1359.ApplicableOccurrence=ApplicableOccurrence;_this1359.HasPropertySets=HasPropertySets;_this1359.RepresentationMaps=RepresentationMaps;_this1359.Tag=Tag;_this1359.ElementType=ElementType;_this1359.PredefinedType=PredefinedType;_this1359.type=2533589738;return _this1359;}return _createClass(IfcSlabType);}(IfcBuildingElementType);IFC42.IfcSlabType=IfcSlabType;var IfcSolarDeviceType=/*#__PURE__*/function(_IfcEnergyConversionD25){_inherits(IfcSolarDeviceType,_IfcEnergyConversionD25);var _super1363=_createSuper(IfcSolarDeviceType);function IfcSolarDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1360;_classCallCheck(this,IfcSolarDeviceType);_this1360=_super1363.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1360.GlobalId=GlobalId;_this1360.OwnerHistory=OwnerHistory;_this1360.Name=Name;_this1360.Description=Description;_this1360.ApplicableOccurrence=ApplicableOccurrence;_this1360.HasPropertySets=HasPropertySets;_this1360.RepresentationMaps=RepresentationMaps;_this1360.Tag=Tag;_this1360.ElementType=ElementType;_this1360.PredefinedType=PredefinedType;_this1360.type=1072016465;return _this1360;}return _createClass(IfcSolarDeviceType);}(IfcEnergyConversionDeviceType);IFC42.IfcSolarDeviceType=IfcSolarDeviceType;var IfcSpace=/*#__PURE__*/function(_IfcSpatialStructureE9){_inherits(IfcSpace,_IfcSpatialStructureE9);var _super1364=_createSuper(IfcSpace);function IfcSpace(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,PredefinedType,ElevationWithFlooring){var _this1361;_classCallCheck(this,IfcSpace);_this1361=_super1364.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this1361.GlobalId=GlobalId;_this1361.OwnerHistory=OwnerHistory;_this1361.Name=Name;_this1361.Description=Description;_this1361.ObjectType=ObjectType;_this1361.ObjectPlacement=ObjectPlacement;_this1361.Representation=Representation;_this1361.LongName=LongName;_this1361.CompositionType=CompositionType;_this1361.PredefinedType=PredefinedType;_this1361.ElevationWithFlooring=ElevationWithFlooring;_this1361.type=3856911033;return _this1361;}return _createClass(IfcSpace);}(IfcSpatialStructureElement);IFC42.IfcSpace=IfcSpace;var IfcSpaceHeaterType=/*#__PURE__*/function(_IfcFlowTerminalType17){_inherits(IfcSpaceHeaterType,_IfcFlowTerminalType17);var _super1365=_createSuper(IfcSpaceHeaterType);function IfcSpaceHeaterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1362;_classCallCheck(this,IfcSpaceHeaterType);_this1362=_super1365.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1362.GlobalId=GlobalId;_this1362.OwnerHistory=OwnerHistory;_this1362.Name=Name;_this1362.Description=Description;_this1362.ApplicableOccurrence=ApplicableOccurrence;_this1362.HasPropertySets=HasPropertySets;_this1362.RepresentationMaps=RepresentationMaps;_this1362.Tag=Tag;_this1362.ElementType=ElementType;_this1362.PredefinedType=PredefinedType;_this1362.type=1305183839;return _this1362;}return _createClass(IfcSpaceHeaterType);}(IfcFlowTerminalType);IFC42.IfcSpaceHeaterType=IfcSpaceHeaterType;var IfcSpaceType=/*#__PURE__*/function(_IfcSpatialStructureE10){_inherits(IfcSpaceType,_IfcSpatialStructureE10);var _super1366=_createSuper(IfcSpaceType);function IfcSpaceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,LongName){var _this1363;_classCallCheck(this,IfcSpaceType);_this1363=_super1366.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1363.GlobalId=GlobalId;_this1363.OwnerHistory=OwnerHistory;_this1363.Name=Name;_this1363.Description=Description;_this1363.ApplicableOccurrence=ApplicableOccurrence;_this1363.HasPropertySets=HasPropertySets;_this1363.RepresentationMaps=RepresentationMaps;_this1363.Tag=Tag;_this1363.ElementType=ElementType;_this1363.PredefinedType=PredefinedType;_this1363.LongName=LongName;_this1363.type=3812236995;return _this1363;}return _createClass(IfcSpaceType);}(IfcSpatialStructureElementType);IFC42.IfcSpaceType=IfcSpaceType;var IfcStackTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType18){_inherits(IfcStackTerminalType,_IfcFlowTerminalType18);var _super1367=_createSuper(IfcStackTerminalType);function IfcStackTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1364;_classCallCheck(this,IfcStackTerminalType);_this1364=_super1367.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1364.GlobalId=GlobalId;_this1364.OwnerHistory=OwnerHistory;_this1364.Name=Name;_this1364.Description=Description;_this1364.ApplicableOccurrence=ApplicableOccurrence;_this1364.HasPropertySets=HasPropertySets;_this1364.RepresentationMaps=RepresentationMaps;_this1364.Tag=Tag;_this1364.ElementType=ElementType;_this1364.PredefinedType=PredefinedType;_this1364.type=3112655638;return _this1364;}return _createClass(IfcStackTerminalType);}(IfcFlowTerminalType);IFC42.IfcStackTerminalType=IfcStackTerminalType;var IfcStairFlightType=/*#__PURE__*/function(_IfcBuildingElementTy28){_inherits(IfcStairFlightType,_IfcBuildingElementTy28);var _super1368=_createSuper(IfcStairFlightType);function IfcStairFlightType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1365;_classCallCheck(this,IfcStairFlightType);_this1365=_super1368.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1365.GlobalId=GlobalId;_this1365.OwnerHistory=OwnerHistory;_this1365.Name=Name;_this1365.Description=Description;_this1365.ApplicableOccurrence=ApplicableOccurrence;_this1365.HasPropertySets=HasPropertySets;_this1365.RepresentationMaps=RepresentationMaps;_this1365.Tag=Tag;_this1365.ElementType=ElementType;_this1365.PredefinedType=PredefinedType;_this1365.type=1039846685;return _this1365;}return _createClass(IfcStairFlightType);}(IfcBuildingElementType);IFC42.IfcStairFlightType=IfcStairFlightType;var IfcStairType=/*#__PURE__*/function(_IfcBuildingElementTy29){_inherits(IfcStairType,_IfcBuildingElementTy29);var _super1369=_createSuper(IfcStairType);function IfcStairType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1366;_classCallCheck(this,IfcStairType);_this1366=_super1369.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1366.GlobalId=GlobalId;_this1366.OwnerHistory=OwnerHistory;_this1366.Name=Name;_this1366.Description=Description;_this1366.ApplicableOccurrence=ApplicableOccurrence;_this1366.HasPropertySets=HasPropertySets;_this1366.RepresentationMaps=RepresentationMaps;_this1366.Tag=Tag;_this1366.ElementType=ElementType;_this1366.PredefinedType=PredefinedType;_this1366.type=338393293;return _this1366;}return _createClass(IfcStairType);}(IfcBuildingElementType);IFC42.IfcStairType=IfcStairType;var IfcStructuralAction=/*#__PURE__*/function(_IfcStructuralActivit4){_inherits(IfcStructuralAction,_IfcStructuralActivit4);var _super1370=_createSuper(IfcStructuralAction);function IfcStructuralAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad){var _this1367;_classCallCheck(this,IfcStructuralAction);_this1367=_super1370.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this1367.GlobalId=GlobalId;_this1367.OwnerHistory=OwnerHistory;_this1367.Name=Name;_this1367.Description=Description;_this1367.ObjectType=ObjectType;_this1367.ObjectPlacement=ObjectPlacement;_this1367.Representation=Representation;_this1367.AppliedLoad=AppliedLoad;_this1367.GlobalOrLocal=GlobalOrLocal;_this1367.DestabilizingLoad=DestabilizingLoad;_this1367.type=682877961;return _this1367;}return _createClass(IfcStructuralAction);}(IfcStructuralActivity);IFC42.IfcStructuralAction=IfcStructuralAction;var IfcStructuralConnection=/*#__PURE__*/function(_IfcStructuralItem4){_inherits(IfcStructuralConnection,_IfcStructuralItem4);var _super1371=_createSuper(IfcStructuralConnection);function IfcStructuralConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this1368;_classCallCheck(this,IfcStructuralConnection);_this1368=_super1371.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1368.GlobalId=GlobalId;_this1368.OwnerHistory=OwnerHistory;_this1368.Name=Name;_this1368.Description=Description;_this1368.ObjectType=ObjectType;_this1368.ObjectPlacement=ObjectPlacement;_this1368.Representation=Representation;_this1368.AppliedCondition=AppliedCondition;_this1368.type=1179482911;return _this1368;}return _createClass(IfcStructuralConnection);}(IfcStructuralItem);IFC42.IfcStructuralConnection=IfcStructuralConnection;var IfcStructuralCurveAction=/*#__PURE__*/function(_IfcStructuralAction4){_inherits(IfcStructuralCurveAction,_IfcStructuralAction4);var _super1372=_createSuper(IfcStructuralCurveAction);function IfcStructuralCurveAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this1369;_classCallCheck(this,IfcStructuralCurveAction);_this1369=_super1372.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad);_this1369.GlobalId=GlobalId;_this1369.OwnerHistory=OwnerHistory;_this1369.Name=Name;_this1369.Description=Description;_this1369.ObjectType=ObjectType;_this1369.ObjectPlacement=ObjectPlacement;_this1369.Representation=Representation;_this1369.AppliedLoad=AppliedLoad;_this1369.GlobalOrLocal=GlobalOrLocal;_this1369.DestabilizingLoad=DestabilizingLoad;_this1369.ProjectedOrTrue=ProjectedOrTrue;_this1369.PredefinedType=PredefinedType;_this1369.type=1004757350;return _this1369;}return _createClass(IfcStructuralCurveAction);}(IfcStructuralAction);IFC42.IfcStructuralCurveAction=IfcStructuralCurveAction;var IfcStructuralCurveConnection=/*#__PURE__*/function(_IfcStructuralConnect8){_inherits(IfcStructuralCurveConnection,_IfcStructuralConnect8);var _super1373=_createSuper(IfcStructuralCurveConnection);function IfcStructuralCurveConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition,Axis){var _this1370;_classCallCheck(this,IfcStructuralCurveConnection);_this1370=_super1373.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this1370.GlobalId=GlobalId;_this1370.OwnerHistory=OwnerHistory;_this1370.Name=Name;_this1370.Description=Description;_this1370.ObjectType=ObjectType;_this1370.ObjectPlacement=ObjectPlacement;_this1370.Representation=Representation;_this1370.AppliedCondition=AppliedCondition;_this1370.Axis=Axis;_this1370.type=4243806635;return _this1370;}return _createClass(IfcStructuralCurveConnection);}(IfcStructuralConnection);IFC42.IfcStructuralCurveConnection=IfcStructuralCurveConnection;var IfcStructuralCurveMember=/*#__PURE__*/function(_IfcStructuralMember4){_inherits(IfcStructuralCurveMember,_IfcStructuralMember4);var _super1374=_createSuper(IfcStructuralCurveMember);function IfcStructuralCurveMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Axis){var _this1371;_classCallCheck(this,IfcStructuralCurveMember);_this1371=_super1374.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1371.GlobalId=GlobalId;_this1371.OwnerHistory=OwnerHistory;_this1371.Name=Name;_this1371.Description=Description;_this1371.ObjectType=ObjectType;_this1371.ObjectPlacement=ObjectPlacement;_this1371.Representation=Representation;_this1371.PredefinedType=PredefinedType;_this1371.Axis=Axis;_this1371.type=214636428;return _this1371;}return _createClass(IfcStructuralCurveMember);}(IfcStructuralMember);IFC42.IfcStructuralCurveMember=IfcStructuralCurveMember;var IfcStructuralCurveMemberVarying=/*#__PURE__*/function(_IfcStructuralCurveMe2){_inherits(IfcStructuralCurveMemberVarying,_IfcStructuralCurveMe2);var _super1375=_createSuper(IfcStructuralCurveMemberVarying);function IfcStructuralCurveMemberVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Axis){var _this1372;_classCallCheck(this,IfcStructuralCurveMemberVarying);_this1372=_super1375.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Axis);_this1372.GlobalId=GlobalId;_this1372.OwnerHistory=OwnerHistory;_this1372.Name=Name;_this1372.Description=Description;_this1372.ObjectType=ObjectType;_this1372.ObjectPlacement=ObjectPlacement;_this1372.Representation=Representation;_this1372.PredefinedType=PredefinedType;_this1372.Axis=Axis;_this1372.type=2445595289;return _this1372;}return _createClass(IfcStructuralCurveMemberVarying);}(IfcStructuralCurveMember);IFC42.IfcStructuralCurveMemberVarying=IfcStructuralCurveMemberVarying;var IfcStructuralCurveReaction=/*#__PURE__*/function(_IfcStructuralReactio3){_inherits(IfcStructuralCurveReaction,_IfcStructuralReactio3);var _super1376=_createSuper(IfcStructuralCurveReaction);function IfcStructuralCurveReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,PredefinedType){var _this1373;_classCallCheck(this,IfcStructuralCurveReaction);_this1373=_super1376.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this1373.GlobalId=GlobalId;_this1373.OwnerHistory=OwnerHistory;_this1373.Name=Name;_this1373.Description=Description;_this1373.ObjectType=ObjectType;_this1373.ObjectPlacement=ObjectPlacement;_this1373.Representation=Representation;_this1373.AppliedLoad=AppliedLoad;_this1373.GlobalOrLocal=GlobalOrLocal;_this1373.PredefinedType=PredefinedType;_this1373.type=2757150158;return _this1373;}return _createClass(IfcStructuralCurveReaction);}(IfcStructuralReaction);IFC42.IfcStructuralCurveReaction=IfcStructuralCurveReaction;var IfcStructuralLinearAction=/*#__PURE__*/function(_IfcStructuralCurveAc){_inherits(IfcStructuralLinearAction,_IfcStructuralCurveAc);var _super1377=_createSuper(IfcStructuralLinearAction);function IfcStructuralLinearAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this1374;_classCallCheck(this,IfcStructuralLinearAction);_this1374=_super1377.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType);_this1374.GlobalId=GlobalId;_this1374.OwnerHistory=OwnerHistory;_this1374.Name=Name;_this1374.Description=Description;_this1374.ObjectType=ObjectType;_this1374.ObjectPlacement=ObjectPlacement;_this1374.Representation=Representation;_this1374.AppliedLoad=AppliedLoad;_this1374.GlobalOrLocal=GlobalOrLocal;_this1374.DestabilizingLoad=DestabilizingLoad;_this1374.ProjectedOrTrue=ProjectedOrTrue;_this1374.PredefinedType=PredefinedType;_this1374.type=1807405624;return _this1374;}return _createClass(IfcStructuralLinearAction);}(IfcStructuralCurveAction);IFC42.IfcStructuralLinearAction=IfcStructuralLinearAction;var IfcStructuralLoadGroup=/*#__PURE__*/function(_IfcGroup9){_inherits(IfcStructuralLoadGroup,_IfcGroup9);var _super1378=_createSuper(IfcStructuralLoadGroup);function IfcStructuralLoadGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,ActionType,ActionSource,Coefficient,Purpose){var _this1375;_classCallCheck(this,IfcStructuralLoadGroup);_this1375=_super1378.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1375.GlobalId=GlobalId;_this1375.OwnerHistory=OwnerHistory;_this1375.Name=Name;_this1375.Description=Description;_this1375.ObjectType=ObjectType;_this1375.PredefinedType=PredefinedType;_this1375.ActionType=ActionType;_this1375.ActionSource=ActionSource;_this1375.Coefficient=Coefficient;_this1375.Purpose=Purpose;_this1375.type=1252848954;return _this1375;}return _createClass(IfcStructuralLoadGroup);}(IfcGroup);IFC42.IfcStructuralLoadGroup=IfcStructuralLoadGroup;var IfcStructuralPointAction=/*#__PURE__*/function(_IfcStructuralAction5){_inherits(IfcStructuralPointAction,_IfcStructuralAction5);var _super1379=_createSuper(IfcStructuralPointAction);function IfcStructuralPointAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad){var _this1376;_classCallCheck(this,IfcStructuralPointAction);_this1376=_super1379.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad);_this1376.GlobalId=GlobalId;_this1376.OwnerHistory=OwnerHistory;_this1376.Name=Name;_this1376.Description=Description;_this1376.ObjectType=ObjectType;_this1376.ObjectPlacement=ObjectPlacement;_this1376.Representation=Representation;_this1376.AppliedLoad=AppliedLoad;_this1376.GlobalOrLocal=GlobalOrLocal;_this1376.DestabilizingLoad=DestabilizingLoad;_this1376.type=2082059205;return _this1376;}return _createClass(IfcStructuralPointAction);}(IfcStructuralAction);IFC42.IfcStructuralPointAction=IfcStructuralPointAction;var IfcStructuralPointConnection=/*#__PURE__*/function(_IfcStructuralConnect9){_inherits(IfcStructuralPointConnection,_IfcStructuralConnect9);var _super1380=_createSuper(IfcStructuralPointConnection);function IfcStructuralPointConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition,ConditionCoordinateSystem){var _this1377;_classCallCheck(this,IfcStructuralPointConnection);_this1377=_super1380.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this1377.GlobalId=GlobalId;_this1377.OwnerHistory=OwnerHistory;_this1377.Name=Name;_this1377.Description=Description;_this1377.ObjectType=ObjectType;_this1377.ObjectPlacement=ObjectPlacement;_this1377.Representation=Representation;_this1377.AppliedCondition=AppliedCondition;_this1377.ConditionCoordinateSystem=ConditionCoordinateSystem;_this1377.type=734778138;return _this1377;}return _createClass(IfcStructuralPointConnection);}(IfcStructuralConnection);IFC42.IfcStructuralPointConnection=IfcStructuralPointConnection;var IfcStructuralPointReaction=/*#__PURE__*/function(_IfcStructuralReactio4){_inherits(IfcStructuralPointReaction,_IfcStructuralReactio4);var _super1381=_createSuper(IfcStructuralPointReaction);function IfcStructuralPointReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this1378;_classCallCheck(this,IfcStructuralPointReaction);_this1378=_super1381.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this1378.GlobalId=GlobalId;_this1378.OwnerHistory=OwnerHistory;_this1378.Name=Name;_this1378.Description=Description;_this1378.ObjectType=ObjectType;_this1378.ObjectPlacement=ObjectPlacement;_this1378.Representation=Representation;_this1378.AppliedLoad=AppliedLoad;_this1378.GlobalOrLocal=GlobalOrLocal;_this1378.type=1235345126;return _this1378;}return _createClass(IfcStructuralPointReaction);}(IfcStructuralReaction);IFC42.IfcStructuralPointReaction=IfcStructuralPointReaction;var IfcStructuralResultGroup=/*#__PURE__*/function(_IfcGroup10){_inherits(IfcStructuralResultGroup,_IfcGroup10);var _super1382=_createSuper(IfcStructuralResultGroup);function IfcStructuralResultGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheoryType,ResultForLoadGroup,IsLinear){var _this1379;_classCallCheck(this,IfcStructuralResultGroup);_this1379=_super1382.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1379.GlobalId=GlobalId;_this1379.OwnerHistory=OwnerHistory;_this1379.Name=Name;_this1379.Description=Description;_this1379.ObjectType=ObjectType;_this1379.TheoryType=TheoryType;_this1379.ResultForLoadGroup=ResultForLoadGroup;_this1379.IsLinear=IsLinear;_this1379.type=2986769608;return _this1379;}return _createClass(IfcStructuralResultGroup);}(IfcGroup);IFC42.IfcStructuralResultGroup=IfcStructuralResultGroup;var IfcStructuralSurfaceAction=/*#__PURE__*/function(_IfcStructuralAction6){_inherits(IfcStructuralSurfaceAction,_IfcStructuralAction6);var _super1383=_createSuper(IfcStructuralSurfaceAction);function IfcStructuralSurfaceAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this1380;_classCallCheck(this,IfcStructuralSurfaceAction);_this1380=_super1383.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad);_this1380.GlobalId=GlobalId;_this1380.OwnerHistory=OwnerHistory;_this1380.Name=Name;_this1380.Description=Description;_this1380.ObjectType=ObjectType;_this1380.ObjectPlacement=ObjectPlacement;_this1380.Representation=Representation;_this1380.AppliedLoad=AppliedLoad;_this1380.GlobalOrLocal=GlobalOrLocal;_this1380.DestabilizingLoad=DestabilizingLoad;_this1380.ProjectedOrTrue=ProjectedOrTrue;_this1380.PredefinedType=PredefinedType;_this1380.type=3657597509;return _this1380;}return _createClass(IfcStructuralSurfaceAction);}(IfcStructuralAction);IFC42.IfcStructuralSurfaceAction=IfcStructuralSurfaceAction;var IfcStructuralSurfaceConnection=/*#__PURE__*/function(_IfcStructuralConnect10){_inherits(IfcStructuralSurfaceConnection,_IfcStructuralConnect10);var _super1384=_createSuper(IfcStructuralSurfaceConnection);function IfcStructuralSurfaceConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this1381;_classCallCheck(this,IfcStructuralSurfaceConnection);_this1381=_super1384.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this1381.GlobalId=GlobalId;_this1381.OwnerHistory=OwnerHistory;_this1381.Name=Name;_this1381.Description=Description;_this1381.ObjectType=ObjectType;_this1381.ObjectPlacement=ObjectPlacement;_this1381.Representation=Representation;_this1381.AppliedCondition=AppliedCondition;_this1381.type=1975003073;return _this1381;}return _createClass(IfcStructuralSurfaceConnection);}(IfcStructuralConnection);IFC42.IfcStructuralSurfaceConnection=IfcStructuralSurfaceConnection;var IfcSubContractResource=/*#__PURE__*/function(_IfcConstructionResou15){_inherits(IfcSubContractResource,_IfcConstructionResou15);var _super1385=_createSuper(IfcSubContractResource);function IfcSubContractResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this1382;_classCallCheck(this,IfcSubContractResource);_this1382=_super1385.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this1382.GlobalId=GlobalId;_this1382.OwnerHistory=OwnerHistory;_this1382.Name=Name;_this1382.Description=Description;_this1382.ObjectType=ObjectType;_this1382.Identification=Identification;_this1382.LongDescription=LongDescription;_this1382.Usage=Usage;_this1382.BaseCosts=BaseCosts;_this1382.BaseQuantity=BaseQuantity;_this1382.PredefinedType=PredefinedType;_this1382.type=148013059;return _this1382;}return _createClass(IfcSubContractResource);}(IfcConstructionResource);IFC42.IfcSubContractResource=IfcSubContractResource;var IfcSurfaceFeature=/*#__PURE__*/function(_IfcFeatureElement5){_inherits(IfcSurfaceFeature,_IfcFeatureElement5);var _super1386=_createSuper(IfcSurfaceFeature);function IfcSurfaceFeature(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1383;_classCallCheck(this,IfcSurfaceFeature);_this1383=_super1386.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1383.GlobalId=GlobalId;_this1383.OwnerHistory=OwnerHistory;_this1383.Name=Name;_this1383.Description=Description;_this1383.ObjectType=ObjectType;_this1383.ObjectPlacement=ObjectPlacement;_this1383.Representation=Representation;_this1383.Tag=Tag;_this1383.PredefinedType=PredefinedType;_this1383.type=3101698114;return _this1383;}return _createClass(IfcSurfaceFeature);}(IfcFeatureElement);IFC42.IfcSurfaceFeature=IfcSurfaceFeature;var IfcSwitchingDeviceType=/*#__PURE__*/function(_IfcFlowControllerTyp10){_inherits(IfcSwitchingDeviceType,_IfcFlowControllerTyp10);var _super1387=_createSuper(IfcSwitchingDeviceType);function IfcSwitchingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1384;_classCallCheck(this,IfcSwitchingDeviceType);_this1384=_super1387.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1384.GlobalId=GlobalId;_this1384.OwnerHistory=OwnerHistory;_this1384.Name=Name;_this1384.Description=Description;_this1384.ApplicableOccurrence=ApplicableOccurrence;_this1384.HasPropertySets=HasPropertySets;_this1384.RepresentationMaps=RepresentationMaps;_this1384.Tag=Tag;_this1384.ElementType=ElementType;_this1384.PredefinedType=PredefinedType;_this1384.type=2315554128;return _this1384;}return _createClass(IfcSwitchingDeviceType);}(IfcFlowControllerType);IFC42.IfcSwitchingDeviceType=IfcSwitchingDeviceType;var IfcSystem=/*#__PURE__*/function(_IfcGroup11){_inherits(IfcSystem,_IfcGroup11);var _super1388=_createSuper(IfcSystem);function IfcSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this1385;_classCallCheck(this,IfcSystem);_this1385=_super1388.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1385.GlobalId=GlobalId;_this1385.OwnerHistory=OwnerHistory;_this1385.Name=Name;_this1385.Description=Description;_this1385.ObjectType=ObjectType;_this1385.type=2254336722;return _this1385;}return _createClass(IfcSystem);}(IfcGroup);IFC42.IfcSystem=IfcSystem;var IfcSystemFurnitureElement=/*#__PURE__*/function(_IfcFurnishingElement6){_inherits(IfcSystemFurnitureElement,_IfcFurnishingElement6);var _super1389=_createSuper(IfcSystemFurnitureElement);function IfcSystemFurnitureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1386;_classCallCheck(this,IfcSystemFurnitureElement);_this1386=_super1389.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1386.GlobalId=GlobalId;_this1386.OwnerHistory=OwnerHistory;_this1386.Name=Name;_this1386.Description=Description;_this1386.ObjectType=ObjectType;_this1386.ObjectPlacement=ObjectPlacement;_this1386.Representation=Representation;_this1386.Tag=Tag;_this1386.PredefinedType=PredefinedType;_this1386.type=413509423;return _this1386;}return _createClass(IfcSystemFurnitureElement);}(IfcFurnishingElement);IFC42.IfcSystemFurnitureElement=IfcSystemFurnitureElement;var IfcTankType=/*#__PURE__*/function(_IfcFlowStorageDevice3){_inherits(IfcTankType,_IfcFlowStorageDevice3);var _super1390=_createSuper(IfcTankType);function IfcTankType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1387;_classCallCheck(this,IfcTankType);_this1387=_super1390.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1387.GlobalId=GlobalId;_this1387.OwnerHistory=OwnerHistory;_this1387.Name=Name;_this1387.Description=Description;_this1387.ApplicableOccurrence=ApplicableOccurrence;_this1387.HasPropertySets=HasPropertySets;_this1387.RepresentationMaps=RepresentationMaps;_this1387.Tag=Tag;_this1387.ElementType=ElementType;_this1387.PredefinedType=PredefinedType;_this1387.type=5716631;return _this1387;}return _createClass(IfcTankType);}(IfcFlowStorageDeviceType);IFC42.IfcTankType=IfcTankType;var IfcTendon=/*#__PURE__*/function(_IfcReinforcingElemen7){_inherits(IfcTendon,_IfcReinforcingElemen7);var _super1391=_createSuper(IfcTendon);function IfcTendon(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,PredefinedType,NominalDiameter,CrossSectionArea,TensionForce,PreStress,FrictionCoefficient,AnchorageSlip,MinCurvatureRadius){var _this1388;_classCallCheck(this,IfcTendon);_this1388=_super1391.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this1388.GlobalId=GlobalId;_this1388.OwnerHistory=OwnerHistory;_this1388.Name=Name;_this1388.Description=Description;_this1388.ObjectType=ObjectType;_this1388.ObjectPlacement=ObjectPlacement;_this1388.Representation=Representation;_this1388.Tag=Tag;_this1388.SteelGrade=SteelGrade;_this1388.PredefinedType=PredefinedType;_this1388.NominalDiameter=NominalDiameter;_this1388.CrossSectionArea=CrossSectionArea;_this1388.TensionForce=TensionForce;_this1388.PreStress=PreStress;_this1388.FrictionCoefficient=FrictionCoefficient;_this1388.AnchorageSlip=AnchorageSlip;_this1388.MinCurvatureRadius=MinCurvatureRadius;_this1388.type=3824725483;return _this1388;}return _createClass(IfcTendon);}(IfcReinforcingElement);IFC42.IfcTendon=IfcTendon;var IfcTendonAnchor=/*#__PURE__*/function(_IfcReinforcingElemen8){_inherits(IfcTendonAnchor,_IfcReinforcingElemen8);var _super1392=_createSuper(IfcTendonAnchor);function IfcTendonAnchor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,PredefinedType){var _this1389;_classCallCheck(this,IfcTendonAnchor);_this1389=_super1392.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this1389.GlobalId=GlobalId;_this1389.OwnerHistory=OwnerHistory;_this1389.Name=Name;_this1389.Description=Description;_this1389.ObjectType=ObjectType;_this1389.ObjectPlacement=ObjectPlacement;_this1389.Representation=Representation;_this1389.Tag=Tag;_this1389.SteelGrade=SteelGrade;_this1389.PredefinedType=PredefinedType;_this1389.type=2347447852;return _this1389;}return _createClass(IfcTendonAnchor);}(IfcReinforcingElement);IFC42.IfcTendonAnchor=IfcTendonAnchor;var IfcTendonAnchorType=/*#__PURE__*/function(_IfcReinforcingElemen9){_inherits(IfcTendonAnchorType,_IfcReinforcingElemen9);var _super1393=_createSuper(IfcTendonAnchorType);function IfcTendonAnchorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1390;_classCallCheck(this,IfcTendonAnchorType);_this1390=_super1393.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1390.GlobalId=GlobalId;_this1390.OwnerHistory=OwnerHistory;_this1390.Name=Name;_this1390.Description=Description;_this1390.ApplicableOccurrence=ApplicableOccurrence;_this1390.HasPropertySets=HasPropertySets;_this1390.RepresentationMaps=RepresentationMaps;_this1390.Tag=Tag;_this1390.ElementType=ElementType;_this1390.PredefinedType=PredefinedType;_this1390.type=3081323446;return _this1390;}return _createClass(IfcTendonAnchorType);}(IfcReinforcingElementType);IFC42.IfcTendonAnchorType=IfcTendonAnchorType;var IfcTendonType=/*#__PURE__*/function(_IfcReinforcingElemen10){_inherits(IfcTendonType,_IfcReinforcingElemen10);var _super1394=_createSuper(IfcTendonType);function IfcTendonType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,NominalDiameter,CrossSectionArea,SheathDiameter){var _this1391;_classCallCheck(this,IfcTendonType);_this1391=_super1394.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1391.GlobalId=GlobalId;_this1391.OwnerHistory=OwnerHistory;_this1391.Name=Name;_this1391.Description=Description;_this1391.ApplicableOccurrence=ApplicableOccurrence;_this1391.HasPropertySets=HasPropertySets;_this1391.RepresentationMaps=RepresentationMaps;_this1391.Tag=Tag;_this1391.ElementType=ElementType;_this1391.PredefinedType=PredefinedType;_this1391.NominalDiameter=NominalDiameter;_this1391.CrossSectionArea=CrossSectionArea;_this1391.SheathDiameter=SheathDiameter;_this1391.type=2415094496;return _this1391;}return _createClass(IfcTendonType);}(IfcReinforcingElementType);IFC42.IfcTendonType=IfcTendonType;var IfcTransformerType=/*#__PURE__*/function(_IfcEnergyConversionD26){_inherits(IfcTransformerType,_IfcEnergyConversionD26);var _super1395=_createSuper(IfcTransformerType);function IfcTransformerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1392;_classCallCheck(this,IfcTransformerType);_this1392=_super1395.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1392.GlobalId=GlobalId;_this1392.OwnerHistory=OwnerHistory;_this1392.Name=Name;_this1392.Description=Description;_this1392.ApplicableOccurrence=ApplicableOccurrence;_this1392.HasPropertySets=HasPropertySets;_this1392.RepresentationMaps=RepresentationMaps;_this1392.Tag=Tag;_this1392.ElementType=ElementType;_this1392.PredefinedType=PredefinedType;_this1392.type=1692211062;return _this1392;}return _createClass(IfcTransformerType);}(IfcEnergyConversionDeviceType);IFC42.IfcTransformerType=IfcTransformerType;var IfcTransportElement=/*#__PURE__*/function(_IfcElement16){_inherits(IfcTransportElement,_IfcElement16);var _super1396=_createSuper(IfcTransportElement);function IfcTransportElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1393;_classCallCheck(this,IfcTransportElement);_this1393=_super1396.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1393.GlobalId=GlobalId;_this1393.OwnerHistory=OwnerHistory;_this1393.Name=Name;_this1393.Description=Description;_this1393.ObjectType=ObjectType;_this1393.ObjectPlacement=ObjectPlacement;_this1393.Representation=Representation;_this1393.Tag=Tag;_this1393.PredefinedType=PredefinedType;_this1393.type=1620046519;return _this1393;}return _createClass(IfcTransportElement);}(IfcElement);IFC42.IfcTransportElement=IfcTransportElement;var IfcTrimmedCurve=/*#__PURE__*/function(_IfcBoundedCurve8){_inherits(IfcTrimmedCurve,_IfcBoundedCurve8);var _super1397=_createSuper(IfcTrimmedCurve);function IfcTrimmedCurve(expressID,BasisCurve,Trim1,Trim2,SenseAgreement,MasterRepresentation){var _this1394;_classCallCheck(this,IfcTrimmedCurve);_this1394=_super1397.call(this,expressID);_this1394.BasisCurve=BasisCurve;_this1394.Trim1=Trim1;_this1394.Trim2=Trim2;_this1394.SenseAgreement=SenseAgreement;_this1394.MasterRepresentation=MasterRepresentation;_this1394.type=3593883385;return _this1394;}return _createClass(IfcTrimmedCurve);}(IfcBoundedCurve);IFC42.IfcTrimmedCurve=IfcTrimmedCurve;var IfcTubeBundleType=/*#__PURE__*/function(_IfcEnergyConversionD27){_inherits(IfcTubeBundleType,_IfcEnergyConversionD27);var _super1398=_createSuper(IfcTubeBundleType);function IfcTubeBundleType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1395;_classCallCheck(this,IfcTubeBundleType);_this1395=_super1398.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1395.GlobalId=GlobalId;_this1395.OwnerHistory=OwnerHistory;_this1395.Name=Name;_this1395.Description=Description;_this1395.ApplicableOccurrence=ApplicableOccurrence;_this1395.HasPropertySets=HasPropertySets;_this1395.RepresentationMaps=RepresentationMaps;_this1395.Tag=Tag;_this1395.ElementType=ElementType;_this1395.PredefinedType=PredefinedType;_this1395.type=1600972822;return _this1395;}return _createClass(IfcTubeBundleType);}(IfcEnergyConversionDeviceType);IFC42.IfcTubeBundleType=IfcTubeBundleType;var IfcUnitaryEquipmentType=/*#__PURE__*/function(_IfcEnergyConversionD28){_inherits(IfcUnitaryEquipmentType,_IfcEnergyConversionD28);var _super1399=_createSuper(IfcUnitaryEquipmentType);function IfcUnitaryEquipmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1396;_classCallCheck(this,IfcUnitaryEquipmentType);_this1396=_super1399.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1396.GlobalId=GlobalId;_this1396.OwnerHistory=OwnerHistory;_this1396.Name=Name;_this1396.Description=Description;_this1396.ApplicableOccurrence=ApplicableOccurrence;_this1396.HasPropertySets=HasPropertySets;_this1396.RepresentationMaps=RepresentationMaps;_this1396.Tag=Tag;_this1396.ElementType=ElementType;_this1396.PredefinedType=PredefinedType;_this1396.type=1911125066;return _this1396;}return _createClass(IfcUnitaryEquipmentType);}(IfcEnergyConversionDeviceType);IFC42.IfcUnitaryEquipmentType=IfcUnitaryEquipmentType;var IfcValveType=/*#__PURE__*/function(_IfcFlowControllerTyp11){_inherits(IfcValveType,_IfcFlowControllerTyp11);var _super1400=_createSuper(IfcValveType);function IfcValveType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1397;_classCallCheck(this,IfcValveType);_this1397=_super1400.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1397.GlobalId=GlobalId;_this1397.OwnerHistory=OwnerHistory;_this1397.Name=Name;_this1397.Description=Description;_this1397.ApplicableOccurrence=ApplicableOccurrence;_this1397.HasPropertySets=HasPropertySets;_this1397.RepresentationMaps=RepresentationMaps;_this1397.Tag=Tag;_this1397.ElementType=ElementType;_this1397.PredefinedType=PredefinedType;_this1397.type=728799441;return _this1397;}return _createClass(IfcValveType);}(IfcFlowControllerType);IFC42.IfcValveType=IfcValveType;var IfcVibrationIsolator=/*#__PURE__*/function(_IfcElementComponent6){_inherits(IfcVibrationIsolator,_IfcElementComponent6);var _super1401=_createSuper(IfcVibrationIsolator);function IfcVibrationIsolator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1398;_classCallCheck(this,IfcVibrationIsolator);_this1398=_super1401.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1398.GlobalId=GlobalId;_this1398.OwnerHistory=OwnerHistory;_this1398.Name=Name;_this1398.Description=Description;_this1398.ObjectType=ObjectType;_this1398.ObjectPlacement=ObjectPlacement;_this1398.Representation=Representation;_this1398.Tag=Tag;_this1398.PredefinedType=PredefinedType;_this1398.type=2391383451;return _this1398;}return _createClass(IfcVibrationIsolator);}(IfcElementComponent);IFC42.IfcVibrationIsolator=IfcVibrationIsolator;var IfcVibrationIsolatorType=/*#__PURE__*/function(_IfcElementComponentT6){_inherits(IfcVibrationIsolatorType,_IfcElementComponentT6);var _super1402=_createSuper(IfcVibrationIsolatorType);function IfcVibrationIsolatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1399;_classCallCheck(this,IfcVibrationIsolatorType);_this1399=_super1402.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1399.GlobalId=GlobalId;_this1399.OwnerHistory=OwnerHistory;_this1399.Name=Name;_this1399.Description=Description;_this1399.ApplicableOccurrence=ApplicableOccurrence;_this1399.HasPropertySets=HasPropertySets;_this1399.RepresentationMaps=RepresentationMaps;_this1399.Tag=Tag;_this1399.ElementType=ElementType;_this1399.PredefinedType=PredefinedType;_this1399.type=3313531582;return _this1399;}return _createClass(IfcVibrationIsolatorType);}(IfcElementComponentType);IFC42.IfcVibrationIsolatorType=IfcVibrationIsolatorType;var IfcVirtualElement=/*#__PURE__*/function(_IfcElement17){_inherits(IfcVirtualElement,_IfcElement17);var _super1403=_createSuper(IfcVirtualElement);function IfcVirtualElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1400;_classCallCheck(this,IfcVirtualElement);_this1400=_super1403.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1400.GlobalId=GlobalId;_this1400.OwnerHistory=OwnerHistory;_this1400.Name=Name;_this1400.Description=Description;_this1400.ObjectType=ObjectType;_this1400.ObjectPlacement=ObjectPlacement;_this1400.Representation=Representation;_this1400.Tag=Tag;_this1400.type=2769231204;return _this1400;}return _createClass(IfcVirtualElement);}(IfcElement);IFC42.IfcVirtualElement=IfcVirtualElement;var IfcVoidingFeature=/*#__PURE__*/function(_IfcFeatureElementSub4){_inherits(IfcVoidingFeature,_IfcFeatureElementSub4);var _super1404=_createSuper(IfcVoidingFeature);function IfcVoidingFeature(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1401;_classCallCheck(this,IfcVoidingFeature);_this1401=_super1404.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1401.GlobalId=GlobalId;_this1401.OwnerHistory=OwnerHistory;_this1401.Name=Name;_this1401.Description=Description;_this1401.ObjectType=ObjectType;_this1401.ObjectPlacement=ObjectPlacement;_this1401.Representation=Representation;_this1401.Tag=Tag;_this1401.PredefinedType=PredefinedType;_this1401.type=926996030;return _this1401;}return _createClass(IfcVoidingFeature);}(IfcFeatureElementSubtraction);IFC42.IfcVoidingFeature=IfcVoidingFeature;var IfcWallType=/*#__PURE__*/function(_IfcBuildingElementTy30){_inherits(IfcWallType,_IfcBuildingElementTy30);var _super1405=_createSuper(IfcWallType);function IfcWallType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1402;_classCallCheck(this,IfcWallType);_this1402=_super1405.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1402.GlobalId=GlobalId;_this1402.OwnerHistory=OwnerHistory;_this1402.Name=Name;_this1402.Description=Description;_this1402.ApplicableOccurrence=ApplicableOccurrence;_this1402.HasPropertySets=HasPropertySets;_this1402.RepresentationMaps=RepresentationMaps;_this1402.Tag=Tag;_this1402.ElementType=ElementType;_this1402.PredefinedType=PredefinedType;_this1402.type=1898987631;return _this1402;}return _createClass(IfcWallType);}(IfcBuildingElementType);IFC42.IfcWallType=IfcWallType;var IfcWasteTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType19){_inherits(IfcWasteTerminalType,_IfcFlowTerminalType19);var _super1406=_createSuper(IfcWasteTerminalType);function IfcWasteTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1403;_classCallCheck(this,IfcWasteTerminalType);_this1403=_super1406.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1403.GlobalId=GlobalId;_this1403.OwnerHistory=OwnerHistory;_this1403.Name=Name;_this1403.Description=Description;_this1403.ApplicableOccurrence=ApplicableOccurrence;_this1403.HasPropertySets=HasPropertySets;_this1403.RepresentationMaps=RepresentationMaps;_this1403.Tag=Tag;_this1403.ElementType=ElementType;_this1403.PredefinedType=PredefinedType;_this1403.type=1133259667;return _this1403;}return _createClass(IfcWasteTerminalType);}(IfcFlowTerminalType);IFC42.IfcWasteTerminalType=IfcWasteTerminalType;var IfcWindowType=/*#__PURE__*/function(_IfcBuildingElementTy31){_inherits(IfcWindowType,_IfcBuildingElementTy31);var _super1407=_createSuper(IfcWindowType);function IfcWindowType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,PartitioningType,ParameterTakesPrecedence,UserDefinedPartitioningType){var _this1404;_classCallCheck(this,IfcWindowType);_this1404=_super1407.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1404.GlobalId=GlobalId;_this1404.OwnerHistory=OwnerHistory;_this1404.Name=Name;_this1404.Description=Description;_this1404.ApplicableOccurrence=ApplicableOccurrence;_this1404.HasPropertySets=HasPropertySets;_this1404.RepresentationMaps=RepresentationMaps;_this1404.Tag=Tag;_this1404.ElementType=ElementType;_this1404.PredefinedType=PredefinedType;_this1404.PartitioningType=PartitioningType;_this1404.ParameterTakesPrecedence=ParameterTakesPrecedence;_this1404.UserDefinedPartitioningType=UserDefinedPartitioningType;_this1404.type=4009809668;return _this1404;}return _createClass(IfcWindowType);}(IfcBuildingElementType);IFC42.IfcWindowType=IfcWindowType;var IfcWorkCalendar=/*#__PURE__*/function(_IfcControl21){_inherits(IfcWorkCalendar,_IfcControl21);var _super1408=_createSuper(IfcWorkCalendar);function IfcWorkCalendar(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,WorkingTimes,ExceptionTimes,PredefinedType){var _this1405;_classCallCheck(this,IfcWorkCalendar);_this1405=_super1408.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1405.GlobalId=GlobalId;_this1405.OwnerHistory=OwnerHistory;_this1405.Name=Name;_this1405.Description=Description;_this1405.ObjectType=ObjectType;_this1405.Identification=Identification;_this1405.WorkingTimes=WorkingTimes;_this1405.ExceptionTimes=ExceptionTimes;_this1405.PredefinedType=PredefinedType;_this1405.type=4088093105;return _this1405;}return _createClass(IfcWorkCalendar);}(IfcControl);IFC42.IfcWorkCalendar=IfcWorkCalendar;var IfcWorkControl=/*#__PURE__*/function(_IfcControl22){_inherits(IfcWorkControl,_IfcControl22);var _super1409=_createSuper(IfcWorkControl);function IfcWorkControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime){var _this1406;_classCallCheck(this,IfcWorkControl);_this1406=_super1409.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1406.GlobalId=GlobalId;_this1406.OwnerHistory=OwnerHistory;_this1406.Name=Name;_this1406.Description=Description;_this1406.ObjectType=ObjectType;_this1406.Identification=Identification;_this1406.CreationDate=CreationDate;_this1406.Creators=Creators;_this1406.Purpose=Purpose;_this1406.Duration=Duration;_this1406.TotalFloat=TotalFloat;_this1406.StartTime=StartTime;_this1406.FinishTime=FinishTime;_this1406.type=1028945134;return _this1406;}return _createClass(IfcWorkControl);}(IfcControl);IFC42.IfcWorkControl=IfcWorkControl;var IfcWorkPlan=/*#__PURE__*/function(_IfcWorkControl3){_inherits(IfcWorkPlan,_IfcWorkControl3);var _super1410=_createSuper(IfcWorkPlan);function IfcWorkPlan(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,PredefinedType){var _this1407;_classCallCheck(this,IfcWorkPlan);_this1407=_super1410.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime);_this1407.GlobalId=GlobalId;_this1407.OwnerHistory=OwnerHistory;_this1407.Name=Name;_this1407.Description=Description;_this1407.ObjectType=ObjectType;_this1407.Identification=Identification;_this1407.CreationDate=CreationDate;_this1407.Creators=Creators;_this1407.Purpose=Purpose;_this1407.Duration=Duration;_this1407.TotalFloat=TotalFloat;_this1407.StartTime=StartTime;_this1407.FinishTime=FinishTime;_this1407.PredefinedType=PredefinedType;_this1407.type=4218914973;return _this1407;}return _createClass(IfcWorkPlan);}(IfcWorkControl);IFC42.IfcWorkPlan=IfcWorkPlan;var IfcWorkSchedule=/*#__PURE__*/function(_IfcWorkControl4){_inherits(IfcWorkSchedule,_IfcWorkControl4);var _super1411=_createSuper(IfcWorkSchedule);function IfcWorkSchedule(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,PredefinedType){var _this1408;_classCallCheck(this,IfcWorkSchedule);_this1408=_super1411.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime);_this1408.GlobalId=GlobalId;_this1408.OwnerHistory=OwnerHistory;_this1408.Name=Name;_this1408.Description=Description;_this1408.ObjectType=ObjectType;_this1408.Identification=Identification;_this1408.CreationDate=CreationDate;_this1408.Creators=Creators;_this1408.Purpose=Purpose;_this1408.Duration=Duration;_this1408.TotalFloat=TotalFloat;_this1408.StartTime=StartTime;_this1408.FinishTime=FinishTime;_this1408.PredefinedType=PredefinedType;_this1408.type=3342526732;return _this1408;}return _createClass(IfcWorkSchedule);}(IfcWorkControl);IFC42.IfcWorkSchedule=IfcWorkSchedule;var IfcZone=/*#__PURE__*/function(_IfcSystem3){_inherits(IfcZone,_IfcSystem3);var _super1412=_createSuper(IfcZone);function IfcZone(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName){var _this1409;_classCallCheck(this,IfcZone);_this1409=_super1412.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1409.GlobalId=GlobalId;_this1409.OwnerHistory=OwnerHistory;_this1409.Name=Name;_this1409.Description=Description;_this1409.ObjectType=ObjectType;_this1409.LongName=LongName;_this1409.type=1033361043;return _this1409;}return _createClass(IfcZone);}(IfcSystem);IFC42.IfcZone=IfcZone;var IfcActionRequest=/*#__PURE__*/function(_IfcControl23){_inherits(IfcActionRequest,_IfcControl23);var _super1413=_createSuper(IfcActionRequest);function IfcActionRequest(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,LongDescription){var _this1410;_classCallCheck(this,IfcActionRequest);_this1410=_super1413.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this1410.GlobalId=GlobalId;_this1410.OwnerHistory=OwnerHistory;_this1410.Name=Name;_this1410.Description=Description;_this1410.ObjectType=ObjectType;_this1410.Identification=Identification;_this1410.PredefinedType=PredefinedType;_this1410.Status=Status;_this1410.LongDescription=LongDescription;_this1410.type=3821786052;return _this1410;}return _createClass(IfcActionRequest);}(IfcControl);IFC42.IfcActionRequest=IfcActionRequest;var IfcAirTerminalBoxType=/*#__PURE__*/function(_IfcFlowControllerTyp12){_inherits(IfcAirTerminalBoxType,_IfcFlowControllerTyp12);var _super1414=_createSuper(IfcAirTerminalBoxType);function IfcAirTerminalBoxType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1411;_classCallCheck(this,IfcAirTerminalBoxType);_this1411=_super1414.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1411.GlobalId=GlobalId;_this1411.OwnerHistory=OwnerHistory;_this1411.Name=Name;_this1411.Description=Description;_this1411.ApplicableOccurrence=ApplicableOccurrence;_this1411.HasPropertySets=HasPropertySets;_this1411.RepresentationMaps=RepresentationMaps;_this1411.Tag=Tag;_this1411.ElementType=ElementType;_this1411.PredefinedType=PredefinedType;_this1411.type=1411407467;return _this1411;}return _createClass(IfcAirTerminalBoxType);}(IfcFlowControllerType);IFC42.IfcAirTerminalBoxType=IfcAirTerminalBoxType;var IfcAirTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType20){_inherits(IfcAirTerminalType,_IfcFlowTerminalType20);var _super1415=_createSuper(IfcAirTerminalType);function IfcAirTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1412;_classCallCheck(this,IfcAirTerminalType);_this1412=_super1415.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1412.GlobalId=GlobalId;_this1412.OwnerHistory=OwnerHistory;_this1412.Name=Name;_this1412.Description=Description;_this1412.ApplicableOccurrence=ApplicableOccurrence;_this1412.HasPropertySets=HasPropertySets;_this1412.RepresentationMaps=RepresentationMaps;_this1412.Tag=Tag;_this1412.ElementType=ElementType;_this1412.PredefinedType=PredefinedType;_this1412.type=3352864051;return _this1412;}return _createClass(IfcAirTerminalType);}(IfcFlowTerminalType);IFC42.IfcAirTerminalType=IfcAirTerminalType;var IfcAirToAirHeatRecoveryType=/*#__PURE__*/function(_IfcEnergyConversionD29){_inherits(IfcAirToAirHeatRecoveryType,_IfcEnergyConversionD29);var _super1416=_createSuper(IfcAirToAirHeatRecoveryType);function IfcAirToAirHeatRecoveryType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1413;_classCallCheck(this,IfcAirToAirHeatRecoveryType);_this1413=_super1416.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1413.GlobalId=GlobalId;_this1413.OwnerHistory=OwnerHistory;_this1413.Name=Name;_this1413.Description=Description;_this1413.ApplicableOccurrence=ApplicableOccurrence;_this1413.HasPropertySets=HasPropertySets;_this1413.RepresentationMaps=RepresentationMaps;_this1413.Tag=Tag;_this1413.ElementType=ElementType;_this1413.PredefinedType=PredefinedType;_this1413.type=1871374353;return _this1413;}return _createClass(IfcAirToAirHeatRecoveryType);}(IfcEnergyConversionDeviceType);IFC42.IfcAirToAirHeatRecoveryType=IfcAirToAirHeatRecoveryType;var IfcAsset=/*#__PURE__*/function(_IfcGroup12){_inherits(IfcAsset,_IfcGroup12);var _super1417=_createSuper(IfcAsset);function IfcAsset(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,OriginalValue,CurrentValue,TotalReplacementCost,Owner,User,ResponsiblePerson,IncorporationDate,DepreciatedValue){var _this1414;_classCallCheck(this,IfcAsset);_this1414=_super1417.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1414.GlobalId=GlobalId;_this1414.OwnerHistory=OwnerHistory;_this1414.Name=Name;_this1414.Description=Description;_this1414.ObjectType=ObjectType;_this1414.Identification=Identification;_this1414.OriginalValue=OriginalValue;_this1414.CurrentValue=CurrentValue;_this1414.TotalReplacementCost=TotalReplacementCost;_this1414.Owner=Owner;_this1414.User=User;_this1414.ResponsiblePerson=ResponsiblePerson;_this1414.IncorporationDate=IncorporationDate;_this1414.DepreciatedValue=DepreciatedValue;_this1414.type=3460190687;return _this1414;}return _createClass(IfcAsset);}(IfcGroup);IFC42.IfcAsset=IfcAsset;var IfcAudioVisualApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType21){_inherits(IfcAudioVisualApplianceType,_IfcFlowTerminalType21);var _super1418=_createSuper(IfcAudioVisualApplianceType);function IfcAudioVisualApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1415;_classCallCheck(this,IfcAudioVisualApplianceType);_this1415=_super1418.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1415.GlobalId=GlobalId;_this1415.OwnerHistory=OwnerHistory;_this1415.Name=Name;_this1415.Description=Description;_this1415.ApplicableOccurrence=ApplicableOccurrence;_this1415.HasPropertySets=HasPropertySets;_this1415.RepresentationMaps=RepresentationMaps;_this1415.Tag=Tag;_this1415.ElementType=ElementType;_this1415.PredefinedType=PredefinedType;_this1415.type=1532957894;return _this1415;}return _createClass(IfcAudioVisualApplianceType);}(IfcFlowTerminalType);IFC42.IfcAudioVisualApplianceType=IfcAudioVisualApplianceType;var IfcBSplineCurve=/*#__PURE__*/function(_IfcBoundedCurve9){_inherits(IfcBSplineCurve,_IfcBoundedCurve9);var _super1419=_createSuper(IfcBSplineCurve);function IfcBSplineCurve(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect){var _this1416;_classCallCheck(this,IfcBSplineCurve);_this1416=_super1419.call(this,expressID);_this1416.Degree=Degree;_this1416.ControlPointsList=ControlPointsList;_this1416.CurveForm=CurveForm;_this1416.ClosedCurve=ClosedCurve;_this1416.SelfIntersect=SelfIntersect;_this1416.type=1967976161;return _this1416;}return _createClass(IfcBSplineCurve);}(IfcBoundedCurve);IFC42.IfcBSplineCurve=IfcBSplineCurve;var IfcBSplineCurveWithKnots=/*#__PURE__*/function(_IfcBSplineCurve2){_inherits(IfcBSplineCurveWithKnots,_IfcBSplineCurve2);var _super1420=_createSuper(IfcBSplineCurveWithKnots);function IfcBSplineCurveWithKnots(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect,KnotMultiplicities,Knots,KnotSpec){var _this1417;_classCallCheck(this,IfcBSplineCurveWithKnots);_this1417=_super1420.call(this,expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect);_this1417.Degree=Degree;_this1417.ControlPointsList=ControlPointsList;_this1417.CurveForm=CurveForm;_this1417.ClosedCurve=ClosedCurve;_this1417.SelfIntersect=SelfIntersect;_this1417.KnotMultiplicities=KnotMultiplicities;_this1417.Knots=Knots;_this1417.KnotSpec=KnotSpec;_this1417.type=2461110595;return _this1417;}return _createClass(IfcBSplineCurveWithKnots);}(IfcBSplineCurve);IFC42.IfcBSplineCurveWithKnots=IfcBSplineCurveWithKnots;var IfcBeamType=/*#__PURE__*/function(_IfcBuildingElementTy32){_inherits(IfcBeamType,_IfcBuildingElementTy32);var _super1421=_createSuper(IfcBeamType);function IfcBeamType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1418;_classCallCheck(this,IfcBeamType);_this1418=_super1421.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1418.GlobalId=GlobalId;_this1418.OwnerHistory=OwnerHistory;_this1418.Name=Name;_this1418.Description=Description;_this1418.ApplicableOccurrence=ApplicableOccurrence;_this1418.HasPropertySets=HasPropertySets;_this1418.RepresentationMaps=RepresentationMaps;_this1418.Tag=Tag;_this1418.ElementType=ElementType;_this1418.PredefinedType=PredefinedType;_this1418.type=819618141;return _this1418;}return _createClass(IfcBeamType);}(IfcBuildingElementType);IFC42.IfcBeamType=IfcBeamType;var IfcBoilerType=/*#__PURE__*/function(_IfcEnergyConversionD30){_inherits(IfcBoilerType,_IfcEnergyConversionD30);var _super1422=_createSuper(IfcBoilerType);function IfcBoilerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1419;_classCallCheck(this,IfcBoilerType);_this1419=_super1422.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1419.GlobalId=GlobalId;_this1419.OwnerHistory=OwnerHistory;_this1419.Name=Name;_this1419.Description=Description;_this1419.ApplicableOccurrence=ApplicableOccurrence;_this1419.HasPropertySets=HasPropertySets;_this1419.RepresentationMaps=RepresentationMaps;_this1419.Tag=Tag;_this1419.ElementType=ElementType;_this1419.PredefinedType=PredefinedType;_this1419.type=231477066;return _this1419;}return _createClass(IfcBoilerType);}(IfcEnergyConversionDeviceType);IFC42.IfcBoilerType=IfcBoilerType;var IfcBoundaryCurve=/*#__PURE__*/function(_IfcCompositeCurveOnS){_inherits(IfcBoundaryCurve,_IfcCompositeCurveOnS);var _super1423=_createSuper(IfcBoundaryCurve);function IfcBoundaryCurve(expressID,Segments,SelfIntersect){var _this1420;_classCallCheck(this,IfcBoundaryCurve);_this1420=_super1423.call(this,expressID,Segments,SelfIntersect);_this1420.Segments=Segments;_this1420.SelfIntersect=SelfIntersect;_this1420.type=1136057603;return _this1420;}return _createClass(IfcBoundaryCurve);}(IfcCompositeCurveOnSurface);IFC42.IfcBoundaryCurve=IfcBoundaryCurve;var IfcBuildingElement=/*#__PURE__*/function(_IfcElement18){_inherits(IfcBuildingElement,_IfcElement18);var _super1424=_createSuper(IfcBuildingElement);function IfcBuildingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1421;_classCallCheck(this,IfcBuildingElement);_this1421=_super1424.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1421.GlobalId=GlobalId;_this1421.OwnerHistory=OwnerHistory;_this1421.Name=Name;_this1421.Description=Description;_this1421.ObjectType=ObjectType;_this1421.ObjectPlacement=ObjectPlacement;_this1421.Representation=Representation;_this1421.Tag=Tag;_this1421.type=3299480353;return _this1421;}return _createClass(IfcBuildingElement);}(IfcElement);IFC42.IfcBuildingElement=IfcBuildingElement;var IfcBuildingElementPart=/*#__PURE__*/function(_IfcElementComponent7){_inherits(IfcBuildingElementPart,_IfcElementComponent7);var _super1425=_createSuper(IfcBuildingElementPart);function IfcBuildingElementPart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1422;_classCallCheck(this,IfcBuildingElementPart);_this1422=_super1425.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1422.GlobalId=GlobalId;_this1422.OwnerHistory=OwnerHistory;_this1422.Name=Name;_this1422.Description=Description;_this1422.ObjectType=ObjectType;_this1422.ObjectPlacement=ObjectPlacement;_this1422.Representation=Representation;_this1422.Tag=Tag;_this1422.PredefinedType=PredefinedType;_this1422.type=2979338954;return _this1422;}return _createClass(IfcBuildingElementPart);}(IfcElementComponent);IFC42.IfcBuildingElementPart=IfcBuildingElementPart;var IfcBuildingElementPartType=/*#__PURE__*/function(_IfcElementComponentT7){_inherits(IfcBuildingElementPartType,_IfcElementComponentT7);var _super1426=_createSuper(IfcBuildingElementPartType);function IfcBuildingElementPartType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1423;_classCallCheck(this,IfcBuildingElementPartType);_this1423=_super1426.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1423.GlobalId=GlobalId;_this1423.OwnerHistory=OwnerHistory;_this1423.Name=Name;_this1423.Description=Description;_this1423.ApplicableOccurrence=ApplicableOccurrence;_this1423.HasPropertySets=HasPropertySets;_this1423.RepresentationMaps=RepresentationMaps;_this1423.Tag=Tag;_this1423.ElementType=ElementType;_this1423.PredefinedType=PredefinedType;_this1423.type=39481116;return _this1423;}return _createClass(IfcBuildingElementPartType);}(IfcElementComponentType);IFC42.IfcBuildingElementPartType=IfcBuildingElementPartType;var IfcBuildingElementProxy=/*#__PURE__*/function(_IfcBuildingElement21){_inherits(IfcBuildingElementProxy,_IfcBuildingElement21);var _super1427=_createSuper(IfcBuildingElementProxy);function IfcBuildingElementProxy(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1424;_classCallCheck(this,IfcBuildingElementProxy);_this1424=_super1427.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1424.GlobalId=GlobalId;_this1424.OwnerHistory=OwnerHistory;_this1424.Name=Name;_this1424.Description=Description;_this1424.ObjectType=ObjectType;_this1424.ObjectPlacement=ObjectPlacement;_this1424.Representation=Representation;_this1424.Tag=Tag;_this1424.PredefinedType=PredefinedType;_this1424.type=1095909175;return _this1424;}return _createClass(IfcBuildingElementProxy);}(IfcBuildingElement);IFC42.IfcBuildingElementProxy=IfcBuildingElementProxy;var IfcBuildingElementProxyType=/*#__PURE__*/function(_IfcBuildingElementTy33){_inherits(IfcBuildingElementProxyType,_IfcBuildingElementTy33);var _super1428=_createSuper(IfcBuildingElementProxyType);function IfcBuildingElementProxyType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1425;_classCallCheck(this,IfcBuildingElementProxyType);_this1425=_super1428.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1425.GlobalId=GlobalId;_this1425.OwnerHistory=OwnerHistory;_this1425.Name=Name;_this1425.Description=Description;_this1425.ApplicableOccurrence=ApplicableOccurrence;_this1425.HasPropertySets=HasPropertySets;_this1425.RepresentationMaps=RepresentationMaps;_this1425.Tag=Tag;_this1425.ElementType=ElementType;_this1425.PredefinedType=PredefinedType;_this1425.type=1909888760;return _this1425;}return _createClass(IfcBuildingElementProxyType);}(IfcBuildingElementType);IFC42.IfcBuildingElementProxyType=IfcBuildingElementProxyType;var IfcBuildingSystem=/*#__PURE__*/function(_IfcSystem4){_inherits(IfcBuildingSystem,_IfcSystem4);var _super1429=_createSuper(IfcBuildingSystem);function IfcBuildingSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,LongName){var _this1426;_classCallCheck(this,IfcBuildingSystem);_this1426=_super1429.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1426.GlobalId=GlobalId;_this1426.OwnerHistory=OwnerHistory;_this1426.Name=Name;_this1426.Description=Description;_this1426.ObjectType=ObjectType;_this1426.PredefinedType=PredefinedType;_this1426.LongName=LongName;_this1426.type=1177604601;return _this1426;}return _createClass(IfcBuildingSystem);}(IfcSystem);IFC42.IfcBuildingSystem=IfcBuildingSystem;var IfcBurnerType=/*#__PURE__*/function(_IfcEnergyConversionD31){_inherits(IfcBurnerType,_IfcEnergyConversionD31);var _super1430=_createSuper(IfcBurnerType);function IfcBurnerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1427;_classCallCheck(this,IfcBurnerType);_this1427=_super1430.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1427.GlobalId=GlobalId;_this1427.OwnerHistory=OwnerHistory;_this1427.Name=Name;_this1427.Description=Description;_this1427.ApplicableOccurrence=ApplicableOccurrence;_this1427.HasPropertySets=HasPropertySets;_this1427.RepresentationMaps=RepresentationMaps;_this1427.Tag=Tag;_this1427.ElementType=ElementType;_this1427.PredefinedType=PredefinedType;_this1427.type=2188180465;return _this1427;}return _createClass(IfcBurnerType);}(IfcEnergyConversionDeviceType);IFC42.IfcBurnerType=IfcBurnerType;var IfcCableCarrierFittingType=/*#__PURE__*/function(_IfcFlowFittingType7){_inherits(IfcCableCarrierFittingType,_IfcFlowFittingType7);var _super1431=_createSuper(IfcCableCarrierFittingType);function IfcCableCarrierFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1428;_classCallCheck(this,IfcCableCarrierFittingType);_this1428=_super1431.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1428.GlobalId=GlobalId;_this1428.OwnerHistory=OwnerHistory;_this1428.Name=Name;_this1428.Description=Description;_this1428.ApplicableOccurrence=ApplicableOccurrence;_this1428.HasPropertySets=HasPropertySets;_this1428.RepresentationMaps=RepresentationMaps;_this1428.Tag=Tag;_this1428.ElementType=ElementType;_this1428.PredefinedType=PredefinedType;_this1428.type=395041908;return _this1428;}return _createClass(IfcCableCarrierFittingType);}(IfcFlowFittingType);IFC42.IfcCableCarrierFittingType=IfcCableCarrierFittingType;var IfcCableCarrierSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType6){_inherits(IfcCableCarrierSegmentType,_IfcFlowSegmentType6);var _super1432=_createSuper(IfcCableCarrierSegmentType);function IfcCableCarrierSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1429;_classCallCheck(this,IfcCableCarrierSegmentType);_this1429=_super1432.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1429.GlobalId=GlobalId;_this1429.OwnerHistory=OwnerHistory;_this1429.Name=Name;_this1429.Description=Description;_this1429.ApplicableOccurrence=ApplicableOccurrence;_this1429.HasPropertySets=HasPropertySets;_this1429.RepresentationMaps=RepresentationMaps;_this1429.Tag=Tag;_this1429.ElementType=ElementType;_this1429.PredefinedType=PredefinedType;_this1429.type=3293546465;return _this1429;}return _createClass(IfcCableCarrierSegmentType);}(IfcFlowSegmentType);IFC42.IfcCableCarrierSegmentType=IfcCableCarrierSegmentType;var IfcCableFittingType=/*#__PURE__*/function(_IfcFlowFittingType8){_inherits(IfcCableFittingType,_IfcFlowFittingType8);var _super1433=_createSuper(IfcCableFittingType);function IfcCableFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1430;_classCallCheck(this,IfcCableFittingType);_this1430=_super1433.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1430.GlobalId=GlobalId;_this1430.OwnerHistory=OwnerHistory;_this1430.Name=Name;_this1430.Description=Description;_this1430.ApplicableOccurrence=ApplicableOccurrence;_this1430.HasPropertySets=HasPropertySets;_this1430.RepresentationMaps=RepresentationMaps;_this1430.Tag=Tag;_this1430.ElementType=ElementType;_this1430.PredefinedType=PredefinedType;_this1430.type=2674252688;return _this1430;}return _createClass(IfcCableFittingType);}(IfcFlowFittingType);IFC42.IfcCableFittingType=IfcCableFittingType;var IfcCableSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType7){_inherits(IfcCableSegmentType,_IfcFlowSegmentType7);var _super1434=_createSuper(IfcCableSegmentType);function IfcCableSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1431;_classCallCheck(this,IfcCableSegmentType);_this1431=_super1434.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1431.GlobalId=GlobalId;_this1431.OwnerHistory=OwnerHistory;_this1431.Name=Name;_this1431.Description=Description;_this1431.ApplicableOccurrence=ApplicableOccurrence;_this1431.HasPropertySets=HasPropertySets;_this1431.RepresentationMaps=RepresentationMaps;_this1431.Tag=Tag;_this1431.ElementType=ElementType;_this1431.PredefinedType=PredefinedType;_this1431.type=1285652485;return _this1431;}return _createClass(IfcCableSegmentType);}(IfcFlowSegmentType);IFC42.IfcCableSegmentType=IfcCableSegmentType;var IfcChillerType=/*#__PURE__*/function(_IfcEnergyConversionD32){_inherits(IfcChillerType,_IfcEnergyConversionD32);var _super1435=_createSuper(IfcChillerType);function IfcChillerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1432;_classCallCheck(this,IfcChillerType);_this1432=_super1435.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1432.GlobalId=GlobalId;_this1432.OwnerHistory=OwnerHistory;_this1432.Name=Name;_this1432.Description=Description;_this1432.ApplicableOccurrence=ApplicableOccurrence;_this1432.HasPropertySets=HasPropertySets;_this1432.RepresentationMaps=RepresentationMaps;_this1432.Tag=Tag;_this1432.ElementType=ElementType;_this1432.PredefinedType=PredefinedType;_this1432.type=2951183804;return _this1432;}return _createClass(IfcChillerType);}(IfcEnergyConversionDeviceType);IFC42.IfcChillerType=IfcChillerType;var IfcChimney=/*#__PURE__*/function(_IfcBuildingElement22){_inherits(IfcChimney,_IfcBuildingElement22);var _super1436=_createSuper(IfcChimney);function IfcChimney(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1433;_classCallCheck(this,IfcChimney);_this1433=_super1436.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1433.GlobalId=GlobalId;_this1433.OwnerHistory=OwnerHistory;_this1433.Name=Name;_this1433.Description=Description;_this1433.ObjectType=ObjectType;_this1433.ObjectPlacement=ObjectPlacement;_this1433.Representation=Representation;_this1433.Tag=Tag;_this1433.PredefinedType=PredefinedType;_this1433.type=3296154744;return _this1433;}return _createClass(IfcChimney);}(IfcBuildingElement);IFC42.IfcChimney=IfcChimney;var IfcCircle=/*#__PURE__*/function(_IfcConic4){_inherits(IfcCircle,_IfcConic4);var _super1437=_createSuper(IfcCircle);function IfcCircle(expressID,Position,Radius){var _this1434;_classCallCheck(this,IfcCircle);_this1434=_super1437.call(this,expressID,Position);_this1434.Position=Position;_this1434.Radius=Radius;_this1434.type=2611217952;return _this1434;}return _createClass(IfcCircle);}(IfcConic);IFC42.IfcCircle=IfcCircle;var IfcCivilElement=/*#__PURE__*/function(_IfcElement19){_inherits(IfcCivilElement,_IfcElement19);var _super1438=_createSuper(IfcCivilElement);function IfcCivilElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1435;_classCallCheck(this,IfcCivilElement);_this1435=_super1438.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1435.GlobalId=GlobalId;_this1435.OwnerHistory=OwnerHistory;_this1435.Name=Name;_this1435.Description=Description;_this1435.ObjectType=ObjectType;_this1435.ObjectPlacement=ObjectPlacement;_this1435.Representation=Representation;_this1435.Tag=Tag;_this1435.type=1677625105;return _this1435;}return _createClass(IfcCivilElement);}(IfcElement);IFC42.IfcCivilElement=IfcCivilElement;var IfcCoilType=/*#__PURE__*/function(_IfcEnergyConversionD33){_inherits(IfcCoilType,_IfcEnergyConversionD33);var _super1439=_createSuper(IfcCoilType);function IfcCoilType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1436;_classCallCheck(this,IfcCoilType);_this1436=_super1439.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1436.GlobalId=GlobalId;_this1436.OwnerHistory=OwnerHistory;_this1436.Name=Name;_this1436.Description=Description;_this1436.ApplicableOccurrence=ApplicableOccurrence;_this1436.HasPropertySets=HasPropertySets;_this1436.RepresentationMaps=RepresentationMaps;_this1436.Tag=Tag;_this1436.ElementType=ElementType;_this1436.PredefinedType=PredefinedType;_this1436.type=2301859152;return _this1436;}return _createClass(IfcCoilType);}(IfcEnergyConversionDeviceType);IFC42.IfcCoilType=IfcCoilType;var IfcColumn=/*#__PURE__*/function(_IfcBuildingElement23){_inherits(IfcColumn,_IfcBuildingElement23);var _super1440=_createSuper(IfcColumn);function IfcColumn(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1437;_classCallCheck(this,IfcColumn);_this1437=_super1440.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1437.GlobalId=GlobalId;_this1437.OwnerHistory=OwnerHistory;_this1437.Name=Name;_this1437.Description=Description;_this1437.ObjectType=ObjectType;_this1437.ObjectPlacement=ObjectPlacement;_this1437.Representation=Representation;_this1437.Tag=Tag;_this1437.PredefinedType=PredefinedType;_this1437.type=843113511;return _this1437;}return _createClass(IfcColumn);}(IfcBuildingElement);IFC42.IfcColumn=IfcColumn;var IfcColumnStandardCase=/*#__PURE__*/function(_IfcColumn){_inherits(IfcColumnStandardCase,_IfcColumn);var _super1441=_createSuper(IfcColumnStandardCase);function IfcColumnStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1438;_classCallCheck(this,IfcColumnStandardCase);_this1438=_super1441.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1438.GlobalId=GlobalId;_this1438.OwnerHistory=OwnerHistory;_this1438.Name=Name;_this1438.Description=Description;_this1438.ObjectType=ObjectType;_this1438.ObjectPlacement=ObjectPlacement;_this1438.Representation=Representation;_this1438.Tag=Tag;_this1438.PredefinedType=PredefinedType;_this1438.type=905975707;return _this1438;}return _createClass(IfcColumnStandardCase);}(IfcColumn);IFC42.IfcColumnStandardCase=IfcColumnStandardCase;var IfcCommunicationsApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType22){_inherits(IfcCommunicationsApplianceType,_IfcFlowTerminalType22);var _super1442=_createSuper(IfcCommunicationsApplianceType);function IfcCommunicationsApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1439;_classCallCheck(this,IfcCommunicationsApplianceType);_this1439=_super1442.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1439.GlobalId=GlobalId;_this1439.OwnerHistory=OwnerHistory;_this1439.Name=Name;_this1439.Description=Description;_this1439.ApplicableOccurrence=ApplicableOccurrence;_this1439.HasPropertySets=HasPropertySets;_this1439.RepresentationMaps=RepresentationMaps;_this1439.Tag=Tag;_this1439.ElementType=ElementType;_this1439.PredefinedType=PredefinedType;_this1439.type=400855858;return _this1439;}return _createClass(IfcCommunicationsApplianceType);}(IfcFlowTerminalType);IFC42.IfcCommunicationsApplianceType=IfcCommunicationsApplianceType;var IfcCompressorType=/*#__PURE__*/function(_IfcFlowMovingDeviceT5){_inherits(IfcCompressorType,_IfcFlowMovingDeviceT5);var _super1443=_createSuper(IfcCompressorType);function IfcCompressorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1440;_classCallCheck(this,IfcCompressorType);_this1440=_super1443.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1440.GlobalId=GlobalId;_this1440.OwnerHistory=OwnerHistory;_this1440.Name=Name;_this1440.Description=Description;_this1440.ApplicableOccurrence=ApplicableOccurrence;_this1440.HasPropertySets=HasPropertySets;_this1440.RepresentationMaps=RepresentationMaps;_this1440.Tag=Tag;_this1440.ElementType=ElementType;_this1440.PredefinedType=PredefinedType;_this1440.type=3850581409;return _this1440;}return _createClass(IfcCompressorType);}(IfcFlowMovingDeviceType);IFC42.IfcCompressorType=IfcCompressorType;var IfcCondenserType=/*#__PURE__*/function(_IfcEnergyConversionD34){_inherits(IfcCondenserType,_IfcEnergyConversionD34);var _super1444=_createSuper(IfcCondenserType);function IfcCondenserType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1441;_classCallCheck(this,IfcCondenserType);_this1441=_super1444.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1441.GlobalId=GlobalId;_this1441.OwnerHistory=OwnerHistory;_this1441.Name=Name;_this1441.Description=Description;_this1441.ApplicableOccurrence=ApplicableOccurrence;_this1441.HasPropertySets=HasPropertySets;_this1441.RepresentationMaps=RepresentationMaps;_this1441.Tag=Tag;_this1441.ElementType=ElementType;_this1441.PredefinedType=PredefinedType;_this1441.type=2816379211;return _this1441;}return _createClass(IfcCondenserType);}(IfcEnergyConversionDeviceType);IFC42.IfcCondenserType=IfcCondenserType;var IfcConstructionEquipmentResource=/*#__PURE__*/function(_IfcConstructionResou16){_inherits(IfcConstructionEquipmentResource,_IfcConstructionResou16);var _super1445=_createSuper(IfcConstructionEquipmentResource);function IfcConstructionEquipmentResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this1442;_classCallCheck(this,IfcConstructionEquipmentResource);_this1442=_super1445.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this1442.GlobalId=GlobalId;_this1442.OwnerHistory=OwnerHistory;_this1442.Name=Name;_this1442.Description=Description;_this1442.ObjectType=ObjectType;_this1442.Identification=Identification;_this1442.LongDescription=LongDescription;_this1442.Usage=Usage;_this1442.BaseCosts=BaseCosts;_this1442.BaseQuantity=BaseQuantity;_this1442.PredefinedType=PredefinedType;_this1442.type=3898045240;return _this1442;}return _createClass(IfcConstructionEquipmentResource);}(IfcConstructionResource);IFC42.IfcConstructionEquipmentResource=IfcConstructionEquipmentResource;var IfcConstructionMaterialResource=/*#__PURE__*/function(_IfcConstructionResou17){_inherits(IfcConstructionMaterialResource,_IfcConstructionResou17);var _super1446=_createSuper(IfcConstructionMaterialResource);function IfcConstructionMaterialResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this1443;_classCallCheck(this,IfcConstructionMaterialResource);_this1443=_super1446.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this1443.GlobalId=GlobalId;_this1443.OwnerHistory=OwnerHistory;_this1443.Name=Name;_this1443.Description=Description;_this1443.ObjectType=ObjectType;_this1443.Identification=Identification;_this1443.LongDescription=LongDescription;_this1443.Usage=Usage;_this1443.BaseCosts=BaseCosts;_this1443.BaseQuantity=BaseQuantity;_this1443.PredefinedType=PredefinedType;_this1443.type=1060000209;return _this1443;}return _createClass(IfcConstructionMaterialResource);}(IfcConstructionResource);IFC42.IfcConstructionMaterialResource=IfcConstructionMaterialResource;var IfcConstructionProductResource=/*#__PURE__*/function(_IfcConstructionResou18){_inherits(IfcConstructionProductResource,_IfcConstructionResou18);var _super1447=_createSuper(IfcConstructionProductResource);function IfcConstructionProductResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this1444;_classCallCheck(this,IfcConstructionProductResource);_this1444=_super1447.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this1444.GlobalId=GlobalId;_this1444.OwnerHistory=OwnerHistory;_this1444.Name=Name;_this1444.Description=Description;_this1444.ObjectType=ObjectType;_this1444.Identification=Identification;_this1444.LongDescription=LongDescription;_this1444.Usage=Usage;_this1444.BaseCosts=BaseCosts;_this1444.BaseQuantity=BaseQuantity;_this1444.PredefinedType=PredefinedType;_this1444.type=488727124;return _this1444;}return _createClass(IfcConstructionProductResource);}(IfcConstructionResource);IFC42.IfcConstructionProductResource=IfcConstructionProductResource;var IfcCooledBeamType=/*#__PURE__*/function(_IfcEnergyConversionD35){_inherits(IfcCooledBeamType,_IfcEnergyConversionD35);var _super1448=_createSuper(IfcCooledBeamType);function IfcCooledBeamType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1445;_classCallCheck(this,IfcCooledBeamType);_this1445=_super1448.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1445.GlobalId=GlobalId;_this1445.OwnerHistory=OwnerHistory;_this1445.Name=Name;_this1445.Description=Description;_this1445.ApplicableOccurrence=ApplicableOccurrence;_this1445.HasPropertySets=HasPropertySets;_this1445.RepresentationMaps=RepresentationMaps;_this1445.Tag=Tag;_this1445.ElementType=ElementType;_this1445.PredefinedType=PredefinedType;_this1445.type=335055490;return _this1445;}return _createClass(IfcCooledBeamType);}(IfcEnergyConversionDeviceType);IFC42.IfcCooledBeamType=IfcCooledBeamType;var IfcCoolingTowerType=/*#__PURE__*/function(_IfcEnergyConversionD36){_inherits(IfcCoolingTowerType,_IfcEnergyConversionD36);var _super1449=_createSuper(IfcCoolingTowerType);function IfcCoolingTowerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1446;_classCallCheck(this,IfcCoolingTowerType);_this1446=_super1449.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1446.GlobalId=GlobalId;_this1446.OwnerHistory=OwnerHistory;_this1446.Name=Name;_this1446.Description=Description;_this1446.ApplicableOccurrence=ApplicableOccurrence;_this1446.HasPropertySets=HasPropertySets;_this1446.RepresentationMaps=RepresentationMaps;_this1446.Tag=Tag;_this1446.ElementType=ElementType;_this1446.PredefinedType=PredefinedType;_this1446.type=2954562838;return _this1446;}return _createClass(IfcCoolingTowerType);}(IfcEnergyConversionDeviceType);IFC42.IfcCoolingTowerType=IfcCoolingTowerType;var IfcCovering=/*#__PURE__*/function(_IfcBuildingElement24){_inherits(IfcCovering,_IfcBuildingElement24);var _super1450=_createSuper(IfcCovering);function IfcCovering(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1447;_classCallCheck(this,IfcCovering);_this1447=_super1450.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1447.GlobalId=GlobalId;_this1447.OwnerHistory=OwnerHistory;_this1447.Name=Name;_this1447.Description=Description;_this1447.ObjectType=ObjectType;_this1447.ObjectPlacement=ObjectPlacement;_this1447.Representation=Representation;_this1447.Tag=Tag;_this1447.PredefinedType=PredefinedType;_this1447.type=1973544240;return _this1447;}return _createClass(IfcCovering);}(IfcBuildingElement);IFC42.IfcCovering=IfcCovering;var IfcCurtainWall=/*#__PURE__*/function(_IfcBuildingElement25){_inherits(IfcCurtainWall,_IfcBuildingElement25);var _super1451=_createSuper(IfcCurtainWall);function IfcCurtainWall(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1448;_classCallCheck(this,IfcCurtainWall);_this1448=_super1451.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1448.GlobalId=GlobalId;_this1448.OwnerHistory=OwnerHistory;_this1448.Name=Name;_this1448.Description=Description;_this1448.ObjectType=ObjectType;_this1448.ObjectPlacement=ObjectPlacement;_this1448.Representation=Representation;_this1448.Tag=Tag;_this1448.PredefinedType=PredefinedType;_this1448.type=3495092785;return _this1448;}return _createClass(IfcCurtainWall);}(IfcBuildingElement);IFC42.IfcCurtainWall=IfcCurtainWall;var IfcDamperType=/*#__PURE__*/function(_IfcFlowControllerTyp13){_inherits(IfcDamperType,_IfcFlowControllerTyp13);var _super1452=_createSuper(IfcDamperType);function IfcDamperType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1449;_classCallCheck(this,IfcDamperType);_this1449=_super1452.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1449.GlobalId=GlobalId;_this1449.OwnerHistory=OwnerHistory;_this1449.Name=Name;_this1449.Description=Description;_this1449.ApplicableOccurrence=ApplicableOccurrence;_this1449.HasPropertySets=HasPropertySets;_this1449.RepresentationMaps=RepresentationMaps;_this1449.Tag=Tag;_this1449.ElementType=ElementType;_this1449.PredefinedType=PredefinedType;_this1449.type=3961806047;return _this1449;}return _createClass(IfcDamperType);}(IfcFlowControllerType);IFC42.IfcDamperType=IfcDamperType;var IfcDiscreteAccessory=/*#__PURE__*/function(_IfcElementComponent8){_inherits(IfcDiscreteAccessory,_IfcElementComponent8);var _super1453=_createSuper(IfcDiscreteAccessory);function IfcDiscreteAccessory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1450;_classCallCheck(this,IfcDiscreteAccessory);_this1450=_super1453.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1450.GlobalId=GlobalId;_this1450.OwnerHistory=OwnerHistory;_this1450.Name=Name;_this1450.Description=Description;_this1450.ObjectType=ObjectType;_this1450.ObjectPlacement=ObjectPlacement;_this1450.Representation=Representation;_this1450.Tag=Tag;_this1450.PredefinedType=PredefinedType;_this1450.type=1335981549;return _this1450;}return _createClass(IfcDiscreteAccessory);}(IfcElementComponent);IFC42.IfcDiscreteAccessory=IfcDiscreteAccessory;var IfcDiscreteAccessoryType=/*#__PURE__*/function(_IfcElementComponentT8){_inherits(IfcDiscreteAccessoryType,_IfcElementComponentT8);var _super1454=_createSuper(IfcDiscreteAccessoryType);function IfcDiscreteAccessoryType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1451;_classCallCheck(this,IfcDiscreteAccessoryType);_this1451=_super1454.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1451.GlobalId=GlobalId;_this1451.OwnerHistory=OwnerHistory;_this1451.Name=Name;_this1451.Description=Description;_this1451.ApplicableOccurrence=ApplicableOccurrence;_this1451.HasPropertySets=HasPropertySets;_this1451.RepresentationMaps=RepresentationMaps;_this1451.Tag=Tag;_this1451.ElementType=ElementType;_this1451.PredefinedType=PredefinedType;_this1451.type=2635815018;return _this1451;}return _createClass(IfcDiscreteAccessoryType);}(IfcElementComponentType);IFC42.IfcDiscreteAccessoryType=IfcDiscreteAccessoryType;var IfcDistributionChamberElementType=/*#__PURE__*/function(_IfcDistributionFlowE27){_inherits(IfcDistributionChamberElementType,_IfcDistributionFlowE27);var _super1455=_createSuper(IfcDistributionChamberElementType);function IfcDistributionChamberElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1452;_classCallCheck(this,IfcDistributionChamberElementType);_this1452=_super1455.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1452.GlobalId=GlobalId;_this1452.OwnerHistory=OwnerHistory;_this1452.Name=Name;_this1452.Description=Description;_this1452.ApplicableOccurrence=ApplicableOccurrence;_this1452.HasPropertySets=HasPropertySets;_this1452.RepresentationMaps=RepresentationMaps;_this1452.Tag=Tag;_this1452.ElementType=ElementType;_this1452.PredefinedType=PredefinedType;_this1452.type=1599208980;return _this1452;}return _createClass(IfcDistributionChamberElementType);}(IfcDistributionFlowElementType);IFC42.IfcDistributionChamberElementType=IfcDistributionChamberElementType;var IfcDistributionControlElementType=/*#__PURE__*/function(_IfcDistributionEleme6){_inherits(IfcDistributionControlElementType,_IfcDistributionEleme6);var _super1456=_createSuper(IfcDistributionControlElementType);function IfcDistributionControlElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1453;_classCallCheck(this,IfcDistributionControlElementType);_this1453=_super1456.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1453.GlobalId=GlobalId;_this1453.OwnerHistory=OwnerHistory;_this1453.Name=Name;_this1453.Description=Description;_this1453.ApplicableOccurrence=ApplicableOccurrence;_this1453.HasPropertySets=HasPropertySets;_this1453.RepresentationMaps=RepresentationMaps;_this1453.Tag=Tag;_this1453.ElementType=ElementType;_this1453.type=2063403501;return _this1453;}return _createClass(IfcDistributionControlElementType);}(IfcDistributionElementType);IFC42.IfcDistributionControlElementType=IfcDistributionControlElementType;var IfcDistributionElement=/*#__PURE__*/function(_IfcElement20){_inherits(IfcDistributionElement,_IfcElement20);var _super1457=_createSuper(IfcDistributionElement);function IfcDistributionElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1454;_classCallCheck(this,IfcDistributionElement);_this1454=_super1457.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1454.GlobalId=GlobalId;_this1454.OwnerHistory=OwnerHistory;_this1454.Name=Name;_this1454.Description=Description;_this1454.ObjectType=ObjectType;_this1454.ObjectPlacement=ObjectPlacement;_this1454.Representation=Representation;_this1454.Tag=Tag;_this1454.type=1945004755;return _this1454;}return _createClass(IfcDistributionElement);}(IfcElement);IFC42.IfcDistributionElement=IfcDistributionElement;var IfcDistributionFlowElement=/*#__PURE__*/function(_IfcDistributionEleme7){_inherits(IfcDistributionFlowElement,_IfcDistributionEleme7);var _super1458=_createSuper(IfcDistributionFlowElement);function IfcDistributionFlowElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1455;_classCallCheck(this,IfcDistributionFlowElement);_this1455=_super1458.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1455.GlobalId=GlobalId;_this1455.OwnerHistory=OwnerHistory;_this1455.Name=Name;_this1455.Description=Description;_this1455.ObjectType=ObjectType;_this1455.ObjectPlacement=ObjectPlacement;_this1455.Representation=Representation;_this1455.Tag=Tag;_this1455.type=3040386961;return _this1455;}return _createClass(IfcDistributionFlowElement);}(IfcDistributionElement);IFC42.IfcDistributionFlowElement=IfcDistributionFlowElement;var IfcDistributionPort=/*#__PURE__*/function(_IfcPort2){_inherits(IfcDistributionPort,_IfcPort2);var _super1459=_createSuper(IfcDistributionPort);function IfcDistributionPort(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,FlowDirection,PredefinedType,SystemType){var _this1456;_classCallCheck(this,IfcDistributionPort);_this1456=_super1459.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this1456.GlobalId=GlobalId;_this1456.OwnerHistory=OwnerHistory;_this1456.Name=Name;_this1456.Description=Description;_this1456.ObjectType=ObjectType;_this1456.ObjectPlacement=ObjectPlacement;_this1456.Representation=Representation;_this1456.FlowDirection=FlowDirection;_this1456.PredefinedType=PredefinedType;_this1456.SystemType=SystemType;_this1456.type=3041715199;return _this1456;}return _createClass(IfcDistributionPort);}(IfcPort);IFC42.IfcDistributionPort=IfcDistributionPort;var IfcDistributionSystem=/*#__PURE__*/function(_IfcSystem5){_inherits(IfcDistributionSystem,_IfcSystem5);var _super1460=_createSuper(IfcDistributionSystem);function IfcDistributionSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,PredefinedType){var _this1457;_classCallCheck(this,IfcDistributionSystem);_this1457=_super1460.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1457.GlobalId=GlobalId;_this1457.OwnerHistory=OwnerHistory;_this1457.Name=Name;_this1457.Description=Description;_this1457.ObjectType=ObjectType;_this1457.LongName=LongName;_this1457.PredefinedType=PredefinedType;_this1457.type=3205830791;return _this1457;}return _createClass(IfcDistributionSystem);}(IfcSystem);IFC42.IfcDistributionSystem=IfcDistributionSystem;var IfcDoor=/*#__PURE__*/function(_IfcBuildingElement26){_inherits(IfcDoor,_IfcBuildingElement26);var _super1461=_createSuper(IfcDoor);function IfcDoor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,OperationType,UserDefinedOperationType){var _this1458;_classCallCheck(this,IfcDoor);_this1458=_super1461.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1458.GlobalId=GlobalId;_this1458.OwnerHistory=OwnerHistory;_this1458.Name=Name;_this1458.Description=Description;_this1458.ObjectType=ObjectType;_this1458.ObjectPlacement=ObjectPlacement;_this1458.Representation=Representation;_this1458.Tag=Tag;_this1458.OverallHeight=OverallHeight;_this1458.OverallWidth=OverallWidth;_this1458.PredefinedType=PredefinedType;_this1458.OperationType=OperationType;_this1458.UserDefinedOperationType=UserDefinedOperationType;_this1458.type=395920057;return _this1458;}return _createClass(IfcDoor);}(IfcBuildingElement);IFC42.IfcDoor=IfcDoor;var IfcDoorStandardCase=/*#__PURE__*/function(_IfcDoor){_inherits(IfcDoorStandardCase,_IfcDoor);var _super1462=_createSuper(IfcDoorStandardCase);function IfcDoorStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,OperationType,UserDefinedOperationType){var _this1459;_classCallCheck(this,IfcDoorStandardCase);_this1459=_super1462.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,OperationType,UserDefinedOperationType);_this1459.GlobalId=GlobalId;_this1459.OwnerHistory=OwnerHistory;_this1459.Name=Name;_this1459.Description=Description;_this1459.ObjectType=ObjectType;_this1459.ObjectPlacement=ObjectPlacement;_this1459.Representation=Representation;_this1459.Tag=Tag;_this1459.OverallHeight=OverallHeight;_this1459.OverallWidth=OverallWidth;_this1459.PredefinedType=PredefinedType;_this1459.OperationType=OperationType;_this1459.UserDefinedOperationType=UserDefinedOperationType;_this1459.type=3242481149;return _this1459;}return _createClass(IfcDoorStandardCase);}(IfcDoor);IFC42.IfcDoorStandardCase=IfcDoorStandardCase;var IfcDuctFittingType=/*#__PURE__*/function(_IfcFlowFittingType9){_inherits(IfcDuctFittingType,_IfcFlowFittingType9);var _super1463=_createSuper(IfcDuctFittingType);function IfcDuctFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1460;_classCallCheck(this,IfcDuctFittingType);_this1460=_super1463.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1460.GlobalId=GlobalId;_this1460.OwnerHistory=OwnerHistory;_this1460.Name=Name;_this1460.Description=Description;_this1460.ApplicableOccurrence=ApplicableOccurrence;_this1460.HasPropertySets=HasPropertySets;_this1460.RepresentationMaps=RepresentationMaps;_this1460.Tag=Tag;_this1460.ElementType=ElementType;_this1460.PredefinedType=PredefinedType;_this1460.type=869906466;return _this1460;}return _createClass(IfcDuctFittingType);}(IfcFlowFittingType);IFC42.IfcDuctFittingType=IfcDuctFittingType;var IfcDuctSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType8){_inherits(IfcDuctSegmentType,_IfcFlowSegmentType8);var _super1464=_createSuper(IfcDuctSegmentType);function IfcDuctSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1461;_classCallCheck(this,IfcDuctSegmentType);_this1461=_super1464.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1461.GlobalId=GlobalId;_this1461.OwnerHistory=OwnerHistory;_this1461.Name=Name;_this1461.Description=Description;_this1461.ApplicableOccurrence=ApplicableOccurrence;_this1461.HasPropertySets=HasPropertySets;_this1461.RepresentationMaps=RepresentationMaps;_this1461.Tag=Tag;_this1461.ElementType=ElementType;_this1461.PredefinedType=PredefinedType;_this1461.type=3760055223;return _this1461;}return _createClass(IfcDuctSegmentType);}(IfcFlowSegmentType);IFC42.IfcDuctSegmentType=IfcDuctSegmentType;var IfcDuctSilencerType=/*#__PURE__*/function(_IfcFlowTreatmentDevi4){_inherits(IfcDuctSilencerType,_IfcFlowTreatmentDevi4);var _super1465=_createSuper(IfcDuctSilencerType);function IfcDuctSilencerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1462;_classCallCheck(this,IfcDuctSilencerType);_this1462=_super1465.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1462.GlobalId=GlobalId;_this1462.OwnerHistory=OwnerHistory;_this1462.Name=Name;_this1462.Description=Description;_this1462.ApplicableOccurrence=ApplicableOccurrence;_this1462.HasPropertySets=HasPropertySets;_this1462.RepresentationMaps=RepresentationMaps;_this1462.Tag=Tag;_this1462.ElementType=ElementType;_this1462.PredefinedType=PredefinedType;_this1462.type=2030761528;return _this1462;}return _createClass(IfcDuctSilencerType);}(IfcFlowTreatmentDeviceType);IFC42.IfcDuctSilencerType=IfcDuctSilencerType;var IfcElectricApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType23){_inherits(IfcElectricApplianceType,_IfcFlowTerminalType23);var _super1466=_createSuper(IfcElectricApplianceType);function IfcElectricApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1463;_classCallCheck(this,IfcElectricApplianceType);_this1463=_super1466.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1463.GlobalId=GlobalId;_this1463.OwnerHistory=OwnerHistory;_this1463.Name=Name;_this1463.Description=Description;_this1463.ApplicableOccurrence=ApplicableOccurrence;_this1463.HasPropertySets=HasPropertySets;_this1463.RepresentationMaps=RepresentationMaps;_this1463.Tag=Tag;_this1463.ElementType=ElementType;_this1463.PredefinedType=PredefinedType;_this1463.type=663422040;return _this1463;}return _createClass(IfcElectricApplianceType);}(IfcFlowTerminalType);IFC42.IfcElectricApplianceType=IfcElectricApplianceType;var IfcElectricDistributionBoardType=/*#__PURE__*/function(_IfcFlowControllerTyp14){_inherits(IfcElectricDistributionBoardType,_IfcFlowControllerTyp14);var _super1467=_createSuper(IfcElectricDistributionBoardType);function IfcElectricDistributionBoardType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1464;_classCallCheck(this,IfcElectricDistributionBoardType);_this1464=_super1467.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1464.GlobalId=GlobalId;_this1464.OwnerHistory=OwnerHistory;_this1464.Name=Name;_this1464.Description=Description;_this1464.ApplicableOccurrence=ApplicableOccurrence;_this1464.HasPropertySets=HasPropertySets;_this1464.RepresentationMaps=RepresentationMaps;_this1464.Tag=Tag;_this1464.ElementType=ElementType;_this1464.PredefinedType=PredefinedType;_this1464.type=2417008758;return _this1464;}return _createClass(IfcElectricDistributionBoardType);}(IfcFlowControllerType);IFC42.IfcElectricDistributionBoardType=IfcElectricDistributionBoardType;var IfcElectricFlowStorageDeviceType=/*#__PURE__*/function(_IfcFlowStorageDevice4){_inherits(IfcElectricFlowStorageDeviceType,_IfcFlowStorageDevice4);var _super1468=_createSuper(IfcElectricFlowStorageDeviceType);function IfcElectricFlowStorageDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1465;_classCallCheck(this,IfcElectricFlowStorageDeviceType);_this1465=_super1468.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1465.GlobalId=GlobalId;_this1465.OwnerHistory=OwnerHistory;_this1465.Name=Name;_this1465.Description=Description;_this1465.ApplicableOccurrence=ApplicableOccurrence;_this1465.HasPropertySets=HasPropertySets;_this1465.RepresentationMaps=RepresentationMaps;_this1465.Tag=Tag;_this1465.ElementType=ElementType;_this1465.PredefinedType=PredefinedType;_this1465.type=3277789161;return _this1465;}return _createClass(IfcElectricFlowStorageDeviceType);}(IfcFlowStorageDeviceType);IFC42.IfcElectricFlowStorageDeviceType=IfcElectricFlowStorageDeviceType;var IfcElectricGeneratorType=/*#__PURE__*/function(_IfcEnergyConversionD37){_inherits(IfcElectricGeneratorType,_IfcEnergyConversionD37);var _super1469=_createSuper(IfcElectricGeneratorType);function IfcElectricGeneratorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1466;_classCallCheck(this,IfcElectricGeneratorType);_this1466=_super1469.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1466.GlobalId=GlobalId;_this1466.OwnerHistory=OwnerHistory;_this1466.Name=Name;_this1466.Description=Description;_this1466.ApplicableOccurrence=ApplicableOccurrence;_this1466.HasPropertySets=HasPropertySets;_this1466.RepresentationMaps=RepresentationMaps;_this1466.Tag=Tag;_this1466.ElementType=ElementType;_this1466.PredefinedType=PredefinedType;_this1466.type=1534661035;return _this1466;}return _createClass(IfcElectricGeneratorType);}(IfcEnergyConversionDeviceType);IFC42.IfcElectricGeneratorType=IfcElectricGeneratorType;var IfcElectricMotorType=/*#__PURE__*/function(_IfcEnergyConversionD38){_inherits(IfcElectricMotorType,_IfcEnergyConversionD38);var _super1470=_createSuper(IfcElectricMotorType);function IfcElectricMotorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1467;_classCallCheck(this,IfcElectricMotorType);_this1467=_super1470.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1467.GlobalId=GlobalId;_this1467.OwnerHistory=OwnerHistory;_this1467.Name=Name;_this1467.Description=Description;_this1467.ApplicableOccurrence=ApplicableOccurrence;_this1467.HasPropertySets=HasPropertySets;_this1467.RepresentationMaps=RepresentationMaps;_this1467.Tag=Tag;_this1467.ElementType=ElementType;_this1467.PredefinedType=PredefinedType;_this1467.type=1217240411;return _this1467;}return _createClass(IfcElectricMotorType);}(IfcEnergyConversionDeviceType);IFC42.IfcElectricMotorType=IfcElectricMotorType;var IfcElectricTimeControlType=/*#__PURE__*/function(_IfcFlowControllerTyp15){_inherits(IfcElectricTimeControlType,_IfcFlowControllerTyp15);var _super1471=_createSuper(IfcElectricTimeControlType);function IfcElectricTimeControlType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1468;_classCallCheck(this,IfcElectricTimeControlType);_this1468=_super1471.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1468.GlobalId=GlobalId;_this1468.OwnerHistory=OwnerHistory;_this1468.Name=Name;_this1468.Description=Description;_this1468.ApplicableOccurrence=ApplicableOccurrence;_this1468.HasPropertySets=HasPropertySets;_this1468.RepresentationMaps=RepresentationMaps;_this1468.Tag=Tag;_this1468.ElementType=ElementType;_this1468.PredefinedType=PredefinedType;_this1468.type=712377611;return _this1468;}return _createClass(IfcElectricTimeControlType);}(IfcFlowControllerType);IFC42.IfcElectricTimeControlType=IfcElectricTimeControlType;var IfcEnergyConversionDevice=/*#__PURE__*/function(_IfcDistributionFlowE28){_inherits(IfcEnergyConversionDevice,_IfcDistributionFlowE28);var _super1472=_createSuper(IfcEnergyConversionDevice);function IfcEnergyConversionDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1469;_classCallCheck(this,IfcEnergyConversionDevice);_this1469=_super1472.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1469.GlobalId=GlobalId;_this1469.OwnerHistory=OwnerHistory;_this1469.Name=Name;_this1469.Description=Description;_this1469.ObjectType=ObjectType;_this1469.ObjectPlacement=ObjectPlacement;_this1469.Representation=Representation;_this1469.Tag=Tag;_this1469.type=1658829314;return _this1469;}return _createClass(IfcEnergyConversionDevice);}(IfcDistributionFlowElement);IFC42.IfcEnergyConversionDevice=IfcEnergyConversionDevice;var IfcEngine=/*#__PURE__*/function(_IfcEnergyConversionD39){_inherits(IfcEngine,_IfcEnergyConversionD39);var _super1473=_createSuper(IfcEngine);function IfcEngine(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1470;_classCallCheck(this,IfcEngine);_this1470=_super1473.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1470.GlobalId=GlobalId;_this1470.OwnerHistory=OwnerHistory;_this1470.Name=Name;_this1470.Description=Description;_this1470.ObjectType=ObjectType;_this1470.ObjectPlacement=ObjectPlacement;_this1470.Representation=Representation;_this1470.Tag=Tag;_this1470.PredefinedType=PredefinedType;_this1470.type=2814081492;return _this1470;}return _createClass(IfcEngine);}(IfcEnergyConversionDevice);IFC42.IfcEngine=IfcEngine;var IfcEvaporativeCooler=/*#__PURE__*/function(_IfcEnergyConversionD40){_inherits(IfcEvaporativeCooler,_IfcEnergyConversionD40);var _super1474=_createSuper(IfcEvaporativeCooler);function IfcEvaporativeCooler(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1471;_classCallCheck(this,IfcEvaporativeCooler);_this1471=_super1474.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1471.GlobalId=GlobalId;_this1471.OwnerHistory=OwnerHistory;_this1471.Name=Name;_this1471.Description=Description;_this1471.ObjectType=ObjectType;_this1471.ObjectPlacement=ObjectPlacement;_this1471.Representation=Representation;_this1471.Tag=Tag;_this1471.PredefinedType=PredefinedType;_this1471.type=3747195512;return _this1471;}return _createClass(IfcEvaporativeCooler);}(IfcEnergyConversionDevice);IFC42.IfcEvaporativeCooler=IfcEvaporativeCooler;var IfcEvaporator=/*#__PURE__*/function(_IfcEnergyConversionD41){_inherits(IfcEvaporator,_IfcEnergyConversionD41);var _super1475=_createSuper(IfcEvaporator);function IfcEvaporator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1472;_classCallCheck(this,IfcEvaporator);_this1472=_super1475.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1472.GlobalId=GlobalId;_this1472.OwnerHistory=OwnerHistory;_this1472.Name=Name;_this1472.Description=Description;_this1472.ObjectType=ObjectType;_this1472.ObjectPlacement=ObjectPlacement;_this1472.Representation=Representation;_this1472.Tag=Tag;_this1472.PredefinedType=PredefinedType;_this1472.type=484807127;return _this1472;}return _createClass(IfcEvaporator);}(IfcEnergyConversionDevice);IFC42.IfcEvaporator=IfcEvaporator;var IfcExternalSpatialElement=/*#__PURE__*/function(_IfcExternalSpatialSt){_inherits(IfcExternalSpatialElement,_IfcExternalSpatialSt);var _super1476=_createSuper(IfcExternalSpatialElement);function IfcExternalSpatialElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,PredefinedType){var _this1473;_classCallCheck(this,IfcExternalSpatialElement);_this1473=_super1476.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this1473.GlobalId=GlobalId;_this1473.OwnerHistory=OwnerHistory;_this1473.Name=Name;_this1473.Description=Description;_this1473.ObjectType=ObjectType;_this1473.ObjectPlacement=ObjectPlacement;_this1473.Representation=Representation;_this1473.LongName=LongName;_this1473.PredefinedType=PredefinedType;_this1473.type=1209101575;return _this1473;}return _createClass(IfcExternalSpatialElement);}(IfcExternalSpatialStructureElement);IFC42.IfcExternalSpatialElement=IfcExternalSpatialElement;var IfcFanType=/*#__PURE__*/function(_IfcFlowMovingDeviceT6){_inherits(IfcFanType,_IfcFlowMovingDeviceT6);var _super1477=_createSuper(IfcFanType);function IfcFanType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1474;_classCallCheck(this,IfcFanType);_this1474=_super1477.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1474.GlobalId=GlobalId;_this1474.OwnerHistory=OwnerHistory;_this1474.Name=Name;_this1474.Description=Description;_this1474.ApplicableOccurrence=ApplicableOccurrence;_this1474.HasPropertySets=HasPropertySets;_this1474.RepresentationMaps=RepresentationMaps;_this1474.Tag=Tag;_this1474.ElementType=ElementType;_this1474.PredefinedType=PredefinedType;_this1474.type=346874300;return _this1474;}return _createClass(IfcFanType);}(IfcFlowMovingDeviceType);IFC42.IfcFanType=IfcFanType;var IfcFilterType=/*#__PURE__*/function(_IfcFlowTreatmentDevi5){_inherits(IfcFilterType,_IfcFlowTreatmentDevi5);var _super1478=_createSuper(IfcFilterType);function IfcFilterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1475;_classCallCheck(this,IfcFilterType);_this1475=_super1478.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1475.GlobalId=GlobalId;_this1475.OwnerHistory=OwnerHistory;_this1475.Name=Name;_this1475.Description=Description;_this1475.ApplicableOccurrence=ApplicableOccurrence;_this1475.HasPropertySets=HasPropertySets;_this1475.RepresentationMaps=RepresentationMaps;_this1475.Tag=Tag;_this1475.ElementType=ElementType;_this1475.PredefinedType=PredefinedType;_this1475.type=1810631287;return _this1475;}return _createClass(IfcFilterType);}(IfcFlowTreatmentDeviceType);IFC42.IfcFilterType=IfcFilterType;var IfcFireSuppressionTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType24){_inherits(IfcFireSuppressionTerminalType,_IfcFlowTerminalType24);var _super1479=_createSuper(IfcFireSuppressionTerminalType);function IfcFireSuppressionTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1476;_classCallCheck(this,IfcFireSuppressionTerminalType);_this1476=_super1479.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1476.GlobalId=GlobalId;_this1476.OwnerHistory=OwnerHistory;_this1476.Name=Name;_this1476.Description=Description;_this1476.ApplicableOccurrence=ApplicableOccurrence;_this1476.HasPropertySets=HasPropertySets;_this1476.RepresentationMaps=RepresentationMaps;_this1476.Tag=Tag;_this1476.ElementType=ElementType;_this1476.PredefinedType=PredefinedType;_this1476.type=4222183408;return _this1476;}return _createClass(IfcFireSuppressionTerminalType);}(IfcFlowTerminalType);IFC42.IfcFireSuppressionTerminalType=IfcFireSuppressionTerminalType;var IfcFlowController=/*#__PURE__*/function(_IfcDistributionFlowE29){_inherits(IfcFlowController,_IfcDistributionFlowE29);var _super1480=_createSuper(IfcFlowController);function IfcFlowController(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1477;_classCallCheck(this,IfcFlowController);_this1477=_super1480.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1477.GlobalId=GlobalId;_this1477.OwnerHistory=OwnerHistory;_this1477.Name=Name;_this1477.Description=Description;_this1477.ObjectType=ObjectType;_this1477.ObjectPlacement=ObjectPlacement;_this1477.Representation=Representation;_this1477.Tag=Tag;_this1477.type=2058353004;return _this1477;}return _createClass(IfcFlowController);}(IfcDistributionFlowElement);IFC42.IfcFlowController=IfcFlowController;var IfcFlowFitting=/*#__PURE__*/function(_IfcDistributionFlowE30){_inherits(IfcFlowFitting,_IfcDistributionFlowE30);var _super1481=_createSuper(IfcFlowFitting);function IfcFlowFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1478;_classCallCheck(this,IfcFlowFitting);_this1478=_super1481.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1478.GlobalId=GlobalId;_this1478.OwnerHistory=OwnerHistory;_this1478.Name=Name;_this1478.Description=Description;_this1478.ObjectType=ObjectType;_this1478.ObjectPlacement=ObjectPlacement;_this1478.Representation=Representation;_this1478.Tag=Tag;_this1478.type=4278956645;return _this1478;}return _createClass(IfcFlowFitting);}(IfcDistributionFlowElement);IFC42.IfcFlowFitting=IfcFlowFitting;var IfcFlowInstrumentType=/*#__PURE__*/function(_IfcDistributionContr6){_inherits(IfcFlowInstrumentType,_IfcDistributionContr6);var _super1482=_createSuper(IfcFlowInstrumentType);function IfcFlowInstrumentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1479;_classCallCheck(this,IfcFlowInstrumentType);_this1479=_super1482.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1479.GlobalId=GlobalId;_this1479.OwnerHistory=OwnerHistory;_this1479.Name=Name;_this1479.Description=Description;_this1479.ApplicableOccurrence=ApplicableOccurrence;_this1479.HasPropertySets=HasPropertySets;_this1479.RepresentationMaps=RepresentationMaps;_this1479.Tag=Tag;_this1479.ElementType=ElementType;_this1479.PredefinedType=PredefinedType;_this1479.type=4037862832;return _this1479;}return _createClass(IfcFlowInstrumentType);}(IfcDistributionControlElementType);IFC42.IfcFlowInstrumentType=IfcFlowInstrumentType;var IfcFlowMeter=/*#__PURE__*/function(_IfcFlowController2){_inherits(IfcFlowMeter,_IfcFlowController2);var _super1483=_createSuper(IfcFlowMeter);function IfcFlowMeter(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1480;_classCallCheck(this,IfcFlowMeter);_this1480=_super1483.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1480.GlobalId=GlobalId;_this1480.OwnerHistory=OwnerHistory;_this1480.Name=Name;_this1480.Description=Description;_this1480.ObjectType=ObjectType;_this1480.ObjectPlacement=ObjectPlacement;_this1480.Representation=Representation;_this1480.Tag=Tag;_this1480.PredefinedType=PredefinedType;_this1480.type=2188021234;return _this1480;}return _createClass(IfcFlowMeter);}(IfcFlowController);IFC42.IfcFlowMeter=IfcFlowMeter;var IfcFlowMovingDevice=/*#__PURE__*/function(_IfcDistributionFlowE31){_inherits(IfcFlowMovingDevice,_IfcDistributionFlowE31);var _super1484=_createSuper(IfcFlowMovingDevice);function IfcFlowMovingDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1481;_classCallCheck(this,IfcFlowMovingDevice);_this1481=_super1484.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1481.GlobalId=GlobalId;_this1481.OwnerHistory=OwnerHistory;_this1481.Name=Name;_this1481.Description=Description;_this1481.ObjectType=ObjectType;_this1481.ObjectPlacement=ObjectPlacement;_this1481.Representation=Representation;_this1481.Tag=Tag;_this1481.type=3132237377;return _this1481;}return _createClass(IfcFlowMovingDevice);}(IfcDistributionFlowElement);IFC42.IfcFlowMovingDevice=IfcFlowMovingDevice;var IfcFlowSegment=/*#__PURE__*/function(_IfcDistributionFlowE32){_inherits(IfcFlowSegment,_IfcDistributionFlowE32);var _super1485=_createSuper(IfcFlowSegment);function IfcFlowSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1482;_classCallCheck(this,IfcFlowSegment);_this1482=_super1485.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1482.GlobalId=GlobalId;_this1482.OwnerHistory=OwnerHistory;_this1482.Name=Name;_this1482.Description=Description;_this1482.ObjectType=ObjectType;_this1482.ObjectPlacement=ObjectPlacement;_this1482.Representation=Representation;_this1482.Tag=Tag;_this1482.type=987401354;return _this1482;}return _createClass(IfcFlowSegment);}(IfcDistributionFlowElement);IFC42.IfcFlowSegment=IfcFlowSegment;var IfcFlowStorageDevice=/*#__PURE__*/function(_IfcDistributionFlowE33){_inherits(IfcFlowStorageDevice,_IfcDistributionFlowE33);var _super1486=_createSuper(IfcFlowStorageDevice);function IfcFlowStorageDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1483;_classCallCheck(this,IfcFlowStorageDevice);_this1483=_super1486.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1483.GlobalId=GlobalId;_this1483.OwnerHistory=OwnerHistory;_this1483.Name=Name;_this1483.Description=Description;_this1483.ObjectType=ObjectType;_this1483.ObjectPlacement=ObjectPlacement;_this1483.Representation=Representation;_this1483.Tag=Tag;_this1483.type=707683696;return _this1483;}return _createClass(IfcFlowStorageDevice);}(IfcDistributionFlowElement);IFC42.IfcFlowStorageDevice=IfcFlowStorageDevice;var IfcFlowTerminal=/*#__PURE__*/function(_IfcDistributionFlowE34){_inherits(IfcFlowTerminal,_IfcDistributionFlowE34);var _super1487=_createSuper(IfcFlowTerminal);function IfcFlowTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1484;_classCallCheck(this,IfcFlowTerminal);_this1484=_super1487.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1484.GlobalId=GlobalId;_this1484.OwnerHistory=OwnerHistory;_this1484.Name=Name;_this1484.Description=Description;_this1484.ObjectType=ObjectType;_this1484.ObjectPlacement=ObjectPlacement;_this1484.Representation=Representation;_this1484.Tag=Tag;_this1484.type=2223149337;return _this1484;}return _createClass(IfcFlowTerminal);}(IfcDistributionFlowElement);IFC42.IfcFlowTerminal=IfcFlowTerminal;var IfcFlowTreatmentDevice=/*#__PURE__*/function(_IfcDistributionFlowE35){_inherits(IfcFlowTreatmentDevice,_IfcDistributionFlowE35);var _super1488=_createSuper(IfcFlowTreatmentDevice);function IfcFlowTreatmentDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1485;_classCallCheck(this,IfcFlowTreatmentDevice);_this1485=_super1488.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1485.GlobalId=GlobalId;_this1485.OwnerHistory=OwnerHistory;_this1485.Name=Name;_this1485.Description=Description;_this1485.ObjectType=ObjectType;_this1485.ObjectPlacement=ObjectPlacement;_this1485.Representation=Representation;_this1485.Tag=Tag;_this1485.type=3508470533;return _this1485;}return _createClass(IfcFlowTreatmentDevice);}(IfcDistributionFlowElement);IFC42.IfcFlowTreatmentDevice=IfcFlowTreatmentDevice;var IfcFooting=/*#__PURE__*/function(_IfcBuildingElement27){_inherits(IfcFooting,_IfcBuildingElement27);var _super1489=_createSuper(IfcFooting);function IfcFooting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1486;_classCallCheck(this,IfcFooting);_this1486=_super1489.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1486.GlobalId=GlobalId;_this1486.OwnerHistory=OwnerHistory;_this1486.Name=Name;_this1486.Description=Description;_this1486.ObjectType=ObjectType;_this1486.ObjectPlacement=ObjectPlacement;_this1486.Representation=Representation;_this1486.Tag=Tag;_this1486.PredefinedType=PredefinedType;_this1486.type=900683007;return _this1486;}return _createClass(IfcFooting);}(IfcBuildingElement);IFC42.IfcFooting=IfcFooting;var IfcHeatExchanger=/*#__PURE__*/function(_IfcEnergyConversionD42){_inherits(IfcHeatExchanger,_IfcEnergyConversionD42);var _super1490=_createSuper(IfcHeatExchanger);function IfcHeatExchanger(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1487;_classCallCheck(this,IfcHeatExchanger);_this1487=_super1490.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1487.GlobalId=GlobalId;_this1487.OwnerHistory=OwnerHistory;_this1487.Name=Name;_this1487.Description=Description;_this1487.ObjectType=ObjectType;_this1487.ObjectPlacement=ObjectPlacement;_this1487.Representation=Representation;_this1487.Tag=Tag;_this1487.PredefinedType=PredefinedType;_this1487.type=3319311131;return _this1487;}return _createClass(IfcHeatExchanger);}(IfcEnergyConversionDevice);IFC42.IfcHeatExchanger=IfcHeatExchanger;var IfcHumidifier=/*#__PURE__*/function(_IfcEnergyConversionD43){_inherits(IfcHumidifier,_IfcEnergyConversionD43);var _super1491=_createSuper(IfcHumidifier);function IfcHumidifier(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1488;_classCallCheck(this,IfcHumidifier);_this1488=_super1491.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1488.GlobalId=GlobalId;_this1488.OwnerHistory=OwnerHistory;_this1488.Name=Name;_this1488.Description=Description;_this1488.ObjectType=ObjectType;_this1488.ObjectPlacement=ObjectPlacement;_this1488.Representation=Representation;_this1488.Tag=Tag;_this1488.PredefinedType=PredefinedType;_this1488.type=2068733104;return _this1488;}return _createClass(IfcHumidifier);}(IfcEnergyConversionDevice);IFC42.IfcHumidifier=IfcHumidifier;var IfcInterceptor=/*#__PURE__*/function(_IfcFlowTreatmentDevi6){_inherits(IfcInterceptor,_IfcFlowTreatmentDevi6);var _super1492=_createSuper(IfcInterceptor);function IfcInterceptor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1489;_classCallCheck(this,IfcInterceptor);_this1489=_super1492.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1489.GlobalId=GlobalId;_this1489.OwnerHistory=OwnerHistory;_this1489.Name=Name;_this1489.Description=Description;_this1489.ObjectType=ObjectType;_this1489.ObjectPlacement=ObjectPlacement;_this1489.Representation=Representation;_this1489.Tag=Tag;_this1489.PredefinedType=PredefinedType;_this1489.type=4175244083;return _this1489;}return _createClass(IfcInterceptor);}(IfcFlowTreatmentDevice);IFC42.IfcInterceptor=IfcInterceptor;var IfcJunctionBox=/*#__PURE__*/function(_IfcFlowFitting){_inherits(IfcJunctionBox,_IfcFlowFitting);var _super1493=_createSuper(IfcJunctionBox);function IfcJunctionBox(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1490;_classCallCheck(this,IfcJunctionBox);_this1490=_super1493.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1490.GlobalId=GlobalId;_this1490.OwnerHistory=OwnerHistory;_this1490.Name=Name;_this1490.Description=Description;_this1490.ObjectType=ObjectType;_this1490.ObjectPlacement=ObjectPlacement;_this1490.Representation=Representation;_this1490.Tag=Tag;_this1490.PredefinedType=PredefinedType;_this1490.type=2176052936;return _this1490;}return _createClass(IfcJunctionBox);}(IfcFlowFitting);IFC42.IfcJunctionBox=IfcJunctionBox;var IfcLamp=/*#__PURE__*/function(_IfcFlowTerminal){_inherits(IfcLamp,_IfcFlowTerminal);var _super1494=_createSuper(IfcLamp);function IfcLamp(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1491;_classCallCheck(this,IfcLamp);_this1491=_super1494.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1491.GlobalId=GlobalId;_this1491.OwnerHistory=OwnerHistory;_this1491.Name=Name;_this1491.Description=Description;_this1491.ObjectType=ObjectType;_this1491.ObjectPlacement=ObjectPlacement;_this1491.Representation=Representation;_this1491.Tag=Tag;_this1491.PredefinedType=PredefinedType;_this1491.type=76236018;return _this1491;}return _createClass(IfcLamp);}(IfcFlowTerminal);IFC42.IfcLamp=IfcLamp;var IfcLightFixture=/*#__PURE__*/function(_IfcFlowTerminal2){_inherits(IfcLightFixture,_IfcFlowTerminal2);var _super1495=_createSuper(IfcLightFixture);function IfcLightFixture(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1492;_classCallCheck(this,IfcLightFixture);_this1492=_super1495.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1492.GlobalId=GlobalId;_this1492.OwnerHistory=OwnerHistory;_this1492.Name=Name;_this1492.Description=Description;_this1492.ObjectType=ObjectType;_this1492.ObjectPlacement=ObjectPlacement;_this1492.Representation=Representation;_this1492.Tag=Tag;_this1492.PredefinedType=PredefinedType;_this1492.type=629592764;return _this1492;}return _createClass(IfcLightFixture);}(IfcFlowTerminal);IFC42.IfcLightFixture=IfcLightFixture;var IfcMedicalDevice=/*#__PURE__*/function(_IfcFlowTerminal3){_inherits(IfcMedicalDevice,_IfcFlowTerminal3);var _super1496=_createSuper(IfcMedicalDevice);function IfcMedicalDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1493;_classCallCheck(this,IfcMedicalDevice);_this1493=_super1496.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1493.GlobalId=GlobalId;_this1493.OwnerHistory=OwnerHistory;_this1493.Name=Name;_this1493.Description=Description;_this1493.ObjectType=ObjectType;_this1493.ObjectPlacement=ObjectPlacement;_this1493.Representation=Representation;_this1493.Tag=Tag;_this1493.PredefinedType=PredefinedType;_this1493.type=1437502449;return _this1493;}return _createClass(IfcMedicalDevice);}(IfcFlowTerminal);IFC42.IfcMedicalDevice=IfcMedicalDevice;var IfcMember=/*#__PURE__*/function(_IfcBuildingElement28){_inherits(IfcMember,_IfcBuildingElement28);var _super1497=_createSuper(IfcMember);function IfcMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1494;_classCallCheck(this,IfcMember);_this1494=_super1497.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1494.GlobalId=GlobalId;_this1494.OwnerHistory=OwnerHistory;_this1494.Name=Name;_this1494.Description=Description;_this1494.ObjectType=ObjectType;_this1494.ObjectPlacement=ObjectPlacement;_this1494.Representation=Representation;_this1494.Tag=Tag;_this1494.PredefinedType=PredefinedType;_this1494.type=1073191201;return _this1494;}return _createClass(IfcMember);}(IfcBuildingElement);IFC42.IfcMember=IfcMember;var IfcMemberStandardCase=/*#__PURE__*/function(_IfcMember){_inherits(IfcMemberStandardCase,_IfcMember);var _super1498=_createSuper(IfcMemberStandardCase);function IfcMemberStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1495;_classCallCheck(this,IfcMemberStandardCase);_this1495=_super1498.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1495.GlobalId=GlobalId;_this1495.OwnerHistory=OwnerHistory;_this1495.Name=Name;_this1495.Description=Description;_this1495.ObjectType=ObjectType;_this1495.ObjectPlacement=ObjectPlacement;_this1495.Representation=Representation;_this1495.Tag=Tag;_this1495.PredefinedType=PredefinedType;_this1495.type=1911478936;return _this1495;}return _createClass(IfcMemberStandardCase);}(IfcMember);IFC42.IfcMemberStandardCase=IfcMemberStandardCase;var IfcMotorConnection=/*#__PURE__*/function(_IfcEnergyConversionD44){_inherits(IfcMotorConnection,_IfcEnergyConversionD44);var _super1499=_createSuper(IfcMotorConnection);function IfcMotorConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1496;_classCallCheck(this,IfcMotorConnection);_this1496=_super1499.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1496.GlobalId=GlobalId;_this1496.OwnerHistory=OwnerHistory;_this1496.Name=Name;_this1496.Description=Description;_this1496.ObjectType=ObjectType;_this1496.ObjectPlacement=ObjectPlacement;_this1496.Representation=Representation;_this1496.Tag=Tag;_this1496.PredefinedType=PredefinedType;_this1496.type=2474470126;return _this1496;}return _createClass(IfcMotorConnection);}(IfcEnergyConversionDevice);IFC42.IfcMotorConnection=IfcMotorConnection;var IfcOuterBoundaryCurve=/*#__PURE__*/function(_IfcBoundaryCurve){_inherits(IfcOuterBoundaryCurve,_IfcBoundaryCurve);var _super1500=_createSuper(IfcOuterBoundaryCurve);function IfcOuterBoundaryCurve(expressID,Segments,SelfIntersect){var _this1497;_classCallCheck(this,IfcOuterBoundaryCurve);_this1497=_super1500.call(this,expressID,Segments,SelfIntersect);_this1497.Segments=Segments;_this1497.SelfIntersect=SelfIntersect;_this1497.type=144952367;return _this1497;}return _createClass(IfcOuterBoundaryCurve);}(IfcBoundaryCurve);IFC42.IfcOuterBoundaryCurve=IfcOuterBoundaryCurve;var IfcOutlet=/*#__PURE__*/function(_IfcFlowTerminal4){_inherits(IfcOutlet,_IfcFlowTerminal4);var _super1501=_createSuper(IfcOutlet);function IfcOutlet(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1498;_classCallCheck(this,IfcOutlet);_this1498=_super1501.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1498.GlobalId=GlobalId;_this1498.OwnerHistory=OwnerHistory;_this1498.Name=Name;_this1498.Description=Description;_this1498.ObjectType=ObjectType;_this1498.ObjectPlacement=ObjectPlacement;_this1498.Representation=Representation;_this1498.Tag=Tag;_this1498.PredefinedType=PredefinedType;_this1498.type=3694346114;return _this1498;}return _createClass(IfcOutlet);}(IfcFlowTerminal);IFC42.IfcOutlet=IfcOutlet;var IfcPile=/*#__PURE__*/function(_IfcBuildingElement29){_inherits(IfcPile,_IfcBuildingElement29);var _super1502=_createSuper(IfcPile);function IfcPile(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType,ConstructionType){var _this1499;_classCallCheck(this,IfcPile);_this1499=_super1502.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1499.GlobalId=GlobalId;_this1499.OwnerHistory=OwnerHistory;_this1499.Name=Name;_this1499.Description=Description;_this1499.ObjectType=ObjectType;_this1499.ObjectPlacement=ObjectPlacement;_this1499.Representation=Representation;_this1499.Tag=Tag;_this1499.PredefinedType=PredefinedType;_this1499.ConstructionType=ConstructionType;_this1499.type=1687234759;return _this1499;}return _createClass(IfcPile);}(IfcBuildingElement);IFC42.IfcPile=IfcPile;var IfcPipeFitting=/*#__PURE__*/function(_IfcFlowFitting2){_inherits(IfcPipeFitting,_IfcFlowFitting2);var _super1503=_createSuper(IfcPipeFitting);function IfcPipeFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1500;_classCallCheck(this,IfcPipeFitting);_this1500=_super1503.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1500.GlobalId=GlobalId;_this1500.OwnerHistory=OwnerHistory;_this1500.Name=Name;_this1500.Description=Description;_this1500.ObjectType=ObjectType;_this1500.ObjectPlacement=ObjectPlacement;_this1500.Representation=Representation;_this1500.Tag=Tag;_this1500.PredefinedType=PredefinedType;_this1500.type=310824031;return _this1500;}return _createClass(IfcPipeFitting);}(IfcFlowFitting);IFC42.IfcPipeFitting=IfcPipeFitting;var IfcPipeSegment=/*#__PURE__*/function(_IfcFlowSegment){_inherits(IfcPipeSegment,_IfcFlowSegment);var _super1504=_createSuper(IfcPipeSegment);function IfcPipeSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1501;_classCallCheck(this,IfcPipeSegment);_this1501=_super1504.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1501.GlobalId=GlobalId;_this1501.OwnerHistory=OwnerHistory;_this1501.Name=Name;_this1501.Description=Description;_this1501.ObjectType=ObjectType;_this1501.ObjectPlacement=ObjectPlacement;_this1501.Representation=Representation;_this1501.Tag=Tag;_this1501.PredefinedType=PredefinedType;_this1501.type=3612865200;return _this1501;}return _createClass(IfcPipeSegment);}(IfcFlowSegment);IFC42.IfcPipeSegment=IfcPipeSegment;var IfcPlate=/*#__PURE__*/function(_IfcBuildingElement30){_inherits(IfcPlate,_IfcBuildingElement30);var _super1505=_createSuper(IfcPlate);function IfcPlate(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1502;_classCallCheck(this,IfcPlate);_this1502=_super1505.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1502.GlobalId=GlobalId;_this1502.OwnerHistory=OwnerHistory;_this1502.Name=Name;_this1502.Description=Description;_this1502.ObjectType=ObjectType;_this1502.ObjectPlacement=ObjectPlacement;_this1502.Representation=Representation;_this1502.Tag=Tag;_this1502.PredefinedType=PredefinedType;_this1502.type=3171933400;return _this1502;}return _createClass(IfcPlate);}(IfcBuildingElement);IFC42.IfcPlate=IfcPlate;var IfcPlateStandardCase=/*#__PURE__*/function(_IfcPlate){_inherits(IfcPlateStandardCase,_IfcPlate);var _super1506=_createSuper(IfcPlateStandardCase);function IfcPlateStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1503;_classCallCheck(this,IfcPlateStandardCase);_this1503=_super1506.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1503.GlobalId=GlobalId;_this1503.OwnerHistory=OwnerHistory;_this1503.Name=Name;_this1503.Description=Description;_this1503.ObjectType=ObjectType;_this1503.ObjectPlacement=ObjectPlacement;_this1503.Representation=Representation;_this1503.Tag=Tag;_this1503.PredefinedType=PredefinedType;_this1503.type=1156407060;return _this1503;}return _createClass(IfcPlateStandardCase);}(IfcPlate);IFC42.IfcPlateStandardCase=IfcPlateStandardCase;var IfcProtectiveDevice=/*#__PURE__*/function(_IfcFlowController3){_inherits(IfcProtectiveDevice,_IfcFlowController3);var _super1507=_createSuper(IfcProtectiveDevice);function IfcProtectiveDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1504;_classCallCheck(this,IfcProtectiveDevice);_this1504=_super1507.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1504.GlobalId=GlobalId;_this1504.OwnerHistory=OwnerHistory;_this1504.Name=Name;_this1504.Description=Description;_this1504.ObjectType=ObjectType;_this1504.ObjectPlacement=ObjectPlacement;_this1504.Representation=Representation;_this1504.Tag=Tag;_this1504.PredefinedType=PredefinedType;_this1504.type=738039164;return _this1504;}return _createClass(IfcProtectiveDevice);}(IfcFlowController);IFC42.IfcProtectiveDevice=IfcProtectiveDevice;var IfcProtectiveDeviceTrippingUnitType=/*#__PURE__*/function(_IfcDistributionContr7){_inherits(IfcProtectiveDeviceTrippingUnitType,_IfcDistributionContr7);var _super1508=_createSuper(IfcProtectiveDeviceTrippingUnitType);function IfcProtectiveDeviceTrippingUnitType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1505;_classCallCheck(this,IfcProtectiveDeviceTrippingUnitType);_this1505=_super1508.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1505.GlobalId=GlobalId;_this1505.OwnerHistory=OwnerHistory;_this1505.Name=Name;_this1505.Description=Description;_this1505.ApplicableOccurrence=ApplicableOccurrence;_this1505.HasPropertySets=HasPropertySets;_this1505.RepresentationMaps=RepresentationMaps;_this1505.Tag=Tag;_this1505.ElementType=ElementType;_this1505.PredefinedType=PredefinedType;_this1505.type=655969474;return _this1505;}return _createClass(IfcProtectiveDeviceTrippingUnitType);}(IfcDistributionControlElementType);IFC42.IfcProtectiveDeviceTrippingUnitType=IfcProtectiveDeviceTrippingUnitType;var IfcPump=/*#__PURE__*/function(_IfcFlowMovingDevice){_inherits(IfcPump,_IfcFlowMovingDevice);var _super1509=_createSuper(IfcPump);function IfcPump(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1506;_classCallCheck(this,IfcPump);_this1506=_super1509.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1506.GlobalId=GlobalId;_this1506.OwnerHistory=OwnerHistory;_this1506.Name=Name;_this1506.Description=Description;_this1506.ObjectType=ObjectType;_this1506.ObjectPlacement=ObjectPlacement;_this1506.Representation=Representation;_this1506.Tag=Tag;_this1506.PredefinedType=PredefinedType;_this1506.type=90941305;return _this1506;}return _createClass(IfcPump);}(IfcFlowMovingDevice);IFC42.IfcPump=IfcPump;var IfcRailing=/*#__PURE__*/function(_IfcBuildingElement31){_inherits(IfcRailing,_IfcBuildingElement31);var _super1510=_createSuper(IfcRailing);function IfcRailing(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1507;_classCallCheck(this,IfcRailing);_this1507=_super1510.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1507.GlobalId=GlobalId;_this1507.OwnerHistory=OwnerHistory;_this1507.Name=Name;_this1507.Description=Description;_this1507.ObjectType=ObjectType;_this1507.ObjectPlacement=ObjectPlacement;_this1507.Representation=Representation;_this1507.Tag=Tag;_this1507.PredefinedType=PredefinedType;_this1507.type=2262370178;return _this1507;}return _createClass(IfcRailing);}(IfcBuildingElement);IFC42.IfcRailing=IfcRailing;var IfcRamp=/*#__PURE__*/function(_IfcBuildingElement32){_inherits(IfcRamp,_IfcBuildingElement32);var _super1511=_createSuper(IfcRamp);function IfcRamp(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1508;_classCallCheck(this,IfcRamp);_this1508=_super1511.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1508.GlobalId=GlobalId;_this1508.OwnerHistory=OwnerHistory;_this1508.Name=Name;_this1508.Description=Description;_this1508.ObjectType=ObjectType;_this1508.ObjectPlacement=ObjectPlacement;_this1508.Representation=Representation;_this1508.Tag=Tag;_this1508.PredefinedType=PredefinedType;_this1508.type=3024970846;return _this1508;}return _createClass(IfcRamp);}(IfcBuildingElement);IFC42.IfcRamp=IfcRamp;var IfcRampFlight=/*#__PURE__*/function(_IfcBuildingElement33){_inherits(IfcRampFlight,_IfcBuildingElement33);var _super1512=_createSuper(IfcRampFlight);function IfcRampFlight(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1509;_classCallCheck(this,IfcRampFlight);_this1509=_super1512.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1509.GlobalId=GlobalId;_this1509.OwnerHistory=OwnerHistory;_this1509.Name=Name;_this1509.Description=Description;_this1509.ObjectType=ObjectType;_this1509.ObjectPlacement=ObjectPlacement;_this1509.Representation=Representation;_this1509.Tag=Tag;_this1509.PredefinedType=PredefinedType;_this1509.type=3283111854;return _this1509;}return _createClass(IfcRampFlight);}(IfcBuildingElement);IFC42.IfcRampFlight=IfcRampFlight;var IfcRationalBSplineCurveWithKnots=/*#__PURE__*/function(_IfcBSplineCurveWithK){_inherits(IfcRationalBSplineCurveWithKnots,_IfcBSplineCurveWithK);var _super1513=_createSuper(IfcRationalBSplineCurveWithKnots);function IfcRationalBSplineCurveWithKnots(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect,KnotMultiplicities,Knots,KnotSpec,WeightsData){var _this1510;_classCallCheck(this,IfcRationalBSplineCurveWithKnots);_this1510=_super1513.call(this,expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect,KnotMultiplicities,Knots,KnotSpec);_this1510.Degree=Degree;_this1510.ControlPointsList=ControlPointsList;_this1510.CurveForm=CurveForm;_this1510.ClosedCurve=ClosedCurve;_this1510.SelfIntersect=SelfIntersect;_this1510.KnotMultiplicities=KnotMultiplicities;_this1510.Knots=Knots;_this1510.KnotSpec=KnotSpec;_this1510.WeightsData=WeightsData;_this1510.type=1232101972;return _this1510;}return _createClass(IfcRationalBSplineCurveWithKnots);}(IfcBSplineCurveWithKnots);IFC42.IfcRationalBSplineCurveWithKnots=IfcRationalBSplineCurveWithKnots;var IfcReinforcingBar=/*#__PURE__*/function(_IfcReinforcingElemen11){_inherits(IfcReinforcingBar,_IfcReinforcingElemen11);var _super1514=_createSuper(IfcReinforcingBar);function IfcReinforcingBar(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,NominalDiameter,CrossSectionArea,BarLength,PredefinedType,BarSurface){var _this1511;_classCallCheck(this,IfcReinforcingBar);_this1511=_super1514.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this1511.GlobalId=GlobalId;_this1511.OwnerHistory=OwnerHistory;_this1511.Name=Name;_this1511.Description=Description;_this1511.ObjectType=ObjectType;_this1511.ObjectPlacement=ObjectPlacement;_this1511.Representation=Representation;_this1511.Tag=Tag;_this1511.SteelGrade=SteelGrade;_this1511.NominalDiameter=NominalDiameter;_this1511.CrossSectionArea=CrossSectionArea;_this1511.BarLength=BarLength;_this1511.PredefinedType=PredefinedType;_this1511.BarSurface=BarSurface;_this1511.type=979691226;return _this1511;}return _createClass(IfcReinforcingBar);}(IfcReinforcingElement);IFC42.IfcReinforcingBar=IfcReinforcingBar;var IfcReinforcingBarType=/*#__PURE__*/function(_IfcReinforcingElemen12){_inherits(IfcReinforcingBarType,_IfcReinforcingElemen12);var _super1515=_createSuper(IfcReinforcingBarType);function IfcReinforcingBarType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,NominalDiameter,CrossSectionArea,BarLength,BarSurface,BendingShapeCode,BendingParameters){var _this1512;_classCallCheck(this,IfcReinforcingBarType);_this1512=_super1515.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1512.GlobalId=GlobalId;_this1512.OwnerHistory=OwnerHistory;_this1512.Name=Name;_this1512.Description=Description;_this1512.ApplicableOccurrence=ApplicableOccurrence;_this1512.HasPropertySets=HasPropertySets;_this1512.RepresentationMaps=RepresentationMaps;_this1512.Tag=Tag;_this1512.ElementType=ElementType;_this1512.PredefinedType=PredefinedType;_this1512.NominalDiameter=NominalDiameter;_this1512.CrossSectionArea=CrossSectionArea;_this1512.BarLength=BarLength;_this1512.BarSurface=BarSurface;_this1512.BendingShapeCode=BendingShapeCode;_this1512.BendingParameters=BendingParameters;_this1512.type=2572171363;return _this1512;}return _createClass(IfcReinforcingBarType);}(IfcReinforcingElementType);IFC42.IfcReinforcingBarType=IfcReinforcingBarType;var IfcRoof=/*#__PURE__*/function(_IfcBuildingElement34){_inherits(IfcRoof,_IfcBuildingElement34);var _super1516=_createSuper(IfcRoof);function IfcRoof(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1513;_classCallCheck(this,IfcRoof);_this1513=_super1516.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1513.GlobalId=GlobalId;_this1513.OwnerHistory=OwnerHistory;_this1513.Name=Name;_this1513.Description=Description;_this1513.ObjectType=ObjectType;_this1513.ObjectPlacement=ObjectPlacement;_this1513.Representation=Representation;_this1513.Tag=Tag;_this1513.PredefinedType=PredefinedType;_this1513.type=2016517767;return _this1513;}return _createClass(IfcRoof);}(IfcBuildingElement);IFC42.IfcRoof=IfcRoof;var IfcSanitaryTerminal=/*#__PURE__*/function(_IfcFlowTerminal5){_inherits(IfcSanitaryTerminal,_IfcFlowTerminal5);var _super1517=_createSuper(IfcSanitaryTerminal);function IfcSanitaryTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1514;_classCallCheck(this,IfcSanitaryTerminal);_this1514=_super1517.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1514.GlobalId=GlobalId;_this1514.OwnerHistory=OwnerHistory;_this1514.Name=Name;_this1514.Description=Description;_this1514.ObjectType=ObjectType;_this1514.ObjectPlacement=ObjectPlacement;_this1514.Representation=Representation;_this1514.Tag=Tag;_this1514.PredefinedType=PredefinedType;_this1514.type=3053780830;return _this1514;}return _createClass(IfcSanitaryTerminal);}(IfcFlowTerminal);IFC42.IfcSanitaryTerminal=IfcSanitaryTerminal;var IfcSensorType=/*#__PURE__*/function(_IfcDistributionContr8){_inherits(IfcSensorType,_IfcDistributionContr8);var _super1518=_createSuper(IfcSensorType);function IfcSensorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1515;_classCallCheck(this,IfcSensorType);_this1515=_super1518.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1515.GlobalId=GlobalId;_this1515.OwnerHistory=OwnerHistory;_this1515.Name=Name;_this1515.Description=Description;_this1515.ApplicableOccurrence=ApplicableOccurrence;_this1515.HasPropertySets=HasPropertySets;_this1515.RepresentationMaps=RepresentationMaps;_this1515.Tag=Tag;_this1515.ElementType=ElementType;_this1515.PredefinedType=PredefinedType;_this1515.type=1783015770;return _this1515;}return _createClass(IfcSensorType);}(IfcDistributionControlElementType);IFC42.IfcSensorType=IfcSensorType;var IfcShadingDevice=/*#__PURE__*/function(_IfcBuildingElement35){_inherits(IfcShadingDevice,_IfcBuildingElement35);var _super1519=_createSuper(IfcShadingDevice);function IfcShadingDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1516;_classCallCheck(this,IfcShadingDevice);_this1516=_super1519.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1516.GlobalId=GlobalId;_this1516.OwnerHistory=OwnerHistory;_this1516.Name=Name;_this1516.Description=Description;_this1516.ObjectType=ObjectType;_this1516.ObjectPlacement=ObjectPlacement;_this1516.Representation=Representation;_this1516.Tag=Tag;_this1516.PredefinedType=PredefinedType;_this1516.type=1329646415;return _this1516;}return _createClass(IfcShadingDevice);}(IfcBuildingElement);IFC42.IfcShadingDevice=IfcShadingDevice;var IfcSlab=/*#__PURE__*/function(_IfcBuildingElement36){_inherits(IfcSlab,_IfcBuildingElement36);var _super1520=_createSuper(IfcSlab);function IfcSlab(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1517;_classCallCheck(this,IfcSlab);_this1517=_super1520.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1517.GlobalId=GlobalId;_this1517.OwnerHistory=OwnerHistory;_this1517.Name=Name;_this1517.Description=Description;_this1517.ObjectType=ObjectType;_this1517.ObjectPlacement=ObjectPlacement;_this1517.Representation=Representation;_this1517.Tag=Tag;_this1517.PredefinedType=PredefinedType;_this1517.type=1529196076;return _this1517;}return _createClass(IfcSlab);}(IfcBuildingElement);IFC42.IfcSlab=IfcSlab;var IfcSlabElementedCase=/*#__PURE__*/function(_IfcSlab){_inherits(IfcSlabElementedCase,_IfcSlab);var _super1521=_createSuper(IfcSlabElementedCase);function IfcSlabElementedCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1518;_classCallCheck(this,IfcSlabElementedCase);_this1518=_super1521.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1518.GlobalId=GlobalId;_this1518.OwnerHistory=OwnerHistory;_this1518.Name=Name;_this1518.Description=Description;_this1518.ObjectType=ObjectType;_this1518.ObjectPlacement=ObjectPlacement;_this1518.Representation=Representation;_this1518.Tag=Tag;_this1518.PredefinedType=PredefinedType;_this1518.type=3127900445;return _this1518;}return _createClass(IfcSlabElementedCase);}(IfcSlab);IFC42.IfcSlabElementedCase=IfcSlabElementedCase;var IfcSlabStandardCase=/*#__PURE__*/function(_IfcSlab2){_inherits(IfcSlabStandardCase,_IfcSlab2);var _super1522=_createSuper(IfcSlabStandardCase);function IfcSlabStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1519;_classCallCheck(this,IfcSlabStandardCase);_this1519=_super1522.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1519.GlobalId=GlobalId;_this1519.OwnerHistory=OwnerHistory;_this1519.Name=Name;_this1519.Description=Description;_this1519.ObjectType=ObjectType;_this1519.ObjectPlacement=ObjectPlacement;_this1519.Representation=Representation;_this1519.Tag=Tag;_this1519.PredefinedType=PredefinedType;_this1519.type=3027962421;return _this1519;}return _createClass(IfcSlabStandardCase);}(IfcSlab);IFC42.IfcSlabStandardCase=IfcSlabStandardCase;var IfcSolarDevice=/*#__PURE__*/function(_IfcEnergyConversionD45){_inherits(IfcSolarDevice,_IfcEnergyConversionD45);var _super1523=_createSuper(IfcSolarDevice);function IfcSolarDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1520;_classCallCheck(this,IfcSolarDevice);_this1520=_super1523.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1520.GlobalId=GlobalId;_this1520.OwnerHistory=OwnerHistory;_this1520.Name=Name;_this1520.Description=Description;_this1520.ObjectType=ObjectType;_this1520.ObjectPlacement=ObjectPlacement;_this1520.Representation=Representation;_this1520.Tag=Tag;_this1520.PredefinedType=PredefinedType;_this1520.type=3420628829;return _this1520;}return _createClass(IfcSolarDevice);}(IfcEnergyConversionDevice);IFC42.IfcSolarDevice=IfcSolarDevice;var IfcSpaceHeater=/*#__PURE__*/function(_IfcFlowTerminal6){_inherits(IfcSpaceHeater,_IfcFlowTerminal6);var _super1524=_createSuper(IfcSpaceHeater);function IfcSpaceHeater(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1521;_classCallCheck(this,IfcSpaceHeater);_this1521=_super1524.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1521.GlobalId=GlobalId;_this1521.OwnerHistory=OwnerHistory;_this1521.Name=Name;_this1521.Description=Description;_this1521.ObjectType=ObjectType;_this1521.ObjectPlacement=ObjectPlacement;_this1521.Representation=Representation;_this1521.Tag=Tag;_this1521.PredefinedType=PredefinedType;_this1521.type=1999602285;return _this1521;}return _createClass(IfcSpaceHeater);}(IfcFlowTerminal);IFC42.IfcSpaceHeater=IfcSpaceHeater;var IfcStackTerminal=/*#__PURE__*/function(_IfcFlowTerminal7){_inherits(IfcStackTerminal,_IfcFlowTerminal7);var _super1525=_createSuper(IfcStackTerminal);function IfcStackTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1522;_classCallCheck(this,IfcStackTerminal);_this1522=_super1525.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1522.GlobalId=GlobalId;_this1522.OwnerHistory=OwnerHistory;_this1522.Name=Name;_this1522.Description=Description;_this1522.ObjectType=ObjectType;_this1522.ObjectPlacement=ObjectPlacement;_this1522.Representation=Representation;_this1522.Tag=Tag;_this1522.PredefinedType=PredefinedType;_this1522.type=1404847402;return _this1522;}return _createClass(IfcStackTerminal);}(IfcFlowTerminal);IFC42.IfcStackTerminal=IfcStackTerminal;var IfcStair=/*#__PURE__*/function(_IfcBuildingElement37){_inherits(IfcStair,_IfcBuildingElement37);var _super1526=_createSuper(IfcStair);function IfcStair(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1523;_classCallCheck(this,IfcStair);_this1523=_super1526.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1523.GlobalId=GlobalId;_this1523.OwnerHistory=OwnerHistory;_this1523.Name=Name;_this1523.Description=Description;_this1523.ObjectType=ObjectType;_this1523.ObjectPlacement=ObjectPlacement;_this1523.Representation=Representation;_this1523.Tag=Tag;_this1523.PredefinedType=PredefinedType;_this1523.type=331165859;return _this1523;}return _createClass(IfcStair);}(IfcBuildingElement);IFC42.IfcStair=IfcStair;var IfcStairFlight=/*#__PURE__*/function(_IfcBuildingElement38){_inherits(IfcStairFlight,_IfcBuildingElement38);var _super1527=_createSuper(IfcStairFlight);function IfcStairFlight(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,NumberOfRisers,NumberOfTreads,RiserHeight,TreadLength,PredefinedType){var _this1524;_classCallCheck(this,IfcStairFlight);_this1524=_super1527.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1524.GlobalId=GlobalId;_this1524.OwnerHistory=OwnerHistory;_this1524.Name=Name;_this1524.Description=Description;_this1524.ObjectType=ObjectType;_this1524.ObjectPlacement=ObjectPlacement;_this1524.Representation=Representation;_this1524.Tag=Tag;_this1524.NumberOfRisers=NumberOfRisers;_this1524.NumberOfTreads=NumberOfTreads;_this1524.RiserHeight=RiserHeight;_this1524.TreadLength=TreadLength;_this1524.PredefinedType=PredefinedType;_this1524.type=4252922144;return _this1524;}return _createClass(IfcStairFlight);}(IfcBuildingElement);IFC42.IfcStairFlight=IfcStairFlight;var IfcStructuralAnalysisModel=/*#__PURE__*/function(_IfcSystem6){_inherits(IfcStructuralAnalysisModel,_IfcSystem6);var _super1528=_createSuper(IfcStructuralAnalysisModel);function IfcStructuralAnalysisModel(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,OrientationOf2DPlane,LoadedBy,HasResults,SharedPlacement){var _this1525;_classCallCheck(this,IfcStructuralAnalysisModel);_this1525=_super1528.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1525.GlobalId=GlobalId;_this1525.OwnerHistory=OwnerHistory;_this1525.Name=Name;_this1525.Description=Description;_this1525.ObjectType=ObjectType;_this1525.PredefinedType=PredefinedType;_this1525.OrientationOf2DPlane=OrientationOf2DPlane;_this1525.LoadedBy=LoadedBy;_this1525.HasResults=HasResults;_this1525.SharedPlacement=SharedPlacement;_this1525.type=2515109513;return _this1525;}return _createClass(IfcStructuralAnalysisModel);}(IfcSystem);IFC42.IfcStructuralAnalysisModel=IfcStructuralAnalysisModel;var IfcStructuralLoadCase=/*#__PURE__*/function(_IfcStructuralLoadGro){_inherits(IfcStructuralLoadCase,_IfcStructuralLoadGro);var _super1529=_createSuper(IfcStructuralLoadCase);function IfcStructuralLoadCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,ActionType,ActionSource,Coefficient,Purpose,SelfWeightCoefficients){var _this1526;_classCallCheck(this,IfcStructuralLoadCase);_this1526=_super1529.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,ActionType,ActionSource,Coefficient,Purpose);_this1526.GlobalId=GlobalId;_this1526.OwnerHistory=OwnerHistory;_this1526.Name=Name;_this1526.Description=Description;_this1526.ObjectType=ObjectType;_this1526.PredefinedType=PredefinedType;_this1526.ActionType=ActionType;_this1526.ActionSource=ActionSource;_this1526.Coefficient=Coefficient;_this1526.Purpose=Purpose;_this1526.SelfWeightCoefficients=SelfWeightCoefficients;_this1526.type=385403989;return _this1526;}return _createClass(IfcStructuralLoadCase);}(IfcStructuralLoadGroup);IFC42.IfcStructuralLoadCase=IfcStructuralLoadCase;var IfcStructuralPlanarAction=/*#__PURE__*/function(_IfcStructuralSurface3){_inherits(IfcStructuralPlanarAction,_IfcStructuralSurface3);var _super1530=_createSuper(IfcStructuralPlanarAction);function IfcStructuralPlanarAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this1527;_classCallCheck(this,IfcStructuralPlanarAction);_this1527=_super1530.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType);_this1527.GlobalId=GlobalId;_this1527.OwnerHistory=OwnerHistory;_this1527.Name=Name;_this1527.Description=Description;_this1527.ObjectType=ObjectType;_this1527.ObjectPlacement=ObjectPlacement;_this1527.Representation=Representation;_this1527.AppliedLoad=AppliedLoad;_this1527.GlobalOrLocal=GlobalOrLocal;_this1527.DestabilizingLoad=DestabilizingLoad;_this1527.ProjectedOrTrue=ProjectedOrTrue;_this1527.PredefinedType=PredefinedType;_this1527.type=1621171031;return _this1527;}return _createClass(IfcStructuralPlanarAction);}(IfcStructuralSurfaceAction);IFC42.IfcStructuralPlanarAction=IfcStructuralPlanarAction;var IfcSwitchingDevice=/*#__PURE__*/function(_IfcFlowController4){_inherits(IfcSwitchingDevice,_IfcFlowController4);var _super1531=_createSuper(IfcSwitchingDevice);function IfcSwitchingDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1528;_classCallCheck(this,IfcSwitchingDevice);_this1528=_super1531.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1528.GlobalId=GlobalId;_this1528.OwnerHistory=OwnerHistory;_this1528.Name=Name;_this1528.Description=Description;_this1528.ObjectType=ObjectType;_this1528.ObjectPlacement=ObjectPlacement;_this1528.Representation=Representation;_this1528.Tag=Tag;_this1528.PredefinedType=PredefinedType;_this1528.type=1162798199;return _this1528;}return _createClass(IfcSwitchingDevice);}(IfcFlowController);IFC42.IfcSwitchingDevice=IfcSwitchingDevice;var IfcTank=/*#__PURE__*/function(_IfcFlowStorageDevice5){_inherits(IfcTank,_IfcFlowStorageDevice5);var _super1532=_createSuper(IfcTank);function IfcTank(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1529;_classCallCheck(this,IfcTank);_this1529=_super1532.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1529.GlobalId=GlobalId;_this1529.OwnerHistory=OwnerHistory;_this1529.Name=Name;_this1529.Description=Description;_this1529.ObjectType=ObjectType;_this1529.ObjectPlacement=ObjectPlacement;_this1529.Representation=Representation;_this1529.Tag=Tag;_this1529.PredefinedType=PredefinedType;_this1529.type=812556717;return _this1529;}return _createClass(IfcTank);}(IfcFlowStorageDevice);IFC42.IfcTank=IfcTank;var IfcTransformer=/*#__PURE__*/function(_IfcEnergyConversionD46){_inherits(IfcTransformer,_IfcEnergyConversionD46);var _super1533=_createSuper(IfcTransformer);function IfcTransformer(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1530;_classCallCheck(this,IfcTransformer);_this1530=_super1533.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1530.GlobalId=GlobalId;_this1530.OwnerHistory=OwnerHistory;_this1530.Name=Name;_this1530.Description=Description;_this1530.ObjectType=ObjectType;_this1530.ObjectPlacement=ObjectPlacement;_this1530.Representation=Representation;_this1530.Tag=Tag;_this1530.PredefinedType=PredefinedType;_this1530.type=3825984169;return _this1530;}return _createClass(IfcTransformer);}(IfcEnergyConversionDevice);IFC42.IfcTransformer=IfcTransformer;var IfcTubeBundle=/*#__PURE__*/function(_IfcEnergyConversionD47){_inherits(IfcTubeBundle,_IfcEnergyConversionD47);var _super1534=_createSuper(IfcTubeBundle);function IfcTubeBundle(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1531;_classCallCheck(this,IfcTubeBundle);_this1531=_super1534.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1531.GlobalId=GlobalId;_this1531.OwnerHistory=OwnerHistory;_this1531.Name=Name;_this1531.Description=Description;_this1531.ObjectType=ObjectType;_this1531.ObjectPlacement=ObjectPlacement;_this1531.Representation=Representation;_this1531.Tag=Tag;_this1531.PredefinedType=PredefinedType;_this1531.type=3026737570;return _this1531;}return _createClass(IfcTubeBundle);}(IfcEnergyConversionDevice);IFC42.IfcTubeBundle=IfcTubeBundle;var IfcUnitaryControlElementType=/*#__PURE__*/function(_IfcDistributionContr9){_inherits(IfcUnitaryControlElementType,_IfcDistributionContr9);var _super1535=_createSuper(IfcUnitaryControlElementType);function IfcUnitaryControlElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1532;_classCallCheck(this,IfcUnitaryControlElementType);_this1532=_super1535.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1532.GlobalId=GlobalId;_this1532.OwnerHistory=OwnerHistory;_this1532.Name=Name;_this1532.Description=Description;_this1532.ApplicableOccurrence=ApplicableOccurrence;_this1532.HasPropertySets=HasPropertySets;_this1532.RepresentationMaps=RepresentationMaps;_this1532.Tag=Tag;_this1532.ElementType=ElementType;_this1532.PredefinedType=PredefinedType;_this1532.type=3179687236;return _this1532;}return _createClass(IfcUnitaryControlElementType);}(IfcDistributionControlElementType);IFC42.IfcUnitaryControlElementType=IfcUnitaryControlElementType;var IfcUnitaryEquipment=/*#__PURE__*/function(_IfcEnergyConversionD48){_inherits(IfcUnitaryEquipment,_IfcEnergyConversionD48);var _super1536=_createSuper(IfcUnitaryEquipment);function IfcUnitaryEquipment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1533;_classCallCheck(this,IfcUnitaryEquipment);_this1533=_super1536.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1533.GlobalId=GlobalId;_this1533.OwnerHistory=OwnerHistory;_this1533.Name=Name;_this1533.Description=Description;_this1533.ObjectType=ObjectType;_this1533.ObjectPlacement=ObjectPlacement;_this1533.Representation=Representation;_this1533.Tag=Tag;_this1533.PredefinedType=PredefinedType;_this1533.type=4292641817;return _this1533;}return _createClass(IfcUnitaryEquipment);}(IfcEnergyConversionDevice);IFC42.IfcUnitaryEquipment=IfcUnitaryEquipment;var IfcValve=/*#__PURE__*/function(_IfcFlowController5){_inherits(IfcValve,_IfcFlowController5);var _super1537=_createSuper(IfcValve);function IfcValve(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1534;_classCallCheck(this,IfcValve);_this1534=_super1537.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1534.GlobalId=GlobalId;_this1534.OwnerHistory=OwnerHistory;_this1534.Name=Name;_this1534.Description=Description;_this1534.ObjectType=ObjectType;_this1534.ObjectPlacement=ObjectPlacement;_this1534.Representation=Representation;_this1534.Tag=Tag;_this1534.PredefinedType=PredefinedType;_this1534.type=4207607924;return _this1534;}return _createClass(IfcValve);}(IfcFlowController);IFC42.IfcValve=IfcValve;var IfcWall=/*#__PURE__*/function(_IfcBuildingElement39){_inherits(IfcWall,_IfcBuildingElement39);var _super1538=_createSuper(IfcWall);function IfcWall(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1535;_classCallCheck(this,IfcWall);_this1535=_super1538.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1535.GlobalId=GlobalId;_this1535.OwnerHistory=OwnerHistory;_this1535.Name=Name;_this1535.Description=Description;_this1535.ObjectType=ObjectType;_this1535.ObjectPlacement=ObjectPlacement;_this1535.Representation=Representation;_this1535.Tag=Tag;_this1535.PredefinedType=PredefinedType;_this1535.type=2391406946;return _this1535;}return _createClass(IfcWall);}(IfcBuildingElement);IFC42.IfcWall=IfcWall;var IfcWallElementedCase=/*#__PURE__*/function(_IfcWall2){_inherits(IfcWallElementedCase,_IfcWall2);var _super1539=_createSuper(IfcWallElementedCase);function IfcWallElementedCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1536;_classCallCheck(this,IfcWallElementedCase);_this1536=_super1539.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1536.GlobalId=GlobalId;_this1536.OwnerHistory=OwnerHistory;_this1536.Name=Name;_this1536.Description=Description;_this1536.ObjectType=ObjectType;_this1536.ObjectPlacement=ObjectPlacement;_this1536.Representation=Representation;_this1536.Tag=Tag;_this1536.PredefinedType=PredefinedType;_this1536.type=4156078855;return _this1536;}return _createClass(IfcWallElementedCase);}(IfcWall);IFC42.IfcWallElementedCase=IfcWallElementedCase;var IfcWallStandardCase=/*#__PURE__*/function(_IfcWall3){_inherits(IfcWallStandardCase,_IfcWall3);var _super1540=_createSuper(IfcWallStandardCase);function IfcWallStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1537;_classCallCheck(this,IfcWallStandardCase);_this1537=_super1540.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1537.GlobalId=GlobalId;_this1537.OwnerHistory=OwnerHistory;_this1537.Name=Name;_this1537.Description=Description;_this1537.ObjectType=ObjectType;_this1537.ObjectPlacement=ObjectPlacement;_this1537.Representation=Representation;_this1537.Tag=Tag;_this1537.PredefinedType=PredefinedType;_this1537.type=3512223829;return _this1537;}return _createClass(IfcWallStandardCase);}(IfcWall);IFC42.IfcWallStandardCase=IfcWallStandardCase;var IfcWasteTerminal=/*#__PURE__*/function(_IfcFlowTerminal8){_inherits(IfcWasteTerminal,_IfcFlowTerminal8);var _super1541=_createSuper(IfcWasteTerminal);function IfcWasteTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1538;_classCallCheck(this,IfcWasteTerminal);_this1538=_super1541.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1538.GlobalId=GlobalId;_this1538.OwnerHistory=OwnerHistory;_this1538.Name=Name;_this1538.Description=Description;_this1538.ObjectType=ObjectType;_this1538.ObjectPlacement=ObjectPlacement;_this1538.Representation=Representation;_this1538.Tag=Tag;_this1538.PredefinedType=PredefinedType;_this1538.type=4237592921;return _this1538;}return _createClass(IfcWasteTerminal);}(IfcFlowTerminal);IFC42.IfcWasteTerminal=IfcWasteTerminal;var IfcWindow=/*#__PURE__*/function(_IfcBuildingElement40){_inherits(IfcWindow,_IfcBuildingElement40);var _super1542=_createSuper(IfcWindow);function IfcWindow(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,PartitioningType,UserDefinedPartitioningType){var _this1539;_classCallCheck(this,IfcWindow);_this1539=_super1542.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1539.GlobalId=GlobalId;_this1539.OwnerHistory=OwnerHistory;_this1539.Name=Name;_this1539.Description=Description;_this1539.ObjectType=ObjectType;_this1539.ObjectPlacement=ObjectPlacement;_this1539.Representation=Representation;_this1539.Tag=Tag;_this1539.OverallHeight=OverallHeight;_this1539.OverallWidth=OverallWidth;_this1539.PredefinedType=PredefinedType;_this1539.PartitioningType=PartitioningType;_this1539.UserDefinedPartitioningType=UserDefinedPartitioningType;_this1539.type=3304561284;return _this1539;}return _createClass(IfcWindow);}(IfcBuildingElement);IFC42.IfcWindow=IfcWindow;var IfcWindowStandardCase=/*#__PURE__*/function(_IfcWindow){_inherits(IfcWindowStandardCase,_IfcWindow);var _super1543=_createSuper(IfcWindowStandardCase);function IfcWindowStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,PartitioningType,UserDefinedPartitioningType){var _this1540;_classCallCheck(this,IfcWindowStandardCase);_this1540=_super1543.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,PartitioningType,UserDefinedPartitioningType);_this1540.GlobalId=GlobalId;_this1540.OwnerHistory=OwnerHistory;_this1540.Name=Name;_this1540.Description=Description;_this1540.ObjectType=ObjectType;_this1540.ObjectPlacement=ObjectPlacement;_this1540.Representation=Representation;_this1540.Tag=Tag;_this1540.OverallHeight=OverallHeight;_this1540.OverallWidth=OverallWidth;_this1540.PredefinedType=PredefinedType;_this1540.PartitioningType=PartitioningType;_this1540.UserDefinedPartitioningType=UserDefinedPartitioningType;_this1540.type=486154966;return _this1540;}return _createClass(IfcWindowStandardCase);}(IfcWindow);IFC42.IfcWindowStandardCase=IfcWindowStandardCase;var IfcActuatorType=/*#__PURE__*/function(_IfcDistributionContr10){_inherits(IfcActuatorType,_IfcDistributionContr10);var _super1544=_createSuper(IfcActuatorType);function IfcActuatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1541;_classCallCheck(this,IfcActuatorType);_this1541=_super1544.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1541.GlobalId=GlobalId;_this1541.OwnerHistory=OwnerHistory;_this1541.Name=Name;_this1541.Description=Description;_this1541.ApplicableOccurrence=ApplicableOccurrence;_this1541.HasPropertySets=HasPropertySets;_this1541.RepresentationMaps=RepresentationMaps;_this1541.Tag=Tag;_this1541.ElementType=ElementType;_this1541.PredefinedType=PredefinedType;_this1541.type=2874132201;return _this1541;}return _createClass(IfcActuatorType);}(IfcDistributionControlElementType);IFC42.IfcActuatorType=IfcActuatorType;var IfcAirTerminal=/*#__PURE__*/function(_IfcFlowTerminal9){_inherits(IfcAirTerminal,_IfcFlowTerminal9);var _super1545=_createSuper(IfcAirTerminal);function IfcAirTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1542;_classCallCheck(this,IfcAirTerminal);_this1542=_super1545.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1542.GlobalId=GlobalId;_this1542.OwnerHistory=OwnerHistory;_this1542.Name=Name;_this1542.Description=Description;_this1542.ObjectType=ObjectType;_this1542.ObjectPlacement=ObjectPlacement;_this1542.Representation=Representation;_this1542.Tag=Tag;_this1542.PredefinedType=PredefinedType;_this1542.type=1634111441;return _this1542;}return _createClass(IfcAirTerminal);}(IfcFlowTerminal);IFC42.IfcAirTerminal=IfcAirTerminal;var IfcAirTerminalBox=/*#__PURE__*/function(_IfcFlowController6){_inherits(IfcAirTerminalBox,_IfcFlowController6);var _super1546=_createSuper(IfcAirTerminalBox);function IfcAirTerminalBox(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1543;_classCallCheck(this,IfcAirTerminalBox);_this1543=_super1546.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1543.GlobalId=GlobalId;_this1543.OwnerHistory=OwnerHistory;_this1543.Name=Name;_this1543.Description=Description;_this1543.ObjectType=ObjectType;_this1543.ObjectPlacement=ObjectPlacement;_this1543.Representation=Representation;_this1543.Tag=Tag;_this1543.PredefinedType=PredefinedType;_this1543.type=177149247;return _this1543;}return _createClass(IfcAirTerminalBox);}(IfcFlowController);IFC42.IfcAirTerminalBox=IfcAirTerminalBox;var IfcAirToAirHeatRecovery=/*#__PURE__*/function(_IfcEnergyConversionD49){_inherits(IfcAirToAirHeatRecovery,_IfcEnergyConversionD49);var _super1547=_createSuper(IfcAirToAirHeatRecovery);function IfcAirToAirHeatRecovery(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1544;_classCallCheck(this,IfcAirToAirHeatRecovery);_this1544=_super1547.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1544.GlobalId=GlobalId;_this1544.OwnerHistory=OwnerHistory;_this1544.Name=Name;_this1544.Description=Description;_this1544.ObjectType=ObjectType;_this1544.ObjectPlacement=ObjectPlacement;_this1544.Representation=Representation;_this1544.Tag=Tag;_this1544.PredefinedType=PredefinedType;_this1544.type=2056796094;return _this1544;}return _createClass(IfcAirToAirHeatRecovery);}(IfcEnergyConversionDevice);IFC42.IfcAirToAirHeatRecovery=IfcAirToAirHeatRecovery;var IfcAlarmType=/*#__PURE__*/function(_IfcDistributionContr11){_inherits(IfcAlarmType,_IfcDistributionContr11);var _super1548=_createSuper(IfcAlarmType);function IfcAlarmType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1545;_classCallCheck(this,IfcAlarmType);_this1545=_super1548.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1545.GlobalId=GlobalId;_this1545.OwnerHistory=OwnerHistory;_this1545.Name=Name;_this1545.Description=Description;_this1545.ApplicableOccurrence=ApplicableOccurrence;_this1545.HasPropertySets=HasPropertySets;_this1545.RepresentationMaps=RepresentationMaps;_this1545.Tag=Tag;_this1545.ElementType=ElementType;_this1545.PredefinedType=PredefinedType;_this1545.type=3001207471;return _this1545;}return _createClass(IfcAlarmType);}(IfcDistributionControlElementType);IFC42.IfcAlarmType=IfcAlarmType;var IfcAudioVisualAppliance=/*#__PURE__*/function(_IfcFlowTerminal10){_inherits(IfcAudioVisualAppliance,_IfcFlowTerminal10);var _super1549=_createSuper(IfcAudioVisualAppliance);function IfcAudioVisualAppliance(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1546;_classCallCheck(this,IfcAudioVisualAppliance);_this1546=_super1549.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1546.GlobalId=GlobalId;_this1546.OwnerHistory=OwnerHistory;_this1546.Name=Name;_this1546.Description=Description;_this1546.ObjectType=ObjectType;_this1546.ObjectPlacement=ObjectPlacement;_this1546.Representation=Representation;_this1546.Tag=Tag;_this1546.PredefinedType=PredefinedType;_this1546.type=277319702;return _this1546;}return _createClass(IfcAudioVisualAppliance);}(IfcFlowTerminal);IFC42.IfcAudioVisualAppliance=IfcAudioVisualAppliance;var IfcBeam=/*#__PURE__*/function(_IfcBuildingElement41){_inherits(IfcBeam,_IfcBuildingElement41);var _super1550=_createSuper(IfcBeam);function IfcBeam(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1547;_classCallCheck(this,IfcBeam);_this1547=_super1550.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1547.GlobalId=GlobalId;_this1547.OwnerHistory=OwnerHistory;_this1547.Name=Name;_this1547.Description=Description;_this1547.ObjectType=ObjectType;_this1547.ObjectPlacement=ObjectPlacement;_this1547.Representation=Representation;_this1547.Tag=Tag;_this1547.PredefinedType=PredefinedType;_this1547.type=753842376;return _this1547;}return _createClass(IfcBeam);}(IfcBuildingElement);IFC42.IfcBeam=IfcBeam;var IfcBeamStandardCase=/*#__PURE__*/function(_IfcBeam){_inherits(IfcBeamStandardCase,_IfcBeam);var _super1551=_createSuper(IfcBeamStandardCase);function IfcBeamStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1548;_classCallCheck(this,IfcBeamStandardCase);_this1548=_super1551.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this1548.GlobalId=GlobalId;_this1548.OwnerHistory=OwnerHistory;_this1548.Name=Name;_this1548.Description=Description;_this1548.ObjectType=ObjectType;_this1548.ObjectPlacement=ObjectPlacement;_this1548.Representation=Representation;_this1548.Tag=Tag;_this1548.PredefinedType=PredefinedType;_this1548.type=2906023776;return _this1548;}return _createClass(IfcBeamStandardCase);}(IfcBeam);IFC42.IfcBeamStandardCase=IfcBeamStandardCase;var IfcBoiler=/*#__PURE__*/function(_IfcEnergyConversionD50){_inherits(IfcBoiler,_IfcEnergyConversionD50);var _super1552=_createSuper(IfcBoiler);function IfcBoiler(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1549;_classCallCheck(this,IfcBoiler);_this1549=_super1552.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1549.GlobalId=GlobalId;_this1549.OwnerHistory=OwnerHistory;_this1549.Name=Name;_this1549.Description=Description;_this1549.ObjectType=ObjectType;_this1549.ObjectPlacement=ObjectPlacement;_this1549.Representation=Representation;_this1549.Tag=Tag;_this1549.PredefinedType=PredefinedType;_this1549.type=32344328;return _this1549;}return _createClass(IfcBoiler);}(IfcEnergyConversionDevice);IFC42.IfcBoiler=IfcBoiler;var IfcBurner=/*#__PURE__*/function(_IfcEnergyConversionD51){_inherits(IfcBurner,_IfcEnergyConversionD51);var _super1553=_createSuper(IfcBurner);function IfcBurner(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1550;_classCallCheck(this,IfcBurner);_this1550=_super1553.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1550.GlobalId=GlobalId;_this1550.OwnerHistory=OwnerHistory;_this1550.Name=Name;_this1550.Description=Description;_this1550.ObjectType=ObjectType;_this1550.ObjectPlacement=ObjectPlacement;_this1550.Representation=Representation;_this1550.Tag=Tag;_this1550.PredefinedType=PredefinedType;_this1550.type=2938176219;return _this1550;}return _createClass(IfcBurner);}(IfcEnergyConversionDevice);IFC42.IfcBurner=IfcBurner;var IfcCableCarrierFitting=/*#__PURE__*/function(_IfcFlowFitting3){_inherits(IfcCableCarrierFitting,_IfcFlowFitting3);var _super1554=_createSuper(IfcCableCarrierFitting);function IfcCableCarrierFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1551;_classCallCheck(this,IfcCableCarrierFitting);_this1551=_super1554.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1551.GlobalId=GlobalId;_this1551.OwnerHistory=OwnerHistory;_this1551.Name=Name;_this1551.Description=Description;_this1551.ObjectType=ObjectType;_this1551.ObjectPlacement=ObjectPlacement;_this1551.Representation=Representation;_this1551.Tag=Tag;_this1551.PredefinedType=PredefinedType;_this1551.type=635142910;return _this1551;}return _createClass(IfcCableCarrierFitting);}(IfcFlowFitting);IFC42.IfcCableCarrierFitting=IfcCableCarrierFitting;var IfcCableCarrierSegment=/*#__PURE__*/function(_IfcFlowSegment2){_inherits(IfcCableCarrierSegment,_IfcFlowSegment2);var _super1555=_createSuper(IfcCableCarrierSegment);function IfcCableCarrierSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1552;_classCallCheck(this,IfcCableCarrierSegment);_this1552=_super1555.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1552.GlobalId=GlobalId;_this1552.OwnerHistory=OwnerHistory;_this1552.Name=Name;_this1552.Description=Description;_this1552.ObjectType=ObjectType;_this1552.ObjectPlacement=ObjectPlacement;_this1552.Representation=Representation;_this1552.Tag=Tag;_this1552.PredefinedType=PredefinedType;_this1552.type=3758799889;return _this1552;}return _createClass(IfcCableCarrierSegment);}(IfcFlowSegment);IFC42.IfcCableCarrierSegment=IfcCableCarrierSegment;var IfcCableFitting=/*#__PURE__*/function(_IfcFlowFitting4){_inherits(IfcCableFitting,_IfcFlowFitting4);var _super1556=_createSuper(IfcCableFitting);function IfcCableFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1553;_classCallCheck(this,IfcCableFitting);_this1553=_super1556.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1553.GlobalId=GlobalId;_this1553.OwnerHistory=OwnerHistory;_this1553.Name=Name;_this1553.Description=Description;_this1553.ObjectType=ObjectType;_this1553.ObjectPlacement=ObjectPlacement;_this1553.Representation=Representation;_this1553.Tag=Tag;_this1553.PredefinedType=PredefinedType;_this1553.type=1051757585;return _this1553;}return _createClass(IfcCableFitting);}(IfcFlowFitting);IFC42.IfcCableFitting=IfcCableFitting;var IfcCableSegment=/*#__PURE__*/function(_IfcFlowSegment3){_inherits(IfcCableSegment,_IfcFlowSegment3);var _super1557=_createSuper(IfcCableSegment);function IfcCableSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1554;_classCallCheck(this,IfcCableSegment);_this1554=_super1557.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1554.GlobalId=GlobalId;_this1554.OwnerHistory=OwnerHistory;_this1554.Name=Name;_this1554.Description=Description;_this1554.ObjectType=ObjectType;_this1554.ObjectPlacement=ObjectPlacement;_this1554.Representation=Representation;_this1554.Tag=Tag;_this1554.PredefinedType=PredefinedType;_this1554.type=4217484030;return _this1554;}return _createClass(IfcCableSegment);}(IfcFlowSegment);IFC42.IfcCableSegment=IfcCableSegment;var IfcChiller=/*#__PURE__*/function(_IfcEnergyConversionD52){_inherits(IfcChiller,_IfcEnergyConversionD52);var _super1558=_createSuper(IfcChiller);function IfcChiller(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1555;_classCallCheck(this,IfcChiller);_this1555=_super1558.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1555.GlobalId=GlobalId;_this1555.OwnerHistory=OwnerHistory;_this1555.Name=Name;_this1555.Description=Description;_this1555.ObjectType=ObjectType;_this1555.ObjectPlacement=ObjectPlacement;_this1555.Representation=Representation;_this1555.Tag=Tag;_this1555.PredefinedType=PredefinedType;_this1555.type=3902619387;return _this1555;}return _createClass(IfcChiller);}(IfcEnergyConversionDevice);IFC42.IfcChiller=IfcChiller;var IfcCoil=/*#__PURE__*/function(_IfcEnergyConversionD53){_inherits(IfcCoil,_IfcEnergyConversionD53);var _super1559=_createSuper(IfcCoil);function IfcCoil(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1556;_classCallCheck(this,IfcCoil);_this1556=_super1559.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1556.GlobalId=GlobalId;_this1556.OwnerHistory=OwnerHistory;_this1556.Name=Name;_this1556.Description=Description;_this1556.ObjectType=ObjectType;_this1556.ObjectPlacement=ObjectPlacement;_this1556.Representation=Representation;_this1556.Tag=Tag;_this1556.PredefinedType=PredefinedType;_this1556.type=639361253;return _this1556;}return _createClass(IfcCoil);}(IfcEnergyConversionDevice);IFC42.IfcCoil=IfcCoil;var IfcCommunicationsAppliance=/*#__PURE__*/function(_IfcFlowTerminal11){_inherits(IfcCommunicationsAppliance,_IfcFlowTerminal11);var _super1560=_createSuper(IfcCommunicationsAppliance);function IfcCommunicationsAppliance(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1557;_classCallCheck(this,IfcCommunicationsAppliance);_this1557=_super1560.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1557.GlobalId=GlobalId;_this1557.OwnerHistory=OwnerHistory;_this1557.Name=Name;_this1557.Description=Description;_this1557.ObjectType=ObjectType;_this1557.ObjectPlacement=ObjectPlacement;_this1557.Representation=Representation;_this1557.Tag=Tag;_this1557.PredefinedType=PredefinedType;_this1557.type=3221913625;return _this1557;}return _createClass(IfcCommunicationsAppliance);}(IfcFlowTerminal);IFC42.IfcCommunicationsAppliance=IfcCommunicationsAppliance;var IfcCompressor=/*#__PURE__*/function(_IfcFlowMovingDevice2){_inherits(IfcCompressor,_IfcFlowMovingDevice2);var _super1561=_createSuper(IfcCompressor);function IfcCompressor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1558;_classCallCheck(this,IfcCompressor);_this1558=_super1561.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1558.GlobalId=GlobalId;_this1558.OwnerHistory=OwnerHistory;_this1558.Name=Name;_this1558.Description=Description;_this1558.ObjectType=ObjectType;_this1558.ObjectPlacement=ObjectPlacement;_this1558.Representation=Representation;_this1558.Tag=Tag;_this1558.PredefinedType=PredefinedType;_this1558.type=3571504051;return _this1558;}return _createClass(IfcCompressor);}(IfcFlowMovingDevice);IFC42.IfcCompressor=IfcCompressor;var IfcCondenser=/*#__PURE__*/function(_IfcEnergyConversionD54){_inherits(IfcCondenser,_IfcEnergyConversionD54);var _super1562=_createSuper(IfcCondenser);function IfcCondenser(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1559;_classCallCheck(this,IfcCondenser);_this1559=_super1562.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1559.GlobalId=GlobalId;_this1559.OwnerHistory=OwnerHistory;_this1559.Name=Name;_this1559.Description=Description;_this1559.ObjectType=ObjectType;_this1559.ObjectPlacement=ObjectPlacement;_this1559.Representation=Representation;_this1559.Tag=Tag;_this1559.PredefinedType=PredefinedType;_this1559.type=2272882330;return _this1559;}return _createClass(IfcCondenser);}(IfcEnergyConversionDevice);IFC42.IfcCondenser=IfcCondenser;var IfcControllerType=/*#__PURE__*/function(_IfcDistributionContr12){_inherits(IfcControllerType,_IfcDistributionContr12);var _super1563=_createSuper(IfcControllerType);function IfcControllerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1560;_classCallCheck(this,IfcControllerType);_this1560=_super1563.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1560.GlobalId=GlobalId;_this1560.OwnerHistory=OwnerHistory;_this1560.Name=Name;_this1560.Description=Description;_this1560.ApplicableOccurrence=ApplicableOccurrence;_this1560.HasPropertySets=HasPropertySets;_this1560.RepresentationMaps=RepresentationMaps;_this1560.Tag=Tag;_this1560.ElementType=ElementType;_this1560.PredefinedType=PredefinedType;_this1560.type=578613899;return _this1560;}return _createClass(IfcControllerType);}(IfcDistributionControlElementType);IFC42.IfcControllerType=IfcControllerType;var IfcCooledBeam=/*#__PURE__*/function(_IfcEnergyConversionD55){_inherits(IfcCooledBeam,_IfcEnergyConversionD55);var _super1564=_createSuper(IfcCooledBeam);function IfcCooledBeam(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1561;_classCallCheck(this,IfcCooledBeam);_this1561=_super1564.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1561.GlobalId=GlobalId;_this1561.OwnerHistory=OwnerHistory;_this1561.Name=Name;_this1561.Description=Description;_this1561.ObjectType=ObjectType;_this1561.ObjectPlacement=ObjectPlacement;_this1561.Representation=Representation;_this1561.Tag=Tag;_this1561.PredefinedType=PredefinedType;_this1561.type=4136498852;return _this1561;}return _createClass(IfcCooledBeam);}(IfcEnergyConversionDevice);IFC42.IfcCooledBeam=IfcCooledBeam;var IfcCoolingTower=/*#__PURE__*/function(_IfcEnergyConversionD56){_inherits(IfcCoolingTower,_IfcEnergyConversionD56);var _super1565=_createSuper(IfcCoolingTower);function IfcCoolingTower(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1562;_classCallCheck(this,IfcCoolingTower);_this1562=_super1565.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1562.GlobalId=GlobalId;_this1562.OwnerHistory=OwnerHistory;_this1562.Name=Name;_this1562.Description=Description;_this1562.ObjectType=ObjectType;_this1562.ObjectPlacement=ObjectPlacement;_this1562.Representation=Representation;_this1562.Tag=Tag;_this1562.PredefinedType=PredefinedType;_this1562.type=3640358203;return _this1562;}return _createClass(IfcCoolingTower);}(IfcEnergyConversionDevice);IFC42.IfcCoolingTower=IfcCoolingTower;var IfcDamper=/*#__PURE__*/function(_IfcFlowController7){_inherits(IfcDamper,_IfcFlowController7);var _super1566=_createSuper(IfcDamper);function IfcDamper(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1563;_classCallCheck(this,IfcDamper);_this1563=_super1566.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1563.GlobalId=GlobalId;_this1563.OwnerHistory=OwnerHistory;_this1563.Name=Name;_this1563.Description=Description;_this1563.ObjectType=ObjectType;_this1563.ObjectPlacement=ObjectPlacement;_this1563.Representation=Representation;_this1563.Tag=Tag;_this1563.PredefinedType=PredefinedType;_this1563.type=4074379575;return _this1563;}return _createClass(IfcDamper);}(IfcFlowController);IFC42.IfcDamper=IfcDamper;var IfcDistributionChamberElement=/*#__PURE__*/function(_IfcDistributionFlowE36){_inherits(IfcDistributionChamberElement,_IfcDistributionFlowE36);var _super1567=_createSuper(IfcDistributionChamberElement);function IfcDistributionChamberElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1564;_classCallCheck(this,IfcDistributionChamberElement);_this1564=_super1567.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1564.GlobalId=GlobalId;_this1564.OwnerHistory=OwnerHistory;_this1564.Name=Name;_this1564.Description=Description;_this1564.ObjectType=ObjectType;_this1564.ObjectPlacement=ObjectPlacement;_this1564.Representation=Representation;_this1564.Tag=Tag;_this1564.PredefinedType=PredefinedType;_this1564.type=1052013943;return _this1564;}return _createClass(IfcDistributionChamberElement);}(IfcDistributionFlowElement);IFC42.IfcDistributionChamberElement=IfcDistributionChamberElement;var IfcDistributionCircuit=/*#__PURE__*/function(_IfcDistributionSyste){_inherits(IfcDistributionCircuit,_IfcDistributionSyste);var _super1568=_createSuper(IfcDistributionCircuit);function IfcDistributionCircuit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,PredefinedType){var _this1565;_classCallCheck(this,IfcDistributionCircuit);_this1565=_super1568.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,PredefinedType);_this1565.GlobalId=GlobalId;_this1565.OwnerHistory=OwnerHistory;_this1565.Name=Name;_this1565.Description=Description;_this1565.ObjectType=ObjectType;_this1565.LongName=LongName;_this1565.PredefinedType=PredefinedType;_this1565.type=562808652;return _this1565;}return _createClass(IfcDistributionCircuit);}(IfcDistributionSystem);IFC42.IfcDistributionCircuit=IfcDistributionCircuit;var IfcDistributionControlElement=/*#__PURE__*/function(_IfcDistributionEleme8){_inherits(IfcDistributionControlElement,_IfcDistributionEleme8);var _super1569=_createSuper(IfcDistributionControlElement);function IfcDistributionControlElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this1566;_classCallCheck(this,IfcDistributionControlElement);_this1566=_super1569.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1566.GlobalId=GlobalId;_this1566.OwnerHistory=OwnerHistory;_this1566.Name=Name;_this1566.Description=Description;_this1566.ObjectType=ObjectType;_this1566.ObjectPlacement=ObjectPlacement;_this1566.Representation=Representation;_this1566.Tag=Tag;_this1566.type=1062813311;return _this1566;}return _createClass(IfcDistributionControlElement);}(IfcDistributionElement);IFC42.IfcDistributionControlElement=IfcDistributionControlElement;var IfcDuctFitting=/*#__PURE__*/function(_IfcFlowFitting5){_inherits(IfcDuctFitting,_IfcFlowFitting5);var _super1570=_createSuper(IfcDuctFitting);function IfcDuctFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1567;_classCallCheck(this,IfcDuctFitting);_this1567=_super1570.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1567.GlobalId=GlobalId;_this1567.OwnerHistory=OwnerHistory;_this1567.Name=Name;_this1567.Description=Description;_this1567.ObjectType=ObjectType;_this1567.ObjectPlacement=ObjectPlacement;_this1567.Representation=Representation;_this1567.Tag=Tag;_this1567.PredefinedType=PredefinedType;_this1567.type=342316401;return _this1567;}return _createClass(IfcDuctFitting);}(IfcFlowFitting);IFC42.IfcDuctFitting=IfcDuctFitting;var IfcDuctSegment=/*#__PURE__*/function(_IfcFlowSegment4){_inherits(IfcDuctSegment,_IfcFlowSegment4);var _super1571=_createSuper(IfcDuctSegment);function IfcDuctSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1568;_classCallCheck(this,IfcDuctSegment);_this1568=_super1571.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1568.GlobalId=GlobalId;_this1568.OwnerHistory=OwnerHistory;_this1568.Name=Name;_this1568.Description=Description;_this1568.ObjectType=ObjectType;_this1568.ObjectPlacement=ObjectPlacement;_this1568.Representation=Representation;_this1568.Tag=Tag;_this1568.PredefinedType=PredefinedType;_this1568.type=3518393246;return _this1568;}return _createClass(IfcDuctSegment);}(IfcFlowSegment);IFC42.IfcDuctSegment=IfcDuctSegment;var IfcDuctSilencer=/*#__PURE__*/function(_IfcFlowTreatmentDevi7){_inherits(IfcDuctSilencer,_IfcFlowTreatmentDevi7);var _super1572=_createSuper(IfcDuctSilencer);function IfcDuctSilencer(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1569;_classCallCheck(this,IfcDuctSilencer);_this1569=_super1572.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1569.GlobalId=GlobalId;_this1569.OwnerHistory=OwnerHistory;_this1569.Name=Name;_this1569.Description=Description;_this1569.ObjectType=ObjectType;_this1569.ObjectPlacement=ObjectPlacement;_this1569.Representation=Representation;_this1569.Tag=Tag;_this1569.PredefinedType=PredefinedType;_this1569.type=1360408905;return _this1569;}return _createClass(IfcDuctSilencer);}(IfcFlowTreatmentDevice);IFC42.IfcDuctSilencer=IfcDuctSilencer;var IfcElectricAppliance=/*#__PURE__*/function(_IfcFlowTerminal12){_inherits(IfcElectricAppliance,_IfcFlowTerminal12);var _super1573=_createSuper(IfcElectricAppliance);function IfcElectricAppliance(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1570;_classCallCheck(this,IfcElectricAppliance);_this1570=_super1573.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1570.GlobalId=GlobalId;_this1570.OwnerHistory=OwnerHistory;_this1570.Name=Name;_this1570.Description=Description;_this1570.ObjectType=ObjectType;_this1570.ObjectPlacement=ObjectPlacement;_this1570.Representation=Representation;_this1570.Tag=Tag;_this1570.PredefinedType=PredefinedType;_this1570.type=1904799276;return _this1570;}return _createClass(IfcElectricAppliance);}(IfcFlowTerminal);IFC42.IfcElectricAppliance=IfcElectricAppliance;var IfcElectricDistributionBoard=/*#__PURE__*/function(_IfcFlowController8){_inherits(IfcElectricDistributionBoard,_IfcFlowController8);var _super1574=_createSuper(IfcElectricDistributionBoard);function IfcElectricDistributionBoard(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1571;_classCallCheck(this,IfcElectricDistributionBoard);_this1571=_super1574.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1571.GlobalId=GlobalId;_this1571.OwnerHistory=OwnerHistory;_this1571.Name=Name;_this1571.Description=Description;_this1571.ObjectType=ObjectType;_this1571.ObjectPlacement=ObjectPlacement;_this1571.Representation=Representation;_this1571.Tag=Tag;_this1571.PredefinedType=PredefinedType;_this1571.type=862014818;return _this1571;}return _createClass(IfcElectricDistributionBoard);}(IfcFlowController);IFC42.IfcElectricDistributionBoard=IfcElectricDistributionBoard;var IfcElectricFlowStorageDevice=/*#__PURE__*/function(_IfcFlowStorageDevice6){_inherits(IfcElectricFlowStorageDevice,_IfcFlowStorageDevice6);var _super1575=_createSuper(IfcElectricFlowStorageDevice);function IfcElectricFlowStorageDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1572;_classCallCheck(this,IfcElectricFlowStorageDevice);_this1572=_super1575.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1572.GlobalId=GlobalId;_this1572.OwnerHistory=OwnerHistory;_this1572.Name=Name;_this1572.Description=Description;_this1572.ObjectType=ObjectType;_this1572.ObjectPlacement=ObjectPlacement;_this1572.Representation=Representation;_this1572.Tag=Tag;_this1572.PredefinedType=PredefinedType;_this1572.type=3310460725;return _this1572;}return _createClass(IfcElectricFlowStorageDevice);}(IfcFlowStorageDevice);IFC42.IfcElectricFlowStorageDevice=IfcElectricFlowStorageDevice;var IfcElectricGenerator=/*#__PURE__*/function(_IfcEnergyConversionD57){_inherits(IfcElectricGenerator,_IfcEnergyConversionD57);var _super1576=_createSuper(IfcElectricGenerator);function IfcElectricGenerator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1573;_classCallCheck(this,IfcElectricGenerator);_this1573=_super1576.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1573.GlobalId=GlobalId;_this1573.OwnerHistory=OwnerHistory;_this1573.Name=Name;_this1573.Description=Description;_this1573.ObjectType=ObjectType;_this1573.ObjectPlacement=ObjectPlacement;_this1573.Representation=Representation;_this1573.Tag=Tag;_this1573.PredefinedType=PredefinedType;_this1573.type=264262732;return _this1573;}return _createClass(IfcElectricGenerator);}(IfcEnergyConversionDevice);IFC42.IfcElectricGenerator=IfcElectricGenerator;var IfcElectricMotor=/*#__PURE__*/function(_IfcEnergyConversionD58){_inherits(IfcElectricMotor,_IfcEnergyConversionD58);var _super1577=_createSuper(IfcElectricMotor);function IfcElectricMotor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1574;_classCallCheck(this,IfcElectricMotor);_this1574=_super1577.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1574.GlobalId=GlobalId;_this1574.OwnerHistory=OwnerHistory;_this1574.Name=Name;_this1574.Description=Description;_this1574.ObjectType=ObjectType;_this1574.ObjectPlacement=ObjectPlacement;_this1574.Representation=Representation;_this1574.Tag=Tag;_this1574.PredefinedType=PredefinedType;_this1574.type=402227799;return _this1574;}return _createClass(IfcElectricMotor);}(IfcEnergyConversionDevice);IFC42.IfcElectricMotor=IfcElectricMotor;var IfcElectricTimeControl=/*#__PURE__*/function(_IfcFlowController9){_inherits(IfcElectricTimeControl,_IfcFlowController9);var _super1578=_createSuper(IfcElectricTimeControl);function IfcElectricTimeControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1575;_classCallCheck(this,IfcElectricTimeControl);_this1575=_super1578.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1575.GlobalId=GlobalId;_this1575.OwnerHistory=OwnerHistory;_this1575.Name=Name;_this1575.Description=Description;_this1575.ObjectType=ObjectType;_this1575.ObjectPlacement=ObjectPlacement;_this1575.Representation=Representation;_this1575.Tag=Tag;_this1575.PredefinedType=PredefinedType;_this1575.type=1003880860;return _this1575;}return _createClass(IfcElectricTimeControl);}(IfcFlowController);IFC42.IfcElectricTimeControl=IfcElectricTimeControl;var IfcFan=/*#__PURE__*/function(_IfcFlowMovingDevice3){_inherits(IfcFan,_IfcFlowMovingDevice3);var _super1579=_createSuper(IfcFan);function IfcFan(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1576;_classCallCheck(this,IfcFan);_this1576=_super1579.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1576.GlobalId=GlobalId;_this1576.OwnerHistory=OwnerHistory;_this1576.Name=Name;_this1576.Description=Description;_this1576.ObjectType=ObjectType;_this1576.ObjectPlacement=ObjectPlacement;_this1576.Representation=Representation;_this1576.Tag=Tag;_this1576.PredefinedType=PredefinedType;_this1576.type=3415622556;return _this1576;}return _createClass(IfcFan);}(IfcFlowMovingDevice);IFC42.IfcFan=IfcFan;var IfcFilter=/*#__PURE__*/function(_IfcFlowTreatmentDevi8){_inherits(IfcFilter,_IfcFlowTreatmentDevi8);var _super1580=_createSuper(IfcFilter);function IfcFilter(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1577;_classCallCheck(this,IfcFilter);_this1577=_super1580.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1577.GlobalId=GlobalId;_this1577.OwnerHistory=OwnerHistory;_this1577.Name=Name;_this1577.Description=Description;_this1577.ObjectType=ObjectType;_this1577.ObjectPlacement=ObjectPlacement;_this1577.Representation=Representation;_this1577.Tag=Tag;_this1577.PredefinedType=PredefinedType;_this1577.type=819412036;return _this1577;}return _createClass(IfcFilter);}(IfcFlowTreatmentDevice);IFC42.IfcFilter=IfcFilter;var IfcFireSuppressionTerminal=/*#__PURE__*/function(_IfcFlowTerminal13){_inherits(IfcFireSuppressionTerminal,_IfcFlowTerminal13);var _super1581=_createSuper(IfcFireSuppressionTerminal);function IfcFireSuppressionTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1578;_classCallCheck(this,IfcFireSuppressionTerminal);_this1578=_super1581.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1578.GlobalId=GlobalId;_this1578.OwnerHistory=OwnerHistory;_this1578.Name=Name;_this1578.Description=Description;_this1578.ObjectType=ObjectType;_this1578.ObjectPlacement=ObjectPlacement;_this1578.Representation=Representation;_this1578.Tag=Tag;_this1578.PredefinedType=PredefinedType;_this1578.type=1426591983;return _this1578;}return _createClass(IfcFireSuppressionTerminal);}(IfcFlowTerminal);IFC42.IfcFireSuppressionTerminal=IfcFireSuppressionTerminal;var IfcFlowInstrument=/*#__PURE__*/function(_IfcDistributionContr13){_inherits(IfcFlowInstrument,_IfcDistributionContr13);var _super1582=_createSuper(IfcFlowInstrument);function IfcFlowInstrument(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1579;_classCallCheck(this,IfcFlowInstrument);_this1579=_super1582.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1579.GlobalId=GlobalId;_this1579.OwnerHistory=OwnerHistory;_this1579.Name=Name;_this1579.Description=Description;_this1579.ObjectType=ObjectType;_this1579.ObjectPlacement=ObjectPlacement;_this1579.Representation=Representation;_this1579.Tag=Tag;_this1579.PredefinedType=PredefinedType;_this1579.type=182646315;return _this1579;}return _createClass(IfcFlowInstrument);}(IfcDistributionControlElement);IFC42.IfcFlowInstrument=IfcFlowInstrument;var IfcProtectiveDeviceTrippingUnit=/*#__PURE__*/function(_IfcDistributionContr14){_inherits(IfcProtectiveDeviceTrippingUnit,_IfcDistributionContr14);var _super1583=_createSuper(IfcProtectiveDeviceTrippingUnit);function IfcProtectiveDeviceTrippingUnit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1580;_classCallCheck(this,IfcProtectiveDeviceTrippingUnit);_this1580=_super1583.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1580.GlobalId=GlobalId;_this1580.OwnerHistory=OwnerHistory;_this1580.Name=Name;_this1580.Description=Description;_this1580.ObjectType=ObjectType;_this1580.ObjectPlacement=ObjectPlacement;_this1580.Representation=Representation;_this1580.Tag=Tag;_this1580.PredefinedType=PredefinedType;_this1580.type=2295281155;return _this1580;}return _createClass(IfcProtectiveDeviceTrippingUnit);}(IfcDistributionControlElement);IFC42.IfcProtectiveDeviceTrippingUnit=IfcProtectiveDeviceTrippingUnit;var IfcSensor=/*#__PURE__*/function(_IfcDistributionContr15){_inherits(IfcSensor,_IfcDistributionContr15);var _super1584=_createSuper(IfcSensor);function IfcSensor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1581;_classCallCheck(this,IfcSensor);_this1581=_super1584.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1581.GlobalId=GlobalId;_this1581.OwnerHistory=OwnerHistory;_this1581.Name=Name;_this1581.Description=Description;_this1581.ObjectType=ObjectType;_this1581.ObjectPlacement=ObjectPlacement;_this1581.Representation=Representation;_this1581.Tag=Tag;_this1581.PredefinedType=PredefinedType;_this1581.type=4086658281;return _this1581;}return _createClass(IfcSensor);}(IfcDistributionControlElement);IFC42.IfcSensor=IfcSensor;var IfcUnitaryControlElement=/*#__PURE__*/function(_IfcDistributionContr16){_inherits(IfcUnitaryControlElement,_IfcDistributionContr16);var _super1585=_createSuper(IfcUnitaryControlElement);function IfcUnitaryControlElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1582;_classCallCheck(this,IfcUnitaryControlElement);_this1582=_super1585.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1582.GlobalId=GlobalId;_this1582.OwnerHistory=OwnerHistory;_this1582.Name=Name;_this1582.Description=Description;_this1582.ObjectType=ObjectType;_this1582.ObjectPlacement=ObjectPlacement;_this1582.Representation=Representation;_this1582.Tag=Tag;_this1582.PredefinedType=PredefinedType;_this1582.type=630975310;return _this1582;}return _createClass(IfcUnitaryControlElement);}(IfcDistributionControlElement);IFC42.IfcUnitaryControlElement=IfcUnitaryControlElement;var IfcActuator=/*#__PURE__*/function(_IfcDistributionContr17){_inherits(IfcActuator,_IfcDistributionContr17);var _super1586=_createSuper(IfcActuator);function IfcActuator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1583;_classCallCheck(this,IfcActuator);_this1583=_super1586.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1583.GlobalId=GlobalId;_this1583.OwnerHistory=OwnerHistory;_this1583.Name=Name;_this1583.Description=Description;_this1583.ObjectType=ObjectType;_this1583.ObjectPlacement=ObjectPlacement;_this1583.Representation=Representation;_this1583.Tag=Tag;_this1583.PredefinedType=PredefinedType;_this1583.type=4288193352;return _this1583;}return _createClass(IfcActuator);}(IfcDistributionControlElement);IFC42.IfcActuator=IfcActuator;var IfcAlarm=/*#__PURE__*/function(_IfcDistributionContr18){_inherits(IfcAlarm,_IfcDistributionContr18);var _super1587=_createSuper(IfcAlarm);function IfcAlarm(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1584;_classCallCheck(this,IfcAlarm);_this1584=_super1587.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1584.GlobalId=GlobalId;_this1584.OwnerHistory=OwnerHistory;_this1584.Name=Name;_this1584.Description=Description;_this1584.ObjectType=ObjectType;_this1584.ObjectPlacement=ObjectPlacement;_this1584.Representation=Representation;_this1584.Tag=Tag;_this1584.PredefinedType=PredefinedType;_this1584.type=3087945054;return _this1584;}return _createClass(IfcAlarm);}(IfcDistributionControlElement);IFC42.IfcAlarm=IfcAlarm;var IfcController=/*#__PURE__*/function(_IfcDistributionContr19){_inherits(IfcController,_IfcDistributionContr19);var _super1588=_createSuper(IfcController);function IfcController(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this1585;_classCallCheck(this,IfcController);_this1585=_super1588.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this1585.GlobalId=GlobalId;_this1585.OwnerHistory=OwnerHistory;_this1585.Name=Name;_this1585.Description=Description;_this1585.ObjectType=ObjectType;_this1585.ObjectPlacement=ObjectPlacement;_this1585.Representation=Representation;_this1585.Tag=Tag;_this1585.PredefinedType=PredefinedType;_this1585.type=25142252;return _this1585;}return _createClass(IfcController);}(IfcDistributionControlElement);IFC42.IfcController=IfcController;})(IFC4||(IFC4={}));SchemaNames[3]="IFC4X3";FromRawLineData[3]={3630933823:function _(id,v){return new IFC4X3.IfcActorRole(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value));},618182010:function _(id,v){return new IFC4X3.IfcAddress(id,v[0],!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},2879124712:function _(id,v){return new IFC4X3.IfcAlignmentParameterSegment(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value));},3633395639:function _(id,v){return new IFC4X3.IfcAlignmentVerticalSegment(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new IFC4X3.IfcLengthMeasure(v[2].value),new IFC4X3.IfcNonNegativeLengthMeasure(v[3].value),new IFC4X3.IfcLengthMeasure(v[4].value),new IFC4X3.IfcRatioMeasure(v[5].value),new IFC4X3.IfcRatioMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcLengthMeasure(v[7].value),v[8]);},639542469:function _(id,v){return new IFC4X3.IfcApplication(id,new Handle(v[0].value),new IFC4X3.IfcLabel(v[1].value),new IFC4X3.IfcLabel(v[2].value),new IFC4X3.IfcIdentifier(v[3].value));},411424972:function _(id,v){return new IFC4X3.IfcAppliedValue(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcDate(v[4].value),!v[5]?null:new IFC4X3.IfcDate(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],!v[9]?null:v[9].map(function(p){return new Handle(p.value);}));},130549933:function _(id,v){return new IFC4X3.IfcApproval(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value),!v[3]?null:new IFC4X3.IfcDateTime(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value));},4037036970:function _(id,v){return new IFC4X3.IfcBoundaryCondition(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value));},1560379544:function _(id,v){return new IFC4X3.IfcBoundaryEdgeCondition(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(3,v[1]),!v[2]?null:TypeInitialiser(3,v[2]),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]),!v[5]?null:TypeInitialiser(3,v[5]),!v[6]?null:TypeInitialiser(3,v[6]));},3367102660:function _(id,v){return new IFC4X3.IfcBoundaryFaceCondition(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(3,v[1]),!v[2]?null:TypeInitialiser(3,v[2]),!v[3]?null:TypeInitialiser(3,v[3]));},1387855156:function _(id,v){return new IFC4X3.IfcBoundaryNodeCondition(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(3,v[1]),!v[2]?null:TypeInitialiser(3,v[2]),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]),!v[5]?null:TypeInitialiser(3,v[5]),!v[6]?null:TypeInitialiser(3,v[6]));},2069777674:function _(id,v){return new IFC4X3.IfcBoundaryNodeConditionWarping(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:TypeInitialiser(3,v[1]),!v[2]?null:TypeInitialiser(3,v[2]),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]),!v[5]?null:TypeInitialiser(3,v[5]),!v[6]?null:TypeInitialiser(3,v[6]),!v[7]?null:TypeInitialiser(3,v[7]));},2859738748:function _(id,_107){return new IFC4X3.IfcConnectionGeometry(id);},2614616156:function _(id,v){return new IFC4X3.IfcConnectionPointGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},2732653382:function _(id,v){return new IFC4X3.IfcConnectionSurfaceGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},775493141:function _(id,v){return new IFC4X3.IfcConnectionVolumeGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1959218052:function _(id,v){return new IFC4X3.IfcConstraint(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2],!v[3]?null:new IFC4X3.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value));},1785450214:function _(id,v){return new IFC4X3.IfcCoordinateOperation(id,new Handle(v[0].value),new Handle(v[1].value));},1466758467:function _(id,v){return new IFC4X3.IfcCoordinateReferenceSystem(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new IFC4X3.IfcIdentifier(v[2].value),!v[3]?null:new IFC4X3.IfcIdentifier(v[3].value));},602808272:function _(id,v){return new IFC4X3.IfcCostValue(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcDate(v[4].value),!v[5]?null:new IFC4X3.IfcDate(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],!v[9]?null:v[9].map(function(p){return new Handle(p.value);}));},1765591967:function _(id,v){return new IFC4X3.IfcDerivedUnit(id,v[0].map(function(p){return new Handle(p.value);}),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcLabel(v[3].value));},1045800335:function _(id,v){return new IFC4X3.IfcDerivedUnitElement(id,new Handle(v[0].value),v[1].value);},2949456006:function _(id,v){return new IFC4X3.IfcDimensionalExponents(id,v[0].value,v[1].value,v[2].value,v[3].value,v[4].value,v[5].value,v[6].value);},4294318154:function _(id,_108){return new IFC4X3.IfcExternalInformation(id);},3200245327:function _(id,v){return new IFC4X3.IfcExternalReference(id,!v[0]?null:new IFC4X3.IfcURIReference(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},2242383968:function _(id,v){return new IFC4X3.IfcExternallyDefinedHatchStyle(id,!v[0]?null:new IFC4X3.IfcURIReference(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},1040185647:function _(id,v){return new IFC4X3.IfcExternallyDefinedSurfaceStyle(id,!v[0]?null:new IFC4X3.IfcURIReference(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},3548104201:function _(id,v){return new IFC4X3.IfcExternallyDefinedTextFont(id,!v[0]?null:new IFC4X3.IfcURIReference(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},852622518:function _(id,v){return new IFC4X3.IfcGridAxis(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),new IFC4X3.IfcBoolean(v[2].value));},3020489413:function _(id,v){return new IFC4X3.IfcIrregularTimeSeriesValue(id,new IFC4X3.IfcDateTime(v[0].value),v[1].map(function(p){return TypeInitialiser(3,p);}));},2655187982:function _(id,v){return new IFC4X3.IfcLibraryInformation(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new IFC4X3.IfcDateTime(v[3].value),!v[4]?null:new IFC4X3.IfcURIReference(v[4].value),!v[5]?null:new IFC4X3.IfcText(v[5].value));},3452421091:function _(id,v){return new IFC4X3.IfcLibraryReference(id,!v[0]?null:new IFC4X3.IfcURIReference(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLanguageId(v[4].value),!v[5]?null:new Handle(v[5].value));},4162380809:function _(id,v){return new IFC4X3.IfcLightDistributionData(id,new IFC4X3.IfcPlaneAngleMeasure(v[0].value),v[1].map(function(p){return new IFC4X3.IfcPlaneAngleMeasure(p.value);}),v[2].map(function(p){return new IFC4X3.IfcLuminousIntensityDistributionMeasure(p.value);}));},1566485204:function _(id,v){return new IFC4X3.IfcLightIntensityDistribution(id,v[0],v[1].map(function(p){return new Handle(p.value);}));},3057273783:function _(id,v){return new IFC4X3.IfcMapConversion(id,new Handle(v[0].value),new Handle(v[1].value),new IFC4X3.IfcLengthMeasure(v[2].value),new IFC4X3.IfcLengthMeasure(v[3].value),new IFC4X3.IfcLengthMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcReal(v[5].value),!v[6]?null:new IFC4X3.IfcReal(v[6].value),!v[7]?null:new IFC4X3.IfcReal(v[7].value),!v[8]?null:new IFC4X3.IfcReal(v[8].value),!v[9]?null:new IFC4X3.IfcReal(v[9].value));},1847130766:function _(id,v){return new IFC4X3.IfcMaterialClassificationRelationship(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value));},760658860:function _(id,_109){return new IFC4X3.IfcMaterialDefinition(id);},248100487:function _(id,v){return new IFC4X3.IfcMaterialLayer(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcNonNegativeLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLogical(v[2].value),!v[3]?null:new IFC4X3.IfcLabel(v[3].value),!v[4]?null:new IFC4X3.IfcText(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcInteger(v[6].value));},3303938423:function _(id,v){return new IFC4X3.IfcMaterialLayerSet(id,v[0].map(function(p){return new Handle(p.value);}),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value));},1847252529:function _(id,v){return new IFC4X3.IfcMaterialLayerWithOffsets(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcNonNegativeLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLogical(v[2].value),!v[3]?null:new IFC4X3.IfcLabel(v[3].value),!v[4]?null:new IFC4X3.IfcText(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcInteger(v[6].value),v[7],new IFC4X3.IfcLengthMeasure(v[8].value));},2199411900:function _(id,v){return new IFC4X3.IfcMaterialList(id,v[0].map(function(p){return new Handle(p.value);}));},2235152071:function _(id,v){return new IFC4X3.IfcMaterialProfile(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcInteger(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value));},164193824:function _(id,v){return new IFC4X3.IfcMaterialProfileSet(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new Handle(v[3].value));},552965576:function _(id,v){return new IFC4X3.IfcMaterialProfileWithOffsets(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcInteger(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),new IFC4X3.IfcLengthMeasure(v[6].value));},1507914824:function _(id,_110){return new IFC4X3.IfcMaterialUsageDefinition(id);},2597039031:function _(id,v){return new IFC4X3.IfcMeasureWithUnit(id,TypeInitialiser(3,v[0]),new Handle(v[1].value));},3368373690:function _(id,v){return new IFC4X3.IfcMetric(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2],!v[3]?null:new IFC4X3.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),v[7],!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value));},2706619895:function _(id,v){return new IFC4X3.IfcMonetaryUnit(id,new IFC4X3.IfcLabel(v[0].value));},1918398963:function _(id,v){return new IFC4X3.IfcNamedUnit(id,new Handle(v[0].value),v[1]);},3701648758:function _(id,v){return new IFC4X3.IfcObjectPlacement(id,!v[0]?null:new Handle(v[0].value));},2251480897:function _(id,v){return new IFC4X3.IfcObjective(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2],!v[3]?null:new IFC4X3.IfcLabel(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),v[8],v[9],!v[10]?null:new IFC4X3.IfcLabel(v[10].value));},4251960020:function _(id,v){return new IFC4X3.IfcOrganization(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value),!v[3]?null:v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:v[4].map(function(p){return new Handle(p.value);}));},1207048766:function _(id,v){return new IFC4X3.IfcOwnerHistory(id,new Handle(v[0].value),new Handle(v[1].value),v[2],v[3],!v[4]?null:new IFC4X3.IfcTimeStamp(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new IFC4X3.IfcTimeStamp(v[7].value));},2077209135:function _(id,v){return new IFC4X3.IfcPerson(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[5]?null:v[5].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},101040310:function _(id,v){return new IFC4X3.IfcPersonAndOrganization(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2483315170:function _(id,v){return new IFC4X3.IfcPhysicalQuantity(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value));},2226359599:function _(id,v){return new IFC4X3.IfcPhysicalSimpleQuantity(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value));},3355820592:function _(id,v){return new IFC4X3.IfcPostalAddress(id,v[0],!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcLabel(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:new IFC4X3.IfcLabel(v[9].value));},677532197:function _(id,_111){return new IFC4X3.IfcPresentationItem(id);},2022622350:function _(id,v){return new IFC4X3.IfcPresentationLayerAssignment(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC4X3.IfcIdentifier(v[3].value));},1304840413:function _(id,v){return new IFC4X3.IfcPresentationLayerWithStyle(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC4X3.IfcIdentifier(v[3].value),new IFC4X3.IfcLogical(v[4].value),new IFC4X3.IfcLogical(v[5].value),new IFC4X3.IfcLogical(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},3119450353:function _(id,v){return new IFC4X3.IfcPresentationStyle(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value));},2095639259:function _(id,v){return new IFC4X3.IfcProductRepresentation(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},3958567839:function _(id,v){return new IFC4X3.IfcProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value));},3843373140:function _(id,v){return new IFC4X3.IfcProjectedCRS(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new IFC4X3.IfcIdentifier(v[2].value),!v[3]?null:new IFC4X3.IfcIdentifier(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new Handle(v[6].value));},986844984:function _(id,_112){return new IFC4X3.IfcPropertyAbstraction(id);},3710013099:function _(id,v){return new IFC4X3.IfcPropertyEnumeration(id,new IFC4X3.IfcLabel(v[0].value),v[1].map(function(p){return TypeInitialiser(3,p);}),!v[2]?null:new Handle(v[2].value));},2044713172:function _(id,v){return new IFC4X3.IfcQuantityArea(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcAreaMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},2093928680:function _(id,v){return new IFC4X3.IfcQuantityCount(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcCountMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},931644368:function _(id,v){return new IFC4X3.IfcQuantityLength(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},2691318326:function _(id,v){return new IFC4X3.IfcQuantityNumber(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcNumericMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},3252649465:function _(id,v){return new IFC4X3.IfcQuantityTime(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcTimeMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},2405470396:function _(id,v){return new IFC4X3.IfcQuantityVolume(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcVolumeMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},825690147:function _(id,v){return new IFC4X3.IfcQuantityWeight(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcMassMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},3915482550:function _(id,v){return new IFC4X3.IfcRecurrencePattern(id,v[0],!v[1]?null:v[1].map(function(p){return new IFC4X3.IfcDayInMonthNumber(p.value);}),!v[2]?null:v[2].map(function(p){return new IFC4X3.IfcDayInWeekNumber(p.value);}),!v[3]?null:v[3].map(function(p){return new IFC4X3.IfcMonthInYearNumber(p.value);}),!v[4]?null:new IFC4X3.IfcInteger(v[4].value),!v[5]?null:new IFC4X3.IfcInteger(v[5].value),!v[6]?null:new IFC4X3.IfcInteger(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}));},2433181523:function _(id,v){return new IFC4X3.IfcReference(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4X3.IfcInteger(p.value);}),!v[4]?null:new Handle(v[4].value));},1076942058:function _(id,v){return new IFC4X3.IfcRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3377609919:function _(id,v){return new IFC4X3.IfcRepresentationContext(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value));},3008791417:function _(id,_113){return new IFC4X3.IfcRepresentationItem(id);},1660063152:function _(id,v){return new IFC4X3.IfcRepresentationMap(id,new Handle(v[0].value),new Handle(v[1].value));},2439245199:function _(id,v){return new IFC4X3.IfcResourceLevelRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value));},2341007311:function _(id,v){return new IFC4X3.IfcRoot(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},448429030:function _(id,v){return new IFC4X3.IfcSIUnit(id,new Handle(v[0].value),v[1],v[2],v[3]);},1054537805:function _(id,v){return new IFC4X3.IfcSchedulingTime(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},867548509:function _(id,v){return new IFC4X3.IfcShapeAspect(id,v[0].map(function(p){return new Handle(p.value);}),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value),new IFC4X3.IfcLogical(v[3].value),!v[4]?null:new Handle(v[4].value));},3982875396:function _(id,v){return new IFC4X3.IfcShapeModel(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},4240577450:function _(id,v){return new IFC4X3.IfcShapeRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2273995522:function _(id,v){return new IFC4X3.IfcStructuralConnectionCondition(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value));},2162789131:function _(id,v){return new IFC4X3.IfcStructuralLoad(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value));},3478079324:function _(id,v){return new IFC4X3.IfcStructuralLoadConfiguration(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:v[2].map(function(p){return new IFC4X3.IfcLengthMeasure(p.value);}));},609421318:function _(id,v){return new IFC4X3.IfcStructuralLoadOrResult(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value));},2525727697:function _(id,v){return new IFC4X3.IfcStructuralLoadStatic(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value));},3408363356:function _(id,v){return new IFC4X3.IfcStructuralLoadTemperature(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcThermodynamicTemperatureMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcThermodynamicTemperatureMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcThermodynamicTemperatureMeasure(v[3].value));},2830218821:function _(id,v){return new IFC4X3.IfcStyleModel(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3958052878:function _(id,v){return new IFC4X3.IfcStyledItem(id,!v[0]?null:new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},3049322572:function _(id,v){return new IFC4X3.IfcStyledRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2934153892:function _(id,v){return new IFC4X3.IfcSurfaceReinforcementArea(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:v[1].map(function(p){return new IFC4X3.IfcLengthMeasure(p.value);}),!v[2]?null:v[2].map(function(p){return new IFC4X3.IfcLengthMeasure(p.value);}),!v[3]?null:new IFC4X3.IfcRatioMeasure(v[3].value));},1300840506:function _(id,v){return new IFC4X3.IfcSurfaceStyle(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],v[2].map(function(p){return new Handle(p.value);}));},3303107099:function _(id,v){return new IFC4X3.IfcSurfaceStyleLighting(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},1607154358:function _(id,v){return new IFC4X3.IfcSurfaceStyleRefraction(id,!v[0]?null:new IFC4X3.IfcReal(v[0].value),!v[1]?null:new IFC4X3.IfcReal(v[1].value));},846575682:function _(id,v){return new IFC4X3.IfcSurfaceStyleShading(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[1].value));},1351298697:function _(id,v){return new IFC4X3.IfcSurfaceStyleWithTextures(id,v[0].map(function(p){return new Handle(p.value);}));},626085974:function _(id,v){return new IFC4X3.IfcSurfaceTexture(id,new IFC4X3.IfcBoolean(v[0].value),new IFC4X3.IfcBoolean(v[1].value),!v[2]?null:new IFC4X3.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcIdentifier(p.value);}));},985171141:function _(id,v){return new IFC4X3.IfcTable(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2043862942:function _(id,v){return new IFC4X3.IfcTableColumn(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value));},531007025:function _(id,v){return new IFC4X3.IfcTableRow(id,!v[0]?null:v[0].map(function(p){return TypeInitialiser(3,p);}),!v[1]?null:new IFC4X3.IfcBoolean(v[1].value));},1549132990:function _(id,v){return new IFC4X3.IfcTaskTime(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3],!v[4]?null:new IFC4X3.IfcDuration(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new IFC4X3.IfcDateTime(v[6].value),!v[7]?null:new IFC4X3.IfcDateTime(v[7].value),!v[8]?null:new IFC4X3.IfcDateTime(v[8].value),!v[9]?null:new IFC4X3.IfcDateTime(v[9].value),!v[10]?null:new IFC4X3.IfcDateTime(v[10].value),!v[11]?null:new IFC4X3.IfcDuration(v[11].value),!v[12]?null:new IFC4X3.IfcDuration(v[12].value),!v[13]?null:new IFC4X3.IfcBoolean(v[13].value),!v[14]?null:new IFC4X3.IfcDateTime(v[14].value),!v[15]?null:new IFC4X3.IfcDuration(v[15].value),!v[16]?null:new IFC4X3.IfcDateTime(v[16].value),!v[17]?null:new IFC4X3.IfcDateTime(v[17].value),!v[18]?null:new IFC4X3.IfcDuration(v[18].value),!v[19]?null:new IFC4X3.IfcPositiveRatioMeasure(v[19].value));},2771591690:function _(id,v){return new IFC4X3.IfcTaskTimeRecurring(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3],!v[4]?null:new IFC4X3.IfcDuration(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new IFC4X3.IfcDateTime(v[6].value),!v[7]?null:new IFC4X3.IfcDateTime(v[7].value),!v[8]?null:new IFC4X3.IfcDateTime(v[8].value),!v[9]?null:new IFC4X3.IfcDateTime(v[9].value),!v[10]?null:new IFC4X3.IfcDateTime(v[10].value),!v[11]?null:new IFC4X3.IfcDuration(v[11].value),!v[12]?null:new IFC4X3.IfcDuration(v[12].value),!v[13]?null:new IFC4X3.IfcBoolean(v[13].value),!v[14]?null:new IFC4X3.IfcDateTime(v[14].value),!v[15]?null:new IFC4X3.IfcDuration(v[15].value),!v[16]?null:new IFC4X3.IfcDateTime(v[16].value),!v[17]?null:new IFC4X3.IfcDateTime(v[17].value),!v[18]?null:new IFC4X3.IfcDuration(v[18].value),!v[19]?null:new IFC4X3.IfcPositiveRatioMeasure(v[19].value),new Handle(v[20].value));},912023232:function _(id,v){return new IFC4X3.IfcTelecomAddress(id,v[0],!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:v[6].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[7]?null:new IFC4X3.IfcURIReference(v[7].value),!v[8]?null:v[8].map(function(p){return new IFC4X3.IfcURIReference(p.value);}));},1447204868:function _(id,v){return new IFC4X3.IfcTextStyle(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcBoolean(v[4].value));},2636378356:function _(id,v){return new IFC4X3.IfcTextStyleForDefinedFont(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1640371178:function _(id,v){return new IFC4X3.IfcTextStyleTextModel(id,!v[0]?null:TypeInitialiser(3,v[0]),!v[1]?null:new IFC4X3.IfcTextAlignment(v[1].value),!v[2]?null:new IFC4X3.IfcTextDecoration(v[2].value),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]),!v[5]?null:new IFC4X3.IfcTextTransformation(v[5].value),!v[6]?null:TypeInitialiser(3,v[6]));},280115917:function _(id,v){return new IFC4X3.IfcTextureCoordinate(id,v[0].map(function(p){return new Handle(p.value);}));},1742049831:function _(id,v){return new IFC4X3.IfcTextureCoordinateGenerator(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLabel(v[1].value),!v[2]?null:v[2].map(function(p){return new IFC4X3.IfcReal(p.value);}));},222769930:function _(id,v){return new IFC4X3.IfcTextureCoordinateIndices(id,v[0].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}),new Handle(v[1].value));},1010789467:function _(id,v){return new IFC4X3.IfcTextureCoordinateIndicesWithVoids(id,v[0].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}),new Handle(v[1].value),v[2].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}));},2552916305:function _(id,v){return new IFC4X3.IfcTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new Handle(p.value);}),new Handle(v[2].value));},1210645708:function _(id,v){return new IFC4X3.IfcTextureVertex(id,v[0].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}));},3611470254:function _(id,v){return new IFC4X3.IfcTextureVertexList(id,v[0].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}));},1199560280:function _(id,v){return new IFC4X3.IfcTimePeriod(id,new IFC4X3.IfcTime(v[0].value),new IFC4X3.IfcTime(v[1].value));},3101149627:function _(id,v){return new IFC4X3.IfcTimeSeries(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new IFC4X3.IfcDateTime(v[2].value),new IFC4X3.IfcDateTime(v[3].value),v[4],v[5],!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value));},581633288:function _(id,v){return new IFC4X3.IfcTimeSeriesValue(id,v[0].map(function(p){return TypeInitialiser(3,p);}));},1377556343:function _(id,_114){return new IFC4X3.IfcTopologicalRepresentationItem(id);},1735638870:function _(id,v){return new IFC4X3.IfcTopologyRepresentation(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},180925521:function _(id,v){return new IFC4X3.IfcUnitAssignment(id,v[0].map(function(p){return new Handle(p.value);}));},2799835756:function _(id,_115){return new IFC4X3.IfcVertex(id);},1907098498:function _(id,v){return new IFC4X3.IfcVertexPoint(id,new Handle(v[0].value));},891718957:function _(id,v){return new IFC4X3.IfcVirtualGridIntersection(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new IFC4X3.IfcLengthMeasure(p.value);}));},1236880293:function _(id,v){return new IFC4X3.IfcWorkTime(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcDate(v[4].value),!v[5]?null:new IFC4X3.IfcDate(v[5].value));},3752311538:function _(id,v){return new IFC4X3.IfcAlignmentCantSegment(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new IFC4X3.IfcLengthMeasure(v[2].value),new IFC4X3.IfcNonNegativeLengthMeasure(v[3].value),new IFC4X3.IfcLengthMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcLengthMeasure(v[5].value),new IFC4X3.IfcLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcLengthMeasure(v[7].value),v[8]);},536804194:function _(id,v){return new IFC4X3.IfcAlignmentHorizontalSegment(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC4X3.IfcPlaneAngleMeasure(v[3].value),new IFC4X3.IfcLengthMeasure(v[4].value),new IFC4X3.IfcLengthMeasure(v[5].value),new IFC4X3.IfcNonNegativeLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcPositiveLengthMeasure(v[7].value),v[8]);},3869604511:function _(id,v){return new IFC4X3.IfcApprovalRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},3798115385:function _(id,v){return new IFC4X3.IfcArbitraryClosedProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value));},1310608509:function _(id,v){return new IFC4X3.IfcArbitraryOpenProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value));},2705031697:function _(id,v){return new IFC4X3.IfcArbitraryProfileDefWithVoids(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},616511568:function _(id,v){return new IFC4X3.IfcBlobTexture(id,new IFC4X3.IfcBoolean(v[0].value),new IFC4X3.IfcBoolean(v[1].value),!v[2]?null:new IFC4X3.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcIdentifier(p.value);}),new IFC4X3.IfcIdentifier(v[5].value),new IFC4X3.IfcBinary(v[6].value));},3150382593:function _(id,v){return new IFC4X3.IfcCenterLineProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value));},747523909:function _(id,v){return new IFC4X3.IfcClassification(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcDate(v[2].value),new IFC4X3.IfcLabel(v[3].value),!v[4]?null:new IFC4X3.IfcText(v[4].value),!v[5]?null:new IFC4X3.IfcURIReference(v[5].value),!v[6]?null:v[6].map(function(p){return new IFC4X3.IfcIdentifier(p.value);}));},647927063:function _(id,v){return new IFC4X3.IfcClassificationReference(id,!v[0]?null:new IFC4X3.IfcURIReference(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcText(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value));},3285139300:function _(id,v){return new IFC4X3.IfcColourRgbList(id,v[0].map(function(p){return new IFC4X3.IfcNormalisedRatioMeasure(p.value);}));},3264961684:function _(id,v){return new IFC4X3.IfcColourSpecification(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value));},1485152156:function _(id,v){return new IFC4X3.IfcCompositeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:new IFC4X3.IfcLabel(v[3].value));},370225590:function _(id,v){return new IFC4X3.IfcConnectedFaceSet(id,v[0].map(function(p){return new Handle(p.value);}));},1981873012:function _(id,v){return new IFC4X3.IfcConnectionCurveGeometry(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},45288368:function _(id,v){return new IFC4X3.IfcConnectionPointEccentricity(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLengthMeasure(v[4].value));},3050246964:function _(id,v){return new IFC4X3.IfcContextDependentUnit(id,new Handle(v[0].value),v[1],new IFC4X3.IfcLabel(v[2].value));},2889183280:function _(id,v){return new IFC4X3.IfcConversionBasedUnit(id,new Handle(v[0].value),v[1],new IFC4X3.IfcLabel(v[2].value),new Handle(v[3].value));},2713554722:function _(id,v){return new IFC4X3.IfcConversionBasedUnitWithOffset(id,new Handle(v[0].value),v[1],new IFC4X3.IfcLabel(v[2].value),new Handle(v[3].value),new IFC4X3.IfcReal(v[4].value));},539742890:function _(id,v){return new IFC4X3.IfcCurrencyRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value),new IFC4X3.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new Handle(v[6].value));},3800577675:function _(id,v){return new IFC4X3.IfcCurveStyle(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:TypeInitialiser(3,v[2]),!v[3]?null:new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcBoolean(v[4].value));},1105321065:function _(id,v){return new IFC4X3.IfcCurveStyleFont(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},2367409068:function _(id,v){return new IFC4X3.IfcCurveStyleFontAndScaling(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),new IFC4X3.IfcPositiveRatioMeasure(v[2].value));},3510044353:function _(id,v){return new IFC4X3.IfcCurveStyleFontPattern(id,new IFC4X3.IfcLengthMeasure(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value));},3632507154:function _(id,v){return new IFC4X3.IfcDerivedProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},1154170062:function _(id,v){return new IFC4X3.IfcDocumentInformation(id,new IFC4X3.IfcIdentifier(v[0].value),new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value),!v[3]?null:new IFC4X3.IfcURIReference(v[3].value),!v[4]?null:new IFC4X3.IfcText(v[4].value),!v[5]?null:new IFC4X3.IfcText(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new IFC4X3.IfcDateTime(v[10].value),!v[11]?null:new IFC4X3.IfcDateTime(v[11].value),!v[12]?null:new IFC4X3.IfcIdentifier(v[12].value),!v[13]?null:new IFC4X3.IfcDate(v[13].value),!v[14]?null:new IFC4X3.IfcDate(v[14].value),v[15],v[16]);},770865208:function _(id,v){return new IFC4X3.IfcDocumentInformationRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},3732053477:function _(id,v){return new IFC4X3.IfcDocumentReference(id,!v[0]?null:new IFC4X3.IfcURIReference(v[0].value),!v[1]?null:new IFC4X3.IfcIdentifier(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value));},3900360178:function _(id,v){return new IFC4X3.IfcEdge(id,new Handle(v[0].value),new Handle(v[1].value));},476780140:function _(id,v){return new IFC4X3.IfcEdgeCurve(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value),new IFC4X3.IfcBoolean(v[3].value));},211053100:function _(id,v){return new IFC4X3.IfcEventTime(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcDateTime(v[3].value),!v[4]?null:new IFC4X3.IfcDateTime(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new IFC4X3.IfcDateTime(v[6].value));},297599258:function _(id,v){return new IFC4X3.IfcExtendedProperties(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},1437805879:function _(id,v){return new IFC4X3.IfcExternalReferenceRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2556980723:function _(id,v){return new IFC4X3.IfcFace(id,v[0].map(function(p){return new Handle(p.value);}));},1809719519:function _(id,v){return new IFC4X3.IfcFaceBound(id,new Handle(v[0].value),new IFC4X3.IfcBoolean(v[1].value));},803316827:function _(id,v){return new IFC4X3.IfcFaceOuterBound(id,new Handle(v[0].value),new IFC4X3.IfcBoolean(v[1].value));},3008276851:function _(id,v){return new IFC4X3.IfcFaceSurface(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new IFC4X3.IfcBoolean(v[2].value));},4219587988:function _(id,v){return new IFC4X3.IfcFailureConnectionCondition(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcForceMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcForceMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcForceMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcForceMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcForceMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcForceMeasure(v[6].value));},738692330:function _(id,v){return new IFC4X3.IfcFillAreaStyle(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC4X3.IfcBoolean(v[2].value));},3448662350:function _(id,v){return new IFC4X3.IfcGeometricRepresentationContext(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new IFC4X3.IfcDimensionCount(v[2].value),!v[3]?null:new IFC4X3.IfcReal(v[3].value),new Handle(v[4].value),!v[5]?null:new Handle(v[5].value));},2453401579:function _(id,_116){return new IFC4X3.IfcGeometricRepresentationItem(id);},4142052618:function _(id,v){return new IFC4X3.IfcGeometricRepresentationSubContext(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveRatioMeasure(v[4].value),v[5],!v[6]?null:new IFC4X3.IfcLabel(v[6].value));},3590301190:function _(id,v){return new IFC4X3.IfcGeometricSet(id,v[0].map(function(p){return new Handle(p.value);}));},178086475:function _(id,v){return new IFC4X3.IfcGridPlacement(id,!v[0]?null:new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},812098782:function _(id,v){return new IFC4X3.IfcHalfSpaceSolid(id,new Handle(v[0].value),new IFC4X3.IfcBoolean(v[1].value));},3905492369:function _(id,v){return new IFC4X3.IfcImageTexture(id,new IFC4X3.IfcBoolean(v[0].value),new IFC4X3.IfcBoolean(v[1].value),!v[2]?null:new IFC4X3.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcIdentifier(p.value);}),new IFC4X3.IfcURIReference(v[5].value));},3570813810:function _(id,v){return new IFC4X3.IfcIndexedColourMap(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}));},1437953363:function _(id,v){return new IFC4X3.IfcIndexedTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new Handle(v[2].value));},2133299955:function _(id,v){return new IFC4X3.IfcIndexedTriangleTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:v[3].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}));},3741457305:function _(id,v){return new IFC4X3.IfcIrregularTimeSeries(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new IFC4X3.IfcDateTime(v[2].value),new IFC4X3.IfcDateTime(v[3].value),v[4],v[5],!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),v[8].map(function(p){return new Handle(p.value);}));},1585845231:function _(id,v){return new IFC4X3.IfcLagTime(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value),TypeInitialiser(3,v[3]),v[4]);},1402838566:function _(id,v){return new IFC4X3.IfcLightSource(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[3].value));},125510826:function _(id,v){return new IFC4X3.IfcLightSourceAmbient(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[3].value));},2604431987:function _(id,v){return new IFC4X3.IfcLightSourceDirectional(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value));},4266656042:function _(id,v){return new IFC4X3.IfcLightSourceGoniometric(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),new IFC4X3.IfcThermodynamicTemperatureMeasure(v[6].value),new IFC4X3.IfcLuminousFluxMeasure(v[7].value),v[8],new Handle(v[9].value));},1520743889:function _(id,v){return new IFC4X3.IfcLightSourcePositional(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcReal(v[6].value),new IFC4X3.IfcReal(v[7].value),new IFC4X3.IfcReal(v[8].value));},3422422726:function _(id,v){return new IFC4X3.IfcLightSourceSpot(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[3].value),new Handle(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcReal(v[6].value),new IFC4X3.IfcReal(v[7].value),new IFC4X3.IfcReal(v[8].value),new Handle(v[9].value),!v[10]?null:new IFC4X3.IfcReal(v[10].value),new IFC4X3.IfcPositivePlaneAngleMeasure(v[11].value),new IFC4X3.IfcPositivePlaneAngleMeasure(v[12].value));},388784114:function _(id,v){return new IFC4X3.IfcLinearPlacement(id,!v[0]?null:new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},2624227202:function _(id,v){return new IFC4X3.IfcLocalPlacement(id,!v[0]?null:new Handle(v[0].value),new Handle(v[1].value));},1008929658:function _(id,_117){return new IFC4X3.IfcLoop(id);},2347385850:function _(id,v){return new IFC4X3.IfcMappedItem(id,new Handle(v[0].value),new Handle(v[1].value));},1838606355:function _(id,v){return new IFC4X3.IfcMaterial(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},3708119e3:function _(id,v){return new IFC4X3.IfcMaterialConstituent(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},2852063980:function _(id,v){return new IFC4X3.IfcMaterialConstituentSet(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2022407955:function _(id,v){return new IFC4X3.IfcMaterialDefinitionRepresentation(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},1303795690:function _(id,v){return new IFC4X3.IfcMaterialLayerSetUsage(id,new Handle(v[0].value),v[1],v[2],new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveLengthMeasure(v[4].value));},3079605661:function _(id,v){return new IFC4X3.IfcMaterialProfileSetUsage(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcCardinalPointReference(v[1].value),!v[2]?null:new IFC4X3.IfcPositiveLengthMeasure(v[2].value));},3404854881:function _(id,v){return new IFC4X3.IfcMaterialProfileSetUsageTapering(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcCardinalPointReference(v[1].value),!v[2]?null:new IFC4X3.IfcPositiveLengthMeasure(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcCardinalPointReference(v[4].value));},3265635763:function _(id,v){return new IFC4X3.IfcMaterialProperties(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},853536259:function _(id,v){return new IFC4X3.IfcMaterialRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},2998442950:function _(id,v){return new IFC4X3.IfcMirroredProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},219451334:function _(id,v){return new IFC4X3.IfcObjectDefinition(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},182550632:function _(id,v){return new IFC4X3.IfcOpenCrossProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),new IFC4X3.IfcBoolean(v[2].value),v[3].map(function(p){return new IFC4X3.IfcNonNegativeLengthMeasure(p.value);}),v[4].map(function(p){return new IFC4X3.IfcPlaneAngleMeasure(p.value);}),!v[5]?null:v[5].map(function(p){return new IFC4X3.IfcLabel(p.value);}),!v[6]?null:new Handle(v[6].value));},2665983363:function _(id,v){return new IFC4X3.IfcOpenShell(id,v[0].map(function(p){return new Handle(p.value);}));},1411181986:function _(id,v){return new IFC4X3.IfcOrganizationRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1029017970:function _(id,v){return new IFC4X3.IfcOrientedEdge(id,new Handle(v[0].value),new Handle(v[1].value),new IFC4X3.IfcBoolean(v[2].value));},2529465313:function _(id,v){return new IFC4X3.IfcParameterizedProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value));},2519244187:function _(id,v){return new IFC4X3.IfcPath(id,v[0].map(function(p){return new Handle(p.value);}));},3021840470:function _(id,v){return new IFC4X3.IfcPhysicalComplexQuantity(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLabel(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value));},597895409:function _(id,v){return new IFC4X3.IfcPixelTexture(id,new IFC4X3.IfcBoolean(v[0].value),new IFC4X3.IfcBoolean(v[1].value),!v[2]?null:new IFC4X3.IfcIdentifier(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcIdentifier(p.value);}),new IFC4X3.IfcInteger(v[5].value),new IFC4X3.IfcInteger(v[6].value),new IFC4X3.IfcInteger(v[7].value),v[8].map(function(p){return new IFC4X3.IfcBinary(p.value);}));},2004835150:function _(id,v){return new IFC4X3.IfcPlacement(id,new Handle(v[0].value));},1663979128:function _(id,v){return new IFC4X3.IfcPlanarExtent(id,new IFC4X3.IfcLengthMeasure(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value));},2067069095:function _(id,_118){return new IFC4X3.IfcPoint(id);},2165702409:function _(id,v){return new IFC4X3.IfcPointByDistanceExpression(id,TypeInitialiser(3,v[0]),!v[1]?null:new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value),new Handle(v[4].value));},4022376103:function _(id,v){return new IFC4X3.IfcPointOnCurve(id,new Handle(v[0].value),new IFC4X3.IfcParameterValue(v[1].value));},1423911732:function _(id,v){return new IFC4X3.IfcPointOnSurface(id,new Handle(v[0].value),new IFC4X3.IfcParameterValue(v[1].value),new IFC4X3.IfcParameterValue(v[2].value));},2924175390:function _(id,v){return new IFC4X3.IfcPolyLoop(id,v[0].map(function(p){return new Handle(p.value);}));},2775532180:function _(id,v){return new IFC4X3.IfcPolygonalBoundedHalfSpace(id,new Handle(v[0].value),new IFC4X3.IfcBoolean(v[1].value),new Handle(v[2].value),new Handle(v[3].value));},3727388367:function _(id,v){return new IFC4X3.IfcPreDefinedItem(id,new IFC4X3.IfcLabel(v[0].value));},3778827333:function _(id,_119){return new IFC4X3.IfcPreDefinedProperties(id);},1775413392:function _(id,v){return new IFC4X3.IfcPreDefinedTextFont(id,new IFC4X3.IfcLabel(v[0].value));},673634403:function _(id,v){return new IFC4X3.IfcProductDefinitionShape(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}));},2802850158:function _(id,v){return new IFC4X3.IfcProfileProperties(id,!v[0]?null:new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},2598011224:function _(id,v){return new IFC4X3.IfcProperty(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value));},1680319473:function _(id,v){return new IFC4X3.IfcPropertyDefinition(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},148025276:function _(id,v){return new IFC4X3.IfcPropertyDependencyRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),new Handle(v[3].value),!v[4]?null:new IFC4X3.IfcText(v[4].value));},3357820518:function _(id,v){return new IFC4X3.IfcPropertySetDefinition(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},1482703590:function _(id,v){return new IFC4X3.IfcPropertyTemplateDefinition(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},2090586900:function _(id,v){return new IFC4X3.IfcQuantitySet(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},3615266464:function _(id,v){return new IFC4X3.IfcRectangleProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value));},3413951693:function _(id,v){return new IFC4X3.IfcRegularTimeSeries(id,new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new IFC4X3.IfcDateTime(v[2].value),new IFC4X3.IfcDateTime(v[3].value),v[4],v[5],!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),new IFC4X3.IfcTimeMeasure(v[8].value),v[9].map(function(p){return new Handle(p.value);}));},1580146022:function _(id,v){return new IFC4X3.IfcReinforcementBarProperties(id,new IFC4X3.IfcAreaMeasure(v[0].value),new IFC4X3.IfcLabel(v[1].value),v[2],!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcCountMeasure(v[5].value));},478536968:function _(id,v){return new IFC4X3.IfcRelationship(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},2943643501:function _(id,v){return new IFC4X3.IfcResourceApprovalRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),v[2].map(function(p){return new Handle(p.value);}),new Handle(v[3].value));},1608871552:function _(id,v){return new IFC4X3.IfcResourceConstraintRelationship(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},1042787934:function _(id,v){return new IFC4X3.IfcResourceTime(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),v[1],!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcDuration(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveRatioMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcDateTime(v[5].value),!v[6]?null:new IFC4X3.IfcDateTime(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcDuration(v[8].value),!v[9]?null:new IFC4X3.IfcBoolean(v[9].value),!v[10]?null:new IFC4X3.IfcDateTime(v[10].value),!v[11]?null:new IFC4X3.IfcDuration(v[11].value),!v[12]?null:new IFC4X3.IfcPositiveRatioMeasure(v[12].value),!v[13]?null:new IFC4X3.IfcDateTime(v[13].value),!v[14]?null:new IFC4X3.IfcDateTime(v[14].value),!v[15]?null:new IFC4X3.IfcDuration(v[15].value),!v[16]?null:new IFC4X3.IfcPositiveRatioMeasure(v[16].value),!v[17]?null:new IFC4X3.IfcPositiveRatioMeasure(v[17].value));},2778083089:function _(id,v){return new IFC4X3.IfcRoundedRectangleProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value));},2042790032:function _(id,v){return new IFC4X3.IfcSectionProperties(id,v[0],new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},4165799628:function _(id,v){return new IFC4X3.IfcSectionReinforcementProperties(id,new IFC4X3.IfcLengthMeasure(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),v[3],new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},1509187699:function _(id,v){return new IFC4X3.IfcSectionedSpine(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}));},823603102:function _(id,v){return new IFC4X3.IfcSegment(id,v[0]);},4124623270:function _(id,v){return new IFC4X3.IfcShellBasedSurfaceModel(id,v[0].map(function(p){return new Handle(p.value);}));},3692461612:function _(id,v){return new IFC4X3.IfcSimpleProperty(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value));},2609359061:function _(id,v){return new IFC4X3.IfcSlippageConnectionCondition(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value));},723233188:function _(id,_120){return new IFC4X3.IfcSolidModel(id);},1595516126:function _(id,v){return new IFC4X3.IfcStructuralLoadLinearForce(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLinearForceMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLinearForceMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLinearForceMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLinearMomentMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcLinearMomentMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcLinearMomentMeasure(v[6].value));},2668620305:function _(id,v){return new IFC4X3.IfcStructuralLoadPlanarForce(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcPlanarForceMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcPlanarForceMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcPlanarForceMeasure(v[3].value));},2473145415:function _(id,v){return new IFC4X3.IfcStructuralLoadSingleDisplacement(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcPlaneAngleMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcPlaneAngleMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcPlaneAngleMeasure(v[6].value));},1973038258:function _(id,v){return new IFC4X3.IfcStructuralLoadSingleDisplacementDistortion(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcPlaneAngleMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcPlaneAngleMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcPlaneAngleMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcCurvatureMeasure(v[7].value));},1597423693:function _(id,v){return new IFC4X3.IfcStructuralLoadSingleForce(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcForceMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcForceMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcForceMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcTorqueMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcTorqueMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcTorqueMeasure(v[6].value));},1190533807:function _(id,v){return new IFC4X3.IfcStructuralLoadSingleForceWarping(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),!v[1]?null:new IFC4X3.IfcForceMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcForceMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcForceMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcTorqueMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcTorqueMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcTorqueMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcWarpingMomentMeasure(v[7].value));},2233826070:function _(id,v){return new IFC4X3.IfcSubedge(id,new Handle(v[0].value),new Handle(v[1].value),new Handle(v[2].value));},2513912981:function _(id,_121){return new IFC4X3.IfcSurface(id);},1878645084:function _(id,v){return new IFC4X3.IfcSurfaceStyleRendering(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:TypeInitialiser(3,v[7]),v[8]);},2247615214:function _(id,v){return new IFC4X3.IfcSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},1260650574:function _(id,v){return new IFC4X3.IfcSweptDiskSolid(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcPositiveLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcParameterValue(v[3].value),!v[4]?null:new IFC4X3.IfcParameterValue(v[4].value));},1096409881:function _(id,v){return new IFC4X3.IfcSweptDiskSolidPolygonal(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcPositiveLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcParameterValue(v[3].value),!v[4]?null:new IFC4X3.IfcParameterValue(v[4].value),!v[5]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[5].value));},230924584:function _(id,v){return new IFC4X3.IfcSweptSurface(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},3071757647:function _(id,v){return new IFC4X3.IfcTShapeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[9].value),!v[10]?null:new IFC4X3.IfcPlaneAngleMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcPlaneAngleMeasure(v[11].value));},901063453:function _(id,_122){return new IFC4X3.IfcTessellatedItem(id);},4282788508:function _(id,v){return new IFC4X3.IfcTextLiteral(id,new IFC4X3.IfcPresentableText(v[0].value),new Handle(v[1].value),v[2]);},3124975700:function _(id,v){return new IFC4X3.IfcTextLiteralWithExtent(id,new IFC4X3.IfcPresentableText(v[0].value),new Handle(v[1].value),v[2],new Handle(v[3].value),new IFC4X3.IfcBoxAlignment(v[4].value));},1983826977:function _(id,v){return new IFC4X3.IfcTextStyleFontModel(id,new IFC4X3.IfcLabel(v[0].value),v[1].map(function(p){return new IFC4X3.IfcTextFontName(p.value);}),!v[2]?null:new IFC4X3.IfcFontStyle(v[2].value),!v[3]?null:new IFC4X3.IfcFontVariant(v[3].value),!v[4]?null:new IFC4X3.IfcFontWeight(v[4].value),TypeInitialiser(3,v[5]));},2715220739:function _(id,v){return new IFC4X3.IfcTrapeziumProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcLengthMeasure(v[6].value));},1628702193:function _(id,v){return new IFC4X3.IfcTypeObject(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}));},3736923433:function _(id,v){return new IFC4X3.IfcTypeProcess(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2347495698:function _(id,v){return new IFC4X3.IfcTypeProduct(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value));},3698973494:function _(id,v){return new IFC4X3.IfcTypeResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},427810014:function _(id,v){return new IFC4X3.IfcUShapeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcPlaneAngleMeasure(v[9].value));},1417489154:function _(id,v){return new IFC4X3.IfcVector(id,new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value));},2759199220:function _(id,v){return new IFC4X3.IfcVertexLoop(id,new Handle(v[0].value));},2543172580:function _(id,v){return new IFC4X3.IfcZShapeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[8].value));},3406155212:function _(id,v){return new IFC4X3.IfcAdvancedFace(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new IFC4X3.IfcBoolean(v[2].value));},669184980:function _(id,v){return new IFC4X3.IfcAnnotationFillArea(id,new Handle(v[0].value),!v[1]?null:v[1].map(function(p){return new Handle(p.value);}));},3207858831:function _(id,v){return new IFC4X3.IfcAsymmetricIShapeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),new IFC4X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcPlaneAngleMeasure(v[12].value),!v[13]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[13].value),!v[14]?null:new IFC4X3.IfcPlaneAngleMeasure(v[14].value));},4261334040:function _(id,v){return new IFC4X3.IfcAxis1Placement(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},3125803723:function _(id,v){return new IFC4X3.IfcAxis2Placement2D(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value));},2740243338:function _(id,v){return new IFC4X3.IfcAxis2Placement3D(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},3425423356:function _(id,v){return new IFC4X3.IfcAxis2PlacementLinear(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new Handle(v[2].value));},2736907675:function _(id,v){return new IFC4X3.IfcBooleanResult(id,v[0],new Handle(v[1].value),new Handle(v[2].value));},4182860854:function _(id,_123){return new IFC4X3.IfcBoundedSurface(id);},2581212453:function _(id,v){return new IFC4X3.IfcBoundingBox(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),new IFC4X3.IfcPositiveLengthMeasure(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value));},2713105998:function _(id,v){return new IFC4X3.IfcBoxedHalfSpace(id,new Handle(v[0].value),new IFC4X3.IfcBoolean(v[1].value),new Handle(v[2].value));},2898889636:function _(id,v){return new IFC4X3.IfcCShapeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value));},1123145078:function _(id,v){return new IFC4X3.IfcCartesianPoint(id,v[0].map(function(p){return new IFC4X3.IfcLengthMeasure(p.value);}));},574549367:function _(id,_124){return new IFC4X3.IfcCartesianPointList(id);},1675464909:function _(id,v){return new IFC4X3.IfcCartesianPointList2D(id,v[0].map(function(p){return new IFC4X3.IfcLengthMeasure(p.value);}),!v[1]?null:v[1].map(function(p){return new IFC4X3.IfcLabel(p.value);}));},2059837836:function _(id,v){return new IFC4X3.IfcCartesianPointList3D(id,v[0].map(function(p){return new IFC4X3.IfcLengthMeasure(p.value);}),!v[1]?null:v[1].map(function(p){return new IFC4X3.IfcLabel(p.value);}));},59481748:function _(id,v){return new IFC4X3.IfcCartesianTransformationOperator(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4X3.IfcReal(v[3].value));},3749851601:function _(id,v){return new IFC4X3.IfcCartesianTransformationOperator2D(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4X3.IfcReal(v[3].value));},3486308946:function _(id,v){return new IFC4X3.IfcCartesianTransformationOperator2DnonUniform(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4X3.IfcReal(v[3].value),!v[4]?null:new IFC4X3.IfcReal(v[4].value));},3331915920:function _(id,v){return new IFC4X3.IfcCartesianTransformationOperator3D(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4X3.IfcReal(v[3].value),!v[4]?null:new Handle(v[4].value));},1416205885:function _(id,v){return new IFC4X3.IfcCartesianTransformationOperator3DnonUniform(id,!v[0]?null:new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:new IFC4X3.IfcReal(v[3].value),!v[4]?null:new Handle(v[4].value),!v[5]?null:new IFC4X3.IfcReal(v[5].value),!v[6]?null:new IFC4X3.IfcReal(v[6].value));},1383045692:function _(id,v){return new IFC4X3.IfcCircleProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value));},2205249479:function _(id,v){return new IFC4X3.IfcClosedShell(id,v[0].map(function(p){return new Handle(p.value);}));},776857604:function _(id,v){return new IFC4X3.IfcColourRgb(id,!v[0]?null:new IFC4X3.IfcLabel(v[0].value),new IFC4X3.IfcNormalisedRatioMeasure(v[1].value),new IFC4X3.IfcNormalisedRatioMeasure(v[2].value),new IFC4X3.IfcNormalisedRatioMeasure(v[3].value));},2542286263:function _(id,v){return new IFC4X3.IfcComplexProperty(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),new IFC4X3.IfcIdentifier(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},2485617015:function _(id,v){return new IFC4X3.IfcCompositeCurveSegment(id,v[0],new IFC4X3.IfcBoolean(v[1].value),new Handle(v[2].value));},2574617495:function _(id,v){return new IFC4X3.IfcConstructionResourceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value));},3419103109:function _(id,v){return new IFC4X3.IfcContext(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new Handle(v[8].value));},1815067380:function _(id,v){return new IFC4X3.IfcCrewResourceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},2506170314:function _(id,v){return new IFC4X3.IfcCsgPrimitive3D(id,new Handle(v[0].value));},2147822146:function _(id,v){return new IFC4X3.IfcCsgSolid(id,new Handle(v[0].value));},2601014836:function _(id,_125){return new IFC4X3.IfcCurve(id);},2827736869:function _(id,v){return new IFC4X3.IfcCurveBoundedPlane(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:v[2].map(function(p){return new Handle(p.value);}));},2629017746:function _(id,v){return new IFC4X3.IfcCurveBoundedSurface(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcBoolean(v[2].value));},4212018352:function _(id,v){return new IFC4X3.IfcCurveSegment(id,v[0],new Handle(v[1].value),TypeInitialiser(3,v[2]),TypeInitialiser(3,v[3]),new Handle(v[4].value));},32440307:function _(id,v){return new IFC4X3.IfcDirection(id,v[0].map(function(p){return new IFC4X3.IfcReal(p.value);}));},593015953:function _(id,v){return new IFC4X3.IfcDirectrixCurveSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]));},1472233963:function _(id,v){return new IFC4X3.IfcEdgeLoop(id,v[0].map(function(p){return new Handle(p.value);}));},1883228015:function _(id,v){return new IFC4X3.IfcElementQuantity(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},339256511:function _(id,v){return new IFC4X3.IfcElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2777663545:function _(id,v){return new IFC4X3.IfcElementarySurface(id,new Handle(v[0].value));},2835456948:function _(id,v){return new IFC4X3.IfcEllipseProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value));},4024345920:function _(id,v){return new IFC4X3.IfcEventType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],v[10],!v[11]?null:new IFC4X3.IfcLabel(v[11].value));},477187591:function _(id,v){return new IFC4X3.IfcExtrudedAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value));},2804161546:function _(id,v){return new IFC4X3.IfcExtrudedAreaSolidTapered(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new Handle(v[4].value));},2047409740:function _(id,v){return new IFC4X3.IfcFaceBasedSurfaceModel(id,v[0].map(function(p){return new Handle(p.value);}));},374418227:function _(id,v){return new IFC4X3.IfcFillAreaStyleHatching(id,new Handle(v[0].value),new Handle(v[1].value),!v[2]?null:new Handle(v[2].value),!v[3]?null:new Handle(v[3].value),new IFC4X3.IfcPlaneAngleMeasure(v[4].value));},315944413:function _(id,v){return new IFC4X3.IfcFillAreaStyleTiles(id,v[0].map(function(p){return new Handle(p.value);}),v[1].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcPositiveRatioMeasure(v[2].value));},2652556860:function _(id,v){return new IFC4X3.IfcFixedReferenceSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]),new Handle(v[5].value));},4238390223:function _(id,v){return new IFC4X3.IfcFurnishingElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},1268542332:function _(id,v){return new IFC4X3.IfcFurnitureType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],v[10]);},4095422895:function _(id,v){return new IFC4X3.IfcGeographicElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},987898635:function _(id,v){return new IFC4X3.IfcGeometricCurveSet(id,v[0].map(function(p){return new Handle(p.value);}));},1484403080:function _(id,v){return new IFC4X3.IfcIShapeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcPlaneAngleMeasure(v[9].value));},178912537:function _(id,v){return new IFC4X3.IfcIndexedPolygonalFace(id,v[0].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}));},2294589976:function _(id,v){return new IFC4X3.IfcIndexedPolygonalFaceWithVoids(id,v[0].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}),v[1].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}));},3465909080:function _(id,v){return new IFC4X3.IfcIndexedPolygonalTextureMap(id,v[0].map(function(p){return new Handle(p.value);}),new Handle(v[1].value),new Handle(v[2].value),v[3].map(function(p){return new Handle(p.value);}));},572779678:function _(id,v){return new IFC4X3.IfcLShapeProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcPlaneAngleMeasure(v[8].value));},428585644:function _(id,v){return new IFC4X3.IfcLaborResourceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},1281925730:function _(id,v){return new IFC4X3.IfcLine(id,new Handle(v[0].value),new Handle(v[1].value));},1425443689:function _(id,v){return new IFC4X3.IfcManifoldSolidBrep(id,new Handle(v[0].value));},3888040117:function _(id,v){return new IFC4X3.IfcObject(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},590820931:function _(id,v){return new IFC4X3.IfcOffsetCurve(id,new Handle(v[0].value));},3388369263:function _(id,v){return new IFC4X3.IfcOffsetCurve2D(id,new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),new IFC4X3.IfcLogical(v[2].value));},3505215534:function _(id,v){return new IFC4X3.IfcOffsetCurve3D(id,new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),new IFC4X3.IfcLogical(v[2].value),new Handle(v[3].value));},2485787929:function _(id,v){return new IFC4X3.IfcOffsetCurveByDistances(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),!v[2]?null:new IFC4X3.IfcLabel(v[2].value));},1682466193:function _(id,v){return new IFC4X3.IfcPcurve(id,new Handle(v[0].value),new Handle(v[1].value));},603570806:function _(id,v){return new IFC4X3.IfcPlanarBox(id,new IFC4X3.IfcLengthMeasure(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),new Handle(v[2].value));},220341763:function _(id,v){return new IFC4X3.IfcPlane(id,new Handle(v[0].value));},3381221214:function _(id,v){return new IFC4X3.IfcPolynomialCurve(id,new Handle(v[0].value),!v[1]?null:v[1].map(function(p){return new IFC4X3.IfcReal(p.value);}),!v[2]?null:v[2].map(function(p){return new IFC4X3.IfcReal(p.value);}),!v[3]?null:v[3].map(function(p){return new IFC4X3.IfcReal(p.value);}));},759155922:function _(id,v){return new IFC4X3.IfcPreDefinedColour(id,new IFC4X3.IfcLabel(v[0].value));},2559016684:function _(id,v){return new IFC4X3.IfcPreDefinedCurveFont(id,new IFC4X3.IfcLabel(v[0].value));},3967405729:function _(id,v){return new IFC4X3.IfcPreDefinedPropertySet(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},569719735:function _(id,v){return new IFC4X3.IfcProcedureType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2945172077:function _(id,v){return new IFC4X3.IfcProcess(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value));},4208778838:function _(id,v){return new IFC4X3.IfcProduct(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},103090709:function _(id,v){return new IFC4X3.IfcProject(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new Handle(v[8].value));},653396225:function _(id,v){return new IFC4X3.IfcProjectLibrary(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new Handle(v[8].value));},871118103:function _(id,v){return new IFC4X3.IfcPropertyBoundedValue(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:TypeInitialiser(3,v[2]),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:new Handle(v[4].value),!v[5]?null:TypeInitialiser(3,v[5]));},4166981789:function _(id,v){return new IFC4X3.IfcPropertyEnumeratedValue(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return TypeInitialiser(3,p);}),!v[3]?null:new Handle(v[3].value));},2752243245:function _(id,v){return new IFC4X3.IfcPropertyListValue(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return TypeInitialiser(3,p);}),!v[3]?null:new Handle(v[3].value));},941946838:function _(id,v){return new IFC4X3.IfcPropertyReferenceValue(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:new IFC4X3.IfcText(v[2].value),!v[3]?null:new Handle(v[3].value));},1451395588:function _(id,v){return new IFC4X3.IfcPropertySet(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}));},492091185:function _(id,v){return new IFC4X3.IfcPropertySetTemplate(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4],!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),v[6].map(function(p){return new Handle(p.value);}));},3650150729:function _(id,v){return new IFC4X3.IfcPropertySingleValue(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:TypeInitialiser(3,v[2]),!v[3]?null:new Handle(v[3].value));},110355661:function _(id,v){return new IFC4X3.IfcPropertyTableValue(id,new IFC4X3.IfcIdentifier(v[0].value),!v[1]?null:new IFC4X3.IfcText(v[1].value),!v[2]?null:v[2].map(function(p){return TypeInitialiser(3,p);}),!v[3]?null:v[3].map(function(p){return TypeInitialiser(3,p);}),!v[4]?null:new IFC4X3.IfcText(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},3521284610:function _(id,v){return new IFC4X3.IfcPropertyTemplate(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},2770003689:function _(id,v){return new IFC4X3.IfcRectangleHollowProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value),new IFC4X3.IfcPositiveLengthMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value));},2798486643:function _(id,v){return new IFC4X3.IfcRectangularPyramid(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),new IFC4X3.IfcPositiveLengthMeasure(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value));},3454111270:function _(id,v){return new IFC4X3.IfcRectangularTrimmedSurface(id,new Handle(v[0].value),new IFC4X3.IfcParameterValue(v[1].value),new IFC4X3.IfcParameterValue(v[2].value),new IFC4X3.IfcParameterValue(v[3].value),new IFC4X3.IfcParameterValue(v[4].value),new IFC4X3.IfcBoolean(v[5].value),new IFC4X3.IfcBoolean(v[6].value));},3765753017:function _(id,v){return new IFC4X3.IfcReinforcementDefinitionProperties(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},3939117080:function _(id,v){return new IFC4X3.IfcRelAssigns(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5]);},1683148259:function _(id,v){return new IFC4X3.IfcRelAssignsToActor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},2495723537:function _(id,v){return new IFC4X3.IfcRelAssignsToControl(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1307041759:function _(id,v){return new IFC4X3.IfcRelAssignsToGroup(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1027710054:function _(id,v){return new IFC4X3.IfcRelAssignsToGroupByFactor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),new IFC4X3.IfcRatioMeasure(v[7].value));},4278684876:function _(id,v){return new IFC4X3.IfcRelAssignsToProcess(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},2857406711:function _(id,v){return new IFC4X3.IfcRelAssignsToProduct(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},205026976:function _(id,v){return new IFC4X3.IfcRelAssignsToResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),v[5],new Handle(v[6].value));},1865459582:function _(id,v){return new IFC4X3.IfcRelAssociates(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}));},4095574036:function _(id,v){return new IFC4X3.IfcRelAssociatesApproval(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},919958153:function _(id,v){return new IFC4X3.IfcRelAssociatesClassification(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},2728634034:function _(id,v){return new IFC4X3.IfcRelAssociatesConstraint(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),new Handle(v[6].value));},982818633:function _(id,v){return new IFC4X3.IfcRelAssociatesDocument(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},3840914261:function _(id,v){return new IFC4X3.IfcRelAssociatesLibrary(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},2655215786:function _(id,v){return new IFC4X3.IfcRelAssociatesMaterial(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},1033248425:function _(id,v){return new IFC4X3.IfcRelAssociatesProfileDef(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},826625072:function _(id,v){return new IFC4X3.IfcRelConnects(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},1204542856:function _(id,v){return new IFC4X3.IfcRelConnectsElements(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value));},3945020480:function _(id,v){return new IFC4X3.IfcRelConnectsPathElements(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value),v[7].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[8].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[9],v[10]);},4201705270:function _(id,v){return new IFC4X3.IfcRelConnectsPortToElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},3190031847:function _(id,v){return new IFC4X3.IfcRelConnectsPorts(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},2127690289:function _(id,v){return new IFC4X3.IfcRelConnectsStructuralActivity(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},1638771189:function _(id,v){return new IFC4X3.IfcRelConnectsStructuralMember(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC4X3.IfcLengthMeasure(v[8].value),!v[9]?null:new Handle(v[9].value));},504942748:function _(id,v){return new IFC4X3.IfcRelConnectsWithEccentricity(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC4X3.IfcLengthMeasure(v[8].value),!v[9]?null:new Handle(v[9].value),new Handle(v[10].value));},3678494232:function _(id,v){return new IFC4X3.IfcRelConnectsWithRealizingElements(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new Handle(v[4].value),new Handle(v[5].value),new Handle(v[6].value),v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},3242617779:function _(id,v){return new IFC4X3.IfcRelContainedInSpatialStructure(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},886880790:function _(id,v){return new IFC4X3.IfcRelCoversBldgElements(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2802773753:function _(id,v){return new IFC4X3.IfcRelCoversSpaces(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2565941209:function _(id,v){return new IFC4X3.IfcRelDeclares(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},2551354335:function _(id,v){return new IFC4X3.IfcRelDecomposes(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},693640335:function _(id,v){return new IFC4X3.IfcRelDefines(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value));},1462361463:function _(id,v){return new IFC4X3.IfcRelDefinesByObject(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},4186316022:function _(id,v){return new IFC4X3.IfcRelDefinesByProperties(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},307848117:function _(id,v){return new IFC4X3.IfcRelDefinesByTemplate(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},781010003:function _(id,v){return new IFC4X3.IfcRelDefinesByType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},3940055652:function _(id,v){return new IFC4X3.IfcRelFillsElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},279856033:function _(id,v){return new IFC4X3.IfcRelFlowControlElements(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},427948657:function _(id,v){return new IFC4X3.IfcRelInterferesElements(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new IFC4X3.IfcIdentifier(v[8].value),new IFC4X3.IfcLogical(v[9].value));},3268803585:function _(id,v){return new IFC4X3.IfcRelNests(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},1441486842:function _(id,v){return new IFC4X3.IfcRelPositions(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},750771296:function _(id,v){return new IFC4X3.IfcRelProjectsElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},1245217292:function _(id,v){return new IFC4X3.IfcRelReferencedInSpatialStructure(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4].map(function(p){return new Handle(p.value);}),new Handle(v[5].value));},4122056220:function _(id,v){return new IFC4X3.IfcRelSequence(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},366585022:function _(id,v){return new IFC4X3.IfcRelServicesBuildings(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},3451746338:function _(id,v){return new IFC4X3.IfcRelSpaceBoundary(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8]);},3523091289:function _(id,v){return new IFC4X3.IfcRelSpaceBoundary1stLevel(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8],!v[9]?null:new Handle(v[9].value));},1521410863:function _(id,v){return new IFC4X3.IfcRelSpaceBoundary2ndLevel(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8],!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value));},1401173127:function _(id,v){return new IFC4X3.IfcRelVoidsElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),new Handle(v[5].value));},816062949:function _(id,v){return new IFC4X3.IfcReparametrisedCompositeCurveSegment(id,v[0],new IFC4X3.IfcBoolean(v[1].value),new Handle(v[2].value),new IFC4X3.IfcParameterValue(v[3].value));},2914609552:function _(id,v){return new IFC4X3.IfcResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value));},1856042241:function _(id,v){return new IFC4X3.IfcRevolvedAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4X3.IfcPlaneAngleMeasure(v[3].value));},3243963512:function _(id,v){return new IFC4X3.IfcRevolvedAreaSolidTapered(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4X3.IfcPlaneAngleMeasure(v[3].value),new Handle(v[4].value));},4158566097:function _(id,v){return new IFC4X3.IfcRightCircularCone(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),new IFC4X3.IfcPositiveLengthMeasure(v[2].value));},3626867408:function _(id,v){return new IFC4X3.IfcRightCircularCylinder(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),new IFC4X3.IfcPositiveLengthMeasure(v[2].value));},1862484736:function _(id,v){return new IFC4X3.IfcSectionedSolid(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},1290935644:function _(id,v){return new IFC4X3.IfcSectionedSolidHorizontal(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}));},1356537516:function _(id,v){return new IFC4X3.IfcSectionedSurface(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}));},3663146110:function _(id,v){return new IFC4X3.IfcSimplePropertyTemplate(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4],!v[5]?null:new IFC4X3.IfcLabel(v[5].value),!v[6]?null:new IFC4X3.IfcLabel(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new IFC4X3.IfcLabel(v[10].value),v[11]);},1412071761:function _(id,v){return new IFC4X3.IfcSpatialElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value));},710998568:function _(id,v){return new IFC4X3.IfcSpatialElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2706606064:function _(id,v){return new IFC4X3.IfcSpatialStructureElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8]);},3893378262:function _(id,v){return new IFC4X3.IfcSpatialStructureElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},463610769:function _(id,v){return new IFC4X3.IfcSpatialZone(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8]);},2481509218:function _(id,v){return new IFC4X3.IfcSpatialZoneType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcLabel(v[10].value));},451544542:function _(id,v){return new IFC4X3.IfcSphere(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value));},4015995234:function _(id,v){return new IFC4X3.IfcSphericalSurface(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value));},2735484536:function _(id,v){return new IFC4X3.IfcSpiral(id,!v[0]?null:new Handle(v[0].value));},3544373492:function _(id,v){return new IFC4X3.IfcStructuralActivity(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},3136571912:function _(id,v){return new IFC4X3.IfcStructuralItem(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},530289379:function _(id,v){return new IFC4X3.IfcStructuralMember(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},3689010777:function _(id,v){return new IFC4X3.IfcStructuralReaction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},3979015343:function _(id,v){return new IFC4X3.IfcStructuralSurfaceMember(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC4X3.IfcPositiveLengthMeasure(v[8].value));},2218152070:function _(id,v){return new IFC4X3.IfcStructuralSurfaceMemberVarying(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],!v[8]?null:new IFC4X3.IfcPositiveLengthMeasure(v[8].value));},603775116:function _(id,v){return new IFC4X3.IfcStructuralSurfaceReaction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9]);},4095615324:function _(id,v){return new IFC4X3.IfcSubContractResourceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},699246055:function _(id,v){return new IFC4X3.IfcSurfaceCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2]);},2028607225:function _(id,v){return new IFC4X3.IfcSurfaceCurveSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]),new Handle(v[5].value));},2809605785:function _(id,v){return new IFC4X3.IfcSurfaceOfLinearExtrusion(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),new IFC4X3.IfcLengthMeasure(v[3].value));},4124788165:function _(id,v){return new IFC4X3.IfcSurfaceOfRevolution(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value));},1580310250:function _(id,v){return new IFC4X3.IfcSystemFurnitureElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3473067441:function _(id,v){return new IFC4X3.IfcTask(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),new IFC4X3.IfcBoolean(v[9].value),!v[10]?null:new IFC4X3.IfcInteger(v[10].value),!v[11]?null:new Handle(v[11].value),v[12]);},3206491090:function _(id,v){return new IFC4X3.IfcTaskType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcLabel(v[10].value));},2387106220:function _(id,v){return new IFC4X3.IfcTessellatedFaceSet(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcBoolean(v[1].value));},782932809:function _(id,v){return new IFC4X3.IfcThirdOrderPolynomialSpiral(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLengthMeasure(v[4].value));},1935646853:function _(id,v){return new IFC4X3.IfcToroidalSurface(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),new IFC4X3.IfcPositiveLengthMeasure(v[2].value));},3665877780:function _(id,v){return new IFC4X3.IfcTransportationDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2916149573:function _(id,v){return new IFC4X3.IfcTriangulatedFaceSet(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcBoolean(v[1].value),!v[2]?null:v[2].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[3].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}));},1229763772:function _(id,v){return new IFC4X3.IfcTriangulatedIrregularNetwork(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcBoolean(v[1].value),!v[2]?null:v[2].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[3].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}),!v[4]?null:v[4].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}),v[5].map(function(p){return new IFC4X3.IfcInteger(p.value);}));},3651464721:function _(id,v){return new IFC4X3.IfcVehicleType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},336235671:function _(id,v){return new IFC4X3.IfcWindowLiningProperties(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[9].value),!v[10]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[11].value),!v[12]?null:new Handle(v[12].value),!v[13]?null:new IFC4X3.IfcLengthMeasure(v[13].value),!v[14]?null:new IFC4X3.IfcLengthMeasure(v[14].value),!v[15]?null:new IFC4X3.IfcLengthMeasure(v[15].value));},512836454:function _(id,v){return new IFC4X3.IfcWindowPanelProperties(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4],v[5],!v[6]?null:new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new Handle(v[8].value));},2296667514:function _(id,v){return new IFC4X3.IfcActor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),new Handle(v[5].value));},1635779807:function _(id,v){return new IFC4X3.IfcAdvancedBrep(id,new Handle(v[0].value));},2603310189:function _(id,v){return new IFC4X3.IfcAdvancedBrepWithVoids(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},1674181508:function _(id,v){return new IFC4X3.IfcAnnotation(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},2887950389:function _(id,v){return new IFC4X3.IfcBSplineSurface(id,new IFC4X3.IfcInteger(v[0].value),new IFC4X3.IfcInteger(v[1].value),v[2].map(function(p){return new Handle(p.value);}),v[3],new IFC4X3.IfcLogical(v[4].value),new IFC4X3.IfcLogical(v[5].value),new IFC4X3.IfcLogical(v[6].value));},167062518:function _(id,v){return new IFC4X3.IfcBSplineSurfaceWithKnots(id,new IFC4X3.IfcInteger(v[0].value),new IFC4X3.IfcInteger(v[1].value),v[2].map(function(p){return new Handle(p.value);}),v[3],new IFC4X3.IfcLogical(v[4].value),new IFC4X3.IfcLogical(v[5].value),new IFC4X3.IfcLogical(v[6].value),v[7].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[8].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[9].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[10].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[11]);},1334484129:function _(id,v){return new IFC4X3.IfcBlock(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),new IFC4X3.IfcPositiveLengthMeasure(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value));},3649129432:function _(id,v){return new IFC4X3.IfcBooleanClippingResult(id,v[0],new Handle(v[1].value),new Handle(v[2].value));},1260505505:function _(id,_126){return new IFC4X3.IfcBoundedCurve(id);},3124254112:function _(id,v){return new IFC4X3.IfcBuildingStorey(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcLengthMeasure(v[9].value));},1626504194:function _(id,v){return new IFC4X3.IfcBuiltElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2197970202:function _(id,v){return new IFC4X3.IfcChimneyType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2937912522:function _(id,v){return new IFC4X3.IfcCircleHollowProfileDef(id,v[0],!v[1]?null:new IFC4X3.IfcLabel(v[1].value),!v[2]?null:new Handle(v[2].value),new IFC4X3.IfcPositiveLengthMeasure(v[3].value),new IFC4X3.IfcPositiveLengthMeasure(v[4].value));},3893394355:function _(id,v){return new IFC4X3.IfcCivilElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},3497074424:function _(id,v){return new IFC4X3.IfcClothoid(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value));},300633059:function _(id,v){return new IFC4X3.IfcColumnType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3875453745:function _(id,v){return new IFC4X3.IfcComplexPropertyTemplate(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],!v[6]?null:v[6].map(function(p){return new Handle(p.value);}));},3732776249:function _(id,v){return new IFC4X3.IfcCompositeCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLogical(v[1].value));},15328376:function _(id,v){return new IFC4X3.IfcCompositeCurveOnSurface(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLogical(v[1].value));},2510884976:function _(id,v){return new IFC4X3.IfcConic(id,new Handle(v[0].value));},2185764099:function _(id,v){return new IFC4X3.IfcConstructionEquipmentResourceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},4105962743:function _(id,v){return new IFC4X3.IfcConstructionMaterialResourceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},1525564444:function _(id,v){return new IFC4X3.IfcConstructionProductResourceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:new IFC4X3.IfcIdentifier(v[6].value),!v[7]?null:new IFC4X3.IfcText(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),!v[10]?null:new Handle(v[10].value),v[11]);},2559216714:function _(id,v){return new IFC4X3.IfcConstructionResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value));},3293443760:function _(id,v){return new IFC4X3.IfcControl(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value));},2000195564:function _(id,v){return new IFC4X3.IfcCosineSpiral(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value));},3895139033:function _(id,v){return new IFC4X3.IfcCostItem(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),v[6],!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}));},1419761937:function _(id,v){return new IFC4X3.IfcCostSchedule(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcDateTime(v[8].value),!v[9]?null:new IFC4X3.IfcDateTime(v[9].value));},4189326743:function _(id,v){return new IFC4X3.IfcCourseType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1916426348:function _(id,v){return new IFC4X3.IfcCoveringType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3295246426:function _(id,v){return new IFC4X3.IfcCrewResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},1457835157:function _(id,v){return new IFC4X3.IfcCurtainWallType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1213902940:function _(id,v){return new IFC4X3.IfcCylindricalSurface(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value));},1306400036:function _(id,v){return new IFC4X3.IfcDeepFoundationType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},4234616927:function _(id,v){return new IFC4X3.IfcDirectrixDerivedReferenceSweptAreaSolid(id,new Handle(v[0].value),!v[1]?null:new Handle(v[1].value),new Handle(v[2].value),!v[3]?null:TypeInitialiser(3,v[3]),!v[4]?null:TypeInitialiser(3,v[4]),new Handle(v[5].value));},3256556792:function _(id,v){return new IFC4X3.IfcDistributionElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},3849074793:function _(id,v){return new IFC4X3.IfcDistributionFlowElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2963535650:function _(id,v){return new IFC4X3.IfcDoorLiningProperties(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveLengthMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcNonNegativeLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcLengthMeasure(v[9].value),!v[10]?null:new IFC4X3.IfcLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcLengthMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcPositiveLengthMeasure(v[12].value),!v[13]?null:new IFC4X3.IfcPositiveLengthMeasure(v[13].value),!v[14]?null:new Handle(v[14].value),!v[15]?null:new IFC4X3.IfcLengthMeasure(v[15].value),!v[16]?null:new IFC4X3.IfcLengthMeasure(v[16].value));},1714330368:function _(id,v){return new IFC4X3.IfcDoorPanelProperties(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcPositiveLengthMeasure(v[4].value),v[5],!v[6]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[6].value),v[7],!v[8]?null:new Handle(v[8].value));},2323601079:function _(id,v){return new IFC4X3.IfcDoorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],v[10],!v[11]?null:new IFC4X3.IfcBoolean(v[11].value),!v[12]?null:new IFC4X3.IfcLabel(v[12].value));},445594917:function _(id,v){return new IFC4X3.IfcDraughtingPreDefinedColour(id,new IFC4X3.IfcLabel(v[0].value));},4006246654:function _(id,v){return new IFC4X3.IfcDraughtingPreDefinedCurveFont(id,new IFC4X3.IfcLabel(v[0].value));},1758889154:function _(id,v){return new IFC4X3.IfcElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},4123344466:function _(id,v){return new IFC4X3.IfcElementAssembly(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8],v[9]);},2397081782:function _(id,v){return new IFC4X3.IfcElementAssemblyType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1623761950:function _(id,v){return new IFC4X3.IfcElementComponent(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},2590856083:function _(id,v){return new IFC4X3.IfcElementComponentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},1704287377:function _(id,v){return new IFC4X3.IfcEllipse(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value),new IFC4X3.IfcPositiveLengthMeasure(v[2].value));},2107101300:function _(id,v){return new IFC4X3.IfcEnergyConversionDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},132023988:function _(id,v){return new IFC4X3.IfcEngineType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3174744832:function _(id,v){return new IFC4X3.IfcEvaporativeCoolerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3390157468:function _(id,v){return new IFC4X3.IfcEvaporatorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4148101412:function _(id,v){return new IFC4X3.IfcEvent(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),v[7],v[8],!v[9]?null:new IFC4X3.IfcLabel(v[9].value),!v[10]?null:new Handle(v[10].value));},2853485674:function _(id,v){return new IFC4X3.IfcExternalSpatialStructureElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value));},807026263:function _(id,v){return new IFC4X3.IfcFacetedBrep(id,new Handle(v[0].value));},3737207727:function _(id,v){return new IFC4X3.IfcFacetedBrepWithVoids(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}));},24185140:function _(id,v){return new IFC4X3.IfcFacility(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8]);},1310830890:function _(id,v){return new IFC4X3.IfcFacilityPart(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9]);},4228831410:function _(id,v){return new IFC4X3.IfcFacilityPartCommon(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9],v[10]);},647756555:function _(id,v){return new IFC4X3.IfcFastener(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2489546625:function _(id,v){return new IFC4X3.IfcFastenerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2827207264:function _(id,v){return new IFC4X3.IfcFeatureElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},2143335405:function _(id,v){return new IFC4X3.IfcFeatureElementAddition(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},1287392070:function _(id,v){return new IFC4X3.IfcFeatureElementSubtraction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3907093117:function _(id,v){return new IFC4X3.IfcFlowControllerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},3198132628:function _(id,v){return new IFC4X3.IfcFlowFittingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},3815607619:function _(id,v){return new IFC4X3.IfcFlowMeterType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1482959167:function _(id,v){return new IFC4X3.IfcFlowMovingDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},1834744321:function _(id,v){return new IFC4X3.IfcFlowSegmentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},1339347760:function _(id,v){return new IFC4X3.IfcFlowStorageDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2297155007:function _(id,v){return new IFC4X3.IfcFlowTerminalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},3009222698:function _(id,v){return new IFC4X3.IfcFlowTreatmentDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},1893162501:function _(id,v){return new IFC4X3.IfcFootingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},263784265:function _(id,v){return new IFC4X3.IfcFurnishingElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},1509553395:function _(id,v){return new IFC4X3.IfcFurniture(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3493046030:function _(id,v){return new IFC4X3.IfcGeographicElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4230923436:function _(id,v){return new IFC4X3.IfcGeotechnicalElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},1594536857:function _(id,v){return new IFC4X3.IfcGeotechnicalStratum(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2898700619:function _(id,v){return new IFC4X3.IfcGradientCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLogical(v[1].value),new Handle(v[2].value),!v[3]?null:new Handle(v[3].value));},2706460486:function _(id,v){return new IFC4X3.IfcGroup(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},1251058090:function _(id,v){return new IFC4X3.IfcHeatExchangerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1806887404:function _(id,v){return new IFC4X3.IfcHumidifierType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2568555532:function _(id,v){return new IFC4X3.IfcImpactProtectionDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3948183225:function _(id,v){return new IFC4X3.IfcImpactProtectionDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2571569899:function _(id,v){return new IFC4X3.IfcIndexedPolyCurve(id,new Handle(v[0].value),!v[1]?null:v[1].map(function(p){return TypeInitialiser(3,p);}),new IFC4X3.IfcLogical(v[2].value));},3946677679:function _(id,v){return new IFC4X3.IfcInterceptorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3113134337:function _(id,v){return new IFC4X3.IfcIntersectionCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2]);},2391368822:function _(id,v){return new IFC4X3.IfcInventory(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4X3.IfcDate(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value));},4288270099:function _(id,v){return new IFC4X3.IfcJunctionBoxType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},679976338:function _(id,v){return new IFC4X3.IfcKerbType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),new IFC4X3.IfcBoolean(v[9].value));},3827777499:function _(id,v){return new IFC4X3.IfcLaborResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},1051575348:function _(id,v){return new IFC4X3.IfcLampType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1161773419:function _(id,v){return new IFC4X3.IfcLightFixtureType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2176059722:function _(id,v){return new IFC4X3.IfcLinearElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},1770583370:function _(id,v){return new IFC4X3.IfcLiquidTerminalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},525669439:function _(id,v){return new IFC4X3.IfcMarineFacility(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9]);},976884017:function _(id,v){return new IFC4X3.IfcMarinePart(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9],v[10]);},377706215:function _(id,v){return new IFC4X3.IfcMechanicalFastener(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcPositiveLengthMeasure(v[9].value),v[10]);},2108223431:function _(id,v){return new IFC4X3.IfcMechanicalFastenerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcPositiveLengthMeasure(v[11].value));},1114901282:function _(id,v){return new IFC4X3.IfcMedicalDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3181161470:function _(id,v){return new IFC4X3.IfcMemberType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1950438474:function _(id,v){return new IFC4X3.IfcMobileTelecommunicationsApplianceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},710110818:function _(id,v){return new IFC4X3.IfcMooringDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},977012517:function _(id,v){return new IFC4X3.IfcMotorConnectionType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},506776471:function _(id,v){return new IFC4X3.IfcNavigationElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4143007308:function _(id,v){return new IFC4X3.IfcOccupant(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),new Handle(v[5].value),v[6]);},3588315303:function _(id,v){return new IFC4X3.IfcOpeningElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2837617999:function _(id,v){return new IFC4X3.IfcOutletType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},514975943:function _(id,v){return new IFC4X3.IfcPavementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2382730787:function _(id,v){return new IFC4X3.IfcPerformanceHistory(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),new IFC4X3.IfcLabel(v[6].value),v[7]);},3566463478:function _(id,v){return new IFC4X3.IfcPermeableCoveringProperties(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),v[4],v[5],!v[6]?null:new IFC4X3.IfcPositiveLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcPositiveLengthMeasure(v[7].value),!v[8]?null:new Handle(v[8].value));},3327091369:function _(id,v){return new IFC4X3.IfcPermit(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcText(v[8].value));},1158309216:function _(id,v){return new IFC4X3.IfcPileType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},804291784:function _(id,v){return new IFC4X3.IfcPipeFittingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4231323485:function _(id,v){return new IFC4X3.IfcPipeSegmentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4017108033:function _(id,v){return new IFC4X3.IfcPlateType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2839578677:function _(id,v){return new IFC4X3.IfcPolygonalFaceSet(id,new Handle(v[0].value),!v[1]?null:new IFC4X3.IfcBoolean(v[1].value),v[2].map(function(p){return new Handle(p.value);}),!v[3]?null:v[3].map(function(p){return new IFC4X3.IfcPositiveInteger(p.value);}));},3724593414:function _(id,v){return new IFC4X3.IfcPolyline(id,v[0].map(function(p){return new Handle(p.value);}));},3740093272:function _(id,v){return new IFC4X3.IfcPort(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},1946335990:function _(id,v){return new IFC4X3.IfcPositioningElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},2744685151:function _(id,v){return new IFC4X3.IfcProcedure(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),v[7]);},2904328755:function _(id,v){return new IFC4X3.IfcProjectOrder(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcText(v[8].value));},3651124850:function _(id,v){return new IFC4X3.IfcProjectionElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1842657554:function _(id,v){return new IFC4X3.IfcProtectiveDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2250791053:function _(id,v){return new IFC4X3.IfcPumpType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1763565496:function _(id,v){return new IFC4X3.IfcRailType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2893384427:function _(id,v){return new IFC4X3.IfcRailingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3992365140:function _(id,v){return new IFC4X3.IfcRailway(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9]);},1891881377:function _(id,v){return new IFC4X3.IfcRailwayPart(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9],v[10]);},2324767716:function _(id,v){return new IFC4X3.IfcRampFlightType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1469900589:function _(id,v){return new IFC4X3.IfcRampType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},683857671:function _(id,v){return new IFC4X3.IfcRationalBSplineSurfaceWithKnots(id,new IFC4X3.IfcInteger(v[0].value),new IFC4X3.IfcInteger(v[1].value),v[2].map(function(p){return new Handle(p.value);}),v[3],new IFC4X3.IfcLogical(v[4].value),new IFC4X3.IfcLogical(v[5].value),new IFC4X3.IfcLogical(v[6].value),v[7].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[8].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[9].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[10].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[11],v[12].map(function(p){return new IFC4X3.IfcReal(p.value);}));},4021432810:function _(id,v){return new IFC4X3.IfcReferent(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},3027567501:function _(id,v){return new IFC4X3.IfcReinforcingElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},964333572:function _(id,v){return new IFC4X3.IfcReinforcingElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},2320036040:function _(id,v){return new IFC4X3.IfcReinforcingMesh(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:new IFC4X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC4X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcPositiveLengthMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcPositiveLengthMeasure(v[12].value),!v[13]?null:new IFC4X3.IfcAreaMeasure(v[13].value),!v[14]?null:new IFC4X3.IfcAreaMeasure(v[14].value),!v[15]?null:new IFC4X3.IfcPositiveLengthMeasure(v[15].value),!v[16]?null:new IFC4X3.IfcPositiveLengthMeasure(v[16].value),v[17]);},2310774935:function _(id,v){return new IFC4X3.IfcReinforcingMeshType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcPositiveLengthMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcPositiveLengthMeasure(v[12].value),!v[13]?null:new IFC4X3.IfcPositiveLengthMeasure(v[13].value),!v[14]?null:new IFC4X3.IfcAreaMeasure(v[14].value),!v[15]?null:new IFC4X3.IfcAreaMeasure(v[15].value),!v[16]?null:new IFC4X3.IfcPositiveLengthMeasure(v[16].value),!v[17]?null:new IFC4X3.IfcPositiveLengthMeasure(v[17].value),!v[18]?null:new IFC4X3.IfcLabel(v[18].value),!v[19]?null:v[19].map(function(p){return TypeInitialiser(3,p);}));},3818125796:function _(id,v){return new IFC4X3.IfcRelAdheresToElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},160246688:function _(id,v){return new IFC4X3.IfcRelAggregates(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),new Handle(v[4].value),v[5].map(function(p){return new Handle(p.value);}));},146592293:function _(id,v){return new IFC4X3.IfcRoad(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9]);},550521510:function _(id,v){return new IFC4X3.IfcRoadPart(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9],v[10]);},2781568857:function _(id,v){return new IFC4X3.IfcRoofType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1768891740:function _(id,v){return new IFC4X3.IfcSanitaryTerminalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2157484638:function _(id,v){return new IFC4X3.IfcSeamCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2]);},3649235739:function _(id,v){return new IFC4X3.IfcSecondOrderPolynomialSpiral(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value));},544395925:function _(id,v){return new IFC4X3.IfcSegmentedReferenceCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLogical(v[1].value),new Handle(v[2].value),!v[3]?null:new Handle(v[3].value));},1027922057:function _(id,v){return new IFC4X3.IfcSeventhOrderPolynomialSpiral(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value),!v[4]?null:new IFC4X3.IfcLengthMeasure(v[4].value),!v[5]?null:new IFC4X3.IfcLengthMeasure(v[5].value),!v[6]?null:new IFC4X3.IfcLengthMeasure(v[6].value),!v[7]?null:new IFC4X3.IfcLengthMeasure(v[7].value),!v[8]?null:new IFC4X3.IfcLengthMeasure(v[8].value));},4074543187:function _(id,v){return new IFC4X3.IfcShadingDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},33720170:function _(id,v){return new IFC4X3.IfcSign(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3599934289:function _(id,v){return new IFC4X3.IfcSignType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1894708472:function _(id,v){return new IFC4X3.IfcSignalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},42703149:function _(id,v){return new IFC4X3.IfcSineSpiral(id,!v[0]?null:new Handle(v[0].value),new IFC4X3.IfcLengthMeasure(v[1].value),!v[2]?null:new IFC4X3.IfcLengthMeasure(v[2].value),!v[3]?null:new IFC4X3.IfcLengthMeasure(v[3].value));},4097777520:function _(id,v){return new IFC4X3.IfcSite(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcCompoundPlaneAngleMeasure(v[9]),!v[10]?null:new IFC4X3.IfcCompoundPlaneAngleMeasure(v[10]),!v[11]?null:new IFC4X3.IfcLengthMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcLabel(v[12].value),!v[13]?null:new Handle(v[13].value));},2533589738:function _(id,v){return new IFC4X3.IfcSlabType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1072016465:function _(id,v){return new IFC4X3.IfcSolarDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3856911033:function _(id,v){return new IFC4X3.IfcSpace(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9],!v[10]?null:new IFC4X3.IfcLengthMeasure(v[10].value));},1305183839:function _(id,v){return new IFC4X3.IfcSpaceHeaterType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3812236995:function _(id,v){return new IFC4X3.IfcSpaceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcLabel(v[10].value));},3112655638:function _(id,v){return new IFC4X3.IfcStackTerminalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1039846685:function _(id,v){return new IFC4X3.IfcStairFlightType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},338393293:function _(id,v){return new IFC4X3.IfcStairType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},682877961:function _(id,v){return new IFC4X3.IfcStructuralAction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcBoolean(v[9].value));},1179482911:function _(id,v){return new IFC4X3.IfcStructuralConnection(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},1004757350:function _(id,v){return new IFC4X3.IfcStructuralCurveAction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcBoolean(v[9].value),v[10],v[11]);},4243806635:function _(id,v){return new IFC4X3.IfcStructuralCurveConnection(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),new Handle(v[8].value));},214636428:function _(id,v){return new IFC4X3.IfcStructuralCurveMember(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],new Handle(v[8].value));},2445595289:function _(id,v){return new IFC4X3.IfcStructuralCurveMemberVarying(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],new Handle(v[8].value));},2757150158:function _(id,v){return new IFC4X3.IfcStructuralCurveReaction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],v[9]);},1807405624:function _(id,v){return new IFC4X3.IfcStructuralLinearAction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcBoolean(v[9].value),v[10],v[11]);},1252848954:function _(id,v){return new IFC4X3.IfcStructuralLoadGroup(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],v[6],v[7],!v[8]?null:new IFC4X3.IfcRatioMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcLabel(v[9].value));},2082059205:function _(id,v){return new IFC4X3.IfcStructuralPointAction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcBoolean(v[9].value));},734778138:function _(id,v){return new IFC4X3.IfcStructuralPointConnection(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value));},1235345126:function _(id,v){return new IFC4X3.IfcStructuralPointReaction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8]);},2986769608:function _(id,v){return new IFC4X3.IfcStructuralResultGroup(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),new IFC4X3.IfcBoolean(v[7].value));},3657597509:function _(id,v){return new IFC4X3.IfcStructuralSurfaceAction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcBoolean(v[9].value),v[10],v[11]);},1975003073:function _(id,v){return new IFC4X3.IfcStructuralSurfaceConnection(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value));},148013059:function _(id,v){return new IFC4X3.IfcSubContractResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},3101698114:function _(id,v){return new IFC4X3.IfcSurfaceFeature(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2315554128:function _(id,v){return new IFC4X3.IfcSwitchingDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2254336722:function _(id,v){return new IFC4X3.IfcSystem(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value));},413509423:function _(id,v){return new IFC4X3.IfcSystemFurnitureElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},5716631:function _(id,v){return new IFC4X3.IfcTankType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3824725483:function _(id,v){return new IFC4X3.IfcTendon(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcAreaMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcForceMeasure(v[12].value),!v[13]?null:new IFC4X3.IfcPressureMeasure(v[13].value),!v[14]?null:new IFC4X3.IfcNormalisedRatioMeasure(v[14].value),!v[15]?null:new IFC4X3.IfcPositiveLengthMeasure(v[15].value),!v[16]?null:new IFC4X3.IfcPositiveLengthMeasure(v[16].value));},2347447852:function _(id,v){return new IFC4X3.IfcTendonAnchor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3081323446:function _(id,v){return new IFC4X3.IfcTendonAnchorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3663046924:function _(id,v){return new IFC4X3.IfcTendonConduit(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2281632017:function _(id,v){return new IFC4X3.IfcTendonConduitType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2415094496:function _(id,v){return new IFC4X3.IfcTendonType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcAreaMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcPositiveLengthMeasure(v[12].value));},618700268:function _(id,v){return new IFC4X3.IfcTrackElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1692211062:function _(id,v){return new IFC4X3.IfcTransformerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2097647324:function _(id,v){return new IFC4X3.IfcTransportElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1953115116:function _(id,v){return new IFC4X3.IfcTransportationDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3593883385:function _(id,v){return new IFC4X3.IfcTrimmedCurve(id,new Handle(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcBoolean(v[3].value),v[4]);},1600972822:function _(id,v){return new IFC4X3.IfcTubeBundleType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1911125066:function _(id,v){return new IFC4X3.IfcUnitaryEquipmentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},728799441:function _(id,v){return new IFC4X3.IfcValveType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},840318589:function _(id,v){return new IFC4X3.IfcVehicle(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1530820697:function _(id,v){return new IFC4X3.IfcVibrationDamper(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3956297820:function _(id,v){return new IFC4X3.IfcVibrationDamperType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2391383451:function _(id,v){return new IFC4X3.IfcVibrationIsolator(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3313531582:function _(id,v){return new IFC4X3.IfcVibrationIsolatorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2769231204:function _(id,v){return new IFC4X3.IfcVirtualElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},926996030:function _(id,v){return new IFC4X3.IfcVoidingFeature(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1898987631:function _(id,v){return new IFC4X3.IfcWallType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1133259667:function _(id,v){return new IFC4X3.IfcWasteTerminalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4009809668:function _(id,v){return new IFC4X3.IfcWindowType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],v[10],!v[11]?null:new IFC4X3.IfcBoolean(v[11].value),!v[12]?null:new IFC4X3.IfcLabel(v[12].value));},4088093105:function _(id,v){return new IFC4X3.IfcWorkCalendar(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),v[8]);},1028945134:function _(id,v){return new IFC4X3.IfcWorkControl(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),new IFC4X3.IfcDateTime(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:new IFC4X3.IfcDuration(v[9].value),!v[10]?null:new IFC4X3.IfcDuration(v[10].value),new IFC4X3.IfcDateTime(v[11].value),!v[12]?null:new IFC4X3.IfcDateTime(v[12].value));},4218914973:function _(id,v){return new IFC4X3.IfcWorkPlan(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),new IFC4X3.IfcDateTime(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:new IFC4X3.IfcDuration(v[9].value),!v[10]?null:new IFC4X3.IfcDuration(v[10].value),new IFC4X3.IfcDateTime(v[11].value),!v[12]?null:new IFC4X3.IfcDateTime(v[12].value),v[13]);},3342526732:function _(id,v){return new IFC4X3.IfcWorkSchedule(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),new IFC4X3.IfcDateTime(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:new IFC4X3.IfcDuration(v[9].value),!v[10]?null:new IFC4X3.IfcDuration(v[10].value),new IFC4X3.IfcDateTime(v[11].value),!v[12]?null:new IFC4X3.IfcDateTime(v[12].value),v[13]);},1033361043:function _(id,v){return new IFC4X3.IfcZone(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value));},3821786052:function _(id,v){return new IFC4X3.IfcActionRequest(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),v[6],!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcText(v[8].value));},1411407467:function _(id,v){return new IFC4X3.IfcAirTerminalBoxType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3352864051:function _(id,v){return new IFC4X3.IfcAirTerminalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1871374353:function _(id,v){return new IFC4X3.IfcAirToAirHeatRecoveryType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4266260250:function _(id,v){return new IFC4X3.IfcAlignmentCant(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new IFC4X3.IfcPositiveLengthMeasure(v[7].value));},1545765605:function _(id,v){return new IFC4X3.IfcAlignmentHorizontal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},317615605:function _(id,v){return new IFC4X3.IfcAlignmentSegment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value));},1662888072:function _(id,v){return new IFC4X3.IfcAlignmentVertical(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},3460190687:function _(id,v){return new IFC4X3.IfcAsset(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:new Handle(v[8].value),!v[9]?null:new Handle(v[9].value),!v[10]?null:new Handle(v[10].value),!v[11]?null:new Handle(v[11].value),!v[12]?null:new IFC4X3.IfcDate(v[12].value),!v[13]?null:new Handle(v[13].value));},1532957894:function _(id,v){return new IFC4X3.IfcAudioVisualApplianceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1967976161:function _(id,v){return new IFC4X3.IfcBSplineCurve(id,new IFC4X3.IfcInteger(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2],new IFC4X3.IfcLogical(v[3].value),new IFC4X3.IfcLogical(v[4].value));},2461110595:function _(id,v){return new IFC4X3.IfcBSplineCurveWithKnots(id,new IFC4X3.IfcInteger(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2],new IFC4X3.IfcLogical(v[3].value),new IFC4X3.IfcLogical(v[4].value),v[5].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[6].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[7]);},819618141:function _(id,v){return new IFC4X3.IfcBeamType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3649138523:function _(id,v){return new IFC4X3.IfcBearingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},231477066:function _(id,v){return new IFC4X3.IfcBoilerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1136057603:function _(id,v){return new IFC4X3.IfcBoundaryCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLogical(v[1].value));},644574406:function _(id,v){return new IFC4X3.IfcBridge(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9]);},963979645:function _(id,v){return new IFC4X3.IfcBridgePart(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],v[9],v[10]);},4031249490:function _(id,v){return new IFC4X3.IfcBuilding(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcLengthMeasure(v[9].value),!v[10]?null:new IFC4X3.IfcLengthMeasure(v[10].value),!v[11]?null:new Handle(v[11].value));},2979338954:function _(id,v){return new IFC4X3.IfcBuildingElementPart(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},39481116:function _(id,v){return new IFC4X3.IfcBuildingElementPartType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1909888760:function _(id,v){return new IFC4X3.IfcBuildingElementProxyType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1177604601:function _(id,v){return new IFC4X3.IfcBuildingSystem(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],!v[6]?null:new IFC4X3.IfcLabel(v[6].value));},1876633798:function _(id,v){return new IFC4X3.IfcBuiltElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3862327254:function _(id,v){return new IFC4X3.IfcBuiltSystem(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],!v[6]?null:new IFC4X3.IfcLabel(v[6].value));},2188180465:function _(id,v){return new IFC4X3.IfcBurnerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},395041908:function _(id,v){return new IFC4X3.IfcCableCarrierFittingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3293546465:function _(id,v){return new IFC4X3.IfcCableCarrierSegmentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2674252688:function _(id,v){return new IFC4X3.IfcCableFittingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1285652485:function _(id,v){return new IFC4X3.IfcCableSegmentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3203706013:function _(id,v){return new IFC4X3.IfcCaissonFoundationType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2951183804:function _(id,v){return new IFC4X3.IfcChillerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3296154744:function _(id,v){return new IFC4X3.IfcChimney(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2611217952:function _(id,v){return new IFC4X3.IfcCircle(id,new Handle(v[0].value),new IFC4X3.IfcPositiveLengthMeasure(v[1].value));},1677625105:function _(id,v){return new IFC4X3.IfcCivilElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},2301859152:function _(id,v){return new IFC4X3.IfcCoilType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},843113511:function _(id,v){return new IFC4X3.IfcColumn(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},400855858:function _(id,v){return new IFC4X3.IfcCommunicationsApplianceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3850581409:function _(id,v){return new IFC4X3.IfcCompressorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2816379211:function _(id,v){return new IFC4X3.IfcCondenserType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3898045240:function _(id,v){return new IFC4X3.IfcConstructionEquipmentResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},1060000209:function _(id,v){return new IFC4X3.IfcConstructionMaterialResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},488727124:function _(id,v){return new IFC4X3.IfcConstructionProductResource(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcIdentifier(v[5].value),!v[6]?null:new IFC4X3.IfcText(v[6].value),!v[7]?null:new Handle(v[7].value),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value),v[10]);},2940368186:function _(id,v){return new IFC4X3.IfcConveyorSegmentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},335055490:function _(id,v){return new IFC4X3.IfcCooledBeamType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2954562838:function _(id,v){return new IFC4X3.IfcCoolingTowerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1502416096:function _(id,v){return new IFC4X3.IfcCourse(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1973544240:function _(id,v){return new IFC4X3.IfcCovering(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3495092785:function _(id,v){return new IFC4X3.IfcCurtainWall(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3961806047:function _(id,v){return new IFC4X3.IfcDamperType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3426335179:function _(id,v){return new IFC4X3.IfcDeepFoundation(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},1335981549:function _(id,v){return new IFC4X3.IfcDiscreteAccessory(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2635815018:function _(id,v){return new IFC4X3.IfcDiscreteAccessoryType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},479945903:function _(id,v){return new IFC4X3.IfcDistributionBoardType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1599208980:function _(id,v){return new IFC4X3.IfcDistributionChamberElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2063403501:function _(id,v){return new IFC4X3.IfcDistributionControlElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value));},1945004755:function _(id,v){return new IFC4X3.IfcDistributionElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3040386961:function _(id,v){return new IFC4X3.IfcDistributionFlowElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3041715199:function _(id,v){return new IFC4X3.IfcDistributionPort(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7],v[8],v[9]);},3205830791:function _(id,v){return new IFC4X3.IfcDistributionSystem(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),v[6]);},395920057:function _(id,v){return new IFC4X3.IfcDoor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcPositiveLengthMeasure(v[9].value),v[10],v[11],!v[12]?null:new IFC4X3.IfcLabel(v[12].value));},869906466:function _(id,v){return new IFC4X3.IfcDuctFittingType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3760055223:function _(id,v){return new IFC4X3.IfcDuctSegmentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2030761528:function _(id,v){return new IFC4X3.IfcDuctSilencerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3071239417:function _(id,v){return new IFC4X3.IfcEarthworksCut(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1077100507:function _(id,v){return new IFC4X3.IfcEarthworksElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3376911765:function _(id,v){return new IFC4X3.IfcEarthworksFill(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},663422040:function _(id,v){return new IFC4X3.IfcElectricApplianceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2417008758:function _(id,v){return new IFC4X3.IfcElectricDistributionBoardType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3277789161:function _(id,v){return new IFC4X3.IfcElectricFlowStorageDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2142170206:function _(id,v){return new IFC4X3.IfcElectricFlowTreatmentDeviceType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1534661035:function _(id,v){return new IFC4X3.IfcElectricGeneratorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1217240411:function _(id,v){return new IFC4X3.IfcElectricMotorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},712377611:function _(id,v){return new IFC4X3.IfcElectricTimeControlType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1658829314:function _(id,v){return new IFC4X3.IfcEnergyConversionDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},2814081492:function _(id,v){return new IFC4X3.IfcEngine(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3747195512:function _(id,v){return new IFC4X3.IfcEvaporativeCooler(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},484807127:function _(id,v){return new IFC4X3.IfcEvaporator(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1209101575:function _(id,v){return new IFC4X3.IfcExternalSpatialElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),v[8]);},346874300:function _(id,v){return new IFC4X3.IfcFanType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1810631287:function _(id,v){return new IFC4X3.IfcFilterType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4222183408:function _(id,v){return new IFC4X3.IfcFireSuppressionTerminalType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2058353004:function _(id,v){return new IFC4X3.IfcFlowController(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},4278956645:function _(id,v){return new IFC4X3.IfcFlowFitting(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},4037862832:function _(id,v){return new IFC4X3.IfcFlowInstrumentType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},2188021234:function _(id,v){return new IFC4X3.IfcFlowMeter(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3132237377:function _(id,v){return new IFC4X3.IfcFlowMovingDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},987401354:function _(id,v){return new IFC4X3.IfcFlowSegment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},707683696:function _(id,v){return new IFC4X3.IfcFlowStorageDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},2223149337:function _(id,v){return new IFC4X3.IfcFlowTerminal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3508470533:function _(id,v){return new IFC4X3.IfcFlowTreatmentDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},900683007:function _(id,v){return new IFC4X3.IfcFooting(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2713699986:function _(id,v){return new IFC4X3.IfcGeotechnicalAssembly(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},3009204131:function _(id,v){return new IFC4X3.IfcGrid(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7].map(function(p){return new Handle(p.value);}),v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:v[9].map(function(p){return new Handle(p.value);}),v[10]);},3319311131:function _(id,v){return new IFC4X3.IfcHeatExchanger(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2068733104:function _(id,v){return new IFC4X3.IfcHumidifier(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4175244083:function _(id,v){return new IFC4X3.IfcInterceptor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2176052936:function _(id,v){return new IFC4X3.IfcJunctionBox(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2696325953:function _(id,v){return new IFC4X3.IfcKerb(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),new IFC4X3.IfcBoolean(v[8].value));},76236018:function _(id,v){return new IFC4X3.IfcLamp(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},629592764:function _(id,v){return new IFC4X3.IfcLightFixture(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1154579445:function _(id,v){return new IFC4X3.IfcLinearPositioningElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value));},1638804497:function _(id,v){return new IFC4X3.IfcLiquidTerminal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1437502449:function _(id,v){return new IFC4X3.IfcMedicalDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1073191201:function _(id,v){return new IFC4X3.IfcMember(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2078563270:function _(id,v){return new IFC4X3.IfcMobileTelecommunicationsAppliance(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},234836483:function _(id,v){return new IFC4X3.IfcMooringDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2474470126:function _(id,v){return new IFC4X3.IfcMotorConnection(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2182337498:function _(id,v){return new IFC4X3.IfcNavigationElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},144952367:function _(id,v){return new IFC4X3.IfcOuterBoundaryCurve(id,v[0].map(function(p){return new Handle(p.value);}),new IFC4X3.IfcLogical(v[1].value));},3694346114:function _(id,v){return new IFC4X3.IfcOutlet(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1383356374:function _(id,v){return new IFC4X3.IfcPavement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1687234759:function _(id,v){return new IFC4X3.IfcPile(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8],v[9]);},310824031:function _(id,v){return new IFC4X3.IfcPipeFitting(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3612865200:function _(id,v){return new IFC4X3.IfcPipeSegment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3171933400:function _(id,v){return new IFC4X3.IfcPlate(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},738039164:function _(id,v){return new IFC4X3.IfcProtectiveDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},655969474:function _(id,v){return new IFC4X3.IfcProtectiveDeviceTrippingUnitType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},90941305:function _(id,v){return new IFC4X3.IfcPump(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3290496277:function _(id,v){return new IFC4X3.IfcRail(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2262370178:function _(id,v){return new IFC4X3.IfcRailing(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3024970846:function _(id,v){return new IFC4X3.IfcRamp(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3283111854:function _(id,v){return new IFC4X3.IfcRampFlight(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1232101972:function _(id,v){return new IFC4X3.IfcRationalBSplineCurveWithKnots(id,new IFC4X3.IfcInteger(v[0].value),v[1].map(function(p){return new Handle(p.value);}),v[2],new IFC4X3.IfcLogical(v[3].value),new IFC4X3.IfcLogical(v[4].value),v[5].map(function(p){return new IFC4X3.IfcInteger(p.value);}),v[6].map(function(p){return new IFC4X3.IfcParameterValue(p.value);}),v[7],v[8].map(function(p){return new IFC4X3.IfcReal(p.value);}));},3798194928:function _(id,v){return new IFC4X3.IfcReinforcedSoil(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},979691226:function _(id,v){return new IFC4X3.IfcReinforcingBar(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),!v[9]?null:new IFC4X3.IfcPositiveLengthMeasure(v[9].value),!v[10]?null:new IFC4X3.IfcAreaMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcPositiveLengthMeasure(v[11].value),v[12],v[13]);},2572171363:function _(id,v){return new IFC4X3.IfcReinforcingBarType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9],!v[10]?null:new IFC4X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcAreaMeasure(v[11].value),!v[12]?null:new IFC4X3.IfcPositiveLengthMeasure(v[12].value),v[13],!v[14]?null:new IFC4X3.IfcLabel(v[14].value),!v[15]?null:v[15].map(function(p){return TypeInitialiser(3,p);}));},2016517767:function _(id,v){return new IFC4X3.IfcRoof(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3053780830:function _(id,v){return new IFC4X3.IfcSanitaryTerminal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1783015770:function _(id,v){return new IFC4X3.IfcSensorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1329646415:function _(id,v){return new IFC4X3.IfcShadingDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},991950508:function _(id,v){return new IFC4X3.IfcSignal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1529196076:function _(id,v){return new IFC4X3.IfcSlab(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3420628829:function _(id,v){return new IFC4X3.IfcSolarDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1999602285:function _(id,v){return new IFC4X3.IfcSpaceHeater(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1404847402:function _(id,v){return new IFC4X3.IfcStackTerminal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},331165859:function _(id,v){return new IFC4X3.IfcStair(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4252922144:function _(id,v){return new IFC4X3.IfcStairFlight(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcInteger(v[8].value),!v[9]?null:new IFC4X3.IfcInteger(v[9].value),!v[10]?null:new IFC4X3.IfcPositiveLengthMeasure(v[10].value),!v[11]?null:new IFC4X3.IfcPositiveLengthMeasure(v[11].value),v[12]);},2515109513:function _(id,v){return new IFC4X3.IfcStructuralAnalysisModel(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],!v[6]?null:new Handle(v[6].value),!v[7]?null:v[7].map(function(p){return new Handle(p.value);}),!v[8]?null:v[8].map(function(p){return new Handle(p.value);}),!v[9]?null:new Handle(v[9].value));},385403989:function _(id,v){return new IFC4X3.IfcStructuralLoadCase(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),v[5],v[6],v[7],!v[8]?null:new IFC4X3.IfcRatioMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcLabel(v[9].value),!v[10]?null:v[10].map(function(p){return new IFC4X3.IfcRatioMeasure(p.value);}));},1621171031:function _(id,v){return new IFC4X3.IfcStructuralPlanarAction(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),new Handle(v[7].value),v[8],!v[9]?null:new IFC4X3.IfcBoolean(v[9].value),v[10],v[11]);},1162798199:function _(id,v){return new IFC4X3.IfcSwitchingDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},812556717:function _(id,v){return new IFC4X3.IfcTank(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3425753595:function _(id,v){return new IFC4X3.IfcTrackElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3825984169:function _(id,v){return new IFC4X3.IfcTransformer(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1620046519:function _(id,v){return new IFC4X3.IfcTransportElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3026737570:function _(id,v){return new IFC4X3.IfcTubeBundle(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3179687236:function _(id,v){return new IFC4X3.IfcUnitaryControlElementType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},4292641817:function _(id,v){return new IFC4X3.IfcUnitaryEquipment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4207607924:function _(id,v){return new IFC4X3.IfcValve(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2391406946:function _(id,v){return new IFC4X3.IfcWall(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3512223829:function _(id,v){return new IFC4X3.IfcWallStandardCase(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4237592921:function _(id,v){return new IFC4X3.IfcWasteTerminal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3304561284:function _(id,v){return new IFC4X3.IfcWindow(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),!v[8]?null:new IFC4X3.IfcPositiveLengthMeasure(v[8].value),!v[9]?null:new IFC4X3.IfcPositiveLengthMeasure(v[9].value),v[10],v[11],!v[12]?null:new IFC4X3.IfcLabel(v[12].value));},2874132201:function _(id,v){return new IFC4X3.IfcActuatorType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},1634111441:function _(id,v){return new IFC4X3.IfcAirTerminal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},177149247:function _(id,v){return new IFC4X3.IfcAirTerminalBox(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2056796094:function _(id,v){return new IFC4X3.IfcAirToAirHeatRecovery(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3001207471:function _(id,v){return new IFC4X3.IfcAlarmType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},325726236:function _(id,v){return new IFC4X3.IfcAlignment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),v[7]);},277319702:function _(id,v){return new IFC4X3.IfcAudioVisualAppliance(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},753842376:function _(id,v){return new IFC4X3.IfcBeam(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4196446775:function _(id,v){return new IFC4X3.IfcBearing(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},32344328:function _(id,v){return new IFC4X3.IfcBoiler(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3314249567:function _(id,v){return new IFC4X3.IfcBorehole(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},1095909175:function _(id,v){return new IFC4X3.IfcBuildingElementProxy(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2938176219:function _(id,v){return new IFC4X3.IfcBurner(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},635142910:function _(id,v){return new IFC4X3.IfcCableCarrierFitting(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3758799889:function _(id,v){return new IFC4X3.IfcCableCarrierSegment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1051757585:function _(id,v){return new IFC4X3.IfcCableFitting(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4217484030:function _(id,v){return new IFC4X3.IfcCableSegment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3999819293:function _(id,v){return new IFC4X3.IfcCaissonFoundation(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3902619387:function _(id,v){return new IFC4X3.IfcChiller(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},639361253:function _(id,v){return new IFC4X3.IfcCoil(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3221913625:function _(id,v){return new IFC4X3.IfcCommunicationsAppliance(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3571504051:function _(id,v){return new IFC4X3.IfcCompressor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2272882330:function _(id,v){return new IFC4X3.IfcCondenser(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},578613899:function _(id,v){return new IFC4X3.IfcControllerType(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcIdentifier(v[4].value),!v[5]?null:v[5].map(function(p){return new Handle(p.value);}),!v[6]?null:v[6].map(function(p){return new Handle(p.value);}),!v[7]?null:new IFC4X3.IfcLabel(v[7].value),!v[8]?null:new IFC4X3.IfcLabel(v[8].value),v[9]);},3460952963:function _(id,v){return new IFC4X3.IfcConveyorSegment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4136498852:function _(id,v){return new IFC4X3.IfcCooledBeam(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3640358203:function _(id,v){return new IFC4X3.IfcCoolingTower(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4074379575:function _(id,v){return new IFC4X3.IfcDamper(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3693000487:function _(id,v){return new IFC4X3.IfcDistributionBoard(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1052013943:function _(id,v){return new IFC4X3.IfcDistributionChamberElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},562808652:function _(id,v){return new IFC4X3.IfcDistributionCircuit(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new IFC4X3.IfcLabel(v[5].value),v[6]);},1062813311:function _(id,v){return new IFC4X3.IfcDistributionControlElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},342316401:function _(id,v){return new IFC4X3.IfcDuctFitting(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3518393246:function _(id,v){return new IFC4X3.IfcDuctSegment(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1360408905:function _(id,v){return new IFC4X3.IfcDuctSilencer(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1904799276:function _(id,v){return new IFC4X3.IfcElectricAppliance(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},862014818:function _(id,v){return new IFC4X3.IfcElectricDistributionBoard(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3310460725:function _(id,v){return new IFC4X3.IfcElectricFlowStorageDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},24726584:function _(id,v){return new IFC4X3.IfcElectricFlowTreatmentDevice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},264262732:function _(id,v){return new IFC4X3.IfcElectricGenerator(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},402227799:function _(id,v){return new IFC4X3.IfcElectricMotor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1003880860:function _(id,v){return new IFC4X3.IfcElectricTimeControl(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3415622556:function _(id,v){return new IFC4X3.IfcFan(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},819412036:function _(id,v){return new IFC4X3.IfcFilter(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},1426591983:function _(id,v){return new IFC4X3.IfcFireSuppressionTerminal(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},182646315:function _(id,v){return new IFC4X3.IfcFlowInstrument(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},2680139844:function _(id,v){return new IFC4X3.IfcGeomodel(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},1971632696:function _(id,v){return new IFC4X3.IfcGeoslice(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value));},2295281155:function _(id,v){return new IFC4X3.IfcProtectiveDeviceTrippingUnit(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4086658281:function _(id,v){return new IFC4X3.IfcSensor(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},630975310:function _(id,v){return new IFC4X3.IfcUnitaryControlElement(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},4288193352:function _(id,v){return new IFC4X3.IfcActuator(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},3087945054:function _(id,v){return new IFC4X3.IfcAlarm(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);},25142252:function _(id,v){return new IFC4X3.IfcController(id,new IFC4X3.IfcGloballyUniqueId(v[0].value),!v[1]?null:new Handle(v[1].value),!v[2]?null:new IFC4X3.IfcLabel(v[2].value),!v[3]?null:new IFC4X3.IfcText(v[3].value),!v[4]?null:new IFC4X3.IfcLabel(v[4].value),!v[5]?null:new Handle(v[5].value),!v[6]?null:new Handle(v[6].value),!v[7]?null:new IFC4X3.IfcIdentifier(v[7].value),v[8]);}};InheritanceDef[3]={618182010:[IFCTELECOMADDRESS,IFCPOSTALADDRESS],2879124712:[IFCALIGNMENTHORIZONTALSEGMENT,IFCALIGNMENTCANTSEGMENT,IFCALIGNMENTVERTICALSEGMENT],411424972:[IFCCOSTVALUE],4037036970:[IFCBOUNDARYNODECONDITIONWARPING,IFCBOUNDARYNODECONDITION,IFCBOUNDARYFACECONDITION,IFCBOUNDARYEDGECONDITION],1387855156:[IFCBOUNDARYNODECONDITIONWARPING],2859738748:[IFCCONNECTIONCURVEGEOMETRY,IFCCONNECTIONVOLUMEGEOMETRY,IFCCONNECTIONSURFACEGEOMETRY,IFCCONNECTIONPOINTECCENTRICITY,IFCCONNECTIONPOINTGEOMETRY],2614616156:[IFCCONNECTIONPOINTECCENTRICITY],1959218052:[IFCOBJECTIVE,IFCMETRIC],1785450214:[IFCMAPCONVERSION],1466758467:[IFCPROJECTEDCRS],4294318154:[IFCDOCUMENTINFORMATION,IFCCLASSIFICATION,IFCLIBRARYINFORMATION],3200245327:[IFCDOCUMENTREFERENCE,IFCCLASSIFICATIONREFERENCE,IFCLIBRARYREFERENCE,IFCEXTERNALLYDEFINEDTEXTFONT,IFCEXTERNALLYDEFINEDSURFACESTYLE,IFCEXTERNALLYDEFINEDHATCHSTYLE],760658860:[IFCMATERIALCONSTITUENTSET,IFCMATERIALCONSTITUENT,IFCMATERIAL,IFCMATERIALPROFILESET,IFCMATERIALPROFILEWITHOFFSETS,IFCMATERIALPROFILE,IFCMATERIALLAYERSET,IFCMATERIALLAYERWITHOFFSETS,IFCMATERIALLAYER],248100487:[IFCMATERIALLAYERWITHOFFSETS],2235152071:[IFCMATERIALPROFILEWITHOFFSETS],1507914824:[IFCMATERIALPROFILESETUSAGETAPERING,IFCMATERIALPROFILESETUSAGE,IFCMATERIALLAYERSETUSAGE],1918398963:[IFCCONVERSIONBASEDUNITWITHOFFSET,IFCCONVERSIONBASEDUNIT,IFCCONTEXTDEPENDENTUNIT,IFCSIUNIT],3701648758:[IFCLOCALPLACEMENT,IFCLINEARPLACEMENT,IFCGRIDPLACEMENT],2483315170:[IFCPHYSICALCOMPLEXQUANTITY,IFCQUANTITYWEIGHT,IFCQUANTITYVOLUME,IFCQUANTITYTIME,IFCQUANTITYNUMBER,IFCQUANTITYLENGTH,IFCQUANTITYCOUNT,IFCQUANTITYAREA,IFCPHYSICALSIMPLEQUANTITY],2226359599:[IFCQUANTITYWEIGHT,IFCQUANTITYVOLUME,IFCQUANTITYTIME,IFCQUANTITYNUMBER,IFCQUANTITYLENGTH,IFCQUANTITYCOUNT,IFCQUANTITYAREA],677532197:[IFCDRAUGHTINGPREDEFINEDCURVEFONT,IFCPREDEFINEDCURVEFONT,IFCDRAUGHTINGPREDEFINEDCOLOUR,IFCPREDEFINEDCOLOUR,IFCTEXTSTYLEFONTMODEL,IFCPREDEFINEDTEXTFONT,IFCPREDEFINEDITEM,IFCINDEXEDCOLOURMAP,IFCCURVESTYLEFONTPATTERN,IFCCURVESTYLEFONTANDSCALING,IFCCURVESTYLEFONT,IFCCOLOURRGB,IFCCOLOURSPECIFICATION,IFCCOLOURRGBLIST,IFCTEXTUREVERTEXLIST,IFCTEXTUREVERTEX,IFCINDEXEDPOLYGONALTEXTUREMAP,IFCINDEXEDTRIANGLETEXTUREMAP,IFCINDEXEDTEXTUREMAP,IFCTEXTUREMAP,IFCTEXTURECOORDINATEGENERATOR,IFCTEXTURECOORDINATE,IFCTEXTSTYLETEXTMODEL,IFCTEXTSTYLEFORDEFINEDFONT,IFCPIXELTEXTURE,IFCIMAGETEXTURE,IFCBLOBTEXTURE,IFCSURFACETEXTURE,IFCSURFACESTYLEWITHTEXTURES,IFCSURFACESTYLERENDERING,IFCSURFACESTYLESHADING,IFCSURFACESTYLEREFRACTION,IFCSURFACESTYLELIGHTING],2022622350:[IFCPRESENTATIONLAYERWITHSTYLE],3119450353:[IFCFILLAREASTYLE,IFCCURVESTYLE,IFCTEXTSTYLE,IFCSURFACESTYLE],2095639259:[IFCPRODUCTDEFINITIONSHAPE,IFCMATERIALDEFINITIONREPRESENTATION],3958567839:[IFCLSHAPEPROFILEDEF,IFCISHAPEPROFILEDEF,IFCELLIPSEPROFILEDEF,IFCCIRCLEHOLLOWPROFILEDEF,IFCCIRCLEPROFILEDEF,IFCCSHAPEPROFILEDEF,IFCASYMMETRICISHAPEPROFILEDEF,IFCZSHAPEPROFILEDEF,IFCUSHAPEPROFILEDEF,IFCTRAPEZIUMPROFILEDEF,IFCTSHAPEPROFILEDEF,IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF,IFCRECTANGLEPROFILEDEF,IFCPARAMETERIZEDPROFILEDEF,IFCOPENCROSSPROFILEDEF,IFCMIRROREDPROFILEDEF,IFCDERIVEDPROFILEDEF,IFCCOMPOSITEPROFILEDEF,IFCCENTERLINEPROFILEDEF,IFCARBITRARYOPENPROFILEDEF,IFCARBITRARYPROFILEDEFWITHVOIDS,IFCARBITRARYCLOSEDPROFILEDEF],986844984:[IFCCOMPLEXPROPERTY,IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE,IFCSIMPLEPROPERTY,IFCPROPERTY,IFCSECTIONREINFORCEMENTPROPERTIES,IFCSECTIONPROPERTIES,IFCREINFORCEMENTBARPROPERTIES,IFCPREDEFINEDPROPERTIES,IFCPROFILEPROPERTIES,IFCMATERIALPROPERTIES,IFCEXTENDEDPROPERTIES,IFCPROPERTYENUMERATION],1076942058:[IFCSTYLEDREPRESENTATION,IFCSTYLEMODEL,IFCTOPOLOGYREPRESENTATION,IFCSHAPEREPRESENTATION,IFCSHAPEMODEL],3377609919:[IFCGEOMETRICREPRESENTATIONSUBCONTEXT,IFCGEOMETRICREPRESENTATIONCONTEXT],3008791417:[IFCMAPPEDITEM,IFCFILLAREASTYLETILES,IFCFILLAREASTYLEHATCHING,IFCFACEBASEDSURFACEMODEL,IFCDIRECTION,IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCSEGMENTEDREFERENCECURVE,IFCGRADIENTCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCSEAMCURVE,IFCINTERSECTIONCURVE,IFCSURFACECURVE,IFCSINESPIRAL,IFCSEVENTHORDERPOLYNOMIALSPIRAL,IFCSECONDORDERPOLYNOMIALSPIRAL,IFCCOSINESPIRAL,IFCCLOTHOID,IFCTHIRDORDERPOLYNOMIALSPIRAL,IFCSPIRAL,IFCPOLYNOMIALCURVE,IFCPCURVE,IFCOFFSETCURVEBYDISTANCES,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCOFFSETCURVE,IFCLINE,IFCCURVE,IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID,IFCCSGPRIMITIVE3D,IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D,IFCCARTESIANTRANSFORMATIONOPERATOR,IFCCARTESIANPOINTLIST3D,IFCCARTESIANPOINTLIST2D,IFCCARTESIANPOINTLIST,IFCBOUNDINGBOX,IFCBOOLEANCLIPPINGRESULT,IFCBOOLEANRESULT,IFCANNOTATIONFILLAREA,IFCVECTOR,IFCTEXTLITERALWITHEXTENT,IFCTEXTLITERAL,IFCPOLYGONALFACESET,IFCTRIANGULATEDIRREGULARNETWORK,IFCTRIANGULATEDFACESET,IFCTESSELLATEDFACESET,IFCINDEXEDPOLYGONALFACEWITHVOIDS,IFCINDEXEDPOLYGONALFACE,IFCTESSELLATEDITEM,IFCSECTIONEDSURFACE,IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE,IFCELEMENTARYSURFACE,IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE,IFCSURFACE,IFCSECTIONEDSOLIDHORIZONTAL,IFCSECTIONEDSOLID,IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLIDPOLYGONAL,IFCSWEPTDISKSOLID,IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID,IFCSURFACECURVESWEPTAREASOLID,IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCDIRECTRIXCURVESWEPTAREASOLID,IFCSWEPTAREASOLID,IFCSOLIDMODEL,IFCSHELLBASEDSURFACEMODEL,IFCCURVESEGMENT,IFCREPARAMETRISEDCOMPOSITECURVESEGMENT,IFCCOMPOSITECURVESEGMENT,IFCSEGMENT,IFCSECTIONEDSPINE,IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE,IFCPOINTBYDISTANCEEXPRESSION,IFCPOINT,IFCPLANARBOX,IFCPLANAREXTENT,IFCAXIS2PLACEMENTLINEAR,IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT,IFCPLACEMENT,IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT,IFCLIGHTSOURCE,IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE,IFCHALFSPACESOLID,IFCGEOMETRICCURVESET,IFCGEOMETRICSET,IFCGEOMETRICREPRESENTATIONITEM,IFCPATH,IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP,IFCLOOP,IFCFACEOUTERBOUND,IFCFACEBOUND,IFCADVANCEDFACE,IFCFACESURFACE,IFCFACE,IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE,IFCEDGE,IFCCLOSEDSHELL,IFCOPENSHELL,IFCCONNECTEDFACESET,IFCVERTEXPOINT,IFCVERTEX,IFCTOPOLOGICALREPRESENTATIONITEM,IFCSTYLEDITEM],2439245199:[IFCRESOURCECONSTRAINTRELATIONSHIP,IFCRESOURCEAPPROVALRELATIONSHIP,IFCPROPERTYDEPENDENCYRELATIONSHIP,IFCORGANIZATIONRELATIONSHIP,IFCMATERIALRELATIONSHIP,IFCEXTERNALREFERENCERELATIONSHIP,IFCDOCUMENTINFORMATIONRELATIONSHIP,IFCCURRENCYRELATIONSHIP,IFCAPPROVALRELATIONSHIP],2341007311:[IFCRELDEFINESBYTYPE,IFCRELDEFINESBYTEMPLATE,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINESBYOBJECT,IFCRELDEFINES,IFCRELAGGREGATES,IFCRELADHERESTOELEMENT,IFCRELVOIDSELEMENT,IFCRELPROJECTSELEMENT,IFCRELNESTS,IFCRELDECOMPOSES,IFCRELDECLARES,IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELPOSITIONS,IFCRELINTERFERESELEMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS,IFCRELCONNECTS,IFCRELASSOCIATESPROFILEDEF,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL,IFCRELASSOCIATES,IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUPBYFACTOR,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTOCONTROL,IFCRELASSIGNSTOACTOR,IFCRELASSIGNS,IFCRELATIONSHIP,IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE,IFCPROPERTYTEMPLATE,IFCPROPERTYSETTEMPLATE,IFCPROPERTYTEMPLATEDEFINITION,IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPREDEFINEDPROPERTYSET,IFCELEMENTQUANTITY,IFCQUANTITYSET,IFCPROPERTYSETDEFINITION,IFCPROPERTYDEFINITION,IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILTSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCALIGNMENT,IFCLINEARPOSITIONINGELEMENT,IFCGRID,IFCREFERENT,IFCPOSITIONINGELEMENT,IFCDISTRIBUTIONPORT,IFCPORT,IFCALIGNMENTVERTICAL,IFCALIGNMENTSEGMENT,IFCALIGNMENTHORIZONTAL,IFCALIGNMENTCANT,IFCLINEARELEMENT,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBUILDINGELEMENTPROXY,IFCBEARING,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCTRACKELEMENT,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCRAIL,IFCPLATE,IFCPAVEMENT,IFCNAVIGATIONELEMENT,IFCMOORINGDEVICE,IFCMEMBER,IFCKERB,IFCFOOTING,IFCREINFORCEDSOIL,IFCEARTHWORKSFILL,IFCEARTHWORKSELEMENT,IFCDOOR,IFCCAISSONFOUNDATION,IFCPILE,IFCDEEPFOUNDATION,IFCCURTAINWALL,IFCCOVERING,IFCCOURSE,IFCCOLUMN,IFCCHIMNEY,IFCBUILTELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCVEHICLE,IFCTRANSPORTATIONDEVICE,IFCGEOSLICE,IFCGEOMODEL,IFCBOREHOLE,IFCGEOTECHNICALASSEMBLY,IFCGEOTECHNICALSTRATUM,IFCGEOTECHNICALELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCEARTHWORKSCUT,IFCVOIDINGFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCVIBRATIONDAMPER,IFCSIGN,IFCREINFORCINGBAR,IFCTENDONCONDUIT,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCIMPACTPROTECTIONDEVICE,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBRIDGEPART,IFCROADPART,IFCRAILWAYPART,IFCMARINEPART,IFCFACILITYPARTCOMMON,IFCFACILITYPART,IFCBUILDING,IFCBRIDGE,IFCROAD,IFCRAILWAY,IFCMARINEFACILITY,IFCFACILITY,IFCBUILDINGSTOREY,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT,IFCPRODUCT,IFCPROCEDURE,IFCEVENT,IFCTASK,IFCPROCESS,IFCOBJECT,IFCPROJECTLIBRARY,IFCPROJECT,IFCCONTEXT,IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE,IFCTYPERESOURCE,IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCVIBRATIONDAMPERTYPE,IFCSIGNTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONCONDUITTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCIMPACTPROTECTIONDEVICETYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEARINGTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCTRACKELEMENTTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCRAILTYPE,IFCPLATETYPE,IFCPAVEMENTTYPE,IFCNAVIGATIONELEMENTTYPE,IFCMOORINGDEVICETYPE,IFCMEMBERTYPE,IFCKERBTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCAISSONFOUNDATIONTYPE,IFCPILETYPE,IFCDEEPFOUNDATIONTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOURSETYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILTELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCVEHICLETYPE,IFCTRANSPORTATIONDEVICETYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCTYPEPRODUCT,IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE,IFCTYPEPROCESS,IFCTYPEOBJECT,IFCOBJECTDEFINITION],1054537805:[IFCRESOURCETIME,IFCLAGTIME,IFCEVENTTIME,IFCWORKTIME,IFCTASKTIMERECURRING,IFCTASKTIME],3982875396:[IFCTOPOLOGYREPRESENTATION,IFCSHAPEREPRESENTATION],2273995522:[IFCSLIPPAGECONNECTIONCONDITION,IFCFAILURECONNECTIONCONDITION],2162789131:[IFCSURFACEREINFORCEMENTAREA,IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE,IFCSTRUCTURALLOADSTATIC,IFCSTRUCTURALLOADORRESULT,IFCSTRUCTURALLOADCONFIGURATION],609421318:[IFCSURFACEREINFORCEMENTAREA,IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE,IFCSTRUCTURALLOADSTATIC],2525727697:[IFCSTRUCTURALLOADSINGLEFORCEWARPING,IFCSTRUCTURALLOADSINGLEFORCE,IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION,IFCSTRUCTURALLOADSINGLEDISPLACEMENT,IFCSTRUCTURALLOADPLANARFORCE,IFCSTRUCTURALLOADLINEARFORCE,IFCSTRUCTURALLOADTEMPERATURE],2830218821:[IFCSTYLEDREPRESENTATION],846575682:[IFCSURFACESTYLERENDERING],626085974:[IFCPIXELTEXTURE,IFCIMAGETEXTURE,IFCBLOBTEXTURE],1549132990:[IFCTASKTIMERECURRING],280115917:[IFCINDEXEDPOLYGONALTEXTUREMAP,IFCINDEXEDTRIANGLETEXTUREMAP,IFCINDEXEDTEXTUREMAP,IFCTEXTUREMAP,IFCTEXTURECOORDINATEGENERATOR],222769930:[IFCTEXTURECOORDINATEINDICESWITHVOIDS],3101149627:[IFCREGULARTIMESERIES,IFCIRREGULARTIMESERIES],1377556343:[IFCPATH,IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP,IFCLOOP,IFCFACEOUTERBOUND,IFCFACEBOUND,IFCADVANCEDFACE,IFCFACESURFACE,IFCFACE,IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE,IFCEDGE,IFCCLOSEDSHELL,IFCOPENSHELL,IFCCONNECTEDFACESET,IFCVERTEXPOINT,IFCVERTEX],2799835756:[IFCVERTEXPOINT],3798115385:[IFCARBITRARYPROFILEDEFWITHVOIDS],1310608509:[IFCCENTERLINEPROFILEDEF],3264961684:[IFCCOLOURRGB],370225590:[IFCCLOSEDSHELL,IFCOPENSHELL],2889183280:[IFCCONVERSIONBASEDUNITWITHOFFSET],3632507154:[IFCMIRROREDPROFILEDEF],3900360178:[IFCSUBEDGE,IFCORIENTEDEDGE,IFCEDGECURVE],297599258:[IFCPROFILEPROPERTIES,IFCMATERIALPROPERTIES],2556980723:[IFCADVANCEDFACE,IFCFACESURFACE],1809719519:[IFCFACEOUTERBOUND],3008276851:[IFCADVANCEDFACE],3448662350:[IFCGEOMETRICREPRESENTATIONSUBCONTEXT],2453401579:[IFCFILLAREASTYLETILES,IFCFILLAREASTYLEHATCHING,IFCFACEBASEDSURFACEMODEL,IFCDIRECTION,IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCSEGMENTEDREFERENCECURVE,IFCGRADIENTCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCSEAMCURVE,IFCINTERSECTIONCURVE,IFCSURFACECURVE,IFCSINESPIRAL,IFCSEVENTHORDERPOLYNOMIALSPIRAL,IFCSECONDORDERPOLYNOMIALSPIRAL,IFCCOSINESPIRAL,IFCCLOTHOID,IFCTHIRDORDERPOLYNOMIALSPIRAL,IFCSPIRAL,IFCPOLYNOMIALCURVE,IFCPCURVE,IFCOFFSETCURVEBYDISTANCES,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCOFFSETCURVE,IFCLINE,IFCCURVE,IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID,IFCCSGPRIMITIVE3D,IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D,IFCCARTESIANTRANSFORMATIONOPERATOR,IFCCARTESIANPOINTLIST3D,IFCCARTESIANPOINTLIST2D,IFCCARTESIANPOINTLIST,IFCBOUNDINGBOX,IFCBOOLEANCLIPPINGRESULT,IFCBOOLEANRESULT,IFCANNOTATIONFILLAREA,IFCVECTOR,IFCTEXTLITERALWITHEXTENT,IFCTEXTLITERAL,IFCPOLYGONALFACESET,IFCTRIANGULATEDIRREGULARNETWORK,IFCTRIANGULATEDFACESET,IFCTESSELLATEDFACESET,IFCINDEXEDPOLYGONALFACEWITHVOIDS,IFCINDEXEDPOLYGONALFACE,IFCTESSELLATEDITEM,IFCSECTIONEDSURFACE,IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE,IFCELEMENTARYSURFACE,IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE,IFCSURFACE,IFCSECTIONEDSOLIDHORIZONTAL,IFCSECTIONEDSOLID,IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLIDPOLYGONAL,IFCSWEPTDISKSOLID,IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID,IFCSURFACECURVESWEPTAREASOLID,IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCDIRECTRIXCURVESWEPTAREASOLID,IFCSWEPTAREASOLID,IFCSOLIDMODEL,IFCSHELLBASEDSURFACEMODEL,IFCCURVESEGMENT,IFCREPARAMETRISEDCOMPOSITECURVESEGMENT,IFCCOMPOSITECURVESEGMENT,IFCSEGMENT,IFCSECTIONEDSPINE,IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE,IFCPOINTBYDISTANCEEXPRESSION,IFCPOINT,IFCPLANARBOX,IFCPLANAREXTENT,IFCAXIS2PLACEMENTLINEAR,IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT,IFCPLACEMENT,IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT,IFCLIGHTSOURCE,IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE,IFCHALFSPACESOLID,IFCGEOMETRICCURVESET,IFCGEOMETRICSET],3590301190:[IFCGEOMETRICCURVESET],812098782:[IFCBOXEDHALFSPACE,IFCPOLYGONALBOUNDEDHALFSPACE],1437953363:[IFCINDEXEDPOLYGONALTEXTUREMAP,IFCINDEXEDTRIANGLETEXTUREMAP],1402838566:[IFCLIGHTSOURCESPOT,IFCLIGHTSOURCEPOSITIONAL,IFCLIGHTSOURCEGONIOMETRIC,IFCLIGHTSOURCEDIRECTIONAL,IFCLIGHTSOURCEAMBIENT],1520743889:[IFCLIGHTSOURCESPOT],1008929658:[IFCEDGELOOP,IFCVERTEXLOOP,IFCPOLYLOOP],3079605661:[IFCMATERIALPROFILESETUSAGETAPERING],219451334:[IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILTSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCALIGNMENT,IFCLINEARPOSITIONINGELEMENT,IFCGRID,IFCREFERENT,IFCPOSITIONINGELEMENT,IFCDISTRIBUTIONPORT,IFCPORT,IFCALIGNMENTVERTICAL,IFCALIGNMENTSEGMENT,IFCALIGNMENTHORIZONTAL,IFCALIGNMENTCANT,IFCLINEARELEMENT,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBUILDINGELEMENTPROXY,IFCBEARING,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCTRACKELEMENT,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCRAIL,IFCPLATE,IFCPAVEMENT,IFCNAVIGATIONELEMENT,IFCMOORINGDEVICE,IFCMEMBER,IFCKERB,IFCFOOTING,IFCREINFORCEDSOIL,IFCEARTHWORKSFILL,IFCEARTHWORKSELEMENT,IFCDOOR,IFCCAISSONFOUNDATION,IFCPILE,IFCDEEPFOUNDATION,IFCCURTAINWALL,IFCCOVERING,IFCCOURSE,IFCCOLUMN,IFCCHIMNEY,IFCBUILTELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCVEHICLE,IFCTRANSPORTATIONDEVICE,IFCGEOSLICE,IFCGEOMODEL,IFCBOREHOLE,IFCGEOTECHNICALASSEMBLY,IFCGEOTECHNICALSTRATUM,IFCGEOTECHNICALELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCEARTHWORKSCUT,IFCVOIDINGFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCVIBRATIONDAMPER,IFCSIGN,IFCREINFORCINGBAR,IFCTENDONCONDUIT,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCIMPACTPROTECTIONDEVICE,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBRIDGEPART,IFCROADPART,IFCRAILWAYPART,IFCMARINEPART,IFCFACILITYPARTCOMMON,IFCFACILITYPART,IFCBUILDING,IFCBRIDGE,IFCROAD,IFCRAILWAY,IFCMARINEFACILITY,IFCFACILITY,IFCBUILDINGSTOREY,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT,IFCPRODUCT,IFCPROCEDURE,IFCEVENT,IFCTASK,IFCPROCESS,IFCOBJECT,IFCPROJECTLIBRARY,IFCPROJECT,IFCCONTEXT,IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE,IFCTYPERESOURCE,IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCVIBRATIONDAMPERTYPE,IFCSIGNTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONCONDUITTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCIMPACTPROTECTIONDEVICETYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEARINGTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCTRACKELEMENTTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCRAILTYPE,IFCPLATETYPE,IFCPAVEMENTTYPE,IFCNAVIGATIONELEMENTTYPE,IFCMOORINGDEVICETYPE,IFCMEMBERTYPE,IFCKERBTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCAISSONFOUNDATIONTYPE,IFCPILETYPE,IFCDEEPFOUNDATIONTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOURSETYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILTELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCVEHICLETYPE,IFCTRANSPORTATIONDEVICETYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCTYPEPRODUCT,IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE,IFCTYPEPROCESS,IFCTYPEOBJECT],2529465313:[IFCLSHAPEPROFILEDEF,IFCISHAPEPROFILEDEF,IFCELLIPSEPROFILEDEF,IFCCIRCLEHOLLOWPROFILEDEF,IFCCIRCLEPROFILEDEF,IFCCSHAPEPROFILEDEF,IFCASYMMETRICISHAPEPROFILEDEF,IFCZSHAPEPROFILEDEF,IFCUSHAPEPROFILEDEF,IFCTRAPEZIUMPROFILEDEF,IFCTSHAPEPROFILEDEF,IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF,IFCRECTANGLEPROFILEDEF],2004835150:[IFCAXIS2PLACEMENTLINEAR,IFCAXIS2PLACEMENT3D,IFCAXIS2PLACEMENT2D,IFCAXIS1PLACEMENT],1663979128:[IFCPLANARBOX],2067069095:[IFCCARTESIANPOINT,IFCPOINTONSURFACE,IFCPOINTONCURVE,IFCPOINTBYDISTANCEEXPRESSION],3727388367:[IFCDRAUGHTINGPREDEFINEDCURVEFONT,IFCPREDEFINEDCURVEFONT,IFCDRAUGHTINGPREDEFINEDCOLOUR,IFCPREDEFINEDCOLOUR,IFCTEXTSTYLEFONTMODEL,IFCPREDEFINEDTEXTFONT],3778827333:[IFCSECTIONREINFORCEMENTPROPERTIES,IFCSECTIONPROPERTIES,IFCREINFORCEMENTBARPROPERTIES],1775413392:[IFCTEXTSTYLEFONTMODEL],2598011224:[IFCCOMPLEXPROPERTY,IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE,IFCSIMPLEPROPERTY],1680319473:[IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE,IFCPROPERTYTEMPLATE,IFCPROPERTYSETTEMPLATE,IFCPROPERTYTEMPLATEDEFINITION,IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPREDEFINEDPROPERTYSET,IFCELEMENTQUANTITY,IFCQUANTITYSET,IFCPROPERTYSETDEFINITION],3357820518:[IFCPROPERTYSET,IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES,IFCPREDEFINEDPROPERTYSET,IFCELEMENTQUANTITY,IFCQUANTITYSET],1482703590:[IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE,IFCPROPERTYTEMPLATE,IFCPROPERTYSETTEMPLATE],2090586900:[IFCELEMENTQUANTITY],3615266464:[IFCRECTANGLEHOLLOWPROFILEDEF,IFCROUNDEDRECTANGLEPROFILEDEF],478536968:[IFCRELDEFINESBYTYPE,IFCRELDEFINESBYTEMPLATE,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINESBYOBJECT,IFCRELDEFINES,IFCRELAGGREGATES,IFCRELADHERESTOELEMENT,IFCRELVOIDSELEMENT,IFCRELPROJECTSELEMENT,IFCRELNESTS,IFCRELDECOMPOSES,IFCRELDECLARES,IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELPOSITIONS,IFCRELINTERFERESELEMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS,IFCRELCONNECTS,IFCRELASSOCIATESPROFILEDEF,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL,IFCRELASSOCIATES,IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUPBYFACTOR,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTOCONTROL,IFCRELASSIGNSTOACTOR,IFCRELASSIGNS],823603102:[IFCCURVESEGMENT,IFCREPARAMETRISEDCOMPOSITECURVESEGMENT,IFCCOMPOSITECURVESEGMENT],3692461612:[IFCPROPERTYTABLEVALUE,IFCPROPERTYSINGLEVALUE,IFCPROPERTYREFERENCEVALUE,IFCPROPERTYLISTVALUE,IFCPROPERTYENUMERATEDVALUE,IFCPROPERTYBOUNDEDVALUE],723233188:[IFCSECTIONEDSOLIDHORIZONTAL,IFCSECTIONEDSOLID,IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP,IFCMANIFOLDSOLIDBREP,IFCCSGSOLID,IFCSWEPTDISKSOLIDPOLYGONAL,IFCSWEPTDISKSOLID,IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID,IFCSURFACECURVESWEPTAREASOLID,IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCDIRECTRIXCURVESWEPTAREASOLID,IFCSWEPTAREASOLID],2473145415:[IFCSTRUCTURALLOADSINGLEDISPLACEMENTDISTORTION],1597423693:[IFCSTRUCTURALLOADSINGLEFORCEWARPING],2513912981:[IFCSECTIONEDSURFACE,IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE,IFCELEMENTARYSURFACE,IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE,IFCBOUNDEDSURFACE,IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION,IFCSWEPTSURFACE],2247615214:[IFCREVOLVEDAREASOLIDTAPERED,IFCREVOLVEDAREASOLID,IFCEXTRUDEDAREASOLIDTAPERED,IFCEXTRUDEDAREASOLID,IFCSURFACECURVESWEPTAREASOLID,IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID,IFCDIRECTRIXCURVESWEPTAREASOLID],1260650574:[IFCSWEPTDISKSOLIDPOLYGONAL],230924584:[IFCSURFACEOFREVOLUTION,IFCSURFACEOFLINEAREXTRUSION],901063453:[IFCPOLYGONALFACESET,IFCTRIANGULATEDIRREGULARNETWORK,IFCTRIANGULATEDFACESET,IFCTESSELLATEDFACESET,IFCINDEXEDPOLYGONALFACEWITHVOIDS,IFCINDEXEDPOLYGONALFACE],4282788508:[IFCTEXTLITERALWITHEXTENT],1628702193:[IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE,IFCTYPERESOURCE,IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCVIBRATIONDAMPERTYPE,IFCSIGNTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONCONDUITTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCIMPACTPROTECTIONDEVICETYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEARINGTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCTRACKELEMENTTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCRAILTYPE,IFCPLATETYPE,IFCPAVEMENTTYPE,IFCNAVIGATIONELEMENTTYPE,IFCMOORINGDEVICETYPE,IFCMEMBERTYPE,IFCKERBTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCAISSONFOUNDATIONTYPE,IFCPILETYPE,IFCDEEPFOUNDATIONTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOURSETYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILTELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCVEHICLETYPE,IFCTRANSPORTATIONDEVICETYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE,IFCTYPEPRODUCT,IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE,IFCTYPEPROCESS],3736923433:[IFCTASKTYPE,IFCPROCEDURETYPE,IFCEVENTTYPE],2347495698:[IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE,IFCSPATIALELEMENTTYPE,IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCVIBRATIONDAMPERTYPE,IFCSIGNTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONCONDUITTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCIMPACTPROTECTIONDEVICETYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEARINGTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCTRACKELEMENTTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCRAILTYPE,IFCPLATETYPE,IFCPAVEMENTTYPE,IFCNAVIGATIONELEMENTTYPE,IFCMOORINGDEVICETYPE,IFCMEMBERTYPE,IFCKERBTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCAISSONFOUNDATIONTYPE,IFCPILETYPE,IFCDEEPFOUNDATIONTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOURSETYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILTELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCVEHICLETYPE,IFCTRANSPORTATIONDEVICETYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE,IFCELEMENTTYPE],3698973494:[IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE,IFCCONSTRUCTIONRESOURCETYPE],2736907675:[IFCBOOLEANCLIPPINGRESULT],4182860854:[IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACE,IFCRECTANGULARTRIMMEDSURFACE,IFCCURVEBOUNDEDSURFACE,IFCCURVEBOUNDEDPLANE],574549367:[IFCCARTESIANPOINTLIST3D,IFCCARTESIANPOINTLIST2D],59481748:[IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR3D,IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM,IFCCARTESIANTRANSFORMATIONOPERATOR2D],3749851601:[IFCCARTESIANTRANSFORMATIONOPERATOR2DNONUNIFORM],3331915920:[IFCCARTESIANTRANSFORMATIONOPERATOR3DNONUNIFORM],1383045692:[IFCCIRCLEHOLLOWPROFILEDEF],2485617015:[IFCREPARAMETRISEDCOMPOSITECURVESEGMENT],2574617495:[IFCCONSTRUCTIONPRODUCTRESOURCETYPE,IFCCONSTRUCTIONMATERIALRESOURCETYPE,IFCCONSTRUCTIONEQUIPMENTRESOURCETYPE,IFCSUBCONTRACTRESOURCETYPE,IFCLABORRESOURCETYPE,IFCCREWRESOURCETYPE],3419103109:[IFCPROJECTLIBRARY,IFCPROJECT],2506170314:[IFCBLOCK,IFCSPHERE,IFCRIGHTCIRCULARCYLINDER,IFCRIGHTCIRCULARCONE,IFCRECTANGULARPYRAMID],2601014836:[IFCCIRCLE,IFCELLIPSE,IFCCONIC,IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCSEGMENTEDREFERENCECURVE,IFCGRADIENTCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE,IFCBOUNDEDCURVE,IFCSEAMCURVE,IFCINTERSECTIONCURVE,IFCSURFACECURVE,IFCSINESPIRAL,IFCSEVENTHORDERPOLYNOMIALSPIRAL,IFCSECONDORDERPOLYNOMIALSPIRAL,IFCCOSINESPIRAL,IFCCLOTHOID,IFCTHIRDORDERPOLYNOMIALSPIRAL,IFCSPIRAL,IFCPOLYNOMIALCURVE,IFCPCURVE,IFCOFFSETCURVEBYDISTANCES,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D,IFCOFFSETCURVE,IFCLINE],593015953:[IFCSURFACECURVESWEPTAREASOLID,IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID,IFCFIXEDREFERENCESWEPTAREASOLID],339256511:[IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCVIBRATIONDAMPERTYPE,IFCSIGNTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONCONDUITTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCIMPACTPROTECTIONDEVICETYPE,IFCFASTENERTYPE,IFCELEMENTCOMPONENTTYPE,IFCELEMENTASSEMBLYTYPE,IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE,IFCDISTRIBUTIONELEMENTTYPE,IFCCIVILELEMENTTYPE,IFCBUILDINGELEMENTPROXYTYPE,IFCBEARINGTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCTRACKELEMENTTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCRAILTYPE,IFCPLATETYPE,IFCPAVEMENTTYPE,IFCNAVIGATIONELEMENTTYPE,IFCMOORINGDEVICETYPE,IFCMEMBERTYPE,IFCKERBTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCAISSONFOUNDATIONTYPE,IFCPILETYPE,IFCDEEPFOUNDATIONTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOURSETYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE,IFCBUILTELEMENTTYPE,IFCTRANSPORTELEMENTTYPE,IFCVEHICLETYPE,IFCTRANSPORTATIONDEVICETYPE,IFCGEOGRAPHICELEMENTTYPE,IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE,IFCFURNISHINGELEMENTTYPE],2777663545:[IFCCYLINDRICALSURFACE,IFCTOROIDALSURFACE,IFCSPHERICALSURFACE,IFCPLANE],477187591:[IFCEXTRUDEDAREASOLIDTAPERED],2652556860:[IFCDIRECTRIXDERIVEDREFERENCESWEPTAREASOLID],4238390223:[IFCSYSTEMFURNITUREELEMENTTYPE,IFCFURNITURETYPE],178912537:[IFCINDEXEDPOLYGONALFACEWITHVOIDS],1425443689:[IFCFACETEDBREPWITHVOIDS,IFCFACETEDBREP,IFCADVANCEDBREPWITHVOIDS,IFCADVANCEDBREP],3888040117:[IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILTSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY,IFCGROUP,IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM,IFCCONTROL,IFCOCCUPANT,IFCACTOR,IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE,IFCRESOURCE,IFCALIGNMENT,IFCLINEARPOSITIONINGELEMENT,IFCGRID,IFCREFERENT,IFCPOSITIONINGELEMENT,IFCDISTRIBUTIONPORT,IFCPORT,IFCALIGNMENTVERTICAL,IFCALIGNMENTSEGMENT,IFCALIGNMENTHORIZONTAL,IFCALIGNMENTCANT,IFCLINEARELEMENT,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBUILDINGELEMENTPROXY,IFCBEARING,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCTRACKELEMENT,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCRAIL,IFCPLATE,IFCPAVEMENT,IFCNAVIGATIONELEMENT,IFCMOORINGDEVICE,IFCMEMBER,IFCKERB,IFCFOOTING,IFCREINFORCEDSOIL,IFCEARTHWORKSFILL,IFCEARTHWORKSELEMENT,IFCDOOR,IFCCAISSONFOUNDATION,IFCPILE,IFCDEEPFOUNDATION,IFCCURTAINWALL,IFCCOVERING,IFCCOURSE,IFCCOLUMN,IFCCHIMNEY,IFCBUILTELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCVEHICLE,IFCTRANSPORTATIONDEVICE,IFCGEOSLICE,IFCGEOMODEL,IFCBOREHOLE,IFCGEOTECHNICALASSEMBLY,IFCGEOTECHNICALSTRATUM,IFCGEOTECHNICALELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCEARTHWORKSCUT,IFCVOIDINGFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCVIBRATIONDAMPER,IFCSIGN,IFCREINFORCINGBAR,IFCTENDONCONDUIT,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCIMPACTPROTECTIONDEVICE,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBRIDGEPART,IFCROADPART,IFCRAILWAYPART,IFCMARINEPART,IFCFACILITYPARTCOMMON,IFCFACILITYPART,IFCBUILDING,IFCBRIDGE,IFCROAD,IFCRAILWAY,IFCMARINEFACILITY,IFCFACILITY,IFCBUILDINGSTOREY,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT,IFCPRODUCT,IFCPROCEDURE,IFCEVENT,IFCTASK,IFCPROCESS],590820931:[IFCOFFSETCURVEBYDISTANCES,IFCOFFSETCURVE3D,IFCOFFSETCURVE2D],759155922:[IFCDRAUGHTINGPREDEFINEDCOLOUR],2559016684:[IFCDRAUGHTINGPREDEFINEDCURVEFONT],3967405729:[IFCPERMEABLECOVERINGPROPERTIES,IFCDOORPANELPROPERTIES,IFCDOORLININGPROPERTIES,IFCWINDOWPANELPROPERTIES,IFCWINDOWLININGPROPERTIES,IFCREINFORCEMENTDEFINITIONPROPERTIES],2945172077:[IFCPROCEDURE,IFCEVENT,IFCTASK],4208778838:[IFCALIGNMENT,IFCLINEARPOSITIONINGELEMENT,IFCGRID,IFCREFERENT,IFCPOSITIONINGELEMENT,IFCDISTRIBUTIONPORT,IFCPORT,IFCALIGNMENTVERTICAL,IFCALIGNMENTSEGMENT,IFCALIGNMENTHORIZONTAL,IFCALIGNMENTCANT,IFCLINEARELEMENT,IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBUILDINGELEMENTPROXY,IFCBEARING,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCTRACKELEMENT,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCRAIL,IFCPLATE,IFCPAVEMENT,IFCNAVIGATIONELEMENT,IFCMOORINGDEVICE,IFCMEMBER,IFCKERB,IFCFOOTING,IFCREINFORCEDSOIL,IFCEARTHWORKSFILL,IFCEARTHWORKSELEMENT,IFCDOOR,IFCCAISSONFOUNDATION,IFCPILE,IFCDEEPFOUNDATION,IFCCURTAINWALL,IFCCOVERING,IFCCOURSE,IFCCOLUMN,IFCCHIMNEY,IFCBUILTELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCVEHICLE,IFCTRANSPORTATIONDEVICE,IFCGEOSLICE,IFCGEOMODEL,IFCBOREHOLE,IFCGEOTECHNICALASSEMBLY,IFCGEOTECHNICALSTRATUM,IFCGEOTECHNICALELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCEARTHWORKSCUT,IFCVOIDINGFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCVIBRATIONDAMPER,IFCSIGN,IFCREINFORCINGBAR,IFCTENDONCONDUIT,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCIMPACTPROTECTIONDEVICE,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY,IFCELEMENT,IFCANNOTATION,IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER,IFCSTRUCTURALITEM,IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION,IFCSTRUCTURALACTIVITY,IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBRIDGEPART,IFCROADPART,IFCRAILWAYPART,IFCMARINEPART,IFCFACILITYPARTCOMMON,IFCFACILITYPART,IFCBUILDING,IFCBRIDGE,IFCROAD,IFCRAILWAY,IFCMARINEFACILITY,IFCFACILITY,IFCBUILDINGSTOREY,IFCSPATIALSTRUCTUREELEMENT,IFCSPATIALELEMENT],3521284610:[IFCCOMPLEXPROPERTYTEMPLATE,IFCSIMPLEPROPERTYTEMPLATE],3939117080:[IFCRELASSIGNSTORESOURCE,IFCRELASSIGNSTOPRODUCT,IFCRELASSIGNSTOPROCESS,IFCRELASSIGNSTOGROUPBYFACTOR,IFCRELASSIGNSTOGROUP,IFCRELASSIGNSTOCONTROL,IFCRELASSIGNSTOACTOR],1307041759:[IFCRELASSIGNSTOGROUPBYFACTOR],1865459582:[IFCRELASSOCIATESPROFILEDEF,IFCRELASSOCIATESMATERIAL,IFCRELASSOCIATESLIBRARY,IFCRELASSOCIATESDOCUMENT,IFCRELASSOCIATESCONSTRAINT,IFCRELASSOCIATESCLASSIFICATION,IFCRELASSOCIATESAPPROVAL],826625072:[IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL,IFCRELSPACEBOUNDARY,IFCRELSERVICESBUILDINGS,IFCRELSEQUENCE,IFCRELREFERENCEDINSPATIALSTRUCTURE,IFCRELPOSITIONS,IFCRELINTERFERESELEMENTS,IFCRELFLOWCONTROLELEMENTS,IFCRELFILLSELEMENT,IFCRELCOVERSSPACES,IFCRELCOVERSBLDGELEMENTS,IFCRELCONTAINEDINSPATIALSTRUCTURE,IFCRELCONNECTSWITHECCENTRICITY,IFCRELCONNECTSSTRUCTURALMEMBER,IFCRELCONNECTSSTRUCTURALACTIVITY,IFCRELCONNECTSPORTS,IFCRELCONNECTSPORTTOELEMENT,IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS,IFCRELCONNECTSELEMENTS],1204542856:[IFCRELCONNECTSWITHREALIZINGELEMENTS,IFCRELCONNECTSPATHELEMENTS],1638771189:[IFCRELCONNECTSWITHECCENTRICITY],2551354335:[IFCRELAGGREGATES,IFCRELADHERESTOELEMENT,IFCRELVOIDSELEMENT,IFCRELPROJECTSELEMENT,IFCRELNESTS],693640335:[IFCRELDEFINESBYTYPE,IFCRELDEFINESBYTEMPLATE,IFCRELDEFINESBYPROPERTIES,IFCRELDEFINESBYOBJECT],3451746338:[IFCRELSPACEBOUNDARY2NDLEVEL,IFCRELSPACEBOUNDARY1STLEVEL],3523091289:[IFCRELSPACEBOUNDARY2NDLEVEL],2914609552:[IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE,IFCCONSTRUCTIONRESOURCE],1856042241:[IFCREVOLVEDAREASOLIDTAPERED],1862484736:[IFCSECTIONEDSOLIDHORIZONTAL],1412071761:[IFCEXTERNALSPATIALELEMENT,IFCEXTERNALSPATIALSTRUCTUREELEMENT,IFCSPATIALZONE,IFCSPACE,IFCSITE,IFCBRIDGEPART,IFCROADPART,IFCRAILWAYPART,IFCMARINEPART,IFCFACILITYPARTCOMMON,IFCFACILITYPART,IFCBUILDING,IFCBRIDGE,IFCROAD,IFCRAILWAY,IFCMARINEFACILITY,IFCFACILITY,IFCBUILDINGSTOREY,IFCSPATIALSTRUCTUREELEMENT],710998568:[IFCSPATIALZONETYPE,IFCSPACETYPE,IFCSPATIALSTRUCTUREELEMENTTYPE],2706606064:[IFCSPACE,IFCSITE,IFCBRIDGEPART,IFCROADPART,IFCRAILWAYPART,IFCMARINEPART,IFCFACILITYPARTCOMMON,IFCFACILITYPART,IFCBUILDING,IFCBRIDGE,IFCROAD,IFCRAILWAY,IFCMARINEFACILITY,IFCFACILITY,IFCBUILDINGSTOREY],3893378262:[IFCSPACETYPE],2735484536:[IFCSINESPIRAL,IFCSEVENTHORDERPOLYNOMIALSPIRAL,IFCSECONDORDERPOLYNOMIALSPIRAL,IFCCOSINESPIRAL,IFCCLOTHOID,IFCTHIRDORDERPOLYNOMIALSPIRAL],3544373492:[IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION,IFCSTRUCTURALACTION,IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION,IFCSTRUCTURALREACTION],3136571912:[IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION,IFCSTRUCTURALCONNECTION,IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER,IFCSTRUCTURALMEMBER],530289379:[IFCSTRUCTURALCURVEMEMBERVARYING,IFCSTRUCTURALCURVEMEMBER,IFCSTRUCTURALSURFACEMEMBERVARYING,IFCSTRUCTURALSURFACEMEMBER],3689010777:[IFCSTRUCTURALPOINTREACTION,IFCSTRUCTURALCURVEREACTION,IFCSTRUCTURALSURFACEREACTION],3979015343:[IFCSTRUCTURALSURFACEMEMBERVARYING],699246055:[IFCSEAMCURVE,IFCINTERSECTIONCURVE],2387106220:[IFCPOLYGONALFACESET,IFCTRIANGULATEDIRREGULARNETWORK,IFCTRIANGULATEDFACESET],3665877780:[IFCTRANSPORTELEMENTTYPE,IFCVEHICLETYPE],2916149573:[IFCTRIANGULATEDIRREGULARNETWORK],2296667514:[IFCOCCUPANT],1635779807:[IFCADVANCEDBREPWITHVOIDS],2887950389:[IFCRATIONALBSPLINESURFACEWITHKNOTS,IFCBSPLINESURFACEWITHKNOTS],167062518:[IFCRATIONALBSPLINESURFACEWITHKNOTS],1260505505:[IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS,IFCBSPLINECURVE,IFCTRIMMEDCURVE,IFCPOLYLINE,IFCINDEXEDPOLYCURVE,IFCSEGMENTEDREFERENCECURVE,IFCGRADIENTCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE,IFCCOMPOSITECURVE],1626504194:[IFCBUILDINGELEMENTPROXYTYPE,IFCBEARINGTYPE,IFCBEAMTYPE,IFCWINDOWTYPE,IFCWALLTYPE,IFCTRACKELEMENTTYPE,IFCSTAIRTYPE,IFCSTAIRFLIGHTTYPE,IFCSLABTYPE,IFCSHADINGDEVICETYPE,IFCROOFTYPE,IFCRAMPTYPE,IFCRAMPFLIGHTTYPE,IFCRAILINGTYPE,IFCRAILTYPE,IFCPLATETYPE,IFCPAVEMENTTYPE,IFCNAVIGATIONELEMENTTYPE,IFCMOORINGDEVICETYPE,IFCMEMBERTYPE,IFCKERBTYPE,IFCFOOTINGTYPE,IFCDOORTYPE,IFCCAISSONFOUNDATIONTYPE,IFCPILETYPE,IFCDEEPFOUNDATIONTYPE,IFCCURTAINWALLTYPE,IFCCOVERINGTYPE,IFCCOURSETYPE,IFCCOLUMNTYPE,IFCCHIMNEYTYPE],3732776249:[IFCSEGMENTEDREFERENCECURVE,IFCGRADIENTCURVE,IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE,IFCCOMPOSITECURVEONSURFACE],15328376:[IFCOUTERBOUNDARYCURVE,IFCBOUNDARYCURVE],2510884976:[IFCCIRCLE,IFCELLIPSE],2559216714:[IFCCONSTRUCTIONPRODUCTRESOURCE,IFCCONSTRUCTIONMATERIALRESOURCE,IFCCONSTRUCTIONEQUIPMENTRESOURCE,IFCSUBCONTRACTRESOURCE,IFCLABORRESOURCE,IFCCREWRESOURCE],3293443760:[IFCACTIONREQUEST,IFCWORKSCHEDULE,IFCWORKPLAN,IFCWORKCONTROL,IFCWORKCALENDAR,IFCPROJECTORDER,IFCPERMIT,IFCPERFORMANCEHISTORY,IFCCOSTSCHEDULE,IFCCOSTITEM],1306400036:[IFCCAISSONFOUNDATIONTYPE,IFCPILETYPE],3256556792:[IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE,IFCDISTRIBUTIONCONTROLELEMENTTYPE,IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE,IFCDISTRIBUTIONFLOWELEMENTTYPE],3849074793:[IFCDISTRIBUTIONCHAMBERELEMENTTYPE,IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE,IFCFLOWTREATMENTDEVICETYPE,IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE,IFCFLOWTERMINALTYPE,IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE,IFCFLOWSTORAGEDEVICETYPE,IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE,IFCFLOWSEGMENTTYPE,IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE,IFCFLOWMOVINGDEVICETYPE,IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE,IFCFLOWFITTINGTYPE,IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE,IFCFLOWCONTROLLERTYPE,IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE,IFCENERGYCONVERSIONDEVICETYPE],1758889154:[IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT,IFCDISTRIBUTIONELEMENT,IFCCIVILELEMENT,IFCBUILDINGELEMENTPROXY,IFCBEARING,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCTRACKELEMENT,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCRAIL,IFCPLATE,IFCPAVEMENT,IFCNAVIGATIONELEMENT,IFCMOORINGDEVICE,IFCMEMBER,IFCKERB,IFCFOOTING,IFCREINFORCEDSOIL,IFCEARTHWORKSFILL,IFCEARTHWORKSELEMENT,IFCDOOR,IFCCAISSONFOUNDATION,IFCPILE,IFCDEEPFOUNDATION,IFCCURTAINWALL,IFCCOVERING,IFCCOURSE,IFCCOLUMN,IFCCHIMNEY,IFCBUILTELEMENT,IFCVIRTUALELEMENT,IFCTRANSPORTELEMENT,IFCVEHICLE,IFCTRANSPORTATIONDEVICE,IFCGEOSLICE,IFCGEOMODEL,IFCBOREHOLE,IFCGEOTECHNICALASSEMBLY,IFCGEOTECHNICALSTRATUM,IFCGEOTECHNICALELEMENT,IFCGEOGRAPHICELEMENT,IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE,IFCFURNISHINGELEMENT,IFCSURFACEFEATURE,IFCEARTHWORKSCUT,IFCVOIDINGFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION,IFCFEATUREELEMENT,IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCVIBRATIONDAMPER,IFCSIGN,IFCREINFORCINGBAR,IFCTENDONCONDUIT,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCIMPACTPROTECTIONDEVICE,IFCFASTENER,IFCELEMENTCOMPONENT,IFCELEMENTASSEMBLY],1623761950:[IFCDISCRETEACCESSORY,IFCBUILDINGELEMENTPART,IFCVIBRATIONISOLATOR,IFCVIBRATIONDAMPER,IFCSIGN,IFCREINFORCINGBAR,IFCTENDONCONDUIT,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH,IFCREINFORCINGELEMENT,IFCMECHANICALFASTENER,IFCIMPACTPROTECTIONDEVICE,IFCFASTENER],2590856083:[IFCDISCRETEACCESSORYTYPE,IFCBUILDINGELEMENTPARTTYPE,IFCVIBRATIONISOLATORTYPE,IFCVIBRATIONDAMPERTYPE,IFCSIGNTYPE,IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONCONDUITTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE,IFCREINFORCINGELEMENTTYPE,IFCMECHANICALFASTENERTYPE,IFCIMPACTPROTECTIONDEVICETYPE,IFCFASTENERTYPE],2107101300:[IFCELECTRICMOTORTYPE,IFCELECTRICGENERATORTYPE,IFCCOOLINGTOWERTYPE,IFCCOOLEDBEAMTYPE,IFCCONDENSERTYPE,IFCCOILTYPE,IFCCHILLERTYPE,IFCBURNERTYPE,IFCBOILERTYPE,IFCAIRTOAIRHEATRECOVERYTYPE,IFCUNITARYEQUIPMENTTYPE,IFCTUBEBUNDLETYPE,IFCTRANSFORMERTYPE,IFCSOLARDEVICETYPE,IFCMOTORCONNECTIONTYPE,IFCHUMIDIFIERTYPE,IFCHEATEXCHANGERTYPE,IFCEVAPORATORTYPE,IFCEVAPORATIVECOOLERTYPE,IFCENGINETYPE],2853485674:[IFCEXTERNALSPATIALELEMENT],807026263:[IFCFACETEDBREPWITHVOIDS],24185140:[IFCBUILDING,IFCBRIDGE,IFCROAD,IFCRAILWAY,IFCMARINEFACILITY],1310830890:[IFCBRIDGEPART,IFCROADPART,IFCRAILWAYPART,IFCMARINEPART,IFCFACILITYPARTCOMMON],2827207264:[IFCSURFACEFEATURE,IFCEARTHWORKSCUT,IFCVOIDINGFEATURE,IFCOPENINGELEMENT,IFCFEATUREELEMENTSUBTRACTION,IFCPROJECTIONELEMENT,IFCFEATUREELEMENTADDITION],2143335405:[IFCPROJECTIONELEMENT],1287392070:[IFCEARTHWORKSCUT,IFCVOIDINGFEATURE,IFCOPENINGELEMENT],3907093117:[IFCELECTRICTIMECONTROLTYPE,IFCELECTRICDISTRIBUTIONBOARDTYPE,IFCDISTRIBUTIONBOARDTYPE,IFCDAMPERTYPE,IFCAIRTERMINALBOXTYPE,IFCVALVETYPE,IFCSWITCHINGDEVICETYPE,IFCPROTECTIVEDEVICETYPE,IFCFLOWMETERTYPE],3198132628:[IFCDUCTFITTINGTYPE,IFCCABLEFITTINGTYPE,IFCCABLECARRIERFITTINGTYPE,IFCPIPEFITTINGTYPE,IFCJUNCTIONBOXTYPE],1482959167:[IFCFANTYPE,IFCCOMPRESSORTYPE,IFCPUMPTYPE],1834744321:[IFCDUCTSEGMENTTYPE,IFCCONVEYORSEGMENTTYPE,IFCCABLESEGMENTTYPE,IFCCABLECARRIERSEGMENTTYPE,IFCPIPESEGMENTTYPE],1339347760:[IFCELECTRICFLOWSTORAGEDEVICETYPE,IFCTANKTYPE],2297155007:[IFCFIRESUPPRESSIONTERMINALTYPE,IFCELECTRICAPPLIANCETYPE,IFCCOMMUNICATIONSAPPLIANCETYPE,IFCAUDIOVISUALAPPLIANCETYPE,IFCAIRTERMINALTYPE,IFCWASTETERMINALTYPE,IFCSTACKTERMINALTYPE,IFCSPACEHEATERTYPE,IFCSIGNALTYPE,IFCSANITARYTERMINALTYPE,IFCOUTLETTYPE,IFCMOBILETELECOMMUNICATIONSAPPLIANCETYPE,IFCMEDICALDEVICETYPE,IFCLIQUIDTERMINALTYPE,IFCLIGHTFIXTURETYPE,IFCLAMPTYPE],3009222698:[IFCFILTERTYPE,IFCELECTRICFLOWTREATMENTDEVICETYPE,IFCDUCTSILENCERTYPE,IFCINTERCEPTORTYPE],263784265:[IFCSYSTEMFURNITUREELEMENT,IFCFURNITURE],4230923436:[IFCGEOSLICE,IFCGEOMODEL,IFCBOREHOLE,IFCGEOTECHNICALASSEMBLY,IFCGEOTECHNICALSTRATUM],2706460486:[IFCASSET,IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILTSYSTEM,IFCBUILDINGSYSTEM,IFCZONE,IFCSYSTEM,IFCSTRUCTURALRESULTGROUP,IFCSTRUCTURALLOADCASE,IFCSTRUCTURALLOADGROUP,IFCINVENTORY],2176059722:[IFCALIGNMENTVERTICAL,IFCALIGNMENTSEGMENT,IFCALIGNMENTHORIZONTAL,IFCALIGNMENTCANT],3740093272:[IFCDISTRIBUTIONPORT],1946335990:[IFCALIGNMENT,IFCLINEARPOSITIONINGELEMENT,IFCGRID,IFCREFERENT],3027567501:[IFCREINFORCINGBAR,IFCTENDONCONDUIT,IFCTENDONANCHOR,IFCTENDON,IFCREINFORCINGMESH],964333572:[IFCREINFORCINGBARTYPE,IFCTENDONTYPE,IFCTENDONCONDUITTYPE,IFCTENDONANCHORTYPE,IFCREINFORCINGMESHTYPE],682877961:[IFCSTRUCTURALPLANARACTION,IFCSTRUCTURALSURFACEACTION,IFCSTRUCTURALPOINTACTION,IFCSTRUCTURALLINEARACTION,IFCSTRUCTURALCURVEACTION],1179482911:[IFCSTRUCTURALSURFACECONNECTION,IFCSTRUCTURALPOINTCONNECTION,IFCSTRUCTURALCURVECONNECTION],1004757350:[IFCSTRUCTURALLINEARACTION],214636428:[IFCSTRUCTURALCURVEMEMBERVARYING],1252848954:[IFCSTRUCTURALLOADCASE],3657597509:[IFCSTRUCTURALPLANARACTION],2254336722:[IFCSTRUCTURALANALYSISMODEL,IFCDISTRIBUTIONCIRCUIT,IFCDISTRIBUTIONSYSTEM,IFCBUILTSYSTEM,IFCBUILDINGSYSTEM,IFCZONE],1953115116:[IFCTRANSPORTELEMENT,IFCVEHICLE],1028945134:[IFCWORKSCHEDULE,IFCWORKPLAN],1967976161:[IFCRATIONALBSPLINECURVEWITHKNOTS,IFCBSPLINECURVEWITHKNOTS],2461110595:[IFCRATIONALBSPLINECURVEWITHKNOTS],1136057603:[IFCOUTERBOUNDARYCURVE],1876633798:[IFCBUILDINGELEMENTPROXY,IFCBEARING,IFCBEAM,IFCWINDOW,IFCWALLSTANDARDCASE,IFCWALL,IFCTRACKELEMENT,IFCSTAIRFLIGHT,IFCSTAIR,IFCSLAB,IFCSHADINGDEVICE,IFCROOF,IFCRAMPFLIGHT,IFCRAMP,IFCRAILING,IFCRAIL,IFCPLATE,IFCPAVEMENT,IFCNAVIGATIONELEMENT,IFCMOORINGDEVICE,IFCMEMBER,IFCKERB,IFCFOOTING,IFCREINFORCEDSOIL,IFCEARTHWORKSFILL,IFCEARTHWORKSELEMENT,IFCDOOR,IFCCAISSONFOUNDATION,IFCPILE,IFCDEEPFOUNDATION,IFCCURTAINWALL,IFCCOVERING,IFCCOURSE,IFCCOLUMN,IFCCHIMNEY],3426335179:[IFCCAISSONFOUNDATION,IFCPILE],2063403501:[IFCCONTROLLERTYPE,IFCALARMTYPE,IFCACTUATORTYPE,IFCUNITARYCONTROLELEMENTTYPE,IFCSENSORTYPE,IFCPROTECTIVEDEVICETRIPPINGUNITTYPE,IFCFLOWINSTRUMENTTYPE],1945004755:[IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT,IFCDISTRIBUTIONCONTROLELEMENT,IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE,IFCDISTRIBUTIONFLOWELEMENT],3040386961:[IFCDISTRIBUTIONCHAMBERELEMENT,IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR,IFCFLOWTREATMENTDEVICE,IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP,IFCFLOWTERMINAL,IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK,IFCFLOWSTORAGEDEVICE,IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT,IFCFLOWSEGMENT,IFCFAN,IFCCOMPRESSOR,IFCPUMP,IFCFLOWMOVINGDEVICE,IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX,IFCFLOWFITTING,IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER,IFCFLOWCONTROLLER,IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE,IFCENERGYCONVERSIONDEVICE],3205830791:[IFCDISTRIBUTIONCIRCUIT],1077100507:[IFCREINFORCEDSOIL,IFCEARTHWORKSFILL],1658829314:[IFCELECTRICMOTOR,IFCELECTRICGENERATOR,IFCCOOLINGTOWER,IFCCOOLEDBEAM,IFCCONDENSER,IFCCOIL,IFCCHILLER,IFCBURNER,IFCBOILER,IFCAIRTOAIRHEATRECOVERY,IFCUNITARYEQUIPMENT,IFCTUBEBUNDLE,IFCTRANSFORMER,IFCSOLARDEVICE,IFCMOTORCONNECTION,IFCHUMIDIFIER,IFCHEATEXCHANGER,IFCEVAPORATOR,IFCEVAPORATIVECOOLER,IFCENGINE],2058353004:[IFCELECTRICTIMECONTROL,IFCELECTRICDISTRIBUTIONBOARD,IFCDISTRIBUTIONBOARD,IFCDAMPER,IFCAIRTERMINALBOX,IFCVALVE,IFCSWITCHINGDEVICE,IFCPROTECTIVEDEVICE,IFCFLOWMETER],4278956645:[IFCDUCTFITTING,IFCCABLEFITTING,IFCCABLECARRIERFITTING,IFCPIPEFITTING,IFCJUNCTIONBOX],3132237377:[IFCFAN,IFCCOMPRESSOR,IFCPUMP],987401354:[IFCDUCTSEGMENT,IFCCONVEYORSEGMENT,IFCCABLESEGMENT,IFCCABLECARRIERSEGMENT,IFCPIPESEGMENT],707683696:[IFCELECTRICFLOWSTORAGEDEVICE,IFCTANK],2223149337:[IFCFIRESUPPRESSIONTERMINAL,IFCELECTRICAPPLIANCE,IFCCOMMUNICATIONSAPPLIANCE,IFCAUDIOVISUALAPPLIANCE,IFCAIRTERMINAL,IFCWASTETERMINAL,IFCSTACKTERMINAL,IFCSPACEHEATER,IFCSIGNAL,IFCSANITARYTERMINAL,IFCOUTLET,IFCMOBILETELECOMMUNICATIONSAPPLIANCE,IFCMEDICALDEVICE,IFCLIQUIDTERMINAL,IFCLIGHTFIXTURE,IFCLAMP],3508470533:[IFCFILTER,IFCELECTRICFLOWTREATMENTDEVICE,IFCDUCTSILENCER,IFCINTERCEPTOR],2713699986:[IFCGEOSLICE,IFCGEOMODEL,IFCBOREHOLE],1154579445:[IFCALIGNMENT],2391406946:[IFCWALLSTANDARDCASE],1062813311:[IFCCONTROLLER,IFCALARM,IFCACTUATOR,IFCUNITARYCONTROLELEMENT,IFCSENSOR,IFCPROTECTIVEDEVICETRIPPINGUNIT,IFCFLOWINSTRUMENT]};InversePropertyDef[3]={3630933823:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],618182010:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],411424972:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],130549933:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["ApprovedObjects",IFCRELASSOCIATESAPPROVAL,5,true],["ApprovedResources",IFCRESOURCEAPPROVALRELATIONSHIP,3,true],["IsRelatedWith",IFCAPPROVALRELATIONSHIP,3,true],["Relates",IFCAPPROVALRELATIONSHIP,2,true]],1959218052:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PropertiesForConstraint",IFCRESOURCECONSTRAINTRELATIONSHIP,2,true]],1466758467:[["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],602808272:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],3200245327:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],2242383968:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],1040185647:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],3548104201:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true]],852622518:[["PartOfW",IFCGRID,9,true],["PartOfV",IFCGRID,8,true],["PartOfU",IFCGRID,7,true],["HasIntersections",IFCVIRTUALGRIDINTERSECTION,0,true]],2655187982:[["LibraryInfoForObjects",IFCRELASSOCIATESLIBRARY,5,true],["HasLibraryReferences",IFCLIBRARYREFERENCE,5,true]],3452421091:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true],["LibraryRefForObjects",IFCRELASSOCIATESLIBRARY,5,true]],760658860:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],248100487:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialLayerSet",IFCMATERIALLAYERSET,0,false]],3303938423:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],1847252529:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialLayerSet",IFCMATERIALLAYERSET,0,false]],2235152071:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialProfileSet",IFCMATERIALPROFILESET,2,false]],164193824:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],552965576:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialProfileSet",IFCMATERIALPROFILESET,2,false]],1507914824:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3368373690:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PropertiesForConstraint",IFCRESOURCECONSTRAINTRELATIONSHIP,2,true]],3701648758:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCOBJECTPLACEMENT,0,true]],2251480897:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PropertiesForConstraint",IFCRESOURCECONSTRAINTRELATIONSHIP,2,true]],4251960020:[["IsRelatedBy",IFCORGANIZATIONRELATIONSHIP,3,true],["Relates",IFCORGANIZATIONRELATIONSHIP,2,true],["Engages",IFCPERSONANDORGANIZATION,1,true]],2077209135:[["EngagedIn",IFCPERSONANDORGANIZATION,0,true]],2483315170:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2226359599:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],3355820592:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],3958567839:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3843373140:[["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],986844984:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],3710013099:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2044713172:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2093928680:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],931644368:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2691318326:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],3252649465:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],2405470396:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],825690147:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],1076942058:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],3377609919:[["RepresentationsInContext",IFCREPRESENTATION,0,true]],3008791417:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1660063152:[["HasShapeAspects",IFCSHAPEASPECT,4,true],["MapUsage",IFCMAPPEDITEM,0,true]],867548509:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],3982875396:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],4240577450:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],2830218821:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],3958052878:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3049322572:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true]],626085974:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],912023232:[["OfPerson",IFCPERSON,7,true],["OfOrganization",IFCORGANIZATION,4,true]],222769930:[["ToTexMap",IFCINDEXEDPOLYGONALTEXTUREMAP,3,false]],1010789467:[["ToTexMap",IFCINDEXEDPOLYGONALTEXTUREMAP,3,false]],3101149627:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1377556343:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1735638870:[["RepresentationMap",IFCREPRESENTATIONMAP,1,true],["LayerAssignments",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["OfProductRepresentation",IFCPRODUCTREPRESENTATION,2,true],["OfShapeAspect",IFCSHAPEASPECT,0,true]],2799835756:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1907098498:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3798115385:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1310608509:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2705031697:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],616511568:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],3150382593:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],747523909:[["ClassificationForObjects",IFCRELASSOCIATESCLASSIFICATION,5,true],["HasReferences",IFCCLASSIFICATIONREFERENCE,3,true]],647927063:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true],["ClassificationRefForObjects",IFCRELASSOCIATESCLASSIFICATION,5,true],["HasReferences",IFCCLASSIFICATIONREFERENCE,3,true]],1485152156:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],370225590:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3050246964:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2889183280:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2713554722:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],3632507154:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1154170062:[["DocumentInfoForObjects",IFCRELASSOCIATESDOCUMENT,5,true],["HasDocumentReferences",IFCDOCUMENTREFERENCE,4,true],["IsPointedTo",IFCDOCUMENTINFORMATIONRELATIONSHIP,3,true],["IsPointer",IFCDOCUMENTINFORMATIONRELATIONSHIP,2,true]],3732053477:[["ExternalReferenceForResources",IFCEXTERNALREFERENCERELATIONSHIP,2,true],["DocumentRefForObjects",IFCRELASSOCIATESDOCUMENT,5,true]],3900360178:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],476780140:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],297599258:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2556980723:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasTextureMaps",IFCTEXTUREMAP,2,true]],1809719519:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],803316827:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3008276851:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasTextureMaps",IFCTEXTUREMAP,2,true]],3448662350:[["RepresentationsInContext",IFCREPRESENTATION,0,true],["HasSubContexts",IFCGEOMETRICREPRESENTATIONSUBCONTEXT,6,true],["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],2453401579:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4142052618:[["RepresentationsInContext",IFCREPRESENTATION,0,true],["HasSubContexts",IFCGEOMETRICREPRESENTATIONSUBCONTEXT,6,true],["HasCoordinateOperation",IFCCOORDINATEOPERATION,0,true]],3590301190:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],178086475:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCOBJECTPLACEMENT,0,true]],812098782:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3905492369:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],3741457305:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1402838566:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],125510826:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2604431987:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4266656042:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1520743889:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3422422726:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],388784114:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCOBJECTPLACEMENT,0,true]],2624227202:[["PlacesObject",IFCPRODUCT,5,true],["ReferencedByPlacements",IFCOBJECTPLACEMENT,0,true]],1008929658:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2347385850:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1838606355:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["HasRepresentation",IFCMATERIALDEFINITIONREPRESENTATION,3,true],["IsRelatedWith",IFCMATERIALRELATIONSHIP,3,true],["RelatesTo",IFCMATERIALRELATIONSHIP,2,true]],3708119e3:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true],["ToMaterialConstituentSet",IFCMATERIALCONSTITUENTSET,2,false]],2852063980:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true],["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCMATERIALPROPERTIES,3,true]],1303795690:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3079605661:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3404854881:[["AssociatedTo",IFCRELASSOCIATESMATERIAL,5,true]],3265635763:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2998442950:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],219451334:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true]],182550632:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2665983363:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1029017970:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2529465313:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2519244187:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3021840470:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfComplex",IFCPHYSICALCOMPLEXQUANTITY,2,true]],597895409:[["IsMappedBy",IFCTEXTURECOORDINATE,0,true],["UsedInStyles",IFCSURFACESTYLEWITHTEXTURES,0,true]],2004835150:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1663979128:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2067069095:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2165702409:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4022376103:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1423911732:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2924175390:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2775532180:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3778827333:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],673634403:[["ShapeOfProduct",IFCPRODUCT,6,true],["HasShapeAspects",IFCSHAPEASPECT,4,true]],2802850158:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2598011224:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],1680319473:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true]],3357820518:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],1482703590:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true]],2090586900:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],3615266464:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3413951693:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1580146022:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],2778083089:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2042790032:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],4165799628:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true]],1509187699:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],823603102:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["UsingCurves",IFCCOMPOSITECURVE,0,true]],4124623270:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3692461612:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],723233188:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2233826070:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2513912981:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2247615214:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1260650574:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1096409881:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],230924584:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3071757647:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],901063453:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4282788508:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3124975700:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2715220739:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1628702193:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true]],3736923433:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2347495698:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3698973494:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],427810014:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1417489154:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2759199220:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2543172580:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3406155212:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasTextureMaps",IFCTEXTUREMAP,2,true]],669184980:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3207858831:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],4261334040:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3125803723:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2740243338:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3425423356:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2736907675:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4182860854:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2581212453:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2713105998:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2898889636:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],1123145078:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],574549367:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1675464909:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2059837836:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],59481748:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3749851601:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3486308946:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3331915920:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1416205885:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1383045692:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2205249479:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2542286263:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],2485617015:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["UsingCurves",IFCCOMPOSITECURVE,0,true]],2574617495:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],3419103109:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Declares",IFCRELDECLARES,4,true]],1815067380:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],2506170314:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2147822146:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2601014836:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2827736869:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2629017746:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4212018352:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["UsingCurves",IFCCOMPOSITECURVE,0,true]],32440307:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],593015953:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1472233963:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1883228015:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],339256511:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2777663545:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2835456948:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],4024345920:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],477187591:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2804161546:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2047409740:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],374418227:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],315944413:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2652556860:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4238390223:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1268542332:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4095422895:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],987898635:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1484403080:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],178912537:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["ToFaceSet",IFCPOLYGONALFACESET,2,true],["HasTexCoords",IFCTEXTURECOORDINATEINDICES,1,true]],2294589976:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["ToFaceSet",IFCPOLYGONALFACESET,2,true],["HasTexCoords",IFCTEXTURECOORDINATEINDICES,1,true]],572779678:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],428585644:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1281925730:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1425443689:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3888040117:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true]],590820931:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3388369263:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3505215534:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2485787929:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1682466193:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],603570806:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],220341763:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3381221214:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3967405729:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],569719735:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2945172077:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],4208778838:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],103090709:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Declares",IFCRELDECLARES,4,true]],653396225:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Declares",IFCRELDECLARES,4,true]],871118103:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],4166981789:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],2752243245:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],941946838:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],1451395588:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],492091185:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Defines",IFCRELDEFINESBYTEMPLATE,5,true]],3650150729:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],110355661:[["HasExternalReferences",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["PartOfPset",IFCPROPERTYSET,4,true],["PropertyForDependance",IFCPROPERTYDEPENDENCYRELATIONSHIP,2,true],["PropertyDependsOn",IFCPROPERTYDEPENDENCYRELATIONSHIP,3,true],["PartOfComplex",IFCCOMPLEXPROPERTY,3,true],["HasConstraints",IFCRESOURCECONSTRAINTRELATIONSHIP,3,true],["HasApprovals",IFCRESOURCEAPPROVALRELATIONSHIP,2,true]],3521284610:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["PartOfComplexTemplate",IFCCOMPLEXPROPERTYTEMPLATE,6,true],["PartOfPsetTemplate",IFCPROPERTYSETTEMPLATE,6,true]],2770003689:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],2798486643:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3454111270:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3765753017:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],3523091289:[["InnerBoundaries",IFCRELSPACEBOUNDARY1STLEVEL,9,true]],1521410863:[["InnerBoundaries",IFCRELSPACEBOUNDARY1STLEVEL,9,true],["Corresponds",IFCRELSPACEBOUNDARY2NDLEVEL,10,true]],816062949:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["UsingCurves",IFCCOMPOSITECURVE,0,true]],2914609552:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1856042241:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3243963512:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4158566097:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3626867408:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1862484736:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1290935644:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1356537516:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3663146110:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["PartOfComplexTemplate",IFCCOMPLEXPROPERTYTEMPLATE,6,true],["PartOfPsetTemplate",IFCPROPERTYSETTEMPLATE,6,true]],1412071761:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],710998568:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2706606064:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],3893378262:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],463610769:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],2481509218:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],451544542:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4015995234:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2735484536:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3544373492:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],3136571912:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true]],530289379:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],3689010777:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],3979015343:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2218152070:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],603775116:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],4095615324:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],699246055:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2028607225:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2809605785:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4124788165:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1580310250:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3473067441:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],3206491090:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2387106220:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasColours",IFCINDEXEDCOLOURMAP,0,true],["HasTextures",IFCINDEXEDTEXTUREMAP,1,true]],782932809:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1935646853:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3665877780:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2916149573:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasColours",IFCINDEXEDCOLOURMAP,0,true],["HasTextures",IFCINDEXEDTEXTUREMAP,1,true]],1229763772:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasColours",IFCINDEXEDCOLOURMAP,0,true],["HasTextures",IFCINDEXEDTEXTUREMAP,1,true]],3651464721:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],336235671:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],512836454:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],2296667514:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsActingUpon",IFCRELASSIGNSTOACTOR,6,true]],1635779807:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2603310189:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1674181508:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true]],2887950389:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],167062518:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1334484129:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3649129432:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1260505505:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3124254112:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],1626504194:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2197970202:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2937912522:[["HasExternalReference",IFCEXTERNALREFERENCERELATIONSHIP,3,true],["HasProperties",IFCPROFILEPROPERTIES,3,true]],3893394355:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3497074424:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],300633059:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3875453745:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["PartOfComplexTemplate",IFCCOMPLEXPROPERTYTEMPLATE,6,true],["PartOfPsetTemplate",IFCPROPERTYSETTEMPLATE,6,true]],3732776249:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],15328376:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2510884976:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2185764099:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],4105962743:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1525564444:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],2559216714:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],3293443760:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],2000195564:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3895139033:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1419761937:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],4189326743:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1916426348:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3295246426:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1457835157:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1213902940:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1306400036:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4234616927:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3256556792:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3849074793:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2963535650:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],1714330368:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],2323601079:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1758889154:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],4123344466:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2397081782:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1623761950:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2590856083:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1704287377:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2107101300:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],132023988:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3174744832:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3390157468:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4148101412:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2853485674:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],807026263:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3737207727:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],24185140:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],1310830890:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],4228831410:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],647756555:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2489546625:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2827207264:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2143335405:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["ProjectsElements",IFCRELPROJECTSELEMENT,5,false]],1287392070:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],3907093117:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3198132628:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3815607619:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1482959167:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1834744321:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1339347760:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2297155007:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3009222698:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1893162501:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],263784265:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1509553395:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3493046030:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],4230923436:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1594536857:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2898700619:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2706460486:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],1251058090:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1806887404:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2568555532:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3948183225:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2571569899:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3946677679:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3113134337:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2391368822:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],4288270099:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],679976338:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3827777499:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1051575348:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1161773419:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2176059722:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],1770583370:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],525669439:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],976884017:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],377706215:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2108223431:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1114901282:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3181161470:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1950438474:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],710110818:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],977012517:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],506776471:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4143007308:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsActingUpon",IFCRELASSIGNSTOACTOR,6,true]],3588315303:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false],["HasFillings",IFCRELFILLSELEMENT,4,true]],2837617999:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],514975943:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2382730787:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3566463478:[["HasContext",IFCRELDECLARES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["DefinesType",IFCTYPEOBJECT,5,true],["IsDefinedBy",IFCRELDEFINESBYTEMPLATE,4,true],["DefinesOccurrence",IFCRELDEFINESBYPROPERTIES,5,true]],3327091369:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1158309216:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],804291784:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4231323485:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4017108033:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2839578677:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true],["HasColours",IFCINDEXEDCOLOURMAP,0,true],["HasTextures",IFCINDEXEDTEXTUREMAP,1,true]],3724593414:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3740093272:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedIn",IFCRELCONNECTSPORTTOELEMENT,4,true],["ConnectedFrom",IFCRELCONNECTSPORTS,5,true],["ConnectedTo",IFCRELCONNECTSPORTS,4,true]],1946335990:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["Positions",IFCRELPOSITIONS,4,true]],2744685151:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsPredecessorTo",IFCRELSEQUENCE,4,true],["IsSuccessorFrom",IFCRELSEQUENCE,5,true],["OperatesOn",IFCRELASSIGNSTOPROCESS,6,true]],2904328755:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3651124850:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["ProjectsElements",IFCRELPROJECTSELEMENT,5,false]],1842657554:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2250791053:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1763565496:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2893384427:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3992365140:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],1891881377:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],2324767716:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1469900589:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],683857671:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4021432810:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["Positions",IFCRELPOSITIONS,4,true]],3027567501:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],964333572:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2320036040:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2310774935:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],146592293:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],550521510:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],2781568857:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1768891740:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2157484638:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3649235739:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],544395925:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1027922057:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4074543187:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],33720170:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3599934289:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1894708472:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],42703149:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],4097777520:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],2533589738:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1072016465:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3856911033:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasCoverings",IFCRELCOVERSSPACES,4,true],["BoundedBy",IFCRELSPACEBOUNDARY,4,true]],1305183839:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3812236995:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3112655638:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1039846685:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],338393293:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],682877961:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1179482911:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],1004757350:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],4243806635:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],214636428:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2445595289:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectedBy",IFCRELCONNECTSSTRUCTURALMEMBER,4,true]],2757150158:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1807405624:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1252848954:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["SourceOfResultGroup",IFCSTRUCTURALRESULTGROUP,6,true],["LoadGroupFor",IFCSTRUCTURALANALYSISMODEL,7,true]],2082059205:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],734778138:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],1235345126:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],2986769608:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ResultGroupFor",IFCSTRUCTURALANALYSISMODEL,8,true]],3657597509:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1975003073:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedStructuralActivity",IFCRELCONNECTSSTRUCTURALACTIVITY,4,true],["ConnectsStructuralMembers",IFCRELCONNECTSSTRUCTURALMEMBER,5,true]],148013059:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],3101698114:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["AdheresToElement",IFCRELADHERESTOELEMENT,5,false]],2315554128:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2254336722:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true],["ServicesFacilities",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],413509423:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],5716631:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3824725483:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2347447852:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3081323446:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3663046924:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2281632017:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2415094496:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],618700268:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1692211062:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2097647324:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1953115116:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3593883385:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1600972822:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1911125066:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],728799441:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],840318589:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1530820697:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3956297820:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2391383451:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3313531582:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2769231204:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],926996030:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],1898987631:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1133259667:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4009809668:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4088093105:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1028945134:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],4218914973:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],3342526732:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1033361043:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true],["ServicesFacilities",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],3821786052:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["Controls",IFCRELASSIGNSTOCONTROL,6,true]],1411407467:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3352864051:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1871374353:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4266260250:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],1545765605:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],317615605:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],1662888072:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],3460190687:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],1532957894:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1967976161:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],2461110595:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],819618141:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3649138523:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],231477066:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1136057603:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],644574406:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],963979645:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],4031249490:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true]],2979338954:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],39481116:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1909888760:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1177604601:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true],["ServicesFacilities",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],1876633798:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3862327254:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true],["ServicesFacilities",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],2188180465:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],395041908:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3293546465:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2674252688:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1285652485:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3203706013:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2951183804:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3296154744:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2611217952:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],1677625105:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2301859152:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],843113511:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],400855858:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3850581409:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2816379211:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3898045240:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],1060000209:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],488727124:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ResourceOf",IFCRELASSIGNSTORESOURCE,6,true]],2940368186:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],335055490:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2954562838:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1502416096:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1973544240:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["CoversSpaces",IFCRELCOVERSSPACES,5,true],["CoversElements",IFCRELCOVERSBLDGELEMENTS,5,true]],3495092785:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3961806047:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3426335179:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1335981549:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2635815018:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],479945903:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1599208980:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2063403501:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1945004755:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true]],3040386961:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3041715199:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedIn",IFCRELCONNECTSPORTTOELEMENT,4,true],["ConnectedFrom",IFCRELCONNECTSPORTS,5,true],["ConnectedTo",IFCRELCONNECTSPORTS,4,true]],3205830791:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true],["ServicesFacilities",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],395920057:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],869906466:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3760055223:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2030761528:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3071239417:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["VoidsElements",IFCRELVOIDSELEMENT,5,false]],1077100507:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3376911765:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],663422040:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2417008758:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3277789161:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2142170206:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1534661035:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1217240411:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],712377611:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1658829314:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2814081492:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3747195512:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],484807127:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1209101575:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainsElements",IFCRELCONTAINEDINSPATIALSTRUCTURE,5,true],["ServicedBySystems",IFCRELSERVICESBUILDINGS,5,true],["ReferencesElements",IFCRELREFERENCEDINSPATIALSTRUCTURE,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["BoundedBy",IFCRELSPACEBOUNDARY,4,true]],346874300:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1810631287:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4222183408:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2058353004:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4278956645:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4037862832:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2188021234:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3132237377:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],987401354:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],707683696:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2223149337:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3508470533:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],900683007:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2713699986:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3009204131:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["Positions",IFCRELPOSITIONS,4,true]],3319311131:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2068733104:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4175244083:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2176052936:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2696325953:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],76236018:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],629592764:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1154579445:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["Positions",IFCRELPOSITIONS,4,true]],1638804497:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1437502449:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1073191201:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2078563270:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],234836483:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2474470126:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2182337498:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],144952367:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3694346114:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1383356374:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1687234759:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],310824031:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3612865200:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3171933400:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],738039164:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],655969474:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],90941305:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3290496277:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2262370178:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3024970846:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3283111854:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1232101972:[["LayerAssignment",IFCPRESENTATIONLAYERASSIGNMENT,2,true],["StyledByItem",IFCSTYLEDITEM,0,true]],3798194928:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],979691226:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2572171363:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],2016517767:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3053780830:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1783015770:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1329646415:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],991950508:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1529196076:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3420628829:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1999602285:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1404847402:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],331165859:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],4252922144:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2515109513:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true],["ServicesFacilities",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],385403989:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["SourceOfResultGroup",IFCSTRUCTURALRESULTGROUP,6,true],["LoadGroupFor",IFCSTRUCTURALANALYSISMODEL,7,true]],1621171031:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["AssignedToStructuralItem",IFCRELCONNECTSSTRUCTURALACTIVITY,5,true]],1162798199:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],812556717:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3425753595:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3825984169:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1620046519:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3026737570:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3179687236:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],4292641817:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4207607924:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2391406946:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3512223829:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],4237592921:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3304561284:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2874132201:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],1634111441:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],177149247:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2056796094:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3001207471:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],325726236:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["Positions",IFCRELPOSITIONS,4,true]],277319702:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],753842376:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],4196446775:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],32344328:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3314249567:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1095909175:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2938176219:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],635142910:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3758799889:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1051757585:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4217484030:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3999819293:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],3902619387:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],639361253:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3221913625:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3571504051:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],2272882330:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],578613899:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["Types",IFCRELDEFINESBYTYPE,5,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true]],3460952963:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4136498852:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3640358203:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],4074379575:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3693000487:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1052013943:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],562808652:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["IsGroupedBy",IFCRELASSIGNSTOGROUP,6,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["ServicesBuildings",IFCRELSERVICESBUILDINGS,4,true],["ServicesFacilities",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true]],1062813311:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],342316401:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3518393246:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1360408905:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1904799276:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],862014818:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3310460725:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],24726584:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],264262732:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],402227799:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1003880860:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],3415622556:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],819412036:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],1426591983:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["HasControlElements",IFCRELFLOWCONTROLELEMENTS,5,true]],182646315:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],2680139844:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],1971632696:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true]],2295281155:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],4086658281:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],630975310:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],4288193352:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],3087945054:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]],25142252:[["HasAssignments",IFCRELASSIGNS,4,true],["Nests",IFCRELNESTS,5,true],["IsNestedBy",IFCRELNESTS,4,true],["HasContext",IFCRELDECLARES,5,true],["IsDecomposedBy",IFCRELAGGREGATES,4,true],["Decomposes",IFCRELAGGREGATES,5,true],["HasAssociations",IFCRELASSOCIATES,4,true],["IsDeclaredBy",IFCRELDEFINESBYOBJECT,4,true],["Declares",IFCRELDEFINESBYOBJECT,5,true],["IsTypedBy",IFCRELDEFINESBYTYPE,4,true],["IsDefinedBy",IFCRELDEFINESBYPROPERTIES,4,true],["ReferencedBy",IFCRELASSIGNSTOPRODUCT,6,true],["PositionedRelativeTo",IFCRELPOSITIONS,5,true],["ReferencedInStructures",IFCRELREFERENCEDINSPATIALSTRUCTURE,4,true],["FillsVoids",IFCRELFILLSELEMENT,5,true],["ConnectedTo",IFCRELCONNECTSELEMENTS,5,true],["IsInterferedByElements",IFCRELINTERFERESELEMENTS,5,true],["InterferesElements",IFCRELINTERFERESELEMENTS,4,true],["HasProjections",IFCRELPROJECTSELEMENT,4,true],["HasOpenings",IFCRELVOIDSELEMENT,4,true],["IsConnectionRealization",IFCRELCONNECTSWITHREALIZINGELEMENTS,7,true],["ProvidesBoundaries",IFCRELSPACEBOUNDARY,5,true],["ConnectedFrom",IFCRELCONNECTSELEMENTS,6,true],["ContainedInStructure",IFCRELCONTAINEDINSPATIALSTRUCTURE,4,true],["HasCoverings",IFCRELCOVERSBLDGELEMENTS,4,true],["HasSurfaceFeatures",IFCRELADHERESTOELEMENT,4,true],["HasPorts",IFCRELCONNECTSPORTTOELEMENT,5,true],["AssignedToFlowElement",IFCRELFLOWCONTROLELEMENTS,4,true]]};Constructors[3]={3630933823:function _(ID,a){return new IFC4X3.IfcActorRole(ID,a[0],a[1],a[2]);},618182010:function _(ID,a){return new IFC4X3.IfcAddress(ID,a[0],a[1],a[2]);},2879124712:function _(ID,a){return new IFC4X3.IfcAlignmentParameterSegment(ID,a[0],a[1]);},3633395639:function _(ID,a){return new IFC4X3.IfcAlignmentVerticalSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},639542469:function _(ID,a){return new IFC4X3.IfcApplication(ID,a[0],a[1],a[2],a[3]);},411424972:function _(ID,a){return new IFC4X3.IfcAppliedValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},130549933:function _(ID,a){return new IFC4X3.IfcApproval(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4037036970:function _(ID,a){return new IFC4X3.IfcBoundaryCondition(ID,a[0]);},1560379544:function _(ID,a){return new IFC4X3.IfcBoundaryEdgeCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3367102660:function _(ID,a){return new IFC4X3.IfcBoundaryFaceCondition(ID,a[0],a[1],a[2],a[3]);},1387855156:function _(ID,a){return new IFC4X3.IfcBoundaryNodeCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2069777674:function _(ID,a){return new IFC4X3.IfcBoundaryNodeConditionWarping(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2859738748:function _(ID,_127){return new IFC4X3.IfcConnectionGeometry(ID);},2614616156:function _(ID,a){return new IFC4X3.IfcConnectionPointGeometry(ID,a[0],a[1]);},2732653382:function _(ID,a){return new IFC4X3.IfcConnectionSurfaceGeometry(ID,a[0],a[1]);},775493141:function _(ID,a){return new IFC4X3.IfcConnectionVolumeGeometry(ID,a[0],a[1]);},1959218052:function _(ID,a){return new IFC4X3.IfcConstraint(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1785450214:function _(ID,a){return new IFC4X3.IfcCoordinateOperation(ID,a[0],a[1]);},1466758467:function _(ID,a){return new IFC4X3.IfcCoordinateReferenceSystem(ID,a[0],a[1],a[2],a[3]);},602808272:function _(ID,a){return new IFC4X3.IfcCostValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1765591967:function _(ID,a){return new IFC4X3.IfcDerivedUnit(ID,a[0],a[1],a[2],a[3]);},1045800335:function _(ID,a){return new IFC4X3.IfcDerivedUnitElement(ID,a[0],a[1]);},2949456006:function _(ID,a){return new IFC4X3.IfcDimensionalExponents(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},4294318154:function _(ID,_128){return new IFC4X3.IfcExternalInformation(ID);},3200245327:function _(ID,a){return new IFC4X3.IfcExternalReference(ID,a[0],a[1],a[2]);},2242383968:function _(ID,a){return new IFC4X3.IfcExternallyDefinedHatchStyle(ID,a[0],a[1],a[2]);},1040185647:function _(ID,a){return new IFC4X3.IfcExternallyDefinedSurfaceStyle(ID,a[0],a[1],a[2]);},3548104201:function _(ID,a){return new IFC4X3.IfcExternallyDefinedTextFont(ID,a[0],a[1],a[2]);},852622518:function _(ID,a){return new IFC4X3.IfcGridAxis(ID,a[0],a[1],a[2]);},3020489413:function _(ID,a){return new IFC4X3.IfcIrregularTimeSeriesValue(ID,a[0],a[1]);},2655187982:function _(ID,a){return new IFC4X3.IfcLibraryInformation(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3452421091:function _(ID,a){return new IFC4X3.IfcLibraryReference(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4162380809:function _(ID,a){return new IFC4X3.IfcLightDistributionData(ID,a[0],a[1],a[2]);},1566485204:function _(ID,a){return new IFC4X3.IfcLightIntensityDistribution(ID,a[0],a[1]);},3057273783:function _(ID,a){return new IFC4X3.IfcMapConversion(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1847130766:function _(ID,a){return new IFC4X3.IfcMaterialClassificationRelationship(ID,a[0],a[1]);},760658860:function _(ID,_129){return new IFC4X3.IfcMaterialDefinition(ID);},248100487:function _(ID,a){return new IFC4X3.IfcMaterialLayer(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3303938423:function _(ID,a){return new IFC4X3.IfcMaterialLayerSet(ID,a[0],a[1],a[2]);},1847252529:function _(ID,a){return new IFC4X3.IfcMaterialLayerWithOffsets(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2199411900:function _(ID,a){return new IFC4X3.IfcMaterialList(ID,a[0]);},2235152071:function _(ID,a){return new IFC4X3.IfcMaterialProfile(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},164193824:function _(ID,a){return new IFC4X3.IfcMaterialProfileSet(ID,a[0],a[1],a[2],a[3]);},552965576:function _(ID,a){return new IFC4X3.IfcMaterialProfileWithOffsets(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1507914824:function _(ID,_130){return new IFC4X3.IfcMaterialUsageDefinition(ID);},2597039031:function _(ID,a){return new IFC4X3.IfcMeasureWithUnit(ID,a[0],a[1]);},3368373690:function _(ID,a){return new IFC4X3.IfcMetric(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2706619895:function _(ID,a){return new IFC4X3.IfcMonetaryUnit(ID,a[0]);},1918398963:function _(ID,a){return new IFC4X3.IfcNamedUnit(ID,a[0],a[1]);},3701648758:function _(ID,a){return new IFC4X3.IfcObjectPlacement(ID,a[0]);},2251480897:function _(ID,a){return new IFC4X3.IfcObjective(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4251960020:function _(ID,a){return new IFC4X3.IfcOrganization(ID,a[0],a[1],a[2],a[3],a[4]);},1207048766:function _(ID,a){return new IFC4X3.IfcOwnerHistory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2077209135:function _(ID,a){return new IFC4X3.IfcPerson(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},101040310:function _(ID,a){return new IFC4X3.IfcPersonAndOrganization(ID,a[0],a[1],a[2]);},2483315170:function _(ID,a){return new IFC4X3.IfcPhysicalQuantity(ID,a[0],a[1]);},2226359599:function _(ID,a){return new IFC4X3.IfcPhysicalSimpleQuantity(ID,a[0],a[1],a[2]);},3355820592:function _(ID,a){return new IFC4X3.IfcPostalAddress(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},677532197:function _(ID,_131){return new IFC4X3.IfcPresentationItem(ID);},2022622350:function _(ID,a){return new IFC4X3.IfcPresentationLayerAssignment(ID,a[0],a[1],a[2],a[3]);},1304840413:function _(ID,a){return new IFC4X3.IfcPresentationLayerWithStyle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3119450353:function _(ID,a){return new IFC4X3.IfcPresentationStyle(ID,a[0]);},2095639259:function _(ID,a){return new IFC4X3.IfcProductRepresentation(ID,a[0],a[1],a[2]);},3958567839:function _(ID,a){return new IFC4X3.IfcProfileDef(ID,a[0],a[1]);},3843373140:function _(ID,a){return new IFC4X3.IfcProjectedCRS(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},986844984:function _(ID,_132){return new IFC4X3.IfcPropertyAbstraction(ID);},3710013099:function _(ID,a){return new IFC4X3.IfcPropertyEnumeration(ID,a[0],a[1],a[2]);},2044713172:function _(ID,a){return new IFC4X3.IfcQuantityArea(ID,a[0],a[1],a[2],a[3],a[4]);},2093928680:function _(ID,a){return new IFC4X3.IfcQuantityCount(ID,a[0],a[1],a[2],a[3],a[4]);},931644368:function _(ID,a){return new IFC4X3.IfcQuantityLength(ID,a[0],a[1],a[2],a[3],a[4]);},2691318326:function _(ID,a){return new IFC4X3.IfcQuantityNumber(ID,a[0],a[1],a[2],a[3],a[4]);},3252649465:function _(ID,a){return new IFC4X3.IfcQuantityTime(ID,a[0],a[1],a[2],a[3],a[4]);},2405470396:function _(ID,a){return new IFC4X3.IfcQuantityVolume(ID,a[0],a[1],a[2],a[3],a[4]);},825690147:function _(ID,a){return new IFC4X3.IfcQuantityWeight(ID,a[0],a[1],a[2],a[3],a[4]);},3915482550:function _(ID,a){return new IFC4X3.IfcRecurrencePattern(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2433181523:function _(ID,a){return new IFC4X3.IfcReference(ID,a[0],a[1],a[2],a[3],a[4]);},1076942058:function _(ID,a){return new IFC4X3.IfcRepresentation(ID,a[0],a[1],a[2],a[3]);},3377609919:function _(ID,a){return new IFC4X3.IfcRepresentationContext(ID,a[0],a[1]);},3008791417:function _(ID,_133){return new IFC4X3.IfcRepresentationItem(ID);},1660063152:function _(ID,a){return new IFC4X3.IfcRepresentationMap(ID,a[0],a[1]);},2439245199:function _(ID,a){return new IFC4X3.IfcResourceLevelRelationship(ID,a[0],a[1]);},2341007311:function _(ID,a){return new IFC4X3.IfcRoot(ID,a[0],a[1],a[2],a[3]);},448429030:function _(ID,a){return new IFC4X3.IfcSIUnit(ID,a[0],a[1],a[2],a[3]);},1054537805:function _(ID,a){return new IFC4X3.IfcSchedulingTime(ID,a[0],a[1],a[2]);},867548509:function _(ID,a){return new IFC4X3.IfcShapeAspect(ID,a[0],a[1],a[2],a[3],a[4]);},3982875396:function _(ID,a){return new IFC4X3.IfcShapeModel(ID,a[0],a[1],a[2],a[3]);},4240577450:function _(ID,a){return new IFC4X3.IfcShapeRepresentation(ID,a[0],a[1],a[2],a[3]);},2273995522:function _(ID,a){return new IFC4X3.IfcStructuralConnectionCondition(ID,a[0]);},2162789131:function _(ID,a){return new IFC4X3.IfcStructuralLoad(ID,a[0]);},3478079324:function _(ID,a){return new IFC4X3.IfcStructuralLoadConfiguration(ID,a[0],a[1],a[2]);},609421318:function _(ID,a){return new IFC4X3.IfcStructuralLoadOrResult(ID,a[0]);},2525727697:function _(ID,a){return new IFC4X3.IfcStructuralLoadStatic(ID,a[0]);},3408363356:function _(ID,a){return new IFC4X3.IfcStructuralLoadTemperature(ID,a[0],a[1],a[2],a[3]);},2830218821:function _(ID,a){return new IFC4X3.IfcStyleModel(ID,a[0],a[1],a[2],a[3]);},3958052878:function _(ID,a){return new IFC4X3.IfcStyledItem(ID,a[0],a[1],a[2]);},3049322572:function _(ID,a){return new IFC4X3.IfcStyledRepresentation(ID,a[0],a[1],a[2],a[3]);},2934153892:function _(ID,a){return new IFC4X3.IfcSurfaceReinforcementArea(ID,a[0],a[1],a[2],a[3]);},1300840506:function _(ID,a){return new IFC4X3.IfcSurfaceStyle(ID,a[0],a[1],a[2]);},3303107099:function _(ID,a){return new IFC4X3.IfcSurfaceStyleLighting(ID,a[0],a[1],a[2],a[3]);},1607154358:function _(ID,a){return new IFC4X3.IfcSurfaceStyleRefraction(ID,a[0],a[1]);},846575682:function _(ID,a){return new IFC4X3.IfcSurfaceStyleShading(ID,a[0],a[1]);},1351298697:function _(ID,a){return new IFC4X3.IfcSurfaceStyleWithTextures(ID,a[0]);},626085974:function _(ID,a){return new IFC4X3.IfcSurfaceTexture(ID,a[0],a[1],a[2],a[3],a[4]);},985171141:function _(ID,a){return new IFC4X3.IfcTable(ID,a[0],a[1],a[2]);},2043862942:function _(ID,a){return new IFC4X3.IfcTableColumn(ID,a[0],a[1],a[2],a[3],a[4]);},531007025:function _(ID,a){return new IFC4X3.IfcTableRow(ID,a[0],a[1]);},1549132990:function _(ID,a){return new IFC4X3.IfcTaskTime(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19]);},2771591690:function _(ID,a){return new IFC4X3.IfcTaskTimeRecurring(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19],a[20]);},912023232:function _(ID,a){return new IFC4X3.IfcTelecomAddress(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1447204868:function _(ID,a){return new IFC4X3.IfcTextStyle(ID,a[0],a[1],a[2],a[3],a[4]);},2636378356:function _(ID,a){return new IFC4X3.IfcTextStyleForDefinedFont(ID,a[0],a[1]);},1640371178:function _(ID,a){return new IFC4X3.IfcTextStyleTextModel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},280115917:function _(ID,a){return new IFC4X3.IfcTextureCoordinate(ID,a[0]);},1742049831:function _(ID,a){return new IFC4X3.IfcTextureCoordinateGenerator(ID,a[0],a[1],a[2]);},222769930:function _(ID,a){return new IFC4X3.IfcTextureCoordinateIndices(ID,a[0],a[1]);},1010789467:function _(ID,a){return new IFC4X3.IfcTextureCoordinateIndicesWithVoids(ID,a[0],a[1],a[2]);},2552916305:function _(ID,a){return new IFC4X3.IfcTextureMap(ID,a[0],a[1],a[2]);},1210645708:function _(ID,a){return new IFC4X3.IfcTextureVertex(ID,a[0]);},3611470254:function _(ID,a){return new IFC4X3.IfcTextureVertexList(ID,a[0]);},1199560280:function _(ID,a){return new IFC4X3.IfcTimePeriod(ID,a[0],a[1]);},3101149627:function _(ID,a){return new IFC4X3.IfcTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},581633288:function _(ID,a){return new IFC4X3.IfcTimeSeriesValue(ID,a[0]);},1377556343:function _(ID,_134){return new IFC4X3.IfcTopologicalRepresentationItem(ID);},1735638870:function _(ID,a){return new IFC4X3.IfcTopologyRepresentation(ID,a[0],a[1],a[2],a[3]);},180925521:function _(ID,a){return new IFC4X3.IfcUnitAssignment(ID,a[0]);},2799835756:function _(ID,_135){return new IFC4X3.IfcVertex(ID);},1907098498:function _(ID,a){return new IFC4X3.IfcVertexPoint(ID,a[0]);},891718957:function _(ID,a){return new IFC4X3.IfcVirtualGridIntersection(ID,a[0],a[1]);},1236880293:function _(ID,a){return new IFC4X3.IfcWorkTime(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3752311538:function _(ID,a){return new IFC4X3.IfcAlignmentCantSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},536804194:function _(ID,a){return new IFC4X3.IfcAlignmentHorizontalSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3869604511:function _(ID,a){return new IFC4X3.IfcApprovalRelationship(ID,a[0],a[1],a[2],a[3]);},3798115385:function _(ID,a){return new IFC4X3.IfcArbitraryClosedProfileDef(ID,a[0],a[1],a[2]);},1310608509:function _(ID,a){return new IFC4X3.IfcArbitraryOpenProfileDef(ID,a[0],a[1],a[2]);},2705031697:function _(ID,a){return new IFC4X3.IfcArbitraryProfileDefWithVoids(ID,a[0],a[1],a[2],a[3]);},616511568:function _(ID,a){return new IFC4X3.IfcBlobTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3150382593:function _(ID,a){return new IFC4X3.IfcCenterLineProfileDef(ID,a[0],a[1],a[2],a[3]);},747523909:function _(ID,a){return new IFC4X3.IfcClassification(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},647927063:function _(ID,a){return new IFC4X3.IfcClassificationReference(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3285139300:function _(ID,a){return new IFC4X3.IfcColourRgbList(ID,a[0]);},3264961684:function _(ID,a){return new IFC4X3.IfcColourSpecification(ID,a[0]);},1485152156:function _(ID,a){return new IFC4X3.IfcCompositeProfileDef(ID,a[0],a[1],a[2],a[3]);},370225590:function _(ID,a){return new IFC4X3.IfcConnectedFaceSet(ID,a[0]);},1981873012:function _(ID,a){return new IFC4X3.IfcConnectionCurveGeometry(ID,a[0],a[1]);},45288368:function _(ID,a){return new IFC4X3.IfcConnectionPointEccentricity(ID,a[0],a[1],a[2],a[3],a[4]);},3050246964:function _(ID,a){return new IFC4X3.IfcContextDependentUnit(ID,a[0],a[1],a[2]);},2889183280:function _(ID,a){return new IFC4X3.IfcConversionBasedUnit(ID,a[0],a[1],a[2],a[3]);},2713554722:function _(ID,a){return new IFC4X3.IfcConversionBasedUnitWithOffset(ID,a[0],a[1],a[2],a[3],a[4]);},539742890:function _(ID,a){return new IFC4X3.IfcCurrencyRelationship(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3800577675:function _(ID,a){return new IFC4X3.IfcCurveStyle(ID,a[0],a[1],a[2],a[3],a[4]);},1105321065:function _(ID,a){return new IFC4X3.IfcCurveStyleFont(ID,a[0],a[1]);},2367409068:function _(ID,a){return new IFC4X3.IfcCurveStyleFontAndScaling(ID,a[0],a[1],a[2]);},3510044353:function _(ID,a){return new IFC4X3.IfcCurveStyleFontPattern(ID,a[0],a[1]);},3632507154:function _(ID,a){return new IFC4X3.IfcDerivedProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},1154170062:function _(ID,a){return new IFC4X3.IfcDocumentInformation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},770865208:function _(ID,a){return new IFC4X3.IfcDocumentInformationRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},3732053477:function _(ID,a){return new IFC4X3.IfcDocumentReference(ID,a[0],a[1],a[2],a[3],a[4]);},3900360178:function _(ID,a){return new IFC4X3.IfcEdge(ID,a[0],a[1]);},476780140:function _(ID,a){return new IFC4X3.IfcEdgeCurve(ID,a[0],a[1],a[2],a[3]);},211053100:function _(ID,a){return new IFC4X3.IfcEventTime(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},297599258:function _(ID,a){return new IFC4X3.IfcExtendedProperties(ID,a[0],a[1],a[2]);},1437805879:function _(ID,a){return new IFC4X3.IfcExternalReferenceRelationship(ID,a[0],a[1],a[2],a[3]);},2556980723:function _(ID,a){return new IFC4X3.IfcFace(ID,a[0]);},1809719519:function _(ID,a){return new IFC4X3.IfcFaceBound(ID,a[0],a[1]);},803316827:function _(ID,a){return new IFC4X3.IfcFaceOuterBound(ID,a[0],a[1]);},3008276851:function _(ID,a){return new IFC4X3.IfcFaceSurface(ID,a[0],a[1],a[2]);},4219587988:function _(ID,a){return new IFC4X3.IfcFailureConnectionCondition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},738692330:function _(ID,a){return new IFC4X3.IfcFillAreaStyle(ID,a[0],a[1],a[2]);},3448662350:function _(ID,a){return new IFC4X3.IfcGeometricRepresentationContext(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2453401579:function _(ID,_136){return new IFC4X3.IfcGeometricRepresentationItem(ID);},4142052618:function _(ID,a){return new IFC4X3.IfcGeometricRepresentationSubContext(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3590301190:function _(ID,a){return new IFC4X3.IfcGeometricSet(ID,a[0]);},178086475:function _(ID,a){return new IFC4X3.IfcGridPlacement(ID,a[0],a[1],a[2]);},812098782:function _(ID,a){return new IFC4X3.IfcHalfSpaceSolid(ID,a[0],a[1]);},3905492369:function _(ID,a){return new IFC4X3.IfcImageTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3570813810:function _(ID,a){return new IFC4X3.IfcIndexedColourMap(ID,a[0],a[1],a[2],a[3]);},1437953363:function _(ID,a){return new IFC4X3.IfcIndexedTextureMap(ID,a[0],a[1],a[2]);},2133299955:function _(ID,a){return new IFC4X3.IfcIndexedTriangleTextureMap(ID,a[0],a[1],a[2],a[3]);},3741457305:function _(ID,a){return new IFC4X3.IfcIrregularTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1585845231:function _(ID,a){return new IFC4X3.IfcLagTime(ID,a[0],a[1],a[2],a[3],a[4]);},1402838566:function _(ID,a){return new IFC4X3.IfcLightSource(ID,a[0],a[1],a[2],a[3]);},125510826:function _(ID,a){return new IFC4X3.IfcLightSourceAmbient(ID,a[0],a[1],a[2],a[3]);},2604431987:function _(ID,a){return new IFC4X3.IfcLightSourceDirectional(ID,a[0],a[1],a[2],a[3],a[4]);},4266656042:function _(ID,a){return new IFC4X3.IfcLightSourceGoniometric(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1520743889:function _(ID,a){return new IFC4X3.IfcLightSourcePositional(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3422422726:function _(ID,a){return new IFC4X3.IfcLightSourceSpot(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},388784114:function _(ID,a){return new IFC4X3.IfcLinearPlacement(ID,a[0],a[1],a[2]);},2624227202:function _(ID,a){return new IFC4X3.IfcLocalPlacement(ID,a[0],a[1]);},1008929658:function _(ID,_137){return new IFC4X3.IfcLoop(ID);},2347385850:function _(ID,a){return new IFC4X3.IfcMappedItem(ID,a[0],a[1]);},1838606355:function _(ID,a){return new IFC4X3.IfcMaterial(ID,a[0],a[1],a[2]);},3708119e3:function _(ID,a){return new IFC4X3.IfcMaterialConstituent(ID,a[0],a[1],a[2],a[3],a[4]);},2852063980:function _(ID,a){return new IFC4X3.IfcMaterialConstituentSet(ID,a[0],a[1],a[2]);},2022407955:function _(ID,a){return new IFC4X3.IfcMaterialDefinitionRepresentation(ID,a[0],a[1],a[2],a[3]);},1303795690:function _(ID,a){return new IFC4X3.IfcMaterialLayerSetUsage(ID,a[0],a[1],a[2],a[3],a[4]);},3079605661:function _(ID,a){return new IFC4X3.IfcMaterialProfileSetUsage(ID,a[0],a[1],a[2]);},3404854881:function _(ID,a){return new IFC4X3.IfcMaterialProfileSetUsageTapering(ID,a[0],a[1],a[2],a[3],a[4]);},3265635763:function _(ID,a){return new IFC4X3.IfcMaterialProperties(ID,a[0],a[1],a[2],a[3]);},853536259:function _(ID,a){return new IFC4X3.IfcMaterialRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},2998442950:function _(ID,a){return new IFC4X3.IfcMirroredProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},219451334:function _(ID,a){return new IFC4X3.IfcObjectDefinition(ID,a[0],a[1],a[2],a[3]);},182550632:function _(ID,a){return new IFC4X3.IfcOpenCrossProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2665983363:function _(ID,a){return new IFC4X3.IfcOpenShell(ID,a[0]);},1411181986:function _(ID,a){return new IFC4X3.IfcOrganizationRelationship(ID,a[0],a[1],a[2],a[3]);},1029017970:function _(ID,a){return new IFC4X3.IfcOrientedEdge(ID,a[0],a[1],a[2]);},2529465313:function _(ID,a){return new IFC4X3.IfcParameterizedProfileDef(ID,a[0],a[1],a[2]);},2519244187:function _(ID,a){return new IFC4X3.IfcPath(ID,a[0]);},3021840470:function _(ID,a){return new IFC4X3.IfcPhysicalComplexQuantity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},597895409:function _(ID,a){return new IFC4X3.IfcPixelTexture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2004835150:function _(ID,a){return new IFC4X3.IfcPlacement(ID,a[0]);},1663979128:function _(ID,a){return new IFC4X3.IfcPlanarExtent(ID,a[0],a[1]);},2067069095:function _(ID,_138){return new IFC4X3.IfcPoint(ID);},2165702409:function _(ID,a){return new IFC4X3.IfcPointByDistanceExpression(ID,a[0],a[1],a[2],a[3],a[4]);},4022376103:function _(ID,a){return new IFC4X3.IfcPointOnCurve(ID,a[0],a[1]);},1423911732:function _(ID,a){return new IFC4X3.IfcPointOnSurface(ID,a[0],a[1],a[2]);},2924175390:function _(ID,a){return new IFC4X3.IfcPolyLoop(ID,a[0]);},2775532180:function _(ID,a){return new IFC4X3.IfcPolygonalBoundedHalfSpace(ID,a[0],a[1],a[2],a[3]);},3727388367:function _(ID,a){return new IFC4X3.IfcPreDefinedItem(ID,a[0]);},3778827333:function _(ID,_139){return new IFC4X3.IfcPreDefinedProperties(ID);},1775413392:function _(ID,a){return new IFC4X3.IfcPreDefinedTextFont(ID,a[0]);},673634403:function _(ID,a){return new IFC4X3.IfcProductDefinitionShape(ID,a[0],a[1],a[2]);},2802850158:function _(ID,a){return new IFC4X3.IfcProfileProperties(ID,a[0],a[1],a[2],a[3]);},2598011224:function _(ID,a){return new IFC4X3.IfcProperty(ID,a[0],a[1]);},1680319473:function _(ID,a){return new IFC4X3.IfcPropertyDefinition(ID,a[0],a[1],a[2],a[3]);},148025276:function _(ID,a){return new IFC4X3.IfcPropertyDependencyRelationship(ID,a[0],a[1],a[2],a[3],a[4]);},3357820518:function _(ID,a){return new IFC4X3.IfcPropertySetDefinition(ID,a[0],a[1],a[2],a[3]);},1482703590:function _(ID,a){return new IFC4X3.IfcPropertyTemplateDefinition(ID,a[0],a[1],a[2],a[3]);},2090586900:function _(ID,a){return new IFC4X3.IfcQuantitySet(ID,a[0],a[1],a[2],a[3]);},3615266464:function _(ID,a){return new IFC4X3.IfcRectangleProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},3413951693:function _(ID,a){return new IFC4X3.IfcRegularTimeSeries(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1580146022:function _(ID,a){return new IFC4X3.IfcReinforcementBarProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},478536968:function _(ID,a){return new IFC4X3.IfcRelationship(ID,a[0],a[1],a[2],a[3]);},2943643501:function _(ID,a){return new IFC4X3.IfcResourceApprovalRelationship(ID,a[0],a[1],a[2],a[3]);},1608871552:function _(ID,a){return new IFC4X3.IfcResourceConstraintRelationship(ID,a[0],a[1],a[2],a[3]);},1042787934:function _(ID,a){return new IFC4X3.IfcResourceTime(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17]);},2778083089:function _(ID,a){return new IFC4X3.IfcRoundedRectangleProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2042790032:function _(ID,a){return new IFC4X3.IfcSectionProperties(ID,a[0],a[1],a[2]);},4165799628:function _(ID,a){return new IFC4X3.IfcSectionReinforcementProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1509187699:function _(ID,a){return new IFC4X3.IfcSectionedSpine(ID,a[0],a[1],a[2]);},823603102:function _(ID,a){return new IFC4X3.IfcSegment(ID,a[0]);},4124623270:function _(ID,a){return new IFC4X3.IfcShellBasedSurfaceModel(ID,a[0]);},3692461612:function _(ID,a){return new IFC4X3.IfcSimpleProperty(ID,a[0],a[1]);},2609359061:function _(ID,a){return new IFC4X3.IfcSlippageConnectionCondition(ID,a[0],a[1],a[2],a[3]);},723233188:function _(ID,_140){return new IFC4X3.IfcSolidModel(ID);},1595516126:function _(ID,a){return new IFC4X3.IfcStructuralLoadLinearForce(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2668620305:function _(ID,a){return new IFC4X3.IfcStructuralLoadPlanarForce(ID,a[0],a[1],a[2],a[3]);},2473145415:function _(ID,a){return new IFC4X3.IfcStructuralLoadSingleDisplacement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1973038258:function _(ID,a){return new IFC4X3.IfcStructuralLoadSingleDisplacementDistortion(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1597423693:function _(ID,a){return new IFC4X3.IfcStructuralLoadSingleForce(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1190533807:function _(ID,a){return new IFC4X3.IfcStructuralLoadSingleForceWarping(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2233826070:function _(ID,a){return new IFC4X3.IfcSubedge(ID,a[0],a[1],a[2]);},2513912981:function _(ID,_141){return new IFC4X3.IfcSurface(ID);},1878645084:function _(ID,a){return new IFC4X3.IfcSurfaceStyleRendering(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2247615214:function _(ID,a){return new IFC4X3.IfcSweptAreaSolid(ID,a[0],a[1]);},1260650574:function _(ID,a){return new IFC4X3.IfcSweptDiskSolid(ID,a[0],a[1],a[2],a[3],a[4]);},1096409881:function _(ID,a){return new IFC4X3.IfcSweptDiskSolidPolygonal(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},230924584:function _(ID,a){return new IFC4X3.IfcSweptSurface(ID,a[0],a[1]);},3071757647:function _(ID,a){return new IFC4X3.IfcTShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},901063453:function _(ID,_142){return new IFC4X3.IfcTessellatedItem(ID);},4282788508:function _(ID,a){return new IFC4X3.IfcTextLiteral(ID,a[0],a[1],a[2]);},3124975700:function _(ID,a){return new IFC4X3.IfcTextLiteralWithExtent(ID,a[0],a[1],a[2],a[3],a[4]);},1983826977:function _(ID,a){return new IFC4X3.IfcTextStyleFontModel(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2715220739:function _(ID,a){return new IFC4X3.IfcTrapeziumProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1628702193:function _(ID,a){return new IFC4X3.IfcTypeObject(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3736923433:function _(ID,a){return new IFC4X3.IfcTypeProcess(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2347495698:function _(ID,a){return new IFC4X3.IfcTypeProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3698973494:function _(ID,a){return new IFC4X3.IfcTypeResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},427810014:function _(ID,a){return new IFC4X3.IfcUShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1417489154:function _(ID,a){return new IFC4X3.IfcVector(ID,a[0],a[1]);},2759199220:function _(ID,a){return new IFC4X3.IfcVertexLoop(ID,a[0]);},2543172580:function _(ID,a){return new IFC4X3.IfcZShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3406155212:function _(ID,a){return new IFC4X3.IfcAdvancedFace(ID,a[0],a[1],a[2]);},669184980:function _(ID,a){return new IFC4X3.IfcAnnotationFillArea(ID,a[0],a[1]);},3207858831:function _(ID,a){return new IFC4X3.IfcAsymmetricIShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14]);},4261334040:function _(ID,a){return new IFC4X3.IfcAxis1Placement(ID,a[0],a[1]);},3125803723:function _(ID,a){return new IFC4X3.IfcAxis2Placement2D(ID,a[0],a[1]);},2740243338:function _(ID,a){return new IFC4X3.IfcAxis2Placement3D(ID,a[0],a[1],a[2]);},3425423356:function _(ID,a){return new IFC4X3.IfcAxis2PlacementLinear(ID,a[0],a[1],a[2]);},2736907675:function _(ID,a){return new IFC4X3.IfcBooleanResult(ID,a[0],a[1],a[2]);},4182860854:function _(ID,_143){return new IFC4X3.IfcBoundedSurface(ID);},2581212453:function _(ID,a){return new IFC4X3.IfcBoundingBox(ID,a[0],a[1],a[2],a[3]);},2713105998:function _(ID,a){return new IFC4X3.IfcBoxedHalfSpace(ID,a[0],a[1],a[2]);},2898889636:function _(ID,a){return new IFC4X3.IfcCShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1123145078:function _(ID,a){return new IFC4X3.IfcCartesianPoint(ID,a[0]);},574549367:function _(ID,_144){return new IFC4X3.IfcCartesianPointList(ID);},1675464909:function _(ID,a){return new IFC4X3.IfcCartesianPointList2D(ID,a[0],a[1]);},2059837836:function _(ID,a){return new IFC4X3.IfcCartesianPointList3D(ID,a[0],a[1]);},59481748:function _(ID,a){return new IFC4X3.IfcCartesianTransformationOperator(ID,a[0],a[1],a[2],a[3]);},3749851601:function _(ID,a){return new IFC4X3.IfcCartesianTransformationOperator2D(ID,a[0],a[1],a[2],a[3]);},3486308946:function _(ID,a){return new IFC4X3.IfcCartesianTransformationOperator2DnonUniform(ID,a[0],a[1],a[2],a[3],a[4]);},3331915920:function _(ID,a){return new IFC4X3.IfcCartesianTransformationOperator3D(ID,a[0],a[1],a[2],a[3],a[4]);},1416205885:function _(ID,a){return new IFC4X3.IfcCartesianTransformationOperator3DnonUniform(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1383045692:function _(ID,a){return new IFC4X3.IfcCircleProfileDef(ID,a[0],a[1],a[2],a[3]);},2205249479:function _(ID,a){return new IFC4X3.IfcClosedShell(ID,a[0]);},776857604:function _(ID,a){return new IFC4X3.IfcColourRgb(ID,a[0],a[1],a[2],a[3]);},2542286263:function _(ID,a){return new IFC4X3.IfcComplexProperty(ID,a[0],a[1],a[2],a[3]);},2485617015:function _(ID,a){return new IFC4X3.IfcCompositeCurveSegment(ID,a[0],a[1],a[2]);},2574617495:function _(ID,a){return new IFC4X3.IfcConstructionResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3419103109:function _(ID,a){return new IFC4X3.IfcContext(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1815067380:function _(ID,a){return new IFC4X3.IfcCrewResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2506170314:function _(ID,a){return new IFC4X3.IfcCsgPrimitive3D(ID,a[0]);},2147822146:function _(ID,a){return new IFC4X3.IfcCsgSolid(ID,a[0]);},2601014836:function _(ID,_145){return new IFC4X3.IfcCurve(ID);},2827736869:function _(ID,a){return new IFC4X3.IfcCurveBoundedPlane(ID,a[0],a[1],a[2]);},2629017746:function _(ID,a){return new IFC4X3.IfcCurveBoundedSurface(ID,a[0],a[1],a[2]);},4212018352:function _(ID,a){return new IFC4X3.IfcCurveSegment(ID,a[0],a[1],a[2],a[3],a[4]);},32440307:function _(ID,a){return new IFC4X3.IfcDirection(ID,a[0]);},593015953:function _(ID,a){return new IFC4X3.IfcDirectrixCurveSweptAreaSolid(ID,a[0],a[1],a[2],a[3],a[4]);},1472233963:function _(ID,a){return new IFC4X3.IfcEdgeLoop(ID,a[0]);},1883228015:function _(ID,a){return new IFC4X3.IfcElementQuantity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},339256511:function _(ID,a){return new IFC4X3.IfcElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2777663545:function _(ID,a){return new IFC4X3.IfcElementarySurface(ID,a[0]);},2835456948:function _(ID,a){return new IFC4X3.IfcEllipseProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},4024345920:function _(ID,a){return new IFC4X3.IfcEventType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},477187591:function _(ID,a){return new IFC4X3.IfcExtrudedAreaSolid(ID,a[0],a[1],a[2],a[3]);},2804161546:function _(ID,a){return new IFC4X3.IfcExtrudedAreaSolidTapered(ID,a[0],a[1],a[2],a[3],a[4]);},2047409740:function _(ID,a){return new IFC4X3.IfcFaceBasedSurfaceModel(ID,a[0]);},374418227:function _(ID,a){return new IFC4X3.IfcFillAreaStyleHatching(ID,a[0],a[1],a[2],a[3],a[4]);},315944413:function _(ID,a){return new IFC4X3.IfcFillAreaStyleTiles(ID,a[0],a[1],a[2]);},2652556860:function _(ID,a){return new IFC4X3.IfcFixedReferenceSweptAreaSolid(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4238390223:function _(ID,a){return new IFC4X3.IfcFurnishingElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1268542332:function _(ID,a){return new IFC4X3.IfcFurnitureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4095422895:function _(ID,a){return new IFC4X3.IfcGeographicElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},987898635:function _(ID,a){return new IFC4X3.IfcGeometricCurveSet(ID,a[0]);},1484403080:function _(ID,a){return new IFC4X3.IfcIShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},178912537:function _(ID,a){return new IFC4X3.IfcIndexedPolygonalFace(ID,a[0]);},2294589976:function _(ID,a){return new IFC4X3.IfcIndexedPolygonalFaceWithVoids(ID,a[0],a[1]);},3465909080:function _(ID,a){return new IFC4X3.IfcIndexedPolygonalTextureMap(ID,a[0],a[1],a[2],a[3]);},572779678:function _(ID,a){return new IFC4X3.IfcLShapeProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},428585644:function _(ID,a){return new IFC4X3.IfcLaborResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1281925730:function _(ID,a){return new IFC4X3.IfcLine(ID,a[0],a[1]);},1425443689:function _(ID,a){return new IFC4X3.IfcManifoldSolidBrep(ID,a[0]);},3888040117:function _(ID,a){return new IFC4X3.IfcObject(ID,a[0],a[1],a[2],a[3],a[4]);},590820931:function _(ID,a){return new IFC4X3.IfcOffsetCurve(ID,a[0]);},3388369263:function _(ID,a){return new IFC4X3.IfcOffsetCurve2D(ID,a[0],a[1],a[2]);},3505215534:function _(ID,a){return new IFC4X3.IfcOffsetCurve3D(ID,a[0],a[1],a[2],a[3]);},2485787929:function _(ID,a){return new IFC4X3.IfcOffsetCurveByDistances(ID,a[0],a[1],a[2]);},1682466193:function _(ID,a){return new IFC4X3.IfcPcurve(ID,a[0],a[1]);},603570806:function _(ID,a){return new IFC4X3.IfcPlanarBox(ID,a[0],a[1],a[2]);},220341763:function _(ID,a){return new IFC4X3.IfcPlane(ID,a[0]);},3381221214:function _(ID,a){return new IFC4X3.IfcPolynomialCurve(ID,a[0],a[1],a[2],a[3]);},759155922:function _(ID,a){return new IFC4X3.IfcPreDefinedColour(ID,a[0]);},2559016684:function _(ID,a){return new IFC4X3.IfcPreDefinedCurveFont(ID,a[0]);},3967405729:function _(ID,a){return new IFC4X3.IfcPreDefinedPropertySet(ID,a[0],a[1],a[2],a[3]);},569719735:function _(ID,a){return new IFC4X3.IfcProcedureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2945172077:function _(ID,a){return new IFC4X3.IfcProcess(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},4208778838:function _(ID,a){return new IFC4X3.IfcProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},103090709:function _(ID,a){return new IFC4X3.IfcProject(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},653396225:function _(ID,a){return new IFC4X3.IfcProjectLibrary(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},871118103:function _(ID,a){return new IFC4X3.IfcPropertyBoundedValue(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4166981789:function _(ID,a){return new IFC4X3.IfcPropertyEnumeratedValue(ID,a[0],a[1],a[2],a[3]);},2752243245:function _(ID,a){return new IFC4X3.IfcPropertyListValue(ID,a[0],a[1],a[2],a[3]);},941946838:function _(ID,a){return new IFC4X3.IfcPropertyReferenceValue(ID,a[0],a[1],a[2],a[3]);},1451395588:function _(ID,a){return new IFC4X3.IfcPropertySet(ID,a[0],a[1],a[2],a[3],a[4]);},492091185:function _(ID,a){return new IFC4X3.IfcPropertySetTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3650150729:function _(ID,a){return new IFC4X3.IfcPropertySingleValue(ID,a[0],a[1],a[2],a[3]);},110355661:function _(ID,a){return new IFC4X3.IfcPropertyTableValue(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3521284610:function _(ID,a){return new IFC4X3.IfcPropertyTemplate(ID,a[0],a[1],a[2],a[3]);},2770003689:function _(ID,a){return new IFC4X3.IfcRectangleHollowProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2798486643:function _(ID,a){return new IFC4X3.IfcRectangularPyramid(ID,a[0],a[1],a[2],a[3]);},3454111270:function _(ID,a){return new IFC4X3.IfcRectangularTrimmedSurface(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3765753017:function _(ID,a){return new IFC4X3.IfcReinforcementDefinitionProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3939117080:function _(ID,a){return new IFC4X3.IfcRelAssigns(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1683148259:function _(ID,a){return new IFC4X3.IfcRelAssignsToActor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2495723537:function _(ID,a){return new IFC4X3.IfcRelAssignsToControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1307041759:function _(ID,a){return new IFC4X3.IfcRelAssignsToGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1027710054:function _(ID,a){return new IFC4X3.IfcRelAssignsToGroupByFactor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4278684876:function _(ID,a){return new IFC4X3.IfcRelAssignsToProcess(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2857406711:function _(ID,a){return new IFC4X3.IfcRelAssignsToProduct(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},205026976:function _(ID,a){return new IFC4X3.IfcRelAssignsToResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1865459582:function _(ID,a){return new IFC4X3.IfcRelAssociates(ID,a[0],a[1],a[2],a[3],a[4]);},4095574036:function _(ID,a){return new IFC4X3.IfcRelAssociatesApproval(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},919958153:function _(ID,a){return new IFC4X3.IfcRelAssociatesClassification(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2728634034:function _(ID,a){return new IFC4X3.IfcRelAssociatesConstraint(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},982818633:function _(ID,a){return new IFC4X3.IfcRelAssociatesDocument(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3840914261:function _(ID,a){return new IFC4X3.IfcRelAssociatesLibrary(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2655215786:function _(ID,a){return new IFC4X3.IfcRelAssociatesMaterial(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1033248425:function _(ID,a){return new IFC4X3.IfcRelAssociatesProfileDef(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},826625072:function _(ID,a){return new IFC4X3.IfcRelConnects(ID,a[0],a[1],a[2],a[3]);},1204542856:function _(ID,a){return new IFC4X3.IfcRelConnectsElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3945020480:function _(ID,a){return new IFC4X3.IfcRelConnectsPathElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4201705270:function _(ID,a){return new IFC4X3.IfcRelConnectsPortToElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3190031847:function _(ID,a){return new IFC4X3.IfcRelConnectsPorts(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2127690289:function _(ID,a){return new IFC4X3.IfcRelConnectsStructuralActivity(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1638771189:function _(ID,a){return new IFC4X3.IfcRelConnectsStructuralMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},504942748:function _(ID,a){return new IFC4X3.IfcRelConnectsWithEccentricity(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3678494232:function _(ID,a){return new IFC4X3.IfcRelConnectsWithRealizingElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3242617779:function _(ID,a){return new IFC4X3.IfcRelContainedInSpatialStructure(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},886880790:function _(ID,a){return new IFC4X3.IfcRelCoversBldgElements(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2802773753:function _(ID,a){return new IFC4X3.IfcRelCoversSpaces(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2565941209:function _(ID,a){return new IFC4X3.IfcRelDeclares(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2551354335:function _(ID,a){return new IFC4X3.IfcRelDecomposes(ID,a[0],a[1],a[2],a[3]);},693640335:function _(ID,a){return new IFC4X3.IfcRelDefines(ID,a[0],a[1],a[2],a[3]);},1462361463:function _(ID,a){return new IFC4X3.IfcRelDefinesByObject(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4186316022:function _(ID,a){return new IFC4X3.IfcRelDefinesByProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},307848117:function _(ID,a){return new IFC4X3.IfcRelDefinesByTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},781010003:function _(ID,a){return new IFC4X3.IfcRelDefinesByType(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3940055652:function _(ID,a){return new IFC4X3.IfcRelFillsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},279856033:function _(ID,a){return new IFC4X3.IfcRelFlowControlElements(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},427948657:function _(ID,a){return new IFC4X3.IfcRelInterferesElements(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3268803585:function _(ID,a){return new IFC4X3.IfcRelNests(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1441486842:function _(ID,a){return new IFC4X3.IfcRelPositions(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},750771296:function _(ID,a){return new IFC4X3.IfcRelProjectsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1245217292:function _(ID,a){return new IFC4X3.IfcRelReferencedInSpatialStructure(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},4122056220:function _(ID,a){return new IFC4X3.IfcRelSequence(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},366585022:function _(ID,a){return new IFC4X3.IfcRelServicesBuildings(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3451746338:function _(ID,a){return new IFC4X3.IfcRelSpaceBoundary(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3523091289:function _(ID,a){return new IFC4X3.IfcRelSpaceBoundary1stLevel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1521410863:function _(ID,a){return new IFC4X3.IfcRelSpaceBoundary2ndLevel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1401173127:function _(ID,a){return new IFC4X3.IfcRelVoidsElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},816062949:function _(ID,a){return new IFC4X3.IfcReparametrisedCompositeCurveSegment(ID,a[0],a[1],a[2],a[3]);},2914609552:function _(ID,a){return new IFC4X3.IfcResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1856042241:function _(ID,a){return new IFC4X3.IfcRevolvedAreaSolid(ID,a[0],a[1],a[2],a[3]);},3243963512:function _(ID,a){return new IFC4X3.IfcRevolvedAreaSolidTapered(ID,a[0],a[1],a[2],a[3],a[4]);},4158566097:function _(ID,a){return new IFC4X3.IfcRightCircularCone(ID,a[0],a[1],a[2]);},3626867408:function _(ID,a){return new IFC4X3.IfcRightCircularCylinder(ID,a[0],a[1],a[2]);},1862484736:function _(ID,a){return new IFC4X3.IfcSectionedSolid(ID,a[0],a[1]);},1290935644:function _(ID,a){return new IFC4X3.IfcSectionedSolidHorizontal(ID,a[0],a[1],a[2]);},1356537516:function _(ID,a){return new IFC4X3.IfcSectionedSurface(ID,a[0],a[1],a[2]);},3663146110:function _(ID,a){return new IFC4X3.IfcSimplePropertyTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1412071761:function _(ID,a){return new IFC4X3.IfcSpatialElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},710998568:function _(ID,a){return new IFC4X3.IfcSpatialElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2706606064:function _(ID,a){return new IFC4X3.IfcSpatialStructureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3893378262:function _(ID,a){return new IFC4X3.IfcSpatialStructureElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},463610769:function _(ID,a){return new IFC4X3.IfcSpatialZone(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2481509218:function _(ID,a){return new IFC4X3.IfcSpatialZoneType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},451544542:function _(ID,a){return new IFC4X3.IfcSphere(ID,a[0],a[1]);},4015995234:function _(ID,a){return new IFC4X3.IfcSphericalSurface(ID,a[0],a[1]);},2735484536:function _(ID,a){return new IFC4X3.IfcSpiral(ID,a[0]);},3544373492:function _(ID,a){return new IFC4X3.IfcStructuralActivity(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3136571912:function _(ID,a){return new IFC4X3.IfcStructuralItem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},530289379:function _(ID,a){return new IFC4X3.IfcStructuralMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3689010777:function _(ID,a){return new IFC4X3.IfcStructuralReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3979015343:function _(ID,a){return new IFC4X3.IfcStructuralSurfaceMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2218152070:function _(ID,a){return new IFC4X3.IfcStructuralSurfaceMemberVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},603775116:function _(ID,a){return new IFC4X3.IfcStructuralSurfaceReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4095615324:function _(ID,a){return new IFC4X3.IfcSubContractResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},699246055:function _(ID,a){return new IFC4X3.IfcSurfaceCurve(ID,a[0],a[1],a[2]);},2028607225:function _(ID,a){return new IFC4X3.IfcSurfaceCurveSweptAreaSolid(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2809605785:function _(ID,a){return new IFC4X3.IfcSurfaceOfLinearExtrusion(ID,a[0],a[1],a[2],a[3]);},4124788165:function _(ID,a){return new IFC4X3.IfcSurfaceOfRevolution(ID,a[0],a[1],a[2]);},1580310250:function _(ID,a){return new IFC4X3.IfcSystemFurnitureElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3473067441:function _(ID,a){return new IFC4X3.IfcTask(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},3206491090:function _(ID,a){return new IFC4X3.IfcTaskType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2387106220:function _(ID,a){return new IFC4X3.IfcTessellatedFaceSet(ID,a[0],a[1]);},782932809:function _(ID,a){return new IFC4X3.IfcThirdOrderPolynomialSpiral(ID,a[0],a[1],a[2],a[3],a[4]);},1935646853:function _(ID,a){return new IFC4X3.IfcToroidalSurface(ID,a[0],a[1],a[2]);},3665877780:function _(ID,a){return new IFC4X3.IfcTransportationDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2916149573:function _(ID,a){return new IFC4X3.IfcTriangulatedFaceSet(ID,a[0],a[1],a[2],a[3],a[4]);},1229763772:function _(ID,a){return new IFC4X3.IfcTriangulatedIrregularNetwork(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3651464721:function _(ID,a){return new IFC4X3.IfcVehicleType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},336235671:function _(ID,a){return new IFC4X3.IfcWindowLiningProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]);},512836454:function _(ID,a){return new IFC4X3.IfcWindowPanelProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2296667514:function _(ID,a){return new IFC4X3.IfcActor(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},1635779807:function _(ID,a){return new IFC4X3.IfcAdvancedBrep(ID,a[0]);},2603310189:function _(ID,a){return new IFC4X3.IfcAdvancedBrepWithVoids(ID,a[0],a[1]);},1674181508:function _(ID,a){return new IFC4X3.IfcAnnotation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2887950389:function _(ID,a){return new IFC4X3.IfcBSplineSurface(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},167062518:function _(ID,a){return new IFC4X3.IfcBSplineSurfaceWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1334484129:function _(ID,a){return new IFC4X3.IfcBlock(ID,a[0],a[1],a[2],a[3]);},3649129432:function _(ID,a){return new IFC4X3.IfcBooleanClippingResult(ID,a[0],a[1],a[2]);},1260505505:function _(ID,_146){return new IFC4X3.IfcBoundedCurve(ID);},3124254112:function _(ID,a){return new IFC4X3.IfcBuildingStorey(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1626504194:function _(ID,a){return new IFC4X3.IfcBuiltElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2197970202:function _(ID,a){return new IFC4X3.IfcChimneyType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2937912522:function _(ID,a){return new IFC4X3.IfcCircleHollowProfileDef(ID,a[0],a[1],a[2],a[3],a[4]);},3893394355:function _(ID,a){return new IFC4X3.IfcCivilElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3497074424:function _(ID,a){return new IFC4X3.IfcClothoid(ID,a[0],a[1]);},300633059:function _(ID,a){return new IFC4X3.IfcColumnType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3875453745:function _(ID,a){return new IFC4X3.IfcComplexPropertyTemplate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3732776249:function _(ID,a){return new IFC4X3.IfcCompositeCurve(ID,a[0],a[1]);},15328376:function _(ID,a){return new IFC4X3.IfcCompositeCurveOnSurface(ID,a[0],a[1]);},2510884976:function _(ID,a){return new IFC4X3.IfcConic(ID,a[0]);},2185764099:function _(ID,a){return new IFC4X3.IfcConstructionEquipmentResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},4105962743:function _(ID,a){return new IFC4X3.IfcConstructionMaterialResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1525564444:function _(ID,a){return new IFC4X3.IfcConstructionProductResourceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2559216714:function _(ID,a){return new IFC4X3.IfcConstructionResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3293443760:function _(ID,a){return new IFC4X3.IfcControl(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},2000195564:function _(ID,a){return new IFC4X3.IfcCosineSpiral(ID,a[0],a[1],a[2]);},3895139033:function _(ID,a){return new IFC4X3.IfcCostItem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1419761937:function _(ID,a){return new IFC4X3.IfcCostSchedule(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4189326743:function _(ID,a){return new IFC4X3.IfcCourseType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1916426348:function _(ID,a){return new IFC4X3.IfcCoveringType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3295246426:function _(ID,a){return new IFC4X3.IfcCrewResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1457835157:function _(ID,a){return new IFC4X3.IfcCurtainWallType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1213902940:function _(ID,a){return new IFC4X3.IfcCylindricalSurface(ID,a[0],a[1]);},1306400036:function _(ID,a){return new IFC4X3.IfcDeepFoundationType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4234616927:function _(ID,a){return new IFC4X3.IfcDirectrixDerivedReferenceSweptAreaSolid(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3256556792:function _(ID,a){return new IFC4X3.IfcDistributionElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3849074793:function _(ID,a){return new IFC4X3.IfcDistributionFlowElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2963535650:function _(ID,a){return new IFC4X3.IfcDoorLiningProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},1714330368:function _(ID,a){return new IFC4X3.IfcDoorPanelProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2323601079:function _(ID,a){return new IFC4X3.IfcDoorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},445594917:function _(ID,a){return new IFC4X3.IfcDraughtingPreDefinedColour(ID,a[0]);},4006246654:function _(ID,a){return new IFC4X3.IfcDraughtingPreDefinedCurveFont(ID,a[0]);},1758889154:function _(ID,a){return new IFC4X3.IfcElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4123344466:function _(ID,a){return new IFC4X3.IfcElementAssembly(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2397081782:function _(ID,a){return new IFC4X3.IfcElementAssemblyType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1623761950:function _(ID,a){return new IFC4X3.IfcElementComponent(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2590856083:function _(ID,a){return new IFC4X3.IfcElementComponentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1704287377:function _(ID,a){return new IFC4X3.IfcEllipse(ID,a[0],a[1],a[2]);},2107101300:function _(ID,a){return new IFC4X3.IfcEnergyConversionDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},132023988:function _(ID,a){return new IFC4X3.IfcEngineType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3174744832:function _(ID,a){return new IFC4X3.IfcEvaporativeCoolerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3390157468:function _(ID,a){return new IFC4X3.IfcEvaporatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4148101412:function _(ID,a){return new IFC4X3.IfcEvent(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2853485674:function _(ID,a){return new IFC4X3.IfcExternalSpatialStructureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},807026263:function _(ID,a){return new IFC4X3.IfcFacetedBrep(ID,a[0]);},3737207727:function _(ID,a){return new IFC4X3.IfcFacetedBrepWithVoids(ID,a[0],a[1]);},24185140:function _(ID,a){return new IFC4X3.IfcFacility(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1310830890:function _(ID,a){return new IFC4X3.IfcFacilityPart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4228831410:function _(ID,a){return new IFC4X3.IfcFacilityPartCommon(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},647756555:function _(ID,a){return new IFC4X3.IfcFastener(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2489546625:function _(ID,a){return new IFC4X3.IfcFastenerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2827207264:function _(ID,a){return new IFC4X3.IfcFeatureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2143335405:function _(ID,a){return new IFC4X3.IfcFeatureElementAddition(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1287392070:function _(ID,a){return new IFC4X3.IfcFeatureElementSubtraction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3907093117:function _(ID,a){return new IFC4X3.IfcFlowControllerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3198132628:function _(ID,a){return new IFC4X3.IfcFlowFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3815607619:function _(ID,a){return new IFC4X3.IfcFlowMeterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1482959167:function _(ID,a){return new IFC4X3.IfcFlowMovingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1834744321:function _(ID,a){return new IFC4X3.IfcFlowSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1339347760:function _(ID,a){return new IFC4X3.IfcFlowStorageDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2297155007:function _(ID,a){return new IFC4X3.IfcFlowTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3009222698:function _(ID,a){return new IFC4X3.IfcFlowTreatmentDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1893162501:function _(ID,a){return new IFC4X3.IfcFootingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},263784265:function _(ID,a){return new IFC4X3.IfcFurnishingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1509553395:function _(ID,a){return new IFC4X3.IfcFurniture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3493046030:function _(ID,a){return new IFC4X3.IfcGeographicElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4230923436:function _(ID,a){return new IFC4X3.IfcGeotechnicalElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1594536857:function _(ID,a){return new IFC4X3.IfcGeotechnicalStratum(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2898700619:function _(ID,a){return new IFC4X3.IfcGradientCurve(ID,a[0],a[1],a[2],a[3]);},2706460486:function _(ID,a){return new IFC4X3.IfcGroup(ID,a[0],a[1],a[2],a[3],a[4]);},1251058090:function _(ID,a){return new IFC4X3.IfcHeatExchangerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1806887404:function _(ID,a){return new IFC4X3.IfcHumidifierType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2568555532:function _(ID,a){return new IFC4X3.IfcImpactProtectionDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3948183225:function _(ID,a){return new IFC4X3.IfcImpactProtectionDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2571569899:function _(ID,a){return new IFC4X3.IfcIndexedPolyCurve(ID,a[0],a[1],a[2]);},3946677679:function _(ID,a){return new IFC4X3.IfcInterceptorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3113134337:function _(ID,a){return new IFC4X3.IfcIntersectionCurve(ID,a[0],a[1],a[2]);},2391368822:function _(ID,a){return new IFC4X3.IfcInventory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4288270099:function _(ID,a){return new IFC4X3.IfcJunctionBoxType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},679976338:function _(ID,a){return new IFC4X3.IfcKerbType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3827777499:function _(ID,a){return new IFC4X3.IfcLaborResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1051575348:function _(ID,a){return new IFC4X3.IfcLampType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1161773419:function _(ID,a){return new IFC4X3.IfcLightFixtureType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2176059722:function _(ID,a){return new IFC4X3.IfcLinearElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1770583370:function _(ID,a){return new IFC4X3.IfcLiquidTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},525669439:function _(ID,a){return new IFC4X3.IfcMarineFacility(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},976884017:function _(ID,a){return new IFC4X3.IfcMarinePart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},377706215:function _(ID,a){return new IFC4X3.IfcMechanicalFastener(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2108223431:function _(ID,a){return new IFC4X3.IfcMechanicalFastenerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1114901282:function _(ID,a){return new IFC4X3.IfcMedicalDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3181161470:function _(ID,a){return new IFC4X3.IfcMemberType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1950438474:function _(ID,a){return new IFC4X3.IfcMobileTelecommunicationsApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},710110818:function _(ID,a){return new IFC4X3.IfcMooringDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},977012517:function _(ID,a){return new IFC4X3.IfcMotorConnectionType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},506776471:function _(ID,a){return new IFC4X3.IfcNavigationElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4143007308:function _(ID,a){return new IFC4X3.IfcOccupant(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3588315303:function _(ID,a){return new IFC4X3.IfcOpeningElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2837617999:function _(ID,a){return new IFC4X3.IfcOutletType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},514975943:function _(ID,a){return new IFC4X3.IfcPavementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2382730787:function _(ID,a){return new IFC4X3.IfcPerformanceHistory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3566463478:function _(ID,a){return new IFC4X3.IfcPermeableCoveringProperties(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3327091369:function _(ID,a){return new IFC4X3.IfcPermit(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1158309216:function _(ID,a){return new IFC4X3.IfcPileType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},804291784:function _(ID,a){return new IFC4X3.IfcPipeFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4231323485:function _(ID,a){return new IFC4X3.IfcPipeSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4017108033:function _(ID,a){return new IFC4X3.IfcPlateType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2839578677:function _(ID,a){return new IFC4X3.IfcPolygonalFaceSet(ID,a[0],a[1],a[2],a[3]);},3724593414:function _(ID,a){return new IFC4X3.IfcPolyline(ID,a[0]);},3740093272:function _(ID,a){return new IFC4X3.IfcPort(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1946335990:function _(ID,a){return new IFC4X3.IfcPositioningElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2744685151:function _(ID,a){return new IFC4X3.IfcProcedure(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2904328755:function _(ID,a){return new IFC4X3.IfcProjectOrder(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3651124850:function _(ID,a){return new IFC4X3.IfcProjectionElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1842657554:function _(ID,a){return new IFC4X3.IfcProtectiveDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2250791053:function _(ID,a){return new IFC4X3.IfcPumpType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1763565496:function _(ID,a){return new IFC4X3.IfcRailType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2893384427:function _(ID,a){return new IFC4X3.IfcRailingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3992365140:function _(ID,a){return new IFC4X3.IfcRailway(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1891881377:function _(ID,a){return new IFC4X3.IfcRailwayPart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2324767716:function _(ID,a){return new IFC4X3.IfcRampFlightType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1469900589:function _(ID,a){return new IFC4X3.IfcRampType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},683857671:function _(ID,a){return new IFC4X3.IfcRationalBSplineSurfaceWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},4021432810:function _(ID,a){return new IFC4X3.IfcReferent(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3027567501:function _(ID,a){return new IFC4X3.IfcReinforcingElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},964333572:function _(ID,a){return new IFC4X3.IfcReinforcingElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2320036040:function _(ID,a){return new IFC4X3.IfcReinforcingMesh(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17]);},2310774935:function _(ID,a){return new IFC4X3.IfcReinforcingMeshType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19]);},3818125796:function _(ID,a){return new IFC4X3.IfcRelAdheresToElement(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},160246688:function _(ID,a){return new IFC4X3.IfcRelAggregates(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},146592293:function _(ID,a){return new IFC4X3.IfcRoad(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},550521510:function _(ID,a){return new IFC4X3.IfcRoadPart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2781568857:function _(ID,a){return new IFC4X3.IfcRoofType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1768891740:function _(ID,a){return new IFC4X3.IfcSanitaryTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2157484638:function _(ID,a){return new IFC4X3.IfcSeamCurve(ID,a[0],a[1],a[2]);},3649235739:function _(ID,a){return new IFC4X3.IfcSecondOrderPolynomialSpiral(ID,a[0],a[1],a[2],a[3]);},544395925:function _(ID,a){return new IFC4X3.IfcSegmentedReferenceCurve(ID,a[0],a[1],a[2],a[3]);},1027922057:function _(ID,a){return new IFC4X3.IfcSeventhOrderPolynomialSpiral(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4074543187:function _(ID,a){return new IFC4X3.IfcShadingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},33720170:function _(ID,a){return new IFC4X3.IfcSign(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3599934289:function _(ID,a){return new IFC4X3.IfcSignType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1894708472:function _(ID,a){return new IFC4X3.IfcSignalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},42703149:function _(ID,a){return new IFC4X3.IfcSineSpiral(ID,a[0],a[1],a[2],a[3]);},4097777520:function _(ID,a){return new IFC4X3.IfcSite(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},2533589738:function _(ID,a){return new IFC4X3.IfcSlabType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1072016465:function _(ID,a){return new IFC4X3.IfcSolarDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3856911033:function _(ID,a){return new IFC4X3.IfcSpace(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1305183839:function _(ID,a){return new IFC4X3.IfcSpaceHeaterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3812236995:function _(ID,a){return new IFC4X3.IfcSpaceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3112655638:function _(ID,a){return new IFC4X3.IfcStackTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1039846685:function _(ID,a){return new IFC4X3.IfcStairFlightType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},338393293:function _(ID,a){return new IFC4X3.IfcStairType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},682877961:function _(ID,a){return new IFC4X3.IfcStructuralAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1179482911:function _(ID,a){return new IFC4X3.IfcStructuralConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1004757350:function _(ID,a){return new IFC4X3.IfcStructuralCurveAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},4243806635:function _(ID,a){return new IFC4X3.IfcStructuralCurveConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},214636428:function _(ID,a){return new IFC4X3.IfcStructuralCurveMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2445595289:function _(ID,a){return new IFC4X3.IfcStructuralCurveMemberVarying(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2757150158:function _(ID,a){return new IFC4X3.IfcStructuralCurveReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1807405624:function _(ID,a){return new IFC4X3.IfcStructuralLinearAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1252848954:function _(ID,a){return new IFC4X3.IfcStructuralLoadGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2082059205:function _(ID,a){return new IFC4X3.IfcStructuralPointAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},734778138:function _(ID,a){return new IFC4X3.IfcStructuralPointConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1235345126:function _(ID,a){return new IFC4X3.IfcStructuralPointReaction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2986769608:function _(ID,a){return new IFC4X3.IfcStructuralResultGroup(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3657597509:function _(ID,a){return new IFC4X3.IfcStructuralSurfaceAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1975003073:function _(ID,a){return new IFC4X3.IfcStructuralSurfaceConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},148013059:function _(ID,a){return new IFC4X3.IfcSubContractResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3101698114:function _(ID,a){return new IFC4X3.IfcSurfaceFeature(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2315554128:function _(ID,a){return new IFC4X3.IfcSwitchingDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2254336722:function _(ID,a){return new IFC4X3.IfcSystem(ID,a[0],a[1],a[2],a[3],a[4]);},413509423:function _(ID,a){return new IFC4X3.IfcSystemFurnitureElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},5716631:function _(ID,a){return new IFC4X3.IfcTankType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3824725483:function _(ID,a){return new IFC4X3.IfcTendon(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15],a[16]);},2347447852:function _(ID,a){return new IFC4X3.IfcTendonAnchor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3081323446:function _(ID,a){return new IFC4X3.IfcTendonAnchorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3663046924:function _(ID,a){return new IFC4X3.IfcTendonConduit(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2281632017:function _(ID,a){return new IFC4X3.IfcTendonConduitType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2415094496:function _(ID,a){return new IFC4X3.IfcTendonType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},618700268:function _(ID,a){return new IFC4X3.IfcTrackElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1692211062:function _(ID,a){return new IFC4X3.IfcTransformerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2097647324:function _(ID,a){return new IFC4X3.IfcTransportElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1953115116:function _(ID,a){return new IFC4X3.IfcTransportationDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3593883385:function _(ID,a){return new IFC4X3.IfcTrimmedCurve(ID,a[0],a[1],a[2],a[3],a[4]);},1600972822:function _(ID,a){return new IFC4X3.IfcTubeBundleType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1911125066:function _(ID,a){return new IFC4X3.IfcUnitaryEquipmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},728799441:function _(ID,a){return new IFC4X3.IfcValveType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},840318589:function _(ID,a){return new IFC4X3.IfcVehicle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1530820697:function _(ID,a){return new IFC4X3.IfcVibrationDamper(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3956297820:function _(ID,a){return new IFC4X3.IfcVibrationDamperType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2391383451:function _(ID,a){return new IFC4X3.IfcVibrationIsolator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3313531582:function _(ID,a){return new IFC4X3.IfcVibrationIsolatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2769231204:function _(ID,a){return new IFC4X3.IfcVirtualElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},926996030:function _(ID,a){return new IFC4X3.IfcVoidingFeature(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1898987631:function _(ID,a){return new IFC4X3.IfcWallType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1133259667:function _(ID,a){return new IFC4X3.IfcWasteTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4009809668:function _(ID,a){return new IFC4X3.IfcWindowType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},4088093105:function _(ID,a){return new IFC4X3.IfcWorkCalendar(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1028945134:function _(ID,a){return new IFC4X3.IfcWorkControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},4218914973:function _(ID,a){return new IFC4X3.IfcWorkPlan(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},3342526732:function _(ID,a){return new IFC4X3.IfcWorkSchedule(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1033361043:function _(ID,a){return new IFC4X3.IfcZone(ID,a[0],a[1],a[2],a[3],a[4],a[5]);},3821786052:function _(ID,a){return new IFC4X3.IfcActionRequest(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1411407467:function _(ID,a){return new IFC4X3.IfcAirTerminalBoxType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3352864051:function _(ID,a){return new IFC4X3.IfcAirTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1871374353:function _(ID,a){return new IFC4X3.IfcAirToAirHeatRecoveryType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4266260250:function _(ID,a){return new IFC4X3.IfcAlignmentCant(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1545765605:function _(ID,a){return new IFC4X3.IfcAlignmentHorizontal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},317615605:function _(ID,a){return new IFC4X3.IfcAlignmentSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1662888072:function _(ID,a){return new IFC4X3.IfcAlignmentVertical(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},3460190687:function _(ID,a){return new IFC4X3.IfcAsset(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},1532957894:function _(ID,a){return new IFC4X3.IfcAudioVisualApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1967976161:function _(ID,a){return new IFC4X3.IfcBSplineCurve(ID,a[0],a[1],a[2],a[3],a[4]);},2461110595:function _(ID,a){return new IFC4X3.IfcBSplineCurveWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},819618141:function _(ID,a){return new IFC4X3.IfcBeamType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3649138523:function _(ID,a){return new IFC4X3.IfcBearingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},231477066:function _(ID,a){return new IFC4X3.IfcBoilerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1136057603:function _(ID,a){return new IFC4X3.IfcBoundaryCurve(ID,a[0],a[1]);},644574406:function _(ID,a){return new IFC4X3.IfcBridge(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},963979645:function _(ID,a){return new IFC4X3.IfcBridgePart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},4031249490:function _(ID,a){return new IFC4X3.IfcBuilding(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},2979338954:function _(ID,a){return new IFC4X3.IfcBuildingElementPart(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},39481116:function _(ID,a){return new IFC4X3.IfcBuildingElementPartType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1909888760:function _(ID,a){return new IFC4X3.IfcBuildingElementProxyType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1177604601:function _(ID,a){return new IFC4X3.IfcBuildingSystem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1876633798:function _(ID,a){return new IFC4X3.IfcBuiltElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3862327254:function _(ID,a){return new IFC4X3.IfcBuiltSystem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},2188180465:function _(ID,a){return new IFC4X3.IfcBurnerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},395041908:function _(ID,a){return new IFC4X3.IfcCableCarrierFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3293546465:function _(ID,a){return new IFC4X3.IfcCableCarrierSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2674252688:function _(ID,a){return new IFC4X3.IfcCableFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1285652485:function _(ID,a){return new IFC4X3.IfcCableSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3203706013:function _(ID,a){return new IFC4X3.IfcCaissonFoundationType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2951183804:function _(ID,a){return new IFC4X3.IfcChillerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3296154744:function _(ID,a){return new IFC4X3.IfcChimney(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2611217952:function _(ID,a){return new IFC4X3.IfcCircle(ID,a[0],a[1]);},1677625105:function _(ID,a){return new IFC4X3.IfcCivilElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2301859152:function _(ID,a){return new IFC4X3.IfcCoilType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},843113511:function _(ID,a){return new IFC4X3.IfcColumn(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},400855858:function _(ID,a){return new IFC4X3.IfcCommunicationsApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3850581409:function _(ID,a){return new IFC4X3.IfcCompressorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2816379211:function _(ID,a){return new IFC4X3.IfcCondenserType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3898045240:function _(ID,a){return new IFC4X3.IfcConstructionEquipmentResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1060000209:function _(ID,a){return new IFC4X3.IfcConstructionMaterialResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},488727124:function _(ID,a){return new IFC4X3.IfcConstructionProductResource(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},2940368186:function _(ID,a){return new IFC4X3.IfcConveyorSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},335055490:function _(ID,a){return new IFC4X3.IfcCooledBeamType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2954562838:function _(ID,a){return new IFC4X3.IfcCoolingTowerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1502416096:function _(ID,a){return new IFC4X3.IfcCourse(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1973544240:function _(ID,a){return new IFC4X3.IfcCovering(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3495092785:function _(ID,a){return new IFC4X3.IfcCurtainWall(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3961806047:function _(ID,a){return new IFC4X3.IfcDamperType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3426335179:function _(ID,a){return new IFC4X3.IfcDeepFoundation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1335981549:function _(ID,a){return new IFC4X3.IfcDiscreteAccessory(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2635815018:function _(ID,a){return new IFC4X3.IfcDiscreteAccessoryType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},479945903:function _(ID,a){return new IFC4X3.IfcDistributionBoardType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1599208980:function _(ID,a){return new IFC4X3.IfcDistributionChamberElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2063403501:function _(ID,a){return new IFC4X3.IfcDistributionControlElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1945004755:function _(ID,a){return new IFC4X3.IfcDistributionElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3040386961:function _(ID,a){return new IFC4X3.IfcDistributionFlowElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3041715199:function _(ID,a){return new IFC4X3.IfcDistributionPort(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3205830791:function _(ID,a){return new IFC4X3.IfcDistributionSystem(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},395920057:function _(ID,a){return new IFC4X3.IfcDoor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},869906466:function _(ID,a){return new IFC4X3.IfcDuctFittingType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3760055223:function _(ID,a){return new IFC4X3.IfcDuctSegmentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2030761528:function _(ID,a){return new IFC4X3.IfcDuctSilencerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3071239417:function _(ID,a){return new IFC4X3.IfcEarthworksCut(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1077100507:function _(ID,a){return new IFC4X3.IfcEarthworksElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3376911765:function _(ID,a){return new IFC4X3.IfcEarthworksFill(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},663422040:function _(ID,a){return new IFC4X3.IfcElectricApplianceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2417008758:function _(ID,a){return new IFC4X3.IfcElectricDistributionBoardType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3277789161:function _(ID,a){return new IFC4X3.IfcElectricFlowStorageDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2142170206:function _(ID,a){return new IFC4X3.IfcElectricFlowTreatmentDeviceType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1534661035:function _(ID,a){return new IFC4X3.IfcElectricGeneratorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1217240411:function _(ID,a){return new IFC4X3.IfcElectricMotorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},712377611:function _(ID,a){return new IFC4X3.IfcElectricTimeControlType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1658829314:function _(ID,a){return new IFC4X3.IfcEnergyConversionDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2814081492:function _(ID,a){return new IFC4X3.IfcEngine(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3747195512:function _(ID,a){return new IFC4X3.IfcEvaporativeCooler(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},484807127:function _(ID,a){return new IFC4X3.IfcEvaporator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1209101575:function _(ID,a){return new IFC4X3.IfcExternalSpatialElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},346874300:function _(ID,a){return new IFC4X3.IfcFanType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1810631287:function _(ID,a){return new IFC4X3.IfcFilterType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4222183408:function _(ID,a){return new IFC4X3.IfcFireSuppressionTerminalType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2058353004:function _(ID,a){return new IFC4X3.IfcFlowController(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4278956645:function _(ID,a){return new IFC4X3.IfcFlowFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},4037862832:function _(ID,a){return new IFC4X3.IfcFlowInstrumentType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},2188021234:function _(ID,a){return new IFC4X3.IfcFlowMeter(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3132237377:function _(ID,a){return new IFC4X3.IfcFlowMovingDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},987401354:function _(ID,a){return new IFC4X3.IfcFlowSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},707683696:function _(ID,a){return new IFC4X3.IfcFlowStorageDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2223149337:function _(ID,a){return new IFC4X3.IfcFlowTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3508470533:function _(ID,a){return new IFC4X3.IfcFlowTreatmentDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},900683007:function _(ID,a){return new IFC4X3.IfcFooting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2713699986:function _(ID,a){return new IFC4X3.IfcGeotechnicalAssembly(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},3009204131:function _(ID,a){return new IFC4X3.IfcGrid(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},3319311131:function _(ID,a){return new IFC4X3.IfcHeatExchanger(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2068733104:function _(ID,a){return new IFC4X3.IfcHumidifier(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4175244083:function _(ID,a){return new IFC4X3.IfcInterceptor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2176052936:function _(ID,a){return new IFC4X3.IfcJunctionBox(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2696325953:function _(ID,a){return new IFC4X3.IfcKerb(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},76236018:function _(ID,a){return new IFC4X3.IfcLamp(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},629592764:function _(ID,a){return new IFC4X3.IfcLightFixture(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1154579445:function _(ID,a){return new IFC4X3.IfcLinearPositioningElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1638804497:function _(ID,a){return new IFC4X3.IfcLiquidTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1437502449:function _(ID,a){return new IFC4X3.IfcMedicalDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1073191201:function _(ID,a){return new IFC4X3.IfcMember(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2078563270:function _(ID,a){return new IFC4X3.IfcMobileTelecommunicationsAppliance(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},234836483:function _(ID,a){return new IFC4X3.IfcMooringDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2474470126:function _(ID,a){return new IFC4X3.IfcMotorConnection(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2182337498:function _(ID,a){return new IFC4X3.IfcNavigationElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},144952367:function _(ID,a){return new IFC4X3.IfcOuterBoundaryCurve(ID,a[0],a[1]);},3694346114:function _(ID,a){return new IFC4X3.IfcOutlet(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1383356374:function _(ID,a){return new IFC4X3.IfcPavement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1687234759:function _(ID,a){return new IFC4X3.IfcPile(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},310824031:function _(ID,a){return new IFC4X3.IfcPipeFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3612865200:function _(ID,a){return new IFC4X3.IfcPipeSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3171933400:function _(ID,a){return new IFC4X3.IfcPlate(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},738039164:function _(ID,a){return new IFC4X3.IfcProtectiveDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},655969474:function _(ID,a){return new IFC4X3.IfcProtectiveDeviceTrippingUnitType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},90941305:function _(ID,a){return new IFC4X3.IfcPump(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3290496277:function _(ID,a){return new IFC4X3.IfcRail(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2262370178:function _(ID,a){return new IFC4X3.IfcRailing(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3024970846:function _(ID,a){return new IFC4X3.IfcRamp(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3283111854:function _(ID,a){return new IFC4X3.IfcRampFlight(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1232101972:function _(ID,a){return new IFC4X3.IfcRationalBSplineCurveWithKnots(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3798194928:function _(ID,a){return new IFC4X3.IfcReinforcedSoil(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},979691226:function _(ID,a){return new IFC4X3.IfcReinforcingBar(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13]);},2572171363:function _(ID,a){return new IFC4X3.IfcReinforcingBarType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12],a[13],a[14],a[15]);},2016517767:function _(ID,a){return new IFC4X3.IfcRoof(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3053780830:function _(ID,a){return new IFC4X3.IfcSanitaryTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1783015770:function _(ID,a){return new IFC4X3.IfcSensorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1329646415:function _(ID,a){return new IFC4X3.IfcShadingDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},991950508:function _(ID,a){return new IFC4X3.IfcSignal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1529196076:function _(ID,a){return new IFC4X3.IfcSlab(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3420628829:function _(ID,a){return new IFC4X3.IfcSolarDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1999602285:function _(ID,a){return new IFC4X3.IfcSpaceHeater(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1404847402:function _(ID,a){return new IFC4X3.IfcStackTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},331165859:function _(ID,a){return new IFC4X3.IfcStair(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4252922144:function _(ID,a){return new IFC4X3.IfcStairFlight(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},2515109513:function _(ID,a){return new IFC4X3.IfcStructuralAnalysisModel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},385403989:function _(ID,a){return new IFC4X3.IfcStructuralLoadCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10]);},1621171031:function _(ID,a){return new IFC4X3.IfcStructuralPlanarAction(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11]);},1162798199:function _(ID,a){return new IFC4X3.IfcSwitchingDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},812556717:function _(ID,a){return new IFC4X3.IfcTank(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3425753595:function _(ID,a){return new IFC4X3.IfcTrackElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3825984169:function _(ID,a){return new IFC4X3.IfcTransformer(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1620046519:function _(ID,a){return new IFC4X3.IfcTransportElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3026737570:function _(ID,a){return new IFC4X3.IfcTubeBundle(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3179687236:function _(ID,a){return new IFC4X3.IfcUnitaryControlElementType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},4292641817:function _(ID,a){return new IFC4X3.IfcUnitaryEquipment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4207607924:function _(ID,a){return new IFC4X3.IfcValve(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2391406946:function _(ID,a){return new IFC4X3.IfcWall(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3512223829:function _(ID,a){return new IFC4X3.IfcWallStandardCase(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4237592921:function _(ID,a){return new IFC4X3.IfcWasteTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3304561284:function _(ID,a){return new IFC4X3.IfcWindow(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9],a[10],a[11],a[12]);},2874132201:function _(ID,a){return new IFC4X3.IfcActuatorType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},1634111441:function _(ID,a){return new IFC4X3.IfcAirTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},177149247:function _(ID,a){return new IFC4X3.IfcAirTerminalBox(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2056796094:function _(ID,a){return new IFC4X3.IfcAirToAirHeatRecovery(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3001207471:function _(ID,a){return new IFC4X3.IfcAlarmType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},325726236:function _(ID,a){return new IFC4X3.IfcAlignment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},277319702:function _(ID,a){return new IFC4X3.IfcAudioVisualAppliance(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},753842376:function _(ID,a){return new IFC4X3.IfcBeam(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4196446775:function _(ID,a){return new IFC4X3.IfcBearing(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},32344328:function _(ID,a){return new IFC4X3.IfcBoiler(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3314249567:function _(ID,a){return new IFC4X3.IfcBorehole(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1095909175:function _(ID,a){return new IFC4X3.IfcBuildingElementProxy(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2938176219:function _(ID,a){return new IFC4X3.IfcBurner(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},635142910:function _(ID,a){return new IFC4X3.IfcCableCarrierFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3758799889:function _(ID,a){return new IFC4X3.IfcCableCarrierSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1051757585:function _(ID,a){return new IFC4X3.IfcCableFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4217484030:function _(ID,a){return new IFC4X3.IfcCableSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3999819293:function _(ID,a){return new IFC4X3.IfcCaissonFoundation(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3902619387:function _(ID,a){return new IFC4X3.IfcChiller(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},639361253:function _(ID,a){return new IFC4X3.IfcCoil(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3221913625:function _(ID,a){return new IFC4X3.IfcCommunicationsAppliance(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3571504051:function _(ID,a){return new IFC4X3.IfcCompressor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2272882330:function _(ID,a){return new IFC4X3.IfcCondenser(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},578613899:function _(ID,a){return new IFC4X3.IfcControllerType(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]);},3460952963:function _(ID,a){return new IFC4X3.IfcConveyorSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4136498852:function _(ID,a){return new IFC4X3.IfcCooledBeam(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3640358203:function _(ID,a){return new IFC4X3.IfcCoolingTower(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4074379575:function _(ID,a){return new IFC4X3.IfcDamper(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3693000487:function _(ID,a){return new IFC4X3.IfcDistributionBoard(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1052013943:function _(ID,a){return new IFC4X3.IfcDistributionChamberElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},562808652:function _(ID,a){return new IFC4X3.IfcDistributionCircuit(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6]);},1062813311:function _(ID,a){return new IFC4X3.IfcDistributionControlElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},342316401:function _(ID,a){return new IFC4X3.IfcDuctFitting(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3518393246:function _(ID,a){return new IFC4X3.IfcDuctSegment(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1360408905:function _(ID,a){return new IFC4X3.IfcDuctSilencer(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1904799276:function _(ID,a){return new IFC4X3.IfcElectricAppliance(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},862014818:function _(ID,a){return new IFC4X3.IfcElectricDistributionBoard(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3310460725:function _(ID,a){return new IFC4X3.IfcElectricFlowStorageDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},24726584:function _(ID,a){return new IFC4X3.IfcElectricFlowTreatmentDevice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},264262732:function _(ID,a){return new IFC4X3.IfcElectricGenerator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},402227799:function _(ID,a){return new IFC4X3.IfcElectricMotor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1003880860:function _(ID,a){return new IFC4X3.IfcElectricTimeControl(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3415622556:function _(ID,a){return new IFC4X3.IfcFan(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},819412036:function _(ID,a){return new IFC4X3.IfcFilter(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},1426591983:function _(ID,a){return new IFC4X3.IfcFireSuppressionTerminal(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},182646315:function _(ID,a){return new IFC4X3.IfcFlowInstrument(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},2680139844:function _(ID,a){return new IFC4X3.IfcGeomodel(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},1971632696:function _(ID,a){return new IFC4X3.IfcGeoslice(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7]);},2295281155:function _(ID,a){return new IFC4X3.IfcProtectiveDeviceTrippingUnit(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4086658281:function _(ID,a){return new IFC4X3.IfcSensor(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},630975310:function _(ID,a){return new IFC4X3.IfcUnitaryControlElement(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},4288193352:function _(ID,a){return new IFC4X3.IfcActuator(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},3087945054:function _(ID,a){return new IFC4X3.IfcAlarm(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);},25142252:function _(ID,a){return new IFC4X3.IfcController(ID,a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8]);}};ToRawLineData[3]={3630933823:function _(i){return[i.Role,i.UserDefinedRole,i.Description];},618182010:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose];},2879124712:function _(i){return[i.StartTag,i.EndTag];},3633395639:function _(i){return[i.StartTag,i.EndTag,i.StartDistAlong,i.HorizontalLength,i.StartHeight,i.StartGradient,i.EndGradient,i.RadiusOfCurvature,i.PredefinedType];},639542469:function _(i){return[i.ApplicationDeveloper,i.Version,i.ApplicationFullName,i.ApplicationIdentifier];},411424972:function _(i){return[i.Name,i.Description,i.AppliedValue,i.UnitBasis,i.ApplicableDate,i.FixedUntilDate,i.Category,i.Condition,i.ArithmeticOperator,i.Components];},130549933:function _(i){return[i.Identifier,i.Name,i.Description,i.TimeOfApproval,i.Status,i.Level,i.Qualifier,i.RequestingApproval,i.GivingApproval];},4037036970:function _(i){return[i.Name];},1560379544:function _(i){return[i.Name,!i.TranslationalStiffnessByLengthX?null:Labelise(i.TranslationalStiffnessByLengthX),!i.TranslationalStiffnessByLengthY?null:Labelise(i.TranslationalStiffnessByLengthY),!i.TranslationalStiffnessByLengthZ?null:Labelise(i.TranslationalStiffnessByLengthZ),!i.RotationalStiffnessByLengthX?null:Labelise(i.RotationalStiffnessByLengthX),!i.RotationalStiffnessByLengthY?null:Labelise(i.RotationalStiffnessByLengthY),!i.RotationalStiffnessByLengthZ?null:Labelise(i.RotationalStiffnessByLengthZ)];},3367102660:function _(i){return[i.Name,!i.TranslationalStiffnessByAreaX?null:Labelise(i.TranslationalStiffnessByAreaX),!i.TranslationalStiffnessByAreaY?null:Labelise(i.TranslationalStiffnessByAreaY),!i.TranslationalStiffnessByAreaZ?null:Labelise(i.TranslationalStiffnessByAreaZ)];},1387855156:function _(i){return[i.Name,!i.TranslationalStiffnessX?null:Labelise(i.TranslationalStiffnessX),!i.TranslationalStiffnessY?null:Labelise(i.TranslationalStiffnessY),!i.TranslationalStiffnessZ?null:Labelise(i.TranslationalStiffnessZ),!i.RotationalStiffnessX?null:Labelise(i.RotationalStiffnessX),!i.RotationalStiffnessY?null:Labelise(i.RotationalStiffnessY),!i.RotationalStiffnessZ?null:Labelise(i.RotationalStiffnessZ)];},2069777674:function _(i){return[i.Name,!i.TranslationalStiffnessX?null:Labelise(i.TranslationalStiffnessX),!i.TranslationalStiffnessY?null:Labelise(i.TranslationalStiffnessY),!i.TranslationalStiffnessZ?null:Labelise(i.TranslationalStiffnessZ),!i.RotationalStiffnessX?null:Labelise(i.RotationalStiffnessX),!i.RotationalStiffnessY?null:Labelise(i.RotationalStiffnessY),!i.RotationalStiffnessZ?null:Labelise(i.RotationalStiffnessZ),!i.WarpingStiffness?null:Labelise(i.WarpingStiffness)];},2859738748:function _(_147){return[];},2614616156:function _(i){return[i.PointOnRelatingElement,i.PointOnRelatedElement];},2732653382:function _(i){return[i.SurfaceOnRelatingElement,i.SurfaceOnRelatedElement];},775493141:function _(i){return[i.VolumeOnRelatingElement,i.VolumeOnRelatedElement];},1959218052:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade];},1785450214:function _(i){return[i.SourceCRS,i.TargetCRS];},1466758467:function _(i){return[i.Name,i.Description,i.GeodeticDatum,i.VerticalDatum];},602808272:function _(i){return[i.Name,i.Description,i.AppliedValue,i.UnitBasis,i.ApplicableDate,i.FixedUntilDate,i.Category,i.Condition,i.ArithmeticOperator,i.Components];},1765591967:function _(i){return[i.Elements,i.UnitType,i.UserDefinedType,i.Name];},1045800335:function _(i){return[i.Unit,i.Exponent];},2949456006:function _(i){return[i.LengthExponent,i.MassExponent,i.TimeExponent,i.ElectricCurrentExponent,i.ThermodynamicTemperatureExponent,i.AmountOfSubstanceExponent,i.LuminousIntensityExponent];},4294318154:function _(_148){return[];},3200245327:function _(i){return[i.Location,i.Identification,i.Name];},2242383968:function _(i){return[i.Location,i.Identification,i.Name];},1040185647:function _(i){return[i.Location,i.Identification,i.Name];},3548104201:function _(i){return[i.Location,i.Identification,i.Name];},852622518:function _(i){var _a;return[i.AxisTag,i.AxisCurve,(_a=i.SameSense)==null?void 0:_a.toString()];},3020489413:function _(i){return[i.TimeStamp,i.ListValues.map(function(p){return Labelise(p);})];},2655187982:function _(i){return[i.Name,i.Version,i.Publisher,i.VersionDate,i.Location,i.Description];},3452421091:function _(i){return[i.Location,i.Identification,i.Name,i.Description,i.Language,i.ReferencedLibrary];},4162380809:function _(i){return[i.MainPlaneAngle,i.SecondaryPlaneAngle,i.LuminousIntensity];},1566485204:function _(i){return[i.LightDistributionCurve,i.DistributionData];},3057273783:function _(i){return[i.SourceCRS,i.TargetCRS,i.Eastings,i.Northings,i.OrthogonalHeight,i.XAxisAbscissa,i.XAxisOrdinate,i.Scale,i.ScaleY,i.ScaleZ];},1847130766:function _(i){return[i.MaterialClassifications,i.ClassifiedMaterial];},760658860:function _(_149){return[];},248100487:function _(i){var _a;return[i.Material,i.LayerThickness,(_a=i.IsVentilated)==null?void 0:_a.toString(),i.Name,i.Description,i.Category,i.Priority];},3303938423:function _(i){return[i.MaterialLayers,i.LayerSetName,i.Description];},1847252529:function _(i){var _a;return[i.Material,i.LayerThickness,(_a=i.IsVentilated)==null?void 0:_a.toString(),i.Name,i.Description,i.Category,i.Priority,i.OffsetDirection,i.OffsetValues];},2199411900:function _(i){return[i.Materials];},2235152071:function _(i){return[i.Name,i.Description,i.Material,i.Profile,i.Priority,i.Category];},164193824:function _(i){return[i.Name,i.Description,i.MaterialProfiles,i.CompositeProfile];},552965576:function _(i){return[i.Name,i.Description,i.Material,i.Profile,i.Priority,i.Category,i.OffsetValues];},1507914824:function _(_150){return[];},2597039031:function _(i){return[Labelise(i.ValueComponent),i.UnitComponent];},3368373690:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade,i.Benchmark,i.ValueSource,i.DataValue,i.ReferencePath];},2706619895:function _(i){return[i.Currency];},1918398963:function _(i){return[i.Dimensions,i.UnitType];},3701648758:function _(i){return[i.PlacementRelTo];},2251480897:function _(i){return[i.Name,i.Description,i.ConstraintGrade,i.ConstraintSource,i.CreatingActor,i.CreationTime,i.UserDefinedGrade,i.BenchmarkValues,i.LogicalAggregator,i.ObjectiveQualifier,i.UserDefinedQualifier];},4251960020:function _(i){return[i.Identification,i.Name,i.Description,i.Roles,i.Addresses];},1207048766:function _(i){return[i.OwningUser,i.OwningApplication,i.State,i.ChangeAction,i.LastModifiedDate,i.LastModifyingUser,i.LastModifyingApplication,i.CreationDate];},2077209135:function _(i){return[i.Identification,i.FamilyName,i.GivenName,i.MiddleNames,i.PrefixTitles,i.SuffixTitles,i.Roles,i.Addresses];},101040310:function _(i){return[i.ThePerson,i.TheOrganization,i.Roles];},2483315170:function _(i){return[i.Name,i.Description];},2226359599:function _(i){return[i.Name,i.Description,i.Unit];},3355820592:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose,i.InternalLocation,i.AddressLines,i.PostalBox,i.Town,i.Region,i.PostalCode,i.Country];},677532197:function _(_151){return[];},2022622350:function _(i){return[i.Name,i.Description,i.AssignedItems,i.Identifier];},1304840413:function _(i){var _a,_b,_c;return[i.Name,i.Description,i.AssignedItems,i.Identifier,(_a=i.LayerOn)==null?void 0:_a.toString(),(_b=i.LayerFrozen)==null?void 0:_b.toString(),(_c=i.LayerBlocked)==null?void 0:_c.toString(),i.LayerStyles];},3119450353:function _(i){return[i.Name];},2095639259:function _(i){return[i.Name,i.Description,i.Representations];},3958567839:function _(i){return[i.ProfileType,i.ProfileName];},3843373140:function _(i){return[i.Name,i.Description,i.GeodeticDatum,i.VerticalDatum,i.MapProjection,i.MapZone,i.MapUnit];},986844984:function _(_152){return[];},3710013099:function _(i){return[i.Name,i.EnumerationValues.map(function(p){return Labelise(p);}),i.Unit];},2044713172:function _(i){return[i.Name,i.Description,i.Unit,i.AreaValue,i.Formula];},2093928680:function _(i){return[i.Name,i.Description,i.Unit,i.CountValue,i.Formula];},931644368:function _(i){return[i.Name,i.Description,i.Unit,i.LengthValue,i.Formula];},2691318326:function _(i){return[i.Name,i.Description,i.Unit,i.NumberValue,i.Formula];},3252649465:function _(i){return[i.Name,i.Description,i.Unit,i.TimeValue,i.Formula];},2405470396:function _(i){return[i.Name,i.Description,i.Unit,i.VolumeValue,i.Formula];},825690147:function _(i){return[i.Name,i.Description,i.Unit,i.WeightValue,i.Formula];},3915482550:function _(i){return[i.RecurrenceType,i.DayComponent,i.WeekdayComponent,i.MonthComponent,i.Position,i.Interval,i.Occurrences,i.TimePeriods];},2433181523:function _(i){return[i.TypeIdentifier,i.AttributeIdentifier,i.InstanceName,i.ListPositions,i.InnerReference];},1076942058:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},3377609919:function _(i){return[i.ContextIdentifier,i.ContextType];},3008791417:function _(_153){return[];},1660063152:function _(i){return[i.MappingOrigin,i.MappedRepresentation];},2439245199:function _(i){return[i.Name,i.Description];},2341007311:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},448429030:function _(i){return[i.Dimensions,i.UnitType,i.Prefix,i.Name];},1054537805:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin];},867548509:function _(i){var _a;return[i.ShapeRepresentations,i.Name,i.Description,(_a=i.ProductDefinitional)==null?void 0:_a.toString(),i.PartOfProductDefinitionShape];},3982875396:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},4240577450:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},2273995522:function _(i){return[i.Name];},2162789131:function _(i){return[i.Name];},3478079324:function _(i){return[i.Name,i.Values,i.Locations];},609421318:function _(i){return[i.Name];},2525727697:function _(i){return[i.Name];},3408363356:function _(i){return[i.Name,i.DeltaTConstant,i.DeltaTY,i.DeltaTZ];},2830218821:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},3958052878:function _(i){return[i.Item,i.Styles,i.Name];},3049322572:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},2934153892:function _(i){return[i.Name,i.SurfaceReinforcement1,i.SurfaceReinforcement2,i.ShearReinforcement];},1300840506:function _(i){return[i.Name,i.Side,i.Styles];},3303107099:function _(i){return[i.DiffuseTransmissionColour,i.DiffuseReflectionColour,i.TransmissionColour,i.ReflectanceColour];},1607154358:function _(i){return[i.RefractionIndex,i.DispersionFactor];},846575682:function _(i){return[i.SurfaceColour,i.Transparency];},1351298697:function _(i){return[i.Textures];},626085974:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter];},985171141:function _(i){return[i.Name,i.Rows,i.Columns];},2043862942:function _(i){return[i.Identifier,i.Name,i.Description,i.Unit,i.ReferencePath];},531007025:function _(i){var _a;return[!i.RowCells?null:i.RowCells.map(function(p){return Labelise(p);}),(_a=i.IsHeading)==null?void 0:_a.toString()];},1549132990:function _(i){var _a;return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.DurationType,i.ScheduleDuration,i.ScheduleStart,i.ScheduleFinish,i.EarlyStart,i.EarlyFinish,i.LateStart,i.LateFinish,i.FreeFloat,i.TotalFloat,(_a=i.IsCritical)==null?void 0:_a.toString(),i.StatusTime,i.ActualDuration,i.ActualStart,i.ActualFinish,i.RemainingTime,i.Completion];},2771591690:function _(i){var _a;return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.DurationType,i.ScheduleDuration,i.ScheduleStart,i.ScheduleFinish,i.EarlyStart,i.EarlyFinish,i.LateStart,i.LateFinish,i.FreeFloat,i.TotalFloat,(_a=i.IsCritical)==null?void 0:_a.toString(),i.StatusTime,i.ActualDuration,i.ActualStart,i.ActualFinish,i.RemainingTime,i.Completion,i.Recurrence];},912023232:function _(i){return[i.Purpose,i.Description,i.UserDefinedPurpose,i.TelephoneNumbers,i.FacsimileNumbers,i.PagerNumber,i.ElectronicMailAddresses,i.WWWHomePageURL,i.MessagingIDs];},1447204868:function _(i){var _a;return[i.Name,i.TextCharacterAppearance,i.TextStyle,i.TextFontStyle,(_a=i.ModelOrDraughting)==null?void 0:_a.toString()];},2636378356:function _(i){return[i.Colour,i.BackgroundColour];},1640371178:function _(i){return[!i.TextIndent?null:Labelise(i.TextIndent),i.TextAlign,i.TextDecoration,!i.LetterSpacing?null:Labelise(i.LetterSpacing),!i.WordSpacing?null:Labelise(i.WordSpacing),i.TextTransform,!i.LineHeight?null:Labelise(i.LineHeight)];},280115917:function _(i){return[i.Maps];},1742049831:function _(i){return[i.Maps,i.Mode,i.Parameter];},222769930:function _(i){return[i.TexCoordIndex,i.TexCoordsOf];},1010789467:function _(i){return[i.TexCoordIndex,i.TexCoordsOf,i.InnerTexCoordIndices];},2552916305:function _(i){return[i.Maps,i.Vertices,i.MappedTo];},1210645708:function _(i){return[i.Coordinates];},3611470254:function _(i){return[i.TexCoordsList];},1199560280:function _(i){return[i.StartTime,i.EndTime];},3101149627:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit];},581633288:function _(i){return[i.ListValues.map(function(p){return Labelise(p);})];},1377556343:function _(_154){return[];},1735638870:function _(i){return[i.ContextOfItems,i.RepresentationIdentifier,i.RepresentationType,i.Items];},180925521:function _(i){return[i.Units];},2799835756:function _(_155){return[];},1907098498:function _(i){return[i.VertexGeometry];},891718957:function _(i){return[i.IntersectingAxes,i.OffsetDistances];},1236880293:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.RecurrencePattern,i.StartDate,i.FinishDate];},3752311538:function _(i){return[i.StartTag,i.EndTag,i.StartDistAlong,i.HorizontalLength,i.StartCantLeft,i.EndCantLeft,i.StartCantRight,i.EndCantRight,i.PredefinedType];},536804194:function _(i){return[i.StartTag,i.EndTag,i.StartPoint,i.StartDirection,i.StartRadiusOfCurvature,i.EndRadiusOfCurvature,i.SegmentLength,i.GravityCenterLineHeight,i.PredefinedType];},3869604511:function _(i){return[i.Name,i.Description,i.RelatingApproval,i.RelatedApprovals];},3798115385:function _(i){return[i.ProfileType,i.ProfileName,i.OuterCurve];},1310608509:function _(i){return[i.ProfileType,i.ProfileName,i.Curve];},2705031697:function _(i){return[i.ProfileType,i.ProfileName,i.OuterCurve,i.InnerCurves];},616511568:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter,i.RasterFormat,i.RasterCode];},3150382593:function _(i){return[i.ProfileType,i.ProfileName,i.Curve,i.Thickness];},747523909:function _(i){return[i.Source,i.Edition,i.EditionDate,i.Name,i.Description,i.Specification,i.ReferenceTokens];},647927063:function _(i){return[i.Location,i.Identification,i.Name,i.ReferencedSource,i.Description,i.Sort];},3285139300:function _(i){return[i.ColourList];},3264961684:function _(i){return[i.Name];},1485152156:function _(i){return[i.ProfileType,i.ProfileName,i.Profiles,i.Label];},370225590:function _(i){return[i.CfsFaces];},1981873012:function _(i){return[i.CurveOnRelatingElement,i.CurveOnRelatedElement];},45288368:function _(i){return[i.PointOnRelatingElement,i.PointOnRelatedElement,i.EccentricityInX,i.EccentricityInY,i.EccentricityInZ];},3050246964:function _(i){return[i.Dimensions,i.UnitType,i.Name];},2889183280:function _(i){return[i.Dimensions,i.UnitType,i.Name,i.ConversionFactor];},2713554722:function _(i){return[i.Dimensions,i.UnitType,i.Name,i.ConversionFactor,i.ConversionOffset];},539742890:function _(i){return[i.Name,i.Description,i.RelatingMonetaryUnit,i.RelatedMonetaryUnit,i.ExchangeRate,i.RateDateTime,i.RateSource];},3800577675:function _(i){var _a;return[i.Name,i.CurveFont,!i.CurveWidth?null:Labelise(i.CurveWidth),i.CurveColour,(_a=i.ModelOrDraughting)==null?void 0:_a.toString()];},1105321065:function _(i){return[i.Name,i.PatternList];},2367409068:function _(i){return[i.Name,i.CurveStyleFont,i.CurveFontScaling];},3510044353:function _(i){return[i.VisibleSegmentLength,i.InvisibleSegmentLength];},3632507154:function _(i){return[i.ProfileType,i.ProfileName,i.ParentProfile,i.Operator,i.Label];},1154170062:function _(i){return[i.Identification,i.Name,i.Description,i.Location,i.Purpose,i.IntendedUse,i.Scope,i.Revision,i.DocumentOwner,i.Editors,i.CreationTime,i.LastRevisionTime,i.ElectronicFormat,i.ValidFrom,i.ValidUntil,i.Confidentiality,i.Status];},770865208:function _(i){return[i.Name,i.Description,i.RelatingDocument,i.RelatedDocuments,i.RelationshipType];},3732053477:function _(i){return[i.Location,i.Identification,i.Name,i.Description,i.ReferencedDocument];},3900360178:function _(i){return[i.EdgeStart,i.EdgeEnd];},476780140:function _(i){var _a;return[i.EdgeStart,i.EdgeEnd,i.EdgeGeometry,(_a=i.SameSense)==null?void 0:_a.toString()];},211053100:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.ActualDate,i.EarlyDate,i.LateDate,i.ScheduleDate];},297599258:function _(i){return[i.Name,i.Description,i.Properties];},1437805879:function _(i){return[i.Name,i.Description,i.RelatingReference,i.RelatedResourceObjects];},2556980723:function _(i){return[i.Bounds];},1809719519:function _(i){var _a;return[i.Bound,(_a=i.Orientation)==null?void 0:_a.toString()];},803316827:function _(i){var _a;return[i.Bound,(_a=i.Orientation)==null?void 0:_a.toString()];},3008276851:function _(i){var _a;return[i.Bounds,i.FaceSurface,(_a=i.SameSense)==null?void 0:_a.toString()];},4219587988:function _(i){return[i.Name,i.TensionFailureX,i.TensionFailureY,i.TensionFailureZ,i.CompressionFailureX,i.CompressionFailureY,i.CompressionFailureZ];},738692330:function _(i){var _a;return[i.Name,i.FillStyles,(_a=i.ModelOrDraughting)==null?void 0:_a.toString()];},3448662350:function _(i){return[i.ContextIdentifier,i.ContextType,i.CoordinateSpaceDimension,i.Precision,i.WorldCoordinateSystem,i.TrueNorth];},2453401579:function _(_156){return[];},4142052618:function _(i){return[i.ContextIdentifier,i.ContextType,i.CoordinateSpaceDimension,i.Precision,i.WorldCoordinateSystem,i.TrueNorth,i.ParentContext,i.TargetScale,i.TargetView,i.UserDefinedTargetView];},3590301190:function _(i){return[i.Elements];},178086475:function _(i){return[i.PlacementRelTo,i.PlacementLocation,i.PlacementRefDirection];},812098782:function _(i){var _a;return[i.BaseSurface,(_a=i.AgreementFlag)==null?void 0:_a.toString()];},3905492369:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter,i.URLReference];},3570813810:function _(i){return[i.MappedTo,i.Opacity,i.Colours,i.ColourIndex];},1437953363:function _(i){return[i.Maps,i.MappedTo,i.TexCoords];},2133299955:function _(i){return[i.Maps,i.MappedTo,i.TexCoords,i.TexCoordIndex];},3741457305:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit,i.Values];},1585845231:function _(i){return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,Labelise(i.LagValue),i.DurationType];},1402838566:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity];},125510826:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity];},2604431987:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Orientation];},4266656042:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.ColourAppearance,i.ColourTemperature,i.LuminousFlux,i.LightEmissionSource,i.LightDistributionDataSource];},1520743889:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.Radius,i.ConstantAttenuation,i.DistanceAttenuation,i.QuadricAttenuation];},3422422726:function _(i){return[i.Name,i.LightColour,i.AmbientIntensity,i.Intensity,i.Position,i.Radius,i.ConstantAttenuation,i.DistanceAttenuation,i.QuadricAttenuation,i.Orientation,i.ConcentrationExponent,i.SpreadAngle,i.BeamWidthAngle];},388784114:function _(i){return[i.PlacementRelTo,i.RelativePlacement,i.CartesianPosition];},2624227202:function _(i){return[i.PlacementRelTo,i.RelativePlacement];},1008929658:function _(_157){return[];},2347385850:function _(i){return[i.MappingSource,i.MappingTarget];},1838606355:function _(i){return[i.Name,i.Description,i.Category];},3708119e3:function _(i){return[i.Name,i.Description,i.Material,i.Fraction,i.Category];},2852063980:function _(i){return[i.Name,i.Description,i.MaterialConstituents];},2022407955:function _(i){return[i.Name,i.Description,i.Representations,i.RepresentedMaterial];},1303795690:function _(i){return[i.ForLayerSet,i.LayerSetDirection,i.DirectionSense,i.OffsetFromReferenceLine,i.ReferenceExtent];},3079605661:function _(i){return[i.ForProfileSet,i.CardinalPoint,i.ReferenceExtent];},3404854881:function _(i){return[i.ForProfileSet,i.CardinalPoint,i.ReferenceExtent,i.ForProfileEndSet,i.CardinalEndPoint];},3265635763:function _(i){return[i.Name,i.Description,i.Properties,i.Material];},853536259:function _(i){return[i.Name,i.Description,i.RelatingMaterial,i.RelatedMaterials,i.MaterialExpression];},2998442950:function _(i){return[i.ProfileType,i.ProfileName,i.ParentProfile,i.Operator,i.Label];},219451334:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},182550632:function _(i){var _a;return[i.ProfileType,i.ProfileName,(_a=i.HorizontalWidths)==null?void 0:_a.toString(),i.Widths,i.Slopes,i.Tags,i.OffsetPoint];},2665983363:function _(i){return[i.CfsFaces];},1411181986:function _(i){return[i.Name,i.Description,i.RelatingOrganization,i.RelatedOrganizations];},1029017970:function _(i){var _a;return[i.EdgeStart,i.EdgeEnd,i.EdgeElement,(_a=i.Orientation)==null?void 0:_a.toString()];},2529465313:function _(i){return[i.ProfileType,i.ProfileName,i.Position];},2519244187:function _(i){return[i.EdgeList];},3021840470:function _(i){return[i.Name,i.Description,i.HasQuantities,i.Discrimination,i.Quality,i.Usage];},597895409:function _(i){var _a,_b;return[(_a=i.RepeatS)==null?void 0:_a.toString(),(_b=i.RepeatT)==null?void 0:_b.toString(),i.Mode,i.TextureTransform,i.Parameter,i.Width,i.Height,i.ColourComponents,i.Pixel];},2004835150:function _(i){return[i.Location];},1663979128:function _(i){return[i.SizeInX,i.SizeInY];},2067069095:function _(_158){return[];},2165702409:function _(i){return[Labelise(i.DistanceAlong),i.OffsetLateral,i.OffsetVertical,i.OffsetLongitudinal,i.BasisCurve];},4022376103:function _(i){return[i.BasisCurve,i.PointParameter];},1423911732:function _(i){return[i.BasisSurface,i.PointParameterU,i.PointParameterV];},2924175390:function _(i){return[i.Polygon];},2775532180:function _(i){var _a;return[i.BaseSurface,(_a=i.AgreementFlag)==null?void 0:_a.toString(),i.Position,i.PolygonalBoundary];},3727388367:function _(i){return[i.Name];},3778827333:function _(_159){return[];},1775413392:function _(i){return[i.Name];},673634403:function _(i){return[i.Name,i.Description,i.Representations];},2802850158:function _(i){return[i.Name,i.Description,i.Properties,i.ProfileDefinition];},2598011224:function _(i){return[i.Name,i.Specification];},1680319473:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},148025276:function _(i){return[i.Name,i.Description,i.DependingProperty,i.DependantProperty,i.Expression];},3357820518:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},1482703590:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2090586900:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},3615266464:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim];},3413951693:function _(i){return[i.Name,i.Description,i.StartTime,i.EndTime,i.TimeSeriesDataType,i.DataOrigin,i.UserDefinedDataOrigin,i.Unit,i.TimeStep,i.Values];},1580146022:function _(i){return[i.TotalCrossSectionArea,i.SteelGrade,i.BarSurface,i.EffectiveDepth,i.NominalBarDiameter,i.BarCount];},478536968:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2943643501:function _(i){return[i.Name,i.Description,i.RelatedResourceObjects,i.RelatingApproval];},1608871552:function _(i){return[i.Name,i.Description,i.RelatingConstraint,i.RelatedResourceObjects];},1042787934:function _(i){var _a;return[i.Name,i.DataOrigin,i.UserDefinedDataOrigin,i.ScheduleWork,i.ScheduleUsage,i.ScheduleStart,i.ScheduleFinish,i.ScheduleContour,i.LevelingDelay,(_a=i.IsOverAllocated)==null?void 0:_a.toString(),i.StatusTime,i.ActualWork,i.ActualUsage,i.ActualStart,i.ActualFinish,i.RemainingWork,i.RemainingUsage,i.Completion];},2778083089:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim,i.RoundingRadius];},2042790032:function _(i){return[i.SectionType,i.StartProfile,i.EndProfile];},4165799628:function _(i){return[i.LongitudinalStartPosition,i.LongitudinalEndPosition,i.TransversePosition,i.ReinforcementRole,i.SectionDefinition,i.CrossSectionReinforcementDefinitions];},1509187699:function _(i){return[i.SpineCurve,i.CrossSections,i.CrossSectionPositions];},823603102:function _(i){return[i.Transition];},4124623270:function _(i){return[i.SbsmBoundary];},3692461612:function _(i){return[i.Name,i.Specification];},2609359061:function _(i){return[i.Name,i.SlippageX,i.SlippageY,i.SlippageZ];},723233188:function _(_160){return[];},1595516126:function _(i){return[i.Name,i.LinearForceX,i.LinearForceY,i.LinearForceZ,i.LinearMomentX,i.LinearMomentY,i.LinearMomentZ];},2668620305:function _(i){return[i.Name,i.PlanarForceX,i.PlanarForceY,i.PlanarForceZ];},2473145415:function _(i){return[i.Name,i.DisplacementX,i.DisplacementY,i.DisplacementZ,i.RotationalDisplacementRX,i.RotationalDisplacementRY,i.RotationalDisplacementRZ];},1973038258:function _(i){return[i.Name,i.DisplacementX,i.DisplacementY,i.DisplacementZ,i.RotationalDisplacementRX,i.RotationalDisplacementRY,i.RotationalDisplacementRZ,i.Distortion];},1597423693:function _(i){return[i.Name,i.ForceX,i.ForceY,i.ForceZ,i.MomentX,i.MomentY,i.MomentZ];},1190533807:function _(i){return[i.Name,i.ForceX,i.ForceY,i.ForceZ,i.MomentX,i.MomentY,i.MomentZ,i.WarpingMoment];},2233826070:function _(i){return[i.EdgeStart,i.EdgeEnd,i.ParentEdge];},2513912981:function _(_161){return[];},1878645084:function _(i){return[i.SurfaceColour,i.Transparency,i.DiffuseColour,i.TransmissionColour,i.DiffuseTransmissionColour,i.ReflectionColour,i.SpecularColour,!i.SpecularHighlight?null:Labelise(i.SpecularHighlight),i.ReflectanceMethod];},2247615214:function _(i){return[i.SweptArea,i.Position];},1260650574:function _(i){return[i.Directrix,i.Radius,i.InnerRadius,i.StartParam,i.EndParam];},1096409881:function _(i){return[i.Directrix,i.Radius,i.InnerRadius,i.StartParam,i.EndParam,i.FilletRadius];},230924584:function _(i){return[i.SweptCurve,i.Position];},3071757647:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.FlangeEdgeRadius,i.WebEdgeRadius,i.WebSlope,i.FlangeSlope];},901063453:function _(_162){return[];},4282788508:function _(i){return[i.Literal,i.Placement,i.Path];},3124975700:function _(i){return[i.Literal,i.Placement,i.Path,i.Extent,i.BoxAlignment];},1983826977:function _(i){return[i.Name,i.FontFamily,i.FontStyle,i.FontVariant,i.FontWeight,Labelise(i.FontSize)];},2715220739:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.BottomXDim,i.TopXDim,i.YDim,i.TopXOffset];},1628702193:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets];},3736923433:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType];},2347495698:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag];},3698973494:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType];},427810014:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.EdgeRadius,i.FlangeSlope];},1417489154:function _(i){return[i.Orientation,i.Magnitude];},2759199220:function _(i){return[i.LoopVertex];},2543172580:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.FlangeWidth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.EdgeRadius];},3406155212:function _(i){var _a;return[i.Bounds,i.FaceSurface,(_a=i.SameSense)==null?void 0:_a.toString()];},669184980:function _(i){return[i.OuterBoundary,i.InnerBoundaries];},3207858831:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.BottomFlangeWidth,i.OverallDepth,i.WebThickness,i.BottomFlangeThickness,i.BottomFlangeFilletRadius,i.TopFlangeWidth,i.TopFlangeThickness,i.TopFlangeFilletRadius,i.BottomFlangeEdgeRadius,i.BottomFlangeSlope,i.TopFlangeEdgeRadius,i.TopFlangeSlope];},4261334040:function _(i){return[i.Location,i.Axis];},3125803723:function _(i){return[i.Location,i.RefDirection];},2740243338:function _(i){return[i.Location,i.Axis,i.RefDirection];},3425423356:function _(i){return[i.Location,i.Axis,i.RefDirection];},2736907675:function _(i){return[i.Operator,i.FirstOperand,i.SecondOperand];},4182860854:function _(_163){return[];},2581212453:function _(i){return[i.Corner,i.XDim,i.YDim,i.ZDim];},2713105998:function _(i){var _a;return[i.BaseSurface,(_a=i.AgreementFlag)==null?void 0:_a.toString(),i.Enclosure];},2898889636:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.Width,i.WallThickness,i.Girth,i.InternalFilletRadius];},1123145078:function _(i){return[i.Coordinates];},574549367:function _(_164){return[];},1675464909:function _(i){return[i.CoordList,i.TagList];},2059837836:function _(i){return[i.CoordList,i.TagList];},59481748:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale];},3749851601:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale];},3486308946:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Scale2];},3331915920:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Axis3];},1416205885:function _(i){return[i.Axis1,i.Axis2,i.LocalOrigin,i.Scale,i.Axis3,i.Scale2,i.Scale3];},1383045692:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Radius];},2205249479:function _(i){return[i.CfsFaces];},776857604:function _(i){return[i.Name,i.Red,i.Green,i.Blue];},2542286263:function _(i){return[i.Name,i.Specification,i.UsageName,i.HasProperties];},2485617015:function _(i){var _a;return[i.Transition,(_a=i.SameSense)==null?void 0:_a.toString(),i.ParentCurve];},2574617495:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity];},3419103109:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.Phase,i.RepresentationContexts,i.UnitsInContext];},1815067380:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},2506170314:function _(i){return[i.Position];},2147822146:function _(i){return[i.TreeRootExpression];},2601014836:function _(_165){return[];},2827736869:function _(i){return[i.BasisSurface,i.OuterBoundary,i.InnerBoundaries];},2629017746:function _(i){var _a;return[i.BasisSurface,i.Boundaries,(_a=i.ImplicitOuter)==null?void 0:_a.toString()];},4212018352:function _(i){return[i.Transition,i.Placement,Labelise(i.SegmentStart),Labelise(i.SegmentLength),i.ParentCurve];},32440307:function _(i){return[i.DirectionRatios];},593015953:function _(i){return[i.SweptArea,i.Position,i.Directrix,!i.StartParam?null:Labelise(i.StartParam),!i.EndParam?null:Labelise(i.EndParam)];},1472233963:function _(i){return[i.EdgeList];},1883228015:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.MethodOfMeasurement,i.Quantities];},339256511:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2777663545:function _(i){return[i.Position];},2835456948:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.SemiAxis1,i.SemiAxis2];},4024345920:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType,i.PredefinedType,i.EventTriggerType,i.UserDefinedEventTriggerType];},477187591:function _(i){return[i.SweptArea,i.Position,i.ExtrudedDirection,i.Depth];},2804161546:function _(i){return[i.SweptArea,i.Position,i.ExtrudedDirection,i.Depth,i.EndSweptArea];},2047409740:function _(i){return[i.FbsmFaces];},374418227:function _(i){return[i.HatchLineAppearance,i.StartOfNextHatchLine,i.PointOfReferenceHatchLine,i.PatternStart,i.HatchLineAngle];},315944413:function _(i){return[i.TilingPattern,i.Tiles,i.TilingScale];},2652556860:function _(i){return[i.SweptArea,i.Position,i.Directrix,!i.StartParam?null:Labelise(i.StartParam),!i.EndParam?null:Labelise(i.EndParam),i.FixedReference];},4238390223:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1268542332:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.AssemblyPlace,i.PredefinedType];},4095422895:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},987898635:function _(i){return[i.Elements];},1484403080:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.OverallWidth,i.OverallDepth,i.WebThickness,i.FlangeThickness,i.FilletRadius,i.FlangeEdgeRadius,i.FlangeSlope];},178912537:function _(i){return[i.CoordIndex];},2294589976:function _(i){return[i.CoordIndex,i.InnerCoordIndices];},3465909080:function _(i){return[i.Maps,i.MappedTo,i.TexCoords,i.TexCoordIndices];},572779678:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Depth,i.Width,i.Thickness,i.FilletRadius,i.EdgeRadius,i.LegSlope];},428585644:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1281925730:function _(i){return[i.Pnt,i.Dir];},1425443689:function _(i){return[i.Outer];},3888040117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},590820931:function _(i){return[i.BasisCurve];},3388369263:function _(i){var _a;return[i.BasisCurve,i.Distance,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},3505215534:function _(i){var _a;return[i.BasisCurve,i.Distance,(_a=i.SelfIntersect)==null?void 0:_a.toString(),i.RefDirection];},2485787929:function _(i){return[i.BasisCurve,i.OffsetValues,i.Tag];},1682466193:function _(i){return[i.BasisSurface,i.ReferenceCurve];},603570806:function _(i){return[i.SizeInX,i.SizeInY,i.Placement];},220341763:function _(i){return[i.Position];},3381221214:function _(i){return[i.Position,i.CoefficientsX,i.CoefficientsY,i.CoefficientsZ];},759155922:function _(i){return[i.Name];},2559016684:function _(i){return[i.Name];},3967405729:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},569719735:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType,i.PredefinedType];},2945172077:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription];},4208778838:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},103090709:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.Phase,i.RepresentationContexts,i.UnitsInContext];},653396225:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.Phase,i.RepresentationContexts,i.UnitsInContext];},871118103:function _(i){return[i.Name,i.Specification,!i.UpperBoundValue?null:Labelise(i.UpperBoundValue),!i.LowerBoundValue?null:Labelise(i.LowerBoundValue),i.Unit,!i.SetPointValue?null:Labelise(i.SetPointValue)];},4166981789:function _(i){return[i.Name,i.Specification,!i.EnumerationValues?null:i.EnumerationValues.map(function(p){return Labelise(p);}),i.EnumerationReference];},2752243245:function _(i){return[i.Name,i.Specification,!i.ListValues?null:i.ListValues.map(function(p){return Labelise(p);}),i.Unit];},941946838:function _(i){return[i.Name,i.Specification,i.UsageName,i.PropertyReference];},1451395588:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.HasProperties];},492091185:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.TemplateType,i.ApplicableEntity,i.HasPropertyTemplates];},3650150729:function _(i){return[i.Name,i.Specification,!i.NominalValue?null:Labelise(i.NominalValue),i.Unit];},110355661:function _(i){return[i.Name,i.Specification,!i.DefiningValues?null:i.DefiningValues.map(function(p){return Labelise(p);}),!i.DefinedValues?null:i.DefinedValues.map(function(p){return Labelise(p);}),i.Expression,i.DefiningUnit,i.DefinedUnit,i.CurveInterpolation];},3521284610:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},2770003689:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.XDim,i.YDim,i.WallThickness,i.InnerFilletRadius,i.OuterFilletRadius];},2798486643:function _(i){return[i.Position,i.XLength,i.YLength,i.Height];},3454111270:function _(i){var _a,_b;return[i.BasisSurface,i.U1,i.V1,i.U2,i.V2,(_a=i.Usense)==null?void 0:_a.toString(),(_b=i.Vsense)==null?void 0:_b.toString()];},3765753017:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.DefinitionType,i.ReinforcementSectionDefinitions];},3939117080:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType];},1683148259:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingActor,i.ActingRole];},2495723537:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingControl];},1307041759:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingGroup];},1027710054:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingGroup,i.Factor];},4278684876:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingProcess,i.QuantityInProcess];},2857406711:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingProduct];},205026976:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatedObjectsType,i.RelatingResource];},1865459582:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects];},4095574036:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingApproval];},919958153:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingClassification];},2728634034:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.Intent,i.RelatingConstraint];},982818633:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingDocument];},3840914261:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingLibrary];},2655215786:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingMaterial];},1033248425:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingProfileDef];},826625072:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},1204542856:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement];},3945020480:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement,i.RelatingPriorities,i.RelatedPriorities,i.RelatedConnectionType,i.RelatingConnectionType];},4201705270:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingPort,i.RelatedElement];},3190031847:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingPort,i.RelatedPort,i.RealizingElement];},2127690289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedStructuralActivity];},1638771189:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingStructuralMember,i.RelatedStructuralConnection,i.AppliedCondition,i.AdditionalConditions,i.SupportedLength,i.ConditionCoordinateSystem];},504942748:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingStructuralMember,i.RelatedStructuralConnection,i.AppliedCondition,i.AdditionalConditions,i.SupportedLength,i.ConditionCoordinateSystem,i.ConnectionConstraint];},3678494232:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ConnectionGeometry,i.RelatingElement,i.RelatedElement,i.RealizingElements,i.ConnectionType];},3242617779:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedElements,i.RelatingStructure];},886880790:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingBuildingElement,i.RelatedCoverings];},2802773753:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedCoverings];},2565941209:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingContext,i.RelatedDefinitions];},2551354335:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},693640335:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description];},1462361463:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingObject];},4186316022:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingPropertyDefinition];},307848117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedPropertySets,i.RelatingTemplate];},781010003:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedObjects,i.RelatingType];},3940055652:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingOpeningElement,i.RelatedBuildingElement];},279856033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedControlElements,i.RelatingFlowElement];},427948657:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedElement,i.InterferenceGeometry,i.InterferenceSpace,i.InterferenceType,(_a=i.ImpliedOrder)==null?void 0:_a.toString()];},3268803585:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingObject,i.RelatedObjects];},1441486842:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingPositioningElement,i.RelatedProducts];},750771296:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedFeatureElement];},1245217292:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatedElements,i.RelatingStructure];},4122056220:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingProcess,i.RelatedProcess,i.TimeLag,i.SequenceType,i.UserDefinedSequenceType];},366585022:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSystem,i.RelatedBuildings];},3451746338:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedBuildingElement,i.ConnectionGeometry,i.PhysicalOrVirtualBoundary,i.InternalOrExternalBoundary];},3523091289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedBuildingElement,i.ConnectionGeometry,i.PhysicalOrVirtualBoundary,i.InternalOrExternalBoundary,i.ParentBoundary];},1521410863:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingSpace,i.RelatedBuildingElement,i.ConnectionGeometry,i.PhysicalOrVirtualBoundary,i.InternalOrExternalBoundary,i.ParentBoundary,i.CorrespondingBoundary];},1401173127:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingBuildingElement,i.RelatedOpeningElement];},816062949:function _(i){var _a;return[i.Transition,(_a=i.SameSense)==null?void 0:_a.toString(),i.ParentCurve,i.ParamLength];},2914609552:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription];},1856042241:function _(i){return[i.SweptArea,i.Position,i.Axis,i.Angle];},3243963512:function _(i){return[i.SweptArea,i.Position,i.Axis,i.Angle,i.EndSweptArea];},4158566097:function _(i){return[i.Position,i.Height,i.BottomRadius];},3626867408:function _(i){return[i.Position,i.Height,i.Radius];},1862484736:function _(i){return[i.Directrix,i.CrossSections];},1290935644:function _(i){return[i.Directrix,i.CrossSections,i.CrossSectionPositions];},1356537516:function _(i){return[i.Directrix,i.CrossSectionPositions,i.CrossSections];},3663146110:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.TemplateType,i.PrimaryMeasureType,i.SecondaryMeasureType,i.Enumerators,i.PrimaryUnit,i.SecondaryUnit,i.Expression,i.AccessState];},1412071761:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName];},710998568:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2706606064:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType];},3893378262:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},463610769:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.PredefinedType];},2481509218:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.LongName];},451544542:function _(i){return[i.Position,i.Radius];},4015995234:function _(i){return[i.Position,i.Radius];},2735484536:function _(i){return[i.Position];},3544373492:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},3136571912:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},530289379:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},3689010777:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},3979015343:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Thickness];},2218152070:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Thickness];},603775116:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.PredefinedType];},4095615324:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},699246055:function _(i){return[i.Curve3D,i.AssociatedGeometry,i.MasterRepresentation];},2028607225:function _(i){return[i.SweptArea,i.Position,i.Directrix,!i.StartParam?null:Labelise(i.StartParam),!i.EndParam?null:Labelise(i.EndParam),i.ReferenceSurface];},2809605785:function _(i){return[i.SweptCurve,i.Position,i.ExtrudedDirection,i.Depth];},4124788165:function _(i){return[i.SweptCurve,i.Position,i.AxisPosition];},1580310250:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3473067441:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Status,i.WorkMethod,(_a=i.IsMilestone)==null?void 0:_a.toString(),i.Priority,i.TaskTime,i.PredefinedType];},3206491090:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ProcessType,i.PredefinedType,i.WorkMethod];},2387106220:function _(i){var _a;return[i.Coordinates,(_a=i.Closed)==null?void 0:_a.toString()];},782932809:function _(i){return[i.Position,i.CubicTerm,i.QuadraticTerm,i.LinearTerm,i.ConstantTerm];},1935646853:function _(i){return[i.Position,i.MajorRadius,i.MinorRadius];},3665877780:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2916149573:function _(i){var _a;return[i.Coordinates,(_a=i.Closed)==null?void 0:_a.toString(),i.Normals,i.CoordIndex,i.PnIndex];},1229763772:function _(i){var _a;return[i.Coordinates,(_a=i.Closed)==null?void 0:_a.toString(),i.Normals,i.CoordIndex,i.PnIndex,i.Flags];},3651464721:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},336235671:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.LiningDepth,i.LiningThickness,i.TransomThickness,i.MullionThickness,i.FirstTransomOffset,i.SecondTransomOffset,i.FirstMullionOffset,i.SecondMullionOffset,i.ShapeAspectStyle,i.LiningOffset,i.LiningToPanelOffsetX,i.LiningToPanelOffsetY];},512836454:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.OperationType,i.PanelPosition,i.FrameDepth,i.FrameThickness,i.ShapeAspectStyle];},2296667514:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheActor];},1635779807:function _(i){return[i.Outer];},2603310189:function _(i){return[i.Outer,i.Voids];},1674181508:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType];},2887950389:function _(i){var _a,_b,_c;return[i.UDegree,i.VDegree,i.ControlPointsList,i.SurfaceForm,(_a=i.UClosed)==null?void 0:_a.toString(),(_b=i.VClosed)==null?void 0:_b.toString(),(_c=i.SelfIntersect)==null?void 0:_c.toString()];},167062518:function _(i){var _a,_b,_c;return[i.UDegree,i.VDegree,i.ControlPointsList,i.SurfaceForm,(_a=i.UClosed)==null?void 0:_a.toString(),(_b=i.VClosed)==null?void 0:_b.toString(),(_c=i.SelfIntersect)==null?void 0:_c.toString(),i.UMultiplicities,i.VMultiplicities,i.UKnots,i.VKnots,i.KnotSpec];},1334484129:function _(i){return[i.Position,i.XLength,i.YLength,i.ZLength];},3649129432:function _(i){return[i.Operator,i.FirstOperand,i.SecondOperand];},1260505505:function _(_166){return[];},3124254112:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.Elevation];},1626504194:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2197970202:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2937912522:function _(i){return[i.ProfileType,i.ProfileName,i.Position,i.Radius,i.WallThickness];},3893394355:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3497074424:function _(i){return[i.Position,i.ClothoidConstant];},300633059:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3875453745:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.UsageName,i.TemplateType,i.HasPropertyTemplates];},3732776249:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},15328376:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},2510884976:function _(i){return[i.Position];},2185764099:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},4105962743:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1525564444:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.Identification,i.LongDescription,i.ResourceType,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},2559216714:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity];},3293443760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification];},2000195564:function _(i){return[i.Position,i.CosineTerm,i.ConstantTerm];},3895139033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.CostValues,i.CostQuantities];},1419761937:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.SubmittedOn,i.UpdateDate];},4189326743:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1916426348:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3295246426:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1457835157:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1213902940:function _(i){return[i.Position,i.Radius];},1306400036:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},4234616927:function _(i){return[i.SweptArea,i.Position,i.Directrix,!i.StartParam?null:Labelise(i.StartParam),!i.EndParam?null:Labelise(i.EndParam),i.FixedReference];},3256556792:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3849074793:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2963535650:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.LiningDepth,i.LiningThickness,i.ThresholdDepth,i.ThresholdThickness,i.TransomThickness,i.TransomOffset,i.LiningOffset,i.ThresholdOffset,i.CasingThickness,i.CasingDepth,i.ShapeAspectStyle,i.LiningToPanelOffsetX,i.LiningToPanelOffsetY];},1714330368:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.PanelDepth,i.PanelOperation,i.PanelWidth,i.PanelPosition,i.ShapeAspectStyle];},2323601079:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.OperationType,(_a=i.ParameterTakesPrecedence)==null?void 0:_a.toString(),i.UserDefinedOperationType];},445594917:function _(i){return[i.Name];},4006246654:function _(i){return[i.Name];},1758889154:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4123344466:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.AssemblyPlace,i.PredefinedType];},2397081782:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1623761950:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2590856083:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1704287377:function _(i){return[i.Position,i.SemiAxis1,i.SemiAxis2];},2107101300:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},132023988:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3174744832:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3390157468:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4148101412:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.PredefinedType,i.EventTriggerType,i.UserDefinedEventTriggerType,i.EventOccurenceTime];},2853485674:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName];},807026263:function _(i){return[i.Outer];},3737207727:function _(i){return[i.Outer,i.Voids];},24185140:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType];},1310830890:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.UsageType];},4228831410:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.UsageType,i.PredefinedType];},647756555:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2489546625:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2827207264:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2143335405:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1287392070:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3907093117:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3198132628:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3815607619:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1482959167:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1834744321:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1339347760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2297155007:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},3009222698:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1893162501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},263784265:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1509553395:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3493046030:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4230923436:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1594536857:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2898700619:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString(),i.BaseCurve,i.EndPoint];},2706460486:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},1251058090:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1806887404:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2568555532:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3948183225:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2571569899:function _(i){var _a;return[i.Points,!i.Segments?null:i.Segments.map(function(p){return Labelise(p);}),(_a=i.SelfIntersect)==null?void 0:_a.toString()];},3946677679:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3113134337:function _(i){return[i.Curve3D,i.AssociatedGeometry,i.MasterRepresentation];},2391368822:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.Jurisdiction,i.ResponsiblePersons,i.LastUpdateDate,i.CurrentValue,i.OriginalValue];},4288270099:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},679976338:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,(_a=i.Mountable)==null?void 0:_a.toString()];},3827777499:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1051575348:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1161773419:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2176059722:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},1770583370:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},525669439:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.PredefinedType];},976884017:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.UsageType,i.PredefinedType];},377706215:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.NominalDiameter,i.NominalLength,i.PredefinedType];},2108223431:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.NominalDiameter,i.NominalLength];},1114901282:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3181161470:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1950438474:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},710110818:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},977012517:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},506776471:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4143007308:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheActor,i.PredefinedType];},3588315303:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2837617999:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},514975943:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2382730787:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LifeCyclePhase,i.PredefinedType];},3566463478:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.OperationType,i.PanelPosition,i.FrameDepth,i.FrameThickness,i.ShapeAspectStyle];},3327091369:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.LongDescription];},1158309216:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},804291784:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4231323485:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4017108033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2839578677:function _(i){var _a;return[i.Coordinates,(_a=i.Closed)==null?void 0:_a.toString(),i.Faces,i.PnIndex];},3724593414:function _(i){return[i.Points];},3740093272:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},1946335990:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},2744685151:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.PredefinedType];},2904328755:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.LongDescription];},3651124850:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1842657554:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2250791053:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1763565496:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2893384427:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3992365140:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.PredefinedType];},1891881377:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.UsageType,i.PredefinedType];},2324767716:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1469900589:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},683857671:function _(i){var _a,_b,_c;return[i.UDegree,i.VDegree,i.ControlPointsList,i.SurfaceForm,(_a=i.UClosed)==null?void 0:_a.toString(),(_b=i.VClosed)==null?void 0:_b.toString(),(_c=i.SelfIntersect)==null?void 0:_c.toString(),i.UMultiplicities,i.VMultiplicities,i.UKnots,i.VKnots,i.KnotSpec,i.WeightsData];},4021432810:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType];},3027567501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade];},964333572:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},2320036040:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.MeshLength,i.MeshWidth,i.LongitudinalBarNominalDiameter,i.TransverseBarNominalDiameter,i.LongitudinalBarCrossSectionArea,i.TransverseBarCrossSectionArea,i.LongitudinalBarSpacing,i.TransverseBarSpacing,i.PredefinedType];},2310774935:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.MeshLength,i.MeshWidth,i.LongitudinalBarNominalDiameter,i.TransverseBarNominalDiameter,i.LongitudinalBarCrossSectionArea,i.TransverseBarCrossSectionArea,i.LongitudinalBarSpacing,i.TransverseBarSpacing,i.BendingShapeCode,!i.BendingParameters?null:i.BendingParameters.map(function(p){return Labelise(p);})];},3818125796:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingElement,i.RelatedSurfaceFeatures];},160246688:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.RelatingObject,i.RelatedObjects];},146592293:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.PredefinedType];},550521510:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.UsageType,i.PredefinedType];},2781568857:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1768891740:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2157484638:function _(i){return[i.Curve3D,i.AssociatedGeometry,i.MasterRepresentation];},3649235739:function _(i){return[i.Position,i.QuadraticTerm,i.LinearTerm,i.ConstantTerm];},544395925:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString(),i.BaseCurve,i.EndPoint];},1027922057:function _(i){return[i.Position,i.SepticTerm,i.SexticTerm,i.QuinticTerm,i.QuarticTerm,i.CubicTerm,i.QuadraticTerm,i.LinearTerm,i.ConstantTerm];},4074543187:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},33720170:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3599934289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1894708472:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},42703149:function _(i){return[i.Position,i.SineTerm,i.LinearTerm,i.ConstantTerm];},4097777520:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.RefLatitude,i.RefLongitude,i.RefElevation,i.LandTitleNumber,i.SiteAddress];},2533589738:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1072016465:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3856911033:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.PredefinedType,i.ElevationWithFlooring];},1305183839:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3812236995:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.LongName];},3112655638:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1039846685:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},338393293:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},682877961:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString()];},1179482911:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},1004757350:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},4243806635:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition,i.AxisDirection];},214636428:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Axis];},2445595289:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType,i.Axis];},2757150158:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,i.PredefinedType];},1807405624:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},1252848954:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.ActionType,i.ActionSource,i.Coefficient,i.Purpose];},2082059205:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString()];},734778138:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition,i.ConditionCoordinateSystem];},1235345126:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal];},2986769608:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.TheoryType,i.ResultForLoadGroup,(_a=i.IsLinear)==null?void 0:_a.toString()];},3657597509:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},1975003073:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedCondition];},148013059:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},3101698114:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2315554128:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2254336722:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType];},413509423:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},5716631:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3824725483:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.PredefinedType,i.NominalDiameter,i.CrossSectionArea,i.TensionForce,i.PreStress,i.FrictionCoefficient,i.AnchorageSlip,i.MinCurvatureRadius];},2347447852:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.PredefinedType];},3081323446:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3663046924:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.PredefinedType];},2281632017:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2415094496:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.NominalDiameter,i.CrossSectionArea,i.SheathDiameter];},618700268:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1692211062:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2097647324:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1953115116:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3593883385:function _(i){var _a;return[i.BasisCurve,i.Trim1,i.Trim2,(_a=i.SenseAgreement)==null?void 0:_a.toString(),i.MasterRepresentation];},1600972822:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1911125066:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},728799441:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},840318589:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1530820697:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3956297820:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2391383451:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3313531582:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2769231204:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},926996030:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1898987631:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1133259667:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4009809668:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.PartitioningType,(_a=i.ParameterTakesPrecedence)==null?void 0:_a.toString(),i.UserDefinedPartitioningType];},4088093105:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.WorkingTimes,i.ExceptionTimes,i.PredefinedType];},1028945134:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime];},4218914973:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime,i.PredefinedType];},3342526732:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.CreationDate,i.Creators,i.Purpose,i.Duration,i.TotalFloat,i.StartTime,i.FinishTime,i.PredefinedType];},1033361043:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName];},3821786052:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.PredefinedType,i.Status,i.LongDescription];},1411407467:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3352864051:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1871374353:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4266260250:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.RailHeadDistance];},1545765605:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},317615605:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.DesignParameters];},1662888072:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},3460190687:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.OriginalValue,i.CurrentValue,i.TotalReplacementCost,i.Owner,i.User,i.ResponsiblePerson,i.IncorporationDate,i.DepreciatedValue];},1532957894:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1967976161:function _(i){var _a,_b;return[i.Degree,i.ControlPointsList,i.CurveForm,(_a=i.ClosedCurve)==null?void 0:_a.toString(),(_b=i.SelfIntersect)==null?void 0:_b.toString()];},2461110595:function _(i){var _a,_b;return[i.Degree,i.ControlPointsList,i.CurveForm,(_a=i.ClosedCurve)==null?void 0:_a.toString(),(_b=i.SelfIntersect)==null?void 0:_b.toString(),i.KnotMultiplicities,i.Knots,i.KnotSpec];},819618141:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3649138523:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},231477066:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1136057603:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},644574406:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.PredefinedType];},963979645:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.UsageType,i.PredefinedType];},4031249490:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.CompositionType,i.ElevationOfRefHeight,i.ElevationOfTerrain,i.BuildingAddress];},2979338954:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},39481116:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1909888760:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1177604601:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.LongName];},1876633798:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3862327254:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.LongName];},2188180465:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},395041908:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3293546465:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2674252688:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1285652485:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3203706013:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2951183804:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3296154744:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2611217952:function _(i){return[i.Position,i.Radius];},1677625105:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2301859152:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},843113511:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},400855858:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3850581409:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2816379211:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3898045240:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},1060000209:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},488727124:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.Identification,i.LongDescription,i.Usage,i.BaseCosts,i.BaseQuantity,i.PredefinedType];},2940368186:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},335055490:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2954562838:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1502416096:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1973544240:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3495092785:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3961806047:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3426335179:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1335981549:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2635815018:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},479945903:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1599208980:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2063403501:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType];},1945004755:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3040386961:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3041715199:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.FlowDirection,i.PredefinedType,i.SystemType];},3205830791:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.PredefinedType];},395920057:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth,i.PredefinedType,i.OperationType,i.UserDefinedOperationType];},869906466:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3760055223:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2030761528:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3071239417:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1077100507:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3376911765:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},663422040:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2417008758:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3277789161:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2142170206:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1534661035:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1217240411:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},712377611:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1658829314:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2814081492:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3747195512:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},484807127:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1209101575:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.LongName,i.PredefinedType];},346874300:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1810631287:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4222183408:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2058353004:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4278956645:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},4037862832:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},2188021234:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3132237377:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},987401354:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},707683696:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2223149337:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3508470533:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},900683007:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2713699986:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},3009204131:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.UAxes,i.VAxes,i.WAxes,i.PredefinedType];},3319311131:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2068733104:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4175244083:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2176052936:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2696325953:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,(_a=i.Mountable)==null?void 0:_a.toString()];},76236018:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},629592764:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1154579445:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation];},1638804497:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1437502449:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1073191201:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2078563270:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},234836483:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2474470126:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2182337498:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},144952367:function _(i){var _a;return[i.Segments,(_a=i.SelfIntersect)==null?void 0:_a.toString()];},3694346114:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1383356374:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1687234759:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType,i.ConstructionType];},310824031:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3612865200:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3171933400:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},738039164:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},655969474:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},90941305:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3290496277:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2262370178:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3024970846:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3283111854:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1232101972:function _(i){var _a,_b;return[i.Degree,i.ControlPointsList,i.CurveForm,(_a=i.ClosedCurve)==null?void 0:_a.toString(),(_b=i.SelfIntersect)==null?void 0:_b.toString(),i.KnotMultiplicities,i.Knots,i.KnotSpec,i.WeightsData];},3798194928:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},979691226:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.SteelGrade,i.NominalDiameter,i.CrossSectionArea,i.BarLength,i.PredefinedType,i.BarSurface];},2572171363:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType,i.NominalDiameter,i.CrossSectionArea,i.BarLength,i.BarSurface,i.BendingShapeCode,!i.BendingParameters?null:i.BendingParameters.map(function(p){return Labelise(p);})];},2016517767:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3053780830:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1783015770:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1329646415:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},991950508:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1529196076:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3420628829:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1999602285:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1404847402:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},331165859:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4252922144:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.NumberOfRisers,i.NumberOfTreads,i.RiserHeight,i.TreadLength,i.PredefinedType];},2515109513:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.OrientationOf2DPlane,i.LoadedBy,i.HasResults,i.SharedPlacement];},385403989:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.PredefinedType,i.ActionType,i.ActionSource,i.Coefficient,i.Purpose,i.SelfWeightCoefficients];},1621171031:function _(i){var _a;return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.AppliedLoad,i.GlobalOrLocal,(_a=i.DestabilizingLoad)==null?void 0:_a.toString(),i.ProjectedOrTrue,i.PredefinedType];},1162798199:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},812556717:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3425753595:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3825984169:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1620046519:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3026737570:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3179687236:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},4292641817:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4207607924:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2391406946:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3512223829:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4237592921:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3304561284:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.OverallHeight,i.OverallWidth,i.PredefinedType,i.PartitioningType,i.UserDefinedPartitioningType];},2874132201:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},1634111441:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},177149247:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2056796094:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3001207471:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},325726236:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.PredefinedType];},277319702:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},753842376:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4196446775:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},32344328:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3314249567:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1095909175:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2938176219:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},635142910:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3758799889:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1051757585:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4217484030:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3999819293:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3902619387:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},639361253:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3221913625:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3571504051:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2272882330:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},578613899:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ApplicableOccurrence,i.HasPropertySets,i.RepresentationMaps,i.Tag,i.ElementType,i.PredefinedType];},3460952963:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4136498852:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3640358203:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4074379575:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3693000487:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1052013943:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},562808652:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.LongName,i.PredefinedType];},1062813311:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},342316401:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3518393246:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1360408905:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1904799276:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},862014818:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3310460725:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},24726584:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},264262732:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},402227799:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1003880860:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3415622556:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},819412036:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},1426591983:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},182646315:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},2680139844:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},1971632696:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag];},2295281155:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4086658281:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},630975310:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},4288193352:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},3087945054:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];},25142252:function _(i){return[i.GlobalId,i.OwnerHistory,i.Name,i.Description,i.ObjectType,i.ObjectPlacement,i.Representation,i.Tag,i.PredefinedType];}};TypeInitialisers[3]={3699917729:function _(v){return new IFC4X3.IfcAbsorbedDoseMeasure(v);},4182062534:function _(v){return new IFC4X3.IfcAccelerationMeasure(v);},360377573:function _(v){return new IFC4X3.IfcAmountOfSubstanceMeasure(v);},632304761:function _(v){return new IFC4X3.IfcAngularVelocityMeasure(v);},3683503648:function _(v){return new IFC4X3.IfcArcIndex(v);},1500781891:function _(v){return new IFC4X3.IfcAreaDensityMeasure(v);},2650437152:function _(v){return new IFC4X3.IfcAreaMeasure(v);},2314439260:function _(v){return new IFC4X3.IfcBinary(v);},2735952531:function _(v){return new IFC4X3.IfcBoolean(v);},1867003952:function _(v){return new IFC4X3.IfcBoxAlignment(v);},1683019596:function _(v){return new IFC4X3.IfcCardinalPointReference(v);},2991860651:function _(v){return new IFC4X3.IfcComplexNumber(v);},3812528620:function _(v){return new IFC4X3.IfcCompoundPlaneAngleMeasure(v);},3238673880:function _(v){return new IFC4X3.IfcContextDependentMeasure(v);},1778710042:function _(v){return new IFC4X3.IfcCountMeasure(v);},94842927:function _(v){return new IFC4X3.IfcCurvatureMeasure(v);},937566702:function _(v){return new IFC4X3.IfcDate(v);},2195413836:function _(v){return new IFC4X3.IfcDateTime(v);},86635668:function _(v){return new IFC4X3.IfcDayInMonthNumber(v);},3701338814:function _(v){return new IFC4X3.IfcDayInWeekNumber(v);},1514641115:function _(v){return new IFC4X3.IfcDescriptiveMeasure(v);},4134073009:function _(v){return new IFC4X3.IfcDimensionCount(v);},524656162:function _(v){return new IFC4X3.IfcDoseEquivalentMeasure(v);},2541165894:function _(v){return new IFC4X3.IfcDuration(v);},69416015:function _(v){return new IFC4X3.IfcDynamicViscosityMeasure(v);},1827137117:function _(v){return new IFC4X3.IfcElectricCapacitanceMeasure(v);},3818826038:function _(v){return new IFC4X3.IfcElectricChargeMeasure(v);},2093906313:function _(v){return new IFC4X3.IfcElectricConductanceMeasure(v);},3790457270:function _(v){return new IFC4X3.IfcElectricCurrentMeasure(v);},2951915441:function _(v){return new IFC4X3.IfcElectricResistanceMeasure(v);},2506197118:function _(v){return new IFC4X3.IfcElectricVoltageMeasure(v);},2078135608:function _(v){return new IFC4X3.IfcEnergyMeasure(v);},1102727119:function _(v){return new IFC4X3.IfcFontStyle(v);},2715512545:function _(v){return new IFC4X3.IfcFontVariant(v);},2590844177:function _(v){return new IFC4X3.IfcFontWeight(v);},1361398929:function _(v){return new IFC4X3.IfcForceMeasure(v);},3044325142:function _(v){return new IFC4X3.IfcFrequencyMeasure(v);},3064340077:function _(v){return new IFC4X3.IfcGloballyUniqueId(v);},3113092358:function _(v){return new IFC4X3.IfcHeatFluxDensityMeasure(v);},1158859006:function _(v){return new IFC4X3.IfcHeatingValueMeasure(v);},983778844:function _(v){return new IFC4X3.IfcIdentifier(v);},3358199106:function _(v){return new IFC4X3.IfcIlluminanceMeasure(v);},2679005408:function _(v){return new IFC4X3.IfcInductanceMeasure(v);},1939436016:function _(v){return new IFC4X3.IfcInteger(v);},3809634241:function _(v){return new IFC4X3.IfcIntegerCountRateMeasure(v);},3686016028:function _(v){return new IFC4X3.IfcIonConcentrationMeasure(v);},3192672207:function _(v){return new IFC4X3.IfcIsothermalMoistureCapacityMeasure(v);},2054016361:function _(v){return new IFC4X3.IfcKinematicViscosityMeasure(v);},3258342251:function _(v){return new IFC4X3.IfcLabel(v);},1275358634:function _(v){return new IFC4X3.IfcLanguageId(v);},1243674935:function _(v){return new IFC4X3.IfcLengthMeasure(v);},1774176899:function _(v){return new IFC4X3.IfcLineIndex(v);},191860431:function _(v){return new IFC4X3.IfcLinearForceMeasure(v);},2128979029:function _(v){return new IFC4X3.IfcLinearMomentMeasure(v);},1307019551:function _(v){return new IFC4X3.IfcLinearStiffnessMeasure(v);},3086160713:function _(v){return new IFC4X3.IfcLinearVelocityMeasure(v);},503418787:function _(v){return new IFC4X3.IfcLogical(v);},2095003142:function _(v){return new IFC4X3.IfcLuminousFluxMeasure(v);},2755797622:function _(v){return new IFC4X3.IfcLuminousIntensityDistributionMeasure(v);},151039812:function _(v){return new IFC4X3.IfcLuminousIntensityMeasure(v);},286949696:function _(v){return new IFC4X3.IfcMagneticFluxDensityMeasure(v);},2486716878:function _(v){return new IFC4X3.IfcMagneticFluxMeasure(v);},1477762836:function _(v){return new IFC4X3.IfcMassDensityMeasure(v);},4017473158:function _(v){return new IFC4X3.IfcMassFlowRateMeasure(v);},3124614049:function _(v){return new IFC4X3.IfcMassMeasure(v);},3531705166:function _(v){return new IFC4X3.IfcMassPerLengthMeasure(v);},3341486342:function _(v){return new IFC4X3.IfcModulusOfElasticityMeasure(v);},2173214787:function _(v){return new IFC4X3.IfcModulusOfLinearSubgradeReactionMeasure(v);},1052454078:function _(v){return new IFC4X3.IfcModulusOfRotationalSubgradeReactionMeasure(v);},1753493141:function _(v){return new IFC4X3.IfcModulusOfSubgradeReactionMeasure(v);},3177669450:function _(v){return new IFC4X3.IfcMoistureDiffusivityMeasure(v);},1648970520:function _(v){return new IFC4X3.IfcMolecularWeightMeasure(v);},3114022597:function _(v){return new IFC4X3.IfcMomentOfInertiaMeasure(v);},2615040989:function _(v){return new IFC4X3.IfcMonetaryMeasure(v);},765770214:function _(v){return new IFC4X3.IfcMonthInYearNumber(v);},525895558:function _(v){return new IFC4X3.IfcNonNegativeLengthMeasure(v);},2095195183:function _(v){return new IFC4X3.IfcNormalisedRatioMeasure(v);},2395907400:function _(v){return new IFC4X3.IfcNumericMeasure(v);},929793134:function _(v){return new IFC4X3.IfcPHMeasure(v);},2260317790:function _(v){return new IFC4X3.IfcParameterValue(v);},2642773653:function _(v){return new IFC4X3.IfcPlanarForceMeasure(v);},4042175685:function _(v){return new IFC4X3.IfcPlaneAngleMeasure(v);},1790229001:function _(v){return new IFC4X3.IfcPositiveInteger(v);},2815919920:function _(v){return new IFC4X3.IfcPositiveLengthMeasure(v);},3054510233:function _(v){return new IFC4X3.IfcPositivePlaneAngleMeasure(v);},1245737093:function _(v){return new IFC4X3.IfcPositiveRatioMeasure(v);},1364037233:function _(v){return new IFC4X3.IfcPowerMeasure(v);},2169031380:function _(v){return new IFC4X3.IfcPresentableText(v);},3665567075:function _(v){return new IFC4X3.IfcPressureMeasure(v);},2798247006:function _(v){return new IFC4X3.IfcPropertySetDefinitionSet(v);},3972513137:function _(v){return new IFC4X3.IfcRadioActivityMeasure(v);},96294661:function _(v){return new IFC4X3.IfcRatioMeasure(v);},200335297:function _(v){return new IFC4X3.IfcReal(v);},2133746277:function _(v){return new IFC4X3.IfcRotationalFrequencyMeasure(v);},1755127002:function _(v){return new IFC4X3.IfcRotationalMassMeasure(v);},3211557302:function _(v){return new IFC4X3.IfcRotationalStiffnessMeasure(v);},3467162246:function _(v){return new IFC4X3.IfcSectionModulusMeasure(v);},2190458107:function _(v){return new IFC4X3.IfcSectionalAreaIntegralMeasure(v);},408310005:function _(v){return new IFC4X3.IfcShearModulusMeasure(v);},3471399674:function _(v){return new IFC4X3.IfcSolidAngleMeasure(v);},4157543285:function _(v){return new IFC4X3.IfcSoundPowerLevelMeasure(v);},846465480:function _(v){return new IFC4X3.IfcSoundPowerMeasure(v);},3457685358:function _(v){return new IFC4X3.IfcSoundPressureLevelMeasure(v);},993287707:function _(v){return new IFC4X3.IfcSoundPressureMeasure(v);},3477203348:function _(v){return new IFC4X3.IfcSpecificHeatCapacityMeasure(v);},2757832317:function _(v){return new IFC4X3.IfcSpecularExponent(v);},361837227:function _(v){return new IFC4X3.IfcSpecularRoughness(v);},58845555:function _(v){return new IFC4X3.IfcTemperatureGradientMeasure(v);},1209108979:function _(v){return new IFC4X3.IfcTemperatureRateOfChangeMeasure(v);},2801250643:function _(v){return new IFC4X3.IfcText(v);},1460886941:function _(v){return new IFC4X3.IfcTextAlignment(v);},3490877962:function _(v){return new IFC4X3.IfcTextDecoration(v);},603696268:function _(v){return new IFC4X3.IfcTextFontName(v);},296282323:function _(v){return new IFC4X3.IfcTextTransformation(v);},232962298:function _(v){return new IFC4X3.IfcThermalAdmittanceMeasure(v);},2645777649:function _(v){return new IFC4X3.IfcThermalConductivityMeasure(v);},2281867870:function _(v){return new IFC4X3.IfcThermalExpansionCoefficientMeasure(v);},857959152:function _(v){return new IFC4X3.IfcThermalResistanceMeasure(v);},2016195849:function _(v){return new IFC4X3.IfcThermalTransmittanceMeasure(v);},743184107:function _(v){return new IFC4X3.IfcThermodynamicTemperatureMeasure(v);},4075327185:function _(v){return new IFC4X3.IfcTime(v);},2726807636:function _(v){return new IFC4X3.IfcTimeMeasure(v);},2591213694:function _(v){return new IFC4X3.IfcTimeStamp(v);},1278329552:function _(v){return new IFC4X3.IfcTorqueMeasure(v);},950732822:function _(v){return new IFC4X3.IfcURIReference(v);},3345633955:function _(v){return new IFC4X3.IfcVaporPermeabilityMeasure(v);},3458127941:function _(v){return new IFC4X3.IfcVolumeMeasure(v);},2593997549:function _(v){return new IFC4X3.IfcVolumetricFlowRateMeasure(v);},51269191:function _(v){return new IFC4X3.IfcWarpingConstantMeasure(v);},1718600412:function _(v){return new IFC4X3.IfcWarpingMomentMeasure(v);}};var IFC4X3;(function(IFC4X32){var IfcAbsorbedDoseMeasure=/*#__PURE__*/_createClass(function IfcAbsorbedDoseMeasure(v){_classCallCheck(this,IfcAbsorbedDoseMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcAbsorbedDoseMeasure=IfcAbsorbedDoseMeasure;var IfcAccelerationMeasure=/*#__PURE__*/_createClass(function IfcAccelerationMeasure(v){_classCallCheck(this,IfcAccelerationMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcAccelerationMeasure=IfcAccelerationMeasure;var IfcAmountOfSubstanceMeasure=/*#__PURE__*/_createClass(function IfcAmountOfSubstanceMeasure(v){_classCallCheck(this,IfcAmountOfSubstanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcAmountOfSubstanceMeasure=IfcAmountOfSubstanceMeasure;var IfcAngularVelocityMeasure=/*#__PURE__*/_createClass(function IfcAngularVelocityMeasure(v){_classCallCheck(this,IfcAngularVelocityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcAngularVelocityMeasure=IfcAngularVelocityMeasure;var IfcArcIndex=/*#__PURE__*/_createClass(function IfcArcIndex(value){_classCallCheck(this,IfcArcIndex);this.value=value;});IFC4X32.IfcArcIndex=IfcArcIndex;var IfcAreaDensityMeasure=/*#__PURE__*/_createClass(function IfcAreaDensityMeasure(v){_classCallCheck(this,IfcAreaDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcAreaDensityMeasure=IfcAreaDensityMeasure;var IfcAreaMeasure=/*#__PURE__*/_createClass(function IfcAreaMeasure(v){_classCallCheck(this,IfcAreaMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcAreaMeasure=IfcAreaMeasure;var IfcBinary=/*#__PURE__*/_createClass(function IfcBinary(v){_classCallCheck(this,IfcBinary);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcBinary=IfcBinary;var IfcBoolean=/*#__PURE__*/_createClass(function IfcBoolean(v){_classCallCheck(this,IfcBoolean);this.type=3;this.value=v=="true"?true:false;});IFC4X32.IfcBoolean=IfcBoolean;var IfcBoxAlignment=/*#__PURE__*/_createClass(function IfcBoxAlignment(value){_classCallCheck(this,IfcBoxAlignment);this.value=value;this.type=1;});IFC4X32.IfcBoxAlignment=IfcBoxAlignment;var IfcCardinalPointReference=/*#__PURE__*/_createClass(function IfcCardinalPointReference(v){_classCallCheck(this,IfcCardinalPointReference);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcCardinalPointReference=IfcCardinalPointReference;var IfcComplexNumber=/*#__PURE__*/_createClass(function IfcComplexNumber(value){_classCallCheck(this,IfcComplexNumber);this.value=value;});IFC4X32.IfcComplexNumber=IfcComplexNumber;var IfcCompoundPlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcCompoundPlaneAngleMeasure(value){_classCallCheck(this,IfcCompoundPlaneAngleMeasure);this.value=value;});IFC4X32.IfcCompoundPlaneAngleMeasure=IfcCompoundPlaneAngleMeasure;var IfcContextDependentMeasure=/*#__PURE__*/_createClass(function IfcContextDependentMeasure(v){_classCallCheck(this,IfcContextDependentMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcContextDependentMeasure=IfcContextDependentMeasure;var IfcCountMeasure=/*#__PURE__*/_createClass(function IfcCountMeasure(v){_classCallCheck(this,IfcCountMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcCountMeasure=IfcCountMeasure;var IfcCurvatureMeasure=/*#__PURE__*/_createClass(function IfcCurvatureMeasure(v){_classCallCheck(this,IfcCurvatureMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcCurvatureMeasure=IfcCurvatureMeasure;var IfcDate=/*#__PURE__*/_createClass(function IfcDate(value){_classCallCheck(this,IfcDate);this.value=value;this.type=1;});IFC4X32.IfcDate=IfcDate;var IfcDateTime=/*#__PURE__*/_createClass(function IfcDateTime(value){_classCallCheck(this,IfcDateTime);this.value=value;this.type=1;});IFC4X32.IfcDateTime=IfcDateTime;var IfcDayInMonthNumber=/*#__PURE__*/_createClass(function IfcDayInMonthNumber(v){_classCallCheck(this,IfcDayInMonthNumber);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcDayInMonthNumber=IfcDayInMonthNumber;var IfcDayInWeekNumber=/*#__PURE__*/_createClass(function IfcDayInWeekNumber(v){_classCallCheck(this,IfcDayInWeekNumber);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcDayInWeekNumber=IfcDayInWeekNumber;var IfcDescriptiveMeasure=/*#__PURE__*/_createClass(function IfcDescriptiveMeasure(value){_classCallCheck(this,IfcDescriptiveMeasure);this.value=value;this.type=1;});IFC4X32.IfcDescriptiveMeasure=IfcDescriptiveMeasure;var IfcDimensionCount=/*#__PURE__*/_createClass(function IfcDimensionCount(v){_classCallCheck(this,IfcDimensionCount);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcDimensionCount=IfcDimensionCount;var IfcDoseEquivalentMeasure=/*#__PURE__*/_createClass(function IfcDoseEquivalentMeasure(v){_classCallCheck(this,IfcDoseEquivalentMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcDoseEquivalentMeasure=IfcDoseEquivalentMeasure;var IfcDuration=/*#__PURE__*/_createClass(function IfcDuration(value){_classCallCheck(this,IfcDuration);this.value=value;this.type=1;});IFC4X32.IfcDuration=IfcDuration;var IfcDynamicViscosityMeasure=/*#__PURE__*/_createClass(function IfcDynamicViscosityMeasure(v){_classCallCheck(this,IfcDynamicViscosityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcDynamicViscosityMeasure=IfcDynamicViscosityMeasure;var IfcElectricCapacitanceMeasure=/*#__PURE__*/_createClass(function IfcElectricCapacitanceMeasure(v){_classCallCheck(this,IfcElectricCapacitanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcElectricCapacitanceMeasure=IfcElectricCapacitanceMeasure;var IfcElectricChargeMeasure=/*#__PURE__*/_createClass(function IfcElectricChargeMeasure(v){_classCallCheck(this,IfcElectricChargeMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcElectricChargeMeasure=IfcElectricChargeMeasure;var IfcElectricConductanceMeasure=/*#__PURE__*/_createClass(function IfcElectricConductanceMeasure(v){_classCallCheck(this,IfcElectricConductanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcElectricConductanceMeasure=IfcElectricConductanceMeasure;var IfcElectricCurrentMeasure=/*#__PURE__*/_createClass(function IfcElectricCurrentMeasure(v){_classCallCheck(this,IfcElectricCurrentMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcElectricCurrentMeasure=IfcElectricCurrentMeasure;var IfcElectricResistanceMeasure=/*#__PURE__*/_createClass(function IfcElectricResistanceMeasure(v){_classCallCheck(this,IfcElectricResistanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcElectricResistanceMeasure=IfcElectricResistanceMeasure;var IfcElectricVoltageMeasure=/*#__PURE__*/_createClass(function IfcElectricVoltageMeasure(v){_classCallCheck(this,IfcElectricVoltageMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcElectricVoltageMeasure=IfcElectricVoltageMeasure;var IfcEnergyMeasure=/*#__PURE__*/_createClass(function IfcEnergyMeasure(v){_classCallCheck(this,IfcEnergyMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcEnergyMeasure=IfcEnergyMeasure;var IfcFontStyle=/*#__PURE__*/_createClass(function IfcFontStyle(value){_classCallCheck(this,IfcFontStyle);this.value=value;this.type=1;});IFC4X32.IfcFontStyle=IfcFontStyle;var IfcFontVariant=/*#__PURE__*/_createClass(function IfcFontVariant(value){_classCallCheck(this,IfcFontVariant);this.value=value;this.type=1;});IFC4X32.IfcFontVariant=IfcFontVariant;var IfcFontWeight=/*#__PURE__*/_createClass(function IfcFontWeight(value){_classCallCheck(this,IfcFontWeight);this.value=value;this.type=1;});IFC4X32.IfcFontWeight=IfcFontWeight;var IfcForceMeasure=/*#__PURE__*/_createClass(function IfcForceMeasure(v){_classCallCheck(this,IfcForceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcForceMeasure=IfcForceMeasure;var IfcFrequencyMeasure=/*#__PURE__*/_createClass(function IfcFrequencyMeasure(v){_classCallCheck(this,IfcFrequencyMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcFrequencyMeasure=IfcFrequencyMeasure;var IfcGloballyUniqueId=/*#__PURE__*/_createClass(function IfcGloballyUniqueId(value){_classCallCheck(this,IfcGloballyUniqueId);this.value=value;this.type=1;});IFC4X32.IfcGloballyUniqueId=IfcGloballyUniqueId;var IfcHeatFluxDensityMeasure=/*#__PURE__*/_createClass(function IfcHeatFluxDensityMeasure(v){_classCallCheck(this,IfcHeatFluxDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcHeatFluxDensityMeasure=IfcHeatFluxDensityMeasure;var IfcHeatingValueMeasure=/*#__PURE__*/_createClass(function IfcHeatingValueMeasure(v){_classCallCheck(this,IfcHeatingValueMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcHeatingValueMeasure=IfcHeatingValueMeasure;var IfcIdentifier=/*#__PURE__*/_createClass(function IfcIdentifier(value){_classCallCheck(this,IfcIdentifier);this.value=value;this.type=1;});IFC4X32.IfcIdentifier=IfcIdentifier;var IfcIlluminanceMeasure=/*#__PURE__*/_createClass(function IfcIlluminanceMeasure(v){_classCallCheck(this,IfcIlluminanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcIlluminanceMeasure=IfcIlluminanceMeasure;var IfcInductanceMeasure=/*#__PURE__*/_createClass(function IfcInductanceMeasure(v){_classCallCheck(this,IfcInductanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcInductanceMeasure=IfcInductanceMeasure;var IfcInteger=/*#__PURE__*/_createClass(function IfcInteger(v){_classCallCheck(this,IfcInteger);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcInteger=IfcInteger;var IfcIntegerCountRateMeasure=/*#__PURE__*/_createClass(function IfcIntegerCountRateMeasure(v){_classCallCheck(this,IfcIntegerCountRateMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcIntegerCountRateMeasure=IfcIntegerCountRateMeasure;var IfcIonConcentrationMeasure=/*#__PURE__*/_createClass(function IfcIonConcentrationMeasure(v){_classCallCheck(this,IfcIonConcentrationMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcIonConcentrationMeasure=IfcIonConcentrationMeasure;var IfcIsothermalMoistureCapacityMeasure=/*#__PURE__*/_createClass(function IfcIsothermalMoistureCapacityMeasure(v){_classCallCheck(this,IfcIsothermalMoistureCapacityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcIsothermalMoistureCapacityMeasure=IfcIsothermalMoistureCapacityMeasure;var IfcKinematicViscosityMeasure=/*#__PURE__*/_createClass(function IfcKinematicViscosityMeasure(v){_classCallCheck(this,IfcKinematicViscosityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcKinematicViscosityMeasure=IfcKinematicViscosityMeasure;var IfcLabel=/*#__PURE__*/_createClass(function IfcLabel(value){_classCallCheck(this,IfcLabel);this.value=value;this.type=1;});IFC4X32.IfcLabel=IfcLabel;var IfcLanguageId=/*#__PURE__*/_createClass(function IfcLanguageId(value){_classCallCheck(this,IfcLanguageId);this.value=value;this.type=1;});IFC4X32.IfcLanguageId=IfcLanguageId;var IfcLengthMeasure=/*#__PURE__*/_createClass(function IfcLengthMeasure(v){_classCallCheck(this,IfcLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLengthMeasure=IfcLengthMeasure;var IfcLineIndex=/*#__PURE__*/_createClass(function IfcLineIndex(value){_classCallCheck(this,IfcLineIndex);this.value=value;});IFC4X32.IfcLineIndex=IfcLineIndex;var IfcLinearForceMeasure=/*#__PURE__*/_createClass(function IfcLinearForceMeasure(v){_classCallCheck(this,IfcLinearForceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLinearForceMeasure=IfcLinearForceMeasure;var IfcLinearMomentMeasure=/*#__PURE__*/_createClass(function IfcLinearMomentMeasure(v){_classCallCheck(this,IfcLinearMomentMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLinearMomentMeasure=IfcLinearMomentMeasure;var IfcLinearStiffnessMeasure=/*#__PURE__*/_createClass(function IfcLinearStiffnessMeasure(v){_classCallCheck(this,IfcLinearStiffnessMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLinearStiffnessMeasure=IfcLinearStiffnessMeasure;var IfcLinearVelocityMeasure=/*#__PURE__*/_createClass(function IfcLinearVelocityMeasure(v){_classCallCheck(this,IfcLinearVelocityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLinearVelocityMeasure=IfcLinearVelocityMeasure;var IfcLogical=/*#__PURE__*/_createClass(function IfcLogical(v){_classCallCheck(this,IfcLogical);this.type=3;this.value=v=="true"?true:false;});IFC4X32.IfcLogical=IfcLogical;var IfcLuminousFluxMeasure=/*#__PURE__*/_createClass(function IfcLuminousFluxMeasure(v){_classCallCheck(this,IfcLuminousFluxMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLuminousFluxMeasure=IfcLuminousFluxMeasure;var IfcLuminousIntensityDistributionMeasure=/*#__PURE__*/_createClass(function IfcLuminousIntensityDistributionMeasure(v){_classCallCheck(this,IfcLuminousIntensityDistributionMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLuminousIntensityDistributionMeasure=IfcLuminousIntensityDistributionMeasure;var IfcLuminousIntensityMeasure=/*#__PURE__*/_createClass(function IfcLuminousIntensityMeasure(v){_classCallCheck(this,IfcLuminousIntensityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcLuminousIntensityMeasure=IfcLuminousIntensityMeasure;var IfcMagneticFluxDensityMeasure=/*#__PURE__*/_createClass(function IfcMagneticFluxDensityMeasure(v){_classCallCheck(this,IfcMagneticFluxDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMagneticFluxDensityMeasure=IfcMagneticFluxDensityMeasure;var IfcMagneticFluxMeasure=/*#__PURE__*/_createClass(function IfcMagneticFluxMeasure(v){_classCallCheck(this,IfcMagneticFluxMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMagneticFluxMeasure=IfcMagneticFluxMeasure;var IfcMassDensityMeasure=/*#__PURE__*/_createClass(function IfcMassDensityMeasure(v){_classCallCheck(this,IfcMassDensityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMassDensityMeasure=IfcMassDensityMeasure;var IfcMassFlowRateMeasure=/*#__PURE__*/_createClass(function IfcMassFlowRateMeasure(v){_classCallCheck(this,IfcMassFlowRateMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMassFlowRateMeasure=IfcMassFlowRateMeasure;var IfcMassMeasure=/*#__PURE__*/_createClass(function IfcMassMeasure(v){_classCallCheck(this,IfcMassMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMassMeasure=IfcMassMeasure;var IfcMassPerLengthMeasure=/*#__PURE__*/_createClass(function IfcMassPerLengthMeasure(v){_classCallCheck(this,IfcMassPerLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMassPerLengthMeasure=IfcMassPerLengthMeasure;var IfcModulusOfElasticityMeasure=/*#__PURE__*/_createClass(function IfcModulusOfElasticityMeasure(v){_classCallCheck(this,IfcModulusOfElasticityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcModulusOfElasticityMeasure=IfcModulusOfElasticityMeasure;var IfcModulusOfLinearSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfLinearSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfLinearSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcModulusOfLinearSubgradeReactionMeasure=IfcModulusOfLinearSubgradeReactionMeasure;var IfcModulusOfRotationalSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfRotationalSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfRotationalSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcModulusOfRotationalSubgradeReactionMeasure=IfcModulusOfRotationalSubgradeReactionMeasure;var IfcModulusOfSubgradeReactionMeasure=/*#__PURE__*/_createClass(function IfcModulusOfSubgradeReactionMeasure(v){_classCallCheck(this,IfcModulusOfSubgradeReactionMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcModulusOfSubgradeReactionMeasure=IfcModulusOfSubgradeReactionMeasure;var IfcMoistureDiffusivityMeasure=/*#__PURE__*/_createClass(function IfcMoistureDiffusivityMeasure(v){_classCallCheck(this,IfcMoistureDiffusivityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMoistureDiffusivityMeasure=IfcMoistureDiffusivityMeasure;var IfcMolecularWeightMeasure=/*#__PURE__*/_createClass(function IfcMolecularWeightMeasure(v){_classCallCheck(this,IfcMolecularWeightMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMolecularWeightMeasure=IfcMolecularWeightMeasure;var IfcMomentOfInertiaMeasure=/*#__PURE__*/_createClass(function IfcMomentOfInertiaMeasure(v){_classCallCheck(this,IfcMomentOfInertiaMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMomentOfInertiaMeasure=IfcMomentOfInertiaMeasure;var IfcMonetaryMeasure=/*#__PURE__*/_createClass(function IfcMonetaryMeasure(v){_classCallCheck(this,IfcMonetaryMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMonetaryMeasure=IfcMonetaryMeasure;var IfcMonthInYearNumber=/*#__PURE__*/_createClass(function IfcMonthInYearNumber(v){_classCallCheck(this,IfcMonthInYearNumber);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcMonthInYearNumber=IfcMonthInYearNumber;var IfcNonNegativeLengthMeasure=/*#__PURE__*/_createClass(function IfcNonNegativeLengthMeasure(v){_classCallCheck(this,IfcNonNegativeLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcNonNegativeLengthMeasure=IfcNonNegativeLengthMeasure;var IfcNormalisedRatioMeasure=/*#__PURE__*/_createClass(function IfcNormalisedRatioMeasure(v){_classCallCheck(this,IfcNormalisedRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcNormalisedRatioMeasure=IfcNormalisedRatioMeasure;var IfcNumericMeasure=/*#__PURE__*/_createClass(function IfcNumericMeasure(v){_classCallCheck(this,IfcNumericMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcNumericMeasure=IfcNumericMeasure;var IfcPHMeasure=/*#__PURE__*/_createClass(function IfcPHMeasure(v){_classCallCheck(this,IfcPHMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPHMeasure=IfcPHMeasure;var IfcParameterValue=/*#__PURE__*/_createClass(function IfcParameterValue(v){_classCallCheck(this,IfcParameterValue);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcParameterValue=IfcParameterValue;var IfcPlanarForceMeasure=/*#__PURE__*/_createClass(function IfcPlanarForceMeasure(v){_classCallCheck(this,IfcPlanarForceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPlanarForceMeasure=IfcPlanarForceMeasure;var IfcPlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcPlaneAngleMeasure(v){_classCallCheck(this,IfcPlaneAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPlaneAngleMeasure=IfcPlaneAngleMeasure;var IfcPositiveInteger=/*#__PURE__*/_createClass(function IfcPositiveInteger(v){_classCallCheck(this,IfcPositiveInteger);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPositiveInteger=IfcPositiveInteger;var IfcPositiveLengthMeasure=/*#__PURE__*/_createClass(function IfcPositiveLengthMeasure(v){_classCallCheck(this,IfcPositiveLengthMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPositiveLengthMeasure=IfcPositiveLengthMeasure;var IfcPositivePlaneAngleMeasure=/*#__PURE__*/_createClass(function IfcPositivePlaneAngleMeasure(v){_classCallCheck(this,IfcPositivePlaneAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPositivePlaneAngleMeasure=IfcPositivePlaneAngleMeasure;var IfcPositiveRatioMeasure=/*#__PURE__*/_createClass(function IfcPositiveRatioMeasure(v){_classCallCheck(this,IfcPositiveRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPositiveRatioMeasure=IfcPositiveRatioMeasure;var IfcPowerMeasure=/*#__PURE__*/_createClass(function IfcPowerMeasure(v){_classCallCheck(this,IfcPowerMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPowerMeasure=IfcPowerMeasure;var IfcPresentableText=/*#__PURE__*/_createClass(function IfcPresentableText(value){_classCallCheck(this,IfcPresentableText);this.value=value;this.type=1;});IFC4X32.IfcPresentableText=IfcPresentableText;var IfcPressureMeasure=/*#__PURE__*/_createClass(function IfcPressureMeasure(v){_classCallCheck(this,IfcPressureMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcPressureMeasure=IfcPressureMeasure;var IfcPropertySetDefinitionSet=/*#__PURE__*/_createClass(function IfcPropertySetDefinitionSet(value){_classCallCheck(this,IfcPropertySetDefinitionSet);this.value=value;});IFC4X32.IfcPropertySetDefinitionSet=IfcPropertySetDefinitionSet;var IfcRadioActivityMeasure=/*#__PURE__*/_createClass(function IfcRadioActivityMeasure(v){_classCallCheck(this,IfcRadioActivityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcRadioActivityMeasure=IfcRadioActivityMeasure;var IfcRatioMeasure=/*#__PURE__*/_createClass(function IfcRatioMeasure(v){_classCallCheck(this,IfcRatioMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcRatioMeasure=IfcRatioMeasure;var IfcReal=/*#__PURE__*/_createClass(function IfcReal(v){_classCallCheck(this,IfcReal);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcReal=IfcReal;var IfcRotationalFrequencyMeasure=/*#__PURE__*/_createClass(function IfcRotationalFrequencyMeasure(v){_classCallCheck(this,IfcRotationalFrequencyMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcRotationalFrequencyMeasure=IfcRotationalFrequencyMeasure;var IfcRotationalMassMeasure=/*#__PURE__*/_createClass(function IfcRotationalMassMeasure(v){_classCallCheck(this,IfcRotationalMassMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcRotationalMassMeasure=IfcRotationalMassMeasure;var IfcRotationalStiffnessMeasure=/*#__PURE__*/_createClass(function IfcRotationalStiffnessMeasure(v){_classCallCheck(this,IfcRotationalStiffnessMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcRotationalStiffnessMeasure=IfcRotationalStiffnessMeasure;var IfcSectionModulusMeasure=/*#__PURE__*/_createClass(function IfcSectionModulusMeasure(v){_classCallCheck(this,IfcSectionModulusMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSectionModulusMeasure=IfcSectionModulusMeasure;var IfcSectionalAreaIntegralMeasure=/*#__PURE__*/_createClass(function IfcSectionalAreaIntegralMeasure(v){_classCallCheck(this,IfcSectionalAreaIntegralMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSectionalAreaIntegralMeasure=IfcSectionalAreaIntegralMeasure;var IfcShearModulusMeasure=/*#__PURE__*/_createClass(function IfcShearModulusMeasure(v){_classCallCheck(this,IfcShearModulusMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcShearModulusMeasure=IfcShearModulusMeasure;var IfcSolidAngleMeasure=/*#__PURE__*/_createClass(function IfcSolidAngleMeasure(v){_classCallCheck(this,IfcSolidAngleMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSolidAngleMeasure=IfcSolidAngleMeasure;var IfcSoundPowerLevelMeasure=/*#__PURE__*/_createClass(function IfcSoundPowerLevelMeasure(v){_classCallCheck(this,IfcSoundPowerLevelMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSoundPowerLevelMeasure=IfcSoundPowerLevelMeasure;var IfcSoundPowerMeasure=/*#__PURE__*/_createClass(function IfcSoundPowerMeasure(v){_classCallCheck(this,IfcSoundPowerMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSoundPowerMeasure=IfcSoundPowerMeasure;var IfcSoundPressureLevelMeasure=/*#__PURE__*/_createClass(function IfcSoundPressureLevelMeasure(v){_classCallCheck(this,IfcSoundPressureLevelMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSoundPressureLevelMeasure=IfcSoundPressureLevelMeasure;var IfcSoundPressureMeasure=/*#__PURE__*/_createClass(function IfcSoundPressureMeasure(v){_classCallCheck(this,IfcSoundPressureMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSoundPressureMeasure=IfcSoundPressureMeasure;var IfcSpecificHeatCapacityMeasure=/*#__PURE__*/_createClass(function IfcSpecificHeatCapacityMeasure(v){_classCallCheck(this,IfcSpecificHeatCapacityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSpecificHeatCapacityMeasure=IfcSpecificHeatCapacityMeasure;var IfcSpecularExponent=/*#__PURE__*/_createClass(function IfcSpecularExponent(v){_classCallCheck(this,IfcSpecularExponent);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSpecularExponent=IfcSpecularExponent;var IfcSpecularRoughness=/*#__PURE__*/_createClass(function IfcSpecularRoughness(v){_classCallCheck(this,IfcSpecularRoughness);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcSpecularRoughness=IfcSpecularRoughness;var IfcTemperatureGradientMeasure=/*#__PURE__*/_createClass(function IfcTemperatureGradientMeasure(v){_classCallCheck(this,IfcTemperatureGradientMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcTemperatureGradientMeasure=IfcTemperatureGradientMeasure;var IfcTemperatureRateOfChangeMeasure=/*#__PURE__*/_createClass(function IfcTemperatureRateOfChangeMeasure(v){_classCallCheck(this,IfcTemperatureRateOfChangeMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcTemperatureRateOfChangeMeasure=IfcTemperatureRateOfChangeMeasure;var IfcText=/*#__PURE__*/_createClass(function IfcText(value){_classCallCheck(this,IfcText);this.value=value;this.type=1;});IFC4X32.IfcText=IfcText;var IfcTextAlignment=/*#__PURE__*/_createClass(function IfcTextAlignment(value){_classCallCheck(this,IfcTextAlignment);this.value=value;this.type=1;});IFC4X32.IfcTextAlignment=IfcTextAlignment;var IfcTextDecoration=/*#__PURE__*/_createClass(function IfcTextDecoration(value){_classCallCheck(this,IfcTextDecoration);this.value=value;this.type=1;});IFC4X32.IfcTextDecoration=IfcTextDecoration;var IfcTextFontName=/*#__PURE__*/_createClass(function IfcTextFontName(value){_classCallCheck(this,IfcTextFontName);this.value=value;this.type=1;});IFC4X32.IfcTextFontName=IfcTextFontName;var IfcTextTransformation=/*#__PURE__*/_createClass(function IfcTextTransformation(value){_classCallCheck(this,IfcTextTransformation);this.value=value;this.type=1;});IFC4X32.IfcTextTransformation=IfcTextTransformation;var IfcThermalAdmittanceMeasure=/*#__PURE__*/_createClass(function IfcThermalAdmittanceMeasure(v){_classCallCheck(this,IfcThermalAdmittanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcThermalAdmittanceMeasure=IfcThermalAdmittanceMeasure;var IfcThermalConductivityMeasure=/*#__PURE__*/_createClass(function IfcThermalConductivityMeasure(v){_classCallCheck(this,IfcThermalConductivityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcThermalConductivityMeasure=IfcThermalConductivityMeasure;var IfcThermalExpansionCoefficientMeasure=/*#__PURE__*/_createClass(function IfcThermalExpansionCoefficientMeasure(v){_classCallCheck(this,IfcThermalExpansionCoefficientMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcThermalExpansionCoefficientMeasure=IfcThermalExpansionCoefficientMeasure;var IfcThermalResistanceMeasure=/*#__PURE__*/_createClass(function IfcThermalResistanceMeasure(v){_classCallCheck(this,IfcThermalResistanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcThermalResistanceMeasure=IfcThermalResistanceMeasure;var IfcThermalTransmittanceMeasure=/*#__PURE__*/_createClass(function IfcThermalTransmittanceMeasure(v){_classCallCheck(this,IfcThermalTransmittanceMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcThermalTransmittanceMeasure=IfcThermalTransmittanceMeasure;var IfcThermodynamicTemperatureMeasure=/*#__PURE__*/_createClass(function IfcThermodynamicTemperatureMeasure(v){_classCallCheck(this,IfcThermodynamicTemperatureMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcThermodynamicTemperatureMeasure=IfcThermodynamicTemperatureMeasure;var IfcTime=/*#__PURE__*/_createClass(function IfcTime(value){_classCallCheck(this,IfcTime);this.value=value;this.type=1;});IFC4X32.IfcTime=IfcTime;var IfcTimeMeasure=/*#__PURE__*/_createClass(function IfcTimeMeasure(v){_classCallCheck(this,IfcTimeMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcTimeMeasure=IfcTimeMeasure;var IfcTimeStamp=/*#__PURE__*/_createClass(function IfcTimeStamp(v){_classCallCheck(this,IfcTimeStamp);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcTimeStamp=IfcTimeStamp;var IfcTorqueMeasure=/*#__PURE__*/_createClass(function IfcTorqueMeasure(v){_classCallCheck(this,IfcTorqueMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcTorqueMeasure=IfcTorqueMeasure;var IfcURIReference=/*#__PURE__*/_createClass(function IfcURIReference(value){_classCallCheck(this,IfcURIReference);this.value=value;this.type=1;});IFC4X32.IfcURIReference=IfcURIReference;var IfcVaporPermeabilityMeasure=/*#__PURE__*/_createClass(function IfcVaporPermeabilityMeasure(v){_classCallCheck(this,IfcVaporPermeabilityMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcVaporPermeabilityMeasure=IfcVaporPermeabilityMeasure;var IfcVolumeMeasure=/*#__PURE__*/_createClass(function IfcVolumeMeasure(v){_classCallCheck(this,IfcVolumeMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcVolumeMeasure=IfcVolumeMeasure;var IfcVolumetricFlowRateMeasure=/*#__PURE__*/_createClass(function IfcVolumetricFlowRateMeasure(v){_classCallCheck(this,IfcVolumetricFlowRateMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcVolumetricFlowRateMeasure=IfcVolumetricFlowRateMeasure;var IfcWarpingConstantMeasure=/*#__PURE__*/_createClass(function IfcWarpingConstantMeasure(v){_classCallCheck(this,IfcWarpingConstantMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcWarpingConstantMeasure=IfcWarpingConstantMeasure;var IfcWarpingMomentMeasure=/*#__PURE__*/_createClass(function IfcWarpingMomentMeasure(v){_classCallCheck(this,IfcWarpingMomentMeasure);this.type=4;this.value=parseFloat(v);});IFC4X32.IfcWarpingMomentMeasure=IfcWarpingMomentMeasure;var IfcActionRequestTypeEnum=/*#__PURE__*/_createClass(function IfcActionRequestTypeEnum(){_classCallCheck(this,IfcActionRequestTypeEnum);});IfcActionRequestTypeEnum.EMAIL={type:3,value:"EMAIL"};IfcActionRequestTypeEnum.FAX={type:3,value:"FAX"};IfcActionRequestTypeEnum.PHONE={type:3,value:"PHONE"};IfcActionRequestTypeEnum.POST={type:3,value:"POST"};IfcActionRequestTypeEnum.VERBAL={type:3,value:"VERBAL"};IfcActionRequestTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionRequestTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcActionRequestTypeEnum=IfcActionRequestTypeEnum;var IfcActionSourceTypeEnum=/*#__PURE__*/_createClass(function IfcActionSourceTypeEnum(){_classCallCheck(this,IfcActionSourceTypeEnum);});IfcActionSourceTypeEnum.BRAKES={type:3,value:"BRAKES"};IfcActionSourceTypeEnum.BUOYANCY={type:3,value:"BUOYANCY"};IfcActionSourceTypeEnum.COMPLETION_G1={type:3,value:"COMPLETION_G1"};IfcActionSourceTypeEnum.CREEP={type:3,value:"CREEP"};IfcActionSourceTypeEnum.CURRENT={type:3,value:"CURRENT"};IfcActionSourceTypeEnum.DEAD_LOAD_G={type:3,value:"DEAD_LOAD_G"};IfcActionSourceTypeEnum.EARTHQUAKE_E={type:3,value:"EARTHQUAKE_E"};IfcActionSourceTypeEnum.ERECTION={type:3,value:"ERECTION"};IfcActionSourceTypeEnum.FIRE={type:3,value:"FIRE"};IfcActionSourceTypeEnum.ICE={type:3,value:"ICE"};IfcActionSourceTypeEnum.IMPACT={type:3,value:"IMPACT"};IfcActionSourceTypeEnum.IMPULSE={type:3,value:"IMPULSE"};IfcActionSourceTypeEnum.LACK_OF_FIT={type:3,value:"LACK_OF_FIT"};IfcActionSourceTypeEnum.LIVE_LOAD_Q={type:3,value:"LIVE_LOAD_Q"};IfcActionSourceTypeEnum.PRESTRESSING_P={type:3,value:"PRESTRESSING_P"};IfcActionSourceTypeEnum.PROPPING={type:3,value:"PROPPING"};IfcActionSourceTypeEnum.RAIN={type:3,value:"RAIN"};IfcActionSourceTypeEnum.SETTLEMENT_U={type:3,value:"SETTLEMENT_U"};IfcActionSourceTypeEnum.SHRINKAGE={type:3,value:"SHRINKAGE"};IfcActionSourceTypeEnum.SNOW_S={type:3,value:"SNOW_S"};IfcActionSourceTypeEnum.SYSTEM_IMPERFECTION={type:3,value:"SYSTEM_IMPERFECTION"};IfcActionSourceTypeEnum.TEMPERATURE_T={type:3,value:"TEMPERATURE_T"};IfcActionSourceTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcActionSourceTypeEnum.WAVE={type:3,value:"WAVE"};IfcActionSourceTypeEnum.WIND_W={type:3,value:"WIND_W"};IfcActionSourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionSourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcActionSourceTypeEnum=IfcActionSourceTypeEnum;var IfcActionTypeEnum=/*#__PURE__*/_createClass(function IfcActionTypeEnum(){_classCallCheck(this,IfcActionTypeEnum);});IfcActionTypeEnum.EXTRAORDINARY_A={type:3,value:"EXTRAORDINARY_A"};IfcActionTypeEnum.PERMANENT_G={type:3,value:"PERMANENT_G"};IfcActionTypeEnum.VARIABLE_Q={type:3,value:"VARIABLE_Q"};IfcActionTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcActionTypeEnum=IfcActionTypeEnum;var IfcActuatorTypeEnum=/*#__PURE__*/_createClass(function IfcActuatorTypeEnum(){_classCallCheck(this,IfcActuatorTypeEnum);});IfcActuatorTypeEnum.ELECTRICACTUATOR={type:3,value:"ELECTRICACTUATOR"};IfcActuatorTypeEnum.HANDOPERATEDACTUATOR={type:3,value:"HANDOPERATEDACTUATOR"};IfcActuatorTypeEnum.HYDRAULICACTUATOR={type:3,value:"HYDRAULICACTUATOR"};IfcActuatorTypeEnum.PNEUMATICACTUATOR={type:3,value:"PNEUMATICACTUATOR"};IfcActuatorTypeEnum.THERMOSTATICACTUATOR={type:3,value:"THERMOSTATICACTUATOR"};IfcActuatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcActuatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcActuatorTypeEnum=IfcActuatorTypeEnum;var IfcAddressTypeEnum=/*#__PURE__*/_createClass(function IfcAddressTypeEnum(){_classCallCheck(this,IfcAddressTypeEnum);});IfcAddressTypeEnum.DISTRIBUTIONPOINT={type:3,value:"DISTRIBUTIONPOINT"};IfcAddressTypeEnum.HOME={type:3,value:"HOME"};IfcAddressTypeEnum.OFFICE={type:3,value:"OFFICE"};IfcAddressTypeEnum.SITE={type:3,value:"SITE"};IfcAddressTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC4X32.IfcAddressTypeEnum=IfcAddressTypeEnum;var IfcAirTerminalBoxTypeEnum=/*#__PURE__*/_createClass(function IfcAirTerminalBoxTypeEnum(){_classCallCheck(this,IfcAirTerminalBoxTypeEnum);});IfcAirTerminalBoxTypeEnum.CONSTANTFLOW={type:3,value:"CONSTANTFLOW"};IfcAirTerminalBoxTypeEnum.VARIABLEFLOWPRESSUREDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREDEPENDANT"};IfcAirTerminalBoxTypeEnum.VARIABLEFLOWPRESSUREINDEPENDANT={type:3,value:"VARIABLEFLOWPRESSUREINDEPENDANT"};IfcAirTerminalBoxTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirTerminalBoxTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAirTerminalBoxTypeEnum=IfcAirTerminalBoxTypeEnum;var IfcAirTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcAirTerminalTypeEnum(){_classCallCheck(this,IfcAirTerminalTypeEnum);});IfcAirTerminalTypeEnum.DIFFUSER={type:3,value:"DIFFUSER"};IfcAirTerminalTypeEnum.GRILLE={type:3,value:"GRILLE"};IfcAirTerminalTypeEnum.LOUVRE={type:3,value:"LOUVRE"};IfcAirTerminalTypeEnum.REGISTER={type:3,value:"REGISTER"};IfcAirTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAirTerminalTypeEnum=IfcAirTerminalTypeEnum;var IfcAirToAirHeatRecoveryTypeEnum=/*#__PURE__*/_createClass(function IfcAirToAirHeatRecoveryTypeEnum(){_classCallCheck(this,IfcAirToAirHeatRecoveryTypeEnum);});IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATECOUNTERFLOWEXCHANGER={type:3,value:"FIXEDPLATECOUNTERFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATECROSSFLOWEXCHANGER={type:3,value:"FIXEDPLATECROSSFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.FIXEDPLATEPARALLELFLOWEXCHANGER={type:3,value:"FIXEDPLATEPARALLELFLOWEXCHANGER"};IfcAirToAirHeatRecoveryTypeEnum.HEATPIPE={type:3,value:"HEATPIPE"};IfcAirToAirHeatRecoveryTypeEnum.ROTARYWHEEL={type:3,value:"ROTARYWHEEL"};IfcAirToAirHeatRecoveryTypeEnum.RUNAROUNDCOILLOOP={type:3,value:"RUNAROUNDCOILLOOP"};IfcAirToAirHeatRecoveryTypeEnum.THERMOSIPHONCOILTYPEHEATEXCHANGERS={type:3,value:"THERMOSIPHONCOILTYPEHEATEXCHANGERS"};IfcAirToAirHeatRecoveryTypeEnum.THERMOSIPHONSEALEDTUBEHEATEXCHANGERS={type:3,value:"THERMOSIPHONSEALEDTUBEHEATEXCHANGERS"};IfcAirToAirHeatRecoveryTypeEnum.TWINTOWERENTHALPYRECOVERYLOOPS={type:3,value:"TWINTOWERENTHALPYRECOVERYLOOPS"};IfcAirToAirHeatRecoveryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAirToAirHeatRecoveryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAirToAirHeatRecoveryTypeEnum=IfcAirToAirHeatRecoveryTypeEnum;var IfcAlarmTypeEnum=/*#__PURE__*/_createClass(function IfcAlarmTypeEnum(){_classCallCheck(this,IfcAlarmTypeEnum);});IfcAlarmTypeEnum.BELL={type:3,value:"BELL"};IfcAlarmTypeEnum.BREAKGLASSBUTTON={type:3,value:"BREAKGLASSBUTTON"};IfcAlarmTypeEnum.LIGHT={type:3,value:"LIGHT"};IfcAlarmTypeEnum.MANUALPULLBOX={type:3,value:"MANUALPULLBOX"};IfcAlarmTypeEnum.RAILWAYCROCODILE={type:3,value:"RAILWAYCROCODILE"};IfcAlarmTypeEnum.RAILWAYDETONATOR={type:3,value:"RAILWAYDETONATOR"};IfcAlarmTypeEnum.SIREN={type:3,value:"SIREN"};IfcAlarmTypeEnum.WHISTLE={type:3,value:"WHISTLE"};IfcAlarmTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAlarmTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAlarmTypeEnum=IfcAlarmTypeEnum;var IfcAlignmentCantSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcAlignmentCantSegmentTypeEnum(){_classCallCheck(this,IfcAlignmentCantSegmentTypeEnum);});IfcAlignmentCantSegmentTypeEnum.BLOSSCURVE={type:3,value:"BLOSSCURVE"};IfcAlignmentCantSegmentTypeEnum.CONSTANTCANT={type:3,value:"CONSTANTCANT"};IfcAlignmentCantSegmentTypeEnum.COSINECURVE={type:3,value:"COSINECURVE"};IfcAlignmentCantSegmentTypeEnum.HELMERTCURVE={type:3,value:"HELMERTCURVE"};IfcAlignmentCantSegmentTypeEnum.LINEARTRANSITION={type:3,value:"LINEARTRANSITION"};IfcAlignmentCantSegmentTypeEnum.SINECURVE={type:3,value:"SINECURVE"};IfcAlignmentCantSegmentTypeEnum.VIENNESEBEND={type:3,value:"VIENNESEBEND"};IFC4X32.IfcAlignmentCantSegmentTypeEnum=IfcAlignmentCantSegmentTypeEnum;var IfcAlignmentHorizontalSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcAlignmentHorizontalSegmentTypeEnum(){_classCallCheck(this,IfcAlignmentHorizontalSegmentTypeEnum);});IfcAlignmentHorizontalSegmentTypeEnum.BLOSSCURVE={type:3,value:"BLOSSCURVE"};IfcAlignmentHorizontalSegmentTypeEnum.CIRCULARARC={type:3,value:"CIRCULARARC"};IfcAlignmentHorizontalSegmentTypeEnum.CLOTHOID={type:3,value:"CLOTHOID"};IfcAlignmentHorizontalSegmentTypeEnum.COSINECURVE={type:3,value:"COSINECURVE"};IfcAlignmentHorizontalSegmentTypeEnum.CUBIC={type:3,value:"CUBIC"};IfcAlignmentHorizontalSegmentTypeEnum.HELMERTCURVE={type:3,value:"HELMERTCURVE"};IfcAlignmentHorizontalSegmentTypeEnum.LINE={type:3,value:"LINE"};IfcAlignmentHorizontalSegmentTypeEnum.SINECURVE={type:3,value:"SINECURVE"};IfcAlignmentHorizontalSegmentTypeEnum.VIENNESEBEND={type:3,value:"VIENNESEBEND"};IFC4X32.IfcAlignmentHorizontalSegmentTypeEnum=IfcAlignmentHorizontalSegmentTypeEnum;var IfcAlignmentTypeEnum=/*#__PURE__*/_createClass(function IfcAlignmentTypeEnum(){_classCallCheck(this,IfcAlignmentTypeEnum);});IfcAlignmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAlignmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAlignmentTypeEnum=IfcAlignmentTypeEnum;var IfcAlignmentVerticalSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcAlignmentVerticalSegmentTypeEnum(){_classCallCheck(this,IfcAlignmentVerticalSegmentTypeEnum);});IfcAlignmentVerticalSegmentTypeEnum.CIRCULARARC={type:3,value:"CIRCULARARC"};IfcAlignmentVerticalSegmentTypeEnum.CLOTHOID={type:3,value:"CLOTHOID"};IfcAlignmentVerticalSegmentTypeEnum.CONSTANTGRADIENT={type:3,value:"CONSTANTGRADIENT"};IfcAlignmentVerticalSegmentTypeEnum.PARABOLICARC={type:3,value:"PARABOLICARC"};IFC4X32.IfcAlignmentVerticalSegmentTypeEnum=IfcAlignmentVerticalSegmentTypeEnum;var IfcAnalysisModelTypeEnum=/*#__PURE__*/_createClass(function IfcAnalysisModelTypeEnum(){_classCallCheck(this,IfcAnalysisModelTypeEnum);});IfcAnalysisModelTypeEnum.IN_PLANE_LOADING_2D={type:3,value:"IN_PLANE_LOADING_2D"};IfcAnalysisModelTypeEnum.LOADING_3D={type:3,value:"LOADING_3D"};IfcAnalysisModelTypeEnum.OUT_PLANE_LOADING_2D={type:3,value:"OUT_PLANE_LOADING_2D"};IfcAnalysisModelTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAnalysisModelTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAnalysisModelTypeEnum=IfcAnalysisModelTypeEnum;var IfcAnalysisTheoryTypeEnum=/*#__PURE__*/_createClass(function IfcAnalysisTheoryTypeEnum(){_classCallCheck(this,IfcAnalysisTheoryTypeEnum);});IfcAnalysisTheoryTypeEnum.FIRST_ORDER_THEORY={type:3,value:"FIRST_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.FULL_NONLINEAR_THEORY={type:3,value:"FULL_NONLINEAR_THEORY"};IfcAnalysisTheoryTypeEnum.SECOND_ORDER_THEORY={type:3,value:"SECOND_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.THIRD_ORDER_THEORY={type:3,value:"THIRD_ORDER_THEORY"};IfcAnalysisTheoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAnalysisTheoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAnalysisTheoryTypeEnum=IfcAnalysisTheoryTypeEnum;var IfcAnnotationTypeEnum=/*#__PURE__*/_createClass(function IfcAnnotationTypeEnum(){_classCallCheck(this,IfcAnnotationTypeEnum);});IfcAnnotationTypeEnum.ASBUILTAREA={type:3,value:"ASBUILTAREA"};IfcAnnotationTypeEnum.ASBUILTLINE={type:3,value:"ASBUILTLINE"};IfcAnnotationTypeEnum.ASBUILTPOINT={type:3,value:"ASBUILTPOINT"};IfcAnnotationTypeEnum.ASSUMEDAREA={type:3,value:"ASSUMEDAREA"};IfcAnnotationTypeEnum.ASSUMEDLINE={type:3,value:"ASSUMEDLINE"};IfcAnnotationTypeEnum.ASSUMEDPOINT={type:3,value:"ASSUMEDPOINT"};IfcAnnotationTypeEnum.NON_PHYSICAL_SIGNAL={type:3,value:"NON_PHYSICAL_SIGNAL"};IfcAnnotationTypeEnum.SUPERELEVATIONEVENT={type:3,value:"SUPERELEVATIONEVENT"};IfcAnnotationTypeEnum.WIDTHEVENT={type:3,value:"WIDTHEVENT"};IfcAnnotationTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAnnotationTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAnnotationTypeEnum=IfcAnnotationTypeEnum;var IfcArithmeticOperatorEnum=/*#__PURE__*/_createClass(function IfcArithmeticOperatorEnum(){_classCallCheck(this,IfcArithmeticOperatorEnum);});IfcArithmeticOperatorEnum.ADD={type:3,value:"ADD"};IfcArithmeticOperatorEnum.DIVIDE={type:3,value:"DIVIDE"};IfcArithmeticOperatorEnum.MULTIPLY={type:3,value:"MULTIPLY"};IfcArithmeticOperatorEnum.SUBTRACT={type:3,value:"SUBTRACT"};IFC4X32.IfcArithmeticOperatorEnum=IfcArithmeticOperatorEnum;var IfcAssemblyPlaceEnum=/*#__PURE__*/_createClass(function IfcAssemblyPlaceEnum(){_classCallCheck(this,IfcAssemblyPlaceEnum);});IfcAssemblyPlaceEnum.FACTORY={type:3,value:"FACTORY"};IfcAssemblyPlaceEnum.SITE={type:3,value:"SITE"};IfcAssemblyPlaceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAssemblyPlaceEnum=IfcAssemblyPlaceEnum;var IfcAudioVisualApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcAudioVisualApplianceTypeEnum(){_classCallCheck(this,IfcAudioVisualApplianceTypeEnum);});IfcAudioVisualApplianceTypeEnum.AMPLIFIER={type:3,value:"AMPLIFIER"};IfcAudioVisualApplianceTypeEnum.CAMERA={type:3,value:"CAMERA"};IfcAudioVisualApplianceTypeEnum.COMMUNICATIONTERMINAL={type:3,value:"COMMUNICATIONTERMINAL"};IfcAudioVisualApplianceTypeEnum.DISPLAY={type:3,value:"DISPLAY"};IfcAudioVisualApplianceTypeEnum.MICROPHONE={type:3,value:"MICROPHONE"};IfcAudioVisualApplianceTypeEnum.PLAYER={type:3,value:"PLAYER"};IfcAudioVisualApplianceTypeEnum.PROJECTOR={type:3,value:"PROJECTOR"};IfcAudioVisualApplianceTypeEnum.RECEIVER={type:3,value:"RECEIVER"};IfcAudioVisualApplianceTypeEnum.RECORDINGEQUIPMENT={type:3,value:"RECORDINGEQUIPMENT"};IfcAudioVisualApplianceTypeEnum.SPEAKER={type:3,value:"SPEAKER"};IfcAudioVisualApplianceTypeEnum.SWITCHER={type:3,value:"SWITCHER"};IfcAudioVisualApplianceTypeEnum.TELEPHONE={type:3,value:"TELEPHONE"};IfcAudioVisualApplianceTypeEnum.TUNER={type:3,value:"TUNER"};IfcAudioVisualApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcAudioVisualApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcAudioVisualApplianceTypeEnum=IfcAudioVisualApplianceTypeEnum;var IfcBSplineCurveForm=/*#__PURE__*/_createClass(function IfcBSplineCurveForm(){_classCallCheck(this,IfcBSplineCurveForm);});IfcBSplineCurveForm.CIRCULAR_ARC={type:3,value:"CIRCULAR_ARC"};IfcBSplineCurveForm.ELLIPTIC_ARC={type:3,value:"ELLIPTIC_ARC"};IfcBSplineCurveForm.HYPERBOLIC_ARC={type:3,value:"HYPERBOLIC_ARC"};IfcBSplineCurveForm.PARABOLIC_ARC={type:3,value:"PARABOLIC_ARC"};IfcBSplineCurveForm.POLYLINE_FORM={type:3,value:"POLYLINE_FORM"};IfcBSplineCurveForm.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC4X32.IfcBSplineCurveForm=IfcBSplineCurveForm;var IfcBSplineSurfaceForm=/*#__PURE__*/_createClass(function IfcBSplineSurfaceForm(){_classCallCheck(this,IfcBSplineSurfaceForm);});IfcBSplineSurfaceForm.CONICAL_SURF={type:3,value:"CONICAL_SURF"};IfcBSplineSurfaceForm.CYLINDRICAL_SURF={type:3,value:"CYLINDRICAL_SURF"};IfcBSplineSurfaceForm.GENERALISED_CONE={type:3,value:"GENERALISED_CONE"};IfcBSplineSurfaceForm.PLANE_SURF={type:3,value:"PLANE_SURF"};IfcBSplineSurfaceForm.QUADRIC_SURF={type:3,value:"QUADRIC_SURF"};IfcBSplineSurfaceForm.RULED_SURF={type:3,value:"RULED_SURF"};IfcBSplineSurfaceForm.SPHERICAL_SURF={type:3,value:"SPHERICAL_SURF"};IfcBSplineSurfaceForm.SURF_OF_LINEAR_EXTRUSION={type:3,value:"SURF_OF_LINEAR_EXTRUSION"};IfcBSplineSurfaceForm.SURF_OF_REVOLUTION={type:3,value:"SURF_OF_REVOLUTION"};IfcBSplineSurfaceForm.TOROIDAL_SURF={type:3,value:"TOROIDAL_SURF"};IfcBSplineSurfaceForm.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC4X32.IfcBSplineSurfaceForm=IfcBSplineSurfaceForm;var IfcBeamTypeEnum=/*#__PURE__*/_createClass(function IfcBeamTypeEnum(){_classCallCheck(this,IfcBeamTypeEnum);});IfcBeamTypeEnum.BEAM={type:3,value:"BEAM"};IfcBeamTypeEnum.CORNICE={type:3,value:"CORNICE"};IfcBeamTypeEnum.DIAPHRAGM={type:3,value:"DIAPHRAGM"};IfcBeamTypeEnum.EDGEBEAM={type:3,value:"EDGEBEAM"};IfcBeamTypeEnum.GIRDER_SEGMENT={type:3,value:"GIRDER_SEGMENT"};IfcBeamTypeEnum.HATSTONE={type:3,value:"HATSTONE"};IfcBeamTypeEnum.HOLLOWCORE={type:3,value:"HOLLOWCORE"};IfcBeamTypeEnum.JOIST={type:3,value:"JOIST"};IfcBeamTypeEnum.LINTEL={type:3,value:"LINTEL"};IfcBeamTypeEnum.PIERCAP={type:3,value:"PIERCAP"};IfcBeamTypeEnum.SPANDREL={type:3,value:"SPANDREL"};IfcBeamTypeEnum.T_BEAM={type:3,value:"T_BEAM"};IfcBeamTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBeamTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBeamTypeEnum=IfcBeamTypeEnum;var IfcBearingTypeDisplacementEnum=/*#__PURE__*/_createClass(function IfcBearingTypeDisplacementEnum(){_classCallCheck(this,IfcBearingTypeDisplacementEnum);});IfcBearingTypeDisplacementEnum.FIXED_MOVEMENT={type:3,value:"FIXED_MOVEMENT"};IfcBearingTypeDisplacementEnum.FREE_MOVEMENT={type:3,value:"FREE_MOVEMENT"};IfcBearingTypeDisplacementEnum.GUIDED_LONGITUDINAL={type:3,value:"GUIDED_LONGITUDINAL"};IfcBearingTypeDisplacementEnum.GUIDED_TRANSVERSAL={type:3,value:"GUIDED_TRANSVERSAL"};IfcBearingTypeDisplacementEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBearingTypeDisplacementEnum=IfcBearingTypeDisplacementEnum;var IfcBearingTypeEnum=/*#__PURE__*/_createClass(function IfcBearingTypeEnum(){_classCallCheck(this,IfcBearingTypeEnum);});IfcBearingTypeEnum.CYLINDRICAL={type:3,value:"CYLINDRICAL"};IfcBearingTypeEnum.DISK={type:3,value:"DISK"};IfcBearingTypeEnum.ELASTOMERIC={type:3,value:"ELASTOMERIC"};IfcBearingTypeEnum.GUIDE={type:3,value:"GUIDE"};IfcBearingTypeEnum.POT={type:3,value:"POT"};IfcBearingTypeEnum.ROCKER={type:3,value:"ROCKER"};IfcBearingTypeEnum.ROLLER={type:3,value:"ROLLER"};IfcBearingTypeEnum.SPHERICAL={type:3,value:"SPHERICAL"};IfcBearingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBearingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBearingTypeEnum=IfcBearingTypeEnum;var IfcBenchmarkEnum=/*#__PURE__*/_createClass(function IfcBenchmarkEnum(){_classCallCheck(this,IfcBenchmarkEnum);});IfcBenchmarkEnum.EQUALTO={type:3,value:"EQUALTO"};IfcBenchmarkEnum.GREATERTHAN={type:3,value:"GREATERTHAN"};IfcBenchmarkEnum.GREATERTHANOREQUALTO={type:3,value:"GREATERTHANOREQUALTO"};IfcBenchmarkEnum.INCLUDEDIN={type:3,value:"INCLUDEDIN"};IfcBenchmarkEnum.INCLUDES={type:3,value:"INCLUDES"};IfcBenchmarkEnum.LESSTHAN={type:3,value:"LESSTHAN"};IfcBenchmarkEnum.LESSTHANOREQUALTO={type:3,value:"LESSTHANOREQUALTO"};IfcBenchmarkEnum.NOTEQUALTO={type:3,value:"NOTEQUALTO"};IfcBenchmarkEnum.NOTINCLUDEDIN={type:3,value:"NOTINCLUDEDIN"};IfcBenchmarkEnum.NOTINCLUDES={type:3,value:"NOTINCLUDES"};IFC4X32.IfcBenchmarkEnum=IfcBenchmarkEnum;var IfcBoilerTypeEnum=/*#__PURE__*/_createClass(function IfcBoilerTypeEnum(){_classCallCheck(this,IfcBoilerTypeEnum);});IfcBoilerTypeEnum.STEAM={type:3,value:"STEAM"};IfcBoilerTypeEnum.WATER={type:3,value:"WATER"};IfcBoilerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBoilerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBoilerTypeEnum=IfcBoilerTypeEnum;var IfcBooleanOperator=/*#__PURE__*/_createClass(function IfcBooleanOperator(){_classCallCheck(this,IfcBooleanOperator);});IfcBooleanOperator.DIFFERENCE={type:3,value:"DIFFERENCE"};IfcBooleanOperator.INTERSECTION={type:3,value:"INTERSECTION"};IfcBooleanOperator.UNION={type:3,value:"UNION"};IFC4X32.IfcBooleanOperator=IfcBooleanOperator;var IfcBridgePartTypeEnum=/*#__PURE__*/_createClass(function IfcBridgePartTypeEnum(){_classCallCheck(this,IfcBridgePartTypeEnum);});IfcBridgePartTypeEnum.ABUTMENT={type:3,value:"ABUTMENT"};IfcBridgePartTypeEnum.DECK={type:3,value:"DECK"};IfcBridgePartTypeEnum.DECK_SEGMENT={type:3,value:"DECK_SEGMENT"};IfcBridgePartTypeEnum.FOUNDATION={type:3,value:"FOUNDATION"};IfcBridgePartTypeEnum.PIER={type:3,value:"PIER"};IfcBridgePartTypeEnum.PIER_SEGMENT={type:3,value:"PIER_SEGMENT"};IfcBridgePartTypeEnum.PYLON={type:3,value:"PYLON"};IfcBridgePartTypeEnum.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"};IfcBridgePartTypeEnum.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"};IfcBridgePartTypeEnum.SURFACESTRUCTURE={type:3,value:"SURFACESTRUCTURE"};IfcBridgePartTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBridgePartTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBridgePartTypeEnum=IfcBridgePartTypeEnum;var IfcBridgeTypeEnum=/*#__PURE__*/_createClass(function IfcBridgeTypeEnum(){_classCallCheck(this,IfcBridgeTypeEnum);});IfcBridgeTypeEnum.ARCHED={type:3,value:"ARCHED"};IfcBridgeTypeEnum.CABLE_STAYED={type:3,value:"CABLE_STAYED"};IfcBridgeTypeEnum.CANTILEVER={type:3,value:"CANTILEVER"};IfcBridgeTypeEnum.CULVERT={type:3,value:"CULVERT"};IfcBridgeTypeEnum.FRAMEWORK={type:3,value:"FRAMEWORK"};IfcBridgeTypeEnum.GIRDER={type:3,value:"GIRDER"};IfcBridgeTypeEnum.SUSPENSION={type:3,value:"SUSPENSION"};IfcBridgeTypeEnum.TRUSS={type:3,value:"TRUSS"};IfcBridgeTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBridgeTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBridgeTypeEnum=IfcBridgeTypeEnum;var IfcBuildingElementPartTypeEnum=/*#__PURE__*/_createClass(function IfcBuildingElementPartTypeEnum(){_classCallCheck(this,IfcBuildingElementPartTypeEnum);});IfcBuildingElementPartTypeEnum.APRON={type:3,value:"APRON"};IfcBuildingElementPartTypeEnum.ARMOURUNIT={type:3,value:"ARMOURUNIT"};IfcBuildingElementPartTypeEnum.INSULATION={type:3,value:"INSULATION"};IfcBuildingElementPartTypeEnum.PRECASTPANEL={type:3,value:"PRECASTPANEL"};IfcBuildingElementPartTypeEnum.SAFETYCAGE={type:3,value:"SAFETYCAGE"};IfcBuildingElementPartTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuildingElementPartTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBuildingElementPartTypeEnum=IfcBuildingElementPartTypeEnum;var IfcBuildingElementProxyTypeEnum=/*#__PURE__*/_createClass(function IfcBuildingElementProxyTypeEnum(){_classCallCheck(this,IfcBuildingElementProxyTypeEnum);});IfcBuildingElementProxyTypeEnum.COMPLEX={type:3,value:"COMPLEX"};IfcBuildingElementProxyTypeEnum.ELEMENT={type:3,value:"ELEMENT"};IfcBuildingElementProxyTypeEnum.PARTIAL={type:3,value:"PARTIAL"};IfcBuildingElementProxyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuildingElementProxyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBuildingElementProxyTypeEnum=IfcBuildingElementProxyTypeEnum;var IfcBuildingSystemTypeEnum=/*#__PURE__*/_createClass(function IfcBuildingSystemTypeEnum(){_classCallCheck(this,IfcBuildingSystemTypeEnum);});IfcBuildingSystemTypeEnum.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"};IfcBuildingSystemTypeEnum.FENESTRATION={type:3,value:"FENESTRATION"};IfcBuildingSystemTypeEnum.FOUNDATION={type:3,value:"FOUNDATION"};IfcBuildingSystemTypeEnum.LOADBEARING={type:3,value:"LOADBEARING"};IfcBuildingSystemTypeEnum.OUTERSHELL={type:3,value:"OUTERSHELL"};IfcBuildingSystemTypeEnum.PRESTRESSING={type:3,value:"PRESTRESSING"};IfcBuildingSystemTypeEnum.REINFORCING={type:3,value:"REINFORCING"};IfcBuildingSystemTypeEnum.SHADING={type:3,value:"SHADING"};IfcBuildingSystemTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcBuildingSystemTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuildingSystemTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBuildingSystemTypeEnum=IfcBuildingSystemTypeEnum;var IfcBuiltSystemTypeEnum=/*#__PURE__*/_createClass(function IfcBuiltSystemTypeEnum(){_classCallCheck(this,IfcBuiltSystemTypeEnum);});IfcBuiltSystemTypeEnum.EROSIONPREVENTION={type:3,value:"EROSIONPREVENTION"};IfcBuiltSystemTypeEnum.FENESTRATION={type:3,value:"FENESTRATION"};IfcBuiltSystemTypeEnum.FOUNDATION={type:3,value:"FOUNDATION"};IfcBuiltSystemTypeEnum.LOADBEARING={type:3,value:"LOADBEARING"};IfcBuiltSystemTypeEnum.MOORING={type:3,value:"MOORING"};IfcBuiltSystemTypeEnum.OUTERSHELL={type:3,value:"OUTERSHELL"};IfcBuiltSystemTypeEnum.PRESTRESSING={type:3,value:"PRESTRESSING"};IfcBuiltSystemTypeEnum.RAILWAYLINE={type:3,value:"RAILWAYLINE"};IfcBuiltSystemTypeEnum.RAILWAYTRACK={type:3,value:"RAILWAYTRACK"};IfcBuiltSystemTypeEnum.REINFORCING={type:3,value:"REINFORCING"};IfcBuiltSystemTypeEnum.SHADING={type:3,value:"SHADING"};IfcBuiltSystemTypeEnum.TRACKCIRCUIT={type:3,value:"TRACKCIRCUIT"};IfcBuiltSystemTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcBuiltSystemTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBuiltSystemTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBuiltSystemTypeEnum=IfcBuiltSystemTypeEnum;var IfcBurnerTypeEnum=/*#__PURE__*/_createClass(function IfcBurnerTypeEnum(){_classCallCheck(this,IfcBurnerTypeEnum);});IfcBurnerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcBurnerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcBurnerTypeEnum=IfcBurnerTypeEnum;var IfcCableCarrierFittingTypeEnum=/*#__PURE__*/_createClass(function IfcCableCarrierFittingTypeEnum(){_classCallCheck(this,IfcCableCarrierFittingTypeEnum);});IfcCableCarrierFittingTypeEnum.BEND={type:3,value:"BEND"};IfcCableCarrierFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcCableCarrierFittingTypeEnum.CROSS={type:3,value:"CROSS"};IfcCableCarrierFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcCableCarrierFittingTypeEnum.TEE={type:3,value:"TEE"};IfcCableCarrierFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcCableCarrierFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableCarrierFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCableCarrierFittingTypeEnum=IfcCableCarrierFittingTypeEnum;var IfcCableCarrierSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcCableCarrierSegmentTypeEnum(){_classCallCheck(this,IfcCableCarrierSegmentTypeEnum);});IfcCableCarrierSegmentTypeEnum.CABLEBRACKET={type:3,value:"CABLEBRACKET"};IfcCableCarrierSegmentTypeEnum.CABLELADDERSEGMENT={type:3,value:"CABLELADDERSEGMENT"};IfcCableCarrierSegmentTypeEnum.CABLETRAYSEGMENT={type:3,value:"CABLETRAYSEGMENT"};IfcCableCarrierSegmentTypeEnum.CABLETRUNKINGSEGMENT={type:3,value:"CABLETRUNKINGSEGMENT"};IfcCableCarrierSegmentTypeEnum.CATENARYWIRE={type:3,value:"CATENARYWIRE"};IfcCableCarrierSegmentTypeEnum.CONDUITSEGMENT={type:3,value:"CONDUITSEGMENT"};IfcCableCarrierSegmentTypeEnum.DROPPER={type:3,value:"DROPPER"};IfcCableCarrierSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableCarrierSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCableCarrierSegmentTypeEnum=IfcCableCarrierSegmentTypeEnum;var IfcCableFittingTypeEnum=/*#__PURE__*/_createClass(function IfcCableFittingTypeEnum(){_classCallCheck(this,IfcCableFittingTypeEnum);});IfcCableFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcCableFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcCableFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcCableFittingTypeEnum.FANOUT={type:3,value:"FANOUT"};IfcCableFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcCableFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcCableFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCableFittingTypeEnum=IfcCableFittingTypeEnum;var IfcCableSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcCableSegmentTypeEnum(){_classCallCheck(this,IfcCableSegmentTypeEnum);});IfcCableSegmentTypeEnum.BUSBARSEGMENT={type:3,value:"BUSBARSEGMENT"};IfcCableSegmentTypeEnum.CABLESEGMENT={type:3,value:"CABLESEGMENT"};IfcCableSegmentTypeEnum.CONDUCTORSEGMENT={type:3,value:"CONDUCTORSEGMENT"};IfcCableSegmentTypeEnum.CONTACTWIRESEGMENT={type:3,value:"CONTACTWIRESEGMENT"};IfcCableSegmentTypeEnum.CORESEGMENT={type:3,value:"CORESEGMENT"};IfcCableSegmentTypeEnum.FIBERSEGMENT={type:3,value:"FIBERSEGMENT"};IfcCableSegmentTypeEnum.FIBERTUBE={type:3,value:"FIBERTUBE"};IfcCableSegmentTypeEnum.OPTICALCABLESEGMENT={type:3,value:"OPTICALCABLESEGMENT"};IfcCableSegmentTypeEnum.STITCHWIRE={type:3,value:"STITCHWIRE"};IfcCableSegmentTypeEnum.WIREPAIRSEGMENT={type:3,value:"WIREPAIRSEGMENT"};IfcCableSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCableSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCableSegmentTypeEnum=IfcCableSegmentTypeEnum;var IfcCaissonFoundationTypeEnum=/*#__PURE__*/_createClass(function IfcCaissonFoundationTypeEnum(){_classCallCheck(this,IfcCaissonFoundationTypeEnum);});IfcCaissonFoundationTypeEnum.CAISSON={type:3,value:"CAISSON"};IfcCaissonFoundationTypeEnum.WELL={type:3,value:"WELL"};IfcCaissonFoundationTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCaissonFoundationTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCaissonFoundationTypeEnum=IfcCaissonFoundationTypeEnum;var IfcChangeActionEnum=/*#__PURE__*/_createClass(function IfcChangeActionEnum(){_classCallCheck(this,IfcChangeActionEnum);});IfcChangeActionEnum.ADDED={type:3,value:"ADDED"};IfcChangeActionEnum.DELETED={type:3,value:"DELETED"};IfcChangeActionEnum.MODIFIED={type:3,value:"MODIFIED"};IfcChangeActionEnum.NOCHANGE={type:3,value:"NOCHANGE"};IfcChangeActionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcChangeActionEnum=IfcChangeActionEnum;var IfcChillerTypeEnum=/*#__PURE__*/_createClass(function IfcChillerTypeEnum(){_classCallCheck(this,IfcChillerTypeEnum);});IfcChillerTypeEnum.AIRCOOLED={type:3,value:"AIRCOOLED"};IfcChillerTypeEnum.HEATRECOVERY={type:3,value:"HEATRECOVERY"};IfcChillerTypeEnum.WATERCOOLED={type:3,value:"WATERCOOLED"};IfcChillerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcChillerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcChillerTypeEnum=IfcChillerTypeEnum;var IfcChimneyTypeEnum=/*#__PURE__*/_createClass(function IfcChimneyTypeEnum(){_classCallCheck(this,IfcChimneyTypeEnum);});IfcChimneyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcChimneyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcChimneyTypeEnum=IfcChimneyTypeEnum;var IfcCoilTypeEnum=/*#__PURE__*/_createClass(function IfcCoilTypeEnum(){_classCallCheck(this,IfcCoilTypeEnum);});IfcCoilTypeEnum.DXCOOLINGCOIL={type:3,value:"DXCOOLINGCOIL"};IfcCoilTypeEnum.ELECTRICHEATINGCOIL={type:3,value:"ELECTRICHEATINGCOIL"};IfcCoilTypeEnum.GASHEATINGCOIL={type:3,value:"GASHEATINGCOIL"};IfcCoilTypeEnum.HYDRONICCOIL={type:3,value:"HYDRONICCOIL"};IfcCoilTypeEnum.STEAMHEATINGCOIL={type:3,value:"STEAMHEATINGCOIL"};IfcCoilTypeEnum.WATERCOOLINGCOIL={type:3,value:"WATERCOOLINGCOIL"};IfcCoilTypeEnum.WATERHEATINGCOIL={type:3,value:"WATERHEATINGCOIL"};IfcCoilTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoilTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCoilTypeEnum=IfcCoilTypeEnum;var IfcColumnTypeEnum=/*#__PURE__*/_createClass(function IfcColumnTypeEnum(){_classCallCheck(this,IfcColumnTypeEnum);});IfcColumnTypeEnum.COLUMN={type:3,value:"COLUMN"};IfcColumnTypeEnum.PIERSTEM={type:3,value:"PIERSTEM"};IfcColumnTypeEnum.PIERSTEM_SEGMENT={type:3,value:"PIERSTEM_SEGMENT"};IfcColumnTypeEnum.PILASTER={type:3,value:"PILASTER"};IfcColumnTypeEnum.STANDCOLUMN={type:3,value:"STANDCOLUMN"};IfcColumnTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcColumnTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcColumnTypeEnum=IfcColumnTypeEnum;var IfcCommunicationsApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcCommunicationsApplianceTypeEnum(){_classCallCheck(this,IfcCommunicationsApplianceTypeEnum);});IfcCommunicationsApplianceTypeEnum.ANTENNA={type:3,value:"ANTENNA"};IfcCommunicationsApplianceTypeEnum.AUTOMATON={type:3,value:"AUTOMATON"};IfcCommunicationsApplianceTypeEnum.COMPUTER={type:3,value:"COMPUTER"};IfcCommunicationsApplianceTypeEnum.FAX={type:3,value:"FAX"};IfcCommunicationsApplianceTypeEnum.GATEWAY={type:3,value:"GATEWAY"};IfcCommunicationsApplianceTypeEnum.INTELLIGENTPERIPHERAL={type:3,value:"INTELLIGENTPERIPHERAL"};IfcCommunicationsApplianceTypeEnum.IPNETWORKEQUIPMENT={type:3,value:"IPNETWORKEQUIPMENT"};IfcCommunicationsApplianceTypeEnum.LINESIDEELECTRONICUNIT={type:3,value:"LINESIDEELECTRONICUNIT"};IfcCommunicationsApplianceTypeEnum.MODEM={type:3,value:"MODEM"};IfcCommunicationsApplianceTypeEnum.NETWORKAPPLIANCE={type:3,value:"NETWORKAPPLIANCE"};IfcCommunicationsApplianceTypeEnum.NETWORKBRIDGE={type:3,value:"NETWORKBRIDGE"};IfcCommunicationsApplianceTypeEnum.NETWORKHUB={type:3,value:"NETWORKHUB"};IfcCommunicationsApplianceTypeEnum.OPTICALLINETERMINAL={type:3,value:"OPTICALLINETERMINAL"};IfcCommunicationsApplianceTypeEnum.OPTICALNETWORKUNIT={type:3,value:"OPTICALNETWORKUNIT"};IfcCommunicationsApplianceTypeEnum.PRINTER={type:3,value:"PRINTER"};IfcCommunicationsApplianceTypeEnum.RADIOBLOCKCENTER={type:3,value:"RADIOBLOCKCENTER"};IfcCommunicationsApplianceTypeEnum.REPEATER={type:3,value:"REPEATER"};IfcCommunicationsApplianceTypeEnum.ROUTER={type:3,value:"ROUTER"};IfcCommunicationsApplianceTypeEnum.SCANNER={type:3,value:"SCANNER"};IfcCommunicationsApplianceTypeEnum.TELECOMMAND={type:3,value:"TELECOMMAND"};IfcCommunicationsApplianceTypeEnum.TELEPHONYEXCHANGE={type:3,value:"TELEPHONYEXCHANGE"};IfcCommunicationsApplianceTypeEnum.TRANSITIONCOMPONENT={type:3,value:"TRANSITIONCOMPONENT"};IfcCommunicationsApplianceTypeEnum.TRANSPONDER={type:3,value:"TRANSPONDER"};IfcCommunicationsApplianceTypeEnum.TRANSPORTEQUIPMENT={type:3,value:"TRANSPORTEQUIPMENT"};IfcCommunicationsApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCommunicationsApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCommunicationsApplianceTypeEnum=IfcCommunicationsApplianceTypeEnum;var IfcComplexPropertyTemplateTypeEnum=/*#__PURE__*/_createClass(function IfcComplexPropertyTemplateTypeEnum(){_classCallCheck(this,IfcComplexPropertyTemplateTypeEnum);});IfcComplexPropertyTemplateTypeEnum.P_COMPLEX={type:3,value:"P_COMPLEX"};IfcComplexPropertyTemplateTypeEnum.Q_COMPLEX={type:3,value:"Q_COMPLEX"};IFC4X32.IfcComplexPropertyTemplateTypeEnum=IfcComplexPropertyTemplateTypeEnum;var IfcCompressorTypeEnum=/*#__PURE__*/_createClass(function IfcCompressorTypeEnum(){_classCallCheck(this,IfcCompressorTypeEnum);});IfcCompressorTypeEnum.BOOSTER={type:3,value:"BOOSTER"};IfcCompressorTypeEnum.DYNAMIC={type:3,value:"DYNAMIC"};IfcCompressorTypeEnum.HERMETIC={type:3,value:"HERMETIC"};IfcCompressorTypeEnum.OPENTYPE={type:3,value:"OPENTYPE"};IfcCompressorTypeEnum.RECIPROCATING={type:3,value:"RECIPROCATING"};IfcCompressorTypeEnum.ROLLINGPISTON={type:3,value:"ROLLINGPISTON"};IfcCompressorTypeEnum.ROTARY={type:3,value:"ROTARY"};IfcCompressorTypeEnum.ROTARYVANE={type:3,value:"ROTARYVANE"};IfcCompressorTypeEnum.SCROLL={type:3,value:"SCROLL"};IfcCompressorTypeEnum.SEMIHERMETIC={type:3,value:"SEMIHERMETIC"};IfcCompressorTypeEnum.SINGLESCREW={type:3,value:"SINGLESCREW"};IfcCompressorTypeEnum.SINGLESTAGE={type:3,value:"SINGLESTAGE"};IfcCompressorTypeEnum.TROCHOIDAL={type:3,value:"TROCHOIDAL"};IfcCompressorTypeEnum.TWINSCREW={type:3,value:"TWINSCREW"};IfcCompressorTypeEnum.WELDEDSHELLHERMETIC={type:3,value:"WELDEDSHELLHERMETIC"};IfcCompressorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCompressorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCompressorTypeEnum=IfcCompressorTypeEnum;var IfcCondenserTypeEnum=/*#__PURE__*/_createClass(function IfcCondenserTypeEnum(){_classCallCheck(this,IfcCondenserTypeEnum);});IfcCondenserTypeEnum.AIRCOOLED={type:3,value:"AIRCOOLED"};IfcCondenserTypeEnum.EVAPORATIVECOOLED={type:3,value:"EVAPORATIVECOOLED"};IfcCondenserTypeEnum.WATERCOOLED={type:3,value:"WATERCOOLED"};IfcCondenserTypeEnum.WATERCOOLEDBRAZEDPLATE={type:3,value:"WATERCOOLEDBRAZEDPLATE"};IfcCondenserTypeEnum.WATERCOOLEDSHELLCOIL={type:3,value:"WATERCOOLEDSHELLCOIL"};IfcCondenserTypeEnum.WATERCOOLEDSHELLTUBE={type:3,value:"WATERCOOLEDSHELLTUBE"};IfcCondenserTypeEnum.WATERCOOLEDTUBEINTUBE={type:3,value:"WATERCOOLEDTUBEINTUBE"};IfcCondenserTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCondenserTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCondenserTypeEnum=IfcCondenserTypeEnum;var IfcConnectionTypeEnum=/*#__PURE__*/_createClass(function IfcConnectionTypeEnum(){_classCallCheck(this,IfcConnectionTypeEnum);});IfcConnectionTypeEnum.ATEND={type:3,value:"ATEND"};IfcConnectionTypeEnum.ATPATH={type:3,value:"ATPATH"};IfcConnectionTypeEnum.ATSTART={type:3,value:"ATSTART"};IfcConnectionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcConnectionTypeEnum=IfcConnectionTypeEnum;var IfcConstraintEnum=/*#__PURE__*/_createClass(function IfcConstraintEnum(){_classCallCheck(this,IfcConstraintEnum);});IfcConstraintEnum.ADVISORY={type:3,value:"ADVISORY"};IfcConstraintEnum.HARD={type:3,value:"HARD"};IfcConstraintEnum.SOFT={type:3,value:"SOFT"};IfcConstraintEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstraintEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcConstraintEnum=IfcConstraintEnum;var IfcConstructionEquipmentResourceTypeEnum=/*#__PURE__*/_createClass(function IfcConstructionEquipmentResourceTypeEnum(){_classCallCheck(this,IfcConstructionEquipmentResourceTypeEnum);});IfcConstructionEquipmentResourceTypeEnum.DEMOLISHING={type:3,value:"DEMOLISHING"};IfcConstructionEquipmentResourceTypeEnum.EARTHMOVING={type:3,value:"EARTHMOVING"};IfcConstructionEquipmentResourceTypeEnum.ERECTING={type:3,value:"ERECTING"};IfcConstructionEquipmentResourceTypeEnum.HEATING={type:3,value:"HEATING"};IfcConstructionEquipmentResourceTypeEnum.LIGHTING={type:3,value:"LIGHTING"};IfcConstructionEquipmentResourceTypeEnum.PAVING={type:3,value:"PAVING"};IfcConstructionEquipmentResourceTypeEnum.PUMPING={type:3,value:"PUMPING"};IfcConstructionEquipmentResourceTypeEnum.TRANSPORTING={type:3,value:"TRANSPORTING"};IfcConstructionEquipmentResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstructionEquipmentResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcConstructionEquipmentResourceTypeEnum=IfcConstructionEquipmentResourceTypeEnum;var IfcConstructionMaterialResourceTypeEnum=/*#__PURE__*/_createClass(function IfcConstructionMaterialResourceTypeEnum(){_classCallCheck(this,IfcConstructionMaterialResourceTypeEnum);});IfcConstructionMaterialResourceTypeEnum.AGGREGATES={type:3,value:"AGGREGATES"};IfcConstructionMaterialResourceTypeEnum.CONCRETE={type:3,value:"CONCRETE"};IfcConstructionMaterialResourceTypeEnum.DRYWALL={type:3,value:"DRYWALL"};IfcConstructionMaterialResourceTypeEnum.FUEL={type:3,value:"FUEL"};IfcConstructionMaterialResourceTypeEnum.GYPSUM={type:3,value:"GYPSUM"};IfcConstructionMaterialResourceTypeEnum.MASONRY={type:3,value:"MASONRY"};IfcConstructionMaterialResourceTypeEnum.METAL={type:3,value:"METAL"};IfcConstructionMaterialResourceTypeEnum.PLASTIC={type:3,value:"PLASTIC"};IfcConstructionMaterialResourceTypeEnum.WOOD={type:3,value:"WOOD"};IfcConstructionMaterialResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstructionMaterialResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcConstructionMaterialResourceTypeEnum=IfcConstructionMaterialResourceTypeEnum;var IfcConstructionProductResourceTypeEnum=/*#__PURE__*/_createClass(function IfcConstructionProductResourceTypeEnum(){_classCallCheck(this,IfcConstructionProductResourceTypeEnum);});IfcConstructionProductResourceTypeEnum.ASSEMBLY={type:3,value:"ASSEMBLY"};IfcConstructionProductResourceTypeEnum.FORMWORK={type:3,value:"FORMWORK"};IfcConstructionProductResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConstructionProductResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcConstructionProductResourceTypeEnum=IfcConstructionProductResourceTypeEnum;var IfcControllerTypeEnum=/*#__PURE__*/_createClass(function IfcControllerTypeEnum(){_classCallCheck(this,IfcControllerTypeEnum);});IfcControllerTypeEnum.FLOATING={type:3,value:"FLOATING"};IfcControllerTypeEnum.MULTIPOSITION={type:3,value:"MULTIPOSITION"};IfcControllerTypeEnum.PROGRAMMABLE={type:3,value:"PROGRAMMABLE"};IfcControllerTypeEnum.PROPORTIONAL={type:3,value:"PROPORTIONAL"};IfcControllerTypeEnum.TWOPOSITION={type:3,value:"TWOPOSITION"};IfcControllerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcControllerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcControllerTypeEnum=IfcControllerTypeEnum;var IfcConveyorSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcConveyorSegmentTypeEnum(){_classCallCheck(this,IfcConveyorSegmentTypeEnum);});IfcConveyorSegmentTypeEnum.BELTCONVEYOR={type:3,value:"BELTCONVEYOR"};IfcConveyorSegmentTypeEnum.BUCKETCONVEYOR={type:3,value:"BUCKETCONVEYOR"};IfcConveyorSegmentTypeEnum.CHUTECONVEYOR={type:3,value:"CHUTECONVEYOR"};IfcConveyorSegmentTypeEnum.SCREWCONVEYOR={type:3,value:"SCREWCONVEYOR"};IfcConveyorSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcConveyorSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcConveyorSegmentTypeEnum=IfcConveyorSegmentTypeEnum;var IfcCooledBeamTypeEnum=/*#__PURE__*/_createClass(function IfcCooledBeamTypeEnum(){_classCallCheck(this,IfcCooledBeamTypeEnum);});IfcCooledBeamTypeEnum.ACTIVE={type:3,value:"ACTIVE"};IfcCooledBeamTypeEnum.PASSIVE={type:3,value:"PASSIVE"};IfcCooledBeamTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCooledBeamTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCooledBeamTypeEnum=IfcCooledBeamTypeEnum;var IfcCoolingTowerTypeEnum=/*#__PURE__*/_createClass(function IfcCoolingTowerTypeEnum(){_classCallCheck(this,IfcCoolingTowerTypeEnum);});IfcCoolingTowerTypeEnum.MECHANICALFORCEDDRAFT={type:3,value:"MECHANICALFORCEDDRAFT"};IfcCoolingTowerTypeEnum.MECHANICALINDUCEDDRAFT={type:3,value:"MECHANICALINDUCEDDRAFT"};IfcCoolingTowerTypeEnum.NATURALDRAFT={type:3,value:"NATURALDRAFT"};IfcCoolingTowerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoolingTowerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCoolingTowerTypeEnum=IfcCoolingTowerTypeEnum;var IfcCostItemTypeEnum=/*#__PURE__*/_createClass(function IfcCostItemTypeEnum(){_classCallCheck(this,IfcCostItemTypeEnum);});IfcCostItemTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCostItemTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCostItemTypeEnum=IfcCostItemTypeEnum;var IfcCostScheduleTypeEnum=/*#__PURE__*/_createClass(function IfcCostScheduleTypeEnum(){_classCallCheck(this,IfcCostScheduleTypeEnum);});IfcCostScheduleTypeEnum.BUDGET={type:3,value:"BUDGET"};IfcCostScheduleTypeEnum.COSTPLAN={type:3,value:"COSTPLAN"};IfcCostScheduleTypeEnum.ESTIMATE={type:3,value:"ESTIMATE"};IfcCostScheduleTypeEnum.PRICEDBILLOFQUANTITIES={type:3,value:"PRICEDBILLOFQUANTITIES"};IfcCostScheduleTypeEnum.SCHEDULEOFRATES={type:3,value:"SCHEDULEOFRATES"};IfcCostScheduleTypeEnum.TENDER={type:3,value:"TENDER"};IfcCostScheduleTypeEnum.UNPRICEDBILLOFQUANTITIES={type:3,value:"UNPRICEDBILLOFQUANTITIES"};IfcCostScheduleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCostScheduleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCostScheduleTypeEnum=IfcCostScheduleTypeEnum;var IfcCourseTypeEnum=/*#__PURE__*/_createClass(function IfcCourseTypeEnum(){_classCallCheck(this,IfcCourseTypeEnum);});IfcCourseTypeEnum.ARMOUR={type:3,value:"ARMOUR"};IfcCourseTypeEnum.BALLASTBED={type:3,value:"BALLASTBED"};IfcCourseTypeEnum.CORE={type:3,value:"CORE"};IfcCourseTypeEnum.FILTER={type:3,value:"FILTER"};IfcCourseTypeEnum.PAVEMENT={type:3,value:"PAVEMENT"};IfcCourseTypeEnum.PROTECTION={type:3,value:"PROTECTION"};IfcCourseTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCourseTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCourseTypeEnum=IfcCourseTypeEnum;var IfcCoveringTypeEnum=/*#__PURE__*/_createClass(function IfcCoveringTypeEnum(){_classCallCheck(this,IfcCoveringTypeEnum);});IfcCoveringTypeEnum.CEILING={type:3,value:"CEILING"};IfcCoveringTypeEnum.CLADDING={type:3,value:"CLADDING"};IfcCoveringTypeEnum.COPING={type:3,value:"COPING"};IfcCoveringTypeEnum.FLOORING={type:3,value:"FLOORING"};IfcCoveringTypeEnum.INSULATION={type:3,value:"INSULATION"};IfcCoveringTypeEnum.MEMBRANE={type:3,value:"MEMBRANE"};IfcCoveringTypeEnum.MOLDING={type:3,value:"MOLDING"};IfcCoveringTypeEnum.ROOFING={type:3,value:"ROOFING"};IfcCoveringTypeEnum.SKIRTINGBOARD={type:3,value:"SKIRTINGBOARD"};IfcCoveringTypeEnum.SLEEVING={type:3,value:"SLEEVING"};IfcCoveringTypeEnum.TOPPING={type:3,value:"TOPPING"};IfcCoveringTypeEnum.WRAPPING={type:3,value:"WRAPPING"};IfcCoveringTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCoveringTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCoveringTypeEnum=IfcCoveringTypeEnum;var IfcCrewResourceTypeEnum=/*#__PURE__*/_createClass(function IfcCrewResourceTypeEnum(){_classCallCheck(this,IfcCrewResourceTypeEnum);});IfcCrewResourceTypeEnum.OFFICE={type:3,value:"OFFICE"};IfcCrewResourceTypeEnum.SITE={type:3,value:"SITE"};IfcCrewResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCrewResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCrewResourceTypeEnum=IfcCrewResourceTypeEnum;var IfcCurtainWallTypeEnum=/*#__PURE__*/_createClass(function IfcCurtainWallTypeEnum(){_classCallCheck(this,IfcCurtainWallTypeEnum);});IfcCurtainWallTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcCurtainWallTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCurtainWallTypeEnum=IfcCurtainWallTypeEnum;var IfcCurveInterpolationEnum=/*#__PURE__*/_createClass(function IfcCurveInterpolationEnum(){_classCallCheck(this,IfcCurveInterpolationEnum);});IfcCurveInterpolationEnum.LINEAR={type:3,value:"LINEAR"};IfcCurveInterpolationEnum.LOG_LINEAR={type:3,value:"LOG_LINEAR"};IfcCurveInterpolationEnum.LOG_LOG={type:3,value:"LOG_LOG"};IfcCurveInterpolationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcCurveInterpolationEnum=IfcCurveInterpolationEnum;var IfcDamperTypeEnum=/*#__PURE__*/_createClass(function IfcDamperTypeEnum(){_classCallCheck(this,IfcDamperTypeEnum);});IfcDamperTypeEnum.BACKDRAFTDAMPER={type:3,value:"BACKDRAFTDAMPER"};IfcDamperTypeEnum.BALANCINGDAMPER={type:3,value:"BALANCINGDAMPER"};IfcDamperTypeEnum.BLASTDAMPER={type:3,value:"BLASTDAMPER"};IfcDamperTypeEnum.CONTROLDAMPER={type:3,value:"CONTROLDAMPER"};IfcDamperTypeEnum.FIREDAMPER={type:3,value:"FIREDAMPER"};IfcDamperTypeEnum.FIRESMOKEDAMPER={type:3,value:"FIRESMOKEDAMPER"};IfcDamperTypeEnum.FUMEHOODEXHAUST={type:3,value:"FUMEHOODEXHAUST"};IfcDamperTypeEnum.GRAVITYDAMPER={type:3,value:"GRAVITYDAMPER"};IfcDamperTypeEnum.GRAVITYRELIEFDAMPER={type:3,value:"GRAVITYRELIEFDAMPER"};IfcDamperTypeEnum.RELIEFDAMPER={type:3,value:"RELIEFDAMPER"};IfcDamperTypeEnum.SMOKEDAMPER={type:3,value:"SMOKEDAMPER"};IfcDamperTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDamperTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDamperTypeEnum=IfcDamperTypeEnum;var IfcDataOriginEnum=/*#__PURE__*/_createClass(function IfcDataOriginEnum(){_classCallCheck(this,IfcDataOriginEnum);});IfcDataOriginEnum.MEASURED={type:3,value:"MEASURED"};IfcDataOriginEnum.PREDICTED={type:3,value:"PREDICTED"};IfcDataOriginEnum.SIMULATED={type:3,value:"SIMULATED"};IfcDataOriginEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDataOriginEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDataOriginEnum=IfcDataOriginEnum;var IfcDerivedUnitEnum=/*#__PURE__*/_createClass(function IfcDerivedUnitEnum(){_classCallCheck(this,IfcDerivedUnitEnum);});IfcDerivedUnitEnum.ACCELERATIONUNIT={type:3,value:"ACCELERATIONUNIT"};IfcDerivedUnitEnum.ANGULARVELOCITYUNIT={type:3,value:"ANGULARVELOCITYUNIT"};IfcDerivedUnitEnum.AREADENSITYUNIT={type:3,value:"AREADENSITYUNIT"};IfcDerivedUnitEnum.COMPOUNDPLANEANGLEUNIT={type:3,value:"COMPOUNDPLANEANGLEUNIT"};IfcDerivedUnitEnum.CURVATUREUNIT={type:3,value:"CURVATUREUNIT"};IfcDerivedUnitEnum.DYNAMICVISCOSITYUNIT={type:3,value:"DYNAMICVISCOSITYUNIT"};IfcDerivedUnitEnum.HEATFLUXDENSITYUNIT={type:3,value:"HEATFLUXDENSITYUNIT"};IfcDerivedUnitEnum.HEATINGVALUEUNIT={type:3,value:"HEATINGVALUEUNIT"};IfcDerivedUnitEnum.INTEGERCOUNTRATEUNIT={type:3,value:"INTEGERCOUNTRATEUNIT"};IfcDerivedUnitEnum.IONCONCENTRATIONUNIT={type:3,value:"IONCONCENTRATIONUNIT"};IfcDerivedUnitEnum.ISOTHERMALMOISTURECAPACITYUNIT={type:3,value:"ISOTHERMALMOISTURECAPACITYUNIT"};IfcDerivedUnitEnum.KINEMATICVISCOSITYUNIT={type:3,value:"KINEMATICVISCOSITYUNIT"};IfcDerivedUnitEnum.LINEARFORCEUNIT={type:3,value:"LINEARFORCEUNIT"};IfcDerivedUnitEnum.LINEARMOMENTUNIT={type:3,value:"LINEARMOMENTUNIT"};IfcDerivedUnitEnum.LINEARSTIFFNESSUNIT={type:3,value:"LINEARSTIFFNESSUNIT"};IfcDerivedUnitEnum.LINEARVELOCITYUNIT={type:3,value:"LINEARVELOCITYUNIT"};IfcDerivedUnitEnum.LUMINOUSINTENSITYDISTRIBUTIONUNIT={type:3,value:"LUMINOUSINTENSITYDISTRIBUTIONUNIT"};IfcDerivedUnitEnum.MASSDENSITYUNIT={type:3,value:"MASSDENSITYUNIT"};IfcDerivedUnitEnum.MASSFLOWRATEUNIT={type:3,value:"MASSFLOWRATEUNIT"};IfcDerivedUnitEnum.MASSPERLENGTHUNIT={type:3,value:"MASSPERLENGTHUNIT"};IfcDerivedUnitEnum.MODULUSOFELASTICITYUNIT={type:3,value:"MODULUSOFELASTICITYUNIT"};IfcDerivedUnitEnum.MODULUSOFLINEARSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFLINEARSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.MODULUSOFROTATIONALSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFROTATIONALSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.MODULUSOFSUBGRADEREACTIONUNIT={type:3,value:"MODULUSOFSUBGRADEREACTIONUNIT"};IfcDerivedUnitEnum.MOISTUREDIFFUSIVITYUNIT={type:3,value:"MOISTUREDIFFUSIVITYUNIT"};IfcDerivedUnitEnum.MOLECULARWEIGHTUNIT={type:3,value:"MOLECULARWEIGHTUNIT"};IfcDerivedUnitEnum.MOMENTOFINERTIAUNIT={type:3,value:"MOMENTOFINERTIAUNIT"};IfcDerivedUnitEnum.PHUNIT={type:3,value:"PHUNIT"};IfcDerivedUnitEnum.PLANARFORCEUNIT={type:3,value:"PLANARFORCEUNIT"};IfcDerivedUnitEnum.ROTATIONALFREQUENCYUNIT={type:3,value:"ROTATIONALFREQUENCYUNIT"};IfcDerivedUnitEnum.ROTATIONALMASSUNIT={type:3,value:"ROTATIONALMASSUNIT"};IfcDerivedUnitEnum.ROTATIONALSTIFFNESSUNIT={type:3,value:"ROTATIONALSTIFFNESSUNIT"};IfcDerivedUnitEnum.SECTIONAREAINTEGRALUNIT={type:3,value:"SECTIONAREAINTEGRALUNIT"};IfcDerivedUnitEnum.SECTIONMODULUSUNIT={type:3,value:"SECTIONMODULUSUNIT"};IfcDerivedUnitEnum.SHEARMODULUSUNIT={type:3,value:"SHEARMODULUSUNIT"};IfcDerivedUnitEnum.SOUNDPOWERLEVELUNIT={type:3,value:"SOUNDPOWERLEVELUNIT"};IfcDerivedUnitEnum.SOUNDPOWERUNIT={type:3,value:"SOUNDPOWERUNIT"};IfcDerivedUnitEnum.SOUNDPRESSURELEVELUNIT={type:3,value:"SOUNDPRESSURELEVELUNIT"};IfcDerivedUnitEnum.SOUNDPRESSUREUNIT={type:3,value:"SOUNDPRESSUREUNIT"};IfcDerivedUnitEnum.SPECIFICHEATCAPACITYUNIT={type:3,value:"SPECIFICHEATCAPACITYUNIT"};IfcDerivedUnitEnum.TEMPERATUREGRADIENTUNIT={type:3,value:"TEMPERATUREGRADIENTUNIT"};IfcDerivedUnitEnum.TEMPERATURERATEOFCHANGEUNIT={type:3,value:"TEMPERATURERATEOFCHANGEUNIT"};IfcDerivedUnitEnum.THERMALADMITTANCEUNIT={type:3,value:"THERMALADMITTANCEUNIT"};IfcDerivedUnitEnum.THERMALCONDUCTANCEUNIT={type:3,value:"THERMALCONDUCTANCEUNIT"};IfcDerivedUnitEnum.THERMALEXPANSIONCOEFFICIENTUNIT={type:3,value:"THERMALEXPANSIONCOEFFICIENTUNIT"};IfcDerivedUnitEnum.THERMALRESISTANCEUNIT={type:3,value:"THERMALRESISTANCEUNIT"};IfcDerivedUnitEnum.THERMALTRANSMITTANCEUNIT={type:3,value:"THERMALTRANSMITTANCEUNIT"};IfcDerivedUnitEnum.TORQUEUNIT={type:3,value:"TORQUEUNIT"};IfcDerivedUnitEnum.VAPORPERMEABILITYUNIT={type:3,value:"VAPORPERMEABILITYUNIT"};IfcDerivedUnitEnum.VOLUMETRICFLOWRATEUNIT={type:3,value:"VOLUMETRICFLOWRATEUNIT"};IfcDerivedUnitEnum.WARPINGCONSTANTUNIT={type:3,value:"WARPINGCONSTANTUNIT"};IfcDerivedUnitEnum.WARPINGMOMENTUNIT={type:3,value:"WARPINGMOMENTUNIT"};IfcDerivedUnitEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC4X32.IfcDerivedUnitEnum=IfcDerivedUnitEnum;var IfcDirectionSenseEnum=/*#__PURE__*/_createClass(function IfcDirectionSenseEnum(){_classCallCheck(this,IfcDirectionSenseEnum);});IfcDirectionSenseEnum.NEGATIVE={type:3,value:"NEGATIVE"};IfcDirectionSenseEnum.POSITIVE={type:3,value:"POSITIVE"};IFC4X32.IfcDirectionSenseEnum=IfcDirectionSenseEnum;var IfcDiscreteAccessoryTypeEnum=/*#__PURE__*/_createClass(function IfcDiscreteAccessoryTypeEnum(){_classCallCheck(this,IfcDiscreteAccessoryTypeEnum);});IfcDiscreteAccessoryTypeEnum.ANCHORPLATE={type:3,value:"ANCHORPLATE"};IfcDiscreteAccessoryTypeEnum.BIRDPROTECTION={type:3,value:"BIRDPROTECTION"};IfcDiscreteAccessoryTypeEnum.BRACKET={type:3,value:"BRACKET"};IfcDiscreteAccessoryTypeEnum.CABLEARRANGER={type:3,value:"CABLEARRANGER"};IfcDiscreteAccessoryTypeEnum.ELASTIC_CUSHION={type:3,value:"ELASTIC_CUSHION"};IfcDiscreteAccessoryTypeEnum.EXPANSION_JOINT_DEVICE={type:3,value:"EXPANSION_JOINT_DEVICE"};IfcDiscreteAccessoryTypeEnum.FILLER={type:3,value:"FILLER"};IfcDiscreteAccessoryTypeEnum.FLASHING={type:3,value:"FLASHING"};IfcDiscreteAccessoryTypeEnum.INSULATOR={type:3,value:"INSULATOR"};IfcDiscreteAccessoryTypeEnum.LOCK={type:3,value:"LOCK"};IfcDiscreteAccessoryTypeEnum.PANEL_STRENGTHENING={type:3,value:"PANEL_STRENGTHENING"};IfcDiscreteAccessoryTypeEnum.POINTMACHINEMOUNTINGDEVICE={type:3,value:"POINTMACHINEMOUNTINGDEVICE"};IfcDiscreteAccessoryTypeEnum.POINT_MACHINE_LOCKING_DEVICE={type:3,value:"POINT_MACHINE_LOCKING_DEVICE"};IfcDiscreteAccessoryTypeEnum.RAILBRACE={type:3,value:"RAILBRACE"};IfcDiscreteAccessoryTypeEnum.RAILPAD={type:3,value:"RAILPAD"};IfcDiscreteAccessoryTypeEnum.RAIL_LUBRICATION={type:3,value:"RAIL_LUBRICATION"};IfcDiscreteAccessoryTypeEnum.RAIL_MECHANICAL_EQUIPMENT={type:3,value:"RAIL_MECHANICAL_EQUIPMENT"};IfcDiscreteAccessoryTypeEnum.SHOE={type:3,value:"SHOE"};IfcDiscreteAccessoryTypeEnum.SLIDINGCHAIR={type:3,value:"SLIDINGCHAIR"};IfcDiscreteAccessoryTypeEnum.SOUNDABSORPTION={type:3,value:"SOUNDABSORPTION"};IfcDiscreteAccessoryTypeEnum.TENSIONINGEQUIPMENT={type:3,value:"TENSIONINGEQUIPMENT"};IfcDiscreteAccessoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDiscreteAccessoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDiscreteAccessoryTypeEnum=IfcDiscreteAccessoryTypeEnum;var IfcDistributionBoardTypeEnum=/*#__PURE__*/_createClass(function IfcDistributionBoardTypeEnum(){_classCallCheck(this,IfcDistributionBoardTypeEnum);});IfcDistributionBoardTypeEnum.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"};IfcDistributionBoardTypeEnum.DISPATCHINGBOARD={type:3,value:"DISPATCHINGBOARD"};IfcDistributionBoardTypeEnum.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"};IfcDistributionBoardTypeEnum.DISTRIBUTIONFRAME={type:3,value:"DISTRIBUTIONFRAME"};IfcDistributionBoardTypeEnum.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"};IfcDistributionBoardTypeEnum.SWITCHBOARD={type:3,value:"SWITCHBOARD"};IfcDistributionBoardTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionBoardTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDistributionBoardTypeEnum=IfcDistributionBoardTypeEnum;var IfcDistributionChamberElementTypeEnum=/*#__PURE__*/_createClass(function IfcDistributionChamberElementTypeEnum(){_classCallCheck(this,IfcDistributionChamberElementTypeEnum);});IfcDistributionChamberElementTypeEnum.FORMEDDUCT={type:3,value:"FORMEDDUCT"};IfcDistributionChamberElementTypeEnum.INSPECTIONCHAMBER={type:3,value:"INSPECTIONCHAMBER"};IfcDistributionChamberElementTypeEnum.INSPECTIONPIT={type:3,value:"INSPECTIONPIT"};IfcDistributionChamberElementTypeEnum.MANHOLE={type:3,value:"MANHOLE"};IfcDistributionChamberElementTypeEnum.METERCHAMBER={type:3,value:"METERCHAMBER"};IfcDistributionChamberElementTypeEnum.SUMP={type:3,value:"SUMP"};IfcDistributionChamberElementTypeEnum.TRENCH={type:3,value:"TRENCH"};IfcDistributionChamberElementTypeEnum.VALVECHAMBER={type:3,value:"VALVECHAMBER"};IfcDistributionChamberElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionChamberElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDistributionChamberElementTypeEnum=IfcDistributionChamberElementTypeEnum;var IfcDistributionPortTypeEnum=/*#__PURE__*/_createClass(function IfcDistributionPortTypeEnum(){_classCallCheck(this,IfcDistributionPortTypeEnum);});IfcDistributionPortTypeEnum.CABLE={type:3,value:"CABLE"};IfcDistributionPortTypeEnum.CABLECARRIER={type:3,value:"CABLECARRIER"};IfcDistributionPortTypeEnum.DUCT={type:3,value:"DUCT"};IfcDistributionPortTypeEnum.PIPE={type:3,value:"PIPE"};IfcDistributionPortTypeEnum.WIRELESS={type:3,value:"WIRELESS"};IfcDistributionPortTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionPortTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDistributionPortTypeEnum=IfcDistributionPortTypeEnum;var IfcDistributionSystemEnum=/*#__PURE__*/_createClass(function IfcDistributionSystemEnum(){_classCallCheck(this,IfcDistributionSystemEnum);});IfcDistributionSystemEnum.AIRCONDITIONING={type:3,value:"AIRCONDITIONING"};IfcDistributionSystemEnum.AUDIOVISUAL={type:3,value:"AUDIOVISUAL"};IfcDistributionSystemEnum.CATENARY_SYSTEM={type:3,value:"CATENARY_SYSTEM"};IfcDistributionSystemEnum.CHEMICAL={type:3,value:"CHEMICAL"};IfcDistributionSystemEnum.CHILLEDWATER={type:3,value:"CHILLEDWATER"};IfcDistributionSystemEnum.COMMUNICATION={type:3,value:"COMMUNICATION"};IfcDistributionSystemEnum.COMPRESSEDAIR={type:3,value:"COMPRESSEDAIR"};IfcDistributionSystemEnum.CONDENSERWATER={type:3,value:"CONDENSERWATER"};IfcDistributionSystemEnum.CONTROL={type:3,value:"CONTROL"};IfcDistributionSystemEnum.CONVEYING={type:3,value:"CONVEYING"};IfcDistributionSystemEnum.DATA={type:3,value:"DATA"};IfcDistributionSystemEnum.DISPOSAL={type:3,value:"DISPOSAL"};IfcDistributionSystemEnum.DOMESTICCOLDWATER={type:3,value:"DOMESTICCOLDWATER"};IfcDistributionSystemEnum.DOMESTICHOTWATER={type:3,value:"DOMESTICHOTWATER"};IfcDistributionSystemEnum.DRAINAGE={type:3,value:"DRAINAGE"};IfcDistributionSystemEnum.EARTHING={type:3,value:"EARTHING"};IfcDistributionSystemEnum.ELECTRICAL={type:3,value:"ELECTRICAL"};IfcDistributionSystemEnum.ELECTROACOUSTIC={type:3,value:"ELECTROACOUSTIC"};IfcDistributionSystemEnum.EXHAUST={type:3,value:"EXHAUST"};IfcDistributionSystemEnum.FIREPROTECTION={type:3,value:"FIREPROTECTION"};IfcDistributionSystemEnum.FIXEDTRANSMISSIONNETWORK={type:3,value:"FIXEDTRANSMISSIONNETWORK"};IfcDistributionSystemEnum.FUEL={type:3,value:"FUEL"};IfcDistributionSystemEnum.GAS={type:3,value:"GAS"};IfcDistributionSystemEnum.HAZARDOUS={type:3,value:"HAZARDOUS"};IfcDistributionSystemEnum.HEATING={type:3,value:"HEATING"};IfcDistributionSystemEnum.LIGHTING={type:3,value:"LIGHTING"};IfcDistributionSystemEnum.LIGHTNINGPROTECTION={type:3,value:"LIGHTNINGPROTECTION"};IfcDistributionSystemEnum.MOBILENETWORK={type:3,value:"MOBILENETWORK"};IfcDistributionSystemEnum.MONITORINGSYSTEM={type:3,value:"MONITORINGSYSTEM"};IfcDistributionSystemEnum.MUNICIPALSOLIDWASTE={type:3,value:"MUNICIPALSOLIDWASTE"};IfcDistributionSystemEnum.OIL={type:3,value:"OIL"};IfcDistributionSystemEnum.OPERATIONAL={type:3,value:"OPERATIONAL"};IfcDistributionSystemEnum.OPERATIONALTELEPHONYSYSTEM={type:3,value:"OPERATIONALTELEPHONYSYSTEM"};IfcDistributionSystemEnum.OVERHEAD_CONTACTLINE_SYSTEM={type:3,value:"OVERHEAD_CONTACTLINE_SYSTEM"};IfcDistributionSystemEnum.POWERGENERATION={type:3,value:"POWERGENERATION"};IfcDistributionSystemEnum.RAINWATER={type:3,value:"RAINWATER"};IfcDistributionSystemEnum.REFRIGERATION={type:3,value:"REFRIGERATION"};IfcDistributionSystemEnum.RETURN_CIRCUIT={type:3,value:"RETURN_CIRCUIT"};IfcDistributionSystemEnum.SECURITY={type:3,value:"SECURITY"};IfcDistributionSystemEnum.SEWAGE={type:3,value:"SEWAGE"};IfcDistributionSystemEnum.SIGNAL={type:3,value:"SIGNAL"};IfcDistributionSystemEnum.STORMWATER={type:3,value:"STORMWATER"};IfcDistributionSystemEnum.TELEPHONE={type:3,value:"TELEPHONE"};IfcDistributionSystemEnum.TV={type:3,value:"TV"};IfcDistributionSystemEnum.VACUUM={type:3,value:"VACUUM"};IfcDistributionSystemEnum.VENT={type:3,value:"VENT"};IfcDistributionSystemEnum.VENTILATION={type:3,value:"VENTILATION"};IfcDistributionSystemEnum.WASTEWATER={type:3,value:"WASTEWATER"};IfcDistributionSystemEnum.WATERSUPPLY={type:3,value:"WATERSUPPLY"};IfcDistributionSystemEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDistributionSystemEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDistributionSystemEnum=IfcDistributionSystemEnum;var IfcDocumentConfidentialityEnum=/*#__PURE__*/_createClass(function IfcDocumentConfidentialityEnum(){_classCallCheck(this,IfcDocumentConfidentialityEnum);});IfcDocumentConfidentialityEnum.CONFIDENTIAL={type:3,value:"CONFIDENTIAL"};IfcDocumentConfidentialityEnum.PERSONAL={type:3,value:"PERSONAL"};IfcDocumentConfidentialityEnum.PUBLIC={type:3,value:"PUBLIC"};IfcDocumentConfidentialityEnum.RESTRICTED={type:3,value:"RESTRICTED"};IfcDocumentConfidentialityEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDocumentConfidentialityEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDocumentConfidentialityEnum=IfcDocumentConfidentialityEnum;var IfcDocumentStatusEnum=/*#__PURE__*/_createClass(function IfcDocumentStatusEnum(){_classCallCheck(this,IfcDocumentStatusEnum);});IfcDocumentStatusEnum.DRAFT={type:3,value:"DRAFT"};IfcDocumentStatusEnum.FINAL={type:3,value:"FINAL"};IfcDocumentStatusEnum.FINALDRAFT={type:3,value:"FINALDRAFT"};IfcDocumentStatusEnum.REVISION={type:3,value:"REVISION"};IfcDocumentStatusEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDocumentStatusEnum=IfcDocumentStatusEnum;var IfcDoorPanelOperationEnum=/*#__PURE__*/_createClass(function IfcDoorPanelOperationEnum(){_classCallCheck(this,IfcDoorPanelOperationEnum);});IfcDoorPanelOperationEnum.DOUBLE_ACTING={type:3,value:"DOUBLE_ACTING"};IfcDoorPanelOperationEnum.FIXEDPANEL={type:3,value:"FIXEDPANEL"};IfcDoorPanelOperationEnum.FOLDING={type:3,value:"FOLDING"};IfcDoorPanelOperationEnum.REVOLVING={type:3,value:"REVOLVING"};IfcDoorPanelOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorPanelOperationEnum.SLIDING={type:3,value:"SLIDING"};IfcDoorPanelOperationEnum.SWINGING={type:3,value:"SWINGING"};IfcDoorPanelOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorPanelOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDoorPanelOperationEnum=IfcDoorPanelOperationEnum;var IfcDoorPanelPositionEnum=/*#__PURE__*/_createClass(function IfcDoorPanelPositionEnum(){_classCallCheck(this,IfcDoorPanelPositionEnum);});IfcDoorPanelPositionEnum.LEFT={type:3,value:"LEFT"};IfcDoorPanelPositionEnum.MIDDLE={type:3,value:"MIDDLE"};IfcDoorPanelPositionEnum.RIGHT={type:3,value:"RIGHT"};IfcDoorPanelPositionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDoorPanelPositionEnum=IfcDoorPanelPositionEnum;var IfcDoorStyleConstructionEnum=/*#__PURE__*/_createClass(function IfcDoorStyleConstructionEnum(){_classCallCheck(this,IfcDoorStyleConstructionEnum);});IfcDoorStyleConstructionEnum.ALUMINIUM={type:3,value:"ALUMINIUM"};IfcDoorStyleConstructionEnum.ALUMINIUM_PLASTIC={type:3,value:"ALUMINIUM_PLASTIC"};IfcDoorStyleConstructionEnum.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"};IfcDoorStyleConstructionEnum.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"};IfcDoorStyleConstructionEnum.PLASTIC={type:3,value:"PLASTIC"};IfcDoorStyleConstructionEnum.STEEL={type:3,value:"STEEL"};IfcDoorStyleConstructionEnum.WOOD={type:3,value:"WOOD"};IfcDoorStyleConstructionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorStyleConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDoorStyleConstructionEnum=IfcDoorStyleConstructionEnum;var IfcDoorStyleOperationEnum=/*#__PURE__*/_createClass(function IfcDoorStyleOperationEnum(){_classCallCheck(this,IfcDoorStyleOperationEnum);});IfcDoorStyleOperationEnum.DOUBLE_DOOR_DOUBLE_SWING={type:3,value:"DOUBLE_DOOR_DOUBLE_SWING"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_FOLDING={type:3,value:"DOUBLE_DOOR_FOLDING"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING={type:3,value:"DOUBLE_DOOR_SINGLE_SWING"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_LEFT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_DOOR_SINGLE_SWING_OPPOSITE_RIGHT"};IfcDoorStyleOperationEnum.DOUBLE_DOOR_SLIDING={type:3,value:"DOUBLE_DOOR_SLIDING"};IfcDoorStyleOperationEnum.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"};IfcDoorStyleOperationEnum.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"};IfcDoorStyleOperationEnum.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"};IfcDoorStyleOperationEnum.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"};IfcDoorStyleOperationEnum.REVOLVING={type:3,value:"REVOLVING"};IfcDoorStyleOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorStyleOperationEnum.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"};IfcDoorStyleOperationEnum.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"};IfcDoorStyleOperationEnum.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"};IfcDoorStyleOperationEnum.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"};IfcDoorStyleOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorStyleOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDoorStyleOperationEnum=IfcDoorStyleOperationEnum;var IfcDoorTypeEnum=/*#__PURE__*/_createClass(function IfcDoorTypeEnum(){_classCallCheck(this,IfcDoorTypeEnum);});IfcDoorTypeEnum.BOOM_BARRIER={type:3,value:"BOOM_BARRIER"};IfcDoorTypeEnum.DOOR={type:3,value:"DOOR"};IfcDoorTypeEnum.GATE={type:3,value:"GATE"};IfcDoorTypeEnum.TRAPDOOR={type:3,value:"TRAPDOOR"};IfcDoorTypeEnum.TURNSTILE={type:3,value:"TURNSTILE"};IfcDoorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDoorTypeEnum=IfcDoorTypeEnum;var IfcDoorTypeOperationEnum=/*#__PURE__*/_createClass(function IfcDoorTypeOperationEnum(){_classCallCheck(this,IfcDoorTypeOperationEnum);});IfcDoorTypeOperationEnum.DOUBLE_PANEL_DOUBLE_SWING={type:3,value:"DOUBLE_PANEL_DOUBLE_SWING"};IfcDoorTypeOperationEnum.DOUBLE_PANEL_FOLDING={type:3,value:"DOUBLE_PANEL_FOLDING"};IfcDoorTypeOperationEnum.DOUBLE_PANEL_LIFTING_VERTICAL={type:3,value:"DOUBLE_PANEL_LIFTING_VERTICAL"};IfcDoorTypeOperationEnum.DOUBLE_PANEL_SINGLE_SWING={type:3,value:"DOUBLE_PANEL_SINGLE_SWING"};IfcDoorTypeOperationEnum.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_LEFT"};IfcDoorTypeOperationEnum.DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT={type:3,value:"DOUBLE_PANEL_SINGLE_SWING_OPPOSITE_RIGHT"};IfcDoorTypeOperationEnum.DOUBLE_PANEL_SLIDING={type:3,value:"DOUBLE_PANEL_SLIDING"};IfcDoorTypeOperationEnum.DOUBLE_SWING_LEFT={type:3,value:"DOUBLE_SWING_LEFT"};IfcDoorTypeOperationEnum.DOUBLE_SWING_RIGHT={type:3,value:"DOUBLE_SWING_RIGHT"};IfcDoorTypeOperationEnum.FOLDING_TO_LEFT={type:3,value:"FOLDING_TO_LEFT"};IfcDoorTypeOperationEnum.FOLDING_TO_RIGHT={type:3,value:"FOLDING_TO_RIGHT"};IfcDoorTypeOperationEnum.LIFTING_HORIZONTAL={type:3,value:"LIFTING_HORIZONTAL"};IfcDoorTypeOperationEnum.LIFTING_VERTICAL_LEFT={type:3,value:"LIFTING_VERTICAL_LEFT"};IfcDoorTypeOperationEnum.LIFTING_VERTICAL_RIGHT={type:3,value:"LIFTING_VERTICAL_RIGHT"};IfcDoorTypeOperationEnum.REVOLVING_HORIZONTAL={type:3,value:"REVOLVING_HORIZONTAL"};IfcDoorTypeOperationEnum.REVOLVING_VERTICAL={type:3,value:"REVOLVING_VERTICAL"};IfcDoorTypeOperationEnum.ROLLINGUP={type:3,value:"ROLLINGUP"};IfcDoorTypeOperationEnum.SINGLE_SWING_LEFT={type:3,value:"SINGLE_SWING_LEFT"};IfcDoorTypeOperationEnum.SINGLE_SWING_RIGHT={type:3,value:"SINGLE_SWING_RIGHT"};IfcDoorTypeOperationEnum.SLIDING_TO_LEFT={type:3,value:"SLIDING_TO_LEFT"};IfcDoorTypeOperationEnum.SLIDING_TO_RIGHT={type:3,value:"SLIDING_TO_RIGHT"};IfcDoorTypeOperationEnum.SWING_FIXED_LEFT={type:3,value:"SWING_FIXED_LEFT"};IfcDoorTypeOperationEnum.SWING_FIXED_RIGHT={type:3,value:"SWING_FIXED_RIGHT"};IfcDoorTypeOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDoorTypeOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDoorTypeOperationEnum=IfcDoorTypeOperationEnum;var IfcDuctFittingTypeEnum=/*#__PURE__*/_createClass(function IfcDuctFittingTypeEnum(){_classCallCheck(this,IfcDuctFittingTypeEnum);});IfcDuctFittingTypeEnum.BEND={type:3,value:"BEND"};IfcDuctFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcDuctFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcDuctFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcDuctFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcDuctFittingTypeEnum.OBSTRUCTION={type:3,value:"OBSTRUCTION"};IfcDuctFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcDuctFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDuctFittingTypeEnum=IfcDuctFittingTypeEnum;var IfcDuctSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcDuctSegmentTypeEnum(){_classCallCheck(this,IfcDuctSegmentTypeEnum);});IfcDuctSegmentTypeEnum.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"};IfcDuctSegmentTypeEnum.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"};IfcDuctSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDuctSegmentTypeEnum=IfcDuctSegmentTypeEnum;var IfcDuctSilencerTypeEnum=/*#__PURE__*/_createClass(function IfcDuctSilencerTypeEnum(){_classCallCheck(this,IfcDuctSilencerTypeEnum);});IfcDuctSilencerTypeEnum.FLATOVAL={type:3,value:"FLATOVAL"};IfcDuctSilencerTypeEnum.RECTANGULAR={type:3,value:"RECTANGULAR"};IfcDuctSilencerTypeEnum.ROUND={type:3,value:"ROUND"};IfcDuctSilencerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcDuctSilencerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcDuctSilencerTypeEnum=IfcDuctSilencerTypeEnum;var IfcEarthworksCutTypeEnum=/*#__PURE__*/_createClass(function IfcEarthworksCutTypeEnum(){_classCallCheck(this,IfcEarthworksCutTypeEnum);});IfcEarthworksCutTypeEnum.BASE_EXCAVATION={type:3,value:"BASE_EXCAVATION"};IfcEarthworksCutTypeEnum.CUT={type:3,value:"CUT"};IfcEarthworksCutTypeEnum.DREDGING={type:3,value:"DREDGING"};IfcEarthworksCutTypeEnum.EXCAVATION={type:3,value:"EXCAVATION"};IfcEarthworksCutTypeEnum.OVEREXCAVATION={type:3,value:"OVEREXCAVATION"};IfcEarthworksCutTypeEnum.PAVEMENTMILLING={type:3,value:"PAVEMENTMILLING"};IfcEarthworksCutTypeEnum.STEPEXCAVATION={type:3,value:"STEPEXCAVATION"};IfcEarthworksCutTypeEnum.TOPSOILREMOVAL={type:3,value:"TOPSOILREMOVAL"};IfcEarthworksCutTypeEnum.TRENCH={type:3,value:"TRENCH"};IfcEarthworksCutTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEarthworksCutTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcEarthworksCutTypeEnum=IfcEarthworksCutTypeEnum;var IfcEarthworksFillTypeEnum=/*#__PURE__*/_createClass(function IfcEarthworksFillTypeEnum(){_classCallCheck(this,IfcEarthworksFillTypeEnum);});IfcEarthworksFillTypeEnum.BACKFILL={type:3,value:"BACKFILL"};IfcEarthworksFillTypeEnum.COUNTERWEIGHT={type:3,value:"COUNTERWEIGHT"};IfcEarthworksFillTypeEnum.EMBANKMENT={type:3,value:"EMBANKMENT"};IfcEarthworksFillTypeEnum.SLOPEFILL={type:3,value:"SLOPEFILL"};IfcEarthworksFillTypeEnum.SUBGRADE={type:3,value:"SUBGRADE"};IfcEarthworksFillTypeEnum.SUBGRADEBED={type:3,value:"SUBGRADEBED"};IfcEarthworksFillTypeEnum.TRANSITIONSECTION={type:3,value:"TRANSITIONSECTION"};IfcEarthworksFillTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEarthworksFillTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcEarthworksFillTypeEnum=IfcEarthworksFillTypeEnum;var IfcElectricApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcElectricApplianceTypeEnum(){_classCallCheck(this,IfcElectricApplianceTypeEnum);});IfcElectricApplianceTypeEnum.DISHWASHER={type:3,value:"DISHWASHER"};IfcElectricApplianceTypeEnum.ELECTRICCOOKER={type:3,value:"ELECTRICCOOKER"};IfcElectricApplianceTypeEnum.FREESTANDINGELECTRICHEATER={type:3,value:"FREESTANDINGELECTRICHEATER"};IfcElectricApplianceTypeEnum.FREESTANDINGFAN={type:3,value:"FREESTANDINGFAN"};IfcElectricApplianceTypeEnum.FREESTANDINGWATERCOOLER={type:3,value:"FREESTANDINGWATERCOOLER"};IfcElectricApplianceTypeEnum.FREESTANDINGWATERHEATER={type:3,value:"FREESTANDINGWATERHEATER"};IfcElectricApplianceTypeEnum.FREEZER={type:3,value:"FREEZER"};IfcElectricApplianceTypeEnum.FRIDGE_FREEZER={type:3,value:"FRIDGE_FREEZER"};IfcElectricApplianceTypeEnum.HANDDRYER={type:3,value:"HANDDRYER"};IfcElectricApplianceTypeEnum.KITCHENMACHINE={type:3,value:"KITCHENMACHINE"};IfcElectricApplianceTypeEnum.MICROWAVE={type:3,value:"MICROWAVE"};IfcElectricApplianceTypeEnum.PHOTOCOPIER={type:3,value:"PHOTOCOPIER"};IfcElectricApplianceTypeEnum.REFRIGERATOR={type:3,value:"REFRIGERATOR"};IfcElectricApplianceTypeEnum.TUMBLEDRYER={type:3,value:"TUMBLEDRYER"};IfcElectricApplianceTypeEnum.VENDINGMACHINE={type:3,value:"VENDINGMACHINE"};IfcElectricApplianceTypeEnum.WASHINGMACHINE={type:3,value:"WASHINGMACHINE"};IfcElectricApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElectricApplianceTypeEnum=IfcElectricApplianceTypeEnum;var IfcElectricDistributionBoardTypeEnum=/*#__PURE__*/_createClass(function IfcElectricDistributionBoardTypeEnum(){_classCallCheck(this,IfcElectricDistributionBoardTypeEnum);});IfcElectricDistributionBoardTypeEnum.CONSUMERUNIT={type:3,value:"CONSUMERUNIT"};IfcElectricDistributionBoardTypeEnum.DISTRIBUTIONBOARD={type:3,value:"DISTRIBUTIONBOARD"};IfcElectricDistributionBoardTypeEnum.MOTORCONTROLCENTRE={type:3,value:"MOTORCONTROLCENTRE"};IfcElectricDistributionBoardTypeEnum.SWITCHBOARD={type:3,value:"SWITCHBOARD"};IfcElectricDistributionBoardTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricDistributionBoardTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElectricDistributionBoardTypeEnum=IfcElectricDistributionBoardTypeEnum;var IfcElectricFlowStorageDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcElectricFlowStorageDeviceTypeEnum(){_classCallCheck(this,IfcElectricFlowStorageDeviceTypeEnum);});IfcElectricFlowStorageDeviceTypeEnum.BATTERY={type:3,value:"BATTERY"};IfcElectricFlowStorageDeviceTypeEnum.CAPACITOR={type:3,value:"CAPACITOR"};IfcElectricFlowStorageDeviceTypeEnum.CAPACITORBANK={type:3,value:"CAPACITORBANK"};IfcElectricFlowStorageDeviceTypeEnum.COMPENSATOR={type:3,value:"COMPENSATOR"};IfcElectricFlowStorageDeviceTypeEnum.HARMONICFILTER={type:3,value:"HARMONICFILTER"};IfcElectricFlowStorageDeviceTypeEnum.INDUCTOR={type:3,value:"INDUCTOR"};IfcElectricFlowStorageDeviceTypeEnum.INDUCTORBANK={type:3,value:"INDUCTORBANK"};IfcElectricFlowStorageDeviceTypeEnum.RECHARGER={type:3,value:"RECHARGER"};IfcElectricFlowStorageDeviceTypeEnum.UPS={type:3,value:"UPS"};IfcElectricFlowStorageDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricFlowStorageDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElectricFlowStorageDeviceTypeEnum=IfcElectricFlowStorageDeviceTypeEnum;var IfcElectricFlowTreatmentDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcElectricFlowTreatmentDeviceTypeEnum(){_classCallCheck(this,IfcElectricFlowTreatmentDeviceTypeEnum);});IfcElectricFlowTreatmentDeviceTypeEnum.ELECTRONICFILTER={type:3,value:"ELECTRONICFILTER"};IfcElectricFlowTreatmentDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricFlowTreatmentDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElectricFlowTreatmentDeviceTypeEnum=IfcElectricFlowTreatmentDeviceTypeEnum;var IfcElectricGeneratorTypeEnum=/*#__PURE__*/_createClass(function IfcElectricGeneratorTypeEnum(){_classCallCheck(this,IfcElectricGeneratorTypeEnum);});IfcElectricGeneratorTypeEnum.CHP={type:3,value:"CHP"};IfcElectricGeneratorTypeEnum.ENGINEGENERATOR={type:3,value:"ENGINEGENERATOR"};IfcElectricGeneratorTypeEnum.STANDALONE={type:3,value:"STANDALONE"};IfcElectricGeneratorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricGeneratorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElectricGeneratorTypeEnum=IfcElectricGeneratorTypeEnum;var IfcElectricMotorTypeEnum=/*#__PURE__*/_createClass(function IfcElectricMotorTypeEnum(){_classCallCheck(this,IfcElectricMotorTypeEnum);});IfcElectricMotorTypeEnum.DC={type:3,value:"DC"};IfcElectricMotorTypeEnum.INDUCTION={type:3,value:"INDUCTION"};IfcElectricMotorTypeEnum.POLYPHASE={type:3,value:"POLYPHASE"};IfcElectricMotorTypeEnum.RELUCTANCESYNCHRONOUS={type:3,value:"RELUCTANCESYNCHRONOUS"};IfcElectricMotorTypeEnum.SYNCHRONOUS={type:3,value:"SYNCHRONOUS"};IfcElectricMotorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricMotorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElectricMotorTypeEnum=IfcElectricMotorTypeEnum;var IfcElectricTimeControlTypeEnum=/*#__PURE__*/_createClass(function IfcElectricTimeControlTypeEnum(){_classCallCheck(this,IfcElectricTimeControlTypeEnum);});IfcElectricTimeControlTypeEnum.RELAY={type:3,value:"RELAY"};IfcElectricTimeControlTypeEnum.TIMECLOCK={type:3,value:"TIMECLOCK"};IfcElectricTimeControlTypeEnum.TIMEDELAY={type:3,value:"TIMEDELAY"};IfcElectricTimeControlTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElectricTimeControlTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElectricTimeControlTypeEnum=IfcElectricTimeControlTypeEnum;var IfcElementAssemblyTypeEnum=/*#__PURE__*/_createClass(function IfcElementAssemblyTypeEnum(){_classCallCheck(this,IfcElementAssemblyTypeEnum);});IfcElementAssemblyTypeEnum.ABUTMENT={type:3,value:"ABUTMENT"};IfcElementAssemblyTypeEnum.ACCESSORY_ASSEMBLY={type:3,value:"ACCESSORY_ASSEMBLY"};IfcElementAssemblyTypeEnum.ARCH={type:3,value:"ARCH"};IfcElementAssemblyTypeEnum.BEAM_GRID={type:3,value:"BEAM_GRID"};IfcElementAssemblyTypeEnum.BRACED_FRAME={type:3,value:"BRACED_FRAME"};IfcElementAssemblyTypeEnum.CROSS_BRACING={type:3,value:"CROSS_BRACING"};IfcElementAssemblyTypeEnum.DECK={type:3,value:"DECK"};IfcElementAssemblyTypeEnum.DILATATIONPANEL={type:3,value:"DILATATIONPANEL"};IfcElementAssemblyTypeEnum.ENTRANCEWORKS={type:3,value:"ENTRANCEWORKS"};IfcElementAssemblyTypeEnum.GIRDER={type:3,value:"GIRDER"};IfcElementAssemblyTypeEnum.GRID={type:3,value:"GRID"};IfcElementAssemblyTypeEnum.MAST={type:3,value:"MAST"};IfcElementAssemblyTypeEnum.PIER={type:3,value:"PIER"};IfcElementAssemblyTypeEnum.PYLON={type:3,value:"PYLON"};IfcElementAssemblyTypeEnum.RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY={type:3,value:"RAIL_MECHANICAL_EQUIPMENT_ASSEMBLY"};IfcElementAssemblyTypeEnum.REINFORCEMENT_UNIT={type:3,value:"REINFORCEMENT_UNIT"};IfcElementAssemblyTypeEnum.RIGID_FRAME={type:3,value:"RIGID_FRAME"};IfcElementAssemblyTypeEnum.SHELTER={type:3,value:"SHELTER"};IfcElementAssemblyTypeEnum.SIGNALASSEMBLY={type:3,value:"SIGNALASSEMBLY"};IfcElementAssemblyTypeEnum.SLAB_FIELD={type:3,value:"SLAB_FIELD"};IfcElementAssemblyTypeEnum.SUMPBUSTER={type:3,value:"SUMPBUSTER"};IfcElementAssemblyTypeEnum.SUPPORTINGASSEMBLY={type:3,value:"SUPPORTINGASSEMBLY"};IfcElementAssemblyTypeEnum.SUSPENSIONASSEMBLY={type:3,value:"SUSPENSIONASSEMBLY"};IfcElementAssemblyTypeEnum.TRACKPANEL={type:3,value:"TRACKPANEL"};IfcElementAssemblyTypeEnum.TRACTION_SWITCHING_ASSEMBLY={type:3,value:"TRACTION_SWITCHING_ASSEMBLY"};IfcElementAssemblyTypeEnum.TRAFFIC_CALMING_DEVICE={type:3,value:"TRAFFIC_CALMING_DEVICE"};IfcElementAssemblyTypeEnum.TRUSS={type:3,value:"TRUSS"};IfcElementAssemblyTypeEnum.TURNOUTPANEL={type:3,value:"TURNOUTPANEL"};IfcElementAssemblyTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcElementAssemblyTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcElementAssemblyTypeEnum=IfcElementAssemblyTypeEnum;var IfcElementCompositionEnum=/*#__PURE__*/_createClass(function IfcElementCompositionEnum(){_classCallCheck(this,IfcElementCompositionEnum);});IfcElementCompositionEnum.COMPLEX={type:3,value:"COMPLEX"};IfcElementCompositionEnum.ELEMENT={type:3,value:"ELEMENT"};IfcElementCompositionEnum.PARTIAL={type:3,value:"PARTIAL"};IFC4X32.IfcElementCompositionEnum=IfcElementCompositionEnum;var IfcEngineTypeEnum=/*#__PURE__*/_createClass(function IfcEngineTypeEnum(){_classCallCheck(this,IfcEngineTypeEnum);});IfcEngineTypeEnum.EXTERNALCOMBUSTION={type:3,value:"EXTERNALCOMBUSTION"};IfcEngineTypeEnum.INTERNALCOMBUSTION={type:3,value:"INTERNALCOMBUSTION"};IfcEngineTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEngineTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcEngineTypeEnum=IfcEngineTypeEnum;var IfcEvaporativeCoolerTypeEnum=/*#__PURE__*/_createClass(function IfcEvaporativeCoolerTypeEnum(){_classCallCheck(this,IfcEvaporativeCoolerTypeEnum);});IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVEAIRWASHER={type:3,value:"DIRECTEVAPORATIVEAIRWASHER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER={type:3,value:"DIRECTEVAPORATIVEPACKAGEDROTARYAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERANDOMMEDIAAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER={type:3,value:"DIRECTEVAPORATIVERIGIDMEDIAAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER={type:3,value:"DIRECTEVAPORATIVESLINGERSPACKAGEDAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.INDIRECTDIRECTCOMBINATION={type:3,value:"INDIRECTDIRECTCOMBINATION"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER={type:3,value:"INDIRECTEVAPORATIVECOOLINGTOWERORCOILCOOLER"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVEPACKAGEAIRCOOLER={type:3,value:"INDIRECTEVAPORATIVEPACKAGEAIRCOOLER"};IfcEvaporativeCoolerTypeEnum.INDIRECTEVAPORATIVEWETCOIL={type:3,value:"INDIRECTEVAPORATIVEWETCOIL"};IfcEvaporativeCoolerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEvaporativeCoolerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcEvaporativeCoolerTypeEnum=IfcEvaporativeCoolerTypeEnum;var IfcEvaporatorTypeEnum=/*#__PURE__*/_createClass(function IfcEvaporatorTypeEnum(){_classCallCheck(this,IfcEvaporatorTypeEnum);});IfcEvaporatorTypeEnum.DIRECTEXPANSION={type:3,value:"DIRECTEXPANSION"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONBRAZEDPLATE={type:3,value:"DIRECTEXPANSIONBRAZEDPLATE"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONSHELLANDTUBE={type:3,value:"DIRECTEXPANSIONSHELLANDTUBE"};IfcEvaporatorTypeEnum.DIRECTEXPANSIONTUBEINTUBE={type:3,value:"DIRECTEXPANSIONTUBEINTUBE"};IfcEvaporatorTypeEnum.FLOODEDSHELLANDTUBE={type:3,value:"FLOODEDSHELLANDTUBE"};IfcEvaporatorTypeEnum.SHELLANDCOIL={type:3,value:"SHELLANDCOIL"};IfcEvaporatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEvaporatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcEvaporatorTypeEnum=IfcEvaporatorTypeEnum;var IfcEventTriggerTypeEnum=/*#__PURE__*/_createClass(function IfcEventTriggerTypeEnum(){_classCallCheck(this,IfcEventTriggerTypeEnum);});IfcEventTriggerTypeEnum.EVENTCOMPLEX={type:3,value:"EVENTCOMPLEX"};IfcEventTriggerTypeEnum.EVENTMESSAGE={type:3,value:"EVENTMESSAGE"};IfcEventTriggerTypeEnum.EVENTRULE={type:3,value:"EVENTRULE"};IfcEventTriggerTypeEnum.EVENTTIME={type:3,value:"EVENTTIME"};IfcEventTriggerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEventTriggerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcEventTriggerTypeEnum=IfcEventTriggerTypeEnum;var IfcEventTypeEnum=/*#__PURE__*/_createClass(function IfcEventTypeEnum(){_classCallCheck(this,IfcEventTypeEnum);});IfcEventTypeEnum.ENDEVENT={type:3,value:"ENDEVENT"};IfcEventTypeEnum.INTERMEDIATEEVENT={type:3,value:"INTERMEDIATEEVENT"};IfcEventTypeEnum.STARTEVENT={type:3,value:"STARTEVENT"};IfcEventTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcEventTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcEventTypeEnum=IfcEventTypeEnum;var IfcExternalSpatialElementTypeEnum=/*#__PURE__*/_createClass(function IfcExternalSpatialElementTypeEnum(){_classCallCheck(this,IfcExternalSpatialElementTypeEnum);});IfcExternalSpatialElementTypeEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcExternalSpatialElementTypeEnum.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"};IfcExternalSpatialElementTypeEnum.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"};IfcExternalSpatialElementTypeEnum.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"};IfcExternalSpatialElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcExternalSpatialElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcExternalSpatialElementTypeEnum=IfcExternalSpatialElementTypeEnum;var IfcFacilityPartCommonTypeEnum=/*#__PURE__*/_createClass(function IfcFacilityPartCommonTypeEnum(){_classCallCheck(this,IfcFacilityPartCommonTypeEnum);});IfcFacilityPartCommonTypeEnum.ABOVEGROUND={type:3,value:"ABOVEGROUND"};IfcFacilityPartCommonTypeEnum.BELOWGROUND={type:3,value:"BELOWGROUND"};IfcFacilityPartCommonTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcFacilityPartCommonTypeEnum.LEVELCROSSING={type:3,value:"LEVELCROSSING"};IfcFacilityPartCommonTypeEnum.SEGMENT={type:3,value:"SEGMENT"};IfcFacilityPartCommonTypeEnum.SUBSTRUCTURE={type:3,value:"SUBSTRUCTURE"};IfcFacilityPartCommonTypeEnum.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"};IfcFacilityPartCommonTypeEnum.TERMINAL={type:3,value:"TERMINAL"};IfcFacilityPartCommonTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFacilityPartCommonTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFacilityPartCommonTypeEnum=IfcFacilityPartCommonTypeEnum;var IfcFacilityUsageEnum=/*#__PURE__*/_createClass(function IfcFacilityUsageEnum(){_classCallCheck(this,IfcFacilityUsageEnum);});IfcFacilityUsageEnum.LATERAL={type:3,value:"LATERAL"};IfcFacilityUsageEnum.LONGITUDINAL={type:3,value:"LONGITUDINAL"};IfcFacilityUsageEnum.REGION={type:3,value:"REGION"};IfcFacilityUsageEnum.VERTICAL={type:3,value:"VERTICAL"};IfcFacilityUsageEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFacilityUsageEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFacilityUsageEnum=IfcFacilityUsageEnum;var IfcFanTypeEnum=/*#__PURE__*/_createClass(function IfcFanTypeEnum(){_classCallCheck(this,IfcFanTypeEnum);});IfcFanTypeEnum.CENTRIFUGALAIRFOIL={type:3,value:"CENTRIFUGALAIRFOIL"};IfcFanTypeEnum.CENTRIFUGALBACKWARDINCLINEDCURVED={type:3,value:"CENTRIFUGALBACKWARDINCLINEDCURVED"};IfcFanTypeEnum.CENTRIFUGALFORWARDCURVED={type:3,value:"CENTRIFUGALFORWARDCURVED"};IfcFanTypeEnum.CENTRIFUGALRADIAL={type:3,value:"CENTRIFUGALRADIAL"};IfcFanTypeEnum.PROPELLORAXIAL={type:3,value:"PROPELLORAXIAL"};IfcFanTypeEnum.TUBEAXIAL={type:3,value:"TUBEAXIAL"};IfcFanTypeEnum.VANEAXIAL={type:3,value:"VANEAXIAL"};IfcFanTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFanTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFanTypeEnum=IfcFanTypeEnum;var IfcFastenerTypeEnum=/*#__PURE__*/_createClass(function IfcFastenerTypeEnum(){_classCallCheck(this,IfcFastenerTypeEnum);});IfcFastenerTypeEnum.GLUE={type:3,value:"GLUE"};IfcFastenerTypeEnum.MORTAR={type:3,value:"MORTAR"};IfcFastenerTypeEnum.WELD={type:3,value:"WELD"};IfcFastenerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFastenerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFastenerTypeEnum=IfcFastenerTypeEnum;var IfcFilterTypeEnum=/*#__PURE__*/_createClass(function IfcFilterTypeEnum(){_classCallCheck(this,IfcFilterTypeEnum);});IfcFilterTypeEnum.AIRPARTICLEFILTER={type:3,value:"AIRPARTICLEFILTER"};IfcFilterTypeEnum.COMPRESSEDAIRFILTER={type:3,value:"COMPRESSEDAIRFILTER"};IfcFilterTypeEnum.ODORFILTER={type:3,value:"ODORFILTER"};IfcFilterTypeEnum.OILFILTER={type:3,value:"OILFILTER"};IfcFilterTypeEnum.STRAINER={type:3,value:"STRAINER"};IfcFilterTypeEnum.WATERFILTER={type:3,value:"WATERFILTER"};IfcFilterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFilterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFilterTypeEnum=IfcFilterTypeEnum;var IfcFireSuppressionTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcFireSuppressionTerminalTypeEnum(){_classCallCheck(this,IfcFireSuppressionTerminalTypeEnum);});IfcFireSuppressionTerminalTypeEnum.BREECHINGINLET={type:3,value:"BREECHINGINLET"};IfcFireSuppressionTerminalTypeEnum.FIREHYDRANT={type:3,value:"FIREHYDRANT"};IfcFireSuppressionTerminalTypeEnum.FIREMONITOR={type:3,value:"FIREMONITOR"};IfcFireSuppressionTerminalTypeEnum.HOSEREEL={type:3,value:"HOSEREEL"};IfcFireSuppressionTerminalTypeEnum.SPRINKLER={type:3,value:"SPRINKLER"};IfcFireSuppressionTerminalTypeEnum.SPRINKLERDEFLECTOR={type:3,value:"SPRINKLERDEFLECTOR"};IfcFireSuppressionTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFireSuppressionTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFireSuppressionTerminalTypeEnum=IfcFireSuppressionTerminalTypeEnum;var IfcFlowDirectionEnum=/*#__PURE__*/_createClass(function IfcFlowDirectionEnum(){_classCallCheck(this,IfcFlowDirectionEnum);});IfcFlowDirectionEnum.SINK={type:3,value:"SINK"};IfcFlowDirectionEnum.SOURCE={type:3,value:"SOURCE"};IfcFlowDirectionEnum.SOURCEANDSINK={type:3,value:"SOURCEANDSINK"};IfcFlowDirectionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFlowDirectionEnum=IfcFlowDirectionEnum;var IfcFlowInstrumentTypeEnum=/*#__PURE__*/_createClass(function IfcFlowInstrumentTypeEnum(){_classCallCheck(this,IfcFlowInstrumentTypeEnum);});IfcFlowInstrumentTypeEnum.AMMETER={type:3,value:"AMMETER"};IfcFlowInstrumentTypeEnum.COMBINED={type:3,value:"COMBINED"};IfcFlowInstrumentTypeEnum.FREQUENCYMETER={type:3,value:"FREQUENCYMETER"};IfcFlowInstrumentTypeEnum.PHASEANGLEMETER={type:3,value:"PHASEANGLEMETER"};IfcFlowInstrumentTypeEnum.POWERFACTORMETER={type:3,value:"POWERFACTORMETER"};IfcFlowInstrumentTypeEnum.PRESSUREGAUGE={type:3,value:"PRESSUREGAUGE"};IfcFlowInstrumentTypeEnum.THERMOMETER={type:3,value:"THERMOMETER"};IfcFlowInstrumentTypeEnum.VOLTMETER={type:3,value:"VOLTMETER"};IfcFlowInstrumentTypeEnum.VOLTMETER_PEAK={type:3,value:"VOLTMETER_PEAK"};IfcFlowInstrumentTypeEnum.VOLTMETER_RMS={type:3,value:"VOLTMETER_RMS"};IfcFlowInstrumentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFlowInstrumentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFlowInstrumentTypeEnum=IfcFlowInstrumentTypeEnum;var IfcFlowMeterTypeEnum=/*#__PURE__*/_createClass(function IfcFlowMeterTypeEnum(){_classCallCheck(this,IfcFlowMeterTypeEnum);});IfcFlowMeterTypeEnum.ENERGYMETER={type:3,value:"ENERGYMETER"};IfcFlowMeterTypeEnum.GASMETER={type:3,value:"GASMETER"};IfcFlowMeterTypeEnum.OILMETER={type:3,value:"OILMETER"};IfcFlowMeterTypeEnum.WATERMETER={type:3,value:"WATERMETER"};IfcFlowMeterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFlowMeterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFlowMeterTypeEnum=IfcFlowMeterTypeEnum;var IfcFootingTypeEnum=/*#__PURE__*/_createClass(function IfcFootingTypeEnum(){_classCallCheck(this,IfcFootingTypeEnum);});IfcFootingTypeEnum.CAISSON_FOUNDATION={type:3,value:"CAISSON_FOUNDATION"};IfcFootingTypeEnum.FOOTING_BEAM={type:3,value:"FOOTING_BEAM"};IfcFootingTypeEnum.PAD_FOOTING={type:3,value:"PAD_FOOTING"};IfcFootingTypeEnum.PILE_CAP={type:3,value:"PILE_CAP"};IfcFootingTypeEnum.STRIP_FOOTING={type:3,value:"STRIP_FOOTING"};IfcFootingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFootingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFootingTypeEnum=IfcFootingTypeEnum;var IfcFurnitureTypeEnum=/*#__PURE__*/_createClass(function IfcFurnitureTypeEnum(){_classCallCheck(this,IfcFurnitureTypeEnum);});IfcFurnitureTypeEnum.BED={type:3,value:"BED"};IfcFurnitureTypeEnum.CHAIR={type:3,value:"CHAIR"};IfcFurnitureTypeEnum.DESK={type:3,value:"DESK"};IfcFurnitureTypeEnum.FILECABINET={type:3,value:"FILECABINET"};IfcFurnitureTypeEnum.SHELF={type:3,value:"SHELF"};IfcFurnitureTypeEnum.SOFA={type:3,value:"SOFA"};IfcFurnitureTypeEnum.TABLE={type:3,value:"TABLE"};IfcFurnitureTypeEnum.TECHNICALCABINET={type:3,value:"TECHNICALCABINET"};IfcFurnitureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcFurnitureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcFurnitureTypeEnum=IfcFurnitureTypeEnum;var IfcGeographicElementTypeEnum=/*#__PURE__*/_createClass(function IfcGeographicElementTypeEnum(){_classCallCheck(this,IfcGeographicElementTypeEnum);});IfcGeographicElementTypeEnum.SOIL_BORING_POINT={type:3,value:"SOIL_BORING_POINT"};IfcGeographicElementTypeEnum.TERRAIN={type:3,value:"TERRAIN"};IfcGeographicElementTypeEnum.VEGETATION={type:3,value:"VEGETATION"};IfcGeographicElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGeographicElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcGeographicElementTypeEnum=IfcGeographicElementTypeEnum;var IfcGeometricProjectionEnum=/*#__PURE__*/_createClass(function IfcGeometricProjectionEnum(){_classCallCheck(this,IfcGeometricProjectionEnum);});IfcGeometricProjectionEnum.ELEVATION_VIEW={type:3,value:"ELEVATION_VIEW"};IfcGeometricProjectionEnum.GRAPH_VIEW={type:3,value:"GRAPH_VIEW"};IfcGeometricProjectionEnum.MODEL_VIEW={type:3,value:"MODEL_VIEW"};IfcGeometricProjectionEnum.PLAN_VIEW={type:3,value:"PLAN_VIEW"};IfcGeometricProjectionEnum.REFLECTED_PLAN_VIEW={type:3,value:"REFLECTED_PLAN_VIEW"};IfcGeometricProjectionEnum.SECTION_VIEW={type:3,value:"SECTION_VIEW"};IfcGeometricProjectionEnum.SKETCH_VIEW={type:3,value:"SKETCH_VIEW"};IfcGeometricProjectionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGeometricProjectionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcGeometricProjectionEnum=IfcGeometricProjectionEnum;var IfcGeotechnicalStratumTypeEnum=/*#__PURE__*/_createClass(function IfcGeotechnicalStratumTypeEnum(){_classCallCheck(this,IfcGeotechnicalStratumTypeEnum);});IfcGeotechnicalStratumTypeEnum.SOLID={type:3,value:"SOLID"};IfcGeotechnicalStratumTypeEnum.VOID={type:3,value:"VOID"};IfcGeotechnicalStratumTypeEnum.WATER={type:3,value:"WATER"};IfcGeotechnicalStratumTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGeotechnicalStratumTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcGeotechnicalStratumTypeEnum=IfcGeotechnicalStratumTypeEnum;var IfcGlobalOrLocalEnum=/*#__PURE__*/_createClass(function IfcGlobalOrLocalEnum(){_classCallCheck(this,IfcGlobalOrLocalEnum);});IfcGlobalOrLocalEnum.GLOBAL_COORDS={type:3,value:"GLOBAL_COORDS"};IfcGlobalOrLocalEnum.LOCAL_COORDS={type:3,value:"LOCAL_COORDS"};IFC4X32.IfcGlobalOrLocalEnum=IfcGlobalOrLocalEnum;var IfcGridTypeEnum=/*#__PURE__*/_createClass(function IfcGridTypeEnum(){_classCallCheck(this,IfcGridTypeEnum);});IfcGridTypeEnum.IRREGULAR={type:3,value:"IRREGULAR"};IfcGridTypeEnum.RADIAL={type:3,value:"RADIAL"};IfcGridTypeEnum.RECTANGULAR={type:3,value:"RECTANGULAR"};IfcGridTypeEnum.TRIANGULAR={type:3,value:"TRIANGULAR"};IfcGridTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcGridTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcGridTypeEnum=IfcGridTypeEnum;var IfcHeatExchangerTypeEnum=/*#__PURE__*/_createClass(function IfcHeatExchangerTypeEnum(){_classCallCheck(this,IfcHeatExchangerTypeEnum);});IfcHeatExchangerTypeEnum.PLATE={type:3,value:"PLATE"};IfcHeatExchangerTypeEnum.SHELLANDTUBE={type:3,value:"SHELLANDTUBE"};IfcHeatExchangerTypeEnum.TURNOUTHEATING={type:3,value:"TURNOUTHEATING"};IfcHeatExchangerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcHeatExchangerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcHeatExchangerTypeEnum=IfcHeatExchangerTypeEnum;var IfcHumidifierTypeEnum=/*#__PURE__*/_createClass(function IfcHumidifierTypeEnum(){_classCallCheck(this,IfcHumidifierTypeEnum);});IfcHumidifierTypeEnum.ADIABATICAIRWASHER={type:3,value:"ADIABATICAIRWASHER"};IfcHumidifierTypeEnum.ADIABATICATOMIZING={type:3,value:"ADIABATICATOMIZING"};IfcHumidifierTypeEnum.ADIABATICCOMPRESSEDAIRNOZZLE={type:3,value:"ADIABATICCOMPRESSEDAIRNOZZLE"};IfcHumidifierTypeEnum.ADIABATICPAN={type:3,value:"ADIABATICPAN"};IfcHumidifierTypeEnum.ADIABATICRIGIDMEDIA={type:3,value:"ADIABATICRIGIDMEDIA"};IfcHumidifierTypeEnum.ADIABATICULTRASONIC={type:3,value:"ADIABATICULTRASONIC"};IfcHumidifierTypeEnum.ADIABATICWETTEDELEMENT={type:3,value:"ADIABATICWETTEDELEMENT"};IfcHumidifierTypeEnum.ASSISTEDBUTANE={type:3,value:"ASSISTEDBUTANE"};IfcHumidifierTypeEnum.ASSISTEDELECTRIC={type:3,value:"ASSISTEDELECTRIC"};IfcHumidifierTypeEnum.ASSISTEDNATURALGAS={type:3,value:"ASSISTEDNATURALGAS"};IfcHumidifierTypeEnum.ASSISTEDPROPANE={type:3,value:"ASSISTEDPROPANE"};IfcHumidifierTypeEnum.ASSISTEDSTEAM={type:3,value:"ASSISTEDSTEAM"};IfcHumidifierTypeEnum.STEAMINJECTION={type:3,value:"STEAMINJECTION"};IfcHumidifierTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcHumidifierTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcHumidifierTypeEnum=IfcHumidifierTypeEnum;var IfcImpactProtectionDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcImpactProtectionDeviceTypeEnum(){_classCallCheck(this,IfcImpactProtectionDeviceTypeEnum);});IfcImpactProtectionDeviceTypeEnum.BUMPER={type:3,value:"BUMPER"};IfcImpactProtectionDeviceTypeEnum.CRASHCUSHION={type:3,value:"CRASHCUSHION"};IfcImpactProtectionDeviceTypeEnum.DAMPINGSYSTEM={type:3,value:"DAMPINGSYSTEM"};IfcImpactProtectionDeviceTypeEnum.FENDER={type:3,value:"FENDER"};IfcImpactProtectionDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcImpactProtectionDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcImpactProtectionDeviceTypeEnum=IfcImpactProtectionDeviceTypeEnum;var IfcInterceptorTypeEnum=/*#__PURE__*/_createClass(function IfcInterceptorTypeEnum(){_classCallCheck(this,IfcInterceptorTypeEnum);});IfcInterceptorTypeEnum.CYCLONIC={type:3,value:"CYCLONIC"};IfcInterceptorTypeEnum.GREASE={type:3,value:"GREASE"};IfcInterceptorTypeEnum.OIL={type:3,value:"OIL"};IfcInterceptorTypeEnum.PETROL={type:3,value:"PETROL"};IfcInterceptorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcInterceptorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcInterceptorTypeEnum=IfcInterceptorTypeEnum;var IfcInternalOrExternalEnum=/*#__PURE__*/_createClass(function IfcInternalOrExternalEnum(){_classCallCheck(this,IfcInternalOrExternalEnum);});IfcInternalOrExternalEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcInternalOrExternalEnum.EXTERNAL_EARTH={type:3,value:"EXTERNAL_EARTH"};IfcInternalOrExternalEnum.EXTERNAL_FIRE={type:3,value:"EXTERNAL_FIRE"};IfcInternalOrExternalEnum.EXTERNAL_WATER={type:3,value:"EXTERNAL_WATER"};IfcInternalOrExternalEnum.INTERNAL={type:3,value:"INTERNAL"};IfcInternalOrExternalEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcInternalOrExternalEnum=IfcInternalOrExternalEnum;var IfcInventoryTypeEnum=/*#__PURE__*/_createClass(function IfcInventoryTypeEnum(){_classCallCheck(this,IfcInventoryTypeEnum);});IfcInventoryTypeEnum.ASSETINVENTORY={type:3,value:"ASSETINVENTORY"};IfcInventoryTypeEnum.FURNITUREINVENTORY={type:3,value:"FURNITUREINVENTORY"};IfcInventoryTypeEnum.SPACEINVENTORY={type:3,value:"SPACEINVENTORY"};IfcInventoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcInventoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcInventoryTypeEnum=IfcInventoryTypeEnum;var IfcJunctionBoxTypeEnum=/*#__PURE__*/_createClass(function IfcJunctionBoxTypeEnum(){_classCallCheck(this,IfcJunctionBoxTypeEnum);});IfcJunctionBoxTypeEnum.DATA={type:3,value:"DATA"};IfcJunctionBoxTypeEnum.POWER={type:3,value:"POWER"};IfcJunctionBoxTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcJunctionBoxTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcJunctionBoxTypeEnum=IfcJunctionBoxTypeEnum;var IfcKnotType=/*#__PURE__*/_createClass(function IfcKnotType(){_classCallCheck(this,IfcKnotType);});IfcKnotType.PIECEWISE_BEZIER_KNOTS={type:3,value:"PIECEWISE_BEZIER_KNOTS"};IfcKnotType.QUASI_UNIFORM_KNOTS={type:3,value:"QUASI_UNIFORM_KNOTS"};IfcKnotType.UNIFORM_KNOTS={type:3,value:"UNIFORM_KNOTS"};IfcKnotType.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC4X32.IfcKnotType=IfcKnotType;var IfcLaborResourceTypeEnum=/*#__PURE__*/_createClass(function IfcLaborResourceTypeEnum(){_classCallCheck(this,IfcLaborResourceTypeEnum);});IfcLaborResourceTypeEnum.ADMINISTRATION={type:3,value:"ADMINISTRATION"};IfcLaborResourceTypeEnum.CARPENTRY={type:3,value:"CARPENTRY"};IfcLaborResourceTypeEnum.CLEANING={type:3,value:"CLEANING"};IfcLaborResourceTypeEnum.CONCRETE={type:3,value:"CONCRETE"};IfcLaborResourceTypeEnum.DRYWALL={type:3,value:"DRYWALL"};IfcLaborResourceTypeEnum.ELECTRIC={type:3,value:"ELECTRIC"};IfcLaborResourceTypeEnum.FINISHING={type:3,value:"FINISHING"};IfcLaborResourceTypeEnum.FLOORING={type:3,value:"FLOORING"};IfcLaborResourceTypeEnum.GENERAL={type:3,value:"GENERAL"};IfcLaborResourceTypeEnum.HVAC={type:3,value:"HVAC"};IfcLaborResourceTypeEnum.LANDSCAPING={type:3,value:"LANDSCAPING"};IfcLaborResourceTypeEnum.MASONRY={type:3,value:"MASONRY"};IfcLaborResourceTypeEnum.PAINTING={type:3,value:"PAINTING"};IfcLaborResourceTypeEnum.PAVING={type:3,value:"PAVING"};IfcLaborResourceTypeEnum.PLUMBING={type:3,value:"PLUMBING"};IfcLaborResourceTypeEnum.ROOFING={type:3,value:"ROOFING"};IfcLaborResourceTypeEnum.SITEGRADING={type:3,value:"SITEGRADING"};IfcLaborResourceTypeEnum.STEELWORK={type:3,value:"STEELWORK"};IfcLaborResourceTypeEnum.SURVEYING={type:3,value:"SURVEYING"};IfcLaborResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLaborResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcLaborResourceTypeEnum=IfcLaborResourceTypeEnum;var IfcLampTypeEnum=/*#__PURE__*/_createClass(function IfcLampTypeEnum(){_classCallCheck(this,IfcLampTypeEnum);});IfcLampTypeEnum.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"};IfcLampTypeEnum.FLUORESCENT={type:3,value:"FLUORESCENT"};IfcLampTypeEnum.HALOGEN={type:3,value:"HALOGEN"};IfcLampTypeEnum.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"};IfcLampTypeEnum.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"};IfcLampTypeEnum.LED={type:3,value:"LED"};IfcLampTypeEnum.METALHALIDE={type:3,value:"METALHALIDE"};IfcLampTypeEnum.OLED={type:3,value:"OLED"};IfcLampTypeEnum.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"};IfcLampTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLampTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcLampTypeEnum=IfcLampTypeEnum;var IfcLayerSetDirectionEnum=/*#__PURE__*/_createClass(function IfcLayerSetDirectionEnum(){_classCallCheck(this,IfcLayerSetDirectionEnum);});IfcLayerSetDirectionEnum.AXIS1={type:3,value:"AXIS1"};IfcLayerSetDirectionEnum.AXIS2={type:3,value:"AXIS2"};IfcLayerSetDirectionEnum.AXIS3={type:3,value:"AXIS3"};IFC4X32.IfcLayerSetDirectionEnum=IfcLayerSetDirectionEnum;var IfcLightDistributionCurveEnum=/*#__PURE__*/_createClass(function IfcLightDistributionCurveEnum(){_classCallCheck(this,IfcLightDistributionCurveEnum);});IfcLightDistributionCurveEnum.TYPE_A={type:3,value:"TYPE_A"};IfcLightDistributionCurveEnum.TYPE_B={type:3,value:"TYPE_B"};IfcLightDistributionCurveEnum.TYPE_C={type:3,value:"TYPE_C"};IfcLightDistributionCurveEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcLightDistributionCurveEnum=IfcLightDistributionCurveEnum;var IfcLightEmissionSourceEnum=/*#__PURE__*/_createClass(function IfcLightEmissionSourceEnum(){_classCallCheck(this,IfcLightEmissionSourceEnum);});IfcLightEmissionSourceEnum.COMPACTFLUORESCENT={type:3,value:"COMPACTFLUORESCENT"};IfcLightEmissionSourceEnum.FLUORESCENT={type:3,value:"FLUORESCENT"};IfcLightEmissionSourceEnum.HIGHPRESSUREMERCURY={type:3,value:"HIGHPRESSUREMERCURY"};IfcLightEmissionSourceEnum.HIGHPRESSURESODIUM={type:3,value:"HIGHPRESSURESODIUM"};IfcLightEmissionSourceEnum.LIGHTEMITTINGDIODE={type:3,value:"LIGHTEMITTINGDIODE"};IfcLightEmissionSourceEnum.LOWPRESSURESODIUM={type:3,value:"LOWPRESSURESODIUM"};IfcLightEmissionSourceEnum.LOWVOLTAGEHALOGEN={type:3,value:"LOWVOLTAGEHALOGEN"};IfcLightEmissionSourceEnum.MAINVOLTAGEHALOGEN={type:3,value:"MAINVOLTAGEHALOGEN"};IfcLightEmissionSourceEnum.METALHALIDE={type:3,value:"METALHALIDE"};IfcLightEmissionSourceEnum.TUNGSTENFILAMENT={type:3,value:"TUNGSTENFILAMENT"};IfcLightEmissionSourceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcLightEmissionSourceEnum=IfcLightEmissionSourceEnum;var IfcLightFixtureTypeEnum=/*#__PURE__*/_createClass(function IfcLightFixtureTypeEnum(){_classCallCheck(this,IfcLightFixtureTypeEnum);});IfcLightFixtureTypeEnum.DIRECTIONSOURCE={type:3,value:"DIRECTIONSOURCE"};IfcLightFixtureTypeEnum.POINTSOURCE={type:3,value:"POINTSOURCE"};IfcLightFixtureTypeEnum.SECURITYLIGHTING={type:3,value:"SECURITYLIGHTING"};IfcLightFixtureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLightFixtureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcLightFixtureTypeEnum=IfcLightFixtureTypeEnum;var IfcLiquidTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcLiquidTerminalTypeEnum(){_classCallCheck(this,IfcLiquidTerminalTypeEnum);});IfcLiquidTerminalTypeEnum.HOSEREEL={type:3,value:"HOSEREEL"};IfcLiquidTerminalTypeEnum.LOADINGARM={type:3,value:"LOADINGARM"};IfcLiquidTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLiquidTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcLiquidTerminalTypeEnum=IfcLiquidTerminalTypeEnum;var IfcLoadGroupTypeEnum=/*#__PURE__*/_createClass(function IfcLoadGroupTypeEnum(){_classCallCheck(this,IfcLoadGroupTypeEnum);});IfcLoadGroupTypeEnum.LOAD_CASE={type:3,value:"LOAD_CASE"};IfcLoadGroupTypeEnum.LOAD_COMBINATION={type:3,value:"LOAD_COMBINATION"};IfcLoadGroupTypeEnum.LOAD_GROUP={type:3,value:"LOAD_GROUP"};IfcLoadGroupTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcLoadGroupTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcLoadGroupTypeEnum=IfcLoadGroupTypeEnum;var IfcLogicalOperatorEnum=/*#__PURE__*/_createClass(function IfcLogicalOperatorEnum(){_classCallCheck(this,IfcLogicalOperatorEnum);});IfcLogicalOperatorEnum.LOGICALAND={type:3,value:"LOGICALAND"};IfcLogicalOperatorEnum.LOGICALNOTAND={type:3,value:"LOGICALNOTAND"};IfcLogicalOperatorEnum.LOGICALNOTOR={type:3,value:"LOGICALNOTOR"};IfcLogicalOperatorEnum.LOGICALOR={type:3,value:"LOGICALOR"};IfcLogicalOperatorEnum.LOGICALXOR={type:3,value:"LOGICALXOR"};IFC4X32.IfcLogicalOperatorEnum=IfcLogicalOperatorEnum;var IfcMarineFacilityTypeEnum=/*#__PURE__*/_createClass(function IfcMarineFacilityTypeEnum(){_classCallCheck(this,IfcMarineFacilityTypeEnum);});IfcMarineFacilityTypeEnum.BARRIERBEACH={type:3,value:"BARRIERBEACH"};IfcMarineFacilityTypeEnum.BREAKWATER={type:3,value:"BREAKWATER"};IfcMarineFacilityTypeEnum.CANAL={type:3,value:"CANAL"};IfcMarineFacilityTypeEnum.DRYDOCK={type:3,value:"DRYDOCK"};IfcMarineFacilityTypeEnum.FLOATINGDOCK={type:3,value:"FLOATINGDOCK"};IfcMarineFacilityTypeEnum.HYDROLIFT={type:3,value:"HYDROLIFT"};IfcMarineFacilityTypeEnum.JETTY={type:3,value:"JETTY"};IfcMarineFacilityTypeEnum.LAUNCHRECOVERY={type:3,value:"LAUNCHRECOVERY"};IfcMarineFacilityTypeEnum.MARINEDEFENCE={type:3,value:"MARINEDEFENCE"};IfcMarineFacilityTypeEnum.NAVIGATIONALCHANNEL={type:3,value:"NAVIGATIONALCHANNEL"};IfcMarineFacilityTypeEnum.PORT={type:3,value:"PORT"};IfcMarineFacilityTypeEnum.QUAY={type:3,value:"QUAY"};IfcMarineFacilityTypeEnum.REVETMENT={type:3,value:"REVETMENT"};IfcMarineFacilityTypeEnum.SHIPLIFT={type:3,value:"SHIPLIFT"};IfcMarineFacilityTypeEnum.SHIPLOCK={type:3,value:"SHIPLOCK"};IfcMarineFacilityTypeEnum.SHIPYARD={type:3,value:"SHIPYARD"};IfcMarineFacilityTypeEnum.SLIPWAY={type:3,value:"SLIPWAY"};IfcMarineFacilityTypeEnum.WATERWAY={type:3,value:"WATERWAY"};IfcMarineFacilityTypeEnum.WATERWAYSHIPLIFT={type:3,value:"WATERWAYSHIPLIFT"};IfcMarineFacilityTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMarineFacilityTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMarineFacilityTypeEnum=IfcMarineFacilityTypeEnum;var IfcMarinePartTypeEnum=/*#__PURE__*/_createClass(function IfcMarinePartTypeEnum(){_classCallCheck(this,IfcMarinePartTypeEnum);});IfcMarinePartTypeEnum.ABOVEWATERLINE={type:3,value:"ABOVEWATERLINE"};IfcMarinePartTypeEnum.ANCHORAGE={type:3,value:"ANCHORAGE"};IfcMarinePartTypeEnum.APPROACHCHANNEL={type:3,value:"APPROACHCHANNEL"};IfcMarinePartTypeEnum.BELOWWATERLINE={type:3,value:"BELOWWATERLINE"};IfcMarinePartTypeEnum.BERTHINGSTRUCTURE={type:3,value:"BERTHINGSTRUCTURE"};IfcMarinePartTypeEnum.CHAMBER={type:3,value:"CHAMBER"};IfcMarinePartTypeEnum.CILL_LEVEL={type:3,value:"CILL_LEVEL"};IfcMarinePartTypeEnum.COPELEVEL={type:3,value:"COPELEVEL"};IfcMarinePartTypeEnum.CORE={type:3,value:"CORE"};IfcMarinePartTypeEnum.CREST={type:3,value:"CREST"};IfcMarinePartTypeEnum.GATEHEAD={type:3,value:"GATEHEAD"};IfcMarinePartTypeEnum.GUDINGSTRUCTURE={type:3,value:"GUDINGSTRUCTURE"};IfcMarinePartTypeEnum.HIGHWATERLINE={type:3,value:"HIGHWATERLINE"};IfcMarinePartTypeEnum.LANDFIELD={type:3,value:"LANDFIELD"};IfcMarinePartTypeEnum.LEEWARDSIDE={type:3,value:"LEEWARDSIDE"};IfcMarinePartTypeEnum.LOWWATERLINE={type:3,value:"LOWWATERLINE"};IfcMarinePartTypeEnum.MANUFACTURING={type:3,value:"MANUFACTURING"};IfcMarinePartTypeEnum.NAVIGATIONALAREA={type:3,value:"NAVIGATIONALAREA"};IfcMarinePartTypeEnum.PROTECTION={type:3,value:"PROTECTION"};IfcMarinePartTypeEnum.SHIPTRANSFER={type:3,value:"SHIPTRANSFER"};IfcMarinePartTypeEnum.STORAGEAREA={type:3,value:"STORAGEAREA"};IfcMarinePartTypeEnum.VEHICLESERVICING={type:3,value:"VEHICLESERVICING"};IfcMarinePartTypeEnum.WATERFIELD={type:3,value:"WATERFIELD"};IfcMarinePartTypeEnum.WEATHERSIDE={type:3,value:"WEATHERSIDE"};IfcMarinePartTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMarinePartTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMarinePartTypeEnum=IfcMarinePartTypeEnum;var IfcMechanicalFastenerTypeEnum=/*#__PURE__*/_createClass(function IfcMechanicalFastenerTypeEnum(){_classCallCheck(this,IfcMechanicalFastenerTypeEnum);});IfcMechanicalFastenerTypeEnum.ANCHORBOLT={type:3,value:"ANCHORBOLT"};IfcMechanicalFastenerTypeEnum.BOLT={type:3,value:"BOLT"};IfcMechanicalFastenerTypeEnum.CHAIN={type:3,value:"CHAIN"};IfcMechanicalFastenerTypeEnum.COUPLER={type:3,value:"COUPLER"};IfcMechanicalFastenerTypeEnum.DOWEL={type:3,value:"DOWEL"};IfcMechanicalFastenerTypeEnum.NAIL={type:3,value:"NAIL"};IfcMechanicalFastenerTypeEnum.NAILPLATE={type:3,value:"NAILPLATE"};IfcMechanicalFastenerTypeEnum.RAILFASTENING={type:3,value:"RAILFASTENING"};IfcMechanicalFastenerTypeEnum.RAILJOINT={type:3,value:"RAILJOINT"};IfcMechanicalFastenerTypeEnum.RIVET={type:3,value:"RIVET"};IfcMechanicalFastenerTypeEnum.ROPE={type:3,value:"ROPE"};IfcMechanicalFastenerTypeEnum.SCREW={type:3,value:"SCREW"};IfcMechanicalFastenerTypeEnum.SHEARCONNECTOR={type:3,value:"SHEARCONNECTOR"};IfcMechanicalFastenerTypeEnum.STAPLE={type:3,value:"STAPLE"};IfcMechanicalFastenerTypeEnum.STUDSHEARCONNECTOR={type:3,value:"STUDSHEARCONNECTOR"};IfcMechanicalFastenerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMechanicalFastenerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMechanicalFastenerTypeEnum=IfcMechanicalFastenerTypeEnum;var IfcMedicalDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcMedicalDeviceTypeEnum(){_classCallCheck(this,IfcMedicalDeviceTypeEnum);});IfcMedicalDeviceTypeEnum.AIRSTATION={type:3,value:"AIRSTATION"};IfcMedicalDeviceTypeEnum.FEEDAIRUNIT={type:3,value:"FEEDAIRUNIT"};IfcMedicalDeviceTypeEnum.OXYGENGENERATOR={type:3,value:"OXYGENGENERATOR"};IfcMedicalDeviceTypeEnum.OXYGENPLANT={type:3,value:"OXYGENPLANT"};IfcMedicalDeviceTypeEnum.VACUUMSTATION={type:3,value:"VACUUMSTATION"};IfcMedicalDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMedicalDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMedicalDeviceTypeEnum=IfcMedicalDeviceTypeEnum;var IfcMemberTypeEnum=/*#__PURE__*/_createClass(function IfcMemberTypeEnum(){_classCallCheck(this,IfcMemberTypeEnum);});IfcMemberTypeEnum.ARCH_SEGMENT={type:3,value:"ARCH_SEGMENT"};IfcMemberTypeEnum.BRACE={type:3,value:"BRACE"};IfcMemberTypeEnum.CHORD={type:3,value:"CHORD"};IfcMemberTypeEnum.COLLAR={type:3,value:"COLLAR"};IfcMemberTypeEnum.MEMBER={type:3,value:"MEMBER"};IfcMemberTypeEnum.MULLION={type:3,value:"MULLION"};IfcMemberTypeEnum.PLATE={type:3,value:"PLATE"};IfcMemberTypeEnum.POST={type:3,value:"POST"};IfcMemberTypeEnum.PURLIN={type:3,value:"PURLIN"};IfcMemberTypeEnum.RAFTER={type:3,value:"RAFTER"};IfcMemberTypeEnum.STAY_CABLE={type:3,value:"STAY_CABLE"};IfcMemberTypeEnum.STIFFENING_RIB={type:3,value:"STIFFENING_RIB"};IfcMemberTypeEnum.STRINGER={type:3,value:"STRINGER"};IfcMemberTypeEnum.STRUCTURALCABLE={type:3,value:"STRUCTURALCABLE"};IfcMemberTypeEnum.STRUT={type:3,value:"STRUT"};IfcMemberTypeEnum.STUD={type:3,value:"STUD"};IfcMemberTypeEnum.SUSPENDER={type:3,value:"SUSPENDER"};IfcMemberTypeEnum.SUSPENSION_CABLE={type:3,value:"SUSPENSION_CABLE"};IfcMemberTypeEnum.TIEBAR={type:3,value:"TIEBAR"};IfcMemberTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMemberTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMemberTypeEnum=IfcMemberTypeEnum;var IfcMobileTelecommunicationsApplianceTypeEnum=/*#__PURE__*/_createClass(function IfcMobileTelecommunicationsApplianceTypeEnum(){_classCallCheck(this,IfcMobileTelecommunicationsApplianceTypeEnum);});IfcMobileTelecommunicationsApplianceTypeEnum.ACCESSPOINT={type:3,value:"ACCESSPOINT"};IfcMobileTelecommunicationsApplianceTypeEnum.BASEBANDUNIT={type:3,value:"BASEBANDUNIT"};IfcMobileTelecommunicationsApplianceTypeEnum.BASETRANSCEIVERSTATION={type:3,value:"BASETRANSCEIVERSTATION"};IfcMobileTelecommunicationsApplianceTypeEnum.E_UTRAN_NODE_B={type:3,value:"E_UTRAN_NODE_B"};IfcMobileTelecommunicationsApplianceTypeEnum.GATEWAY_GPRS_SUPPORT_NODE={type:3,value:"GATEWAY_GPRS_SUPPORT_NODE"};IfcMobileTelecommunicationsApplianceTypeEnum.MASTERUNIT={type:3,value:"MASTERUNIT"};IfcMobileTelecommunicationsApplianceTypeEnum.MOBILESWITCHINGCENTER={type:3,value:"MOBILESWITCHINGCENTER"};IfcMobileTelecommunicationsApplianceTypeEnum.MSCSERVER={type:3,value:"MSCSERVER"};IfcMobileTelecommunicationsApplianceTypeEnum.PACKETCONTROLUNIT={type:3,value:"PACKETCONTROLUNIT"};IfcMobileTelecommunicationsApplianceTypeEnum.REMOTERADIOUNIT={type:3,value:"REMOTERADIOUNIT"};IfcMobileTelecommunicationsApplianceTypeEnum.REMOTEUNIT={type:3,value:"REMOTEUNIT"};IfcMobileTelecommunicationsApplianceTypeEnum.SERVICE_GPRS_SUPPORT_NODE={type:3,value:"SERVICE_GPRS_SUPPORT_NODE"};IfcMobileTelecommunicationsApplianceTypeEnum.SUBSCRIBERSERVER={type:3,value:"SUBSCRIBERSERVER"};IfcMobileTelecommunicationsApplianceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMobileTelecommunicationsApplianceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMobileTelecommunicationsApplianceTypeEnum=IfcMobileTelecommunicationsApplianceTypeEnum;var IfcMooringDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcMooringDeviceTypeEnum(){_classCallCheck(this,IfcMooringDeviceTypeEnum);});IfcMooringDeviceTypeEnum.BOLLARD={type:3,value:"BOLLARD"};IfcMooringDeviceTypeEnum.LINETENSIONER={type:3,value:"LINETENSIONER"};IfcMooringDeviceTypeEnum.MAGNETICDEVICE={type:3,value:"MAGNETICDEVICE"};IfcMooringDeviceTypeEnum.MOORINGHOOKS={type:3,value:"MOORINGHOOKS"};IfcMooringDeviceTypeEnum.VACUUMDEVICE={type:3,value:"VACUUMDEVICE"};IfcMooringDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMooringDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMooringDeviceTypeEnum=IfcMooringDeviceTypeEnum;var IfcMotorConnectionTypeEnum=/*#__PURE__*/_createClass(function IfcMotorConnectionTypeEnum(){_classCallCheck(this,IfcMotorConnectionTypeEnum);});IfcMotorConnectionTypeEnum.BELTDRIVE={type:3,value:"BELTDRIVE"};IfcMotorConnectionTypeEnum.COUPLING={type:3,value:"COUPLING"};IfcMotorConnectionTypeEnum.DIRECTDRIVE={type:3,value:"DIRECTDRIVE"};IfcMotorConnectionTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcMotorConnectionTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcMotorConnectionTypeEnum=IfcMotorConnectionTypeEnum;var IfcNavigationElementTypeEnum=/*#__PURE__*/_createClass(function IfcNavigationElementTypeEnum(){_classCallCheck(this,IfcNavigationElementTypeEnum);});IfcNavigationElementTypeEnum.BEACON={type:3,value:"BEACON"};IfcNavigationElementTypeEnum.BUOY={type:3,value:"BUOY"};IfcNavigationElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcNavigationElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcNavigationElementTypeEnum=IfcNavigationElementTypeEnum;var IfcObjectTypeEnum=/*#__PURE__*/_createClass(function IfcObjectTypeEnum(){_classCallCheck(this,IfcObjectTypeEnum);});IfcObjectTypeEnum.ACTOR={type:3,value:"ACTOR"};IfcObjectTypeEnum.CONTROL={type:3,value:"CONTROL"};IfcObjectTypeEnum.GROUP={type:3,value:"GROUP"};IfcObjectTypeEnum.PROCESS={type:3,value:"PROCESS"};IfcObjectTypeEnum.PRODUCT={type:3,value:"PRODUCT"};IfcObjectTypeEnum.PROJECT={type:3,value:"PROJECT"};IfcObjectTypeEnum.RESOURCE={type:3,value:"RESOURCE"};IfcObjectTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcObjectTypeEnum=IfcObjectTypeEnum;var IfcObjectiveEnum=/*#__PURE__*/_createClass(function IfcObjectiveEnum(){_classCallCheck(this,IfcObjectiveEnum);});IfcObjectiveEnum.CODECOMPLIANCE={type:3,value:"CODECOMPLIANCE"};IfcObjectiveEnum.CODEWAIVER={type:3,value:"CODEWAIVER"};IfcObjectiveEnum.DESIGNINTENT={type:3,value:"DESIGNINTENT"};IfcObjectiveEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcObjectiveEnum.HEALTHANDSAFETY={type:3,value:"HEALTHANDSAFETY"};IfcObjectiveEnum.MERGECONFLICT={type:3,value:"MERGECONFLICT"};IfcObjectiveEnum.MODELVIEW={type:3,value:"MODELVIEW"};IfcObjectiveEnum.PARAMETER={type:3,value:"PARAMETER"};IfcObjectiveEnum.REQUIREMENT={type:3,value:"REQUIREMENT"};IfcObjectiveEnum.SPECIFICATION={type:3,value:"SPECIFICATION"};IfcObjectiveEnum.TRIGGERCONDITION={type:3,value:"TRIGGERCONDITION"};IfcObjectiveEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcObjectiveEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcObjectiveEnum=IfcObjectiveEnum;var IfcOccupantTypeEnum=/*#__PURE__*/_createClass(function IfcOccupantTypeEnum(){_classCallCheck(this,IfcOccupantTypeEnum);});IfcOccupantTypeEnum.ASSIGNEE={type:3,value:"ASSIGNEE"};IfcOccupantTypeEnum.ASSIGNOR={type:3,value:"ASSIGNOR"};IfcOccupantTypeEnum.LESSEE={type:3,value:"LESSEE"};IfcOccupantTypeEnum.LESSOR={type:3,value:"LESSOR"};IfcOccupantTypeEnum.LETTINGAGENT={type:3,value:"LETTINGAGENT"};IfcOccupantTypeEnum.OWNER={type:3,value:"OWNER"};IfcOccupantTypeEnum.TENANT={type:3,value:"TENANT"};IfcOccupantTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOccupantTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcOccupantTypeEnum=IfcOccupantTypeEnum;var IfcOpeningElementTypeEnum=/*#__PURE__*/_createClass(function IfcOpeningElementTypeEnum(){_classCallCheck(this,IfcOpeningElementTypeEnum);});IfcOpeningElementTypeEnum.OPENING={type:3,value:"OPENING"};IfcOpeningElementTypeEnum.RECESS={type:3,value:"RECESS"};IfcOpeningElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOpeningElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcOpeningElementTypeEnum=IfcOpeningElementTypeEnum;var IfcOutletTypeEnum=/*#__PURE__*/_createClass(function IfcOutletTypeEnum(){_classCallCheck(this,IfcOutletTypeEnum);});IfcOutletTypeEnum.AUDIOVISUALOUTLET={type:3,value:"AUDIOVISUALOUTLET"};IfcOutletTypeEnum.COMMUNICATIONSOUTLET={type:3,value:"COMMUNICATIONSOUTLET"};IfcOutletTypeEnum.DATAOUTLET={type:3,value:"DATAOUTLET"};IfcOutletTypeEnum.POWEROUTLET={type:3,value:"POWEROUTLET"};IfcOutletTypeEnum.TELEPHONEOUTLET={type:3,value:"TELEPHONEOUTLET"};IfcOutletTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcOutletTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcOutletTypeEnum=IfcOutletTypeEnum;var IfcPavementTypeEnum=/*#__PURE__*/_createClass(function IfcPavementTypeEnum(){_classCallCheck(this,IfcPavementTypeEnum);});IfcPavementTypeEnum.FLEXIBLE={type:3,value:"FLEXIBLE"};IfcPavementTypeEnum.RIGID={type:3,value:"RIGID"};IfcPavementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPavementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPavementTypeEnum=IfcPavementTypeEnum;var IfcPerformanceHistoryTypeEnum=/*#__PURE__*/_createClass(function IfcPerformanceHistoryTypeEnum(){_classCallCheck(this,IfcPerformanceHistoryTypeEnum);});IfcPerformanceHistoryTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPerformanceHistoryTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPerformanceHistoryTypeEnum=IfcPerformanceHistoryTypeEnum;var IfcPermeableCoveringOperationEnum=/*#__PURE__*/_createClass(function IfcPermeableCoveringOperationEnum(){_classCallCheck(this,IfcPermeableCoveringOperationEnum);});IfcPermeableCoveringOperationEnum.GRILL={type:3,value:"GRILL"};IfcPermeableCoveringOperationEnum.LOUVER={type:3,value:"LOUVER"};IfcPermeableCoveringOperationEnum.SCREEN={type:3,value:"SCREEN"};IfcPermeableCoveringOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPermeableCoveringOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPermeableCoveringOperationEnum=IfcPermeableCoveringOperationEnum;var IfcPermitTypeEnum=/*#__PURE__*/_createClass(function IfcPermitTypeEnum(){_classCallCheck(this,IfcPermitTypeEnum);});IfcPermitTypeEnum.ACCESS={type:3,value:"ACCESS"};IfcPermitTypeEnum.BUILDING={type:3,value:"BUILDING"};IfcPermitTypeEnum.WORK={type:3,value:"WORK"};IfcPermitTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPermitTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPermitTypeEnum=IfcPermitTypeEnum;var IfcPhysicalOrVirtualEnum=/*#__PURE__*/_createClass(function IfcPhysicalOrVirtualEnum(){_classCallCheck(this,IfcPhysicalOrVirtualEnum);});IfcPhysicalOrVirtualEnum.PHYSICAL={type:3,value:"PHYSICAL"};IfcPhysicalOrVirtualEnum.VIRTUAL={type:3,value:"VIRTUAL"};IfcPhysicalOrVirtualEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPhysicalOrVirtualEnum=IfcPhysicalOrVirtualEnum;var IfcPileConstructionEnum=/*#__PURE__*/_createClass(function IfcPileConstructionEnum(){_classCallCheck(this,IfcPileConstructionEnum);});IfcPileConstructionEnum.CAST_IN_PLACE={type:3,value:"CAST_IN_PLACE"};IfcPileConstructionEnum.COMPOSITE={type:3,value:"COMPOSITE"};IfcPileConstructionEnum.PRECAST_CONCRETE={type:3,value:"PRECAST_CONCRETE"};IfcPileConstructionEnum.PREFAB_STEEL={type:3,value:"PREFAB_STEEL"};IfcPileConstructionEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPileConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPileConstructionEnum=IfcPileConstructionEnum;var IfcPileTypeEnum=/*#__PURE__*/_createClass(function IfcPileTypeEnum(){_classCallCheck(this,IfcPileTypeEnum);});IfcPileTypeEnum.BORED={type:3,value:"BORED"};IfcPileTypeEnum.COHESION={type:3,value:"COHESION"};IfcPileTypeEnum.DRIVEN={type:3,value:"DRIVEN"};IfcPileTypeEnum.FRICTION={type:3,value:"FRICTION"};IfcPileTypeEnum.JETGROUTING={type:3,value:"JETGROUTING"};IfcPileTypeEnum.SUPPORT={type:3,value:"SUPPORT"};IfcPileTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPileTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPileTypeEnum=IfcPileTypeEnum;var IfcPipeFittingTypeEnum=/*#__PURE__*/_createClass(function IfcPipeFittingTypeEnum(){_classCallCheck(this,IfcPipeFittingTypeEnum);});IfcPipeFittingTypeEnum.BEND={type:3,value:"BEND"};IfcPipeFittingTypeEnum.CONNECTOR={type:3,value:"CONNECTOR"};IfcPipeFittingTypeEnum.ENTRY={type:3,value:"ENTRY"};IfcPipeFittingTypeEnum.EXIT={type:3,value:"EXIT"};IfcPipeFittingTypeEnum.JUNCTION={type:3,value:"JUNCTION"};IfcPipeFittingTypeEnum.OBSTRUCTION={type:3,value:"OBSTRUCTION"};IfcPipeFittingTypeEnum.TRANSITION={type:3,value:"TRANSITION"};IfcPipeFittingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPipeFittingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPipeFittingTypeEnum=IfcPipeFittingTypeEnum;var IfcPipeSegmentTypeEnum=/*#__PURE__*/_createClass(function IfcPipeSegmentTypeEnum(){_classCallCheck(this,IfcPipeSegmentTypeEnum);});IfcPipeSegmentTypeEnum.CULVERT={type:3,value:"CULVERT"};IfcPipeSegmentTypeEnum.FLEXIBLESEGMENT={type:3,value:"FLEXIBLESEGMENT"};IfcPipeSegmentTypeEnum.GUTTER={type:3,value:"GUTTER"};IfcPipeSegmentTypeEnum.RIGIDSEGMENT={type:3,value:"RIGIDSEGMENT"};IfcPipeSegmentTypeEnum.SPOOL={type:3,value:"SPOOL"};IfcPipeSegmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPipeSegmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPipeSegmentTypeEnum=IfcPipeSegmentTypeEnum;var IfcPlateTypeEnum=/*#__PURE__*/_createClass(function IfcPlateTypeEnum(){_classCallCheck(this,IfcPlateTypeEnum);});IfcPlateTypeEnum.BASE_PLATE={type:3,value:"BASE_PLATE"};IfcPlateTypeEnum.COVER_PLATE={type:3,value:"COVER_PLATE"};IfcPlateTypeEnum.CURTAIN_PANEL={type:3,value:"CURTAIN_PANEL"};IfcPlateTypeEnum.FLANGE_PLATE={type:3,value:"FLANGE_PLATE"};IfcPlateTypeEnum.GUSSET_PLATE={type:3,value:"GUSSET_PLATE"};IfcPlateTypeEnum.SHEET={type:3,value:"SHEET"};IfcPlateTypeEnum.SPLICE_PLATE={type:3,value:"SPLICE_PLATE"};IfcPlateTypeEnum.STIFFENER_PLATE={type:3,value:"STIFFENER_PLATE"};IfcPlateTypeEnum.WEB_PLATE={type:3,value:"WEB_PLATE"};IfcPlateTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPlateTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPlateTypeEnum=IfcPlateTypeEnum;var IfcPreferredSurfaceCurveRepresentation=/*#__PURE__*/_createClass(function IfcPreferredSurfaceCurveRepresentation(){_classCallCheck(this,IfcPreferredSurfaceCurveRepresentation);});IfcPreferredSurfaceCurveRepresentation.CURVE3D={type:3,value:"CURVE3D"};IfcPreferredSurfaceCurveRepresentation.PCURVE_S1={type:3,value:"PCURVE_S1"};IfcPreferredSurfaceCurveRepresentation.PCURVE_S2={type:3,value:"PCURVE_S2"};IFC4X32.IfcPreferredSurfaceCurveRepresentation=IfcPreferredSurfaceCurveRepresentation;var IfcProcedureTypeEnum=/*#__PURE__*/_createClass(function IfcProcedureTypeEnum(){_classCallCheck(this,IfcProcedureTypeEnum);});IfcProcedureTypeEnum.ADVICE_CAUTION={type:3,value:"ADVICE_CAUTION"};IfcProcedureTypeEnum.ADVICE_NOTE={type:3,value:"ADVICE_NOTE"};IfcProcedureTypeEnum.ADVICE_WARNING={type:3,value:"ADVICE_WARNING"};IfcProcedureTypeEnum.CALIBRATION={type:3,value:"CALIBRATION"};IfcProcedureTypeEnum.DIAGNOSTIC={type:3,value:"DIAGNOSTIC"};IfcProcedureTypeEnum.SHUTDOWN={type:3,value:"SHUTDOWN"};IfcProcedureTypeEnum.STARTUP={type:3,value:"STARTUP"};IfcProcedureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProcedureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcProcedureTypeEnum=IfcProcedureTypeEnum;var IfcProfileTypeEnum=/*#__PURE__*/_createClass(function IfcProfileTypeEnum(){_classCallCheck(this,IfcProfileTypeEnum);});IfcProfileTypeEnum.AREA={type:3,value:"AREA"};IfcProfileTypeEnum.CURVE={type:3,value:"CURVE"};IFC4X32.IfcProfileTypeEnum=IfcProfileTypeEnum;var IfcProjectOrderTypeEnum=/*#__PURE__*/_createClass(function IfcProjectOrderTypeEnum(){_classCallCheck(this,IfcProjectOrderTypeEnum);});IfcProjectOrderTypeEnum.CHANGEORDER={type:3,value:"CHANGEORDER"};IfcProjectOrderTypeEnum.MAINTENANCEWORKORDER={type:3,value:"MAINTENANCEWORKORDER"};IfcProjectOrderTypeEnum.MOVEORDER={type:3,value:"MOVEORDER"};IfcProjectOrderTypeEnum.PURCHASEORDER={type:3,value:"PURCHASEORDER"};IfcProjectOrderTypeEnum.WORKORDER={type:3,value:"WORKORDER"};IfcProjectOrderTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProjectOrderTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcProjectOrderTypeEnum=IfcProjectOrderTypeEnum;var IfcProjectedOrTrueLengthEnum=/*#__PURE__*/_createClass(function IfcProjectedOrTrueLengthEnum(){_classCallCheck(this,IfcProjectedOrTrueLengthEnum);});IfcProjectedOrTrueLengthEnum.PROJECTED_LENGTH={type:3,value:"PROJECTED_LENGTH"};IfcProjectedOrTrueLengthEnum.TRUE_LENGTH={type:3,value:"TRUE_LENGTH"};IFC4X32.IfcProjectedOrTrueLengthEnum=IfcProjectedOrTrueLengthEnum;var IfcProjectionElementTypeEnum=/*#__PURE__*/_createClass(function IfcProjectionElementTypeEnum(){_classCallCheck(this,IfcProjectionElementTypeEnum);});IfcProjectionElementTypeEnum.BLISTER={type:3,value:"BLISTER"};IfcProjectionElementTypeEnum.DEVIATOR={type:3,value:"DEVIATOR"};IfcProjectionElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProjectionElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcProjectionElementTypeEnum=IfcProjectionElementTypeEnum;var IfcPropertySetTemplateTypeEnum=/*#__PURE__*/_createClass(function IfcPropertySetTemplateTypeEnum(){_classCallCheck(this,IfcPropertySetTemplateTypeEnum);});IfcPropertySetTemplateTypeEnum.PSET_MATERIALDRIVEN={type:3,value:"PSET_MATERIALDRIVEN"};IfcPropertySetTemplateTypeEnum.PSET_OCCURRENCEDRIVEN={type:3,value:"PSET_OCCURRENCEDRIVEN"};IfcPropertySetTemplateTypeEnum.PSET_PERFORMANCEDRIVEN={type:3,value:"PSET_PERFORMANCEDRIVEN"};IfcPropertySetTemplateTypeEnum.PSET_PROFILEDRIVEN={type:3,value:"PSET_PROFILEDRIVEN"};IfcPropertySetTemplateTypeEnum.PSET_TYPEDRIVENONLY={type:3,value:"PSET_TYPEDRIVENONLY"};IfcPropertySetTemplateTypeEnum.PSET_TYPEDRIVENOVERRIDE={type:3,value:"PSET_TYPEDRIVENOVERRIDE"};IfcPropertySetTemplateTypeEnum.QTO_OCCURRENCEDRIVEN={type:3,value:"QTO_OCCURRENCEDRIVEN"};IfcPropertySetTemplateTypeEnum.QTO_TYPEDRIVENONLY={type:3,value:"QTO_TYPEDRIVENONLY"};IfcPropertySetTemplateTypeEnum.QTO_TYPEDRIVENOVERRIDE={type:3,value:"QTO_TYPEDRIVENOVERRIDE"};IfcPropertySetTemplateTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPropertySetTemplateTypeEnum=IfcPropertySetTemplateTypeEnum;var IfcProtectiveDeviceTrippingUnitTypeEnum=/*#__PURE__*/_createClass(function IfcProtectiveDeviceTrippingUnitTypeEnum(){_classCallCheck(this,IfcProtectiveDeviceTrippingUnitTypeEnum);});IfcProtectiveDeviceTrippingUnitTypeEnum.ELECTROMAGNETIC={type:3,value:"ELECTROMAGNETIC"};IfcProtectiveDeviceTrippingUnitTypeEnum.ELECTRONIC={type:3,value:"ELECTRONIC"};IfcProtectiveDeviceTrippingUnitTypeEnum.RESIDUALCURRENT={type:3,value:"RESIDUALCURRENT"};IfcProtectiveDeviceTrippingUnitTypeEnum.THERMAL={type:3,value:"THERMAL"};IfcProtectiveDeviceTrippingUnitTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProtectiveDeviceTrippingUnitTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcProtectiveDeviceTrippingUnitTypeEnum=IfcProtectiveDeviceTrippingUnitTypeEnum;var IfcProtectiveDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcProtectiveDeviceTypeEnum(){_classCallCheck(this,IfcProtectiveDeviceTypeEnum);});IfcProtectiveDeviceTypeEnum.ANTI_ARCING_DEVICE={type:3,value:"ANTI_ARCING_DEVICE"};IfcProtectiveDeviceTypeEnum.CIRCUITBREAKER={type:3,value:"CIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.EARTHINGSWITCH={type:3,value:"EARTHINGSWITCH"};IfcProtectiveDeviceTypeEnum.EARTHLEAKAGECIRCUITBREAKER={type:3,value:"EARTHLEAKAGECIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.FUSEDISCONNECTOR={type:3,value:"FUSEDISCONNECTOR"};IfcProtectiveDeviceTypeEnum.RESIDUALCURRENTCIRCUITBREAKER={type:3,value:"RESIDUALCURRENTCIRCUITBREAKER"};IfcProtectiveDeviceTypeEnum.RESIDUALCURRENTSWITCH={type:3,value:"RESIDUALCURRENTSWITCH"};IfcProtectiveDeviceTypeEnum.SPARKGAP={type:3,value:"SPARKGAP"};IfcProtectiveDeviceTypeEnum.VARISTOR={type:3,value:"VARISTOR"};IfcProtectiveDeviceTypeEnum.VOLTAGELIMITER={type:3,value:"VOLTAGELIMITER"};IfcProtectiveDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcProtectiveDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcProtectiveDeviceTypeEnum=IfcProtectiveDeviceTypeEnum;var IfcPumpTypeEnum=/*#__PURE__*/_createClass(function IfcPumpTypeEnum(){_classCallCheck(this,IfcPumpTypeEnum);});IfcPumpTypeEnum.CIRCULATOR={type:3,value:"CIRCULATOR"};IfcPumpTypeEnum.ENDSUCTION={type:3,value:"ENDSUCTION"};IfcPumpTypeEnum.SPLITCASE={type:3,value:"SPLITCASE"};IfcPumpTypeEnum.SUBMERSIBLEPUMP={type:3,value:"SUBMERSIBLEPUMP"};IfcPumpTypeEnum.SUMPPUMP={type:3,value:"SUMPPUMP"};IfcPumpTypeEnum.VERTICALINLINE={type:3,value:"VERTICALINLINE"};IfcPumpTypeEnum.VERTICALTURBINE={type:3,value:"VERTICALTURBINE"};IfcPumpTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcPumpTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcPumpTypeEnum=IfcPumpTypeEnum;var IfcRailTypeEnum=/*#__PURE__*/_createClass(function IfcRailTypeEnum(){_classCallCheck(this,IfcRailTypeEnum);});IfcRailTypeEnum.BLADE={type:3,value:"BLADE"};IfcRailTypeEnum.CHECKRAIL={type:3,value:"CHECKRAIL"};IfcRailTypeEnum.GUARDRAIL={type:3,value:"GUARDRAIL"};IfcRailTypeEnum.RACKRAIL={type:3,value:"RACKRAIL"};IfcRailTypeEnum.RAIL={type:3,value:"RAIL"};IfcRailTypeEnum.STOCKRAIL={type:3,value:"STOCKRAIL"};IfcRailTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRailTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRailTypeEnum=IfcRailTypeEnum;var IfcRailingTypeEnum=/*#__PURE__*/_createClass(function IfcRailingTypeEnum(){_classCallCheck(this,IfcRailingTypeEnum);});IfcRailingTypeEnum.BALUSTRADE={type:3,value:"BALUSTRADE"};IfcRailingTypeEnum.FENCE={type:3,value:"FENCE"};IfcRailingTypeEnum.GUARDRAIL={type:3,value:"GUARDRAIL"};IfcRailingTypeEnum.HANDRAIL={type:3,value:"HANDRAIL"};IfcRailingTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRailingTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRailingTypeEnum=IfcRailingTypeEnum;var IfcRailwayPartTypeEnum=/*#__PURE__*/_createClass(function IfcRailwayPartTypeEnum(){_classCallCheck(this,IfcRailwayPartTypeEnum);});IfcRailwayPartTypeEnum.DILATATIONSUPERSTRUCTURE={type:3,value:"DILATATIONSUPERSTRUCTURE"};IfcRailwayPartTypeEnum.LINESIDESTRUCTURE={type:3,value:"LINESIDESTRUCTURE"};IfcRailwayPartTypeEnum.LINESIDESTRUCTUREPART={type:3,value:"LINESIDESTRUCTUREPART"};IfcRailwayPartTypeEnum.PLAINTRACKSUPERSTRUCTURE={type:3,value:"PLAINTRACKSUPERSTRUCTURE"};IfcRailwayPartTypeEnum.SUPERSTRUCTURE={type:3,value:"SUPERSTRUCTURE"};IfcRailwayPartTypeEnum.TRACKSTRUCTURE={type:3,value:"TRACKSTRUCTURE"};IfcRailwayPartTypeEnum.TRACKSTRUCTUREPART={type:3,value:"TRACKSTRUCTUREPART"};IfcRailwayPartTypeEnum.TURNOUTSUPERSTRUCTURE={type:3,value:"TURNOUTSUPERSTRUCTURE"};IfcRailwayPartTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRailwayPartTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRailwayPartTypeEnum=IfcRailwayPartTypeEnum;var IfcRailwayTypeEnum=/*#__PURE__*/_createClass(function IfcRailwayTypeEnum(){_classCallCheck(this,IfcRailwayTypeEnum);});IfcRailwayTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRailwayTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRailwayTypeEnum=IfcRailwayTypeEnum;var IfcRampFlightTypeEnum=/*#__PURE__*/_createClass(function IfcRampFlightTypeEnum(){_classCallCheck(this,IfcRampFlightTypeEnum);});IfcRampFlightTypeEnum.SPIRAL={type:3,value:"SPIRAL"};IfcRampFlightTypeEnum.STRAIGHT={type:3,value:"STRAIGHT"};IfcRampFlightTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRampFlightTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRampFlightTypeEnum=IfcRampFlightTypeEnum;var IfcRampTypeEnum=/*#__PURE__*/_createClass(function IfcRampTypeEnum(){_classCallCheck(this,IfcRampTypeEnum);});IfcRampTypeEnum.HALF_TURN_RAMP={type:3,value:"HALF_TURN_RAMP"};IfcRampTypeEnum.QUARTER_TURN_RAMP={type:3,value:"QUARTER_TURN_RAMP"};IfcRampTypeEnum.SPIRAL_RAMP={type:3,value:"SPIRAL_RAMP"};IfcRampTypeEnum.STRAIGHT_RUN_RAMP={type:3,value:"STRAIGHT_RUN_RAMP"};IfcRampTypeEnum.TWO_QUARTER_TURN_RAMP={type:3,value:"TWO_QUARTER_TURN_RAMP"};IfcRampTypeEnum.TWO_STRAIGHT_RUN_RAMP={type:3,value:"TWO_STRAIGHT_RUN_RAMP"};IfcRampTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRampTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRampTypeEnum=IfcRampTypeEnum;var IfcRecurrenceTypeEnum=/*#__PURE__*/_createClass(function IfcRecurrenceTypeEnum(){_classCallCheck(this,IfcRecurrenceTypeEnum);});IfcRecurrenceTypeEnum.BY_DAY_COUNT={type:3,value:"BY_DAY_COUNT"};IfcRecurrenceTypeEnum.BY_WEEKDAY_COUNT={type:3,value:"BY_WEEKDAY_COUNT"};IfcRecurrenceTypeEnum.DAILY={type:3,value:"DAILY"};IfcRecurrenceTypeEnum.MONTHLY_BY_DAY_OF_MONTH={type:3,value:"MONTHLY_BY_DAY_OF_MONTH"};IfcRecurrenceTypeEnum.MONTHLY_BY_POSITION={type:3,value:"MONTHLY_BY_POSITION"};IfcRecurrenceTypeEnum.WEEKLY={type:3,value:"WEEKLY"};IfcRecurrenceTypeEnum.YEARLY_BY_DAY_OF_MONTH={type:3,value:"YEARLY_BY_DAY_OF_MONTH"};IfcRecurrenceTypeEnum.YEARLY_BY_POSITION={type:3,value:"YEARLY_BY_POSITION"};IFC4X32.IfcRecurrenceTypeEnum=IfcRecurrenceTypeEnum;var IfcReferentTypeEnum=/*#__PURE__*/_createClass(function IfcReferentTypeEnum(){_classCallCheck(this,IfcReferentTypeEnum);});IfcReferentTypeEnum.BOUNDARY={type:3,value:"BOUNDARY"};IfcReferentTypeEnum.INTERSECTION={type:3,value:"INTERSECTION"};IfcReferentTypeEnum.KILOPOINT={type:3,value:"KILOPOINT"};IfcReferentTypeEnum.LANDMARK={type:3,value:"LANDMARK"};IfcReferentTypeEnum.MILEPOINT={type:3,value:"MILEPOINT"};IfcReferentTypeEnum.POSITION={type:3,value:"POSITION"};IfcReferentTypeEnum.REFERENCEMARKER={type:3,value:"REFERENCEMARKER"};IfcReferentTypeEnum.STATION={type:3,value:"STATION"};IfcReferentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReferentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcReferentTypeEnum=IfcReferentTypeEnum;var IfcReflectanceMethodEnum=/*#__PURE__*/_createClass(function IfcReflectanceMethodEnum(){_classCallCheck(this,IfcReflectanceMethodEnum);});IfcReflectanceMethodEnum.BLINN={type:3,value:"BLINN"};IfcReflectanceMethodEnum.FLAT={type:3,value:"FLAT"};IfcReflectanceMethodEnum.GLASS={type:3,value:"GLASS"};IfcReflectanceMethodEnum.MATT={type:3,value:"MATT"};IfcReflectanceMethodEnum.METAL={type:3,value:"METAL"};IfcReflectanceMethodEnum.MIRROR={type:3,value:"MIRROR"};IfcReflectanceMethodEnum.PHONG={type:3,value:"PHONG"};IfcReflectanceMethodEnum.PHYSICAL={type:3,value:"PHYSICAL"};IfcReflectanceMethodEnum.PLASTIC={type:3,value:"PLASTIC"};IfcReflectanceMethodEnum.STRAUSS={type:3,value:"STRAUSS"};IfcReflectanceMethodEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcReflectanceMethodEnum=IfcReflectanceMethodEnum;var IfcReinforcedSoilTypeEnum=/*#__PURE__*/_createClass(function IfcReinforcedSoilTypeEnum(){_classCallCheck(this,IfcReinforcedSoilTypeEnum);});IfcReinforcedSoilTypeEnum.DYNAMICALLYCOMPACTED={type:3,value:"DYNAMICALLYCOMPACTED"};IfcReinforcedSoilTypeEnum.GROUTED={type:3,value:"GROUTED"};IfcReinforcedSoilTypeEnum.REPLACED={type:3,value:"REPLACED"};IfcReinforcedSoilTypeEnum.ROLLERCOMPACTED={type:3,value:"ROLLERCOMPACTED"};IfcReinforcedSoilTypeEnum.SURCHARGEPRELOADED={type:3,value:"SURCHARGEPRELOADED"};IfcReinforcedSoilTypeEnum.VERTICALLYDRAINED={type:3,value:"VERTICALLYDRAINED"};IfcReinforcedSoilTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcedSoilTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcReinforcedSoilTypeEnum=IfcReinforcedSoilTypeEnum;var IfcReinforcingBarRoleEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarRoleEnum(){_classCallCheck(this,IfcReinforcingBarRoleEnum);});IfcReinforcingBarRoleEnum.ANCHORING={type:3,value:"ANCHORING"};IfcReinforcingBarRoleEnum.EDGE={type:3,value:"EDGE"};IfcReinforcingBarRoleEnum.LIGATURE={type:3,value:"LIGATURE"};IfcReinforcingBarRoleEnum.MAIN={type:3,value:"MAIN"};IfcReinforcingBarRoleEnum.PUNCHING={type:3,value:"PUNCHING"};IfcReinforcingBarRoleEnum.RING={type:3,value:"RING"};IfcReinforcingBarRoleEnum.SHEAR={type:3,value:"SHEAR"};IfcReinforcingBarRoleEnum.STUD={type:3,value:"STUD"};IfcReinforcingBarRoleEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcingBarRoleEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcReinforcingBarRoleEnum=IfcReinforcingBarRoleEnum;var IfcReinforcingBarSurfaceEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarSurfaceEnum(){_classCallCheck(this,IfcReinforcingBarSurfaceEnum);});IfcReinforcingBarSurfaceEnum.PLAIN={type:3,value:"PLAIN"};IfcReinforcingBarSurfaceEnum.TEXTURED={type:3,value:"TEXTURED"};IFC4X32.IfcReinforcingBarSurfaceEnum=IfcReinforcingBarSurfaceEnum;var IfcReinforcingBarTypeEnum=/*#__PURE__*/_createClass(function IfcReinforcingBarTypeEnum(){_classCallCheck(this,IfcReinforcingBarTypeEnum);});IfcReinforcingBarTypeEnum.ANCHORING={type:3,value:"ANCHORING"};IfcReinforcingBarTypeEnum.EDGE={type:3,value:"EDGE"};IfcReinforcingBarTypeEnum.LIGATURE={type:3,value:"LIGATURE"};IfcReinforcingBarTypeEnum.MAIN={type:3,value:"MAIN"};IfcReinforcingBarTypeEnum.PUNCHING={type:3,value:"PUNCHING"};IfcReinforcingBarTypeEnum.RING={type:3,value:"RING"};IfcReinforcingBarTypeEnum.SHEAR={type:3,value:"SHEAR"};IfcReinforcingBarTypeEnum.SPACEBAR={type:3,value:"SPACEBAR"};IfcReinforcingBarTypeEnum.STUD={type:3,value:"STUD"};IfcReinforcingBarTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcingBarTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcReinforcingBarTypeEnum=IfcReinforcingBarTypeEnum;var IfcReinforcingMeshTypeEnum=/*#__PURE__*/_createClass(function IfcReinforcingMeshTypeEnum(){_classCallCheck(this,IfcReinforcingMeshTypeEnum);});IfcReinforcingMeshTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcReinforcingMeshTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcReinforcingMeshTypeEnum=IfcReinforcingMeshTypeEnum;var IfcRoadPartTypeEnum=/*#__PURE__*/_createClass(function IfcRoadPartTypeEnum(){_classCallCheck(this,IfcRoadPartTypeEnum);});IfcRoadPartTypeEnum.BICYCLECROSSING={type:3,value:"BICYCLECROSSING"};IfcRoadPartTypeEnum.BUS_STOP={type:3,value:"BUS_STOP"};IfcRoadPartTypeEnum.CARRIAGEWAY={type:3,value:"CARRIAGEWAY"};IfcRoadPartTypeEnum.CENTRALISLAND={type:3,value:"CENTRALISLAND"};IfcRoadPartTypeEnum.CENTRALRESERVE={type:3,value:"CENTRALRESERVE"};IfcRoadPartTypeEnum.HARDSHOULDER={type:3,value:"HARDSHOULDER"};IfcRoadPartTypeEnum.INTERSECTION={type:3,value:"INTERSECTION"};IfcRoadPartTypeEnum.LAYBY={type:3,value:"LAYBY"};IfcRoadPartTypeEnum.PARKINGBAY={type:3,value:"PARKINGBAY"};IfcRoadPartTypeEnum.PASSINGBAY={type:3,value:"PASSINGBAY"};IfcRoadPartTypeEnum.PEDESTRIAN_CROSSING={type:3,value:"PEDESTRIAN_CROSSING"};IfcRoadPartTypeEnum.RAILWAYCROSSING={type:3,value:"RAILWAYCROSSING"};IfcRoadPartTypeEnum.REFUGEISLAND={type:3,value:"REFUGEISLAND"};IfcRoadPartTypeEnum.ROADSEGMENT={type:3,value:"ROADSEGMENT"};IfcRoadPartTypeEnum.ROADSIDE={type:3,value:"ROADSIDE"};IfcRoadPartTypeEnum.ROADSIDEPART={type:3,value:"ROADSIDEPART"};IfcRoadPartTypeEnum.ROADWAYPLATEAU={type:3,value:"ROADWAYPLATEAU"};IfcRoadPartTypeEnum.ROUNDABOUT={type:3,value:"ROUNDABOUT"};IfcRoadPartTypeEnum.SHOULDER={type:3,value:"SHOULDER"};IfcRoadPartTypeEnum.SIDEWALK={type:3,value:"SIDEWALK"};IfcRoadPartTypeEnum.SOFTSHOULDER={type:3,value:"SOFTSHOULDER"};IfcRoadPartTypeEnum.TOLLPLAZA={type:3,value:"TOLLPLAZA"};IfcRoadPartTypeEnum.TRAFFICISLAND={type:3,value:"TRAFFICISLAND"};IfcRoadPartTypeEnum.TRAFFICLANE={type:3,value:"TRAFFICLANE"};IfcRoadPartTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRoadPartTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRoadPartTypeEnum=IfcRoadPartTypeEnum;var IfcRoadTypeEnum=/*#__PURE__*/_createClass(function IfcRoadTypeEnum(){_classCallCheck(this,IfcRoadTypeEnum);});IfcRoadTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRoadTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRoadTypeEnum=IfcRoadTypeEnum;var IfcRoleEnum=/*#__PURE__*/_createClass(function IfcRoleEnum(){_classCallCheck(this,IfcRoleEnum);});IfcRoleEnum.ARCHITECT={type:3,value:"ARCHITECT"};IfcRoleEnum.BUILDINGOPERATOR={type:3,value:"BUILDINGOPERATOR"};IfcRoleEnum.BUILDINGOWNER={type:3,value:"BUILDINGOWNER"};IfcRoleEnum.CIVILENGINEER={type:3,value:"CIVILENGINEER"};IfcRoleEnum.CLIENT={type:3,value:"CLIENT"};IfcRoleEnum.COMMISSIONINGENGINEER={type:3,value:"COMMISSIONINGENGINEER"};IfcRoleEnum.CONSTRUCTIONMANAGER={type:3,value:"CONSTRUCTIONMANAGER"};IfcRoleEnum.CONSULTANT={type:3,value:"CONSULTANT"};IfcRoleEnum.CONTRACTOR={type:3,value:"CONTRACTOR"};IfcRoleEnum.COSTENGINEER={type:3,value:"COSTENGINEER"};IfcRoleEnum.ELECTRICALENGINEER={type:3,value:"ELECTRICALENGINEER"};IfcRoleEnum.ENGINEER={type:3,value:"ENGINEER"};IfcRoleEnum.FACILITIESMANAGER={type:3,value:"FACILITIESMANAGER"};IfcRoleEnum.FIELDCONSTRUCTIONMANAGER={type:3,value:"FIELDCONSTRUCTIONMANAGER"};IfcRoleEnum.MANUFACTURER={type:3,value:"MANUFACTURER"};IfcRoleEnum.MECHANICALENGINEER={type:3,value:"MECHANICALENGINEER"};IfcRoleEnum.OWNER={type:3,value:"OWNER"};IfcRoleEnum.PROJECTMANAGER={type:3,value:"PROJECTMANAGER"};IfcRoleEnum.RESELLER={type:3,value:"RESELLER"};IfcRoleEnum.STRUCTURALENGINEER={type:3,value:"STRUCTURALENGINEER"};IfcRoleEnum.SUBCONTRACTOR={type:3,value:"SUBCONTRACTOR"};IfcRoleEnum.SUPPLIER={type:3,value:"SUPPLIER"};IfcRoleEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC4X32.IfcRoleEnum=IfcRoleEnum;var IfcRoofTypeEnum=/*#__PURE__*/_createClass(function IfcRoofTypeEnum(){_classCallCheck(this,IfcRoofTypeEnum);});IfcRoofTypeEnum.BARREL_ROOF={type:3,value:"BARREL_ROOF"};IfcRoofTypeEnum.BUTTERFLY_ROOF={type:3,value:"BUTTERFLY_ROOF"};IfcRoofTypeEnum.DOME_ROOF={type:3,value:"DOME_ROOF"};IfcRoofTypeEnum.FLAT_ROOF={type:3,value:"FLAT_ROOF"};IfcRoofTypeEnum.FREEFORM={type:3,value:"FREEFORM"};IfcRoofTypeEnum.GABLE_ROOF={type:3,value:"GABLE_ROOF"};IfcRoofTypeEnum.GAMBREL_ROOF={type:3,value:"GAMBREL_ROOF"};IfcRoofTypeEnum.HIPPED_GABLE_ROOF={type:3,value:"HIPPED_GABLE_ROOF"};IfcRoofTypeEnum.HIP_ROOF={type:3,value:"HIP_ROOF"};IfcRoofTypeEnum.MANSARD_ROOF={type:3,value:"MANSARD_ROOF"};IfcRoofTypeEnum.PAVILION_ROOF={type:3,value:"PAVILION_ROOF"};IfcRoofTypeEnum.RAINBOW_ROOF={type:3,value:"RAINBOW_ROOF"};IfcRoofTypeEnum.SHED_ROOF={type:3,value:"SHED_ROOF"};IfcRoofTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcRoofTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcRoofTypeEnum=IfcRoofTypeEnum;var IfcSIPrefix=/*#__PURE__*/_createClass(function IfcSIPrefix(){_classCallCheck(this,IfcSIPrefix);});IfcSIPrefix.ATTO={type:3,value:"ATTO"};IfcSIPrefix.CENTI={type:3,value:"CENTI"};IfcSIPrefix.DECA={type:3,value:"DECA"};IfcSIPrefix.DECI={type:3,value:"DECI"};IfcSIPrefix.EXA={type:3,value:"EXA"};IfcSIPrefix.FEMTO={type:3,value:"FEMTO"};IfcSIPrefix.GIGA={type:3,value:"GIGA"};IfcSIPrefix.HECTO={type:3,value:"HECTO"};IfcSIPrefix.KILO={type:3,value:"KILO"};IfcSIPrefix.MEGA={type:3,value:"MEGA"};IfcSIPrefix.MICRO={type:3,value:"MICRO"};IfcSIPrefix.MILLI={type:3,value:"MILLI"};IfcSIPrefix.NANO={type:3,value:"NANO"};IfcSIPrefix.PETA={type:3,value:"PETA"};IfcSIPrefix.PICO={type:3,value:"PICO"};IfcSIPrefix.TERA={type:3,value:"TERA"};IFC4X32.IfcSIPrefix=IfcSIPrefix;var IfcSIUnitName=/*#__PURE__*/_createClass(function IfcSIUnitName(){_classCallCheck(this,IfcSIUnitName);});IfcSIUnitName.AMPERE={type:3,value:"AMPERE"};IfcSIUnitName.BECQUEREL={type:3,value:"BECQUEREL"};IfcSIUnitName.CANDELA={type:3,value:"CANDELA"};IfcSIUnitName.COULOMB={type:3,value:"COULOMB"};IfcSIUnitName.CUBIC_METRE={type:3,value:"CUBIC_METRE"};IfcSIUnitName.DEGREE_CELSIUS={type:3,value:"DEGREE_CELSIUS"};IfcSIUnitName.FARAD={type:3,value:"FARAD"};IfcSIUnitName.GRAM={type:3,value:"GRAM"};IfcSIUnitName.GRAY={type:3,value:"GRAY"};IfcSIUnitName.HENRY={type:3,value:"HENRY"};IfcSIUnitName.HERTZ={type:3,value:"HERTZ"};IfcSIUnitName.JOULE={type:3,value:"JOULE"};IfcSIUnitName.KELVIN={type:3,value:"KELVIN"};IfcSIUnitName.LUMEN={type:3,value:"LUMEN"};IfcSIUnitName.LUX={type:3,value:"LUX"};IfcSIUnitName.METRE={type:3,value:"METRE"};IfcSIUnitName.MOLE={type:3,value:"MOLE"};IfcSIUnitName.NEWTON={type:3,value:"NEWTON"};IfcSIUnitName.OHM={type:3,value:"OHM"};IfcSIUnitName.PASCAL={type:3,value:"PASCAL"};IfcSIUnitName.RADIAN={type:3,value:"RADIAN"};IfcSIUnitName.SECOND={type:3,value:"SECOND"};IfcSIUnitName.SIEMENS={type:3,value:"SIEMENS"};IfcSIUnitName.SIEVERT={type:3,value:"SIEVERT"};IfcSIUnitName.SQUARE_METRE={type:3,value:"SQUARE_METRE"};IfcSIUnitName.STERADIAN={type:3,value:"STERADIAN"};IfcSIUnitName.TESLA={type:3,value:"TESLA"};IfcSIUnitName.VOLT={type:3,value:"VOLT"};IfcSIUnitName.WATT={type:3,value:"WATT"};IfcSIUnitName.WEBER={type:3,value:"WEBER"};IFC4X32.IfcSIUnitName=IfcSIUnitName;var IfcSanitaryTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcSanitaryTerminalTypeEnum(){_classCallCheck(this,IfcSanitaryTerminalTypeEnum);});IfcSanitaryTerminalTypeEnum.BATH={type:3,value:"BATH"};IfcSanitaryTerminalTypeEnum.BIDET={type:3,value:"BIDET"};IfcSanitaryTerminalTypeEnum.CISTERN={type:3,value:"CISTERN"};IfcSanitaryTerminalTypeEnum.SANITARYFOUNTAIN={type:3,value:"SANITARYFOUNTAIN"};IfcSanitaryTerminalTypeEnum.SHOWER={type:3,value:"SHOWER"};IfcSanitaryTerminalTypeEnum.SINK={type:3,value:"SINK"};IfcSanitaryTerminalTypeEnum.TOILETPAN={type:3,value:"TOILETPAN"};IfcSanitaryTerminalTypeEnum.URINAL={type:3,value:"URINAL"};IfcSanitaryTerminalTypeEnum.WASHHANDBASIN={type:3,value:"WASHHANDBASIN"};IfcSanitaryTerminalTypeEnum.WCSEAT={type:3,value:"WCSEAT"};IfcSanitaryTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSanitaryTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSanitaryTerminalTypeEnum=IfcSanitaryTerminalTypeEnum;var IfcSectionTypeEnum=/*#__PURE__*/_createClass(function IfcSectionTypeEnum(){_classCallCheck(this,IfcSectionTypeEnum);});IfcSectionTypeEnum.TAPERED={type:3,value:"TAPERED"};IfcSectionTypeEnum.UNIFORM={type:3,value:"UNIFORM"};IFC4X32.IfcSectionTypeEnum=IfcSectionTypeEnum;var IfcSensorTypeEnum=/*#__PURE__*/_createClass(function IfcSensorTypeEnum(){_classCallCheck(this,IfcSensorTypeEnum);});IfcSensorTypeEnum.CO2SENSOR={type:3,value:"CO2SENSOR"};IfcSensorTypeEnum.CONDUCTANCESENSOR={type:3,value:"CONDUCTANCESENSOR"};IfcSensorTypeEnum.CONTACTSENSOR={type:3,value:"CONTACTSENSOR"};IfcSensorTypeEnum.COSENSOR={type:3,value:"COSENSOR"};IfcSensorTypeEnum.EARTHQUAKESENSOR={type:3,value:"EARTHQUAKESENSOR"};IfcSensorTypeEnum.FIRESENSOR={type:3,value:"FIRESENSOR"};IfcSensorTypeEnum.FLOWSENSOR={type:3,value:"FLOWSENSOR"};IfcSensorTypeEnum.FOREIGNOBJECTDETECTIONSENSOR={type:3,value:"FOREIGNOBJECTDETECTIONSENSOR"};IfcSensorTypeEnum.FROSTSENSOR={type:3,value:"FROSTSENSOR"};IfcSensorTypeEnum.GASSENSOR={type:3,value:"GASSENSOR"};IfcSensorTypeEnum.HEATSENSOR={type:3,value:"HEATSENSOR"};IfcSensorTypeEnum.HUMIDITYSENSOR={type:3,value:"HUMIDITYSENSOR"};IfcSensorTypeEnum.IDENTIFIERSENSOR={type:3,value:"IDENTIFIERSENSOR"};IfcSensorTypeEnum.IONCONCENTRATIONSENSOR={type:3,value:"IONCONCENTRATIONSENSOR"};IfcSensorTypeEnum.LEVELSENSOR={type:3,value:"LEVELSENSOR"};IfcSensorTypeEnum.LIGHTSENSOR={type:3,value:"LIGHTSENSOR"};IfcSensorTypeEnum.MOISTURESENSOR={type:3,value:"MOISTURESENSOR"};IfcSensorTypeEnum.MOVEMENTSENSOR={type:3,value:"MOVEMENTSENSOR"};IfcSensorTypeEnum.OBSTACLESENSOR={type:3,value:"OBSTACLESENSOR"};IfcSensorTypeEnum.PHSENSOR={type:3,value:"PHSENSOR"};IfcSensorTypeEnum.PRESSURESENSOR={type:3,value:"PRESSURESENSOR"};IfcSensorTypeEnum.RADIATIONSENSOR={type:3,value:"RADIATIONSENSOR"};IfcSensorTypeEnum.RADIOACTIVITYSENSOR={type:3,value:"RADIOACTIVITYSENSOR"};IfcSensorTypeEnum.RAINSENSOR={type:3,value:"RAINSENSOR"};IfcSensorTypeEnum.SMOKESENSOR={type:3,value:"SMOKESENSOR"};IfcSensorTypeEnum.SNOWDEPTHSENSOR={type:3,value:"SNOWDEPTHSENSOR"};IfcSensorTypeEnum.SOUNDSENSOR={type:3,value:"SOUNDSENSOR"};IfcSensorTypeEnum.TEMPERATURESENSOR={type:3,value:"TEMPERATURESENSOR"};IfcSensorTypeEnum.TRAINSENSOR={type:3,value:"TRAINSENSOR"};IfcSensorTypeEnum.TURNOUTCLOSURESENSOR={type:3,value:"TURNOUTCLOSURESENSOR"};IfcSensorTypeEnum.WHEELSENSOR={type:3,value:"WHEELSENSOR"};IfcSensorTypeEnum.WINDSENSOR={type:3,value:"WINDSENSOR"};IfcSensorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSensorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSensorTypeEnum=IfcSensorTypeEnum;var IfcSequenceEnum=/*#__PURE__*/_createClass(function IfcSequenceEnum(){_classCallCheck(this,IfcSequenceEnum);});IfcSequenceEnum.FINISH_FINISH={type:3,value:"FINISH_FINISH"};IfcSequenceEnum.FINISH_START={type:3,value:"FINISH_START"};IfcSequenceEnum.START_FINISH={type:3,value:"START_FINISH"};IfcSequenceEnum.START_START={type:3,value:"START_START"};IfcSequenceEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSequenceEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSequenceEnum=IfcSequenceEnum;var IfcShadingDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcShadingDeviceTypeEnum(){_classCallCheck(this,IfcShadingDeviceTypeEnum);});IfcShadingDeviceTypeEnum.AWNING={type:3,value:"AWNING"};IfcShadingDeviceTypeEnum.JALOUSIE={type:3,value:"JALOUSIE"};IfcShadingDeviceTypeEnum.SHUTTER={type:3,value:"SHUTTER"};IfcShadingDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcShadingDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcShadingDeviceTypeEnum=IfcShadingDeviceTypeEnum;var IfcSignTypeEnum=/*#__PURE__*/_createClass(function IfcSignTypeEnum(){_classCallCheck(this,IfcSignTypeEnum);});IfcSignTypeEnum.MARKER={type:3,value:"MARKER"};IfcSignTypeEnum.MIRROR={type:3,value:"MIRROR"};IfcSignTypeEnum.PICTORAL={type:3,value:"PICTORAL"};IfcSignTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSignTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSignTypeEnum=IfcSignTypeEnum;var IfcSignalTypeEnum=/*#__PURE__*/_createClass(function IfcSignalTypeEnum(){_classCallCheck(this,IfcSignalTypeEnum);});IfcSignalTypeEnum.AUDIO={type:3,value:"AUDIO"};IfcSignalTypeEnum.MIXED={type:3,value:"MIXED"};IfcSignalTypeEnum.VISUAL={type:3,value:"VISUAL"};IfcSignalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSignalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSignalTypeEnum=IfcSignalTypeEnum;var IfcSimplePropertyTemplateTypeEnum=/*#__PURE__*/_createClass(function IfcSimplePropertyTemplateTypeEnum(){_classCallCheck(this,IfcSimplePropertyTemplateTypeEnum);});IfcSimplePropertyTemplateTypeEnum.P_BOUNDEDVALUE={type:3,value:"P_BOUNDEDVALUE"};IfcSimplePropertyTemplateTypeEnum.P_ENUMERATEDVALUE={type:3,value:"P_ENUMERATEDVALUE"};IfcSimplePropertyTemplateTypeEnum.P_LISTVALUE={type:3,value:"P_LISTVALUE"};IfcSimplePropertyTemplateTypeEnum.P_REFERENCEVALUE={type:3,value:"P_REFERENCEVALUE"};IfcSimplePropertyTemplateTypeEnum.P_SINGLEVALUE={type:3,value:"P_SINGLEVALUE"};IfcSimplePropertyTemplateTypeEnum.P_TABLEVALUE={type:3,value:"P_TABLEVALUE"};IfcSimplePropertyTemplateTypeEnum.Q_AREA={type:3,value:"Q_AREA"};IfcSimplePropertyTemplateTypeEnum.Q_COUNT={type:3,value:"Q_COUNT"};IfcSimplePropertyTemplateTypeEnum.Q_LENGTH={type:3,value:"Q_LENGTH"};IfcSimplePropertyTemplateTypeEnum.Q_NUMBER={type:3,value:"Q_NUMBER"};IfcSimplePropertyTemplateTypeEnum.Q_TIME={type:3,value:"Q_TIME"};IfcSimplePropertyTemplateTypeEnum.Q_VOLUME={type:3,value:"Q_VOLUME"};IfcSimplePropertyTemplateTypeEnum.Q_WEIGHT={type:3,value:"Q_WEIGHT"};IFC4X32.IfcSimplePropertyTemplateTypeEnum=IfcSimplePropertyTemplateTypeEnum;var IfcSlabTypeEnum=/*#__PURE__*/_createClass(function IfcSlabTypeEnum(){_classCallCheck(this,IfcSlabTypeEnum);});IfcSlabTypeEnum.APPROACH_SLAB={type:3,value:"APPROACH_SLAB"};IfcSlabTypeEnum.BASESLAB={type:3,value:"BASESLAB"};IfcSlabTypeEnum.FLOOR={type:3,value:"FLOOR"};IfcSlabTypeEnum.LANDING={type:3,value:"LANDING"};IfcSlabTypeEnum.PAVING={type:3,value:"PAVING"};IfcSlabTypeEnum.ROOF={type:3,value:"ROOF"};IfcSlabTypeEnum.SIDEWALK={type:3,value:"SIDEWALK"};IfcSlabTypeEnum.TRACKSLAB={type:3,value:"TRACKSLAB"};IfcSlabTypeEnum.WEARING={type:3,value:"WEARING"};IfcSlabTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSlabTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSlabTypeEnum=IfcSlabTypeEnum;var IfcSolarDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcSolarDeviceTypeEnum(){_classCallCheck(this,IfcSolarDeviceTypeEnum);});IfcSolarDeviceTypeEnum.SOLARCOLLECTOR={type:3,value:"SOLARCOLLECTOR"};IfcSolarDeviceTypeEnum.SOLARPANEL={type:3,value:"SOLARPANEL"};IfcSolarDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSolarDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSolarDeviceTypeEnum=IfcSolarDeviceTypeEnum;var IfcSpaceHeaterTypeEnum=/*#__PURE__*/_createClass(function IfcSpaceHeaterTypeEnum(){_classCallCheck(this,IfcSpaceHeaterTypeEnum);});IfcSpaceHeaterTypeEnum.CONVECTOR={type:3,value:"CONVECTOR"};IfcSpaceHeaterTypeEnum.RADIATOR={type:3,value:"RADIATOR"};IfcSpaceHeaterTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpaceHeaterTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSpaceHeaterTypeEnum=IfcSpaceHeaterTypeEnum;var IfcSpaceTypeEnum=/*#__PURE__*/_createClass(function IfcSpaceTypeEnum(){_classCallCheck(this,IfcSpaceTypeEnum);});IfcSpaceTypeEnum.BERTH={type:3,value:"BERTH"};IfcSpaceTypeEnum.EXTERNAL={type:3,value:"EXTERNAL"};IfcSpaceTypeEnum.GFA={type:3,value:"GFA"};IfcSpaceTypeEnum.INTERNAL={type:3,value:"INTERNAL"};IfcSpaceTypeEnum.PARKING={type:3,value:"PARKING"};IfcSpaceTypeEnum.SPACE={type:3,value:"SPACE"};IfcSpaceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpaceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSpaceTypeEnum=IfcSpaceTypeEnum;var IfcSpatialZoneTypeEnum=/*#__PURE__*/_createClass(function IfcSpatialZoneTypeEnum(){_classCallCheck(this,IfcSpatialZoneTypeEnum);});IfcSpatialZoneTypeEnum.CONSTRUCTION={type:3,value:"CONSTRUCTION"};IfcSpatialZoneTypeEnum.FIRESAFETY={type:3,value:"FIRESAFETY"};IfcSpatialZoneTypeEnum.INTERFERENCE={type:3,value:"INTERFERENCE"};IfcSpatialZoneTypeEnum.LIGHTING={type:3,value:"LIGHTING"};IfcSpatialZoneTypeEnum.OCCUPANCY={type:3,value:"OCCUPANCY"};IfcSpatialZoneTypeEnum.RESERVATION={type:3,value:"RESERVATION"};IfcSpatialZoneTypeEnum.SECURITY={type:3,value:"SECURITY"};IfcSpatialZoneTypeEnum.THERMAL={type:3,value:"THERMAL"};IfcSpatialZoneTypeEnum.TRANSPORT={type:3,value:"TRANSPORT"};IfcSpatialZoneTypeEnum.VENTILATION={type:3,value:"VENTILATION"};IfcSpatialZoneTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSpatialZoneTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSpatialZoneTypeEnum=IfcSpatialZoneTypeEnum;var IfcStackTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcStackTerminalTypeEnum(){_classCallCheck(this,IfcStackTerminalTypeEnum);});IfcStackTerminalTypeEnum.BIRDCAGE={type:3,value:"BIRDCAGE"};IfcStackTerminalTypeEnum.COWL={type:3,value:"COWL"};IfcStackTerminalTypeEnum.RAINWATERHOPPER={type:3,value:"RAINWATERHOPPER"};IfcStackTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStackTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcStackTerminalTypeEnum=IfcStackTerminalTypeEnum;var IfcStairFlightTypeEnum=/*#__PURE__*/_createClass(function IfcStairFlightTypeEnum(){_classCallCheck(this,IfcStairFlightTypeEnum);});IfcStairFlightTypeEnum.CURVED={type:3,value:"CURVED"};IfcStairFlightTypeEnum.FREEFORM={type:3,value:"FREEFORM"};IfcStairFlightTypeEnum.SPIRAL={type:3,value:"SPIRAL"};IfcStairFlightTypeEnum.STRAIGHT={type:3,value:"STRAIGHT"};IfcStairFlightTypeEnum.WINDER={type:3,value:"WINDER"};IfcStairFlightTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStairFlightTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcStairFlightTypeEnum=IfcStairFlightTypeEnum;var IfcStairTypeEnum=/*#__PURE__*/_createClass(function IfcStairTypeEnum(){_classCallCheck(this,IfcStairTypeEnum);});IfcStairTypeEnum.CURVED_RUN_STAIR={type:3,value:"CURVED_RUN_STAIR"};IfcStairTypeEnum.DOUBLE_RETURN_STAIR={type:3,value:"DOUBLE_RETURN_STAIR"};IfcStairTypeEnum.HALF_TURN_STAIR={type:3,value:"HALF_TURN_STAIR"};IfcStairTypeEnum.HALF_WINDING_STAIR={type:3,value:"HALF_WINDING_STAIR"};IfcStairTypeEnum.LADDER={type:3,value:"LADDER"};IfcStairTypeEnum.QUARTER_TURN_STAIR={type:3,value:"QUARTER_TURN_STAIR"};IfcStairTypeEnum.QUARTER_WINDING_STAIR={type:3,value:"QUARTER_WINDING_STAIR"};IfcStairTypeEnum.SPIRAL_STAIR={type:3,value:"SPIRAL_STAIR"};IfcStairTypeEnum.STRAIGHT_RUN_STAIR={type:3,value:"STRAIGHT_RUN_STAIR"};IfcStairTypeEnum.THREE_QUARTER_TURN_STAIR={type:3,value:"THREE_QUARTER_TURN_STAIR"};IfcStairTypeEnum.THREE_QUARTER_WINDING_STAIR={type:3,value:"THREE_QUARTER_WINDING_STAIR"};IfcStairTypeEnum.TWO_CURVED_RUN_STAIR={type:3,value:"TWO_CURVED_RUN_STAIR"};IfcStairTypeEnum.TWO_QUARTER_TURN_STAIR={type:3,value:"TWO_QUARTER_TURN_STAIR"};IfcStairTypeEnum.TWO_QUARTER_WINDING_STAIR={type:3,value:"TWO_QUARTER_WINDING_STAIR"};IfcStairTypeEnum.TWO_STRAIGHT_RUN_STAIR={type:3,value:"TWO_STRAIGHT_RUN_STAIR"};IfcStairTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStairTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcStairTypeEnum=IfcStairTypeEnum;var IfcStateEnum=/*#__PURE__*/_createClass(function IfcStateEnum(){_classCallCheck(this,IfcStateEnum);});IfcStateEnum.LOCKED={type:3,value:"LOCKED"};IfcStateEnum.READONLY={type:3,value:"READONLY"};IfcStateEnum.READONLYLOCKED={type:3,value:"READONLYLOCKED"};IfcStateEnum.READWRITE={type:3,value:"READWRITE"};IfcStateEnum.READWRITELOCKED={type:3,value:"READWRITELOCKED"};IFC4X32.IfcStateEnum=IfcStateEnum;var IfcStructuralCurveActivityTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralCurveActivityTypeEnum(){_classCallCheck(this,IfcStructuralCurveActivityTypeEnum);});IfcStructuralCurveActivityTypeEnum.CONST={type:3,value:"CONST"};IfcStructuralCurveActivityTypeEnum.DISCRETE={type:3,value:"DISCRETE"};IfcStructuralCurveActivityTypeEnum.EQUIDISTANT={type:3,value:"EQUIDISTANT"};IfcStructuralCurveActivityTypeEnum.LINEAR={type:3,value:"LINEAR"};IfcStructuralCurveActivityTypeEnum.PARABOLA={type:3,value:"PARABOLA"};IfcStructuralCurveActivityTypeEnum.POLYGONAL={type:3,value:"POLYGONAL"};IfcStructuralCurveActivityTypeEnum.SINUS={type:3,value:"SINUS"};IfcStructuralCurveActivityTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralCurveActivityTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcStructuralCurveActivityTypeEnum=IfcStructuralCurveActivityTypeEnum;var IfcStructuralCurveMemberTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralCurveMemberTypeEnum(){_classCallCheck(this,IfcStructuralCurveMemberTypeEnum);});IfcStructuralCurveMemberTypeEnum.CABLE={type:3,value:"CABLE"};IfcStructuralCurveMemberTypeEnum.COMPRESSION_MEMBER={type:3,value:"COMPRESSION_MEMBER"};IfcStructuralCurveMemberTypeEnum.PIN_JOINED_MEMBER={type:3,value:"PIN_JOINED_MEMBER"};IfcStructuralCurveMemberTypeEnum.RIGID_JOINED_MEMBER={type:3,value:"RIGID_JOINED_MEMBER"};IfcStructuralCurveMemberTypeEnum.TENSION_MEMBER={type:3,value:"TENSION_MEMBER"};IfcStructuralCurveMemberTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralCurveMemberTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcStructuralCurveMemberTypeEnum=IfcStructuralCurveMemberTypeEnum;var IfcStructuralSurfaceActivityTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralSurfaceActivityTypeEnum(){_classCallCheck(this,IfcStructuralSurfaceActivityTypeEnum);});IfcStructuralSurfaceActivityTypeEnum.BILINEAR={type:3,value:"BILINEAR"};IfcStructuralSurfaceActivityTypeEnum.CONST={type:3,value:"CONST"};IfcStructuralSurfaceActivityTypeEnum.DISCRETE={type:3,value:"DISCRETE"};IfcStructuralSurfaceActivityTypeEnum.ISOCONTOUR={type:3,value:"ISOCONTOUR"};IfcStructuralSurfaceActivityTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralSurfaceActivityTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcStructuralSurfaceActivityTypeEnum=IfcStructuralSurfaceActivityTypeEnum;var IfcStructuralSurfaceMemberTypeEnum=/*#__PURE__*/_createClass(function IfcStructuralSurfaceMemberTypeEnum(){_classCallCheck(this,IfcStructuralSurfaceMemberTypeEnum);});IfcStructuralSurfaceMemberTypeEnum.BENDING_ELEMENT={type:3,value:"BENDING_ELEMENT"};IfcStructuralSurfaceMemberTypeEnum.MEMBRANE_ELEMENT={type:3,value:"MEMBRANE_ELEMENT"};IfcStructuralSurfaceMemberTypeEnum.SHELL={type:3,value:"SHELL"};IfcStructuralSurfaceMemberTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcStructuralSurfaceMemberTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcStructuralSurfaceMemberTypeEnum=IfcStructuralSurfaceMemberTypeEnum;var IfcSubContractResourceTypeEnum=/*#__PURE__*/_createClass(function IfcSubContractResourceTypeEnum(){_classCallCheck(this,IfcSubContractResourceTypeEnum);});IfcSubContractResourceTypeEnum.PURCHASE={type:3,value:"PURCHASE"};IfcSubContractResourceTypeEnum.WORK={type:3,value:"WORK"};IfcSubContractResourceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSubContractResourceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSubContractResourceTypeEnum=IfcSubContractResourceTypeEnum;var IfcSurfaceFeatureTypeEnum=/*#__PURE__*/_createClass(function IfcSurfaceFeatureTypeEnum(){_classCallCheck(this,IfcSurfaceFeatureTypeEnum);});IfcSurfaceFeatureTypeEnum.DEFECT={type:3,value:"DEFECT"};IfcSurfaceFeatureTypeEnum.HATCHMARKING={type:3,value:"HATCHMARKING"};IfcSurfaceFeatureTypeEnum.LINEMARKING={type:3,value:"LINEMARKING"};IfcSurfaceFeatureTypeEnum.MARK={type:3,value:"MARK"};IfcSurfaceFeatureTypeEnum.NONSKIDSURFACING={type:3,value:"NONSKIDSURFACING"};IfcSurfaceFeatureTypeEnum.PAVEMENTSURFACEMARKING={type:3,value:"PAVEMENTSURFACEMARKING"};IfcSurfaceFeatureTypeEnum.RUMBLESTRIP={type:3,value:"RUMBLESTRIP"};IfcSurfaceFeatureTypeEnum.SYMBOLMARKING={type:3,value:"SYMBOLMARKING"};IfcSurfaceFeatureTypeEnum.TAG={type:3,value:"TAG"};IfcSurfaceFeatureTypeEnum.TRANSVERSERUMBLESTRIP={type:3,value:"TRANSVERSERUMBLESTRIP"};IfcSurfaceFeatureTypeEnum.TREATMENT={type:3,value:"TREATMENT"};IfcSurfaceFeatureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSurfaceFeatureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSurfaceFeatureTypeEnum=IfcSurfaceFeatureTypeEnum;var IfcSurfaceSide=/*#__PURE__*/_createClass(function IfcSurfaceSide(){_classCallCheck(this,IfcSurfaceSide);});IfcSurfaceSide.BOTH={type:3,value:"BOTH"};IfcSurfaceSide.NEGATIVE={type:3,value:"NEGATIVE"};IfcSurfaceSide.POSITIVE={type:3,value:"POSITIVE"};IFC4X32.IfcSurfaceSide=IfcSurfaceSide;var IfcSwitchingDeviceTypeEnum=/*#__PURE__*/_createClass(function IfcSwitchingDeviceTypeEnum(){_classCallCheck(this,IfcSwitchingDeviceTypeEnum);});IfcSwitchingDeviceTypeEnum.CONTACTOR={type:3,value:"CONTACTOR"};IfcSwitchingDeviceTypeEnum.DIMMERSWITCH={type:3,value:"DIMMERSWITCH"};IfcSwitchingDeviceTypeEnum.EMERGENCYSTOP={type:3,value:"EMERGENCYSTOP"};IfcSwitchingDeviceTypeEnum.KEYPAD={type:3,value:"KEYPAD"};IfcSwitchingDeviceTypeEnum.MOMENTARYSWITCH={type:3,value:"MOMENTARYSWITCH"};IfcSwitchingDeviceTypeEnum.RELAY={type:3,value:"RELAY"};IfcSwitchingDeviceTypeEnum.SELECTORSWITCH={type:3,value:"SELECTORSWITCH"};IfcSwitchingDeviceTypeEnum.STARTER={type:3,value:"STARTER"};IfcSwitchingDeviceTypeEnum.START_AND_STOP_EQUIPMENT={type:3,value:"START_AND_STOP_EQUIPMENT"};IfcSwitchingDeviceTypeEnum.SWITCHDISCONNECTOR={type:3,value:"SWITCHDISCONNECTOR"};IfcSwitchingDeviceTypeEnum.TOGGLESWITCH={type:3,value:"TOGGLESWITCH"};IfcSwitchingDeviceTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSwitchingDeviceTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSwitchingDeviceTypeEnum=IfcSwitchingDeviceTypeEnum;var IfcSystemFurnitureElementTypeEnum=/*#__PURE__*/_createClass(function IfcSystemFurnitureElementTypeEnum(){_classCallCheck(this,IfcSystemFurnitureElementTypeEnum);});IfcSystemFurnitureElementTypeEnum.PANEL={type:3,value:"PANEL"};IfcSystemFurnitureElementTypeEnum.SUBRACK={type:3,value:"SUBRACK"};IfcSystemFurnitureElementTypeEnum.WORKSURFACE={type:3,value:"WORKSURFACE"};IfcSystemFurnitureElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcSystemFurnitureElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcSystemFurnitureElementTypeEnum=IfcSystemFurnitureElementTypeEnum;var IfcTankTypeEnum=/*#__PURE__*/_createClass(function IfcTankTypeEnum(){_classCallCheck(this,IfcTankTypeEnum);});IfcTankTypeEnum.BASIN={type:3,value:"BASIN"};IfcTankTypeEnum.BREAKPRESSURE={type:3,value:"BREAKPRESSURE"};IfcTankTypeEnum.EXPANSION={type:3,value:"EXPANSION"};IfcTankTypeEnum.FEEDANDEXPANSION={type:3,value:"FEEDANDEXPANSION"};IfcTankTypeEnum.OILRETENTIONTRAY={type:3,value:"OILRETENTIONTRAY"};IfcTankTypeEnum.PRESSUREVESSEL={type:3,value:"PRESSUREVESSEL"};IfcTankTypeEnum.STORAGE={type:3,value:"STORAGE"};IfcTankTypeEnum.VESSEL={type:3,value:"VESSEL"};IfcTankTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTankTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTankTypeEnum=IfcTankTypeEnum;var IfcTaskDurationEnum=/*#__PURE__*/_createClass(function IfcTaskDurationEnum(){_classCallCheck(this,IfcTaskDurationEnum);});IfcTaskDurationEnum.ELAPSEDTIME={type:3,value:"ELAPSEDTIME"};IfcTaskDurationEnum.WORKTIME={type:3,value:"WORKTIME"};IfcTaskDurationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTaskDurationEnum=IfcTaskDurationEnum;var IfcTaskTypeEnum=/*#__PURE__*/_createClass(function IfcTaskTypeEnum(){_classCallCheck(this,IfcTaskTypeEnum);});IfcTaskTypeEnum.ADJUSTMENT={type:3,value:"ADJUSTMENT"};IfcTaskTypeEnum.ATTENDANCE={type:3,value:"ATTENDANCE"};IfcTaskTypeEnum.CALIBRATION={type:3,value:"CALIBRATION"};IfcTaskTypeEnum.CONSTRUCTION={type:3,value:"CONSTRUCTION"};IfcTaskTypeEnum.DEMOLITION={type:3,value:"DEMOLITION"};IfcTaskTypeEnum.DISMANTLE={type:3,value:"DISMANTLE"};IfcTaskTypeEnum.DISPOSAL={type:3,value:"DISPOSAL"};IfcTaskTypeEnum.EMERGENCY={type:3,value:"EMERGENCY"};IfcTaskTypeEnum.INSPECTION={type:3,value:"INSPECTION"};IfcTaskTypeEnum.INSTALLATION={type:3,value:"INSTALLATION"};IfcTaskTypeEnum.LOGISTIC={type:3,value:"LOGISTIC"};IfcTaskTypeEnum.MAINTENANCE={type:3,value:"MAINTENANCE"};IfcTaskTypeEnum.MOVE={type:3,value:"MOVE"};IfcTaskTypeEnum.OPERATION={type:3,value:"OPERATION"};IfcTaskTypeEnum.REMOVAL={type:3,value:"REMOVAL"};IfcTaskTypeEnum.RENOVATION={type:3,value:"RENOVATION"};IfcTaskTypeEnum.SAFETY={type:3,value:"SAFETY"};IfcTaskTypeEnum.SHUTDOWN={type:3,value:"SHUTDOWN"};IfcTaskTypeEnum.STARTUP={type:3,value:"STARTUP"};IfcTaskTypeEnum.TESTING={type:3,value:"TESTING"};IfcTaskTypeEnum.TROUBLESHOOTING={type:3,value:"TROUBLESHOOTING"};IfcTaskTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTaskTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTaskTypeEnum=IfcTaskTypeEnum;var IfcTendonAnchorTypeEnum=/*#__PURE__*/_createClass(function IfcTendonAnchorTypeEnum(){_classCallCheck(this,IfcTendonAnchorTypeEnum);});IfcTendonAnchorTypeEnum.COUPLER={type:3,value:"COUPLER"};IfcTendonAnchorTypeEnum.FIXED_END={type:3,value:"FIXED_END"};IfcTendonAnchorTypeEnum.TENSIONING_END={type:3,value:"TENSIONING_END"};IfcTendonAnchorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTendonAnchorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTendonAnchorTypeEnum=IfcTendonAnchorTypeEnum;var IfcTendonConduitTypeEnum=/*#__PURE__*/_createClass(function IfcTendonConduitTypeEnum(){_classCallCheck(this,IfcTendonConduitTypeEnum);});IfcTendonConduitTypeEnum.COUPLER={type:3,value:"COUPLER"};IfcTendonConduitTypeEnum.DIABOLO={type:3,value:"DIABOLO"};IfcTendonConduitTypeEnum.DUCT={type:3,value:"DUCT"};IfcTendonConduitTypeEnum.GROUTING_DUCT={type:3,value:"GROUTING_DUCT"};IfcTendonConduitTypeEnum.TRUMPET={type:3,value:"TRUMPET"};IfcTendonConduitTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTendonConduitTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTendonConduitTypeEnum=IfcTendonConduitTypeEnum;var IfcTendonTypeEnum=/*#__PURE__*/_createClass(function IfcTendonTypeEnum(){_classCallCheck(this,IfcTendonTypeEnum);});IfcTendonTypeEnum.BAR={type:3,value:"BAR"};IfcTendonTypeEnum.COATED={type:3,value:"COATED"};IfcTendonTypeEnum.STRAND={type:3,value:"STRAND"};IfcTendonTypeEnum.WIRE={type:3,value:"WIRE"};IfcTendonTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTendonTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTendonTypeEnum=IfcTendonTypeEnum;var IfcTextPath=/*#__PURE__*/_createClass(function IfcTextPath(){_classCallCheck(this,IfcTextPath);});IfcTextPath.DOWN={type:3,value:"DOWN"};IfcTextPath.LEFT={type:3,value:"LEFT"};IfcTextPath.RIGHT={type:3,value:"RIGHT"};IfcTextPath.UP={type:3,value:"UP"};IFC4X32.IfcTextPath=IfcTextPath;var IfcTimeSeriesDataTypeEnum=/*#__PURE__*/_createClass(function IfcTimeSeriesDataTypeEnum(){_classCallCheck(this,IfcTimeSeriesDataTypeEnum);});IfcTimeSeriesDataTypeEnum.CONTINUOUS={type:3,value:"CONTINUOUS"};IfcTimeSeriesDataTypeEnum.DISCRETE={type:3,value:"DISCRETE"};IfcTimeSeriesDataTypeEnum.DISCRETEBINARY={type:3,value:"DISCRETEBINARY"};IfcTimeSeriesDataTypeEnum.PIECEWISEBINARY={type:3,value:"PIECEWISEBINARY"};IfcTimeSeriesDataTypeEnum.PIECEWISECONSTANT={type:3,value:"PIECEWISECONSTANT"};IfcTimeSeriesDataTypeEnum.PIECEWISECONTINUOUS={type:3,value:"PIECEWISECONTINUOUS"};IfcTimeSeriesDataTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTimeSeriesDataTypeEnum=IfcTimeSeriesDataTypeEnum;var IfcTrackElementTypeEnum=/*#__PURE__*/_createClass(function IfcTrackElementTypeEnum(){_classCallCheck(this,IfcTrackElementTypeEnum);});IfcTrackElementTypeEnum.BLOCKINGDEVICE={type:3,value:"BLOCKINGDEVICE"};IfcTrackElementTypeEnum.DERAILER={type:3,value:"DERAILER"};IfcTrackElementTypeEnum.FROG={type:3,value:"FROG"};IfcTrackElementTypeEnum.HALF_SET_OF_BLADES={type:3,value:"HALF_SET_OF_BLADES"};IfcTrackElementTypeEnum.SLEEPER={type:3,value:"SLEEPER"};IfcTrackElementTypeEnum.SPEEDREGULATOR={type:3,value:"SPEEDREGULATOR"};IfcTrackElementTypeEnum.TRACKENDOFALIGNMENT={type:3,value:"TRACKENDOFALIGNMENT"};IfcTrackElementTypeEnum.VEHICLESTOP={type:3,value:"VEHICLESTOP"};IfcTrackElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTrackElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTrackElementTypeEnum=IfcTrackElementTypeEnum;var IfcTransformerTypeEnum=/*#__PURE__*/_createClass(function IfcTransformerTypeEnum(){_classCallCheck(this,IfcTransformerTypeEnum);});IfcTransformerTypeEnum.CHOPPER={type:3,value:"CHOPPER"};IfcTransformerTypeEnum.COMBINED={type:3,value:"COMBINED"};IfcTransformerTypeEnum.CURRENT={type:3,value:"CURRENT"};IfcTransformerTypeEnum.FREQUENCY={type:3,value:"FREQUENCY"};IfcTransformerTypeEnum.INVERTER={type:3,value:"INVERTER"};IfcTransformerTypeEnum.RECTIFIER={type:3,value:"RECTIFIER"};IfcTransformerTypeEnum.VOLTAGE={type:3,value:"VOLTAGE"};IfcTransformerTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTransformerTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTransformerTypeEnum=IfcTransformerTypeEnum;var IfcTransitionCode=/*#__PURE__*/_createClass(function IfcTransitionCode(){_classCallCheck(this,IfcTransitionCode);});IfcTransitionCode.CONTINUOUS={type:3,value:"CONTINUOUS"};IfcTransitionCode.CONTSAMEGRADIENT={type:3,value:"CONTSAMEGRADIENT"};IfcTransitionCode.CONTSAMEGRADIENTSAMECURVATURE={type:3,value:"CONTSAMEGRADIENTSAMECURVATURE"};IfcTransitionCode.DISCONTINUOUS={type:3,value:"DISCONTINUOUS"};IFC4X32.IfcTransitionCode=IfcTransitionCode;var IfcTransportElementTypeEnum=/*#__PURE__*/_createClass(function IfcTransportElementTypeEnum(){_classCallCheck(this,IfcTransportElementTypeEnum);});IfcTransportElementTypeEnum.CRANEWAY={type:3,value:"CRANEWAY"};IfcTransportElementTypeEnum.ELEVATOR={type:3,value:"ELEVATOR"};IfcTransportElementTypeEnum.ESCALATOR={type:3,value:"ESCALATOR"};IfcTransportElementTypeEnum.HAULINGGEAR={type:3,value:"HAULINGGEAR"};IfcTransportElementTypeEnum.LIFTINGGEAR={type:3,value:"LIFTINGGEAR"};IfcTransportElementTypeEnum.MOVINGWALKWAY={type:3,value:"MOVINGWALKWAY"};IfcTransportElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTransportElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTransportElementTypeEnum=IfcTransportElementTypeEnum;var IfcTrimmingPreference=/*#__PURE__*/_createClass(function IfcTrimmingPreference(){_classCallCheck(this,IfcTrimmingPreference);});IfcTrimmingPreference.CARTESIAN={type:3,value:"CARTESIAN"};IfcTrimmingPreference.PARAMETER={type:3,value:"PARAMETER"};IfcTrimmingPreference.UNSPECIFIED={type:3,value:"UNSPECIFIED"};IFC4X32.IfcTrimmingPreference=IfcTrimmingPreference;var IfcTubeBundleTypeEnum=/*#__PURE__*/_createClass(function IfcTubeBundleTypeEnum(){_classCallCheck(this,IfcTubeBundleTypeEnum);});IfcTubeBundleTypeEnum.FINNED={type:3,value:"FINNED"};IfcTubeBundleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcTubeBundleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcTubeBundleTypeEnum=IfcTubeBundleTypeEnum;var IfcUnitEnum=/*#__PURE__*/_createClass(function IfcUnitEnum(){_classCallCheck(this,IfcUnitEnum);});IfcUnitEnum.ABSORBEDDOSEUNIT={type:3,value:"ABSORBEDDOSEUNIT"};IfcUnitEnum.AMOUNTOFSUBSTANCEUNIT={type:3,value:"AMOUNTOFSUBSTANCEUNIT"};IfcUnitEnum.AREAUNIT={type:3,value:"AREAUNIT"};IfcUnitEnum.DOSEEQUIVALENTUNIT={type:3,value:"DOSEEQUIVALENTUNIT"};IfcUnitEnum.ELECTRICCAPACITANCEUNIT={type:3,value:"ELECTRICCAPACITANCEUNIT"};IfcUnitEnum.ELECTRICCHARGEUNIT={type:3,value:"ELECTRICCHARGEUNIT"};IfcUnitEnum.ELECTRICCONDUCTANCEUNIT={type:3,value:"ELECTRICCONDUCTANCEUNIT"};IfcUnitEnum.ELECTRICCURRENTUNIT={type:3,value:"ELECTRICCURRENTUNIT"};IfcUnitEnum.ELECTRICRESISTANCEUNIT={type:3,value:"ELECTRICRESISTANCEUNIT"};IfcUnitEnum.ELECTRICVOLTAGEUNIT={type:3,value:"ELECTRICVOLTAGEUNIT"};IfcUnitEnum.ENERGYUNIT={type:3,value:"ENERGYUNIT"};IfcUnitEnum.FORCEUNIT={type:3,value:"FORCEUNIT"};IfcUnitEnum.FREQUENCYUNIT={type:3,value:"FREQUENCYUNIT"};IfcUnitEnum.ILLUMINANCEUNIT={type:3,value:"ILLUMINANCEUNIT"};IfcUnitEnum.INDUCTANCEUNIT={type:3,value:"INDUCTANCEUNIT"};IfcUnitEnum.LENGTHUNIT={type:3,value:"LENGTHUNIT"};IfcUnitEnum.LUMINOUSFLUXUNIT={type:3,value:"LUMINOUSFLUXUNIT"};IfcUnitEnum.LUMINOUSINTENSITYUNIT={type:3,value:"LUMINOUSINTENSITYUNIT"};IfcUnitEnum.MAGNETICFLUXDENSITYUNIT={type:3,value:"MAGNETICFLUXDENSITYUNIT"};IfcUnitEnum.MAGNETICFLUXUNIT={type:3,value:"MAGNETICFLUXUNIT"};IfcUnitEnum.MASSUNIT={type:3,value:"MASSUNIT"};IfcUnitEnum.PLANEANGLEUNIT={type:3,value:"PLANEANGLEUNIT"};IfcUnitEnum.POWERUNIT={type:3,value:"POWERUNIT"};IfcUnitEnum.PRESSUREUNIT={type:3,value:"PRESSUREUNIT"};IfcUnitEnum.RADIOACTIVITYUNIT={type:3,value:"RADIOACTIVITYUNIT"};IfcUnitEnum.SOLIDANGLEUNIT={type:3,value:"SOLIDANGLEUNIT"};IfcUnitEnum.THERMODYNAMICTEMPERATUREUNIT={type:3,value:"THERMODYNAMICTEMPERATUREUNIT"};IfcUnitEnum.TIMEUNIT={type:3,value:"TIMEUNIT"};IfcUnitEnum.VOLUMEUNIT={type:3,value:"VOLUMEUNIT"};IfcUnitEnum.USERDEFINED={type:3,value:"USERDEFINED"};IFC4X32.IfcUnitEnum=IfcUnitEnum;var IfcUnitaryControlElementTypeEnum=/*#__PURE__*/_createClass(function IfcUnitaryControlElementTypeEnum(){_classCallCheck(this,IfcUnitaryControlElementTypeEnum);});IfcUnitaryControlElementTypeEnum.ALARMPANEL={type:3,value:"ALARMPANEL"};IfcUnitaryControlElementTypeEnum.BASESTATIONCONTROLLER={type:3,value:"BASESTATIONCONTROLLER"};IfcUnitaryControlElementTypeEnum.COMBINED={type:3,value:"COMBINED"};IfcUnitaryControlElementTypeEnum.CONTROLPANEL={type:3,value:"CONTROLPANEL"};IfcUnitaryControlElementTypeEnum.GASDETECTIONPANEL={type:3,value:"GASDETECTIONPANEL"};IfcUnitaryControlElementTypeEnum.HUMIDISTAT={type:3,value:"HUMIDISTAT"};IfcUnitaryControlElementTypeEnum.INDICATORPANEL={type:3,value:"INDICATORPANEL"};IfcUnitaryControlElementTypeEnum.MIMICPANEL={type:3,value:"MIMICPANEL"};IfcUnitaryControlElementTypeEnum.THERMOSTAT={type:3,value:"THERMOSTAT"};IfcUnitaryControlElementTypeEnum.WEATHERSTATION={type:3,value:"WEATHERSTATION"};IfcUnitaryControlElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcUnitaryControlElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcUnitaryControlElementTypeEnum=IfcUnitaryControlElementTypeEnum;var IfcUnitaryEquipmentTypeEnum=/*#__PURE__*/_createClass(function IfcUnitaryEquipmentTypeEnum(){_classCallCheck(this,IfcUnitaryEquipmentTypeEnum);});IfcUnitaryEquipmentTypeEnum.AIRCONDITIONINGUNIT={type:3,value:"AIRCONDITIONINGUNIT"};IfcUnitaryEquipmentTypeEnum.AIRHANDLER={type:3,value:"AIRHANDLER"};IfcUnitaryEquipmentTypeEnum.DEHUMIDIFIER={type:3,value:"DEHUMIDIFIER"};IfcUnitaryEquipmentTypeEnum.ROOFTOPUNIT={type:3,value:"ROOFTOPUNIT"};IfcUnitaryEquipmentTypeEnum.SPLITSYSTEM={type:3,value:"SPLITSYSTEM"};IfcUnitaryEquipmentTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcUnitaryEquipmentTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcUnitaryEquipmentTypeEnum=IfcUnitaryEquipmentTypeEnum;var IfcValveTypeEnum=/*#__PURE__*/_createClass(function IfcValveTypeEnum(){_classCallCheck(this,IfcValveTypeEnum);});IfcValveTypeEnum.AIRRELEASE={type:3,value:"AIRRELEASE"};IfcValveTypeEnum.ANTIVACUUM={type:3,value:"ANTIVACUUM"};IfcValveTypeEnum.CHANGEOVER={type:3,value:"CHANGEOVER"};IfcValveTypeEnum.CHECK={type:3,value:"CHECK"};IfcValveTypeEnum.COMMISSIONING={type:3,value:"COMMISSIONING"};IfcValveTypeEnum.DIVERTING={type:3,value:"DIVERTING"};IfcValveTypeEnum.DOUBLECHECK={type:3,value:"DOUBLECHECK"};IfcValveTypeEnum.DOUBLEREGULATING={type:3,value:"DOUBLEREGULATING"};IfcValveTypeEnum.DRAWOFFCOCK={type:3,value:"DRAWOFFCOCK"};IfcValveTypeEnum.FAUCET={type:3,value:"FAUCET"};IfcValveTypeEnum.FLUSHING={type:3,value:"FLUSHING"};IfcValveTypeEnum.GASCOCK={type:3,value:"GASCOCK"};IfcValveTypeEnum.GASTAP={type:3,value:"GASTAP"};IfcValveTypeEnum.ISOLATING={type:3,value:"ISOLATING"};IfcValveTypeEnum.MIXING={type:3,value:"MIXING"};IfcValveTypeEnum.PRESSUREREDUCING={type:3,value:"PRESSUREREDUCING"};IfcValveTypeEnum.PRESSURERELIEF={type:3,value:"PRESSURERELIEF"};IfcValveTypeEnum.REGULATING={type:3,value:"REGULATING"};IfcValveTypeEnum.SAFETYCUTOFF={type:3,value:"SAFETYCUTOFF"};IfcValveTypeEnum.STEAMTRAP={type:3,value:"STEAMTRAP"};IfcValveTypeEnum.STOPCOCK={type:3,value:"STOPCOCK"};IfcValveTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcValveTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcValveTypeEnum=IfcValveTypeEnum;var IfcVehicleTypeEnum=/*#__PURE__*/_createClass(function IfcVehicleTypeEnum(){_classCallCheck(this,IfcVehicleTypeEnum);});IfcVehicleTypeEnum.CARGO={type:3,value:"CARGO"};IfcVehicleTypeEnum.ROLLINGSTOCK={type:3,value:"ROLLINGSTOCK"};IfcVehicleTypeEnum.VEHICLE={type:3,value:"VEHICLE"};IfcVehicleTypeEnum.VEHICLEAIR={type:3,value:"VEHICLEAIR"};IfcVehicleTypeEnum.VEHICLEMARINE={type:3,value:"VEHICLEMARINE"};IfcVehicleTypeEnum.VEHICLETRACKED={type:3,value:"VEHICLETRACKED"};IfcVehicleTypeEnum.VEHICLEWHEELED={type:3,value:"VEHICLEWHEELED"};IfcVehicleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVehicleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcVehicleTypeEnum=IfcVehicleTypeEnum;var IfcVibrationDamperTypeEnum=/*#__PURE__*/_createClass(function IfcVibrationDamperTypeEnum(){_classCallCheck(this,IfcVibrationDamperTypeEnum);});IfcVibrationDamperTypeEnum.AXIAL_YIELD={type:3,value:"AXIAL_YIELD"};IfcVibrationDamperTypeEnum.BENDING_YIELD={type:3,value:"BENDING_YIELD"};IfcVibrationDamperTypeEnum.FRICTION={type:3,value:"FRICTION"};IfcVibrationDamperTypeEnum.RUBBER={type:3,value:"RUBBER"};IfcVibrationDamperTypeEnum.SHEAR_YIELD={type:3,value:"SHEAR_YIELD"};IfcVibrationDamperTypeEnum.VISCOUS={type:3,value:"VISCOUS"};IfcVibrationDamperTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVibrationDamperTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcVibrationDamperTypeEnum=IfcVibrationDamperTypeEnum;var IfcVibrationIsolatorTypeEnum=/*#__PURE__*/_createClass(function IfcVibrationIsolatorTypeEnum(){_classCallCheck(this,IfcVibrationIsolatorTypeEnum);});IfcVibrationIsolatorTypeEnum.BASE={type:3,value:"BASE"};IfcVibrationIsolatorTypeEnum.COMPRESSION={type:3,value:"COMPRESSION"};IfcVibrationIsolatorTypeEnum.SPRING={type:3,value:"SPRING"};IfcVibrationIsolatorTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVibrationIsolatorTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcVibrationIsolatorTypeEnum=IfcVibrationIsolatorTypeEnum;var IfcVirtualElementTypeEnum=/*#__PURE__*/_createClass(function IfcVirtualElementTypeEnum(){_classCallCheck(this,IfcVirtualElementTypeEnum);});IfcVirtualElementTypeEnum.BOUNDARY={type:3,value:"BOUNDARY"};IfcVirtualElementTypeEnum.CLEARANCE={type:3,value:"CLEARANCE"};IfcVirtualElementTypeEnum.PROVISIONFORVOID={type:3,value:"PROVISIONFORVOID"};IfcVirtualElementTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVirtualElementTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcVirtualElementTypeEnum=IfcVirtualElementTypeEnum;var IfcVoidingFeatureTypeEnum=/*#__PURE__*/_createClass(function IfcVoidingFeatureTypeEnum(){_classCallCheck(this,IfcVoidingFeatureTypeEnum);});IfcVoidingFeatureTypeEnum.CHAMFER={type:3,value:"CHAMFER"};IfcVoidingFeatureTypeEnum.CUTOUT={type:3,value:"CUTOUT"};IfcVoidingFeatureTypeEnum.EDGE={type:3,value:"EDGE"};IfcVoidingFeatureTypeEnum.HOLE={type:3,value:"HOLE"};IfcVoidingFeatureTypeEnum.MITER={type:3,value:"MITER"};IfcVoidingFeatureTypeEnum.NOTCH={type:3,value:"NOTCH"};IfcVoidingFeatureTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcVoidingFeatureTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcVoidingFeatureTypeEnum=IfcVoidingFeatureTypeEnum;var IfcWallTypeEnum=/*#__PURE__*/_createClass(function IfcWallTypeEnum(){_classCallCheck(this,IfcWallTypeEnum);});IfcWallTypeEnum.ELEMENTEDWALL={type:3,value:"ELEMENTEDWALL"};IfcWallTypeEnum.MOVABLE={type:3,value:"MOVABLE"};IfcWallTypeEnum.PARAPET={type:3,value:"PARAPET"};IfcWallTypeEnum.PARTITIONING={type:3,value:"PARTITIONING"};IfcWallTypeEnum.PLUMBINGWALL={type:3,value:"PLUMBINGWALL"};IfcWallTypeEnum.POLYGONAL={type:3,value:"POLYGONAL"};IfcWallTypeEnum.RETAININGWALL={type:3,value:"RETAININGWALL"};IfcWallTypeEnum.SHEAR={type:3,value:"SHEAR"};IfcWallTypeEnum.SOLIDWALL={type:3,value:"SOLIDWALL"};IfcWallTypeEnum.STANDARD={type:3,value:"STANDARD"};IfcWallTypeEnum.WAVEWALL={type:3,value:"WAVEWALL"};IfcWallTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWallTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWallTypeEnum=IfcWallTypeEnum;var IfcWasteTerminalTypeEnum=/*#__PURE__*/_createClass(function IfcWasteTerminalTypeEnum(){_classCallCheck(this,IfcWasteTerminalTypeEnum);});IfcWasteTerminalTypeEnum.FLOORTRAP={type:3,value:"FLOORTRAP"};IfcWasteTerminalTypeEnum.FLOORWASTE={type:3,value:"FLOORWASTE"};IfcWasteTerminalTypeEnum.GULLYSUMP={type:3,value:"GULLYSUMP"};IfcWasteTerminalTypeEnum.GULLYTRAP={type:3,value:"GULLYTRAP"};IfcWasteTerminalTypeEnum.ROOFDRAIN={type:3,value:"ROOFDRAIN"};IfcWasteTerminalTypeEnum.WASTEDISPOSALUNIT={type:3,value:"WASTEDISPOSALUNIT"};IfcWasteTerminalTypeEnum.WASTETRAP={type:3,value:"WASTETRAP"};IfcWasteTerminalTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWasteTerminalTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWasteTerminalTypeEnum=IfcWasteTerminalTypeEnum;var IfcWindowPanelOperationEnum=/*#__PURE__*/_createClass(function IfcWindowPanelOperationEnum(){_classCallCheck(this,IfcWindowPanelOperationEnum);});IfcWindowPanelOperationEnum.BOTTOMHUNG={type:3,value:"BOTTOMHUNG"};IfcWindowPanelOperationEnum.FIXEDCASEMENT={type:3,value:"FIXEDCASEMENT"};IfcWindowPanelOperationEnum.OTHEROPERATION={type:3,value:"OTHEROPERATION"};IfcWindowPanelOperationEnum.PIVOTHORIZONTAL={type:3,value:"PIVOTHORIZONTAL"};IfcWindowPanelOperationEnum.PIVOTVERTICAL={type:3,value:"PIVOTVERTICAL"};IfcWindowPanelOperationEnum.REMOVABLECASEMENT={type:3,value:"REMOVABLECASEMENT"};IfcWindowPanelOperationEnum.SIDEHUNGLEFTHAND={type:3,value:"SIDEHUNGLEFTHAND"};IfcWindowPanelOperationEnum.SIDEHUNGRIGHTHAND={type:3,value:"SIDEHUNGRIGHTHAND"};IfcWindowPanelOperationEnum.SLIDINGHORIZONTAL={type:3,value:"SLIDINGHORIZONTAL"};IfcWindowPanelOperationEnum.SLIDINGVERTICAL={type:3,value:"SLIDINGVERTICAL"};IfcWindowPanelOperationEnum.TILTANDTURNLEFTHAND={type:3,value:"TILTANDTURNLEFTHAND"};IfcWindowPanelOperationEnum.TILTANDTURNRIGHTHAND={type:3,value:"TILTANDTURNRIGHTHAND"};IfcWindowPanelOperationEnum.TOPHUNG={type:3,value:"TOPHUNG"};IfcWindowPanelOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWindowPanelOperationEnum=IfcWindowPanelOperationEnum;var IfcWindowPanelPositionEnum=/*#__PURE__*/_createClass(function IfcWindowPanelPositionEnum(){_classCallCheck(this,IfcWindowPanelPositionEnum);});IfcWindowPanelPositionEnum.BOTTOM={type:3,value:"BOTTOM"};IfcWindowPanelPositionEnum.LEFT={type:3,value:"LEFT"};IfcWindowPanelPositionEnum.MIDDLE={type:3,value:"MIDDLE"};IfcWindowPanelPositionEnum.RIGHT={type:3,value:"RIGHT"};IfcWindowPanelPositionEnum.TOP={type:3,value:"TOP"};IfcWindowPanelPositionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWindowPanelPositionEnum=IfcWindowPanelPositionEnum;var IfcWindowStyleConstructionEnum=/*#__PURE__*/_createClass(function IfcWindowStyleConstructionEnum(){_classCallCheck(this,IfcWindowStyleConstructionEnum);});IfcWindowStyleConstructionEnum.ALUMINIUM={type:3,value:"ALUMINIUM"};IfcWindowStyleConstructionEnum.ALUMINIUM_WOOD={type:3,value:"ALUMINIUM_WOOD"};IfcWindowStyleConstructionEnum.HIGH_GRADE_STEEL={type:3,value:"HIGH_GRADE_STEEL"};IfcWindowStyleConstructionEnum.OTHER_CONSTRUCTION={type:3,value:"OTHER_CONSTRUCTION"};IfcWindowStyleConstructionEnum.PLASTIC={type:3,value:"PLASTIC"};IfcWindowStyleConstructionEnum.STEEL={type:3,value:"STEEL"};IfcWindowStyleConstructionEnum.WOOD={type:3,value:"WOOD"};IfcWindowStyleConstructionEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWindowStyleConstructionEnum=IfcWindowStyleConstructionEnum;var IfcWindowStyleOperationEnum=/*#__PURE__*/_createClass(function IfcWindowStyleOperationEnum(){_classCallCheck(this,IfcWindowStyleOperationEnum);});IfcWindowStyleOperationEnum.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"};IfcWindowStyleOperationEnum.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"};IfcWindowStyleOperationEnum.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"};IfcWindowStyleOperationEnum.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"};IfcWindowStyleOperationEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWindowStyleOperationEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWindowStyleOperationEnum=IfcWindowStyleOperationEnum;var IfcWindowTypeEnum=/*#__PURE__*/_createClass(function IfcWindowTypeEnum(){_classCallCheck(this,IfcWindowTypeEnum);});IfcWindowTypeEnum.LIGHTDOME={type:3,value:"LIGHTDOME"};IfcWindowTypeEnum.SKYLIGHT={type:3,value:"SKYLIGHT"};IfcWindowTypeEnum.WINDOW={type:3,value:"WINDOW"};IfcWindowTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWindowTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWindowTypeEnum=IfcWindowTypeEnum;var IfcWindowTypePartitioningEnum=/*#__PURE__*/_createClass(function IfcWindowTypePartitioningEnum(){_classCallCheck(this,IfcWindowTypePartitioningEnum);});IfcWindowTypePartitioningEnum.DOUBLE_PANEL_HORIZONTAL={type:3,value:"DOUBLE_PANEL_HORIZONTAL"};IfcWindowTypePartitioningEnum.DOUBLE_PANEL_VERTICAL={type:3,value:"DOUBLE_PANEL_VERTICAL"};IfcWindowTypePartitioningEnum.SINGLE_PANEL={type:3,value:"SINGLE_PANEL"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_BOTTOM={type:3,value:"TRIPLE_PANEL_BOTTOM"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_HORIZONTAL={type:3,value:"TRIPLE_PANEL_HORIZONTAL"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_LEFT={type:3,value:"TRIPLE_PANEL_LEFT"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_RIGHT={type:3,value:"TRIPLE_PANEL_RIGHT"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_TOP={type:3,value:"TRIPLE_PANEL_TOP"};IfcWindowTypePartitioningEnum.TRIPLE_PANEL_VERTICAL={type:3,value:"TRIPLE_PANEL_VERTICAL"};IfcWindowTypePartitioningEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWindowTypePartitioningEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWindowTypePartitioningEnum=IfcWindowTypePartitioningEnum;var IfcWorkCalendarTypeEnum=/*#__PURE__*/_createClass(function IfcWorkCalendarTypeEnum(){_classCallCheck(this,IfcWorkCalendarTypeEnum);});IfcWorkCalendarTypeEnum.FIRSTSHIFT={type:3,value:"FIRSTSHIFT"};IfcWorkCalendarTypeEnum.SECONDSHIFT={type:3,value:"SECONDSHIFT"};IfcWorkCalendarTypeEnum.THIRDSHIFT={type:3,value:"THIRDSHIFT"};IfcWorkCalendarTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWorkCalendarTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWorkCalendarTypeEnum=IfcWorkCalendarTypeEnum;var IfcWorkPlanTypeEnum=/*#__PURE__*/_createClass(function IfcWorkPlanTypeEnum(){_classCallCheck(this,IfcWorkPlanTypeEnum);});IfcWorkPlanTypeEnum.ACTUAL={type:3,value:"ACTUAL"};IfcWorkPlanTypeEnum.BASELINE={type:3,value:"BASELINE"};IfcWorkPlanTypeEnum.PLANNED={type:3,value:"PLANNED"};IfcWorkPlanTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWorkPlanTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWorkPlanTypeEnum=IfcWorkPlanTypeEnum;var IfcWorkScheduleTypeEnum=/*#__PURE__*/_createClass(function IfcWorkScheduleTypeEnum(){_classCallCheck(this,IfcWorkScheduleTypeEnum);});IfcWorkScheduleTypeEnum.ACTUAL={type:3,value:"ACTUAL"};IfcWorkScheduleTypeEnum.BASELINE={type:3,value:"BASELINE"};IfcWorkScheduleTypeEnum.PLANNED={type:3,value:"PLANNED"};IfcWorkScheduleTypeEnum.USERDEFINED={type:3,value:"USERDEFINED"};IfcWorkScheduleTypeEnum.NOTDEFINED={type:3,value:"NOTDEFINED"};IFC4X32.IfcWorkScheduleTypeEnum=IfcWorkScheduleTypeEnum;var IfcActorRole=/*#__PURE__*/function(_IfcLineObject161){_inherits(IfcActorRole,_IfcLineObject161);var _super1589=_createSuper(IfcActorRole);function IfcActorRole(expressID,Role,UserDefinedRole,Description){var _this1586;_classCallCheck(this,IfcActorRole);_this1586=_super1589.call(this,expressID);_this1586.Role=Role;_this1586.UserDefinedRole=UserDefinedRole;_this1586.Description=Description;_this1586.type=3630933823;return _this1586;}return _createClass(IfcActorRole);}(IfcLineObject);IFC4X32.IfcActorRole=IfcActorRole;var IfcAddress=/*#__PURE__*/function(_IfcLineObject162){_inherits(IfcAddress,_IfcLineObject162);var _super1590=_createSuper(IfcAddress);function IfcAddress(expressID,Purpose,Description,UserDefinedPurpose){var _this1587;_classCallCheck(this,IfcAddress);_this1587=_super1590.call(this,expressID);_this1587.Purpose=Purpose;_this1587.Description=Description;_this1587.UserDefinedPurpose=UserDefinedPurpose;_this1587.type=618182010;return _this1587;}return _createClass(IfcAddress);}(IfcLineObject);IFC4X32.IfcAddress=IfcAddress;var IfcAlignmentParameterSegment=/*#__PURE__*/function(_IfcLineObject163){_inherits(IfcAlignmentParameterSegment,_IfcLineObject163);var _super1591=_createSuper(IfcAlignmentParameterSegment);function IfcAlignmentParameterSegment(expressID,StartTag,EndTag){var _this1588;_classCallCheck(this,IfcAlignmentParameterSegment);_this1588=_super1591.call(this,expressID);_this1588.StartTag=StartTag;_this1588.EndTag=EndTag;_this1588.type=2879124712;return _this1588;}return _createClass(IfcAlignmentParameterSegment);}(IfcLineObject);IFC4X32.IfcAlignmentParameterSegment=IfcAlignmentParameterSegment;var IfcAlignmentVerticalSegment=/*#__PURE__*/function(_IfcAlignmentParamete){_inherits(IfcAlignmentVerticalSegment,_IfcAlignmentParamete);var _super1592=_createSuper(IfcAlignmentVerticalSegment);function IfcAlignmentVerticalSegment(expressID,StartTag,EndTag,StartDistAlong,HorizontalLength,StartHeight,StartGradient,EndGradient,RadiusOfCurvature,PredefinedType){var _this1589;_classCallCheck(this,IfcAlignmentVerticalSegment);_this1589=_super1592.call(this,expressID,StartTag,EndTag);_this1589.StartTag=StartTag;_this1589.EndTag=EndTag;_this1589.StartDistAlong=StartDistAlong;_this1589.HorizontalLength=HorizontalLength;_this1589.StartHeight=StartHeight;_this1589.StartGradient=StartGradient;_this1589.EndGradient=EndGradient;_this1589.RadiusOfCurvature=RadiusOfCurvature;_this1589.PredefinedType=PredefinedType;_this1589.type=3633395639;return _this1589;}return _createClass(IfcAlignmentVerticalSegment);}(IfcAlignmentParameterSegment);IFC4X32.IfcAlignmentVerticalSegment=IfcAlignmentVerticalSegment;var IfcApplication=/*#__PURE__*/function(_IfcLineObject164){_inherits(IfcApplication,_IfcLineObject164);var _super1593=_createSuper(IfcApplication);function IfcApplication(expressID,ApplicationDeveloper,Version,ApplicationFullName,ApplicationIdentifier){var _this1590;_classCallCheck(this,IfcApplication);_this1590=_super1593.call(this,expressID);_this1590.ApplicationDeveloper=ApplicationDeveloper;_this1590.Version=Version;_this1590.ApplicationFullName=ApplicationFullName;_this1590.ApplicationIdentifier=ApplicationIdentifier;_this1590.type=639542469;return _this1590;}return _createClass(IfcApplication);}(IfcLineObject);IFC4X32.IfcApplication=IfcApplication;var IfcAppliedValue=/*#__PURE__*/function(_IfcLineObject165){_inherits(IfcAppliedValue,_IfcLineObject165);var _super1594=_createSuper(IfcAppliedValue);function IfcAppliedValue(expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,Category,Condition,ArithmeticOperator,Components){var _this1591;_classCallCheck(this,IfcAppliedValue);_this1591=_super1594.call(this,expressID);_this1591.Name=Name;_this1591.Description=Description;_this1591.AppliedValue=AppliedValue;_this1591.UnitBasis=UnitBasis;_this1591.ApplicableDate=ApplicableDate;_this1591.FixedUntilDate=FixedUntilDate;_this1591.Category=Category;_this1591.Condition=Condition;_this1591.ArithmeticOperator=ArithmeticOperator;_this1591.Components=Components;_this1591.type=411424972;return _this1591;}return _createClass(IfcAppliedValue);}(IfcLineObject);IFC4X32.IfcAppliedValue=IfcAppliedValue;var IfcApproval=/*#__PURE__*/function(_IfcLineObject166){_inherits(IfcApproval,_IfcLineObject166);var _super1595=_createSuper(IfcApproval);function IfcApproval(expressID,Identifier,Name,Description,TimeOfApproval,Status,Level,Qualifier,RequestingApproval,GivingApproval){var _this1592;_classCallCheck(this,IfcApproval);_this1592=_super1595.call(this,expressID);_this1592.Identifier=Identifier;_this1592.Name=Name;_this1592.Description=Description;_this1592.TimeOfApproval=TimeOfApproval;_this1592.Status=Status;_this1592.Level=Level;_this1592.Qualifier=Qualifier;_this1592.RequestingApproval=RequestingApproval;_this1592.GivingApproval=GivingApproval;_this1592.type=130549933;return _this1592;}return _createClass(IfcApproval);}(IfcLineObject);IFC4X32.IfcApproval=IfcApproval;var IfcBoundaryCondition=/*#__PURE__*/function(_IfcLineObject167){_inherits(IfcBoundaryCondition,_IfcLineObject167);var _super1596=_createSuper(IfcBoundaryCondition);function IfcBoundaryCondition(expressID,Name){var _this1593;_classCallCheck(this,IfcBoundaryCondition);_this1593=_super1596.call(this,expressID);_this1593.Name=Name;_this1593.type=4037036970;return _this1593;}return _createClass(IfcBoundaryCondition);}(IfcLineObject);IFC4X32.IfcBoundaryCondition=IfcBoundaryCondition;var IfcBoundaryEdgeCondition=/*#__PURE__*/function(_IfcBoundaryCondition7){_inherits(IfcBoundaryEdgeCondition,_IfcBoundaryCondition7);var _super1597=_createSuper(IfcBoundaryEdgeCondition);function IfcBoundaryEdgeCondition(expressID,Name,TranslationalStiffnessByLengthX,TranslationalStiffnessByLengthY,TranslationalStiffnessByLengthZ,RotationalStiffnessByLengthX,RotationalStiffnessByLengthY,RotationalStiffnessByLengthZ){var _this1594;_classCallCheck(this,IfcBoundaryEdgeCondition);_this1594=_super1597.call(this,expressID,Name);_this1594.Name=Name;_this1594.TranslationalStiffnessByLengthX=TranslationalStiffnessByLengthX;_this1594.TranslationalStiffnessByLengthY=TranslationalStiffnessByLengthY;_this1594.TranslationalStiffnessByLengthZ=TranslationalStiffnessByLengthZ;_this1594.RotationalStiffnessByLengthX=RotationalStiffnessByLengthX;_this1594.RotationalStiffnessByLengthY=RotationalStiffnessByLengthY;_this1594.RotationalStiffnessByLengthZ=RotationalStiffnessByLengthZ;_this1594.type=1560379544;return _this1594;}return _createClass(IfcBoundaryEdgeCondition);}(IfcBoundaryCondition);IFC4X32.IfcBoundaryEdgeCondition=IfcBoundaryEdgeCondition;var IfcBoundaryFaceCondition=/*#__PURE__*/function(_IfcBoundaryCondition8){_inherits(IfcBoundaryFaceCondition,_IfcBoundaryCondition8);var _super1598=_createSuper(IfcBoundaryFaceCondition);function IfcBoundaryFaceCondition(expressID,Name,TranslationalStiffnessByAreaX,TranslationalStiffnessByAreaY,TranslationalStiffnessByAreaZ){var _this1595;_classCallCheck(this,IfcBoundaryFaceCondition);_this1595=_super1598.call(this,expressID,Name);_this1595.Name=Name;_this1595.TranslationalStiffnessByAreaX=TranslationalStiffnessByAreaX;_this1595.TranslationalStiffnessByAreaY=TranslationalStiffnessByAreaY;_this1595.TranslationalStiffnessByAreaZ=TranslationalStiffnessByAreaZ;_this1595.type=3367102660;return _this1595;}return _createClass(IfcBoundaryFaceCondition);}(IfcBoundaryCondition);IFC4X32.IfcBoundaryFaceCondition=IfcBoundaryFaceCondition;var IfcBoundaryNodeCondition=/*#__PURE__*/function(_IfcBoundaryCondition9){_inherits(IfcBoundaryNodeCondition,_IfcBoundaryCondition9);var _super1599=_createSuper(IfcBoundaryNodeCondition);function IfcBoundaryNodeCondition(expressID,Name,TranslationalStiffnessX,TranslationalStiffnessY,TranslationalStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ){var _this1596;_classCallCheck(this,IfcBoundaryNodeCondition);_this1596=_super1599.call(this,expressID,Name);_this1596.Name=Name;_this1596.TranslationalStiffnessX=TranslationalStiffnessX;_this1596.TranslationalStiffnessY=TranslationalStiffnessY;_this1596.TranslationalStiffnessZ=TranslationalStiffnessZ;_this1596.RotationalStiffnessX=RotationalStiffnessX;_this1596.RotationalStiffnessY=RotationalStiffnessY;_this1596.RotationalStiffnessZ=RotationalStiffnessZ;_this1596.type=1387855156;return _this1596;}return _createClass(IfcBoundaryNodeCondition);}(IfcBoundaryCondition);IFC4X32.IfcBoundaryNodeCondition=IfcBoundaryNodeCondition;var IfcBoundaryNodeConditionWarping=/*#__PURE__*/function(_IfcBoundaryNodeCondi3){_inherits(IfcBoundaryNodeConditionWarping,_IfcBoundaryNodeCondi3);var _super1600=_createSuper(IfcBoundaryNodeConditionWarping);function IfcBoundaryNodeConditionWarping(expressID,Name,TranslationalStiffnessX,TranslationalStiffnessY,TranslationalStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ,WarpingStiffness){var _this1597;_classCallCheck(this,IfcBoundaryNodeConditionWarping);_this1597=_super1600.call(this,expressID,Name,TranslationalStiffnessX,TranslationalStiffnessY,TranslationalStiffnessZ,RotationalStiffnessX,RotationalStiffnessY,RotationalStiffnessZ);_this1597.Name=Name;_this1597.TranslationalStiffnessX=TranslationalStiffnessX;_this1597.TranslationalStiffnessY=TranslationalStiffnessY;_this1597.TranslationalStiffnessZ=TranslationalStiffnessZ;_this1597.RotationalStiffnessX=RotationalStiffnessX;_this1597.RotationalStiffnessY=RotationalStiffnessY;_this1597.RotationalStiffnessZ=RotationalStiffnessZ;_this1597.WarpingStiffness=WarpingStiffness;_this1597.type=2069777674;return _this1597;}return _createClass(IfcBoundaryNodeConditionWarping);}(IfcBoundaryNodeCondition);IFC4X32.IfcBoundaryNodeConditionWarping=IfcBoundaryNodeConditionWarping;var IfcConnectionGeometry=/*#__PURE__*/function(_IfcLineObject168){_inherits(IfcConnectionGeometry,_IfcLineObject168);var _super1601=_createSuper(IfcConnectionGeometry);function IfcConnectionGeometry(expressID){var _this1598;_classCallCheck(this,IfcConnectionGeometry);_this1598=_super1601.call(this,expressID);_this1598.type=2859738748;return _this1598;}return _createClass(IfcConnectionGeometry);}(IfcLineObject);IFC4X32.IfcConnectionGeometry=IfcConnectionGeometry;var IfcConnectionPointGeometry=/*#__PURE__*/function(_IfcConnectionGeometr9){_inherits(IfcConnectionPointGeometry,_IfcConnectionGeometr9);var _super1602=_createSuper(IfcConnectionPointGeometry);function IfcConnectionPointGeometry(expressID,PointOnRelatingElement,PointOnRelatedElement){var _this1599;_classCallCheck(this,IfcConnectionPointGeometry);_this1599=_super1602.call(this,expressID);_this1599.PointOnRelatingElement=PointOnRelatingElement;_this1599.PointOnRelatedElement=PointOnRelatedElement;_this1599.type=2614616156;return _this1599;}return _createClass(IfcConnectionPointGeometry);}(IfcConnectionGeometry);IFC4X32.IfcConnectionPointGeometry=IfcConnectionPointGeometry;var IfcConnectionSurfaceGeometry=/*#__PURE__*/function(_IfcConnectionGeometr10){_inherits(IfcConnectionSurfaceGeometry,_IfcConnectionGeometr10);var _super1603=_createSuper(IfcConnectionSurfaceGeometry);function IfcConnectionSurfaceGeometry(expressID,SurfaceOnRelatingElement,SurfaceOnRelatedElement){var _this1600;_classCallCheck(this,IfcConnectionSurfaceGeometry);_this1600=_super1603.call(this,expressID);_this1600.SurfaceOnRelatingElement=SurfaceOnRelatingElement;_this1600.SurfaceOnRelatedElement=SurfaceOnRelatedElement;_this1600.type=2732653382;return _this1600;}return _createClass(IfcConnectionSurfaceGeometry);}(IfcConnectionGeometry);IFC4X32.IfcConnectionSurfaceGeometry=IfcConnectionSurfaceGeometry;var IfcConnectionVolumeGeometry=/*#__PURE__*/function(_IfcConnectionGeometr11){_inherits(IfcConnectionVolumeGeometry,_IfcConnectionGeometr11);var _super1604=_createSuper(IfcConnectionVolumeGeometry);function IfcConnectionVolumeGeometry(expressID,VolumeOnRelatingElement,VolumeOnRelatedElement){var _this1601;_classCallCheck(this,IfcConnectionVolumeGeometry);_this1601=_super1604.call(this,expressID);_this1601.VolumeOnRelatingElement=VolumeOnRelatingElement;_this1601.VolumeOnRelatedElement=VolumeOnRelatedElement;_this1601.type=775493141;return _this1601;}return _createClass(IfcConnectionVolumeGeometry);}(IfcConnectionGeometry);IFC4X32.IfcConnectionVolumeGeometry=IfcConnectionVolumeGeometry;var IfcConstraint=/*#__PURE__*/function(_IfcLineObject169){_inherits(IfcConstraint,_IfcLineObject169);var _super1605=_createSuper(IfcConstraint);function IfcConstraint(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade){var _this1602;_classCallCheck(this,IfcConstraint);_this1602=_super1605.call(this,expressID);_this1602.Name=Name;_this1602.Description=Description;_this1602.ConstraintGrade=ConstraintGrade;_this1602.ConstraintSource=ConstraintSource;_this1602.CreatingActor=CreatingActor;_this1602.CreationTime=CreationTime;_this1602.UserDefinedGrade=UserDefinedGrade;_this1602.type=1959218052;return _this1602;}return _createClass(IfcConstraint);}(IfcLineObject);IFC4X32.IfcConstraint=IfcConstraint;var IfcCoordinateOperation=/*#__PURE__*/function(_IfcLineObject170){_inherits(IfcCoordinateOperation,_IfcLineObject170);var _super1606=_createSuper(IfcCoordinateOperation);function IfcCoordinateOperation(expressID,SourceCRS,TargetCRS){var _this1603;_classCallCheck(this,IfcCoordinateOperation);_this1603=_super1606.call(this,expressID);_this1603.SourceCRS=SourceCRS;_this1603.TargetCRS=TargetCRS;_this1603.type=1785450214;return _this1603;}return _createClass(IfcCoordinateOperation);}(IfcLineObject);IFC4X32.IfcCoordinateOperation=IfcCoordinateOperation;var IfcCoordinateReferenceSystem=/*#__PURE__*/function(_IfcLineObject171){_inherits(IfcCoordinateReferenceSystem,_IfcLineObject171);var _super1607=_createSuper(IfcCoordinateReferenceSystem);function IfcCoordinateReferenceSystem(expressID,Name,Description,GeodeticDatum,VerticalDatum){var _this1604;_classCallCheck(this,IfcCoordinateReferenceSystem);_this1604=_super1607.call(this,expressID);_this1604.Name=Name;_this1604.Description=Description;_this1604.GeodeticDatum=GeodeticDatum;_this1604.VerticalDatum=VerticalDatum;_this1604.type=1466758467;return _this1604;}return _createClass(IfcCoordinateReferenceSystem);}(IfcLineObject);IFC4X32.IfcCoordinateReferenceSystem=IfcCoordinateReferenceSystem;var IfcCostValue=/*#__PURE__*/function(_IfcAppliedValue4){_inherits(IfcCostValue,_IfcAppliedValue4);var _super1608=_createSuper(IfcCostValue);function IfcCostValue(expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,Category,Condition,ArithmeticOperator,Components){var _this1605;_classCallCheck(this,IfcCostValue);_this1605=_super1608.call(this,expressID,Name,Description,AppliedValue,UnitBasis,ApplicableDate,FixedUntilDate,Category,Condition,ArithmeticOperator,Components);_this1605.Name=Name;_this1605.Description=Description;_this1605.AppliedValue=AppliedValue;_this1605.UnitBasis=UnitBasis;_this1605.ApplicableDate=ApplicableDate;_this1605.FixedUntilDate=FixedUntilDate;_this1605.Category=Category;_this1605.Condition=Condition;_this1605.ArithmeticOperator=ArithmeticOperator;_this1605.Components=Components;_this1605.type=602808272;return _this1605;}return _createClass(IfcCostValue);}(IfcAppliedValue);IFC4X32.IfcCostValue=IfcCostValue;var IfcDerivedUnit=/*#__PURE__*/function(_IfcLineObject172){_inherits(IfcDerivedUnit,_IfcLineObject172);var _super1609=_createSuper(IfcDerivedUnit);function IfcDerivedUnit(expressID,Elements,UnitType,UserDefinedType,Name){var _this1606;_classCallCheck(this,IfcDerivedUnit);_this1606=_super1609.call(this,expressID);_this1606.Elements=Elements;_this1606.UnitType=UnitType;_this1606.UserDefinedType=UserDefinedType;_this1606.Name=Name;_this1606.type=1765591967;return _this1606;}return _createClass(IfcDerivedUnit);}(IfcLineObject);IFC4X32.IfcDerivedUnit=IfcDerivedUnit;var IfcDerivedUnitElement=/*#__PURE__*/function(_IfcLineObject173){_inherits(IfcDerivedUnitElement,_IfcLineObject173);var _super1610=_createSuper(IfcDerivedUnitElement);function IfcDerivedUnitElement(expressID,Unit,Exponent){var _this1607;_classCallCheck(this,IfcDerivedUnitElement);_this1607=_super1610.call(this,expressID);_this1607.Unit=Unit;_this1607.Exponent=Exponent;_this1607.type=1045800335;return _this1607;}return _createClass(IfcDerivedUnitElement);}(IfcLineObject);IFC4X32.IfcDerivedUnitElement=IfcDerivedUnitElement;var IfcDimensionalExponents=/*#__PURE__*/function(_IfcLineObject174){_inherits(IfcDimensionalExponents,_IfcLineObject174);var _super1611=_createSuper(IfcDimensionalExponents);function IfcDimensionalExponents(expressID,LengthExponent,MassExponent,TimeExponent,ElectricCurrentExponent,ThermodynamicTemperatureExponent,AmountOfSubstanceExponent,LuminousIntensityExponent){var _this1608;_classCallCheck(this,IfcDimensionalExponents);_this1608=_super1611.call(this,expressID);_this1608.LengthExponent=LengthExponent;_this1608.MassExponent=MassExponent;_this1608.TimeExponent=TimeExponent;_this1608.ElectricCurrentExponent=ElectricCurrentExponent;_this1608.ThermodynamicTemperatureExponent=ThermodynamicTemperatureExponent;_this1608.AmountOfSubstanceExponent=AmountOfSubstanceExponent;_this1608.LuminousIntensityExponent=LuminousIntensityExponent;_this1608.type=2949456006;return _this1608;}return _createClass(IfcDimensionalExponents);}(IfcLineObject);IFC4X32.IfcDimensionalExponents=IfcDimensionalExponents;var IfcExternalInformation=/*#__PURE__*/function(_IfcLineObject175){_inherits(IfcExternalInformation,_IfcLineObject175);var _super1612=_createSuper(IfcExternalInformation);function IfcExternalInformation(expressID){var _this1609;_classCallCheck(this,IfcExternalInformation);_this1609=_super1612.call(this,expressID);_this1609.type=4294318154;return _this1609;}return _createClass(IfcExternalInformation);}(IfcLineObject);IFC4X32.IfcExternalInformation=IfcExternalInformation;var IfcExternalReference=/*#__PURE__*/function(_IfcLineObject176){_inherits(IfcExternalReference,_IfcLineObject176);var _super1613=_createSuper(IfcExternalReference);function IfcExternalReference(expressID,Location,Identification,Name){var _this1610;_classCallCheck(this,IfcExternalReference);_this1610=_super1613.call(this,expressID);_this1610.Location=Location;_this1610.Identification=Identification;_this1610.Name=Name;_this1610.type=3200245327;return _this1610;}return _createClass(IfcExternalReference);}(IfcLineObject);IFC4X32.IfcExternalReference=IfcExternalReference;var IfcExternallyDefinedHatchStyle=/*#__PURE__*/function(_IfcExternalReference14){_inherits(IfcExternallyDefinedHatchStyle,_IfcExternalReference14);var _super1614=_createSuper(IfcExternallyDefinedHatchStyle);function IfcExternallyDefinedHatchStyle(expressID,Location,Identification,Name){var _this1611;_classCallCheck(this,IfcExternallyDefinedHatchStyle);_this1611=_super1614.call(this,expressID,Location,Identification,Name);_this1611.Location=Location;_this1611.Identification=Identification;_this1611.Name=Name;_this1611.type=2242383968;return _this1611;}return _createClass(IfcExternallyDefinedHatchStyle);}(IfcExternalReference);IFC4X32.IfcExternallyDefinedHatchStyle=IfcExternallyDefinedHatchStyle;var IfcExternallyDefinedSurfaceStyle=/*#__PURE__*/function(_IfcExternalReference15){_inherits(IfcExternallyDefinedSurfaceStyle,_IfcExternalReference15);var _super1615=_createSuper(IfcExternallyDefinedSurfaceStyle);function IfcExternallyDefinedSurfaceStyle(expressID,Location,Identification,Name){var _this1612;_classCallCheck(this,IfcExternallyDefinedSurfaceStyle);_this1612=_super1615.call(this,expressID,Location,Identification,Name);_this1612.Location=Location;_this1612.Identification=Identification;_this1612.Name=Name;_this1612.type=1040185647;return _this1612;}return _createClass(IfcExternallyDefinedSurfaceStyle);}(IfcExternalReference);IFC4X32.IfcExternallyDefinedSurfaceStyle=IfcExternallyDefinedSurfaceStyle;var IfcExternallyDefinedTextFont=/*#__PURE__*/function(_IfcExternalReference16){_inherits(IfcExternallyDefinedTextFont,_IfcExternalReference16);var _super1616=_createSuper(IfcExternallyDefinedTextFont);function IfcExternallyDefinedTextFont(expressID,Location,Identification,Name){var _this1613;_classCallCheck(this,IfcExternallyDefinedTextFont);_this1613=_super1616.call(this,expressID,Location,Identification,Name);_this1613.Location=Location;_this1613.Identification=Identification;_this1613.Name=Name;_this1613.type=3548104201;return _this1613;}return _createClass(IfcExternallyDefinedTextFont);}(IfcExternalReference);IFC4X32.IfcExternallyDefinedTextFont=IfcExternallyDefinedTextFont;var IfcGridAxis=/*#__PURE__*/function(_IfcLineObject177){_inherits(IfcGridAxis,_IfcLineObject177);var _super1617=_createSuper(IfcGridAxis);function IfcGridAxis(expressID,AxisTag,AxisCurve,SameSense){var _this1614;_classCallCheck(this,IfcGridAxis);_this1614=_super1617.call(this,expressID);_this1614.AxisTag=AxisTag;_this1614.AxisCurve=AxisCurve;_this1614.SameSense=SameSense;_this1614.type=852622518;return _this1614;}return _createClass(IfcGridAxis);}(IfcLineObject);IFC4X32.IfcGridAxis=IfcGridAxis;var IfcIrregularTimeSeriesValue=/*#__PURE__*/function(_IfcLineObject178){_inherits(IfcIrregularTimeSeriesValue,_IfcLineObject178);var _super1618=_createSuper(IfcIrregularTimeSeriesValue);function IfcIrregularTimeSeriesValue(expressID,TimeStamp,ListValues){var _this1615;_classCallCheck(this,IfcIrregularTimeSeriesValue);_this1615=_super1618.call(this,expressID);_this1615.TimeStamp=TimeStamp;_this1615.ListValues=ListValues;_this1615.type=3020489413;return _this1615;}return _createClass(IfcIrregularTimeSeriesValue);}(IfcLineObject);IFC4X32.IfcIrregularTimeSeriesValue=IfcIrregularTimeSeriesValue;var IfcLibraryInformation=/*#__PURE__*/function(_IfcExternalInformati4){_inherits(IfcLibraryInformation,_IfcExternalInformati4);var _super1619=_createSuper(IfcLibraryInformation);function IfcLibraryInformation(expressID,Name,Version,Publisher,VersionDate,Location,Description){var _this1616;_classCallCheck(this,IfcLibraryInformation);_this1616=_super1619.call(this,expressID);_this1616.Name=Name;_this1616.Version=Version;_this1616.Publisher=Publisher;_this1616.VersionDate=VersionDate;_this1616.Location=Location;_this1616.Description=Description;_this1616.type=2655187982;return _this1616;}return _createClass(IfcLibraryInformation);}(IfcExternalInformation);IFC4X32.IfcLibraryInformation=IfcLibraryInformation;var IfcLibraryReference=/*#__PURE__*/function(_IfcExternalReference17){_inherits(IfcLibraryReference,_IfcExternalReference17);var _super1620=_createSuper(IfcLibraryReference);function IfcLibraryReference(expressID,Location,Identification,Name,Description,Language,ReferencedLibrary){var _this1617;_classCallCheck(this,IfcLibraryReference);_this1617=_super1620.call(this,expressID,Location,Identification,Name);_this1617.Location=Location;_this1617.Identification=Identification;_this1617.Name=Name;_this1617.Description=Description;_this1617.Language=Language;_this1617.ReferencedLibrary=ReferencedLibrary;_this1617.type=3452421091;return _this1617;}return _createClass(IfcLibraryReference);}(IfcExternalReference);IFC4X32.IfcLibraryReference=IfcLibraryReference;var IfcLightDistributionData=/*#__PURE__*/function(_IfcLineObject179){_inherits(IfcLightDistributionData,_IfcLineObject179);var _super1621=_createSuper(IfcLightDistributionData);function IfcLightDistributionData(expressID,MainPlaneAngle,SecondaryPlaneAngle,LuminousIntensity){var _this1618;_classCallCheck(this,IfcLightDistributionData);_this1618=_super1621.call(this,expressID);_this1618.MainPlaneAngle=MainPlaneAngle;_this1618.SecondaryPlaneAngle=SecondaryPlaneAngle;_this1618.LuminousIntensity=LuminousIntensity;_this1618.type=4162380809;return _this1618;}return _createClass(IfcLightDistributionData);}(IfcLineObject);IFC4X32.IfcLightDistributionData=IfcLightDistributionData;var IfcLightIntensityDistribution=/*#__PURE__*/function(_IfcLineObject180){_inherits(IfcLightIntensityDistribution,_IfcLineObject180);var _super1622=_createSuper(IfcLightIntensityDistribution);function IfcLightIntensityDistribution(expressID,LightDistributionCurve,DistributionData){var _this1619;_classCallCheck(this,IfcLightIntensityDistribution);_this1619=_super1622.call(this,expressID);_this1619.LightDistributionCurve=LightDistributionCurve;_this1619.DistributionData=DistributionData;_this1619.type=1566485204;return _this1619;}return _createClass(IfcLightIntensityDistribution);}(IfcLineObject);IFC4X32.IfcLightIntensityDistribution=IfcLightIntensityDistribution;var IfcMapConversion=/*#__PURE__*/function(_IfcCoordinateOperati2){_inherits(IfcMapConversion,_IfcCoordinateOperati2);var _super1623=_createSuper(IfcMapConversion);function IfcMapConversion(expressID,SourceCRS,TargetCRS,Eastings,Northings,OrthogonalHeight,XAxisAbscissa,XAxisOrdinate,Scale,ScaleY,ScaleZ){var _this1620;_classCallCheck(this,IfcMapConversion);_this1620=_super1623.call(this,expressID,SourceCRS,TargetCRS);_this1620.SourceCRS=SourceCRS;_this1620.TargetCRS=TargetCRS;_this1620.Eastings=Eastings;_this1620.Northings=Northings;_this1620.OrthogonalHeight=OrthogonalHeight;_this1620.XAxisAbscissa=XAxisAbscissa;_this1620.XAxisOrdinate=XAxisOrdinate;_this1620.Scale=Scale;_this1620.ScaleY=ScaleY;_this1620.ScaleZ=ScaleZ;_this1620.type=3057273783;return _this1620;}return _createClass(IfcMapConversion);}(IfcCoordinateOperation);IFC4X32.IfcMapConversion=IfcMapConversion;var IfcMaterialClassificationRelationship=/*#__PURE__*/function(_IfcLineObject181){_inherits(IfcMaterialClassificationRelationship,_IfcLineObject181);var _super1624=_createSuper(IfcMaterialClassificationRelationship);function IfcMaterialClassificationRelationship(expressID,MaterialClassifications,ClassifiedMaterial){var _this1621;_classCallCheck(this,IfcMaterialClassificationRelationship);_this1621=_super1624.call(this,expressID);_this1621.MaterialClassifications=MaterialClassifications;_this1621.ClassifiedMaterial=ClassifiedMaterial;_this1621.type=1847130766;return _this1621;}return _createClass(IfcMaterialClassificationRelationship);}(IfcLineObject);IFC4X32.IfcMaterialClassificationRelationship=IfcMaterialClassificationRelationship;var IfcMaterialDefinition=/*#__PURE__*/function(_IfcLineObject182){_inherits(IfcMaterialDefinition,_IfcLineObject182);var _super1625=_createSuper(IfcMaterialDefinition);function IfcMaterialDefinition(expressID){var _this1622;_classCallCheck(this,IfcMaterialDefinition);_this1622=_super1625.call(this,expressID);_this1622.type=760658860;return _this1622;}return _createClass(IfcMaterialDefinition);}(IfcLineObject);IFC4X32.IfcMaterialDefinition=IfcMaterialDefinition;var IfcMaterialLayer=/*#__PURE__*/function(_IfcMaterialDefinitio8){_inherits(IfcMaterialLayer,_IfcMaterialDefinitio8);var _super1626=_createSuper(IfcMaterialLayer);function IfcMaterialLayer(expressID,Material,LayerThickness,IsVentilated,Name,Description,Category,Priority){var _this1623;_classCallCheck(this,IfcMaterialLayer);_this1623=_super1626.call(this,expressID);_this1623.Material=Material;_this1623.LayerThickness=LayerThickness;_this1623.IsVentilated=IsVentilated;_this1623.Name=Name;_this1623.Description=Description;_this1623.Category=Category;_this1623.Priority=Priority;_this1623.type=248100487;return _this1623;}return _createClass(IfcMaterialLayer);}(IfcMaterialDefinition);IFC4X32.IfcMaterialLayer=IfcMaterialLayer;var IfcMaterialLayerSet=/*#__PURE__*/function(_IfcMaterialDefinitio9){_inherits(IfcMaterialLayerSet,_IfcMaterialDefinitio9);var _super1627=_createSuper(IfcMaterialLayerSet);function IfcMaterialLayerSet(expressID,MaterialLayers,LayerSetName,Description){var _this1624;_classCallCheck(this,IfcMaterialLayerSet);_this1624=_super1627.call(this,expressID);_this1624.MaterialLayers=MaterialLayers;_this1624.LayerSetName=LayerSetName;_this1624.Description=Description;_this1624.type=3303938423;return _this1624;}return _createClass(IfcMaterialLayerSet);}(IfcMaterialDefinition);IFC4X32.IfcMaterialLayerSet=IfcMaterialLayerSet;var IfcMaterialLayerWithOffsets=/*#__PURE__*/function(_IfcMaterialLayer2){_inherits(IfcMaterialLayerWithOffsets,_IfcMaterialLayer2);var _super1628=_createSuper(IfcMaterialLayerWithOffsets);function IfcMaterialLayerWithOffsets(expressID,Material,LayerThickness,IsVentilated,Name,Description,Category,Priority,OffsetDirection,OffsetValues){var _this1625;_classCallCheck(this,IfcMaterialLayerWithOffsets);_this1625=_super1628.call(this,expressID,Material,LayerThickness,IsVentilated,Name,Description,Category,Priority);_this1625.Material=Material;_this1625.LayerThickness=LayerThickness;_this1625.IsVentilated=IsVentilated;_this1625.Name=Name;_this1625.Description=Description;_this1625.Category=Category;_this1625.Priority=Priority;_this1625.OffsetDirection=OffsetDirection;_this1625.OffsetValues=OffsetValues;_this1625.type=1847252529;return _this1625;}return _createClass(IfcMaterialLayerWithOffsets);}(IfcMaterialLayer);IFC4X32.IfcMaterialLayerWithOffsets=IfcMaterialLayerWithOffsets;var IfcMaterialList=/*#__PURE__*/function(_IfcLineObject183){_inherits(IfcMaterialList,_IfcLineObject183);var _super1629=_createSuper(IfcMaterialList);function IfcMaterialList(expressID,Materials){var _this1626;_classCallCheck(this,IfcMaterialList);_this1626=_super1629.call(this,expressID);_this1626.Materials=Materials;_this1626.type=2199411900;return _this1626;}return _createClass(IfcMaterialList);}(IfcLineObject);IFC4X32.IfcMaterialList=IfcMaterialList;var IfcMaterialProfile=/*#__PURE__*/function(_IfcMaterialDefinitio10){_inherits(IfcMaterialProfile,_IfcMaterialDefinitio10);var _super1630=_createSuper(IfcMaterialProfile);function IfcMaterialProfile(expressID,Name,Description,Material,Profile,Priority,Category){var _this1627;_classCallCheck(this,IfcMaterialProfile);_this1627=_super1630.call(this,expressID);_this1627.Name=Name;_this1627.Description=Description;_this1627.Material=Material;_this1627.Profile=Profile;_this1627.Priority=Priority;_this1627.Category=Category;_this1627.type=2235152071;return _this1627;}return _createClass(IfcMaterialProfile);}(IfcMaterialDefinition);IFC4X32.IfcMaterialProfile=IfcMaterialProfile;var IfcMaterialProfileSet=/*#__PURE__*/function(_IfcMaterialDefinitio11){_inherits(IfcMaterialProfileSet,_IfcMaterialDefinitio11);var _super1631=_createSuper(IfcMaterialProfileSet);function IfcMaterialProfileSet(expressID,Name,Description,MaterialProfiles,CompositeProfile){var _this1628;_classCallCheck(this,IfcMaterialProfileSet);_this1628=_super1631.call(this,expressID);_this1628.Name=Name;_this1628.Description=Description;_this1628.MaterialProfiles=MaterialProfiles;_this1628.CompositeProfile=CompositeProfile;_this1628.type=164193824;return _this1628;}return _createClass(IfcMaterialProfileSet);}(IfcMaterialDefinition);IFC4X32.IfcMaterialProfileSet=IfcMaterialProfileSet;var IfcMaterialProfileWithOffsets=/*#__PURE__*/function(_IfcMaterialProfile2){_inherits(IfcMaterialProfileWithOffsets,_IfcMaterialProfile2);var _super1632=_createSuper(IfcMaterialProfileWithOffsets);function IfcMaterialProfileWithOffsets(expressID,Name,Description,Material,Profile,Priority,Category,OffsetValues){var _this1629;_classCallCheck(this,IfcMaterialProfileWithOffsets);_this1629=_super1632.call(this,expressID,Name,Description,Material,Profile,Priority,Category);_this1629.Name=Name;_this1629.Description=Description;_this1629.Material=Material;_this1629.Profile=Profile;_this1629.Priority=Priority;_this1629.Category=Category;_this1629.OffsetValues=OffsetValues;_this1629.type=552965576;return _this1629;}return _createClass(IfcMaterialProfileWithOffsets);}(IfcMaterialProfile);IFC4X32.IfcMaterialProfileWithOffsets=IfcMaterialProfileWithOffsets;var IfcMaterialUsageDefinition=/*#__PURE__*/function(_IfcLineObject184){_inherits(IfcMaterialUsageDefinition,_IfcLineObject184);var _super1633=_createSuper(IfcMaterialUsageDefinition);function IfcMaterialUsageDefinition(expressID){var _this1630;_classCallCheck(this,IfcMaterialUsageDefinition);_this1630=_super1633.call(this,expressID);_this1630.type=1507914824;return _this1630;}return _createClass(IfcMaterialUsageDefinition);}(IfcLineObject);IFC4X32.IfcMaterialUsageDefinition=IfcMaterialUsageDefinition;var IfcMeasureWithUnit=/*#__PURE__*/function(_IfcLineObject185){_inherits(IfcMeasureWithUnit,_IfcLineObject185);var _super1634=_createSuper(IfcMeasureWithUnit);function IfcMeasureWithUnit(expressID,ValueComponent,UnitComponent){var _this1631;_classCallCheck(this,IfcMeasureWithUnit);_this1631=_super1634.call(this,expressID);_this1631.ValueComponent=ValueComponent;_this1631.UnitComponent=UnitComponent;_this1631.type=2597039031;return _this1631;}return _createClass(IfcMeasureWithUnit);}(IfcLineObject);IFC4X32.IfcMeasureWithUnit=IfcMeasureWithUnit;var IfcMetric=/*#__PURE__*/function(_IfcConstraint5){_inherits(IfcMetric,_IfcConstraint5);var _super1635=_createSuper(IfcMetric);function IfcMetric(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade,Benchmark,ValueSource,DataValue,ReferencePath){var _this1632;_classCallCheck(this,IfcMetric);_this1632=_super1635.call(this,expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade);_this1632.Name=Name;_this1632.Description=Description;_this1632.ConstraintGrade=ConstraintGrade;_this1632.ConstraintSource=ConstraintSource;_this1632.CreatingActor=CreatingActor;_this1632.CreationTime=CreationTime;_this1632.UserDefinedGrade=UserDefinedGrade;_this1632.Benchmark=Benchmark;_this1632.ValueSource=ValueSource;_this1632.DataValue=DataValue;_this1632.ReferencePath=ReferencePath;_this1632.type=3368373690;return _this1632;}return _createClass(IfcMetric);}(IfcConstraint);IFC4X32.IfcMetric=IfcMetric;var IfcMonetaryUnit=/*#__PURE__*/function(_IfcLineObject186){_inherits(IfcMonetaryUnit,_IfcLineObject186);var _super1636=_createSuper(IfcMonetaryUnit);function IfcMonetaryUnit(expressID,Currency){var _this1633;_classCallCheck(this,IfcMonetaryUnit);_this1633=_super1636.call(this,expressID);_this1633.Currency=Currency;_this1633.type=2706619895;return _this1633;}return _createClass(IfcMonetaryUnit);}(IfcLineObject);IFC4X32.IfcMonetaryUnit=IfcMonetaryUnit;var IfcNamedUnit=/*#__PURE__*/function(_IfcLineObject187){_inherits(IfcNamedUnit,_IfcLineObject187);var _super1637=_createSuper(IfcNamedUnit);function IfcNamedUnit(expressID,Dimensions,UnitType){var _this1634;_classCallCheck(this,IfcNamedUnit);_this1634=_super1637.call(this,expressID);_this1634.Dimensions=Dimensions;_this1634.UnitType=UnitType;_this1634.type=1918398963;return _this1634;}return _createClass(IfcNamedUnit);}(IfcLineObject);IFC4X32.IfcNamedUnit=IfcNamedUnit;var IfcObjectPlacement=/*#__PURE__*/function(_IfcLineObject188){_inherits(IfcObjectPlacement,_IfcLineObject188);var _super1638=_createSuper(IfcObjectPlacement);function IfcObjectPlacement(expressID,PlacementRelTo){var _this1635;_classCallCheck(this,IfcObjectPlacement);_this1635=_super1638.call(this,expressID);_this1635.PlacementRelTo=PlacementRelTo;_this1635.type=3701648758;return _this1635;}return _createClass(IfcObjectPlacement);}(IfcLineObject);IFC4X32.IfcObjectPlacement=IfcObjectPlacement;var IfcObjective=/*#__PURE__*/function(_IfcConstraint6){_inherits(IfcObjective,_IfcConstraint6);var _super1639=_createSuper(IfcObjective);function IfcObjective(expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade,BenchmarkValues,LogicalAggregator,ObjectiveQualifier,UserDefinedQualifier){var _this1636;_classCallCheck(this,IfcObjective);_this1636=_super1639.call(this,expressID,Name,Description,ConstraintGrade,ConstraintSource,CreatingActor,CreationTime,UserDefinedGrade);_this1636.Name=Name;_this1636.Description=Description;_this1636.ConstraintGrade=ConstraintGrade;_this1636.ConstraintSource=ConstraintSource;_this1636.CreatingActor=CreatingActor;_this1636.CreationTime=CreationTime;_this1636.UserDefinedGrade=UserDefinedGrade;_this1636.BenchmarkValues=BenchmarkValues;_this1636.LogicalAggregator=LogicalAggregator;_this1636.ObjectiveQualifier=ObjectiveQualifier;_this1636.UserDefinedQualifier=UserDefinedQualifier;_this1636.type=2251480897;return _this1636;}return _createClass(IfcObjective);}(IfcConstraint);IFC4X32.IfcObjective=IfcObjective;var IfcOrganization=/*#__PURE__*/function(_IfcLineObject189){_inherits(IfcOrganization,_IfcLineObject189);var _super1640=_createSuper(IfcOrganization);function IfcOrganization(expressID,Identification,Name,Description,Roles,Addresses){var _this1637;_classCallCheck(this,IfcOrganization);_this1637=_super1640.call(this,expressID);_this1637.Identification=Identification;_this1637.Name=Name;_this1637.Description=Description;_this1637.Roles=Roles;_this1637.Addresses=Addresses;_this1637.type=4251960020;return _this1637;}return _createClass(IfcOrganization);}(IfcLineObject);IFC4X32.IfcOrganization=IfcOrganization;var IfcOwnerHistory=/*#__PURE__*/function(_IfcLineObject190){_inherits(IfcOwnerHistory,_IfcLineObject190);var _super1641=_createSuper(IfcOwnerHistory);function IfcOwnerHistory(expressID,OwningUser,OwningApplication,State,ChangeAction,LastModifiedDate,LastModifyingUser,LastModifyingApplication,CreationDate){var _this1638;_classCallCheck(this,IfcOwnerHistory);_this1638=_super1641.call(this,expressID);_this1638.OwningUser=OwningUser;_this1638.OwningApplication=OwningApplication;_this1638.State=State;_this1638.ChangeAction=ChangeAction;_this1638.LastModifiedDate=LastModifiedDate;_this1638.LastModifyingUser=LastModifyingUser;_this1638.LastModifyingApplication=LastModifyingApplication;_this1638.CreationDate=CreationDate;_this1638.type=1207048766;return _this1638;}return _createClass(IfcOwnerHistory);}(IfcLineObject);IFC4X32.IfcOwnerHistory=IfcOwnerHistory;var IfcPerson=/*#__PURE__*/function(_IfcLineObject191){_inherits(IfcPerson,_IfcLineObject191);var _super1642=_createSuper(IfcPerson);function IfcPerson(expressID,Identification,FamilyName,GivenName,MiddleNames,PrefixTitles,SuffixTitles,Roles,Addresses){var _this1639;_classCallCheck(this,IfcPerson);_this1639=_super1642.call(this,expressID);_this1639.Identification=Identification;_this1639.FamilyName=FamilyName;_this1639.GivenName=GivenName;_this1639.MiddleNames=MiddleNames;_this1639.PrefixTitles=PrefixTitles;_this1639.SuffixTitles=SuffixTitles;_this1639.Roles=Roles;_this1639.Addresses=Addresses;_this1639.type=2077209135;return _this1639;}return _createClass(IfcPerson);}(IfcLineObject);IFC4X32.IfcPerson=IfcPerson;var IfcPersonAndOrganization=/*#__PURE__*/function(_IfcLineObject192){_inherits(IfcPersonAndOrganization,_IfcLineObject192);var _super1643=_createSuper(IfcPersonAndOrganization);function IfcPersonAndOrganization(expressID,ThePerson,TheOrganization,Roles){var _this1640;_classCallCheck(this,IfcPersonAndOrganization);_this1640=_super1643.call(this,expressID);_this1640.ThePerson=ThePerson;_this1640.TheOrganization=TheOrganization;_this1640.Roles=Roles;_this1640.type=101040310;return _this1640;}return _createClass(IfcPersonAndOrganization);}(IfcLineObject);IFC4X32.IfcPersonAndOrganization=IfcPersonAndOrganization;var IfcPhysicalQuantity=/*#__PURE__*/function(_IfcLineObject193){_inherits(IfcPhysicalQuantity,_IfcLineObject193);var _super1644=_createSuper(IfcPhysicalQuantity);function IfcPhysicalQuantity(expressID,Name,Description){var _this1641;_classCallCheck(this,IfcPhysicalQuantity);_this1641=_super1644.call(this,expressID);_this1641.Name=Name;_this1641.Description=Description;_this1641.type=2483315170;return _this1641;}return _createClass(IfcPhysicalQuantity);}(IfcLineObject);IFC4X32.IfcPhysicalQuantity=IfcPhysicalQuantity;var IfcPhysicalSimpleQuantity=/*#__PURE__*/function(_IfcPhysicalQuantity5){_inherits(IfcPhysicalSimpleQuantity,_IfcPhysicalQuantity5);var _super1645=_createSuper(IfcPhysicalSimpleQuantity);function IfcPhysicalSimpleQuantity(expressID,Name,Description,Unit){var _this1642;_classCallCheck(this,IfcPhysicalSimpleQuantity);_this1642=_super1645.call(this,expressID,Name,Description);_this1642.Name=Name;_this1642.Description=Description;_this1642.Unit=Unit;_this1642.type=2226359599;return _this1642;}return _createClass(IfcPhysicalSimpleQuantity);}(IfcPhysicalQuantity);IFC4X32.IfcPhysicalSimpleQuantity=IfcPhysicalSimpleQuantity;var IfcPostalAddress=/*#__PURE__*/function(_IfcAddress5){_inherits(IfcPostalAddress,_IfcAddress5);var _super1646=_createSuper(IfcPostalAddress);function IfcPostalAddress(expressID,Purpose,Description,UserDefinedPurpose,InternalLocation,AddressLines,PostalBox,Town,Region,PostalCode,Country){var _this1643;_classCallCheck(this,IfcPostalAddress);_this1643=_super1646.call(this,expressID,Purpose,Description,UserDefinedPurpose);_this1643.Purpose=Purpose;_this1643.Description=Description;_this1643.UserDefinedPurpose=UserDefinedPurpose;_this1643.InternalLocation=InternalLocation;_this1643.AddressLines=AddressLines;_this1643.PostalBox=PostalBox;_this1643.Town=Town;_this1643.Region=Region;_this1643.PostalCode=PostalCode;_this1643.Country=Country;_this1643.type=3355820592;return _this1643;}return _createClass(IfcPostalAddress);}(IfcAddress);IFC4X32.IfcPostalAddress=IfcPostalAddress;var IfcPresentationItem=/*#__PURE__*/function(_IfcLineObject194){_inherits(IfcPresentationItem,_IfcLineObject194);var _super1647=_createSuper(IfcPresentationItem);function IfcPresentationItem(expressID){var _this1644;_classCallCheck(this,IfcPresentationItem);_this1644=_super1647.call(this,expressID);_this1644.type=677532197;return _this1644;}return _createClass(IfcPresentationItem);}(IfcLineObject);IFC4X32.IfcPresentationItem=IfcPresentationItem;var IfcPresentationLayerAssignment=/*#__PURE__*/function(_IfcLineObject195){_inherits(IfcPresentationLayerAssignment,_IfcLineObject195);var _super1648=_createSuper(IfcPresentationLayerAssignment);function IfcPresentationLayerAssignment(expressID,Name,Description,AssignedItems,Identifier){var _this1645;_classCallCheck(this,IfcPresentationLayerAssignment);_this1645=_super1648.call(this,expressID);_this1645.Name=Name;_this1645.Description=Description;_this1645.AssignedItems=AssignedItems;_this1645.Identifier=Identifier;_this1645.type=2022622350;return _this1645;}return _createClass(IfcPresentationLayerAssignment);}(IfcLineObject);IFC4X32.IfcPresentationLayerAssignment=IfcPresentationLayerAssignment;var IfcPresentationLayerWithStyle=/*#__PURE__*/function(_IfcPresentationLayer3){_inherits(IfcPresentationLayerWithStyle,_IfcPresentationLayer3);var _super1649=_createSuper(IfcPresentationLayerWithStyle);function IfcPresentationLayerWithStyle(expressID,Name,Description,AssignedItems,Identifier,LayerOn,LayerFrozen,LayerBlocked,LayerStyles){var _this1646;_classCallCheck(this,IfcPresentationLayerWithStyle);_this1646=_super1649.call(this,expressID,Name,Description,AssignedItems,Identifier);_this1646.Name=Name;_this1646.Description=Description;_this1646.AssignedItems=AssignedItems;_this1646.Identifier=Identifier;_this1646.LayerOn=LayerOn;_this1646.LayerFrozen=LayerFrozen;_this1646.LayerBlocked=LayerBlocked;_this1646.LayerStyles=LayerStyles;_this1646.type=1304840413;return _this1646;}return _createClass(IfcPresentationLayerWithStyle);}(IfcPresentationLayerAssignment);IFC4X32.IfcPresentationLayerWithStyle=IfcPresentationLayerWithStyle;var IfcPresentationStyle=/*#__PURE__*/function(_IfcLineObject196){_inherits(IfcPresentationStyle,_IfcLineObject196);var _super1650=_createSuper(IfcPresentationStyle);function IfcPresentationStyle(expressID,Name){var _this1647;_classCallCheck(this,IfcPresentationStyle);_this1647=_super1650.call(this,expressID);_this1647.Name=Name;_this1647.type=3119450353;return _this1647;}return _createClass(IfcPresentationStyle);}(IfcLineObject);IFC4X32.IfcPresentationStyle=IfcPresentationStyle;var IfcProductRepresentation=/*#__PURE__*/function(_IfcLineObject197){_inherits(IfcProductRepresentation,_IfcLineObject197);var _super1651=_createSuper(IfcProductRepresentation);function IfcProductRepresentation(expressID,Name,Description,Representations){var _this1648;_classCallCheck(this,IfcProductRepresentation);_this1648=_super1651.call(this,expressID);_this1648.Name=Name;_this1648.Description=Description;_this1648.Representations=Representations;_this1648.type=2095639259;return _this1648;}return _createClass(IfcProductRepresentation);}(IfcLineObject);IFC4X32.IfcProductRepresentation=IfcProductRepresentation;var IfcProfileDef=/*#__PURE__*/function(_IfcLineObject198){_inherits(IfcProfileDef,_IfcLineObject198);var _super1652=_createSuper(IfcProfileDef);function IfcProfileDef(expressID,ProfileType,ProfileName){var _this1649;_classCallCheck(this,IfcProfileDef);_this1649=_super1652.call(this,expressID);_this1649.ProfileType=ProfileType;_this1649.ProfileName=ProfileName;_this1649.type=3958567839;return _this1649;}return _createClass(IfcProfileDef);}(IfcLineObject);IFC4X32.IfcProfileDef=IfcProfileDef;var IfcProjectedCRS=/*#__PURE__*/function(_IfcCoordinateReferen2){_inherits(IfcProjectedCRS,_IfcCoordinateReferen2);var _super1653=_createSuper(IfcProjectedCRS);function IfcProjectedCRS(expressID,Name,Description,GeodeticDatum,VerticalDatum,MapProjection,MapZone,MapUnit){var _this1650;_classCallCheck(this,IfcProjectedCRS);_this1650=_super1653.call(this,expressID,Name,Description,GeodeticDatum,VerticalDatum);_this1650.Name=Name;_this1650.Description=Description;_this1650.GeodeticDatum=GeodeticDatum;_this1650.VerticalDatum=VerticalDatum;_this1650.MapProjection=MapProjection;_this1650.MapZone=MapZone;_this1650.MapUnit=MapUnit;_this1650.type=3843373140;return _this1650;}return _createClass(IfcProjectedCRS);}(IfcCoordinateReferenceSystem);IFC4X32.IfcProjectedCRS=IfcProjectedCRS;var IfcPropertyAbstraction=/*#__PURE__*/function(_IfcLineObject199){_inherits(IfcPropertyAbstraction,_IfcLineObject199);var _super1654=_createSuper(IfcPropertyAbstraction);function IfcPropertyAbstraction(expressID){var _this1651;_classCallCheck(this,IfcPropertyAbstraction);_this1651=_super1654.call(this,expressID);_this1651.type=986844984;return _this1651;}return _createClass(IfcPropertyAbstraction);}(IfcLineObject);IFC4X32.IfcPropertyAbstraction=IfcPropertyAbstraction;var IfcPropertyEnumeration=/*#__PURE__*/function(_IfcPropertyAbstracti5){_inherits(IfcPropertyEnumeration,_IfcPropertyAbstracti5);var _super1655=_createSuper(IfcPropertyEnumeration);function IfcPropertyEnumeration(expressID,Name,EnumerationValues,Unit){var _this1652;_classCallCheck(this,IfcPropertyEnumeration);_this1652=_super1655.call(this,expressID);_this1652.Name=Name;_this1652.EnumerationValues=EnumerationValues;_this1652.Unit=Unit;_this1652.type=3710013099;return _this1652;}return _createClass(IfcPropertyEnumeration);}(IfcPropertyAbstraction);IFC4X32.IfcPropertyEnumeration=IfcPropertyEnumeration;var IfcQuantityArea=/*#__PURE__*/function(_IfcPhysicalSimpleQua13){_inherits(IfcQuantityArea,_IfcPhysicalSimpleQua13);var _super1656=_createSuper(IfcQuantityArea);function IfcQuantityArea(expressID,Name,Description,Unit,AreaValue,Formula){var _this1653;_classCallCheck(this,IfcQuantityArea);_this1653=_super1656.call(this,expressID,Name,Description,Unit);_this1653.Name=Name;_this1653.Description=Description;_this1653.Unit=Unit;_this1653.AreaValue=AreaValue;_this1653.Formula=Formula;_this1653.type=2044713172;return _this1653;}return _createClass(IfcQuantityArea);}(IfcPhysicalSimpleQuantity);IFC4X32.IfcQuantityArea=IfcQuantityArea;var IfcQuantityCount=/*#__PURE__*/function(_IfcPhysicalSimpleQua14){_inherits(IfcQuantityCount,_IfcPhysicalSimpleQua14);var _super1657=_createSuper(IfcQuantityCount);function IfcQuantityCount(expressID,Name,Description,Unit,CountValue,Formula){var _this1654;_classCallCheck(this,IfcQuantityCount);_this1654=_super1657.call(this,expressID,Name,Description,Unit);_this1654.Name=Name;_this1654.Description=Description;_this1654.Unit=Unit;_this1654.CountValue=CountValue;_this1654.Formula=Formula;_this1654.type=2093928680;return _this1654;}return _createClass(IfcQuantityCount);}(IfcPhysicalSimpleQuantity);IFC4X32.IfcQuantityCount=IfcQuantityCount;var IfcQuantityLength=/*#__PURE__*/function(_IfcPhysicalSimpleQua15){_inherits(IfcQuantityLength,_IfcPhysicalSimpleQua15);var _super1658=_createSuper(IfcQuantityLength);function IfcQuantityLength(expressID,Name,Description,Unit,LengthValue,Formula){var _this1655;_classCallCheck(this,IfcQuantityLength);_this1655=_super1658.call(this,expressID,Name,Description,Unit);_this1655.Name=Name;_this1655.Description=Description;_this1655.Unit=Unit;_this1655.LengthValue=LengthValue;_this1655.Formula=Formula;_this1655.type=931644368;return _this1655;}return _createClass(IfcQuantityLength);}(IfcPhysicalSimpleQuantity);IFC4X32.IfcQuantityLength=IfcQuantityLength;var IfcQuantityNumber=/*#__PURE__*/function(_IfcPhysicalSimpleQua16){_inherits(IfcQuantityNumber,_IfcPhysicalSimpleQua16);var _super1659=_createSuper(IfcQuantityNumber);function IfcQuantityNumber(expressID,Name,Description,Unit,NumberValue,Formula){var _this1656;_classCallCheck(this,IfcQuantityNumber);_this1656=_super1659.call(this,expressID,Name,Description,Unit);_this1656.Name=Name;_this1656.Description=Description;_this1656.Unit=Unit;_this1656.NumberValue=NumberValue;_this1656.Formula=Formula;_this1656.type=2691318326;return _this1656;}return _createClass(IfcQuantityNumber);}(IfcPhysicalSimpleQuantity);IFC4X32.IfcQuantityNumber=IfcQuantityNumber;var IfcQuantityTime=/*#__PURE__*/function(_IfcPhysicalSimpleQua17){_inherits(IfcQuantityTime,_IfcPhysicalSimpleQua17);var _super1660=_createSuper(IfcQuantityTime);function IfcQuantityTime(expressID,Name,Description,Unit,TimeValue,Formula){var _this1657;_classCallCheck(this,IfcQuantityTime);_this1657=_super1660.call(this,expressID,Name,Description,Unit);_this1657.Name=Name;_this1657.Description=Description;_this1657.Unit=Unit;_this1657.TimeValue=TimeValue;_this1657.Formula=Formula;_this1657.type=3252649465;return _this1657;}return _createClass(IfcQuantityTime);}(IfcPhysicalSimpleQuantity);IFC4X32.IfcQuantityTime=IfcQuantityTime;var IfcQuantityVolume=/*#__PURE__*/function(_IfcPhysicalSimpleQua18){_inherits(IfcQuantityVolume,_IfcPhysicalSimpleQua18);var _super1661=_createSuper(IfcQuantityVolume);function IfcQuantityVolume(expressID,Name,Description,Unit,VolumeValue,Formula){var _this1658;_classCallCheck(this,IfcQuantityVolume);_this1658=_super1661.call(this,expressID,Name,Description,Unit);_this1658.Name=Name;_this1658.Description=Description;_this1658.Unit=Unit;_this1658.VolumeValue=VolumeValue;_this1658.Formula=Formula;_this1658.type=2405470396;return _this1658;}return _createClass(IfcQuantityVolume);}(IfcPhysicalSimpleQuantity);IFC4X32.IfcQuantityVolume=IfcQuantityVolume;var IfcQuantityWeight=/*#__PURE__*/function(_IfcPhysicalSimpleQua19){_inherits(IfcQuantityWeight,_IfcPhysicalSimpleQua19);var _super1662=_createSuper(IfcQuantityWeight);function IfcQuantityWeight(expressID,Name,Description,Unit,WeightValue,Formula){var _this1659;_classCallCheck(this,IfcQuantityWeight);_this1659=_super1662.call(this,expressID,Name,Description,Unit);_this1659.Name=Name;_this1659.Description=Description;_this1659.Unit=Unit;_this1659.WeightValue=WeightValue;_this1659.Formula=Formula;_this1659.type=825690147;return _this1659;}return _createClass(IfcQuantityWeight);}(IfcPhysicalSimpleQuantity);IFC4X32.IfcQuantityWeight=IfcQuantityWeight;var IfcRecurrencePattern=/*#__PURE__*/function(_IfcLineObject200){_inherits(IfcRecurrencePattern,_IfcLineObject200);var _super1663=_createSuper(IfcRecurrencePattern);function IfcRecurrencePattern(expressID,RecurrenceType,DayComponent,WeekdayComponent,MonthComponent,Position,Interval,Occurrences,TimePeriods){var _this1660;_classCallCheck(this,IfcRecurrencePattern);_this1660=_super1663.call(this,expressID);_this1660.RecurrenceType=RecurrenceType;_this1660.DayComponent=DayComponent;_this1660.WeekdayComponent=WeekdayComponent;_this1660.MonthComponent=MonthComponent;_this1660.Position=Position;_this1660.Interval=Interval;_this1660.Occurrences=Occurrences;_this1660.TimePeriods=TimePeriods;_this1660.type=3915482550;return _this1660;}return _createClass(IfcRecurrencePattern);}(IfcLineObject);IFC4X32.IfcRecurrencePattern=IfcRecurrencePattern;var IfcReference=/*#__PURE__*/function(_IfcLineObject201){_inherits(IfcReference,_IfcLineObject201);var _super1664=_createSuper(IfcReference);function IfcReference(expressID,TypeIdentifier,AttributeIdentifier,InstanceName,ListPositions,InnerReference){var _this1661;_classCallCheck(this,IfcReference);_this1661=_super1664.call(this,expressID);_this1661.TypeIdentifier=TypeIdentifier;_this1661.AttributeIdentifier=AttributeIdentifier;_this1661.InstanceName=InstanceName;_this1661.ListPositions=ListPositions;_this1661.InnerReference=InnerReference;_this1661.type=2433181523;return _this1661;}return _createClass(IfcReference);}(IfcLineObject);IFC4X32.IfcReference=IfcReference;var IfcRepresentation=/*#__PURE__*/function(_IfcLineObject202){_inherits(IfcRepresentation,_IfcLineObject202);var _super1665=_createSuper(IfcRepresentation);function IfcRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this1662;_classCallCheck(this,IfcRepresentation);_this1662=_super1665.call(this,expressID);_this1662.ContextOfItems=ContextOfItems;_this1662.RepresentationIdentifier=RepresentationIdentifier;_this1662.RepresentationType=RepresentationType;_this1662.Items=Items;_this1662.type=1076942058;return _this1662;}return _createClass(IfcRepresentation);}(IfcLineObject);IFC4X32.IfcRepresentation=IfcRepresentation;var IfcRepresentationContext=/*#__PURE__*/function(_IfcLineObject203){_inherits(IfcRepresentationContext,_IfcLineObject203);var _super1666=_createSuper(IfcRepresentationContext);function IfcRepresentationContext(expressID,ContextIdentifier,ContextType){var _this1663;_classCallCheck(this,IfcRepresentationContext);_this1663=_super1666.call(this,expressID);_this1663.ContextIdentifier=ContextIdentifier;_this1663.ContextType=ContextType;_this1663.type=3377609919;return _this1663;}return _createClass(IfcRepresentationContext);}(IfcLineObject);IFC4X32.IfcRepresentationContext=IfcRepresentationContext;var IfcRepresentationItem=/*#__PURE__*/function(_IfcLineObject204){_inherits(IfcRepresentationItem,_IfcLineObject204);var _super1667=_createSuper(IfcRepresentationItem);function IfcRepresentationItem(expressID){var _this1664;_classCallCheck(this,IfcRepresentationItem);_this1664=_super1667.call(this,expressID);_this1664.type=3008791417;return _this1664;}return _createClass(IfcRepresentationItem);}(IfcLineObject);IFC4X32.IfcRepresentationItem=IfcRepresentationItem;var IfcRepresentationMap=/*#__PURE__*/function(_IfcLineObject205){_inherits(IfcRepresentationMap,_IfcLineObject205);var _super1668=_createSuper(IfcRepresentationMap);function IfcRepresentationMap(expressID,MappingOrigin,MappedRepresentation){var _this1665;_classCallCheck(this,IfcRepresentationMap);_this1665=_super1668.call(this,expressID);_this1665.MappingOrigin=MappingOrigin;_this1665.MappedRepresentation=MappedRepresentation;_this1665.type=1660063152;return _this1665;}return _createClass(IfcRepresentationMap);}(IfcLineObject);IFC4X32.IfcRepresentationMap=IfcRepresentationMap;var IfcResourceLevelRelationship=/*#__PURE__*/function(_IfcLineObject206){_inherits(IfcResourceLevelRelationship,_IfcLineObject206);var _super1669=_createSuper(IfcResourceLevelRelationship);function IfcResourceLevelRelationship(expressID,Name,Description){var _this1666;_classCallCheck(this,IfcResourceLevelRelationship);_this1666=_super1669.call(this,expressID);_this1666.Name=Name;_this1666.Description=Description;_this1666.type=2439245199;return _this1666;}return _createClass(IfcResourceLevelRelationship);}(IfcLineObject);IFC4X32.IfcResourceLevelRelationship=IfcResourceLevelRelationship;var IfcRoot=/*#__PURE__*/function(_IfcLineObject207){_inherits(IfcRoot,_IfcLineObject207);var _super1670=_createSuper(IfcRoot);function IfcRoot(expressID,GlobalId,OwnerHistory,Name,Description){var _this1667;_classCallCheck(this,IfcRoot);_this1667=_super1670.call(this,expressID);_this1667.GlobalId=GlobalId;_this1667.OwnerHistory=OwnerHistory;_this1667.Name=Name;_this1667.Description=Description;_this1667.type=2341007311;return _this1667;}return _createClass(IfcRoot);}(IfcLineObject);IFC4X32.IfcRoot=IfcRoot;var IfcSIUnit=/*#__PURE__*/function(_IfcNamedUnit7){_inherits(IfcSIUnit,_IfcNamedUnit7);var _super1671=_createSuper(IfcSIUnit);function IfcSIUnit(expressID,Dimensions,UnitType,Prefix,Name){var _this1668;_classCallCheck(this,IfcSIUnit);_this1668=_super1671.call(this,expressID,Dimensions,UnitType);_this1668.Dimensions=Dimensions;_this1668.UnitType=UnitType;_this1668.Prefix=Prefix;_this1668.Name=Name;_this1668.type=448429030;return _this1668;}return _createClass(IfcSIUnit);}(IfcNamedUnit);IFC4X32.IfcSIUnit=IfcSIUnit;var IfcSchedulingTime=/*#__PURE__*/function(_IfcLineObject208){_inherits(IfcSchedulingTime,_IfcLineObject208);var _super1672=_createSuper(IfcSchedulingTime);function IfcSchedulingTime(expressID,Name,DataOrigin,UserDefinedDataOrigin){var _this1669;_classCallCheck(this,IfcSchedulingTime);_this1669=_super1672.call(this,expressID);_this1669.Name=Name;_this1669.DataOrigin=DataOrigin;_this1669.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1669.type=1054537805;return _this1669;}return _createClass(IfcSchedulingTime);}(IfcLineObject);IFC4X32.IfcSchedulingTime=IfcSchedulingTime;var IfcShapeAspect=/*#__PURE__*/function(_IfcLineObject209){_inherits(IfcShapeAspect,_IfcLineObject209);var _super1673=_createSuper(IfcShapeAspect);function IfcShapeAspect(expressID,ShapeRepresentations,Name,Description,ProductDefinitional,PartOfProductDefinitionShape){var _this1670;_classCallCheck(this,IfcShapeAspect);_this1670=_super1673.call(this,expressID);_this1670.ShapeRepresentations=ShapeRepresentations;_this1670.Name=Name;_this1670.Description=Description;_this1670.ProductDefinitional=ProductDefinitional;_this1670.PartOfProductDefinitionShape=PartOfProductDefinitionShape;_this1670.type=867548509;return _this1670;}return _createClass(IfcShapeAspect);}(IfcLineObject);IFC4X32.IfcShapeAspect=IfcShapeAspect;var IfcShapeModel=/*#__PURE__*/function(_IfcRepresentation5){_inherits(IfcShapeModel,_IfcRepresentation5);var _super1674=_createSuper(IfcShapeModel);function IfcShapeModel(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this1671;_classCallCheck(this,IfcShapeModel);_this1671=_super1674.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this1671.ContextOfItems=ContextOfItems;_this1671.RepresentationIdentifier=RepresentationIdentifier;_this1671.RepresentationType=RepresentationType;_this1671.Items=Items;_this1671.type=3982875396;return _this1671;}return _createClass(IfcShapeModel);}(IfcRepresentation);IFC4X32.IfcShapeModel=IfcShapeModel;var IfcShapeRepresentation=/*#__PURE__*/function(_IfcShapeModel5){_inherits(IfcShapeRepresentation,_IfcShapeModel5);var _super1675=_createSuper(IfcShapeRepresentation);function IfcShapeRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this1672;_classCallCheck(this,IfcShapeRepresentation);_this1672=_super1675.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this1672.ContextOfItems=ContextOfItems;_this1672.RepresentationIdentifier=RepresentationIdentifier;_this1672.RepresentationType=RepresentationType;_this1672.Items=Items;_this1672.type=4240577450;return _this1672;}return _createClass(IfcShapeRepresentation);}(IfcShapeModel);IFC4X32.IfcShapeRepresentation=IfcShapeRepresentation;var IfcStructuralConnectionCondition=/*#__PURE__*/function(_IfcLineObject210){_inherits(IfcStructuralConnectionCondition,_IfcLineObject210);var _super1676=_createSuper(IfcStructuralConnectionCondition);function IfcStructuralConnectionCondition(expressID,Name){var _this1673;_classCallCheck(this,IfcStructuralConnectionCondition);_this1673=_super1676.call(this,expressID);_this1673.Name=Name;_this1673.type=2273995522;return _this1673;}return _createClass(IfcStructuralConnectionCondition);}(IfcLineObject);IFC4X32.IfcStructuralConnectionCondition=IfcStructuralConnectionCondition;var IfcStructuralLoad=/*#__PURE__*/function(_IfcLineObject211){_inherits(IfcStructuralLoad,_IfcLineObject211);var _super1677=_createSuper(IfcStructuralLoad);function IfcStructuralLoad(expressID,Name){var _this1674;_classCallCheck(this,IfcStructuralLoad);_this1674=_super1677.call(this,expressID);_this1674.Name=Name;_this1674.type=2162789131;return _this1674;}return _createClass(IfcStructuralLoad);}(IfcLineObject);IFC4X32.IfcStructuralLoad=IfcStructuralLoad;var IfcStructuralLoadConfiguration=/*#__PURE__*/function(_IfcStructuralLoad4){_inherits(IfcStructuralLoadConfiguration,_IfcStructuralLoad4);var _super1678=_createSuper(IfcStructuralLoadConfiguration);function IfcStructuralLoadConfiguration(expressID,Name,Values,Locations){var _this1675;_classCallCheck(this,IfcStructuralLoadConfiguration);_this1675=_super1678.call(this,expressID,Name);_this1675.Name=Name;_this1675.Values=Values;_this1675.Locations=Locations;_this1675.type=3478079324;return _this1675;}return _createClass(IfcStructuralLoadConfiguration);}(IfcStructuralLoad);IFC4X32.IfcStructuralLoadConfiguration=IfcStructuralLoadConfiguration;var IfcStructuralLoadOrResult=/*#__PURE__*/function(_IfcStructuralLoad5){_inherits(IfcStructuralLoadOrResult,_IfcStructuralLoad5);var _super1679=_createSuper(IfcStructuralLoadOrResult);function IfcStructuralLoadOrResult(expressID,Name){var _this1676;_classCallCheck(this,IfcStructuralLoadOrResult);_this1676=_super1679.call(this,expressID,Name);_this1676.Name=Name;_this1676.type=609421318;return _this1676;}return _createClass(IfcStructuralLoadOrResult);}(IfcStructuralLoad);IFC4X32.IfcStructuralLoadOrResult=IfcStructuralLoadOrResult;var IfcStructuralLoadStatic=/*#__PURE__*/function(_IfcStructuralLoadOrR3){_inherits(IfcStructuralLoadStatic,_IfcStructuralLoadOrR3);var _super1680=_createSuper(IfcStructuralLoadStatic);function IfcStructuralLoadStatic(expressID,Name){var _this1677;_classCallCheck(this,IfcStructuralLoadStatic);_this1677=_super1680.call(this,expressID,Name);_this1677.Name=Name;_this1677.type=2525727697;return _this1677;}return _createClass(IfcStructuralLoadStatic);}(IfcStructuralLoadOrResult);IFC4X32.IfcStructuralLoadStatic=IfcStructuralLoadStatic;var IfcStructuralLoadTemperature=/*#__PURE__*/function(_IfcStructuralLoadSta11){_inherits(IfcStructuralLoadTemperature,_IfcStructuralLoadSta11);var _super1681=_createSuper(IfcStructuralLoadTemperature);function IfcStructuralLoadTemperature(expressID,Name,DeltaTConstant,DeltaTY,DeltaTZ){var _this1678;_classCallCheck(this,IfcStructuralLoadTemperature);_this1678=_super1681.call(this,expressID,Name);_this1678.Name=Name;_this1678.DeltaTConstant=DeltaTConstant;_this1678.DeltaTY=DeltaTY;_this1678.DeltaTZ=DeltaTZ;_this1678.type=3408363356;return _this1678;}return _createClass(IfcStructuralLoadTemperature);}(IfcStructuralLoadStatic);IFC4X32.IfcStructuralLoadTemperature=IfcStructuralLoadTemperature;var IfcStyleModel=/*#__PURE__*/function(_IfcRepresentation6){_inherits(IfcStyleModel,_IfcRepresentation6);var _super1682=_createSuper(IfcStyleModel);function IfcStyleModel(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this1679;_classCallCheck(this,IfcStyleModel);_this1679=_super1682.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this1679.ContextOfItems=ContextOfItems;_this1679.RepresentationIdentifier=RepresentationIdentifier;_this1679.RepresentationType=RepresentationType;_this1679.Items=Items;_this1679.type=2830218821;return _this1679;}return _createClass(IfcStyleModel);}(IfcRepresentation);IFC4X32.IfcStyleModel=IfcStyleModel;var IfcStyledItem=/*#__PURE__*/function(_IfcRepresentationIte9){_inherits(IfcStyledItem,_IfcRepresentationIte9);var _super1683=_createSuper(IfcStyledItem);function IfcStyledItem(expressID,Item,Styles,Name){var _this1680;_classCallCheck(this,IfcStyledItem);_this1680=_super1683.call(this,expressID);_this1680.Item=Item;_this1680.Styles=Styles;_this1680.Name=Name;_this1680.type=3958052878;return _this1680;}return _createClass(IfcStyledItem);}(IfcRepresentationItem);IFC4X32.IfcStyledItem=IfcStyledItem;var IfcStyledRepresentation=/*#__PURE__*/function(_IfcStyleModel3){_inherits(IfcStyledRepresentation,_IfcStyleModel3);var _super1684=_createSuper(IfcStyledRepresentation);function IfcStyledRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this1681;_classCallCheck(this,IfcStyledRepresentation);_this1681=_super1684.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this1681.ContextOfItems=ContextOfItems;_this1681.RepresentationIdentifier=RepresentationIdentifier;_this1681.RepresentationType=RepresentationType;_this1681.Items=Items;_this1681.type=3049322572;return _this1681;}return _createClass(IfcStyledRepresentation);}(IfcStyleModel);IFC4X32.IfcStyledRepresentation=IfcStyledRepresentation;var IfcSurfaceReinforcementArea=/*#__PURE__*/function(_IfcStructuralLoadOrR4){_inherits(IfcSurfaceReinforcementArea,_IfcStructuralLoadOrR4);var _super1685=_createSuper(IfcSurfaceReinforcementArea);function IfcSurfaceReinforcementArea(expressID,Name,SurfaceReinforcement1,SurfaceReinforcement2,ShearReinforcement){var _this1682;_classCallCheck(this,IfcSurfaceReinforcementArea);_this1682=_super1685.call(this,expressID,Name);_this1682.Name=Name;_this1682.SurfaceReinforcement1=SurfaceReinforcement1;_this1682.SurfaceReinforcement2=SurfaceReinforcement2;_this1682.ShearReinforcement=ShearReinforcement;_this1682.type=2934153892;return _this1682;}return _createClass(IfcSurfaceReinforcementArea);}(IfcStructuralLoadOrResult);IFC4X32.IfcSurfaceReinforcementArea=IfcSurfaceReinforcementArea;var IfcSurfaceStyle=/*#__PURE__*/function(_IfcPresentationStyle10){_inherits(IfcSurfaceStyle,_IfcPresentationStyle10);var _super1686=_createSuper(IfcSurfaceStyle);function IfcSurfaceStyle(expressID,Name,Side,Styles){var _this1683;_classCallCheck(this,IfcSurfaceStyle);_this1683=_super1686.call(this,expressID,Name);_this1683.Name=Name;_this1683.Side=Side;_this1683.Styles=Styles;_this1683.type=1300840506;return _this1683;}return _createClass(IfcSurfaceStyle);}(IfcPresentationStyle);IFC4X32.IfcSurfaceStyle=IfcSurfaceStyle;var IfcSurfaceStyleLighting=/*#__PURE__*/function(_IfcPresentationItem18){_inherits(IfcSurfaceStyleLighting,_IfcPresentationItem18);var _super1687=_createSuper(IfcSurfaceStyleLighting);function IfcSurfaceStyleLighting(expressID,DiffuseTransmissionColour,DiffuseReflectionColour,TransmissionColour,ReflectanceColour){var _this1684;_classCallCheck(this,IfcSurfaceStyleLighting);_this1684=_super1687.call(this,expressID);_this1684.DiffuseTransmissionColour=DiffuseTransmissionColour;_this1684.DiffuseReflectionColour=DiffuseReflectionColour;_this1684.TransmissionColour=TransmissionColour;_this1684.ReflectanceColour=ReflectanceColour;_this1684.type=3303107099;return _this1684;}return _createClass(IfcSurfaceStyleLighting);}(IfcPresentationItem);IFC4X32.IfcSurfaceStyleLighting=IfcSurfaceStyleLighting;var IfcSurfaceStyleRefraction=/*#__PURE__*/function(_IfcPresentationItem19){_inherits(IfcSurfaceStyleRefraction,_IfcPresentationItem19);var _super1688=_createSuper(IfcSurfaceStyleRefraction);function IfcSurfaceStyleRefraction(expressID,RefractionIndex,DispersionFactor){var _this1685;_classCallCheck(this,IfcSurfaceStyleRefraction);_this1685=_super1688.call(this,expressID);_this1685.RefractionIndex=RefractionIndex;_this1685.DispersionFactor=DispersionFactor;_this1685.type=1607154358;return _this1685;}return _createClass(IfcSurfaceStyleRefraction);}(IfcPresentationItem);IFC4X32.IfcSurfaceStyleRefraction=IfcSurfaceStyleRefraction;var IfcSurfaceStyleShading=/*#__PURE__*/function(_IfcPresentationItem20){_inherits(IfcSurfaceStyleShading,_IfcPresentationItem20);var _super1689=_createSuper(IfcSurfaceStyleShading);function IfcSurfaceStyleShading(expressID,SurfaceColour,Transparency){var _this1686;_classCallCheck(this,IfcSurfaceStyleShading);_this1686=_super1689.call(this,expressID);_this1686.SurfaceColour=SurfaceColour;_this1686.Transparency=Transparency;_this1686.type=846575682;return _this1686;}return _createClass(IfcSurfaceStyleShading);}(IfcPresentationItem);IFC4X32.IfcSurfaceStyleShading=IfcSurfaceStyleShading;var IfcSurfaceStyleWithTextures=/*#__PURE__*/function(_IfcPresentationItem21){_inherits(IfcSurfaceStyleWithTextures,_IfcPresentationItem21);var _super1690=_createSuper(IfcSurfaceStyleWithTextures);function IfcSurfaceStyleWithTextures(expressID,Textures){var _this1687;_classCallCheck(this,IfcSurfaceStyleWithTextures);_this1687=_super1690.call(this,expressID);_this1687.Textures=Textures;_this1687.type=1351298697;return _this1687;}return _createClass(IfcSurfaceStyleWithTextures);}(IfcPresentationItem);IFC4X32.IfcSurfaceStyleWithTextures=IfcSurfaceStyleWithTextures;var IfcSurfaceTexture=/*#__PURE__*/function(_IfcPresentationItem22){_inherits(IfcSurfaceTexture,_IfcPresentationItem22);var _super1691=_createSuper(IfcSurfaceTexture);function IfcSurfaceTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter){var _this1688;_classCallCheck(this,IfcSurfaceTexture);_this1688=_super1691.call(this,expressID);_this1688.RepeatS=RepeatS;_this1688.RepeatT=RepeatT;_this1688.Mode=Mode;_this1688.TextureTransform=TextureTransform;_this1688.Parameter=Parameter;_this1688.type=626085974;return _this1688;}return _createClass(IfcSurfaceTexture);}(IfcPresentationItem);IFC4X32.IfcSurfaceTexture=IfcSurfaceTexture;var IfcTable=/*#__PURE__*/function(_IfcLineObject212){_inherits(IfcTable,_IfcLineObject212);var _super1692=_createSuper(IfcTable);function IfcTable(expressID,Name,Rows,Columns){var _this1689;_classCallCheck(this,IfcTable);_this1689=_super1692.call(this,expressID);_this1689.Name=Name;_this1689.Rows=Rows;_this1689.Columns=Columns;_this1689.type=985171141;return _this1689;}return _createClass(IfcTable);}(IfcLineObject);IFC4X32.IfcTable=IfcTable;var IfcTableColumn=/*#__PURE__*/function(_IfcLineObject213){_inherits(IfcTableColumn,_IfcLineObject213);var _super1693=_createSuper(IfcTableColumn);function IfcTableColumn(expressID,Identifier,Name,Description,Unit,ReferencePath){var _this1690;_classCallCheck(this,IfcTableColumn);_this1690=_super1693.call(this,expressID);_this1690.Identifier=Identifier;_this1690.Name=Name;_this1690.Description=Description;_this1690.Unit=Unit;_this1690.ReferencePath=ReferencePath;_this1690.type=2043862942;return _this1690;}return _createClass(IfcTableColumn);}(IfcLineObject);IFC4X32.IfcTableColumn=IfcTableColumn;var IfcTableRow=/*#__PURE__*/function(_IfcLineObject214){_inherits(IfcTableRow,_IfcLineObject214);var _super1694=_createSuper(IfcTableRow);function IfcTableRow(expressID,RowCells,IsHeading){var _this1691;_classCallCheck(this,IfcTableRow);_this1691=_super1694.call(this,expressID);_this1691.RowCells=RowCells;_this1691.IsHeading=IsHeading;_this1691.type=531007025;return _this1691;}return _createClass(IfcTableRow);}(IfcLineObject);IFC4X32.IfcTableRow=IfcTableRow;var IfcTaskTime=/*#__PURE__*/function(_IfcSchedulingTime6){_inherits(IfcTaskTime,_IfcSchedulingTime6);var _super1695=_createSuper(IfcTaskTime);function IfcTaskTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,DurationType,ScheduleDuration,ScheduleStart,ScheduleFinish,EarlyStart,EarlyFinish,LateStart,LateFinish,FreeFloat,TotalFloat,IsCritical,StatusTime,ActualDuration,ActualStart,ActualFinish,RemainingTime,Completion){var _this1692;_classCallCheck(this,IfcTaskTime);_this1692=_super1695.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this1692.Name=Name;_this1692.DataOrigin=DataOrigin;_this1692.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1692.DurationType=DurationType;_this1692.ScheduleDuration=ScheduleDuration;_this1692.ScheduleStart=ScheduleStart;_this1692.ScheduleFinish=ScheduleFinish;_this1692.EarlyStart=EarlyStart;_this1692.EarlyFinish=EarlyFinish;_this1692.LateStart=LateStart;_this1692.LateFinish=LateFinish;_this1692.FreeFloat=FreeFloat;_this1692.TotalFloat=TotalFloat;_this1692.IsCritical=IsCritical;_this1692.StatusTime=StatusTime;_this1692.ActualDuration=ActualDuration;_this1692.ActualStart=ActualStart;_this1692.ActualFinish=ActualFinish;_this1692.RemainingTime=RemainingTime;_this1692.Completion=Completion;_this1692.type=1549132990;return _this1692;}return _createClass(IfcTaskTime);}(IfcSchedulingTime);IFC4X32.IfcTaskTime=IfcTaskTime;var IfcTaskTimeRecurring=/*#__PURE__*/function(_IfcTaskTime2){_inherits(IfcTaskTimeRecurring,_IfcTaskTime2);var _super1696=_createSuper(IfcTaskTimeRecurring);function IfcTaskTimeRecurring(expressID,Name,DataOrigin,UserDefinedDataOrigin,DurationType,ScheduleDuration,ScheduleStart,ScheduleFinish,EarlyStart,EarlyFinish,LateStart,LateFinish,FreeFloat,TotalFloat,IsCritical,StatusTime,ActualDuration,ActualStart,ActualFinish,RemainingTime,Completion,Recurrence){var _this1693;_classCallCheck(this,IfcTaskTimeRecurring);_this1693=_super1696.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin,DurationType,ScheduleDuration,ScheduleStart,ScheduleFinish,EarlyStart,EarlyFinish,LateStart,LateFinish,FreeFloat,TotalFloat,IsCritical,StatusTime,ActualDuration,ActualStart,ActualFinish,RemainingTime,Completion);_this1693.Name=Name;_this1693.DataOrigin=DataOrigin;_this1693.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1693.DurationType=DurationType;_this1693.ScheduleDuration=ScheduleDuration;_this1693.ScheduleStart=ScheduleStart;_this1693.ScheduleFinish=ScheduleFinish;_this1693.EarlyStart=EarlyStart;_this1693.EarlyFinish=EarlyFinish;_this1693.LateStart=LateStart;_this1693.LateFinish=LateFinish;_this1693.FreeFloat=FreeFloat;_this1693.TotalFloat=TotalFloat;_this1693.IsCritical=IsCritical;_this1693.StatusTime=StatusTime;_this1693.ActualDuration=ActualDuration;_this1693.ActualStart=ActualStart;_this1693.ActualFinish=ActualFinish;_this1693.RemainingTime=RemainingTime;_this1693.Completion=Completion;_this1693.Recurrence=Recurrence;_this1693.type=2771591690;return _this1693;}return _createClass(IfcTaskTimeRecurring);}(IfcTaskTime);IFC4X32.IfcTaskTimeRecurring=IfcTaskTimeRecurring;var IfcTelecomAddress=/*#__PURE__*/function(_IfcAddress6){_inherits(IfcTelecomAddress,_IfcAddress6);var _super1697=_createSuper(IfcTelecomAddress);function IfcTelecomAddress(expressID,Purpose,Description,UserDefinedPurpose,TelephoneNumbers,FacsimileNumbers,PagerNumber,ElectronicMailAddresses,WWWHomePageURL,MessagingIDs){var _this1694;_classCallCheck(this,IfcTelecomAddress);_this1694=_super1697.call(this,expressID,Purpose,Description,UserDefinedPurpose);_this1694.Purpose=Purpose;_this1694.Description=Description;_this1694.UserDefinedPurpose=UserDefinedPurpose;_this1694.TelephoneNumbers=TelephoneNumbers;_this1694.FacsimileNumbers=FacsimileNumbers;_this1694.PagerNumber=PagerNumber;_this1694.ElectronicMailAddresses=ElectronicMailAddresses;_this1694.WWWHomePageURL=WWWHomePageURL;_this1694.MessagingIDs=MessagingIDs;_this1694.type=912023232;return _this1694;}return _createClass(IfcTelecomAddress);}(IfcAddress);IFC4X32.IfcTelecomAddress=IfcTelecomAddress;var IfcTextStyle=/*#__PURE__*/function(_IfcPresentationStyle11){_inherits(IfcTextStyle,_IfcPresentationStyle11);var _super1698=_createSuper(IfcTextStyle);function IfcTextStyle(expressID,Name,TextCharacterAppearance,TextStyle,TextFontStyle,ModelOrDraughting){var _this1695;_classCallCheck(this,IfcTextStyle);_this1695=_super1698.call(this,expressID,Name);_this1695.Name=Name;_this1695.TextCharacterAppearance=TextCharacterAppearance;_this1695.TextStyle=TextStyle;_this1695.TextFontStyle=TextFontStyle;_this1695.ModelOrDraughting=ModelOrDraughting;_this1695.type=1447204868;return _this1695;}return _createClass(IfcTextStyle);}(IfcPresentationStyle);IFC4X32.IfcTextStyle=IfcTextStyle;var IfcTextStyleForDefinedFont=/*#__PURE__*/function(_IfcPresentationItem23){_inherits(IfcTextStyleForDefinedFont,_IfcPresentationItem23);var _super1699=_createSuper(IfcTextStyleForDefinedFont);function IfcTextStyleForDefinedFont(expressID,Colour,BackgroundColour){var _this1696;_classCallCheck(this,IfcTextStyleForDefinedFont);_this1696=_super1699.call(this,expressID);_this1696.Colour=Colour;_this1696.BackgroundColour=BackgroundColour;_this1696.type=2636378356;return _this1696;}return _createClass(IfcTextStyleForDefinedFont);}(IfcPresentationItem);IFC4X32.IfcTextStyleForDefinedFont=IfcTextStyleForDefinedFont;var IfcTextStyleTextModel=/*#__PURE__*/function(_IfcPresentationItem24){_inherits(IfcTextStyleTextModel,_IfcPresentationItem24);var _super1700=_createSuper(IfcTextStyleTextModel);function IfcTextStyleTextModel(expressID,TextIndent,TextAlign,TextDecoration,LetterSpacing,WordSpacing,TextTransform,LineHeight){var _this1697;_classCallCheck(this,IfcTextStyleTextModel);_this1697=_super1700.call(this,expressID);_this1697.TextIndent=TextIndent;_this1697.TextAlign=TextAlign;_this1697.TextDecoration=TextDecoration;_this1697.LetterSpacing=LetterSpacing;_this1697.WordSpacing=WordSpacing;_this1697.TextTransform=TextTransform;_this1697.LineHeight=LineHeight;_this1697.type=1640371178;return _this1697;}return _createClass(IfcTextStyleTextModel);}(IfcPresentationItem);IFC4X32.IfcTextStyleTextModel=IfcTextStyleTextModel;var IfcTextureCoordinate=/*#__PURE__*/function(_IfcPresentationItem25){_inherits(IfcTextureCoordinate,_IfcPresentationItem25);var _super1701=_createSuper(IfcTextureCoordinate);function IfcTextureCoordinate(expressID,Maps){var _this1698;_classCallCheck(this,IfcTextureCoordinate);_this1698=_super1701.call(this,expressID);_this1698.Maps=Maps;_this1698.type=280115917;return _this1698;}return _createClass(IfcTextureCoordinate);}(IfcPresentationItem);IFC4X32.IfcTextureCoordinate=IfcTextureCoordinate;var IfcTextureCoordinateGenerator=/*#__PURE__*/function(_IfcTextureCoordinate6){_inherits(IfcTextureCoordinateGenerator,_IfcTextureCoordinate6);var _super1702=_createSuper(IfcTextureCoordinateGenerator);function IfcTextureCoordinateGenerator(expressID,Maps,Mode,Parameter){var _this1699;_classCallCheck(this,IfcTextureCoordinateGenerator);_this1699=_super1702.call(this,expressID,Maps);_this1699.Maps=Maps;_this1699.Mode=Mode;_this1699.Parameter=Parameter;_this1699.type=1742049831;return _this1699;}return _createClass(IfcTextureCoordinateGenerator);}(IfcTextureCoordinate);IFC4X32.IfcTextureCoordinateGenerator=IfcTextureCoordinateGenerator;var IfcTextureCoordinateIndices=/*#__PURE__*/function(_IfcLineObject215){_inherits(IfcTextureCoordinateIndices,_IfcLineObject215);var _super1703=_createSuper(IfcTextureCoordinateIndices);function IfcTextureCoordinateIndices(expressID,TexCoordIndex,TexCoordsOf){var _this1700;_classCallCheck(this,IfcTextureCoordinateIndices);_this1700=_super1703.call(this,expressID);_this1700.TexCoordIndex=TexCoordIndex;_this1700.TexCoordsOf=TexCoordsOf;_this1700.type=222769930;return _this1700;}return _createClass(IfcTextureCoordinateIndices);}(IfcLineObject);IFC4X32.IfcTextureCoordinateIndices=IfcTextureCoordinateIndices;var IfcTextureCoordinateIndicesWithVoids=/*#__PURE__*/function(_IfcTextureCoordinate7){_inherits(IfcTextureCoordinateIndicesWithVoids,_IfcTextureCoordinate7);var _super1704=_createSuper(IfcTextureCoordinateIndicesWithVoids);function IfcTextureCoordinateIndicesWithVoids(expressID,TexCoordIndex,TexCoordsOf,InnerTexCoordIndices){var _this1701;_classCallCheck(this,IfcTextureCoordinateIndicesWithVoids);_this1701=_super1704.call(this,expressID,TexCoordIndex,TexCoordsOf);_this1701.TexCoordIndex=TexCoordIndex;_this1701.TexCoordsOf=TexCoordsOf;_this1701.InnerTexCoordIndices=InnerTexCoordIndices;_this1701.type=1010789467;return _this1701;}return _createClass(IfcTextureCoordinateIndicesWithVoids);}(IfcTextureCoordinateIndices);IFC4X32.IfcTextureCoordinateIndicesWithVoids=IfcTextureCoordinateIndicesWithVoids;var IfcTextureMap=/*#__PURE__*/function(_IfcTextureCoordinate8){_inherits(IfcTextureMap,_IfcTextureCoordinate8);var _super1705=_createSuper(IfcTextureMap);function IfcTextureMap(expressID,Maps,Vertices,MappedTo){var _this1702;_classCallCheck(this,IfcTextureMap);_this1702=_super1705.call(this,expressID,Maps);_this1702.Maps=Maps;_this1702.Vertices=Vertices;_this1702.MappedTo=MappedTo;_this1702.type=2552916305;return _this1702;}return _createClass(IfcTextureMap);}(IfcTextureCoordinate);IFC4X32.IfcTextureMap=IfcTextureMap;var IfcTextureVertex=/*#__PURE__*/function(_IfcPresentationItem26){_inherits(IfcTextureVertex,_IfcPresentationItem26);var _super1706=_createSuper(IfcTextureVertex);function IfcTextureVertex(expressID,Coordinates){var _this1703;_classCallCheck(this,IfcTextureVertex);_this1703=_super1706.call(this,expressID);_this1703.Coordinates=Coordinates;_this1703.type=1210645708;return _this1703;}return _createClass(IfcTextureVertex);}(IfcPresentationItem);IFC4X32.IfcTextureVertex=IfcTextureVertex;var IfcTextureVertexList=/*#__PURE__*/function(_IfcPresentationItem27){_inherits(IfcTextureVertexList,_IfcPresentationItem27);var _super1707=_createSuper(IfcTextureVertexList);function IfcTextureVertexList(expressID,TexCoordsList){var _this1704;_classCallCheck(this,IfcTextureVertexList);_this1704=_super1707.call(this,expressID);_this1704.TexCoordsList=TexCoordsList;_this1704.type=3611470254;return _this1704;}return _createClass(IfcTextureVertexList);}(IfcPresentationItem);IFC4X32.IfcTextureVertexList=IfcTextureVertexList;var IfcTimePeriod=/*#__PURE__*/function(_IfcLineObject216){_inherits(IfcTimePeriod,_IfcLineObject216);var _super1708=_createSuper(IfcTimePeriod);function IfcTimePeriod(expressID,StartTime,EndTime){var _this1705;_classCallCheck(this,IfcTimePeriod);_this1705=_super1708.call(this,expressID);_this1705.StartTime=StartTime;_this1705.EndTime=EndTime;_this1705.type=1199560280;return _this1705;}return _createClass(IfcTimePeriod);}(IfcLineObject);IFC4X32.IfcTimePeriod=IfcTimePeriod;var IfcTimeSeries=/*#__PURE__*/function(_IfcLineObject217){_inherits(IfcTimeSeries,_IfcLineObject217);var _super1709=_createSuper(IfcTimeSeries);function IfcTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit){var _this1706;_classCallCheck(this,IfcTimeSeries);_this1706=_super1709.call(this,expressID);_this1706.Name=Name;_this1706.Description=Description;_this1706.StartTime=StartTime;_this1706.EndTime=EndTime;_this1706.TimeSeriesDataType=TimeSeriesDataType;_this1706.DataOrigin=DataOrigin;_this1706.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1706.Unit=Unit;_this1706.type=3101149627;return _this1706;}return _createClass(IfcTimeSeries);}(IfcLineObject);IFC4X32.IfcTimeSeries=IfcTimeSeries;var IfcTimeSeriesValue=/*#__PURE__*/function(_IfcLineObject218){_inherits(IfcTimeSeriesValue,_IfcLineObject218);var _super1710=_createSuper(IfcTimeSeriesValue);function IfcTimeSeriesValue(expressID,ListValues){var _this1707;_classCallCheck(this,IfcTimeSeriesValue);_this1707=_super1710.call(this,expressID);_this1707.ListValues=ListValues;_this1707.type=581633288;return _this1707;}return _createClass(IfcTimeSeriesValue);}(IfcLineObject);IFC4X32.IfcTimeSeriesValue=IfcTimeSeriesValue;var IfcTopologicalRepresentationItem=/*#__PURE__*/function(_IfcRepresentationIte10){_inherits(IfcTopologicalRepresentationItem,_IfcRepresentationIte10);var _super1711=_createSuper(IfcTopologicalRepresentationItem);function IfcTopologicalRepresentationItem(expressID){var _this1708;_classCallCheck(this,IfcTopologicalRepresentationItem);_this1708=_super1711.call(this,expressID);_this1708.type=1377556343;return _this1708;}return _createClass(IfcTopologicalRepresentationItem);}(IfcRepresentationItem);IFC4X32.IfcTopologicalRepresentationItem=IfcTopologicalRepresentationItem;var IfcTopologyRepresentation=/*#__PURE__*/function(_IfcShapeModel6){_inherits(IfcTopologyRepresentation,_IfcShapeModel6);var _super1712=_createSuper(IfcTopologyRepresentation);function IfcTopologyRepresentation(expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items){var _this1709;_classCallCheck(this,IfcTopologyRepresentation);_this1709=_super1712.call(this,expressID,ContextOfItems,RepresentationIdentifier,RepresentationType,Items);_this1709.ContextOfItems=ContextOfItems;_this1709.RepresentationIdentifier=RepresentationIdentifier;_this1709.RepresentationType=RepresentationType;_this1709.Items=Items;_this1709.type=1735638870;return _this1709;}return _createClass(IfcTopologyRepresentation);}(IfcShapeModel);IFC4X32.IfcTopologyRepresentation=IfcTopologyRepresentation;var IfcUnitAssignment=/*#__PURE__*/function(_IfcLineObject219){_inherits(IfcUnitAssignment,_IfcLineObject219);var _super1713=_createSuper(IfcUnitAssignment);function IfcUnitAssignment(expressID,Units){var _this1710;_classCallCheck(this,IfcUnitAssignment);_this1710=_super1713.call(this,expressID);_this1710.Units=Units;_this1710.type=180925521;return _this1710;}return _createClass(IfcUnitAssignment);}(IfcLineObject);IFC4X32.IfcUnitAssignment=IfcUnitAssignment;var IfcVertex=/*#__PURE__*/function(_IfcTopologicalRepres15){_inherits(IfcVertex,_IfcTopologicalRepres15);var _super1714=_createSuper(IfcVertex);function IfcVertex(expressID){var _this1711;_classCallCheck(this,IfcVertex);_this1711=_super1714.call(this,expressID);_this1711.type=2799835756;return _this1711;}return _createClass(IfcVertex);}(IfcTopologicalRepresentationItem);IFC4X32.IfcVertex=IfcVertex;var IfcVertexPoint=/*#__PURE__*/function(_IfcVertex3){_inherits(IfcVertexPoint,_IfcVertex3);var _super1715=_createSuper(IfcVertexPoint);function IfcVertexPoint(expressID,VertexGeometry){var _this1712;_classCallCheck(this,IfcVertexPoint);_this1712=_super1715.call(this,expressID);_this1712.VertexGeometry=VertexGeometry;_this1712.type=1907098498;return _this1712;}return _createClass(IfcVertexPoint);}(IfcVertex);IFC4X32.IfcVertexPoint=IfcVertexPoint;var IfcVirtualGridIntersection=/*#__PURE__*/function(_IfcLineObject220){_inherits(IfcVirtualGridIntersection,_IfcLineObject220);var _super1716=_createSuper(IfcVirtualGridIntersection);function IfcVirtualGridIntersection(expressID,IntersectingAxes,OffsetDistances){var _this1713;_classCallCheck(this,IfcVirtualGridIntersection);_this1713=_super1716.call(this,expressID);_this1713.IntersectingAxes=IntersectingAxes;_this1713.OffsetDistances=OffsetDistances;_this1713.type=891718957;return _this1713;}return _createClass(IfcVirtualGridIntersection);}(IfcLineObject);IFC4X32.IfcVirtualGridIntersection=IfcVirtualGridIntersection;var IfcWorkTime=/*#__PURE__*/function(_IfcSchedulingTime7){_inherits(IfcWorkTime,_IfcSchedulingTime7);var _super1717=_createSuper(IfcWorkTime);function IfcWorkTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,RecurrencePattern,StartDate,FinishDate){var _this1714;_classCallCheck(this,IfcWorkTime);_this1714=_super1717.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this1714.Name=Name;_this1714.DataOrigin=DataOrigin;_this1714.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1714.RecurrencePattern=RecurrencePattern;_this1714.StartDate=StartDate;_this1714.FinishDate=FinishDate;_this1714.type=1236880293;return _this1714;}return _createClass(IfcWorkTime);}(IfcSchedulingTime);IFC4X32.IfcWorkTime=IfcWorkTime;var IfcAlignmentCantSegment=/*#__PURE__*/function(_IfcAlignmentParamete2){_inherits(IfcAlignmentCantSegment,_IfcAlignmentParamete2);var _super1718=_createSuper(IfcAlignmentCantSegment);function IfcAlignmentCantSegment(expressID,StartTag,EndTag,StartDistAlong,HorizontalLength,StartCantLeft,EndCantLeft,StartCantRight,EndCantRight,PredefinedType){var _this1715;_classCallCheck(this,IfcAlignmentCantSegment);_this1715=_super1718.call(this,expressID,StartTag,EndTag);_this1715.StartTag=StartTag;_this1715.EndTag=EndTag;_this1715.StartDistAlong=StartDistAlong;_this1715.HorizontalLength=HorizontalLength;_this1715.StartCantLeft=StartCantLeft;_this1715.EndCantLeft=EndCantLeft;_this1715.StartCantRight=StartCantRight;_this1715.EndCantRight=EndCantRight;_this1715.PredefinedType=PredefinedType;_this1715.type=3752311538;return _this1715;}return _createClass(IfcAlignmentCantSegment);}(IfcAlignmentParameterSegment);IFC4X32.IfcAlignmentCantSegment=IfcAlignmentCantSegment;var IfcAlignmentHorizontalSegment=/*#__PURE__*/function(_IfcAlignmentParamete3){_inherits(IfcAlignmentHorizontalSegment,_IfcAlignmentParamete3);var _super1719=_createSuper(IfcAlignmentHorizontalSegment);function IfcAlignmentHorizontalSegment(expressID,StartTag,EndTag,StartPoint,StartDirection,StartRadiusOfCurvature,EndRadiusOfCurvature,SegmentLength,GravityCenterLineHeight,PredefinedType){var _this1716;_classCallCheck(this,IfcAlignmentHorizontalSegment);_this1716=_super1719.call(this,expressID,StartTag,EndTag);_this1716.StartTag=StartTag;_this1716.EndTag=EndTag;_this1716.StartPoint=StartPoint;_this1716.StartDirection=StartDirection;_this1716.StartRadiusOfCurvature=StartRadiusOfCurvature;_this1716.EndRadiusOfCurvature=EndRadiusOfCurvature;_this1716.SegmentLength=SegmentLength;_this1716.GravityCenterLineHeight=GravityCenterLineHeight;_this1716.PredefinedType=PredefinedType;_this1716.type=536804194;return _this1716;}return _createClass(IfcAlignmentHorizontalSegment);}(IfcAlignmentParameterSegment);IFC4X32.IfcAlignmentHorizontalSegment=IfcAlignmentHorizontalSegment;var IfcApprovalRelationship=/*#__PURE__*/function(_IfcResourceLevelRela10){_inherits(IfcApprovalRelationship,_IfcResourceLevelRela10);var _super1720=_createSuper(IfcApprovalRelationship);function IfcApprovalRelationship(expressID,Name,Description,RelatingApproval,RelatedApprovals){var _this1717;_classCallCheck(this,IfcApprovalRelationship);_this1717=_super1720.call(this,expressID,Name,Description);_this1717.Name=Name;_this1717.Description=Description;_this1717.RelatingApproval=RelatingApproval;_this1717.RelatedApprovals=RelatedApprovals;_this1717.type=3869604511;return _this1717;}return _createClass(IfcApprovalRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcApprovalRelationship=IfcApprovalRelationship;var IfcArbitraryClosedProfileDef=/*#__PURE__*/function(_IfcProfileDef11){_inherits(IfcArbitraryClosedProfileDef,_IfcProfileDef11);var _super1721=_createSuper(IfcArbitraryClosedProfileDef);function IfcArbitraryClosedProfileDef(expressID,ProfileType,ProfileName,OuterCurve){var _this1718;_classCallCheck(this,IfcArbitraryClosedProfileDef);_this1718=_super1721.call(this,expressID,ProfileType,ProfileName);_this1718.ProfileType=ProfileType;_this1718.ProfileName=ProfileName;_this1718.OuterCurve=OuterCurve;_this1718.type=3798115385;return _this1718;}return _createClass(IfcArbitraryClosedProfileDef);}(IfcProfileDef);IFC4X32.IfcArbitraryClosedProfileDef=IfcArbitraryClosedProfileDef;var IfcArbitraryOpenProfileDef=/*#__PURE__*/function(_IfcProfileDef12){_inherits(IfcArbitraryOpenProfileDef,_IfcProfileDef12);var _super1722=_createSuper(IfcArbitraryOpenProfileDef);function IfcArbitraryOpenProfileDef(expressID,ProfileType,ProfileName,Curve){var _this1719;_classCallCheck(this,IfcArbitraryOpenProfileDef);_this1719=_super1722.call(this,expressID,ProfileType,ProfileName);_this1719.ProfileType=ProfileType;_this1719.ProfileName=ProfileName;_this1719.Curve=Curve;_this1719.type=1310608509;return _this1719;}return _createClass(IfcArbitraryOpenProfileDef);}(IfcProfileDef);IFC4X32.IfcArbitraryOpenProfileDef=IfcArbitraryOpenProfileDef;var IfcArbitraryProfileDefWithVoids=/*#__PURE__*/function(_IfcArbitraryClosedPr3){_inherits(IfcArbitraryProfileDefWithVoids,_IfcArbitraryClosedPr3);var _super1723=_createSuper(IfcArbitraryProfileDefWithVoids);function IfcArbitraryProfileDefWithVoids(expressID,ProfileType,ProfileName,OuterCurve,InnerCurves){var _this1720;_classCallCheck(this,IfcArbitraryProfileDefWithVoids);_this1720=_super1723.call(this,expressID,ProfileType,ProfileName,OuterCurve);_this1720.ProfileType=ProfileType;_this1720.ProfileName=ProfileName;_this1720.OuterCurve=OuterCurve;_this1720.InnerCurves=InnerCurves;_this1720.type=2705031697;return _this1720;}return _createClass(IfcArbitraryProfileDefWithVoids);}(IfcArbitraryClosedProfileDef);IFC4X32.IfcArbitraryProfileDefWithVoids=IfcArbitraryProfileDefWithVoids;var IfcBlobTexture=/*#__PURE__*/function(_IfcSurfaceTexture7){_inherits(IfcBlobTexture,_IfcSurfaceTexture7);var _super1724=_createSuper(IfcBlobTexture);function IfcBlobTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter,RasterFormat,RasterCode){var _this1721;_classCallCheck(this,IfcBlobTexture);_this1721=_super1724.call(this,expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter);_this1721.RepeatS=RepeatS;_this1721.RepeatT=RepeatT;_this1721.Mode=Mode;_this1721.TextureTransform=TextureTransform;_this1721.Parameter=Parameter;_this1721.RasterFormat=RasterFormat;_this1721.RasterCode=RasterCode;_this1721.type=616511568;return _this1721;}return _createClass(IfcBlobTexture);}(IfcSurfaceTexture);IFC4X32.IfcBlobTexture=IfcBlobTexture;var IfcCenterLineProfileDef=/*#__PURE__*/function(_IfcArbitraryOpenProf3){_inherits(IfcCenterLineProfileDef,_IfcArbitraryOpenProf3);var _super1725=_createSuper(IfcCenterLineProfileDef);function IfcCenterLineProfileDef(expressID,ProfileType,ProfileName,Curve,Thickness){var _this1722;_classCallCheck(this,IfcCenterLineProfileDef);_this1722=_super1725.call(this,expressID,ProfileType,ProfileName,Curve);_this1722.ProfileType=ProfileType;_this1722.ProfileName=ProfileName;_this1722.Curve=Curve;_this1722.Thickness=Thickness;_this1722.type=3150382593;return _this1722;}return _createClass(IfcCenterLineProfileDef);}(IfcArbitraryOpenProfileDef);IFC4X32.IfcCenterLineProfileDef=IfcCenterLineProfileDef;var IfcClassification=/*#__PURE__*/function(_IfcExternalInformati5){_inherits(IfcClassification,_IfcExternalInformati5);var _super1726=_createSuper(IfcClassification);function IfcClassification(expressID,Source,Edition,EditionDate,Name,Description,Specification,ReferenceTokens){var _this1723;_classCallCheck(this,IfcClassification);_this1723=_super1726.call(this,expressID);_this1723.Source=Source;_this1723.Edition=Edition;_this1723.EditionDate=EditionDate;_this1723.Name=Name;_this1723.Description=Description;_this1723.Specification=Specification;_this1723.ReferenceTokens=ReferenceTokens;_this1723.type=747523909;return _this1723;}return _createClass(IfcClassification);}(IfcExternalInformation);IFC4X32.IfcClassification=IfcClassification;var IfcClassificationReference=/*#__PURE__*/function(_IfcExternalReference18){_inherits(IfcClassificationReference,_IfcExternalReference18);var _super1727=_createSuper(IfcClassificationReference);function IfcClassificationReference(expressID,Location,Identification,Name,ReferencedSource,Description,Sort){var _this1724;_classCallCheck(this,IfcClassificationReference);_this1724=_super1727.call(this,expressID,Location,Identification,Name);_this1724.Location=Location;_this1724.Identification=Identification;_this1724.Name=Name;_this1724.ReferencedSource=ReferencedSource;_this1724.Description=Description;_this1724.Sort=Sort;_this1724.type=647927063;return _this1724;}return _createClass(IfcClassificationReference);}(IfcExternalReference);IFC4X32.IfcClassificationReference=IfcClassificationReference;var IfcColourRgbList=/*#__PURE__*/function(_IfcPresentationItem28){_inherits(IfcColourRgbList,_IfcPresentationItem28);var _super1728=_createSuper(IfcColourRgbList);function IfcColourRgbList(expressID,ColourList){var _this1725;_classCallCheck(this,IfcColourRgbList);_this1725=_super1728.call(this,expressID);_this1725.ColourList=ColourList;_this1725.type=3285139300;return _this1725;}return _createClass(IfcColourRgbList);}(IfcPresentationItem);IFC4X32.IfcColourRgbList=IfcColourRgbList;var IfcColourSpecification=/*#__PURE__*/function(_IfcPresentationItem29){_inherits(IfcColourSpecification,_IfcPresentationItem29);var _super1729=_createSuper(IfcColourSpecification);function IfcColourSpecification(expressID,Name){var _this1726;_classCallCheck(this,IfcColourSpecification);_this1726=_super1729.call(this,expressID);_this1726.Name=Name;_this1726.type=3264961684;return _this1726;}return _createClass(IfcColourSpecification);}(IfcPresentationItem);IFC4X32.IfcColourSpecification=IfcColourSpecification;var IfcCompositeProfileDef=/*#__PURE__*/function(_IfcProfileDef13){_inherits(IfcCompositeProfileDef,_IfcProfileDef13);var _super1730=_createSuper(IfcCompositeProfileDef);function IfcCompositeProfileDef(expressID,ProfileType,ProfileName,Profiles,Label){var _this1727;_classCallCheck(this,IfcCompositeProfileDef);_this1727=_super1730.call(this,expressID,ProfileType,ProfileName);_this1727.ProfileType=ProfileType;_this1727.ProfileName=ProfileName;_this1727.Profiles=Profiles;_this1727.Label=Label;_this1727.type=1485152156;return _this1727;}return _createClass(IfcCompositeProfileDef);}(IfcProfileDef);IFC4X32.IfcCompositeProfileDef=IfcCompositeProfileDef;var IfcConnectedFaceSet=/*#__PURE__*/function(_IfcTopologicalRepres16){_inherits(IfcConnectedFaceSet,_IfcTopologicalRepres16);var _super1731=_createSuper(IfcConnectedFaceSet);function IfcConnectedFaceSet(expressID,CfsFaces){var _this1728;_classCallCheck(this,IfcConnectedFaceSet);_this1728=_super1731.call(this,expressID);_this1728.CfsFaces=CfsFaces;_this1728.type=370225590;return _this1728;}return _createClass(IfcConnectedFaceSet);}(IfcTopologicalRepresentationItem);IFC4X32.IfcConnectedFaceSet=IfcConnectedFaceSet;var IfcConnectionCurveGeometry=/*#__PURE__*/function(_IfcConnectionGeometr12){_inherits(IfcConnectionCurveGeometry,_IfcConnectionGeometr12);var _super1732=_createSuper(IfcConnectionCurveGeometry);function IfcConnectionCurveGeometry(expressID,CurveOnRelatingElement,CurveOnRelatedElement){var _this1729;_classCallCheck(this,IfcConnectionCurveGeometry);_this1729=_super1732.call(this,expressID);_this1729.CurveOnRelatingElement=CurveOnRelatingElement;_this1729.CurveOnRelatedElement=CurveOnRelatedElement;_this1729.type=1981873012;return _this1729;}return _createClass(IfcConnectionCurveGeometry);}(IfcConnectionGeometry);IFC4X32.IfcConnectionCurveGeometry=IfcConnectionCurveGeometry;var IfcConnectionPointEccentricity=/*#__PURE__*/function(_IfcConnectionPointGe3){_inherits(IfcConnectionPointEccentricity,_IfcConnectionPointGe3);var _super1733=_createSuper(IfcConnectionPointEccentricity);function IfcConnectionPointEccentricity(expressID,PointOnRelatingElement,PointOnRelatedElement,EccentricityInX,EccentricityInY,EccentricityInZ){var _this1730;_classCallCheck(this,IfcConnectionPointEccentricity);_this1730=_super1733.call(this,expressID,PointOnRelatingElement,PointOnRelatedElement);_this1730.PointOnRelatingElement=PointOnRelatingElement;_this1730.PointOnRelatedElement=PointOnRelatedElement;_this1730.EccentricityInX=EccentricityInX;_this1730.EccentricityInY=EccentricityInY;_this1730.EccentricityInZ=EccentricityInZ;_this1730.type=45288368;return _this1730;}return _createClass(IfcConnectionPointEccentricity);}(IfcConnectionPointGeometry);IFC4X32.IfcConnectionPointEccentricity=IfcConnectionPointEccentricity;var IfcContextDependentUnit=/*#__PURE__*/function(_IfcNamedUnit8){_inherits(IfcContextDependentUnit,_IfcNamedUnit8);var _super1734=_createSuper(IfcContextDependentUnit);function IfcContextDependentUnit(expressID,Dimensions,UnitType,Name){var _this1731;_classCallCheck(this,IfcContextDependentUnit);_this1731=_super1734.call(this,expressID,Dimensions,UnitType);_this1731.Dimensions=Dimensions;_this1731.UnitType=UnitType;_this1731.Name=Name;_this1731.type=3050246964;return _this1731;}return _createClass(IfcContextDependentUnit);}(IfcNamedUnit);IFC4X32.IfcContextDependentUnit=IfcContextDependentUnit;var IfcConversionBasedUnit=/*#__PURE__*/function(_IfcNamedUnit9){_inherits(IfcConversionBasedUnit,_IfcNamedUnit9);var _super1735=_createSuper(IfcConversionBasedUnit);function IfcConversionBasedUnit(expressID,Dimensions,UnitType,Name,ConversionFactor){var _this1732;_classCallCheck(this,IfcConversionBasedUnit);_this1732=_super1735.call(this,expressID,Dimensions,UnitType);_this1732.Dimensions=Dimensions;_this1732.UnitType=UnitType;_this1732.Name=Name;_this1732.ConversionFactor=ConversionFactor;_this1732.type=2889183280;return _this1732;}return _createClass(IfcConversionBasedUnit);}(IfcNamedUnit);IFC4X32.IfcConversionBasedUnit=IfcConversionBasedUnit;var IfcConversionBasedUnitWithOffset=/*#__PURE__*/function(_IfcConversionBasedUn2){_inherits(IfcConversionBasedUnitWithOffset,_IfcConversionBasedUn2);var _super1736=_createSuper(IfcConversionBasedUnitWithOffset);function IfcConversionBasedUnitWithOffset(expressID,Dimensions,UnitType,Name,ConversionFactor,ConversionOffset){var _this1733;_classCallCheck(this,IfcConversionBasedUnitWithOffset);_this1733=_super1736.call(this,expressID,Dimensions,UnitType,Name,ConversionFactor);_this1733.Dimensions=Dimensions;_this1733.UnitType=UnitType;_this1733.Name=Name;_this1733.ConversionFactor=ConversionFactor;_this1733.ConversionOffset=ConversionOffset;_this1733.type=2713554722;return _this1733;}return _createClass(IfcConversionBasedUnitWithOffset);}(IfcConversionBasedUnit);IFC4X32.IfcConversionBasedUnitWithOffset=IfcConversionBasedUnitWithOffset;var IfcCurrencyRelationship=/*#__PURE__*/function(_IfcResourceLevelRela11){_inherits(IfcCurrencyRelationship,_IfcResourceLevelRela11);var _super1737=_createSuper(IfcCurrencyRelationship);function IfcCurrencyRelationship(expressID,Name,Description,RelatingMonetaryUnit,RelatedMonetaryUnit,ExchangeRate,RateDateTime,RateSource){var _this1734;_classCallCheck(this,IfcCurrencyRelationship);_this1734=_super1737.call(this,expressID,Name,Description);_this1734.Name=Name;_this1734.Description=Description;_this1734.RelatingMonetaryUnit=RelatingMonetaryUnit;_this1734.RelatedMonetaryUnit=RelatedMonetaryUnit;_this1734.ExchangeRate=ExchangeRate;_this1734.RateDateTime=RateDateTime;_this1734.RateSource=RateSource;_this1734.type=539742890;return _this1734;}return _createClass(IfcCurrencyRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcCurrencyRelationship=IfcCurrencyRelationship;var IfcCurveStyle=/*#__PURE__*/function(_IfcPresentationStyle12){_inherits(IfcCurveStyle,_IfcPresentationStyle12);var _super1738=_createSuper(IfcCurveStyle);function IfcCurveStyle(expressID,Name,CurveFont,CurveWidth,CurveColour,ModelOrDraughting){var _this1735;_classCallCheck(this,IfcCurveStyle);_this1735=_super1738.call(this,expressID,Name);_this1735.Name=Name;_this1735.CurveFont=CurveFont;_this1735.CurveWidth=CurveWidth;_this1735.CurveColour=CurveColour;_this1735.ModelOrDraughting=ModelOrDraughting;_this1735.type=3800577675;return _this1735;}return _createClass(IfcCurveStyle);}(IfcPresentationStyle);IFC4X32.IfcCurveStyle=IfcCurveStyle;var IfcCurveStyleFont=/*#__PURE__*/function(_IfcPresentationItem30){_inherits(IfcCurveStyleFont,_IfcPresentationItem30);var _super1739=_createSuper(IfcCurveStyleFont);function IfcCurveStyleFont(expressID,Name,PatternList){var _this1736;_classCallCheck(this,IfcCurveStyleFont);_this1736=_super1739.call(this,expressID);_this1736.Name=Name;_this1736.PatternList=PatternList;_this1736.type=1105321065;return _this1736;}return _createClass(IfcCurveStyleFont);}(IfcPresentationItem);IFC4X32.IfcCurveStyleFont=IfcCurveStyleFont;var IfcCurveStyleFontAndScaling=/*#__PURE__*/function(_IfcPresentationItem31){_inherits(IfcCurveStyleFontAndScaling,_IfcPresentationItem31);var _super1740=_createSuper(IfcCurveStyleFontAndScaling);function IfcCurveStyleFontAndScaling(expressID,Name,CurveStyleFont,CurveFontScaling){var _this1737;_classCallCheck(this,IfcCurveStyleFontAndScaling);_this1737=_super1740.call(this,expressID);_this1737.Name=Name;_this1737.CurveStyleFont=CurveStyleFont;_this1737.CurveFontScaling=CurveFontScaling;_this1737.type=2367409068;return _this1737;}return _createClass(IfcCurveStyleFontAndScaling);}(IfcPresentationItem);IFC4X32.IfcCurveStyleFontAndScaling=IfcCurveStyleFontAndScaling;var IfcCurveStyleFontPattern=/*#__PURE__*/function(_IfcPresentationItem32){_inherits(IfcCurveStyleFontPattern,_IfcPresentationItem32);var _super1741=_createSuper(IfcCurveStyleFontPattern);function IfcCurveStyleFontPattern(expressID,VisibleSegmentLength,InvisibleSegmentLength){var _this1738;_classCallCheck(this,IfcCurveStyleFontPattern);_this1738=_super1741.call(this,expressID);_this1738.VisibleSegmentLength=VisibleSegmentLength;_this1738.InvisibleSegmentLength=InvisibleSegmentLength;_this1738.type=3510044353;return _this1738;}return _createClass(IfcCurveStyleFontPattern);}(IfcPresentationItem);IFC4X32.IfcCurveStyleFontPattern=IfcCurveStyleFontPattern;var IfcDerivedProfileDef=/*#__PURE__*/function(_IfcProfileDef14){_inherits(IfcDerivedProfileDef,_IfcProfileDef14);var _super1742=_createSuper(IfcDerivedProfileDef);function IfcDerivedProfileDef(expressID,ProfileType,ProfileName,ParentProfile,Operator,Label){var _this1739;_classCallCheck(this,IfcDerivedProfileDef);_this1739=_super1742.call(this,expressID,ProfileType,ProfileName);_this1739.ProfileType=ProfileType;_this1739.ProfileName=ProfileName;_this1739.ParentProfile=ParentProfile;_this1739.Operator=Operator;_this1739.Label=Label;_this1739.type=3632507154;return _this1739;}return _createClass(IfcDerivedProfileDef);}(IfcProfileDef);IFC4X32.IfcDerivedProfileDef=IfcDerivedProfileDef;var IfcDocumentInformation=/*#__PURE__*/function(_IfcExternalInformati6){_inherits(IfcDocumentInformation,_IfcExternalInformati6);var _super1743=_createSuper(IfcDocumentInformation);function IfcDocumentInformation(expressID,Identification,Name,Description,Location,Purpose,IntendedUse,Scope,Revision,DocumentOwner,Editors,CreationTime,LastRevisionTime,ElectronicFormat,ValidFrom,ValidUntil,Confidentiality,Status){var _this1740;_classCallCheck(this,IfcDocumentInformation);_this1740=_super1743.call(this,expressID);_this1740.Identification=Identification;_this1740.Name=Name;_this1740.Description=Description;_this1740.Location=Location;_this1740.Purpose=Purpose;_this1740.IntendedUse=IntendedUse;_this1740.Scope=Scope;_this1740.Revision=Revision;_this1740.DocumentOwner=DocumentOwner;_this1740.Editors=Editors;_this1740.CreationTime=CreationTime;_this1740.LastRevisionTime=LastRevisionTime;_this1740.ElectronicFormat=ElectronicFormat;_this1740.ValidFrom=ValidFrom;_this1740.ValidUntil=ValidUntil;_this1740.Confidentiality=Confidentiality;_this1740.Status=Status;_this1740.type=1154170062;return _this1740;}return _createClass(IfcDocumentInformation);}(IfcExternalInformation);IFC4X32.IfcDocumentInformation=IfcDocumentInformation;var IfcDocumentInformationRelationship=/*#__PURE__*/function(_IfcResourceLevelRela12){_inherits(IfcDocumentInformationRelationship,_IfcResourceLevelRela12);var _super1744=_createSuper(IfcDocumentInformationRelationship);function IfcDocumentInformationRelationship(expressID,Name,Description,RelatingDocument,RelatedDocuments,RelationshipType){var _this1741;_classCallCheck(this,IfcDocumentInformationRelationship);_this1741=_super1744.call(this,expressID,Name,Description);_this1741.Name=Name;_this1741.Description=Description;_this1741.RelatingDocument=RelatingDocument;_this1741.RelatedDocuments=RelatedDocuments;_this1741.RelationshipType=RelationshipType;_this1741.type=770865208;return _this1741;}return _createClass(IfcDocumentInformationRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcDocumentInformationRelationship=IfcDocumentInformationRelationship;var IfcDocumentReference=/*#__PURE__*/function(_IfcExternalReference19){_inherits(IfcDocumentReference,_IfcExternalReference19);var _super1745=_createSuper(IfcDocumentReference);function IfcDocumentReference(expressID,Location,Identification,Name,Description,ReferencedDocument){var _this1742;_classCallCheck(this,IfcDocumentReference);_this1742=_super1745.call(this,expressID,Location,Identification,Name);_this1742.Location=Location;_this1742.Identification=Identification;_this1742.Name=Name;_this1742.Description=Description;_this1742.ReferencedDocument=ReferencedDocument;_this1742.type=3732053477;return _this1742;}return _createClass(IfcDocumentReference);}(IfcExternalReference);IFC4X32.IfcDocumentReference=IfcDocumentReference;var IfcEdge=/*#__PURE__*/function(_IfcTopologicalRepres17){_inherits(IfcEdge,_IfcTopologicalRepres17);var _super1746=_createSuper(IfcEdge);function IfcEdge(expressID,EdgeStart,EdgeEnd){var _this1743;_classCallCheck(this,IfcEdge);_this1743=_super1746.call(this,expressID);_this1743.EdgeStart=EdgeStart;_this1743.EdgeEnd=EdgeEnd;_this1743.type=3900360178;return _this1743;}return _createClass(IfcEdge);}(IfcTopologicalRepresentationItem);IFC4X32.IfcEdge=IfcEdge;var IfcEdgeCurve=/*#__PURE__*/function(_IfcEdge7){_inherits(IfcEdgeCurve,_IfcEdge7);var _super1747=_createSuper(IfcEdgeCurve);function IfcEdgeCurve(expressID,EdgeStart,EdgeEnd,EdgeGeometry,SameSense){var _this1744;_classCallCheck(this,IfcEdgeCurve);_this1744=_super1747.call(this,expressID,EdgeStart,EdgeEnd);_this1744.EdgeStart=EdgeStart;_this1744.EdgeEnd=EdgeEnd;_this1744.EdgeGeometry=EdgeGeometry;_this1744.SameSense=SameSense;_this1744.type=476780140;return _this1744;}return _createClass(IfcEdgeCurve);}(IfcEdge);IFC4X32.IfcEdgeCurve=IfcEdgeCurve;var IfcEventTime=/*#__PURE__*/function(_IfcSchedulingTime8){_inherits(IfcEventTime,_IfcSchedulingTime8);var _super1748=_createSuper(IfcEventTime);function IfcEventTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,ActualDate,EarlyDate,LateDate,ScheduleDate){var _this1745;_classCallCheck(this,IfcEventTime);_this1745=_super1748.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this1745.Name=Name;_this1745.DataOrigin=DataOrigin;_this1745.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1745.ActualDate=ActualDate;_this1745.EarlyDate=EarlyDate;_this1745.LateDate=LateDate;_this1745.ScheduleDate=ScheduleDate;_this1745.type=211053100;return _this1745;}return _createClass(IfcEventTime);}(IfcSchedulingTime);IFC4X32.IfcEventTime=IfcEventTime;var IfcExtendedProperties=/*#__PURE__*/function(_IfcPropertyAbstracti6){_inherits(IfcExtendedProperties,_IfcPropertyAbstracti6);var _super1749=_createSuper(IfcExtendedProperties);function IfcExtendedProperties(expressID,Name,Description,Properties2){var _this1746;_classCallCheck(this,IfcExtendedProperties);_this1746=_super1749.call(this,expressID);_this1746.Name=Name;_this1746.Description=Description;_this1746.Properties=Properties2;_this1746.type=297599258;return _this1746;}return _createClass(IfcExtendedProperties);}(IfcPropertyAbstraction);IFC4X32.IfcExtendedProperties=IfcExtendedProperties;var IfcExternalReferenceRelationship=/*#__PURE__*/function(_IfcResourceLevelRela13){_inherits(IfcExternalReferenceRelationship,_IfcResourceLevelRela13);var _super1750=_createSuper(IfcExternalReferenceRelationship);function IfcExternalReferenceRelationship(expressID,Name,Description,RelatingReference,RelatedResourceObjects){var _this1747;_classCallCheck(this,IfcExternalReferenceRelationship);_this1747=_super1750.call(this,expressID,Name,Description);_this1747.Name=Name;_this1747.Description=Description;_this1747.RelatingReference=RelatingReference;_this1747.RelatedResourceObjects=RelatedResourceObjects;_this1747.type=1437805879;return _this1747;}return _createClass(IfcExternalReferenceRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcExternalReferenceRelationship=IfcExternalReferenceRelationship;var IfcFace=/*#__PURE__*/function(_IfcTopologicalRepres18){_inherits(IfcFace,_IfcTopologicalRepres18);var _super1751=_createSuper(IfcFace);function IfcFace(expressID,Bounds){var _this1748;_classCallCheck(this,IfcFace);_this1748=_super1751.call(this,expressID);_this1748.Bounds=Bounds;_this1748.type=2556980723;return _this1748;}return _createClass(IfcFace);}(IfcTopologicalRepresentationItem);IFC4X32.IfcFace=IfcFace;var IfcFaceBound=/*#__PURE__*/function(_IfcTopologicalRepres19){_inherits(IfcFaceBound,_IfcTopologicalRepres19);var _super1752=_createSuper(IfcFaceBound);function IfcFaceBound(expressID,Bound,Orientation){var _this1749;_classCallCheck(this,IfcFaceBound);_this1749=_super1752.call(this,expressID);_this1749.Bound=Bound;_this1749.Orientation=Orientation;_this1749.type=1809719519;return _this1749;}return _createClass(IfcFaceBound);}(IfcTopologicalRepresentationItem);IFC4X32.IfcFaceBound=IfcFaceBound;var IfcFaceOuterBound=/*#__PURE__*/function(_IfcFaceBound3){_inherits(IfcFaceOuterBound,_IfcFaceBound3);var _super1753=_createSuper(IfcFaceOuterBound);function IfcFaceOuterBound(expressID,Bound,Orientation){var _this1750;_classCallCheck(this,IfcFaceOuterBound);_this1750=_super1753.call(this,expressID,Bound,Orientation);_this1750.Bound=Bound;_this1750.Orientation=Orientation;_this1750.type=803316827;return _this1750;}return _createClass(IfcFaceOuterBound);}(IfcFaceBound);IFC4X32.IfcFaceOuterBound=IfcFaceOuterBound;var IfcFaceSurface=/*#__PURE__*/function(_IfcFace3){_inherits(IfcFaceSurface,_IfcFace3);var _super1754=_createSuper(IfcFaceSurface);function IfcFaceSurface(expressID,Bounds,FaceSurface,SameSense){var _this1751;_classCallCheck(this,IfcFaceSurface);_this1751=_super1754.call(this,expressID,Bounds);_this1751.Bounds=Bounds;_this1751.FaceSurface=FaceSurface;_this1751.SameSense=SameSense;_this1751.type=3008276851;return _this1751;}return _createClass(IfcFaceSurface);}(IfcFace);IFC4X32.IfcFaceSurface=IfcFaceSurface;var IfcFailureConnectionCondition=/*#__PURE__*/function(_IfcStructuralConnect11){_inherits(IfcFailureConnectionCondition,_IfcStructuralConnect11);var _super1755=_createSuper(IfcFailureConnectionCondition);function IfcFailureConnectionCondition(expressID,Name,TensionFailureX,TensionFailureY,TensionFailureZ,CompressionFailureX,CompressionFailureY,CompressionFailureZ){var _this1752;_classCallCheck(this,IfcFailureConnectionCondition);_this1752=_super1755.call(this,expressID,Name);_this1752.Name=Name;_this1752.TensionFailureX=TensionFailureX;_this1752.TensionFailureY=TensionFailureY;_this1752.TensionFailureZ=TensionFailureZ;_this1752.CompressionFailureX=CompressionFailureX;_this1752.CompressionFailureY=CompressionFailureY;_this1752.CompressionFailureZ=CompressionFailureZ;_this1752.type=4219587988;return _this1752;}return _createClass(IfcFailureConnectionCondition);}(IfcStructuralConnectionCondition);IFC4X32.IfcFailureConnectionCondition=IfcFailureConnectionCondition;var IfcFillAreaStyle=/*#__PURE__*/function(_IfcPresentationStyle13){_inherits(IfcFillAreaStyle,_IfcPresentationStyle13);var _super1756=_createSuper(IfcFillAreaStyle);function IfcFillAreaStyle(expressID,Name,FillStyles,ModelOrDraughting){var _this1753;_classCallCheck(this,IfcFillAreaStyle);_this1753=_super1756.call(this,expressID,Name);_this1753.Name=Name;_this1753.FillStyles=FillStyles;_this1753.ModelOrDraughting=ModelOrDraughting;_this1753.type=738692330;return _this1753;}return _createClass(IfcFillAreaStyle);}(IfcPresentationStyle);IFC4X32.IfcFillAreaStyle=IfcFillAreaStyle;var IfcGeometricRepresentationContext=/*#__PURE__*/function(_IfcRepresentationCon3){_inherits(IfcGeometricRepresentationContext,_IfcRepresentationCon3);var _super1757=_createSuper(IfcGeometricRepresentationContext);function IfcGeometricRepresentationContext(expressID,ContextIdentifier,ContextType,CoordinateSpaceDimension,Precision,WorldCoordinateSystem,TrueNorth){var _this1754;_classCallCheck(this,IfcGeometricRepresentationContext);_this1754=_super1757.call(this,expressID,ContextIdentifier,ContextType);_this1754.ContextIdentifier=ContextIdentifier;_this1754.ContextType=ContextType;_this1754.CoordinateSpaceDimension=CoordinateSpaceDimension;_this1754.Precision=Precision;_this1754.WorldCoordinateSystem=WorldCoordinateSystem;_this1754.TrueNorth=TrueNorth;_this1754.type=3448662350;return _this1754;}return _createClass(IfcGeometricRepresentationContext);}(IfcRepresentationContext);IFC4X32.IfcGeometricRepresentationContext=IfcGeometricRepresentationContext;var IfcGeometricRepresentationItem=/*#__PURE__*/function(_IfcRepresentationIte11){_inherits(IfcGeometricRepresentationItem,_IfcRepresentationIte11);var _super1758=_createSuper(IfcGeometricRepresentationItem);function IfcGeometricRepresentationItem(expressID){var _this1755;_classCallCheck(this,IfcGeometricRepresentationItem);_this1755=_super1758.call(this,expressID);_this1755.type=2453401579;return _this1755;}return _createClass(IfcGeometricRepresentationItem);}(IfcRepresentationItem);IFC4X32.IfcGeometricRepresentationItem=IfcGeometricRepresentationItem;var IfcGeometricRepresentationSubContext=/*#__PURE__*/function(_IfcGeometricRepresen56){_inherits(IfcGeometricRepresentationSubContext,_IfcGeometricRepresen56);var _super1759=_createSuper(IfcGeometricRepresentationSubContext);function IfcGeometricRepresentationSubContext(expressID,ContextIdentifier,ContextType,WorldCoordinateSystem,ParentContext,TargetScale,TargetView,UserDefinedTargetView){var _this1756;_classCallCheck(this,IfcGeometricRepresentationSubContext);_this1756=_super1759.call(this,expressID,ContextIdentifier,ContextType,new IfcDimensionCount(0),null,WorldCoordinateSystem,null);_this1756.ContextIdentifier=ContextIdentifier;_this1756.ContextType=ContextType;_this1756.WorldCoordinateSystem=WorldCoordinateSystem;_this1756.ParentContext=ParentContext;_this1756.TargetScale=TargetScale;_this1756.TargetView=TargetView;_this1756.UserDefinedTargetView=UserDefinedTargetView;_this1756.type=4142052618;return _this1756;}return _createClass(IfcGeometricRepresentationSubContext);}(IfcGeometricRepresentationContext);IFC4X32.IfcGeometricRepresentationSubContext=IfcGeometricRepresentationSubContext;var IfcGeometricSet=/*#__PURE__*/function(_IfcGeometricRepresen57){_inherits(IfcGeometricSet,_IfcGeometricRepresen57);var _super1760=_createSuper(IfcGeometricSet);function IfcGeometricSet(expressID,Elements){var _this1757;_classCallCheck(this,IfcGeometricSet);_this1757=_super1760.call(this,expressID);_this1757.Elements=Elements;_this1757.type=3590301190;return _this1757;}return _createClass(IfcGeometricSet);}(IfcGeometricRepresentationItem);IFC4X32.IfcGeometricSet=IfcGeometricSet;var IfcGridPlacement=/*#__PURE__*/function(_IfcObjectPlacement5){_inherits(IfcGridPlacement,_IfcObjectPlacement5);var _super1761=_createSuper(IfcGridPlacement);function IfcGridPlacement(expressID,PlacementRelTo,PlacementLocation,PlacementRefDirection){var _this1758;_classCallCheck(this,IfcGridPlacement);_this1758=_super1761.call(this,expressID,PlacementRelTo);_this1758.PlacementRelTo=PlacementRelTo;_this1758.PlacementLocation=PlacementLocation;_this1758.PlacementRefDirection=PlacementRefDirection;_this1758.type=178086475;return _this1758;}return _createClass(IfcGridPlacement);}(IfcObjectPlacement);IFC4X32.IfcGridPlacement=IfcGridPlacement;var IfcHalfSpaceSolid=/*#__PURE__*/function(_IfcGeometricRepresen58){_inherits(IfcHalfSpaceSolid,_IfcGeometricRepresen58);var _super1762=_createSuper(IfcHalfSpaceSolid);function IfcHalfSpaceSolid(expressID,BaseSurface,AgreementFlag){var _this1759;_classCallCheck(this,IfcHalfSpaceSolid);_this1759=_super1762.call(this,expressID);_this1759.BaseSurface=BaseSurface;_this1759.AgreementFlag=AgreementFlag;_this1759.type=812098782;return _this1759;}return _createClass(IfcHalfSpaceSolid);}(IfcGeometricRepresentationItem);IFC4X32.IfcHalfSpaceSolid=IfcHalfSpaceSolid;var IfcImageTexture=/*#__PURE__*/function(_IfcSurfaceTexture8){_inherits(IfcImageTexture,_IfcSurfaceTexture8);var _super1763=_createSuper(IfcImageTexture);function IfcImageTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter,URLReference){var _this1760;_classCallCheck(this,IfcImageTexture);_this1760=_super1763.call(this,expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter);_this1760.RepeatS=RepeatS;_this1760.RepeatT=RepeatT;_this1760.Mode=Mode;_this1760.TextureTransform=TextureTransform;_this1760.Parameter=Parameter;_this1760.URLReference=URLReference;_this1760.type=3905492369;return _this1760;}return _createClass(IfcImageTexture);}(IfcSurfaceTexture);IFC4X32.IfcImageTexture=IfcImageTexture;var IfcIndexedColourMap=/*#__PURE__*/function(_IfcPresentationItem33){_inherits(IfcIndexedColourMap,_IfcPresentationItem33);var _super1764=_createSuper(IfcIndexedColourMap);function IfcIndexedColourMap(expressID,MappedTo,Opacity,Colours,ColourIndex){var _this1761;_classCallCheck(this,IfcIndexedColourMap);_this1761=_super1764.call(this,expressID);_this1761.MappedTo=MappedTo;_this1761.Opacity=Opacity;_this1761.Colours=Colours;_this1761.ColourIndex=ColourIndex;_this1761.type=3570813810;return _this1761;}return _createClass(IfcIndexedColourMap);}(IfcPresentationItem);IFC4X32.IfcIndexedColourMap=IfcIndexedColourMap;var IfcIndexedTextureMap=/*#__PURE__*/function(_IfcTextureCoordinate9){_inherits(IfcIndexedTextureMap,_IfcTextureCoordinate9);var _super1765=_createSuper(IfcIndexedTextureMap);function IfcIndexedTextureMap(expressID,Maps,MappedTo,TexCoords){var _this1762;_classCallCheck(this,IfcIndexedTextureMap);_this1762=_super1765.call(this,expressID,Maps);_this1762.Maps=Maps;_this1762.MappedTo=MappedTo;_this1762.TexCoords=TexCoords;_this1762.type=1437953363;return _this1762;}return _createClass(IfcIndexedTextureMap);}(IfcTextureCoordinate);IFC4X32.IfcIndexedTextureMap=IfcIndexedTextureMap;var IfcIndexedTriangleTextureMap=/*#__PURE__*/function(_IfcIndexedTextureMap2){_inherits(IfcIndexedTriangleTextureMap,_IfcIndexedTextureMap2);var _super1766=_createSuper(IfcIndexedTriangleTextureMap);function IfcIndexedTriangleTextureMap(expressID,Maps,MappedTo,TexCoords,TexCoordIndex){var _this1763;_classCallCheck(this,IfcIndexedTriangleTextureMap);_this1763=_super1766.call(this,expressID,Maps,MappedTo,TexCoords);_this1763.Maps=Maps;_this1763.MappedTo=MappedTo;_this1763.TexCoords=TexCoords;_this1763.TexCoordIndex=TexCoordIndex;_this1763.type=2133299955;return _this1763;}return _createClass(IfcIndexedTriangleTextureMap);}(IfcIndexedTextureMap);IFC4X32.IfcIndexedTriangleTextureMap=IfcIndexedTriangleTextureMap;var IfcIrregularTimeSeries=/*#__PURE__*/function(_IfcTimeSeries5){_inherits(IfcIrregularTimeSeries,_IfcTimeSeries5);var _super1767=_createSuper(IfcIrregularTimeSeries);function IfcIrregularTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit,Values){var _this1764;_classCallCheck(this,IfcIrregularTimeSeries);_this1764=_super1767.call(this,expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit);_this1764.Name=Name;_this1764.Description=Description;_this1764.StartTime=StartTime;_this1764.EndTime=EndTime;_this1764.TimeSeriesDataType=TimeSeriesDataType;_this1764.DataOrigin=DataOrigin;_this1764.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1764.Unit=Unit;_this1764.Values=Values;_this1764.type=3741457305;return _this1764;}return _createClass(IfcIrregularTimeSeries);}(IfcTimeSeries);IFC4X32.IfcIrregularTimeSeries=IfcIrregularTimeSeries;var IfcLagTime=/*#__PURE__*/function(_IfcSchedulingTime9){_inherits(IfcLagTime,_IfcSchedulingTime9);var _super1768=_createSuper(IfcLagTime);function IfcLagTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,LagValue,DurationType){var _this1765;_classCallCheck(this,IfcLagTime);_this1765=_super1768.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this1765.Name=Name;_this1765.DataOrigin=DataOrigin;_this1765.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1765.LagValue=LagValue;_this1765.DurationType=DurationType;_this1765.type=1585845231;return _this1765;}return _createClass(IfcLagTime);}(IfcSchedulingTime);IFC4X32.IfcLagTime=IfcLagTime;var IfcLightSource=/*#__PURE__*/function(_IfcGeometricRepresen59){_inherits(IfcLightSource,_IfcGeometricRepresen59);var _super1769=_createSuper(IfcLightSource);function IfcLightSource(expressID,Name,LightColour,AmbientIntensity,Intensity){var _this1766;_classCallCheck(this,IfcLightSource);_this1766=_super1769.call(this,expressID);_this1766.Name=Name;_this1766.LightColour=LightColour;_this1766.AmbientIntensity=AmbientIntensity;_this1766.Intensity=Intensity;_this1766.type=1402838566;return _this1766;}return _createClass(IfcLightSource);}(IfcGeometricRepresentationItem);IFC4X32.IfcLightSource=IfcLightSource;var IfcLightSourceAmbient=/*#__PURE__*/function(_IfcLightSource9){_inherits(IfcLightSourceAmbient,_IfcLightSource9);var _super1770=_createSuper(IfcLightSourceAmbient);function IfcLightSourceAmbient(expressID,Name,LightColour,AmbientIntensity,Intensity){var _this1767;_classCallCheck(this,IfcLightSourceAmbient);_this1767=_super1770.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this1767.Name=Name;_this1767.LightColour=LightColour;_this1767.AmbientIntensity=AmbientIntensity;_this1767.Intensity=Intensity;_this1767.type=125510826;return _this1767;}return _createClass(IfcLightSourceAmbient);}(IfcLightSource);IFC4X32.IfcLightSourceAmbient=IfcLightSourceAmbient;var IfcLightSourceDirectional=/*#__PURE__*/function(_IfcLightSource10){_inherits(IfcLightSourceDirectional,_IfcLightSource10);var _super1771=_createSuper(IfcLightSourceDirectional);function IfcLightSourceDirectional(expressID,Name,LightColour,AmbientIntensity,Intensity,Orientation){var _this1768;_classCallCheck(this,IfcLightSourceDirectional);_this1768=_super1771.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this1768.Name=Name;_this1768.LightColour=LightColour;_this1768.AmbientIntensity=AmbientIntensity;_this1768.Intensity=Intensity;_this1768.Orientation=Orientation;_this1768.type=2604431987;return _this1768;}return _createClass(IfcLightSourceDirectional);}(IfcLightSource);IFC4X32.IfcLightSourceDirectional=IfcLightSourceDirectional;var IfcLightSourceGoniometric=/*#__PURE__*/function(_IfcLightSource11){_inherits(IfcLightSourceGoniometric,_IfcLightSource11);var _super1772=_createSuper(IfcLightSourceGoniometric);function IfcLightSourceGoniometric(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,ColourAppearance,ColourTemperature,LuminousFlux,LightEmissionSource,LightDistributionDataSource){var _this1769;_classCallCheck(this,IfcLightSourceGoniometric);_this1769=_super1772.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this1769.Name=Name;_this1769.LightColour=LightColour;_this1769.AmbientIntensity=AmbientIntensity;_this1769.Intensity=Intensity;_this1769.Position=Position;_this1769.ColourAppearance=ColourAppearance;_this1769.ColourTemperature=ColourTemperature;_this1769.LuminousFlux=LuminousFlux;_this1769.LightEmissionSource=LightEmissionSource;_this1769.LightDistributionDataSource=LightDistributionDataSource;_this1769.type=4266656042;return _this1769;}return _createClass(IfcLightSourceGoniometric);}(IfcLightSource);IFC4X32.IfcLightSourceGoniometric=IfcLightSourceGoniometric;var IfcLightSourcePositional=/*#__PURE__*/function(_IfcLightSource12){_inherits(IfcLightSourcePositional,_IfcLightSource12);var _super1773=_createSuper(IfcLightSourcePositional);function IfcLightSourcePositional(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation){var _this1770;_classCallCheck(this,IfcLightSourcePositional);_this1770=_super1773.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity);_this1770.Name=Name;_this1770.LightColour=LightColour;_this1770.AmbientIntensity=AmbientIntensity;_this1770.Intensity=Intensity;_this1770.Position=Position;_this1770.Radius=Radius;_this1770.ConstantAttenuation=ConstantAttenuation;_this1770.DistanceAttenuation=DistanceAttenuation;_this1770.QuadricAttenuation=QuadricAttenuation;_this1770.type=1520743889;return _this1770;}return _createClass(IfcLightSourcePositional);}(IfcLightSource);IFC4X32.IfcLightSourcePositional=IfcLightSourcePositional;var IfcLightSourceSpot=/*#__PURE__*/function(_IfcLightSourcePositi3){_inherits(IfcLightSourceSpot,_IfcLightSourcePositi3);var _super1774=_createSuper(IfcLightSourceSpot);function IfcLightSourceSpot(expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation,Orientation,ConcentrationExponent,SpreadAngle,BeamWidthAngle){var _this1771;_classCallCheck(this,IfcLightSourceSpot);_this1771=_super1774.call(this,expressID,Name,LightColour,AmbientIntensity,Intensity,Position,Radius,ConstantAttenuation,DistanceAttenuation,QuadricAttenuation);_this1771.Name=Name;_this1771.LightColour=LightColour;_this1771.AmbientIntensity=AmbientIntensity;_this1771.Intensity=Intensity;_this1771.Position=Position;_this1771.Radius=Radius;_this1771.ConstantAttenuation=ConstantAttenuation;_this1771.DistanceAttenuation=DistanceAttenuation;_this1771.QuadricAttenuation=QuadricAttenuation;_this1771.Orientation=Orientation;_this1771.ConcentrationExponent=ConcentrationExponent;_this1771.SpreadAngle=SpreadAngle;_this1771.BeamWidthAngle=BeamWidthAngle;_this1771.type=3422422726;return _this1771;}return _createClass(IfcLightSourceSpot);}(IfcLightSourcePositional);IFC4X32.IfcLightSourceSpot=IfcLightSourceSpot;var IfcLinearPlacement=/*#__PURE__*/function(_IfcObjectPlacement6){_inherits(IfcLinearPlacement,_IfcObjectPlacement6);var _super1775=_createSuper(IfcLinearPlacement);function IfcLinearPlacement(expressID,PlacementRelTo,RelativePlacement,CartesianPosition){var _this1772;_classCallCheck(this,IfcLinearPlacement);_this1772=_super1775.call(this,expressID,PlacementRelTo);_this1772.PlacementRelTo=PlacementRelTo;_this1772.RelativePlacement=RelativePlacement;_this1772.CartesianPosition=CartesianPosition;_this1772.type=388784114;return _this1772;}return _createClass(IfcLinearPlacement);}(IfcObjectPlacement);IFC4X32.IfcLinearPlacement=IfcLinearPlacement;var IfcLocalPlacement=/*#__PURE__*/function(_IfcObjectPlacement7){_inherits(IfcLocalPlacement,_IfcObjectPlacement7);var _super1776=_createSuper(IfcLocalPlacement);function IfcLocalPlacement(expressID,PlacementRelTo,RelativePlacement){var _this1773;_classCallCheck(this,IfcLocalPlacement);_this1773=_super1776.call(this,expressID,PlacementRelTo);_this1773.PlacementRelTo=PlacementRelTo;_this1773.RelativePlacement=RelativePlacement;_this1773.type=2624227202;return _this1773;}return _createClass(IfcLocalPlacement);}(IfcObjectPlacement);IFC4X32.IfcLocalPlacement=IfcLocalPlacement;var IfcLoop=/*#__PURE__*/function(_IfcTopologicalRepres20){_inherits(IfcLoop,_IfcTopologicalRepres20);var _super1777=_createSuper(IfcLoop);function IfcLoop(expressID){var _this1774;_classCallCheck(this,IfcLoop);_this1774=_super1777.call(this,expressID);_this1774.type=1008929658;return _this1774;}return _createClass(IfcLoop);}(IfcTopologicalRepresentationItem);IFC4X32.IfcLoop=IfcLoop;var IfcMappedItem=/*#__PURE__*/function(_IfcRepresentationIte12){_inherits(IfcMappedItem,_IfcRepresentationIte12);var _super1778=_createSuper(IfcMappedItem);function IfcMappedItem(expressID,MappingSource,MappingTarget){var _this1775;_classCallCheck(this,IfcMappedItem);_this1775=_super1778.call(this,expressID);_this1775.MappingSource=MappingSource;_this1775.MappingTarget=MappingTarget;_this1775.type=2347385850;return _this1775;}return _createClass(IfcMappedItem);}(IfcRepresentationItem);IFC4X32.IfcMappedItem=IfcMappedItem;var IfcMaterial=/*#__PURE__*/function(_IfcMaterialDefinitio12){_inherits(IfcMaterial,_IfcMaterialDefinitio12);var _super1779=_createSuper(IfcMaterial);function IfcMaterial(expressID,Name,Description,Category){var _this1776;_classCallCheck(this,IfcMaterial);_this1776=_super1779.call(this,expressID);_this1776.Name=Name;_this1776.Description=Description;_this1776.Category=Category;_this1776.type=1838606355;return _this1776;}return _createClass(IfcMaterial);}(IfcMaterialDefinition);IFC4X32.IfcMaterial=IfcMaterial;var IfcMaterialConstituent=/*#__PURE__*/function(_IfcMaterialDefinitio13){_inherits(IfcMaterialConstituent,_IfcMaterialDefinitio13);var _super1780=_createSuper(IfcMaterialConstituent);function IfcMaterialConstituent(expressID,Name,Description,Material,Fraction,Category){var _this1777;_classCallCheck(this,IfcMaterialConstituent);_this1777=_super1780.call(this,expressID);_this1777.Name=Name;_this1777.Description=Description;_this1777.Material=Material;_this1777.Fraction=Fraction;_this1777.Category=Category;_this1777.type=3708119e3;return _this1777;}return _createClass(IfcMaterialConstituent);}(IfcMaterialDefinition);IFC4X32.IfcMaterialConstituent=IfcMaterialConstituent;var IfcMaterialConstituentSet=/*#__PURE__*/function(_IfcMaterialDefinitio14){_inherits(IfcMaterialConstituentSet,_IfcMaterialDefinitio14);var _super1781=_createSuper(IfcMaterialConstituentSet);function IfcMaterialConstituentSet(expressID,Name,Description,MaterialConstituents){var _this1778;_classCallCheck(this,IfcMaterialConstituentSet);_this1778=_super1781.call(this,expressID);_this1778.Name=Name;_this1778.Description=Description;_this1778.MaterialConstituents=MaterialConstituents;_this1778.type=2852063980;return _this1778;}return _createClass(IfcMaterialConstituentSet);}(IfcMaterialDefinition);IFC4X32.IfcMaterialConstituentSet=IfcMaterialConstituentSet;var IfcMaterialDefinitionRepresentation=/*#__PURE__*/function(_IfcProductRepresenta5){_inherits(IfcMaterialDefinitionRepresentation,_IfcProductRepresenta5);var _super1782=_createSuper(IfcMaterialDefinitionRepresentation);function IfcMaterialDefinitionRepresentation(expressID,Name,Description,Representations,RepresentedMaterial){var _this1779;_classCallCheck(this,IfcMaterialDefinitionRepresentation);_this1779=_super1782.call(this,expressID,Name,Description,Representations);_this1779.Name=Name;_this1779.Description=Description;_this1779.Representations=Representations;_this1779.RepresentedMaterial=RepresentedMaterial;_this1779.type=2022407955;return _this1779;}return _createClass(IfcMaterialDefinitionRepresentation);}(IfcProductRepresentation);IFC4X32.IfcMaterialDefinitionRepresentation=IfcMaterialDefinitionRepresentation;var IfcMaterialLayerSetUsage=/*#__PURE__*/function(_IfcMaterialUsageDefi3){_inherits(IfcMaterialLayerSetUsage,_IfcMaterialUsageDefi3);var _super1783=_createSuper(IfcMaterialLayerSetUsage);function IfcMaterialLayerSetUsage(expressID,ForLayerSet,LayerSetDirection,DirectionSense,OffsetFromReferenceLine,ReferenceExtent){var _this1780;_classCallCheck(this,IfcMaterialLayerSetUsage);_this1780=_super1783.call(this,expressID);_this1780.ForLayerSet=ForLayerSet;_this1780.LayerSetDirection=LayerSetDirection;_this1780.DirectionSense=DirectionSense;_this1780.OffsetFromReferenceLine=OffsetFromReferenceLine;_this1780.ReferenceExtent=ReferenceExtent;_this1780.type=1303795690;return _this1780;}return _createClass(IfcMaterialLayerSetUsage);}(IfcMaterialUsageDefinition);IFC4X32.IfcMaterialLayerSetUsage=IfcMaterialLayerSetUsage;var IfcMaterialProfileSetUsage=/*#__PURE__*/function(_IfcMaterialUsageDefi4){_inherits(IfcMaterialProfileSetUsage,_IfcMaterialUsageDefi4);var _super1784=_createSuper(IfcMaterialProfileSetUsage);function IfcMaterialProfileSetUsage(expressID,ForProfileSet,CardinalPoint,ReferenceExtent){var _this1781;_classCallCheck(this,IfcMaterialProfileSetUsage);_this1781=_super1784.call(this,expressID);_this1781.ForProfileSet=ForProfileSet;_this1781.CardinalPoint=CardinalPoint;_this1781.ReferenceExtent=ReferenceExtent;_this1781.type=3079605661;return _this1781;}return _createClass(IfcMaterialProfileSetUsage);}(IfcMaterialUsageDefinition);IFC4X32.IfcMaterialProfileSetUsage=IfcMaterialProfileSetUsage;var IfcMaterialProfileSetUsageTapering=/*#__PURE__*/function(_IfcMaterialProfileSe2){_inherits(IfcMaterialProfileSetUsageTapering,_IfcMaterialProfileSe2);var _super1785=_createSuper(IfcMaterialProfileSetUsageTapering);function IfcMaterialProfileSetUsageTapering(expressID,ForProfileSet,CardinalPoint,ReferenceExtent,ForProfileEndSet,CardinalEndPoint){var _this1782;_classCallCheck(this,IfcMaterialProfileSetUsageTapering);_this1782=_super1785.call(this,expressID,ForProfileSet,CardinalPoint,ReferenceExtent);_this1782.ForProfileSet=ForProfileSet;_this1782.CardinalPoint=CardinalPoint;_this1782.ReferenceExtent=ReferenceExtent;_this1782.ForProfileEndSet=ForProfileEndSet;_this1782.CardinalEndPoint=CardinalEndPoint;_this1782.type=3404854881;return _this1782;}return _createClass(IfcMaterialProfileSetUsageTapering);}(IfcMaterialProfileSetUsage);IFC4X32.IfcMaterialProfileSetUsageTapering=IfcMaterialProfileSetUsageTapering;var IfcMaterialProperties=/*#__PURE__*/function(_IfcExtendedPropertie3){_inherits(IfcMaterialProperties,_IfcExtendedPropertie3);var _super1786=_createSuper(IfcMaterialProperties);function IfcMaterialProperties(expressID,Name,Description,Properties2,Material){var _this1783;_classCallCheck(this,IfcMaterialProperties);_this1783=_super1786.call(this,expressID,Name,Description,Properties2);_this1783.Name=Name;_this1783.Description=Description;_this1783.Properties=Properties2;_this1783.Material=Material;_this1783.type=3265635763;return _this1783;}return _createClass(IfcMaterialProperties);}(IfcExtendedProperties);IFC4X32.IfcMaterialProperties=IfcMaterialProperties;var IfcMaterialRelationship=/*#__PURE__*/function(_IfcResourceLevelRela14){_inherits(IfcMaterialRelationship,_IfcResourceLevelRela14);var _super1787=_createSuper(IfcMaterialRelationship);function IfcMaterialRelationship(expressID,Name,Description,RelatingMaterial,RelatedMaterials,MaterialExpression){var _this1784;_classCallCheck(this,IfcMaterialRelationship);_this1784=_super1787.call(this,expressID,Name,Description);_this1784.Name=Name;_this1784.Description=Description;_this1784.RelatingMaterial=RelatingMaterial;_this1784.RelatedMaterials=RelatedMaterials;_this1784.MaterialExpression=MaterialExpression;_this1784.type=853536259;return _this1784;}return _createClass(IfcMaterialRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcMaterialRelationship=IfcMaterialRelationship;var IfcMirroredProfileDef=/*#__PURE__*/function(_IfcDerivedProfileDef2){_inherits(IfcMirroredProfileDef,_IfcDerivedProfileDef2);var _super1788=_createSuper(IfcMirroredProfileDef);function IfcMirroredProfileDef(expressID,ProfileType,ProfileName,ParentProfile,Operator,Label){var _this1785;_classCallCheck(this,IfcMirroredProfileDef);_this1785=_super1788.call(this,expressID,ProfileType,ProfileName,ParentProfile,Operator,Label);_this1785.ProfileType=ProfileType;_this1785.ProfileName=ProfileName;_this1785.ParentProfile=ParentProfile;_this1785.Operator=Operator;_this1785.Label=Label;_this1785.type=2998442950;return _this1785;}return _createClass(IfcMirroredProfileDef);}(IfcDerivedProfileDef);IFC4X32.IfcMirroredProfileDef=IfcMirroredProfileDef;var IfcObjectDefinition=/*#__PURE__*/function(_IfcRoot7){_inherits(IfcObjectDefinition,_IfcRoot7);var _super1789=_createSuper(IfcObjectDefinition);function IfcObjectDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1786;_classCallCheck(this,IfcObjectDefinition);_this1786=_super1789.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1786.GlobalId=GlobalId;_this1786.OwnerHistory=OwnerHistory;_this1786.Name=Name;_this1786.Description=Description;_this1786.type=219451334;return _this1786;}return _createClass(IfcObjectDefinition);}(IfcRoot);IFC4X32.IfcObjectDefinition=IfcObjectDefinition;var IfcOpenCrossProfileDef=/*#__PURE__*/function(_IfcProfileDef15){_inherits(IfcOpenCrossProfileDef,_IfcProfileDef15);var _super1790=_createSuper(IfcOpenCrossProfileDef);function IfcOpenCrossProfileDef(expressID,ProfileType,ProfileName,HorizontalWidths,Widths,Slopes,Tags,OffsetPoint){var _this1787;_classCallCheck(this,IfcOpenCrossProfileDef);_this1787=_super1790.call(this,expressID,ProfileType,ProfileName);_this1787.ProfileType=ProfileType;_this1787.ProfileName=ProfileName;_this1787.HorizontalWidths=HorizontalWidths;_this1787.Widths=Widths;_this1787.Slopes=Slopes;_this1787.Tags=Tags;_this1787.OffsetPoint=OffsetPoint;_this1787.type=182550632;return _this1787;}return _createClass(IfcOpenCrossProfileDef);}(IfcProfileDef);IFC4X32.IfcOpenCrossProfileDef=IfcOpenCrossProfileDef;var IfcOpenShell=/*#__PURE__*/function(_IfcConnectedFaceSet5){_inherits(IfcOpenShell,_IfcConnectedFaceSet5);var _super1791=_createSuper(IfcOpenShell);function IfcOpenShell(expressID,CfsFaces){var _this1788;_classCallCheck(this,IfcOpenShell);_this1788=_super1791.call(this,expressID,CfsFaces);_this1788.CfsFaces=CfsFaces;_this1788.type=2665983363;return _this1788;}return _createClass(IfcOpenShell);}(IfcConnectedFaceSet);IFC4X32.IfcOpenShell=IfcOpenShell;var IfcOrganizationRelationship=/*#__PURE__*/function(_IfcResourceLevelRela15){_inherits(IfcOrganizationRelationship,_IfcResourceLevelRela15);var _super1792=_createSuper(IfcOrganizationRelationship);function IfcOrganizationRelationship(expressID,Name,Description,RelatingOrganization,RelatedOrganizations){var _this1789;_classCallCheck(this,IfcOrganizationRelationship);_this1789=_super1792.call(this,expressID,Name,Description);_this1789.Name=Name;_this1789.Description=Description;_this1789.RelatingOrganization=RelatingOrganization;_this1789.RelatedOrganizations=RelatedOrganizations;_this1789.type=1411181986;return _this1789;}return _createClass(IfcOrganizationRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcOrganizationRelationship=IfcOrganizationRelationship;var IfcOrientedEdge=/*#__PURE__*/function(_IfcEdge8){_inherits(IfcOrientedEdge,_IfcEdge8);var _super1793=_createSuper(IfcOrientedEdge);function IfcOrientedEdge(expressID,EdgeStart,EdgeElement,Orientation){var _this1790;_classCallCheck(this,IfcOrientedEdge);_this1790=_super1793.call(this,expressID,EdgeStart,new Handle(0));_this1790.EdgeStart=EdgeStart;_this1790.EdgeElement=EdgeElement;_this1790.Orientation=Orientation;_this1790.type=1029017970;return _this1790;}return _createClass(IfcOrientedEdge);}(IfcEdge);IFC4X32.IfcOrientedEdge=IfcOrientedEdge;var IfcParameterizedProfileDef=/*#__PURE__*/function(_IfcProfileDef16){_inherits(IfcParameterizedProfileDef,_IfcProfileDef16);var _super1794=_createSuper(IfcParameterizedProfileDef);function IfcParameterizedProfileDef(expressID,ProfileType,ProfileName,Position){var _this1791;_classCallCheck(this,IfcParameterizedProfileDef);_this1791=_super1794.call(this,expressID,ProfileType,ProfileName);_this1791.ProfileType=ProfileType;_this1791.ProfileName=ProfileName;_this1791.Position=Position;_this1791.type=2529465313;return _this1791;}return _createClass(IfcParameterizedProfileDef);}(IfcProfileDef);IFC4X32.IfcParameterizedProfileDef=IfcParameterizedProfileDef;var IfcPath=/*#__PURE__*/function(_IfcTopologicalRepres21){_inherits(IfcPath,_IfcTopologicalRepres21);var _super1795=_createSuper(IfcPath);function IfcPath(expressID,EdgeList){var _this1792;_classCallCheck(this,IfcPath);_this1792=_super1795.call(this,expressID);_this1792.EdgeList=EdgeList;_this1792.type=2519244187;return _this1792;}return _createClass(IfcPath);}(IfcTopologicalRepresentationItem);IFC4X32.IfcPath=IfcPath;var IfcPhysicalComplexQuantity=/*#__PURE__*/function(_IfcPhysicalQuantity6){_inherits(IfcPhysicalComplexQuantity,_IfcPhysicalQuantity6);var _super1796=_createSuper(IfcPhysicalComplexQuantity);function IfcPhysicalComplexQuantity(expressID,Name,Description,HasQuantities,Discrimination,Quality,Usage){var _this1793;_classCallCheck(this,IfcPhysicalComplexQuantity);_this1793=_super1796.call(this,expressID,Name,Description);_this1793.Name=Name;_this1793.Description=Description;_this1793.HasQuantities=HasQuantities;_this1793.Discrimination=Discrimination;_this1793.Quality=Quality;_this1793.Usage=Usage;_this1793.type=3021840470;return _this1793;}return _createClass(IfcPhysicalComplexQuantity);}(IfcPhysicalQuantity);IFC4X32.IfcPhysicalComplexQuantity=IfcPhysicalComplexQuantity;var IfcPixelTexture=/*#__PURE__*/function(_IfcSurfaceTexture9){_inherits(IfcPixelTexture,_IfcSurfaceTexture9);var _super1797=_createSuper(IfcPixelTexture);function IfcPixelTexture(expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter,Width,Height,ColourComponents,Pixel){var _this1794;_classCallCheck(this,IfcPixelTexture);_this1794=_super1797.call(this,expressID,RepeatS,RepeatT,Mode,TextureTransform,Parameter);_this1794.RepeatS=RepeatS;_this1794.RepeatT=RepeatT;_this1794.Mode=Mode;_this1794.TextureTransform=TextureTransform;_this1794.Parameter=Parameter;_this1794.Width=Width;_this1794.Height=Height;_this1794.ColourComponents=ColourComponents;_this1794.Pixel=Pixel;_this1794.type=597895409;return _this1794;}return _createClass(IfcPixelTexture);}(IfcSurfaceTexture);IFC4X32.IfcPixelTexture=IfcPixelTexture;var IfcPlacement=/*#__PURE__*/function(_IfcGeometricRepresen60){_inherits(IfcPlacement,_IfcGeometricRepresen60);var _super1798=_createSuper(IfcPlacement);function IfcPlacement(expressID,Location){var _this1795;_classCallCheck(this,IfcPlacement);_this1795=_super1798.call(this,expressID);_this1795.Location=Location;_this1795.type=2004835150;return _this1795;}return _createClass(IfcPlacement);}(IfcGeometricRepresentationItem);IFC4X32.IfcPlacement=IfcPlacement;var IfcPlanarExtent=/*#__PURE__*/function(_IfcGeometricRepresen61){_inherits(IfcPlanarExtent,_IfcGeometricRepresen61);var _super1799=_createSuper(IfcPlanarExtent);function IfcPlanarExtent(expressID,SizeInX,SizeInY){var _this1796;_classCallCheck(this,IfcPlanarExtent);_this1796=_super1799.call(this,expressID);_this1796.SizeInX=SizeInX;_this1796.SizeInY=SizeInY;_this1796.type=1663979128;return _this1796;}return _createClass(IfcPlanarExtent);}(IfcGeometricRepresentationItem);IFC4X32.IfcPlanarExtent=IfcPlanarExtent;var IfcPoint=/*#__PURE__*/function(_IfcGeometricRepresen62){_inherits(IfcPoint,_IfcGeometricRepresen62);var _super1800=_createSuper(IfcPoint);function IfcPoint(expressID){var _this1797;_classCallCheck(this,IfcPoint);_this1797=_super1800.call(this,expressID);_this1797.type=2067069095;return _this1797;}return _createClass(IfcPoint);}(IfcGeometricRepresentationItem);IFC4X32.IfcPoint=IfcPoint;var IfcPointByDistanceExpression=/*#__PURE__*/function(_IfcPoint7){_inherits(IfcPointByDistanceExpression,_IfcPoint7);var _super1801=_createSuper(IfcPointByDistanceExpression);function IfcPointByDistanceExpression(expressID,DistanceAlong,OffsetLateral,OffsetVertical,OffsetLongitudinal,BasisCurve){var _this1798;_classCallCheck(this,IfcPointByDistanceExpression);_this1798=_super1801.call(this,expressID);_this1798.DistanceAlong=DistanceAlong;_this1798.OffsetLateral=OffsetLateral;_this1798.OffsetVertical=OffsetVertical;_this1798.OffsetLongitudinal=OffsetLongitudinal;_this1798.BasisCurve=BasisCurve;_this1798.type=2165702409;return _this1798;}return _createClass(IfcPointByDistanceExpression);}(IfcPoint);IFC4X32.IfcPointByDistanceExpression=IfcPointByDistanceExpression;var IfcPointOnCurve=/*#__PURE__*/function(_IfcPoint8){_inherits(IfcPointOnCurve,_IfcPoint8);var _super1802=_createSuper(IfcPointOnCurve);function IfcPointOnCurve(expressID,BasisCurve,PointParameter){var _this1799;_classCallCheck(this,IfcPointOnCurve);_this1799=_super1802.call(this,expressID);_this1799.BasisCurve=BasisCurve;_this1799.PointParameter=PointParameter;_this1799.type=4022376103;return _this1799;}return _createClass(IfcPointOnCurve);}(IfcPoint);IFC4X32.IfcPointOnCurve=IfcPointOnCurve;var IfcPointOnSurface=/*#__PURE__*/function(_IfcPoint9){_inherits(IfcPointOnSurface,_IfcPoint9);var _super1803=_createSuper(IfcPointOnSurface);function IfcPointOnSurface(expressID,BasisSurface,PointParameterU,PointParameterV){var _this1800;_classCallCheck(this,IfcPointOnSurface);_this1800=_super1803.call(this,expressID);_this1800.BasisSurface=BasisSurface;_this1800.PointParameterU=PointParameterU;_this1800.PointParameterV=PointParameterV;_this1800.type=1423911732;return _this1800;}return _createClass(IfcPointOnSurface);}(IfcPoint);IFC4X32.IfcPointOnSurface=IfcPointOnSurface;var IfcPolyLoop=/*#__PURE__*/function(_IfcLoop7){_inherits(IfcPolyLoop,_IfcLoop7);var _super1804=_createSuper(IfcPolyLoop);function IfcPolyLoop(expressID,Polygon){var _this1801;_classCallCheck(this,IfcPolyLoop);_this1801=_super1804.call(this,expressID);_this1801.Polygon=Polygon;_this1801.type=2924175390;return _this1801;}return _createClass(IfcPolyLoop);}(IfcLoop);IFC4X32.IfcPolyLoop=IfcPolyLoop;var IfcPolygonalBoundedHalfSpace=/*#__PURE__*/function(_IfcHalfSpaceSolid5){_inherits(IfcPolygonalBoundedHalfSpace,_IfcHalfSpaceSolid5);var _super1805=_createSuper(IfcPolygonalBoundedHalfSpace);function IfcPolygonalBoundedHalfSpace(expressID,BaseSurface,AgreementFlag,Position,PolygonalBoundary){var _this1802;_classCallCheck(this,IfcPolygonalBoundedHalfSpace);_this1802=_super1805.call(this,expressID,BaseSurface,AgreementFlag);_this1802.BaseSurface=BaseSurface;_this1802.AgreementFlag=AgreementFlag;_this1802.Position=Position;_this1802.PolygonalBoundary=PolygonalBoundary;_this1802.type=2775532180;return _this1802;}return _createClass(IfcPolygonalBoundedHalfSpace);}(IfcHalfSpaceSolid);IFC4X32.IfcPolygonalBoundedHalfSpace=IfcPolygonalBoundedHalfSpace;var IfcPreDefinedItem=/*#__PURE__*/function(_IfcPresentationItem34){_inherits(IfcPreDefinedItem,_IfcPresentationItem34);var _super1806=_createSuper(IfcPreDefinedItem);function IfcPreDefinedItem(expressID,Name){var _this1803;_classCallCheck(this,IfcPreDefinedItem);_this1803=_super1806.call(this,expressID);_this1803.Name=Name;_this1803.type=3727388367;return _this1803;}return _createClass(IfcPreDefinedItem);}(IfcPresentationItem);IFC4X32.IfcPreDefinedItem=IfcPreDefinedItem;var IfcPreDefinedProperties=/*#__PURE__*/function(_IfcPropertyAbstracti7){_inherits(IfcPreDefinedProperties,_IfcPropertyAbstracti7);var _super1807=_createSuper(IfcPreDefinedProperties);function IfcPreDefinedProperties(expressID){var _this1804;_classCallCheck(this,IfcPreDefinedProperties);_this1804=_super1807.call(this,expressID);_this1804.type=3778827333;return _this1804;}return _createClass(IfcPreDefinedProperties);}(IfcPropertyAbstraction);IFC4X32.IfcPreDefinedProperties=IfcPreDefinedProperties;var IfcPreDefinedTextFont=/*#__PURE__*/function(_IfcPreDefinedItem8){_inherits(IfcPreDefinedTextFont,_IfcPreDefinedItem8);var _super1808=_createSuper(IfcPreDefinedTextFont);function IfcPreDefinedTextFont(expressID,Name){var _this1805;_classCallCheck(this,IfcPreDefinedTextFont);_this1805=_super1808.call(this,expressID,Name);_this1805.Name=Name;_this1805.type=1775413392;return _this1805;}return _createClass(IfcPreDefinedTextFont);}(IfcPreDefinedItem);IFC4X32.IfcPreDefinedTextFont=IfcPreDefinedTextFont;var IfcProductDefinitionShape=/*#__PURE__*/function(_IfcProductRepresenta6){_inherits(IfcProductDefinitionShape,_IfcProductRepresenta6);var _super1809=_createSuper(IfcProductDefinitionShape);function IfcProductDefinitionShape(expressID,Name,Description,Representations){var _this1806;_classCallCheck(this,IfcProductDefinitionShape);_this1806=_super1809.call(this,expressID,Name,Description,Representations);_this1806.Name=Name;_this1806.Description=Description;_this1806.Representations=Representations;_this1806.type=673634403;return _this1806;}return _createClass(IfcProductDefinitionShape);}(IfcProductRepresentation);IFC4X32.IfcProductDefinitionShape=IfcProductDefinitionShape;var IfcProfileProperties=/*#__PURE__*/function(_IfcExtendedPropertie4){_inherits(IfcProfileProperties,_IfcExtendedPropertie4);var _super1810=_createSuper(IfcProfileProperties);function IfcProfileProperties(expressID,Name,Description,Properties2,ProfileDefinition){var _this1807;_classCallCheck(this,IfcProfileProperties);_this1807=_super1810.call(this,expressID,Name,Description,Properties2);_this1807.Name=Name;_this1807.Description=Description;_this1807.Properties=Properties2;_this1807.ProfileDefinition=ProfileDefinition;_this1807.type=2802850158;return _this1807;}return _createClass(IfcProfileProperties);}(IfcExtendedProperties);IFC4X32.IfcProfileProperties=IfcProfileProperties;var IfcProperty=/*#__PURE__*/function(_IfcPropertyAbstracti8){_inherits(IfcProperty,_IfcPropertyAbstracti8);var _super1811=_createSuper(IfcProperty);function IfcProperty(expressID,Name,Specification){var _this1808;_classCallCheck(this,IfcProperty);_this1808=_super1811.call(this,expressID);_this1808.Name=Name;_this1808.Specification=Specification;_this1808.type=2598011224;return _this1808;}return _createClass(IfcProperty);}(IfcPropertyAbstraction);IFC4X32.IfcProperty=IfcProperty;var IfcPropertyDefinition=/*#__PURE__*/function(_IfcRoot8){_inherits(IfcPropertyDefinition,_IfcRoot8);var _super1812=_createSuper(IfcPropertyDefinition);function IfcPropertyDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1809;_classCallCheck(this,IfcPropertyDefinition);_this1809=_super1812.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1809.GlobalId=GlobalId;_this1809.OwnerHistory=OwnerHistory;_this1809.Name=Name;_this1809.Description=Description;_this1809.type=1680319473;return _this1809;}return _createClass(IfcPropertyDefinition);}(IfcRoot);IFC4X32.IfcPropertyDefinition=IfcPropertyDefinition;var IfcPropertyDependencyRelationship=/*#__PURE__*/function(_IfcResourceLevelRela16){_inherits(IfcPropertyDependencyRelationship,_IfcResourceLevelRela16);var _super1813=_createSuper(IfcPropertyDependencyRelationship);function IfcPropertyDependencyRelationship(expressID,Name,Description,DependingProperty,DependantProperty,Expression){var _this1810;_classCallCheck(this,IfcPropertyDependencyRelationship);_this1810=_super1813.call(this,expressID,Name,Description);_this1810.Name=Name;_this1810.Description=Description;_this1810.DependingProperty=DependingProperty;_this1810.DependantProperty=DependantProperty;_this1810.Expression=Expression;_this1810.type=148025276;return _this1810;}return _createClass(IfcPropertyDependencyRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcPropertyDependencyRelationship=IfcPropertyDependencyRelationship;var IfcPropertySetDefinition=/*#__PURE__*/function(_IfcPropertyDefinitio4){_inherits(IfcPropertySetDefinition,_IfcPropertyDefinitio4);var _super1814=_createSuper(IfcPropertySetDefinition);function IfcPropertySetDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1811;_classCallCheck(this,IfcPropertySetDefinition);_this1811=_super1814.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1811.GlobalId=GlobalId;_this1811.OwnerHistory=OwnerHistory;_this1811.Name=Name;_this1811.Description=Description;_this1811.type=3357820518;return _this1811;}return _createClass(IfcPropertySetDefinition);}(IfcPropertyDefinition);IFC4X32.IfcPropertySetDefinition=IfcPropertySetDefinition;var IfcPropertyTemplateDefinition=/*#__PURE__*/function(_IfcPropertyDefinitio5){_inherits(IfcPropertyTemplateDefinition,_IfcPropertyDefinitio5);var _super1815=_createSuper(IfcPropertyTemplateDefinition);function IfcPropertyTemplateDefinition(expressID,GlobalId,OwnerHistory,Name,Description){var _this1812;_classCallCheck(this,IfcPropertyTemplateDefinition);_this1812=_super1815.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1812.GlobalId=GlobalId;_this1812.OwnerHistory=OwnerHistory;_this1812.Name=Name;_this1812.Description=Description;_this1812.type=1482703590;return _this1812;}return _createClass(IfcPropertyTemplateDefinition);}(IfcPropertyDefinition);IFC4X32.IfcPropertyTemplateDefinition=IfcPropertyTemplateDefinition;var IfcQuantitySet=/*#__PURE__*/function(_IfcPropertySetDefini18){_inherits(IfcQuantitySet,_IfcPropertySetDefini18);var _super1816=_createSuper(IfcQuantitySet);function IfcQuantitySet(expressID,GlobalId,OwnerHistory,Name,Description){var _this1813;_classCallCheck(this,IfcQuantitySet);_this1813=_super1816.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1813.GlobalId=GlobalId;_this1813.OwnerHistory=OwnerHistory;_this1813.Name=Name;_this1813.Description=Description;_this1813.type=2090586900;return _this1813;}return _createClass(IfcQuantitySet);}(IfcPropertySetDefinition);IFC4X32.IfcQuantitySet=IfcQuantitySet;var IfcRectangleProfileDef=/*#__PURE__*/function(_IfcParameterizedProf24){_inherits(IfcRectangleProfileDef,_IfcParameterizedProf24);var _super1817=_createSuper(IfcRectangleProfileDef);function IfcRectangleProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim){var _this1814;_classCallCheck(this,IfcRectangleProfileDef);_this1814=_super1817.call(this,expressID,ProfileType,ProfileName,Position);_this1814.ProfileType=ProfileType;_this1814.ProfileName=ProfileName;_this1814.Position=Position;_this1814.XDim=XDim;_this1814.YDim=YDim;_this1814.type=3615266464;return _this1814;}return _createClass(IfcRectangleProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcRectangleProfileDef=IfcRectangleProfileDef;var IfcRegularTimeSeries=/*#__PURE__*/function(_IfcTimeSeries6){_inherits(IfcRegularTimeSeries,_IfcTimeSeries6);var _super1818=_createSuper(IfcRegularTimeSeries);function IfcRegularTimeSeries(expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit,TimeStep,Values){var _this1815;_classCallCheck(this,IfcRegularTimeSeries);_this1815=_super1818.call(this,expressID,Name,Description,StartTime,EndTime,TimeSeriesDataType,DataOrigin,UserDefinedDataOrigin,Unit);_this1815.Name=Name;_this1815.Description=Description;_this1815.StartTime=StartTime;_this1815.EndTime=EndTime;_this1815.TimeSeriesDataType=TimeSeriesDataType;_this1815.DataOrigin=DataOrigin;_this1815.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1815.Unit=Unit;_this1815.TimeStep=TimeStep;_this1815.Values=Values;_this1815.type=3413951693;return _this1815;}return _createClass(IfcRegularTimeSeries);}(IfcTimeSeries);IFC4X32.IfcRegularTimeSeries=IfcRegularTimeSeries;var IfcReinforcementBarProperties=/*#__PURE__*/function(_IfcPreDefinedPropert10){_inherits(IfcReinforcementBarProperties,_IfcPreDefinedPropert10);var _super1819=_createSuper(IfcReinforcementBarProperties);function IfcReinforcementBarProperties(expressID,TotalCrossSectionArea,SteelGrade,BarSurface,EffectiveDepth,NominalBarDiameter,BarCount){var _this1816;_classCallCheck(this,IfcReinforcementBarProperties);_this1816=_super1819.call(this,expressID);_this1816.TotalCrossSectionArea=TotalCrossSectionArea;_this1816.SteelGrade=SteelGrade;_this1816.BarSurface=BarSurface;_this1816.EffectiveDepth=EffectiveDepth;_this1816.NominalBarDiameter=NominalBarDiameter;_this1816.BarCount=BarCount;_this1816.type=1580146022;return _this1816;}return _createClass(IfcReinforcementBarProperties);}(IfcPreDefinedProperties);IFC4X32.IfcReinforcementBarProperties=IfcReinforcementBarProperties;var IfcRelationship=/*#__PURE__*/function(_IfcRoot9){_inherits(IfcRelationship,_IfcRoot9);var _super1820=_createSuper(IfcRelationship);function IfcRelationship(expressID,GlobalId,OwnerHistory,Name,Description){var _this1817;_classCallCheck(this,IfcRelationship);_this1817=_super1820.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1817.GlobalId=GlobalId;_this1817.OwnerHistory=OwnerHistory;_this1817.Name=Name;_this1817.Description=Description;_this1817.type=478536968;return _this1817;}return _createClass(IfcRelationship);}(IfcRoot);IFC4X32.IfcRelationship=IfcRelationship;var IfcResourceApprovalRelationship=/*#__PURE__*/function(_IfcResourceLevelRela17){_inherits(IfcResourceApprovalRelationship,_IfcResourceLevelRela17);var _super1821=_createSuper(IfcResourceApprovalRelationship);function IfcResourceApprovalRelationship(expressID,Name,Description,RelatedResourceObjects,RelatingApproval){var _this1818;_classCallCheck(this,IfcResourceApprovalRelationship);_this1818=_super1821.call(this,expressID,Name,Description);_this1818.Name=Name;_this1818.Description=Description;_this1818.RelatedResourceObjects=RelatedResourceObjects;_this1818.RelatingApproval=RelatingApproval;_this1818.type=2943643501;return _this1818;}return _createClass(IfcResourceApprovalRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcResourceApprovalRelationship=IfcResourceApprovalRelationship;var IfcResourceConstraintRelationship=/*#__PURE__*/function(_IfcResourceLevelRela18){_inherits(IfcResourceConstraintRelationship,_IfcResourceLevelRela18);var _super1822=_createSuper(IfcResourceConstraintRelationship);function IfcResourceConstraintRelationship(expressID,Name,Description,RelatingConstraint,RelatedResourceObjects){var _this1819;_classCallCheck(this,IfcResourceConstraintRelationship);_this1819=_super1822.call(this,expressID,Name,Description);_this1819.Name=Name;_this1819.Description=Description;_this1819.RelatingConstraint=RelatingConstraint;_this1819.RelatedResourceObjects=RelatedResourceObjects;_this1819.type=1608871552;return _this1819;}return _createClass(IfcResourceConstraintRelationship);}(IfcResourceLevelRelationship);IFC4X32.IfcResourceConstraintRelationship=IfcResourceConstraintRelationship;var IfcResourceTime=/*#__PURE__*/function(_IfcSchedulingTime10){_inherits(IfcResourceTime,_IfcSchedulingTime10);var _super1823=_createSuper(IfcResourceTime);function IfcResourceTime(expressID,Name,DataOrigin,UserDefinedDataOrigin,ScheduleWork,ScheduleUsage,ScheduleStart,ScheduleFinish,ScheduleContour,LevelingDelay,IsOverAllocated,StatusTime,ActualWork,ActualUsage,ActualStart,ActualFinish,RemainingWork,RemainingUsage,Completion){var _this1820;_classCallCheck(this,IfcResourceTime);_this1820=_super1823.call(this,expressID,Name,DataOrigin,UserDefinedDataOrigin);_this1820.Name=Name;_this1820.DataOrigin=DataOrigin;_this1820.UserDefinedDataOrigin=UserDefinedDataOrigin;_this1820.ScheduleWork=ScheduleWork;_this1820.ScheduleUsage=ScheduleUsage;_this1820.ScheduleStart=ScheduleStart;_this1820.ScheduleFinish=ScheduleFinish;_this1820.ScheduleContour=ScheduleContour;_this1820.LevelingDelay=LevelingDelay;_this1820.IsOverAllocated=IsOverAllocated;_this1820.StatusTime=StatusTime;_this1820.ActualWork=ActualWork;_this1820.ActualUsage=ActualUsage;_this1820.ActualStart=ActualStart;_this1820.ActualFinish=ActualFinish;_this1820.RemainingWork=RemainingWork;_this1820.RemainingUsage=RemainingUsage;_this1820.Completion=Completion;_this1820.type=1042787934;return _this1820;}return _createClass(IfcResourceTime);}(IfcSchedulingTime);IFC4X32.IfcResourceTime=IfcResourceTime;var IfcRoundedRectangleProfileDef=/*#__PURE__*/function(_IfcRectangleProfileD5){_inherits(IfcRoundedRectangleProfileDef,_IfcRectangleProfileD5);var _super1824=_createSuper(IfcRoundedRectangleProfileDef);function IfcRoundedRectangleProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim,RoundingRadius){var _this1821;_classCallCheck(this,IfcRoundedRectangleProfileDef);_this1821=_super1824.call(this,expressID,ProfileType,ProfileName,Position,XDim,YDim);_this1821.ProfileType=ProfileType;_this1821.ProfileName=ProfileName;_this1821.Position=Position;_this1821.XDim=XDim;_this1821.YDim=YDim;_this1821.RoundingRadius=RoundingRadius;_this1821.type=2778083089;return _this1821;}return _createClass(IfcRoundedRectangleProfileDef);}(IfcRectangleProfileDef);IFC4X32.IfcRoundedRectangleProfileDef=IfcRoundedRectangleProfileDef;var IfcSectionProperties=/*#__PURE__*/function(_IfcPreDefinedPropert11){_inherits(IfcSectionProperties,_IfcPreDefinedPropert11);var _super1825=_createSuper(IfcSectionProperties);function IfcSectionProperties(expressID,SectionType,StartProfile,EndProfile){var _this1822;_classCallCheck(this,IfcSectionProperties);_this1822=_super1825.call(this,expressID);_this1822.SectionType=SectionType;_this1822.StartProfile=StartProfile;_this1822.EndProfile=EndProfile;_this1822.type=2042790032;return _this1822;}return _createClass(IfcSectionProperties);}(IfcPreDefinedProperties);IFC4X32.IfcSectionProperties=IfcSectionProperties;var IfcSectionReinforcementProperties=/*#__PURE__*/function(_IfcPreDefinedPropert12){_inherits(IfcSectionReinforcementProperties,_IfcPreDefinedPropert12);var _super1826=_createSuper(IfcSectionReinforcementProperties);function IfcSectionReinforcementProperties(expressID,LongitudinalStartPosition,LongitudinalEndPosition,TransversePosition,ReinforcementRole,SectionDefinition,CrossSectionReinforcementDefinitions){var _this1823;_classCallCheck(this,IfcSectionReinforcementProperties);_this1823=_super1826.call(this,expressID);_this1823.LongitudinalStartPosition=LongitudinalStartPosition;_this1823.LongitudinalEndPosition=LongitudinalEndPosition;_this1823.TransversePosition=TransversePosition;_this1823.ReinforcementRole=ReinforcementRole;_this1823.SectionDefinition=SectionDefinition;_this1823.CrossSectionReinforcementDefinitions=CrossSectionReinforcementDefinitions;_this1823.type=4165799628;return _this1823;}return _createClass(IfcSectionReinforcementProperties);}(IfcPreDefinedProperties);IFC4X32.IfcSectionReinforcementProperties=IfcSectionReinforcementProperties;var IfcSectionedSpine=/*#__PURE__*/function(_IfcGeometricRepresen63){_inherits(IfcSectionedSpine,_IfcGeometricRepresen63);var _super1827=_createSuper(IfcSectionedSpine);function IfcSectionedSpine(expressID,SpineCurve,CrossSections,CrossSectionPositions){var _this1824;_classCallCheck(this,IfcSectionedSpine);_this1824=_super1827.call(this,expressID);_this1824.SpineCurve=SpineCurve;_this1824.CrossSections=CrossSections;_this1824.CrossSectionPositions=CrossSectionPositions;_this1824.type=1509187699;return _this1824;}return _createClass(IfcSectionedSpine);}(IfcGeometricRepresentationItem);IFC4X32.IfcSectionedSpine=IfcSectionedSpine;var IfcSegment=/*#__PURE__*/function(_IfcGeometricRepresen64){_inherits(IfcSegment,_IfcGeometricRepresen64);var _super1828=_createSuper(IfcSegment);function IfcSegment(expressID,Transition){var _this1825;_classCallCheck(this,IfcSegment);_this1825=_super1828.call(this,expressID);_this1825.Transition=Transition;_this1825.type=823603102;return _this1825;}return _createClass(IfcSegment);}(IfcGeometricRepresentationItem);IFC4X32.IfcSegment=IfcSegment;var IfcShellBasedSurfaceModel=/*#__PURE__*/function(_IfcGeometricRepresen65){_inherits(IfcShellBasedSurfaceModel,_IfcGeometricRepresen65);var _super1829=_createSuper(IfcShellBasedSurfaceModel);function IfcShellBasedSurfaceModel(expressID,SbsmBoundary){var _this1826;_classCallCheck(this,IfcShellBasedSurfaceModel);_this1826=_super1829.call(this,expressID);_this1826.SbsmBoundary=SbsmBoundary;_this1826.type=4124623270;return _this1826;}return _createClass(IfcShellBasedSurfaceModel);}(IfcGeometricRepresentationItem);IFC4X32.IfcShellBasedSurfaceModel=IfcShellBasedSurfaceModel;var IfcSimpleProperty=/*#__PURE__*/function(_IfcProperty5){_inherits(IfcSimpleProperty,_IfcProperty5);var _super1830=_createSuper(IfcSimpleProperty);function IfcSimpleProperty(expressID,Name,Specification){var _this1827;_classCallCheck(this,IfcSimpleProperty);_this1827=_super1830.call(this,expressID,Name,Specification);_this1827.Name=Name;_this1827.Specification=Specification;_this1827.type=3692461612;return _this1827;}return _createClass(IfcSimpleProperty);}(IfcProperty);IFC4X32.IfcSimpleProperty=IfcSimpleProperty;var IfcSlippageConnectionCondition=/*#__PURE__*/function(_IfcStructuralConnect12){_inherits(IfcSlippageConnectionCondition,_IfcStructuralConnect12);var _super1831=_createSuper(IfcSlippageConnectionCondition);function IfcSlippageConnectionCondition(expressID,Name,SlippageX,SlippageY,SlippageZ){var _this1828;_classCallCheck(this,IfcSlippageConnectionCondition);_this1828=_super1831.call(this,expressID,Name);_this1828.Name=Name;_this1828.SlippageX=SlippageX;_this1828.SlippageY=SlippageY;_this1828.SlippageZ=SlippageZ;_this1828.type=2609359061;return _this1828;}return _createClass(IfcSlippageConnectionCondition);}(IfcStructuralConnectionCondition);IFC4X32.IfcSlippageConnectionCondition=IfcSlippageConnectionCondition;var IfcSolidModel=/*#__PURE__*/function(_IfcGeometricRepresen66){_inherits(IfcSolidModel,_IfcGeometricRepresen66);var _super1832=_createSuper(IfcSolidModel);function IfcSolidModel(expressID){var _this1829;_classCallCheck(this,IfcSolidModel);_this1829=_super1832.call(this,expressID);_this1829.type=723233188;return _this1829;}return _createClass(IfcSolidModel);}(IfcGeometricRepresentationItem);IFC4X32.IfcSolidModel=IfcSolidModel;var IfcStructuralLoadLinearForce=/*#__PURE__*/function(_IfcStructuralLoadSta12){_inherits(IfcStructuralLoadLinearForce,_IfcStructuralLoadSta12);var _super1833=_createSuper(IfcStructuralLoadLinearForce);function IfcStructuralLoadLinearForce(expressID,Name,LinearForceX,LinearForceY,LinearForceZ,LinearMomentX,LinearMomentY,LinearMomentZ){var _this1830;_classCallCheck(this,IfcStructuralLoadLinearForce);_this1830=_super1833.call(this,expressID,Name);_this1830.Name=Name;_this1830.LinearForceX=LinearForceX;_this1830.LinearForceY=LinearForceY;_this1830.LinearForceZ=LinearForceZ;_this1830.LinearMomentX=LinearMomentX;_this1830.LinearMomentY=LinearMomentY;_this1830.LinearMomentZ=LinearMomentZ;_this1830.type=1595516126;return _this1830;}return _createClass(IfcStructuralLoadLinearForce);}(IfcStructuralLoadStatic);IFC4X32.IfcStructuralLoadLinearForce=IfcStructuralLoadLinearForce;var IfcStructuralLoadPlanarForce=/*#__PURE__*/function(_IfcStructuralLoadSta13){_inherits(IfcStructuralLoadPlanarForce,_IfcStructuralLoadSta13);var _super1834=_createSuper(IfcStructuralLoadPlanarForce);function IfcStructuralLoadPlanarForce(expressID,Name,PlanarForceX,PlanarForceY,PlanarForceZ){var _this1831;_classCallCheck(this,IfcStructuralLoadPlanarForce);_this1831=_super1834.call(this,expressID,Name);_this1831.Name=Name;_this1831.PlanarForceX=PlanarForceX;_this1831.PlanarForceY=PlanarForceY;_this1831.PlanarForceZ=PlanarForceZ;_this1831.type=2668620305;return _this1831;}return _createClass(IfcStructuralLoadPlanarForce);}(IfcStructuralLoadStatic);IFC4X32.IfcStructuralLoadPlanarForce=IfcStructuralLoadPlanarForce;var IfcStructuralLoadSingleDisplacement=/*#__PURE__*/function(_IfcStructuralLoadSta14){_inherits(IfcStructuralLoadSingleDisplacement,_IfcStructuralLoadSta14);var _super1835=_createSuper(IfcStructuralLoadSingleDisplacement);function IfcStructuralLoadSingleDisplacement(expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ){var _this1832;_classCallCheck(this,IfcStructuralLoadSingleDisplacement);_this1832=_super1835.call(this,expressID,Name);_this1832.Name=Name;_this1832.DisplacementX=DisplacementX;_this1832.DisplacementY=DisplacementY;_this1832.DisplacementZ=DisplacementZ;_this1832.RotationalDisplacementRX=RotationalDisplacementRX;_this1832.RotationalDisplacementRY=RotationalDisplacementRY;_this1832.RotationalDisplacementRZ=RotationalDisplacementRZ;_this1832.type=2473145415;return _this1832;}return _createClass(IfcStructuralLoadSingleDisplacement);}(IfcStructuralLoadStatic);IFC4X32.IfcStructuralLoadSingleDisplacement=IfcStructuralLoadSingleDisplacement;var IfcStructuralLoadSingleDisplacementDistortion=/*#__PURE__*/function(_IfcStructuralLoadSin5){_inherits(IfcStructuralLoadSingleDisplacementDistortion,_IfcStructuralLoadSin5);var _super1836=_createSuper(IfcStructuralLoadSingleDisplacementDistortion);function IfcStructuralLoadSingleDisplacementDistortion(expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ,Distortion){var _this1833;_classCallCheck(this,IfcStructuralLoadSingleDisplacementDistortion);_this1833=_super1836.call(this,expressID,Name,DisplacementX,DisplacementY,DisplacementZ,RotationalDisplacementRX,RotationalDisplacementRY,RotationalDisplacementRZ);_this1833.Name=Name;_this1833.DisplacementX=DisplacementX;_this1833.DisplacementY=DisplacementY;_this1833.DisplacementZ=DisplacementZ;_this1833.RotationalDisplacementRX=RotationalDisplacementRX;_this1833.RotationalDisplacementRY=RotationalDisplacementRY;_this1833.RotationalDisplacementRZ=RotationalDisplacementRZ;_this1833.Distortion=Distortion;_this1833.type=1973038258;return _this1833;}return _createClass(IfcStructuralLoadSingleDisplacementDistortion);}(IfcStructuralLoadSingleDisplacement);IFC4X32.IfcStructuralLoadSingleDisplacementDistortion=IfcStructuralLoadSingleDisplacementDistortion;var IfcStructuralLoadSingleForce=/*#__PURE__*/function(_IfcStructuralLoadSta15){_inherits(IfcStructuralLoadSingleForce,_IfcStructuralLoadSta15);var _super1837=_createSuper(IfcStructuralLoadSingleForce);function IfcStructuralLoadSingleForce(expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ){var _this1834;_classCallCheck(this,IfcStructuralLoadSingleForce);_this1834=_super1837.call(this,expressID,Name);_this1834.Name=Name;_this1834.ForceX=ForceX;_this1834.ForceY=ForceY;_this1834.ForceZ=ForceZ;_this1834.MomentX=MomentX;_this1834.MomentY=MomentY;_this1834.MomentZ=MomentZ;_this1834.type=1597423693;return _this1834;}return _createClass(IfcStructuralLoadSingleForce);}(IfcStructuralLoadStatic);IFC4X32.IfcStructuralLoadSingleForce=IfcStructuralLoadSingleForce;var IfcStructuralLoadSingleForceWarping=/*#__PURE__*/function(_IfcStructuralLoadSin6){_inherits(IfcStructuralLoadSingleForceWarping,_IfcStructuralLoadSin6);var _super1838=_createSuper(IfcStructuralLoadSingleForceWarping);function IfcStructuralLoadSingleForceWarping(expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ,WarpingMoment){var _this1835;_classCallCheck(this,IfcStructuralLoadSingleForceWarping);_this1835=_super1838.call(this,expressID,Name,ForceX,ForceY,ForceZ,MomentX,MomentY,MomentZ);_this1835.Name=Name;_this1835.ForceX=ForceX;_this1835.ForceY=ForceY;_this1835.ForceZ=ForceZ;_this1835.MomentX=MomentX;_this1835.MomentY=MomentY;_this1835.MomentZ=MomentZ;_this1835.WarpingMoment=WarpingMoment;_this1835.type=1190533807;return _this1835;}return _createClass(IfcStructuralLoadSingleForceWarping);}(IfcStructuralLoadSingleForce);IFC4X32.IfcStructuralLoadSingleForceWarping=IfcStructuralLoadSingleForceWarping;var IfcSubedge=/*#__PURE__*/function(_IfcEdge9){_inherits(IfcSubedge,_IfcEdge9);var _super1839=_createSuper(IfcSubedge);function IfcSubedge(expressID,EdgeStart,EdgeEnd,ParentEdge){var _this1836;_classCallCheck(this,IfcSubedge);_this1836=_super1839.call(this,expressID,EdgeStart,EdgeEnd);_this1836.EdgeStart=EdgeStart;_this1836.EdgeEnd=EdgeEnd;_this1836.ParentEdge=ParentEdge;_this1836.type=2233826070;return _this1836;}return _createClass(IfcSubedge);}(IfcEdge);IFC4X32.IfcSubedge=IfcSubedge;var IfcSurface=/*#__PURE__*/function(_IfcGeometricRepresen67){_inherits(IfcSurface,_IfcGeometricRepresen67);var _super1840=_createSuper(IfcSurface);function IfcSurface(expressID){var _this1837;_classCallCheck(this,IfcSurface);_this1837=_super1840.call(this,expressID);_this1837.type=2513912981;return _this1837;}return _createClass(IfcSurface);}(IfcGeometricRepresentationItem);IFC4X32.IfcSurface=IfcSurface;var IfcSurfaceStyleRendering=/*#__PURE__*/function(_IfcSurfaceStyleShadi3){_inherits(IfcSurfaceStyleRendering,_IfcSurfaceStyleShadi3);var _super1841=_createSuper(IfcSurfaceStyleRendering);function IfcSurfaceStyleRendering(expressID,SurfaceColour,Transparency,DiffuseColour,TransmissionColour,DiffuseTransmissionColour,ReflectionColour,SpecularColour,SpecularHighlight,ReflectanceMethod){var _this1838;_classCallCheck(this,IfcSurfaceStyleRendering);_this1838=_super1841.call(this,expressID,SurfaceColour,Transparency);_this1838.SurfaceColour=SurfaceColour;_this1838.Transparency=Transparency;_this1838.DiffuseColour=DiffuseColour;_this1838.TransmissionColour=TransmissionColour;_this1838.DiffuseTransmissionColour=DiffuseTransmissionColour;_this1838.ReflectionColour=ReflectionColour;_this1838.SpecularColour=SpecularColour;_this1838.SpecularHighlight=SpecularHighlight;_this1838.ReflectanceMethod=ReflectanceMethod;_this1838.type=1878645084;return _this1838;}return _createClass(IfcSurfaceStyleRendering);}(IfcSurfaceStyleShading);IFC4X32.IfcSurfaceStyleRendering=IfcSurfaceStyleRendering;var IfcSweptAreaSolid=/*#__PURE__*/function(_IfcSolidModel9){_inherits(IfcSweptAreaSolid,_IfcSolidModel9);var _super1842=_createSuper(IfcSweptAreaSolid);function IfcSweptAreaSolid(expressID,SweptArea,Position){var _this1839;_classCallCheck(this,IfcSweptAreaSolid);_this1839=_super1842.call(this,expressID);_this1839.SweptArea=SweptArea;_this1839.Position=Position;_this1839.type=2247615214;return _this1839;}return _createClass(IfcSweptAreaSolid);}(IfcSolidModel);IFC4X32.IfcSweptAreaSolid=IfcSweptAreaSolid;var IfcSweptDiskSolid=/*#__PURE__*/function(_IfcSolidModel10){_inherits(IfcSweptDiskSolid,_IfcSolidModel10);var _super1843=_createSuper(IfcSweptDiskSolid);function IfcSweptDiskSolid(expressID,Directrix,Radius,InnerRadius,StartParam,EndParam){var _this1840;_classCallCheck(this,IfcSweptDiskSolid);_this1840=_super1843.call(this,expressID);_this1840.Directrix=Directrix;_this1840.Radius=Radius;_this1840.InnerRadius=InnerRadius;_this1840.StartParam=StartParam;_this1840.EndParam=EndParam;_this1840.type=1260650574;return _this1840;}return _createClass(IfcSweptDiskSolid);}(IfcSolidModel);IFC4X32.IfcSweptDiskSolid=IfcSweptDiskSolid;var IfcSweptDiskSolidPolygonal=/*#__PURE__*/function(_IfcSweptDiskSolid2){_inherits(IfcSweptDiskSolidPolygonal,_IfcSweptDiskSolid2);var _super1844=_createSuper(IfcSweptDiskSolidPolygonal);function IfcSweptDiskSolidPolygonal(expressID,Directrix,Radius,InnerRadius,StartParam,EndParam,FilletRadius){var _this1841;_classCallCheck(this,IfcSweptDiskSolidPolygonal);_this1841=_super1844.call(this,expressID,Directrix,Radius,InnerRadius,StartParam,EndParam);_this1841.Directrix=Directrix;_this1841.Radius=Radius;_this1841.InnerRadius=InnerRadius;_this1841.StartParam=StartParam;_this1841.EndParam=EndParam;_this1841.FilletRadius=FilletRadius;_this1841.type=1096409881;return _this1841;}return _createClass(IfcSweptDiskSolidPolygonal);}(IfcSweptDiskSolid);IFC4X32.IfcSweptDiskSolidPolygonal=IfcSweptDiskSolidPolygonal;var IfcSweptSurface=/*#__PURE__*/function(_IfcSurface7){_inherits(IfcSweptSurface,_IfcSurface7);var _super1845=_createSuper(IfcSweptSurface);function IfcSweptSurface(expressID,SweptCurve,Position){var _this1842;_classCallCheck(this,IfcSweptSurface);_this1842=_super1845.call(this,expressID);_this1842.SweptCurve=SweptCurve;_this1842.Position=Position;_this1842.type=230924584;return _this1842;}return _createClass(IfcSweptSurface);}(IfcSurface);IFC4X32.IfcSweptSurface=IfcSweptSurface;var IfcTShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf25){_inherits(IfcTShapeProfileDef,_IfcParameterizedProf25);var _super1846=_createSuper(IfcTShapeProfileDef);function IfcTShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,FlangeEdgeRadius,WebEdgeRadius,WebSlope,FlangeSlope){var _this1843;_classCallCheck(this,IfcTShapeProfileDef);_this1843=_super1846.call(this,expressID,ProfileType,ProfileName,Position);_this1843.ProfileType=ProfileType;_this1843.ProfileName=ProfileName;_this1843.Position=Position;_this1843.Depth=Depth;_this1843.FlangeWidth=FlangeWidth;_this1843.WebThickness=WebThickness;_this1843.FlangeThickness=FlangeThickness;_this1843.FilletRadius=FilletRadius;_this1843.FlangeEdgeRadius=FlangeEdgeRadius;_this1843.WebEdgeRadius=WebEdgeRadius;_this1843.WebSlope=WebSlope;_this1843.FlangeSlope=FlangeSlope;_this1843.type=3071757647;return _this1843;}return _createClass(IfcTShapeProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcTShapeProfileDef=IfcTShapeProfileDef;var IfcTessellatedItem=/*#__PURE__*/function(_IfcGeometricRepresen68){_inherits(IfcTessellatedItem,_IfcGeometricRepresen68);var _super1847=_createSuper(IfcTessellatedItem);function IfcTessellatedItem(expressID){var _this1844;_classCallCheck(this,IfcTessellatedItem);_this1844=_super1847.call(this,expressID);_this1844.type=901063453;return _this1844;}return _createClass(IfcTessellatedItem);}(IfcGeometricRepresentationItem);IFC4X32.IfcTessellatedItem=IfcTessellatedItem;var IfcTextLiteral=/*#__PURE__*/function(_IfcGeometricRepresen69){_inherits(IfcTextLiteral,_IfcGeometricRepresen69);var _super1848=_createSuper(IfcTextLiteral);function IfcTextLiteral(expressID,Literal,Placement,Path){var _this1845;_classCallCheck(this,IfcTextLiteral);_this1845=_super1848.call(this,expressID);_this1845.Literal=Literal;_this1845.Placement=Placement;_this1845.Path=Path;_this1845.type=4282788508;return _this1845;}return _createClass(IfcTextLiteral);}(IfcGeometricRepresentationItem);IFC4X32.IfcTextLiteral=IfcTextLiteral;var IfcTextLiteralWithExtent=/*#__PURE__*/function(_IfcTextLiteral3){_inherits(IfcTextLiteralWithExtent,_IfcTextLiteral3);var _super1849=_createSuper(IfcTextLiteralWithExtent);function IfcTextLiteralWithExtent(expressID,Literal,Placement,Path,Extent,BoxAlignment){var _this1846;_classCallCheck(this,IfcTextLiteralWithExtent);_this1846=_super1849.call(this,expressID,Literal,Placement,Path);_this1846.Literal=Literal;_this1846.Placement=Placement;_this1846.Path=Path;_this1846.Extent=Extent;_this1846.BoxAlignment=BoxAlignment;_this1846.type=3124975700;return _this1846;}return _createClass(IfcTextLiteralWithExtent);}(IfcTextLiteral);IFC4X32.IfcTextLiteralWithExtent=IfcTextLiteralWithExtent;var IfcTextStyleFontModel=/*#__PURE__*/function(_IfcPreDefinedTextFon4){_inherits(IfcTextStyleFontModel,_IfcPreDefinedTextFon4);var _super1850=_createSuper(IfcTextStyleFontModel);function IfcTextStyleFontModel(expressID,Name,FontFamily,FontStyle,FontVariant,FontWeight,FontSize){var _this1847;_classCallCheck(this,IfcTextStyleFontModel);_this1847=_super1850.call(this,expressID,Name);_this1847.Name=Name;_this1847.FontFamily=FontFamily;_this1847.FontStyle=FontStyle;_this1847.FontVariant=FontVariant;_this1847.FontWeight=FontWeight;_this1847.FontSize=FontSize;_this1847.type=1983826977;return _this1847;}return _createClass(IfcTextStyleFontModel);}(IfcPreDefinedTextFont);IFC4X32.IfcTextStyleFontModel=IfcTextStyleFontModel;var IfcTrapeziumProfileDef=/*#__PURE__*/function(_IfcParameterizedProf26){_inherits(IfcTrapeziumProfileDef,_IfcParameterizedProf26);var _super1851=_createSuper(IfcTrapeziumProfileDef);function IfcTrapeziumProfileDef(expressID,ProfileType,ProfileName,Position,BottomXDim,TopXDim,YDim,TopXOffset){var _this1848;_classCallCheck(this,IfcTrapeziumProfileDef);_this1848=_super1851.call(this,expressID,ProfileType,ProfileName,Position);_this1848.ProfileType=ProfileType;_this1848.ProfileName=ProfileName;_this1848.Position=Position;_this1848.BottomXDim=BottomXDim;_this1848.TopXDim=TopXDim;_this1848.YDim=YDim;_this1848.TopXOffset=TopXOffset;_this1848.type=2715220739;return _this1848;}return _createClass(IfcTrapeziumProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcTrapeziumProfileDef=IfcTrapeziumProfileDef;var IfcTypeObject=/*#__PURE__*/function(_IfcObjectDefinition6){_inherits(IfcTypeObject,_IfcObjectDefinition6);var _super1852=_createSuper(IfcTypeObject);function IfcTypeObject(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets){var _this1849;_classCallCheck(this,IfcTypeObject);_this1849=_super1852.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1849.GlobalId=GlobalId;_this1849.OwnerHistory=OwnerHistory;_this1849.Name=Name;_this1849.Description=Description;_this1849.ApplicableOccurrence=ApplicableOccurrence;_this1849.HasPropertySets=HasPropertySets;_this1849.type=1628702193;return _this1849;}return _createClass(IfcTypeObject);}(IfcObjectDefinition);IFC4X32.IfcTypeObject=IfcTypeObject;var IfcTypeProcess=/*#__PURE__*/function(_IfcTypeObject5){_inherits(IfcTypeProcess,_IfcTypeObject5);var _super1853=_createSuper(IfcTypeProcess);function IfcTypeProcess(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType){var _this1850;_classCallCheck(this,IfcTypeProcess);_this1850=_super1853.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets);_this1850.GlobalId=GlobalId;_this1850.OwnerHistory=OwnerHistory;_this1850.Name=Name;_this1850.Description=Description;_this1850.ApplicableOccurrence=ApplicableOccurrence;_this1850.HasPropertySets=HasPropertySets;_this1850.Identification=Identification;_this1850.LongDescription=LongDescription;_this1850.ProcessType=ProcessType;_this1850.type=3736923433;return _this1850;}return _createClass(IfcTypeProcess);}(IfcTypeObject);IFC4X32.IfcTypeProcess=IfcTypeProcess;var IfcTypeProduct=/*#__PURE__*/function(_IfcTypeObject6){_inherits(IfcTypeProduct,_IfcTypeObject6);var _super1854=_createSuper(IfcTypeProduct);function IfcTypeProduct(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag){var _this1851;_classCallCheck(this,IfcTypeProduct);_this1851=_super1854.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets);_this1851.GlobalId=GlobalId;_this1851.OwnerHistory=OwnerHistory;_this1851.Name=Name;_this1851.Description=Description;_this1851.ApplicableOccurrence=ApplicableOccurrence;_this1851.HasPropertySets=HasPropertySets;_this1851.RepresentationMaps=RepresentationMaps;_this1851.Tag=Tag;_this1851.type=2347495698;return _this1851;}return _createClass(IfcTypeProduct);}(IfcTypeObject);IFC4X32.IfcTypeProduct=IfcTypeProduct;var IfcTypeResource=/*#__PURE__*/function(_IfcTypeObject7){_inherits(IfcTypeResource,_IfcTypeObject7);var _super1855=_createSuper(IfcTypeResource);function IfcTypeResource(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType){var _this1852;_classCallCheck(this,IfcTypeResource);_this1852=_super1855.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets);_this1852.GlobalId=GlobalId;_this1852.OwnerHistory=OwnerHistory;_this1852.Name=Name;_this1852.Description=Description;_this1852.ApplicableOccurrence=ApplicableOccurrence;_this1852.HasPropertySets=HasPropertySets;_this1852.Identification=Identification;_this1852.LongDescription=LongDescription;_this1852.ResourceType=ResourceType;_this1852.type=3698973494;return _this1852;}return _createClass(IfcTypeResource);}(IfcTypeObject);IFC4X32.IfcTypeResource=IfcTypeResource;var IfcUShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf27){_inherits(IfcUShapeProfileDef,_IfcParameterizedProf27);var _super1856=_createSuper(IfcUShapeProfileDef);function IfcUShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,EdgeRadius,FlangeSlope){var _this1853;_classCallCheck(this,IfcUShapeProfileDef);_this1853=_super1856.call(this,expressID,ProfileType,ProfileName,Position);_this1853.ProfileType=ProfileType;_this1853.ProfileName=ProfileName;_this1853.Position=Position;_this1853.Depth=Depth;_this1853.FlangeWidth=FlangeWidth;_this1853.WebThickness=WebThickness;_this1853.FlangeThickness=FlangeThickness;_this1853.FilletRadius=FilletRadius;_this1853.EdgeRadius=EdgeRadius;_this1853.FlangeSlope=FlangeSlope;_this1853.type=427810014;return _this1853;}return _createClass(IfcUShapeProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcUShapeProfileDef=IfcUShapeProfileDef;var IfcVector=/*#__PURE__*/function(_IfcGeometricRepresen70){_inherits(IfcVector,_IfcGeometricRepresen70);var _super1857=_createSuper(IfcVector);function IfcVector(expressID,Orientation,Magnitude){var _this1854;_classCallCheck(this,IfcVector);_this1854=_super1857.call(this,expressID);_this1854.Orientation=Orientation;_this1854.Magnitude=Magnitude;_this1854.type=1417489154;return _this1854;}return _createClass(IfcVector);}(IfcGeometricRepresentationItem);IFC4X32.IfcVector=IfcVector;var IfcVertexLoop=/*#__PURE__*/function(_IfcLoop8){_inherits(IfcVertexLoop,_IfcLoop8);var _super1858=_createSuper(IfcVertexLoop);function IfcVertexLoop(expressID,LoopVertex){var _this1855;_classCallCheck(this,IfcVertexLoop);_this1855=_super1858.call(this,expressID);_this1855.LoopVertex=LoopVertex;_this1855.type=2759199220;return _this1855;}return _createClass(IfcVertexLoop);}(IfcLoop);IFC4X32.IfcVertexLoop=IfcVertexLoop;var IfcZShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf28){_inherits(IfcZShapeProfileDef,_IfcParameterizedProf28);var _super1859=_createSuper(IfcZShapeProfileDef);function IfcZShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,FlangeWidth,WebThickness,FlangeThickness,FilletRadius,EdgeRadius){var _this1856;_classCallCheck(this,IfcZShapeProfileDef);_this1856=_super1859.call(this,expressID,ProfileType,ProfileName,Position);_this1856.ProfileType=ProfileType;_this1856.ProfileName=ProfileName;_this1856.Position=Position;_this1856.Depth=Depth;_this1856.FlangeWidth=FlangeWidth;_this1856.WebThickness=WebThickness;_this1856.FlangeThickness=FlangeThickness;_this1856.FilletRadius=FilletRadius;_this1856.EdgeRadius=EdgeRadius;_this1856.type=2543172580;return _this1856;}return _createClass(IfcZShapeProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcZShapeProfileDef=IfcZShapeProfileDef;var IfcAdvancedFace=/*#__PURE__*/function(_IfcFaceSurface2){_inherits(IfcAdvancedFace,_IfcFaceSurface2);var _super1860=_createSuper(IfcAdvancedFace);function IfcAdvancedFace(expressID,Bounds,FaceSurface,SameSense){var _this1857;_classCallCheck(this,IfcAdvancedFace);_this1857=_super1860.call(this,expressID,Bounds,FaceSurface,SameSense);_this1857.Bounds=Bounds;_this1857.FaceSurface=FaceSurface;_this1857.SameSense=SameSense;_this1857.type=3406155212;return _this1857;}return _createClass(IfcAdvancedFace);}(IfcFaceSurface);IFC4X32.IfcAdvancedFace=IfcAdvancedFace;var IfcAnnotationFillArea=/*#__PURE__*/function(_IfcGeometricRepresen71){_inherits(IfcAnnotationFillArea,_IfcGeometricRepresen71);var _super1861=_createSuper(IfcAnnotationFillArea);function IfcAnnotationFillArea(expressID,OuterBoundary,InnerBoundaries){var _this1858;_classCallCheck(this,IfcAnnotationFillArea);_this1858=_super1861.call(this,expressID);_this1858.OuterBoundary=OuterBoundary;_this1858.InnerBoundaries=InnerBoundaries;_this1858.type=669184980;return _this1858;}return _createClass(IfcAnnotationFillArea);}(IfcGeometricRepresentationItem);IFC4X32.IfcAnnotationFillArea=IfcAnnotationFillArea;var IfcAsymmetricIShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf29){_inherits(IfcAsymmetricIShapeProfileDef,_IfcParameterizedProf29);var _super1862=_createSuper(IfcAsymmetricIShapeProfileDef);function IfcAsymmetricIShapeProfileDef(expressID,ProfileType,ProfileName,Position,BottomFlangeWidth,OverallDepth,WebThickness,BottomFlangeThickness,BottomFlangeFilletRadius,TopFlangeWidth,TopFlangeThickness,TopFlangeFilletRadius,BottomFlangeEdgeRadius,BottomFlangeSlope,TopFlangeEdgeRadius,TopFlangeSlope){var _this1859;_classCallCheck(this,IfcAsymmetricIShapeProfileDef);_this1859=_super1862.call(this,expressID,ProfileType,ProfileName,Position);_this1859.ProfileType=ProfileType;_this1859.ProfileName=ProfileName;_this1859.Position=Position;_this1859.BottomFlangeWidth=BottomFlangeWidth;_this1859.OverallDepth=OverallDepth;_this1859.WebThickness=WebThickness;_this1859.BottomFlangeThickness=BottomFlangeThickness;_this1859.BottomFlangeFilletRadius=BottomFlangeFilletRadius;_this1859.TopFlangeWidth=TopFlangeWidth;_this1859.TopFlangeThickness=TopFlangeThickness;_this1859.TopFlangeFilletRadius=TopFlangeFilletRadius;_this1859.BottomFlangeEdgeRadius=BottomFlangeEdgeRadius;_this1859.BottomFlangeSlope=BottomFlangeSlope;_this1859.TopFlangeEdgeRadius=TopFlangeEdgeRadius;_this1859.TopFlangeSlope=TopFlangeSlope;_this1859.type=3207858831;return _this1859;}return _createClass(IfcAsymmetricIShapeProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcAsymmetricIShapeProfileDef=IfcAsymmetricIShapeProfileDef;var IfcAxis1Placement=/*#__PURE__*/function(_IfcPlacement7){_inherits(IfcAxis1Placement,_IfcPlacement7);var _super1863=_createSuper(IfcAxis1Placement);function IfcAxis1Placement(expressID,Location,Axis){var _this1860;_classCallCheck(this,IfcAxis1Placement);_this1860=_super1863.call(this,expressID,Location);_this1860.Location=Location;_this1860.Axis=Axis;_this1860.type=4261334040;return _this1860;}return _createClass(IfcAxis1Placement);}(IfcPlacement);IFC4X32.IfcAxis1Placement=IfcAxis1Placement;var IfcAxis2Placement2D=/*#__PURE__*/function(_IfcPlacement8){_inherits(IfcAxis2Placement2D,_IfcPlacement8);var _super1864=_createSuper(IfcAxis2Placement2D);function IfcAxis2Placement2D(expressID,Location,RefDirection){var _this1861;_classCallCheck(this,IfcAxis2Placement2D);_this1861=_super1864.call(this,expressID,Location);_this1861.Location=Location;_this1861.RefDirection=RefDirection;_this1861.type=3125803723;return _this1861;}return _createClass(IfcAxis2Placement2D);}(IfcPlacement);IFC4X32.IfcAxis2Placement2D=IfcAxis2Placement2D;var IfcAxis2Placement3D=/*#__PURE__*/function(_IfcPlacement9){_inherits(IfcAxis2Placement3D,_IfcPlacement9);var _super1865=_createSuper(IfcAxis2Placement3D);function IfcAxis2Placement3D(expressID,Location,Axis,RefDirection){var _this1862;_classCallCheck(this,IfcAxis2Placement3D);_this1862=_super1865.call(this,expressID,Location);_this1862.Location=Location;_this1862.Axis=Axis;_this1862.RefDirection=RefDirection;_this1862.type=2740243338;return _this1862;}return _createClass(IfcAxis2Placement3D);}(IfcPlacement);IFC4X32.IfcAxis2Placement3D=IfcAxis2Placement3D;var IfcAxis2PlacementLinear=/*#__PURE__*/function(_IfcPlacement10){_inherits(IfcAxis2PlacementLinear,_IfcPlacement10);var _super1866=_createSuper(IfcAxis2PlacementLinear);function IfcAxis2PlacementLinear(expressID,Location,Axis,RefDirection){var _this1863;_classCallCheck(this,IfcAxis2PlacementLinear);_this1863=_super1866.call(this,expressID,Location);_this1863.Location=Location;_this1863.Axis=Axis;_this1863.RefDirection=RefDirection;_this1863.type=3425423356;return _this1863;}return _createClass(IfcAxis2PlacementLinear);}(IfcPlacement);IFC4X32.IfcAxis2PlacementLinear=IfcAxis2PlacementLinear;var IfcBooleanResult=/*#__PURE__*/function(_IfcGeometricRepresen72){_inherits(IfcBooleanResult,_IfcGeometricRepresen72);var _super1867=_createSuper(IfcBooleanResult);function IfcBooleanResult(expressID,Operator,FirstOperand,SecondOperand){var _this1864;_classCallCheck(this,IfcBooleanResult);_this1864=_super1867.call(this,expressID);_this1864.Operator=Operator;_this1864.FirstOperand=FirstOperand;_this1864.SecondOperand=SecondOperand;_this1864.type=2736907675;return _this1864;}return _createClass(IfcBooleanResult);}(IfcGeometricRepresentationItem);IFC4X32.IfcBooleanResult=IfcBooleanResult;var IfcBoundedSurface=/*#__PURE__*/function(_IfcSurface8){_inherits(IfcBoundedSurface,_IfcSurface8);var _super1868=_createSuper(IfcBoundedSurface);function IfcBoundedSurface(expressID){var _this1865;_classCallCheck(this,IfcBoundedSurface);_this1865=_super1868.call(this,expressID);_this1865.type=4182860854;return _this1865;}return _createClass(IfcBoundedSurface);}(IfcSurface);IFC4X32.IfcBoundedSurface=IfcBoundedSurface;var IfcBoundingBox=/*#__PURE__*/function(_IfcGeometricRepresen73){_inherits(IfcBoundingBox,_IfcGeometricRepresen73);var _super1869=_createSuper(IfcBoundingBox);function IfcBoundingBox(expressID,Corner,XDim,YDim,ZDim){var _this1866;_classCallCheck(this,IfcBoundingBox);_this1866=_super1869.call(this,expressID);_this1866.Corner=Corner;_this1866.XDim=XDim;_this1866.YDim=YDim;_this1866.ZDim=ZDim;_this1866.type=2581212453;return _this1866;}return _createClass(IfcBoundingBox);}(IfcGeometricRepresentationItem);IFC4X32.IfcBoundingBox=IfcBoundingBox;var IfcBoxedHalfSpace=/*#__PURE__*/function(_IfcHalfSpaceSolid6){_inherits(IfcBoxedHalfSpace,_IfcHalfSpaceSolid6);var _super1870=_createSuper(IfcBoxedHalfSpace);function IfcBoxedHalfSpace(expressID,BaseSurface,AgreementFlag,Enclosure){var _this1867;_classCallCheck(this,IfcBoxedHalfSpace);_this1867=_super1870.call(this,expressID,BaseSurface,AgreementFlag);_this1867.BaseSurface=BaseSurface;_this1867.AgreementFlag=AgreementFlag;_this1867.Enclosure=Enclosure;_this1867.type=2713105998;return _this1867;}return _createClass(IfcBoxedHalfSpace);}(IfcHalfSpaceSolid);IFC4X32.IfcBoxedHalfSpace=IfcBoxedHalfSpace;var IfcCShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf30){_inherits(IfcCShapeProfileDef,_IfcParameterizedProf30);var _super1871=_createSuper(IfcCShapeProfileDef);function IfcCShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,Width,WallThickness,Girth,InternalFilletRadius){var _this1868;_classCallCheck(this,IfcCShapeProfileDef);_this1868=_super1871.call(this,expressID,ProfileType,ProfileName,Position);_this1868.ProfileType=ProfileType;_this1868.ProfileName=ProfileName;_this1868.Position=Position;_this1868.Depth=Depth;_this1868.Width=Width;_this1868.WallThickness=WallThickness;_this1868.Girth=Girth;_this1868.InternalFilletRadius=InternalFilletRadius;_this1868.type=2898889636;return _this1868;}return _createClass(IfcCShapeProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcCShapeProfileDef=IfcCShapeProfileDef;var IfcCartesianPoint=/*#__PURE__*/function(_IfcPoint10){_inherits(IfcCartesianPoint,_IfcPoint10);var _super1872=_createSuper(IfcCartesianPoint);function IfcCartesianPoint(expressID,Coordinates){var _this1869;_classCallCheck(this,IfcCartesianPoint);_this1869=_super1872.call(this,expressID);_this1869.Coordinates=Coordinates;_this1869.type=1123145078;return _this1869;}return _createClass(IfcCartesianPoint);}(IfcPoint);IFC4X32.IfcCartesianPoint=IfcCartesianPoint;var IfcCartesianPointList=/*#__PURE__*/function(_IfcGeometricRepresen74){_inherits(IfcCartesianPointList,_IfcGeometricRepresen74);var _super1873=_createSuper(IfcCartesianPointList);function IfcCartesianPointList(expressID){var _this1870;_classCallCheck(this,IfcCartesianPointList);_this1870=_super1873.call(this,expressID);_this1870.type=574549367;return _this1870;}return _createClass(IfcCartesianPointList);}(IfcGeometricRepresentationItem);IFC4X32.IfcCartesianPointList=IfcCartesianPointList;var IfcCartesianPointList2D=/*#__PURE__*/function(_IfcCartesianPointLis3){_inherits(IfcCartesianPointList2D,_IfcCartesianPointLis3);var _super1874=_createSuper(IfcCartesianPointList2D);function IfcCartesianPointList2D(expressID,CoordList,TagList){var _this1871;_classCallCheck(this,IfcCartesianPointList2D);_this1871=_super1874.call(this,expressID);_this1871.CoordList=CoordList;_this1871.TagList=TagList;_this1871.type=1675464909;return _this1871;}return _createClass(IfcCartesianPointList2D);}(IfcCartesianPointList);IFC4X32.IfcCartesianPointList2D=IfcCartesianPointList2D;var IfcCartesianPointList3D=/*#__PURE__*/function(_IfcCartesianPointLis4){_inherits(IfcCartesianPointList3D,_IfcCartesianPointLis4);var _super1875=_createSuper(IfcCartesianPointList3D);function IfcCartesianPointList3D(expressID,CoordList,TagList){var _this1872;_classCallCheck(this,IfcCartesianPointList3D);_this1872=_super1875.call(this,expressID);_this1872.CoordList=CoordList;_this1872.TagList=TagList;_this1872.type=2059837836;return _this1872;}return _createClass(IfcCartesianPointList3D);}(IfcCartesianPointList);IFC4X32.IfcCartesianPointList3D=IfcCartesianPointList3D;var IfcCartesianTransformationOperator=/*#__PURE__*/function(_IfcGeometricRepresen75){_inherits(IfcCartesianTransformationOperator,_IfcGeometricRepresen75);var _super1876=_createSuper(IfcCartesianTransformationOperator);function IfcCartesianTransformationOperator(expressID,Axis1,Axis2,LocalOrigin,Scale){var _this1873;_classCallCheck(this,IfcCartesianTransformationOperator);_this1873=_super1876.call(this,expressID);_this1873.Axis1=Axis1;_this1873.Axis2=Axis2;_this1873.LocalOrigin=LocalOrigin;_this1873.Scale=Scale;_this1873.type=59481748;return _this1873;}return _createClass(IfcCartesianTransformationOperator);}(IfcGeometricRepresentationItem);IFC4X32.IfcCartesianTransformationOperator=IfcCartesianTransformationOperator;var IfcCartesianTransformationOperator2D=/*#__PURE__*/function(_IfcCartesianTransfor9){_inherits(IfcCartesianTransformationOperator2D,_IfcCartesianTransfor9);var _super1877=_createSuper(IfcCartesianTransformationOperator2D);function IfcCartesianTransformationOperator2D(expressID,Axis1,Axis2,LocalOrigin,Scale){var _this1874;_classCallCheck(this,IfcCartesianTransformationOperator2D);_this1874=_super1877.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this1874.Axis1=Axis1;_this1874.Axis2=Axis2;_this1874.LocalOrigin=LocalOrigin;_this1874.Scale=Scale;_this1874.type=3749851601;return _this1874;}return _createClass(IfcCartesianTransformationOperator2D);}(IfcCartesianTransformationOperator);IFC4X32.IfcCartesianTransformationOperator2D=IfcCartesianTransformationOperator2D;var IfcCartesianTransformationOperator2DnonUniform=/*#__PURE__*/function(_IfcCartesianTransfor10){_inherits(IfcCartesianTransformationOperator2DnonUniform,_IfcCartesianTransfor10);var _super1878=_createSuper(IfcCartesianTransformationOperator2DnonUniform);function IfcCartesianTransformationOperator2DnonUniform(expressID,Axis1,Axis2,LocalOrigin,Scale,Scale2){var _this1875;_classCallCheck(this,IfcCartesianTransformationOperator2DnonUniform);_this1875=_super1878.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this1875.Axis1=Axis1;_this1875.Axis2=Axis2;_this1875.LocalOrigin=LocalOrigin;_this1875.Scale=Scale;_this1875.Scale2=Scale2;_this1875.type=3486308946;return _this1875;}return _createClass(IfcCartesianTransformationOperator2DnonUniform);}(IfcCartesianTransformationOperator2D);IFC4X32.IfcCartesianTransformationOperator2DnonUniform=IfcCartesianTransformationOperator2DnonUniform;var IfcCartesianTransformationOperator3D=/*#__PURE__*/function(_IfcCartesianTransfor11){_inherits(IfcCartesianTransformationOperator3D,_IfcCartesianTransfor11);var _super1879=_createSuper(IfcCartesianTransformationOperator3D);function IfcCartesianTransformationOperator3D(expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3){var _this1876;_classCallCheck(this,IfcCartesianTransformationOperator3D);_this1876=_super1879.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale);_this1876.Axis1=Axis1;_this1876.Axis2=Axis2;_this1876.LocalOrigin=LocalOrigin;_this1876.Scale=Scale;_this1876.Axis3=Axis3;_this1876.type=3331915920;return _this1876;}return _createClass(IfcCartesianTransformationOperator3D);}(IfcCartesianTransformationOperator);IFC4X32.IfcCartesianTransformationOperator3D=IfcCartesianTransformationOperator3D;var IfcCartesianTransformationOperator3DnonUniform=/*#__PURE__*/function(_IfcCartesianTransfor12){_inherits(IfcCartesianTransformationOperator3DnonUniform,_IfcCartesianTransfor12);var _super1880=_createSuper(IfcCartesianTransformationOperator3DnonUniform);function IfcCartesianTransformationOperator3DnonUniform(expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3,Scale2,Scale3){var _this1877;_classCallCheck(this,IfcCartesianTransformationOperator3DnonUniform);_this1877=_super1880.call(this,expressID,Axis1,Axis2,LocalOrigin,Scale,Axis3);_this1877.Axis1=Axis1;_this1877.Axis2=Axis2;_this1877.LocalOrigin=LocalOrigin;_this1877.Scale=Scale;_this1877.Axis3=Axis3;_this1877.Scale2=Scale2;_this1877.Scale3=Scale3;_this1877.type=1416205885;return _this1877;}return _createClass(IfcCartesianTransformationOperator3DnonUniform);}(IfcCartesianTransformationOperator3D);IFC4X32.IfcCartesianTransformationOperator3DnonUniform=IfcCartesianTransformationOperator3DnonUniform;var IfcCircleProfileDef=/*#__PURE__*/function(_IfcParameterizedProf31){_inherits(IfcCircleProfileDef,_IfcParameterizedProf31);var _super1881=_createSuper(IfcCircleProfileDef);function IfcCircleProfileDef(expressID,ProfileType,ProfileName,Position,Radius){var _this1878;_classCallCheck(this,IfcCircleProfileDef);_this1878=_super1881.call(this,expressID,ProfileType,ProfileName,Position);_this1878.ProfileType=ProfileType;_this1878.ProfileName=ProfileName;_this1878.Position=Position;_this1878.Radius=Radius;_this1878.type=1383045692;return _this1878;}return _createClass(IfcCircleProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcCircleProfileDef=IfcCircleProfileDef;var IfcClosedShell=/*#__PURE__*/function(_IfcConnectedFaceSet6){_inherits(IfcClosedShell,_IfcConnectedFaceSet6);var _super1882=_createSuper(IfcClosedShell);function IfcClosedShell(expressID,CfsFaces){var _this1879;_classCallCheck(this,IfcClosedShell);_this1879=_super1882.call(this,expressID,CfsFaces);_this1879.CfsFaces=CfsFaces;_this1879.type=2205249479;return _this1879;}return _createClass(IfcClosedShell);}(IfcConnectedFaceSet);IFC4X32.IfcClosedShell=IfcClosedShell;var IfcColourRgb=/*#__PURE__*/function(_IfcColourSpecificati3){_inherits(IfcColourRgb,_IfcColourSpecificati3);var _super1883=_createSuper(IfcColourRgb);function IfcColourRgb(expressID,Name,Red,Green,Blue){var _this1880;_classCallCheck(this,IfcColourRgb);_this1880=_super1883.call(this,expressID,Name);_this1880.Name=Name;_this1880.Red=Red;_this1880.Green=Green;_this1880.Blue=Blue;_this1880.type=776857604;return _this1880;}return _createClass(IfcColourRgb);}(IfcColourSpecification);IFC4X32.IfcColourRgb=IfcColourRgb;var IfcComplexProperty=/*#__PURE__*/function(_IfcProperty6){_inherits(IfcComplexProperty,_IfcProperty6);var _super1884=_createSuper(IfcComplexProperty);function IfcComplexProperty(expressID,Name,Specification,UsageName,HasProperties){var _this1881;_classCallCheck(this,IfcComplexProperty);_this1881=_super1884.call(this,expressID,Name,Specification);_this1881.Name=Name;_this1881.Specification=Specification;_this1881.UsageName=UsageName;_this1881.HasProperties=HasProperties;_this1881.type=2542286263;return _this1881;}return _createClass(IfcComplexProperty);}(IfcProperty);IFC4X32.IfcComplexProperty=IfcComplexProperty;var IfcCompositeCurveSegment=/*#__PURE__*/function(_IfcSegment){_inherits(IfcCompositeCurveSegment,_IfcSegment);var _super1885=_createSuper(IfcCompositeCurveSegment);function IfcCompositeCurveSegment(expressID,Transition,SameSense,ParentCurve){var _this1882;_classCallCheck(this,IfcCompositeCurveSegment);_this1882=_super1885.call(this,expressID,Transition);_this1882.Transition=Transition;_this1882.SameSense=SameSense;_this1882.ParentCurve=ParentCurve;_this1882.type=2485617015;return _this1882;}return _createClass(IfcCompositeCurveSegment);}(IfcSegment);IFC4X32.IfcCompositeCurveSegment=IfcCompositeCurveSegment;var IfcConstructionResourceType=/*#__PURE__*/function(_IfcTypeResource2){_inherits(IfcConstructionResourceType,_IfcTypeResource2);var _super1886=_createSuper(IfcConstructionResourceType);function IfcConstructionResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity){var _this1883;_classCallCheck(this,IfcConstructionResourceType);_this1883=_super1886.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType);_this1883.GlobalId=GlobalId;_this1883.OwnerHistory=OwnerHistory;_this1883.Name=Name;_this1883.Description=Description;_this1883.ApplicableOccurrence=ApplicableOccurrence;_this1883.HasPropertySets=HasPropertySets;_this1883.Identification=Identification;_this1883.LongDescription=LongDescription;_this1883.ResourceType=ResourceType;_this1883.BaseCosts=BaseCosts;_this1883.BaseQuantity=BaseQuantity;_this1883.type=2574617495;return _this1883;}return _createClass(IfcConstructionResourceType);}(IfcTypeResource);IFC4X32.IfcConstructionResourceType=IfcConstructionResourceType;var IfcContext=/*#__PURE__*/function(_IfcObjectDefinition7){_inherits(IfcContext,_IfcObjectDefinition7);var _super1887=_createSuper(IfcContext);function IfcContext(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext){var _this1884;_classCallCheck(this,IfcContext);_this1884=_super1887.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1884.GlobalId=GlobalId;_this1884.OwnerHistory=OwnerHistory;_this1884.Name=Name;_this1884.Description=Description;_this1884.ObjectType=ObjectType;_this1884.LongName=LongName;_this1884.Phase=Phase;_this1884.RepresentationContexts=RepresentationContexts;_this1884.UnitsInContext=UnitsInContext;_this1884.type=3419103109;return _this1884;}return _createClass(IfcContext);}(IfcObjectDefinition);IFC4X32.IfcContext=IfcContext;var IfcCrewResourceType=/*#__PURE__*/function(_IfcConstructionResou19){_inherits(IfcCrewResourceType,_IfcConstructionResou19);var _super1888=_createSuper(IfcCrewResourceType);function IfcCrewResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1885;_classCallCheck(this,IfcCrewResourceType);_this1885=_super1888.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1885.GlobalId=GlobalId;_this1885.OwnerHistory=OwnerHistory;_this1885.Name=Name;_this1885.Description=Description;_this1885.ApplicableOccurrence=ApplicableOccurrence;_this1885.HasPropertySets=HasPropertySets;_this1885.Identification=Identification;_this1885.LongDescription=LongDescription;_this1885.ResourceType=ResourceType;_this1885.BaseCosts=BaseCosts;_this1885.BaseQuantity=BaseQuantity;_this1885.PredefinedType=PredefinedType;_this1885.type=1815067380;return _this1885;}return _createClass(IfcCrewResourceType);}(IfcConstructionResourceType);IFC4X32.IfcCrewResourceType=IfcCrewResourceType;var IfcCsgPrimitive3D=/*#__PURE__*/function(_IfcGeometricRepresen76){_inherits(IfcCsgPrimitive3D,_IfcGeometricRepresen76);var _super1889=_createSuper(IfcCsgPrimitive3D);function IfcCsgPrimitive3D(expressID,Position){var _this1886;_classCallCheck(this,IfcCsgPrimitive3D);_this1886=_super1889.call(this,expressID);_this1886.Position=Position;_this1886.type=2506170314;return _this1886;}return _createClass(IfcCsgPrimitive3D);}(IfcGeometricRepresentationItem);IFC4X32.IfcCsgPrimitive3D=IfcCsgPrimitive3D;var IfcCsgSolid=/*#__PURE__*/function(_IfcSolidModel11){_inherits(IfcCsgSolid,_IfcSolidModel11);var _super1890=_createSuper(IfcCsgSolid);function IfcCsgSolid(expressID,TreeRootExpression){var _this1887;_classCallCheck(this,IfcCsgSolid);_this1887=_super1890.call(this,expressID);_this1887.TreeRootExpression=TreeRootExpression;_this1887.type=2147822146;return _this1887;}return _createClass(IfcCsgSolid);}(IfcSolidModel);IFC4X32.IfcCsgSolid=IfcCsgSolid;var IfcCurve=/*#__PURE__*/function(_IfcGeometricRepresen77){_inherits(IfcCurve,_IfcGeometricRepresen77);var _super1891=_createSuper(IfcCurve);function IfcCurve(expressID){var _this1888;_classCallCheck(this,IfcCurve);_this1888=_super1891.call(this,expressID);_this1888.type=2601014836;return _this1888;}return _createClass(IfcCurve);}(IfcGeometricRepresentationItem);IFC4X32.IfcCurve=IfcCurve;var IfcCurveBoundedPlane=/*#__PURE__*/function(_IfcBoundedSurface7){_inherits(IfcCurveBoundedPlane,_IfcBoundedSurface7);var _super1892=_createSuper(IfcCurveBoundedPlane);function IfcCurveBoundedPlane(expressID,BasisSurface,OuterBoundary,InnerBoundaries){var _this1889;_classCallCheck(this,IfcCurveBoundedPlane);_this1889=_super1892.call(this,expressID);_this1889.BasisSurface=BasisSurface;_this1889.OuterBoundary=OuterBoundary;_this1889.InnerBoundaries=InnerBoundaries;_this1889.type=2827736869;return _this1889;}return _createClass(IfcCurveBoundedPlane);}(IfcBoundedSurface);IFC4X32.IfcCurveBoundedPlane=IfcCurveBoundedPlane;var IfcCurveBoundedSurface=/*#__PURE__*/function(_IfcBoundedSurface8){_inherits(IfcCurveBoundedSurface,_IfcBoundedSurface8);var _super1893=_createSuper(IfcCurveBoundedSurface);function IfcCurveBoundedSurface(expressID,BasisSurface,Boundaries,ImplicitOuter){var _this1890;_classCallCheck(this,IfcCurveBoundedSurface);_this1890=_super1893.call(this,expressID);_this1890.BasisSurface=BasisSurface;_this1890.Boundaries=Boundaries;_this1890.ImplicitOuter=ImplicitOuter;_this1890.type=2629017746;return _this1890;}return _createClass(IfcCurveBoundedSurface);}(IfcBoundedSurface);IFC4X32.IfcCurveBoundedSurface=IfcCurveBoundedSurface;var IfcCurveSegment=/*#__PURE__*/function(_IfcSegment2){_inherits(IfcCurveSegment,_IfcSegment2);var _super1894=_createSuper(IfcCurveSegment);function IfcCurveSegment(expressID,Transition,Placement,SegmentStart,SegmentLength,ParentCurve){var _this1891;_classCallCheck(this,IfcCurveSegment);_this1891=_super1894.call(this,expressID,Transition);_this1891.Transition=Transition;_this1891.Placement=Placement;_this1891.SegmentStart=SegmentStart;_this1891.SegmentLength=SegmentLength;_this1891.ParentCurve=ParentCurve;_this1891.type=4212018352;return _this1891;}return _createClass(IfcCurveSegment);}(IfcSegment);IFC4X32.IfcCurveSegment=IfcCurveSegment;var IfcDirection=/*#__PURE__*/function(_IfcGeometricRepresen78){_inherits(IfcDirection,_IfcGeometricRepresen78);var _super1895=_createSuper(IfcDirection);function IfcDirection(expressID,DirectionRatios){var _this1892;_classCallCheck(this,IfcDirection);_this1892=_super1895.call(this,expressID);_this1892.DirectionRatios=DirectionRatios;_this1892.type=32440307;return _this1892;}return _createClass(IfcDirection);}(IfcGeometricRepresentationItem);IFC4X32.IfcDirection=IfcDirection;var IfcDirectrixCurveSweptAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid8){_inherits(IfcDirectrixCurveSweptAreaSolid,_IfcSweptAreaSolid8);var _super1896=_createSuper(IfcDirectrixCurveSweptAreaSolid);function IfcDirectrixCurveSweptAreaSolid(expressID,SweptArea,Position,Directrix,StartParam,EndParam){var _this1893;_classCallCheck(this,IfcDirectrixCurveSweptAreaSolid);_this1893=_super1896.call(this,expressID,SweptArea,Position);_this1893.SweptArea=SweptArea;_this1893.Position=Position;_this1893.Directrix=Directrix;_this1893.StartParam=StartParam;_this1893.EndParam=EndParam;_this1893.type=593015953;return _this1893;}return _createClass(IfcDirectrixCurveSweptAreaSolid);}(IfcSweptAreaSolid);IFC4X32.IfcDirectrixCurveSweptAreaSolid=IfcDirectrixCurveSweptAreaSolid;var IfcEdgeLoop=/*#__PURE__*/function(_IfcLoop9){_inherits(IfcEdgeLoop,_IfcLoop9);var _super1897=_createSuper(IfcEdgeLoop);function IfcEdgeLoop(expressID,EdgeList){var _this1894;_classCallCheck(this,IfcEdgeLoop);_this1894=_super1897.call(this,expressID);_this1894.EdgeList=EdgeList;_this1894.type=1472233963;return _this1894;}return _createClass(IfcEdgeLoop);}(IfcLoop);IFC4X32.IfcEdgeLoop=IfcEdgeLoop;var IfcElementQuantity=/*#__PURE__*/function(_IfcQuantitySet2){_inherits(IfcElementQuantity,_IfcQuantitySet2);var _super1898=_createSuper(IfcElementQuantity);function IfcElementQuantity(expressID,GlobalId,OwnerHistory,Name,Description,MethodOfMeasurement,Quantities){var _this1895;_classCallCheck(this,IfcElementQuantity);_this1895=_super1898.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1895.GlobalId=GlobalId;_this1895.OwnerHistory=OwnerHistory;_this1895.Name=Name;_this1895.Description=Description;_this1895.MethodOfMeasurement=MethodOfMeasurement;_this1895.Quantities=Quantities;_this1895.type=1883228015;return _this1895;}return _createClass(IfcElementQuantity);}(IfcQuantitySet);IFC4X32.IfcElementQuantity=IfcElementQuantity;var IfcElementType=/*#__PURE__*/function(_IfcTypeProduct8){_inherits(IfcElementType,_IfcTypeProduct8);var _super1899=_createSuper(IfcElementType);function IfcElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1896;_classCallCheck(this,IfcElementType);_this1896=_super1899.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this1896.GlobalId=GlobalId;_this1896.OwnerHistory=OwnerHistory;_this1896.Name=Name;_this1896.Description=Description;_this1896.ApplicableOccurrence=ApplicableOccurrence;_this1896.HasPropertySets=HasPropertySets;_this1896.RepresentationMaps=RepresentationMaps;_this1896.Tag=Tag;_this1896.ElementType=ElementType;_this1896.type=339256511;return _this1896;}return _createClass(IfcElementType);}(IfcTypeProduct);IFC4X32.IfcElementType=IfcElementType;var IfcElementarySurface=/*#__PURE__*/function(_IfcSurface9){_inherits(IfcElementarySurface,_IfcSurface9);var _super1900=_createSuper(IfcElementarySurface);function IfcElementarySurface(expressID,Position){var _this1897;_classCallCheck(this,IfcElementarySurface);_this1897=_super1900.call(this,expressID);_this1897.Position=Position;_this1897.type=2777663545;return _this1897;}return _createClass(IfcElementarySurface);}(IfcSurface);IFC4X32.IfcElementarySurface=IfcElementarySurface;var IfcEllipseProfileDef=/*#__PURE__*/function(_IfcParameterizedProf32){_inherits(IfcEllipseProfileDef,_IfcParameterizedProf32);var _super1901=_createSuper(IfcEllipseProfileDef);function IfcEllipseProfileDef(expressID,ProfileType,ProfileName,Position,SemiAxis1,SemiAxis2){var _this1898;_classCallCheck(this,IfcEllipseProfileDef);_this1898=_super1901.call(this,expressID,ProfileType,ProfileName,Position);_this1898.ProfileType=ProfileType;_this1898.ProfileName=ProfileName;_this1898.Position=Position;_this1898.SemiAxis1=SemiAxis1;_this1898.SemiAxis2=SemiAxis2;_this1898.type=2835456948;return _this1898;}return _createClass(IfcEllipseProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcEllipseProfileDef=IfcEllipseProfileDef;var IfcEventType=/*#__PURE__*/function(_IfcTypeProcess4){_inherits(IfcEventType,_IfcTypeProcess4);var _super1902=_createSuper(IfcEventType);function IfcEventType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType,PredefinedType,EventTriggerType,UserDefinedEventTriggerType){var _this1899;_classCallCheck(this,IfcEventType);_this1899=_super1902.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType);_this1899.GlobalId=GlobalId;_this1899.OwnerHistory=OwnerHistory;_this1899.Name=Name;_this1899.Description=Description;_this1899.ApplicableOccurrence=ApplicableOccurrence;_this1899.HasPropertySets=HasPropertySets;_this1899.Identification=Identification;_this1899.LongDescription=LongDescription;_this1899.ProcessType=ProcessType;_this1899.PredefinedType=PredefinedType;_this1899.EventTriggerType=EventTriggerType;_this1899.UserDefinedEventTriggerType=UserDefinedEventTriggerType;_this1899.type=4024345920;return _this1899;}return _createClass(IfcEventType);}(IfcTypeProcess);IFC4X32.IfcEventType=IfcEventType;var IfcExtrudedAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid9){_inherits(IfcExtrudedAreaSolid,_IfcSweptAreaSolid9);var _super1903=_createSuper(IfcExtrudedAreaSolid);function IfcExtrudedAreaSolid(expressID,SweptArea,Position,ExtrudedDirection,Depth){var _this1900;_classCallCheck(this,IfcExtrudedAreaSolid);_this1900=_super1903.call(this,expressID,SweptArea,Position);_this1900.SweptArea=SweptArea;_this1900.Position=Position;_this1900.ExtrudedDirection=ExtrudedDirection;_this1900.Depth=Depth;_this1900.type=477187591;return _this1900;}return _createClass(IfcExtrudedAreaSolid);}(IfcSweptAreaSolid);IFC4X32.IfcExtrudedAreaSolid=IfcExtrudedAreaSolid;var IfcExtrudedAreaSolidTapered=/*#__PURE__*/function(_IfcExtrudedAreaSolid2){_inherits(IfcExtrudedAreaSolidTapered,_IfcExtrudedAreaSolid2);var _super1904=_createSuper(IfcExtrudedAreaSolidTapered);function IfcExtrudedAreaSolidTapered(expressID,SweptArea,Position,ExtrudedDirection,Depth,EndSweptArea){var _this1901;_classCallCheck(this,IfcExtrudedAreaSolidTapered);_this1901=_super1904.call(this,expressID,SweptArea,Position,ExtrudedDirection,Depth);_this1901.SweptArea=SweptArea;_this1901.Position=Position;_this1901.ExtrudedDirection=ExtrudedDirection;_this1901.Depth=Depth;_this1901.EndSweptArea=EndSweptArea;_this1901.type=2804161546;return _this1901;}return _createClass(IfcExtrudedAreaSolidTapered);}(IfcExtrudedAreaSolid);IFC4X32.IfcExtrudedAreaSolidTapered=IfcExtrudedAreaSolidTapered;var IfcFaceBasedSurfaceModel=/*#__PURE__*/function(_IfcGeometricRepresen79){_inherits(IfcFaceBasedSurfaceModel,_IfcGeometricRepresen79);var _super1905=_createSuper(IfcFaceBasedSurfaceModel);function IfcFaceBasedSurfaceModel(expressID,FbsmFaces){var _this1902;_classCallCheck(this,IfcFaceBasedSurfaceModel);_this1902=_super1905.call(this,expressID);_this1902.FbsmFaces=FbsmFaces;_this1902.type=2047409740;return _this1902;}return _createClass(IfcFaceBasedSurfaceModel);}(IfcGeometricRepresentationItem);IFC4X32.IfcFaceBasedSurfaceModel=IfcFaceBasedSurfaceModel;var IfcFillAreaStyleHatching=/*#__PURE__*/function(_IfcGeometricRepresen80){_inherits(IfcFillAreaStyleHatching,_IfcGeometricRepresen80);var _super1906=_createSuper(IfcFillAreaStyleHatching);function IfcFillAreaStyleHatching(expressID,HatchLineAppearance,StartOfNextHatchLine,PointOfReferenceHatchLine,PatternStart,HatchLineAngle){var _this1903;_classCallCheck(this,IfcFillAreaStyleHatching);_this1903=_super1906.call(this,expressID);_this1903.HatchLineAppearance=HatchLineAppearance;_this1903.StartOfNextHatchLine=StartOfNextHatchLine;_this1903.PointOfReferenceHatchLine=PointOfReferenceHatchLine;_this1903.PatternStart=PatternStart;_this1903.HatchLineAngle=HatchLineAngle;_this1903.type=374418227;return _this1903;}return _createClass(IfcFillAreaStyleHatching);}(IfcGeometricRepresentationItem);IFC4X32.IfcFillAreaStyleHatching=IfcFillAreaStyleHatching;var IfcFillAreaStyleTiles=/*#__PURE__*/function(_IfcGeometricRepresen81){_inherits(IfcFillAreaStyleTiles,_IfcGeometricRepresen81);var _super1907=_createSuper(IfcFillAreaStyleTiles);function IfcFillAreaStyleTiles(expressID,TilingPattern,Tiles,TilingScale){var _this1904;_classCallCheck(this,IfcFillAreaStyleTiles);_this1904=_super1907.call(this,expressID);_this1904.TilingPattern=TilingPattern;_this1904.Tiles=Tiles;_this1904.TilingScale=TilingScale;_this1904.type=315944413;return _this1904;}return _createClass(IfcFillAreaStyleTiles);}(IfcGeometricRepresentationItem);IFC4X32.IfcFillAreaStyleTiles=IfcFillAreaStyleTiles;var IfcFixedReferenceSweptAreaSolid=/*#__PURE__*/function(_IfcDirectrixCurveSwe){_inherits(IfcFixedReferenceSweptAreaSolid,_IfcDirectrixCurveSwe);var _super1908=_createSuper(IfcFixedReferenceSweptAreaSolid);function IfcFixedReferenceSweptAreaSolid(expressID,SweptArea,Position,Directrix,StartParam,EndParam,FixedReference){var _this1905;_classCallCheck(this,IfcFixedReferenceSweptAreaSolid);_this1905=_super1908.call(this,expressID,SweptArea,Position,Directrix,StartParam,EndParam);_this1905.SweptArea=SweptArea;_this1905.Position=Position;_this1905.Directrix=Directrix;_this1905.StartParam=StartParam;_this1905.EndParam=EndParam;_this1905.FixedReference=FixedReference;_this1905.type=2652556860;return _this1905;}return _createClass(IfcFixedReferenceSweptAreaSolid);}(IfcDirectrixCurveSweptAreaSolid);IFC4X32.IfcFixedReferenceSweptAreaSolid=IfcFixedReferenceSweptAreaSolid;var IfcFurnishingElementType=/*#__PURE__*/function(_IfcElementType15){_inherits(IfcFurnishingElementType,_IfcElementType15);var _super1909=_createSuper(IfcFurnishingElementType);function IfcFurnishingElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this1906;_classCallCheck(this,IfcFurnishingElementType);_this1906=_super1909.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1906.GlobalId=GlobalId;_this1906.OwnerHistory=OwnerHistory;_this1906.Name=Name;_this1906.Description=Description;_this1906.ApplicableOccurrence=ApplicableOccurrence;_this1906.HasPropertySets=HasPropertySets;_this1906.RepresentationMaps=RepresentationMaps;_this1906.Tag=Tag;_this1906.ElementType=ElementType;_this1906.type=4238390223;return _this1906;}return _createClass(IfcFurnishingElementType);}(IfcElementType);IFC4X32.IfcFurnishingElementType=IfcFurnishingElementType;var IfcFurnitureType=/*#__PURE__*/function(_IfcFurnishingElement7){_inherits(IfcFurnitureType,_IfcFurnishingElement7);var _super1910=_createSuper(IfcFurnitureType);function IfcFurnitureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,AssemblyPlace,PredefinedType){var _this1907;_classCallCheck(this,IfcFurnitureType);_this1907=_super1910.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1907.GlobalId=GlobalId;_this1907.OwnerHistory=OwnerHistory;_this1907.Name=Name;_this1907.Description=Description;_this1907.ApplicableOccurrence=ApplicableOccurrence;_this1907.HasPropertySets=HasPropertySets;_this1907.RepresentationMaps=RepresentationMaps;_this1907.Tag=Tag;_this1907.ElementType=ElementType;_this1907.AssemblyPlace=AssemblyPlace;_this1907.PredefinedType=PredefinedType;_this1907.type=1268542332;return _this1907;}return _createClass(IfcFurnitureType);}(IfcFurnishingElementType);IFC4X32.IfcFurnitureType=IfcFurnitureType;var IfcGeographicElementType=/*#__PURE__*/function(_IfcElementType16){_inherits(IfcGeographicElementType,_IfcElementType16);var _super1911=_createSuper(IfcGeographicElementType);function IfcGeographicElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this1908;_classCallCheck(this,IfcGeographicElementType);_this1908=_super1911.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this1908.GlobalId=GlobalId;_this1908.OwnerHistory=OwnerHistory;_this1908.Name=Name;_this1908.Description=Description;_this1908.ApplicableOccurrence=ApplicableOccurrence;_this1908.HasPropertySets=HasPropertySets;_this1908.RepresentationMaps=RepresentationMaps;_this1908.Tag=Tag;_this1908.ElementType=ElementType;_this1908.PredefinedType=PredefinedType;_this1908.type=4095422895;return _this1908;}return _createClass(IfcGeographicElementType);}(IfcElementType);IFC4X32.IfcGeographicElementType=IfcGeographicElementType;var IfcGeometricCurveSet=/*#__PURE__*/function(_IfcGeometricSet3){_inherits(IfcGeometricCurveSet,_IfcGeometricSet3);var _super1912=_createSuper(IfcGeometricCurveSet);function IfcGeometricCurveSet(expressID,Elements){var _this1909;_classCallCheck(this,IfcGeometricCurveSet);_this1909=_super1912.call(this,expressID,Elements);_this1909.Elements=Elements;_this1909.type=987898635;return _this1909;}return _createClass(IfcGeometricCurveSet);}(IfcGeometricSet);IFC4X32.IfcGeometricCurveSet=IfcGeometricCurveSet;var IfcIShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf33){_inherits(IfcIShapeProfileDef,_IfcParameterizedProf33);var _super1913=_createSuper(IfcIShapeProfileDef);function IfcIShapeProfileDef(expressID,ProfileType,ProfileName,Position,OverallWidth,OverallDepth,WebThickness,FlangeThickness,FilletRadius,FlangeEdgeRadius,FlangeSlope){var _this1910;_classCallCheck(this,IfcIShapeProfileDef);_this1910=_super1913.call(this,expressID,ProfileType,ProfileName,Position);_this1910.ProfileType=ProfileType;_this1910.ProfileName=ProfileName;_this1910.Position=Position;_this1910.OverallWidth=OverallWidth;_this1910.OverallDepth=OverallDepth;_this1910.WebThickness=WebThickness;_this1910.FlangeThickness=FlangeThickness;_this1910.FilletRadius=FilletRadius;_this1910.FlangeEdgeRadius=FlangeEdgeRadius;_this1910.FlangeSlope=FlangeSlope;_this1910.type=1484403080;return _this1910;}return _createClass(IfcIShapeProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcIShapeProfileDef=IfcIShapeProfileDef;var IfcIndexedPolygonalFace=/*#__PURE__*/function(_IfcTessellatedItem3){_inherits(IfcIndexedPolygonalFace,_IfcTessellatedItem3);var _super1914=_createSuper(IfcIndexedPolygonalFace);function IfcIndexedPolygonalFace(expressID,CoordIndex){var _this1911;_classCallCheck(this,IfcIndexedPolygonalFace);_this1911=_super1914.call(this,expressID);_this1911.CoordIndex=CoordIndex;_this1911.type=178912537;return _this1911;}return _createClass(IfcIndexedPolygonalFace);}(IfcTessellatedItem);IFC4X32.IfcIndexedPolygonalFace=IfcIndexedPolygonalFace;var IfcIndexedPolygonalFaceWithVoids=/*#__PURE__*/function(_IfcIndexedPolygonalF2){_inherits(IfcIndexedPolygonalFaceWithVoids,_IfcIndexedPolygonalF2);var _super1915=_createSuper(IfcIndexedPolygonalFaceWithVoids);function IfcIndexedPolygonalFaceWithVoids(expressID,CoordIndex,InnerCoordIndices){var _this1912;_classCallCheck(this,IfcIndexedPolygonalFaceWithVoids);_this1912=_super1915.call(this,expressID,CoordIndex);_this1912.CoordIndex=CoordIndex;_this1912.InnerCoordIndices=InnerCoordIndices;_this1912.type=2294589976;return _this1912;}return _createClass(IfcIndexedPolygonalFaceWithVoids);}(IfcIndexedPolygonalFace);IFC4X32.IfcIndexedPolygonalFaceWithVoids=IfcIndexedPolygonalFaceWithVoids;var IfcIndexedPolygonalTextureMap=/*#__PURE__*/function(_IfcIndexedTextureMap3){_inherits(IfcIndexedPolygonalTextureMap,_IfcIndexedTextureMap3);var _super1916=_createSuper(IfcIndexedPolygonalTextureMap);function IfcIndexedPolygonalTextureMap(expressID,Maps,MappedTo,TexCoords,TexCoordIndices){var _this1913;_classCallCheck(this,IfcIndexedPolygonalTextureMap);_this1913=_super1916.call(this,expressID,Maps,MappedTo,TexCoords);_this1913.Maps=Maps;_this1913.MappedTo=MappedTo;_this1913.TexCoords=TexCoords;_this1913.TexCoordIndices=TexCoordIndices;_this1913.type=3465909080;return _this1913;}return _createClass(IfcIndexedPolygonalTextureMap);}(IfcIndexedTextureMap);IFC4X32.IfcIndexedPolygonalTextureMap=IfcIndexedPolygonalTextureMap;var IfcLShapeProfileDef=/*#__PURE__*/function(_IfcParameterizedProf34){_inherits(IfcLShapeProfileDef,_IfcParameterizedProf34);var _super1917=_createSuper(IfcLShapeProfileDef);function IfcLShapeProfileDef(expressID,ProfileType,ProfileName,Position,Depth,Width,Thickness,FilletRadius,EdgeRadius,LegSlope){var _this1914;_classCallCheck(this,IfcLShapeProfileDef);_this1914=_super1917.call(this,expressID,ProfileType,ProfileName,Position);_this1914.ProfileType=ProfileType;_this1914.ProfileName=ProfileName;_this1914.Position=Position;_this1914.Depth=Depth;_this1914.Width=Width;_this1914.Thickness=Thickness;_this1914.FilletRadius=FilletRadius;_this1914.EdgeRadius=EdgeRadius;_this1914.LegSlope=LegSlope;_this1914.type=572779678;return _this1914;}return _createClass(IfcLShapeProfileDef);}(IfcParameterizedProfileDef);IFC4X32.IfcLShapeProfileDef=IfcLShapeProfileDef;var IfcLaborResourceType=/*#__PURE__*/function(_IfcConstructionResou20){_inherits(IfcLaborResourceType,_IfcConstructionResou20);var _super1918=_createSuper(IfcLaborResourceType);function IfcLaborResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this1915;_classCallCheck(this,IfcLaborResourceType);_this1915=_super1918.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this1915.GlobalId=GlobalId;_this1915.OwnerHistory=OwnerHistory;_this1915.Name=Name;_this1915.Description=Description;_this1915.ApplicableOccurrence=ApplicableOccurrence;_this1915.HasPropertySets=HasPropertySets;_this1915.Identification=Identification;_this1915.LongDescription=LongDescription;_this1915.ResourceType=ResourceType;_this1915.BaseCosts=BaseCosts;_this1915.BaseQuantity=BaseQuantity;_this1915.PredefinedType=PredefinedType;_this1915.type=428585644;return _this1915;}return _createClass(IfcLaborResourceType);}(IfcConstructionResourceType);IFC4X32.IfcLaborResourceType=IfcLaborResourceType;var IfcLine=/*#__PURE__*/function(_IfcCurve13){_inherits(IfcLine,_IfcCurve13);var _super1919=_createSuper(IfcLine);function IfcLine(expressID,Pnt,Dir){var _this1916;_classCallCheck(this,IfcLine);_this1916=_super1919.call(this,expressID);_this1916.Pnt=Pnt;_this1916.Dir=Dir;_this1916.type=1281925730;return _this1916;}return _createClass(IfcLine);}(IfcCurve);IFC4X32.IfcLine=IfcLine;var IfcManifoldSolidBrep=/*#__PURE__*/function(_IfcSolidModel12){_inherits(IfcManifoldSolidBrep,_IfcSolidModel12);var _super1920=_createSuper(IfcManifoldSolidBrep);function IfcManifoldSolidBrep(expressID,Outer){var _this1917;_classCallCheck(this,IfcManifoldSolidBrep);_this1917=_super1920.call(this,expressID);_this1917.Outer=Outer;_this1917.type=1425443689;return _this1917;}return _createClass(IfcManifoldSolidBrep);}(IfcSolidModel);IFC4X32.IfcManifoldSolidBrep=IfcManifoldSolidBrep;var IfcObject=/*#__PURE__*/function(_IfcObjectDefinition8){_inherits(IfcObject,_IfcObjectDefinition8);var _super1921=_createSuper(IfcObject);function IfcObject(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this1918;_classCallCheck(this,IfcObject);_this1918=_super1921.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1918.GlobalId=GlobalId;_this1918.OwnerHistory=OwnerHistory;_this1918.Name=Name;_this1918.Description=Description;_this1918.ObjectType=ObjectType;_this1918.type=3888040117;return _this1918;}return _createClass(IfcObject);}(IfcObjectDefinition);IFC4X32.IfcObject=IfcObject;var IfcOffsetCurve=/*#__PURE__*/function(_IfcCurve14){_inherits(IfcOffsetCurve,_IfcCurve14);var _super1922=_createSuper(IfcOffsetCurve);function IfcOffsetCurve(expressID,BasisCurve){var _this1919;_classCallCheck(this,IfcOffsetCurve);_this1919=_super1922.call(this,expressID);_this1919.BasisCurve=BasisCurve;_this1919.type=590820931;return _this1919;}return _createClass(IfcOffsetCurve);}(IfcCurve);IFC4X32.IfcOffsetCurve=IfcOffsetCurve;var IfcOffsetCurve2D=/*#__PURE__*/function(_IfcOffsetCurve){_inherits(IfcOffsetCurve2D,_IfcOffsetCurve);var _super1923=_createSuper(IfcOffsetCurve2D);function IfcOffsetCurve2D(expressID,BasisCurve,Distance,SelfIntersect){var _this1920;_classCallCheck(this,IfcOffsetCurve2D);_this1920=_super1923.call(this,expressID,BasisCurve);_this1920.BasisCurve=BasisCurve;_this1920.Distance=Distance;_this1920.SelfIntersect=SelfIntersect;_this1920.type=3388369263;return _this1920;}return _createClass(IfcOffsetCurve2D);}(IfcOffsetCurve);IFC4X32.IfcOffsetCurve2D=IfcOffsetCurve2D;var IfcOffsetCurve3D=/*#__PURE__*/function(_IfcOffsetCurve2){_inherits(IfcOffsetCurve3D,_IfcOffsetCurve2);var _super1924=_createSuper(IfcOffsetCurve3D);function IfcOffsetCurve3D(expressID,BasisCurve,Distance,SelfIntersect,RefDirection){var _this1921;_classCallCheck(this,IfcOffsetCurve3D);_this1921=_super1924.call(this,expressID,BasisCurve);_this1921.BasisCurve=BasisCurve;_this1921.Distance=Distance;_this1921.SelfIntersect=SelfIntersect;_this1921.RefDirection=RefDirection;_this1921.type=3505215534;return _this1921;}return _createClass(IfcOffsetCurve3D);}(IfcOffsetCurve);IFC4X32.IfcOffsetCurve3D=IfcOffsetCurve3D;var IfcOffsetCurveByDistances=/*#__PURE__*/function(_IfcOffsetCurve3){_inherits(IfcOffsetCurveByDistances,_IfcOffsetCurve3);var _super1925=_createSuper(IfcOffsetCurveByDistances);function IfcOffsetCurveByDistances(expressID,BasisCurve,OffsetValues,Tag){var _this1922;_classCallCheck(this,IfcOffsetCurveByDistances);_this1922=_super1925.call(this,expressID,BasisCurve);_this1922.BasisCurve=BasisCurve;_this1922.OffsetValues=OffsetValues;_this1922.Tag=Tag;_this1922.type=2485787929;return _this1922;}return _createClass(IfcOffsetCurveByDistances);}(IfcOffsetCurve);IFC4X32.IfcOffsetCurveByDistances=IfcOffsetCurveByDistances;var IfcPcurve=/*#__PURE__*/function(_IfcCurve15){_inherits(IfcPcurve,_IfcCurve15);var _super1926=_createSuper(IfcPcurve);function IfcPcurve(expressID,BasisSurface,ReferenceCurve){var _this1923;_classCallCheck(this,IfcPcurve);_this1923=_super1926.call(this,expressID);_this1923.BasisSurface=BasisSurface;_this1923.ReferenceCurve=ReferenceCurve;_this1923.type=1682466193;return _this1923;}return _createClass(IfcPcurve);}(IfcCurve);IFC4X32.IfcPcurve=IfcPcurve;var IfcPlanarBox=/*#__PURE__*/function(_IfcPlanarExtent3){_inherits(IfcPlanarBox,_IfcPlanarExtent3);var _super1927=_createSuper(IfcPlanarBox);function IfcPlanarBox(expressID,SizeInX,SizeInY,Placement){var _this1924;_classCallCheck(this,IfcPlanarBox);_this1924=_super1927.call(this,expressID,SizeInX,SizeInY);_this1924.SizeInX=SizeInX;_this1924.SizeInY=SizeInY;_this1924.Placement=Placement;_this1924.type=603570806;return _this1924;}return _createClass(IfcPlanarBox);}(IfcPlanarExtent);IFC4X32.IfcPlanarBox=IfcPlanarBox;var IfcPlane=/*#__PURE__*/function(_IfcElementarySurface6){_inherits(IfcPlane,_IfcElementarySurface6);var _super1928=_createSuper(IfcPlane);function IfcPlane(expressID,Position){var _this1925;_classCallCheck(this,IfcPlane);_this1925=_super1928.call(this,expressID,Position);_this1925.Position=Position;_this1925.type=220341763;return _this1925;}return _createClass(IfcPlane);}(IfcElementarySurface);IFC4X32.IfcPlane=IfcPlane;var IfcPolynomialCurve=/*#__PURE__*/function(_IfcCurve16){_inherits(IfcPolynomialCurve,_IfcCurve16);var _super1929=_createSuper(IfcPolynomialCurve);function IfcPolynomialCurve(expressID,Position,CoefficientsX,CoefficientsY,CoefficientsZ){var _this1926;_classCallCheck(this,IfcPolynomialCurve);_this1926=_super1929.call(this,expressID);_this1926.Position=Position;_this1926.CoefficientsX=CoefficientsX;_this1926.CoefficientsY=CoefficientsY;_this1926.CoefficientsZ=CoefficientsZ;_this1926.type=3381221214;return _this1926;}return _createClass(IfcPolynomialCurve);}(IfcCurve);IFC4X32.IfcPolynomialCurve=IfcPolynomialCurve;var IfcPreDefinedColour=/*#__PURE__*/function(_IfcPreDefinedItem9){_inherits(IfcPreDefinedColour,_IfcPreDefinedItem9);var _super1930=_createSuper(IfcPreDefinedColour);function IfcPreDefinedColour(expressID,Name){var _this1927;_classCallCheck(this,IfcPreDefinedColour);_this1927=_super1930.call(this,expressID,Name);_this1927.Name=Name;_this1927.type=759155922;return _this1927;}return _createClass(IfcPreDefinedColour);}(IfcPreDefinedItem);IFC4X32.IfcPreDefinedColour=IfcPreDefinedColour;var IfcPreDefinedCurveFont=/*#__PURE__*/function(_IfcPreDefinedItem10){_inherits(IfcPreDefinedCurveFont,_IfcPreDefinedItem10);var _super1931=_createSuper(IfcPreDefinedCurveFont);function IfcPreDefinedCurveFont(expressID,Name){var _this1928;_classCallCheck(this,IfcPreDefinedCurveFont);_this1928=_super1931.call(this,expressID,Name);_this1928.Name=Name;_this1928.type=2559016684;return _this1928;}return _createClass(IfcPreDefinedCurveFont);}(IfcPreDefinedItem);IFC4X32.IfcPreDefinedCurveFont=IfcPreDefinedCurveFont;var IfcPreDefinedPropertySet=/*#__PURE__*/function(_IfcPropertySetDefini19){_inherits(IfcPreDefinedPropertySet,_IfcPropertySetDefini19);var _super1932=_createSuper(IfcPreDefinedPropertySet);function IfcPreDefinedPropertySet(expressID,GlobalId,OwnerHistory,Name,Description){var _this1929;_classCallCheck(this,IfcPreDefinedPropertySet);_this1929=_super1932.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1929.GlobalId=GlobalId;_this1929.OwnerHistory=OwnerHistory;_this1929.Name=Name;_this1929.Description=Description;_this1929.type=3967405729;return _this1929;}return _createClass(IfcPreDefinedPropertySet);}(IfcPropertySetDefinition);IFC4X32.IfcPreDefinedPropertySet=IfcPreDefinedPropertySet;var IfcProcedureType=/*#__PURE__*/function(_IfcTypeProcess5){_inherits(IfcProcedureType,_IfcTypeProcess5);var _super1933=_createSuper(IfcProcedureType);function IfcProcedureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType,PredefinedType){var _this1930;_classCallCheck(this,IfcProcedureType);_this1930=_super1933.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType);_this1930.GlobalId=GlobalId;_this1930.OwnerHistory=OwnerHistory;_this1930.Name=Name;_this1930.Description=Description;_this1930.ApplicableOccurrence=ApplicableOccurrence;_this1930.HasPropertySets=HasPropertySets;_this1930.Identification=Identification;_this1930.LongDescription=LongDescription;_this1930.ProcessType=ProcessType;_this1930.PredefinedType=PredefinedType;_this1930.type=569719735;return _this1930;}return _createClass(IfcProcedureType);}(IfcTypeProcess);IFC4X32.IfcProcedureType=IfcProcedureType;var IfcProcess=/*#__PURE__*/function(_IfcObject14){_inherits(IfcProcess,_IfcObject14);var _super1934=_createSuper(IfcProcess);function IfcProcess(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription){var _this1931;_classCallCheck(this,IfcProcess);_this1931=_super1934.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1931.GlobalId=GlobalId;_this1931.OwnerHistory=OwnerHistory;_this1931.Name=Name;_this1931.Description=Description;_this1931.ObjectType=ObjectType;_this1931.Identification=Identification;_this1931.LongDescription=LongDescription;_this1931.type=2945172077;return _this1931;}return _createClass(IfcProcess);}(IfcObject);IFC4X32.IfcProcess=IfcProcess;var IfcProduct=/*#__PURE__*/function(_IfcObject15){_inherits(IfcProduct,_IfcObject15);var _super1935=_createSuper(IfcProduct);function IfcProduct(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this1932;_classCallCheck(this,IfcProduct);_this1932=_super1935.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1932.GlobalId=GlobalId;_this1932.OwnerHistory=OwnerHistory;_this1932.Name=Name;_this1932.Description=Description;_this1932.ObjectType=ObjectType;_this1932.ObjectPlacement=ObjectPlacement;_this1932.Representation=Representation;_this1932.type=4208778838;return _this1932;}return _createClass(IfcProduct);}(IfcObject);IFC4X32.IfcProduct=IfcProduct;var IfcProject=/*#__PURE__*/function(_IfcContext3){_inherits(IfcProject,_IfcContext3);var _super1936=_createSuper(IfcProject);function IfcProject(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext){var _this1933;_classCallCheck(this,IfcProject);_this1933=_super1936.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext);_this1933.GlobalId=GlobalId;_this1933.OwnerHistory=OwnerHistory;_this1933.Name=Name;_this1933.Description=Description;_this1933.ObjectType=ObjectType;_this1933.LongName=LongName;_this1933.Phase=Phase;_this1933.RepresentationContexts=RepresentationContexts;_this1933.UnitsInContext=UnitsInContext;_this1933.type=103090709;return _this1933;}return _createClass(IfcProject);}(IfcContext);IFC4X32.IfcProject=IfcProject;var IfcProjectLibrary=/*#__PURE__*/function(_IfcContext4){_inherits(IfcProjectLibrary,_IfcContext4);var _super1937=_createSuper(IfcProjectLibrary);function IfcProjectLibrary(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext){var _this1934;_classCallCheck(this,IfcProjectLibrary);_this1934=_super1937.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,Phase,RepresentationContexts,UnitsInContext);_this1934.GlobalId=GlobalId;_this1934.OwnerHistory=OwnerHistory;_this1934.Name=Name;_this1934.Description=Description;_this1934.ObjectType=ObjectType;_this1934.LongName=LongName;_this1934.Phase=Phase;_this1934.RepresentationContexts=RepresentationContexts;_this1934.UnitsInContext=UnitsInContext;_this1934.type=653396225;return _this1934;}return _createClass(IfcProjectLibrary);}(IfcContext);IFC4X32.IfcProjectLibrary=IfcProjectLibrary;var IfcPropertyBoundedValue=/*#__PURE__*/function(_IfcSimpleProperty13){_inherits(IfcPropertyBoundedValue,_IfcSimpleProperty13);var _super1938=_createSuper(IfcPropertyBoundedValue);function IfcPropertyBoundedValue(expressID,Name,Specification,UpperBoundValue,LowerBoundValue,Unit,SetPointValue){var _this1935;_classCallCheck(this,IfcPropertyBoundedValue);_this1935=_super1938.call(this,expressID,Name,Specification);_this1935.Name=Name;_this1935.Specification=Specification;_this1935.UpperBoundValue=UpperBoundValue;_this1935.LowerBoundValue=LowerBoundValue;_this1935.Unit=Unit;_this1935.SetPointValue=SetPointValue;_this1935.type=871118103;return _this1935;}return _createClass(IfcPropertyBoundedValue);}(IfcSimpleProperty);IFC4X32.IfcPropertyBoundedValue=IfcPropertyBoundedValue;var IfcPropertyEnumeratedValue=/*#__PURE__*/function(_IfcSimpleProperty14){_inherits(IfcPropertyEnumeratedValue,_IfcSimpleProperty14);var _super1939=_createSuper(IfcPropertyEnumeratedValue);function IfcPropertyEnumeratedValue(expressID,Name,Specification,EnumerationValues,EnumerationReference){var _this1936;_classCallCheck(this,IfcPropertyEnumeratedValue);_this1936=_super1939.call(this,expressID,Name,Specification);_this1936.Name=Name;_this1936.Specification=Specification;_this1936.EnumerationValues=EnumerationValues;_this1936.EnumerationReference=EnumerationReference;_this1936.type=4166981789;return _this1936;}return _createClass(IfcPropertyEnumeratedValue);}(IfcSimpleProperty);IFC4X32.IfcPropertyEnumeratedValue=IfcPropertyEnumeratedValue;var IfcPropertyListValue=/*#__PURE__*/function(_IfcSimpleProperty15){_inherits(IfcPropertyListValue,_IfcSimpleProperty15);var _super1940=_createSuper(IfcPropertyListValue);function IfcPropertyListValue(expressID,Name,Specification,ListValues,Unit){var _this1937;_classCallCheck(this,IfcPropertyListValue);_this1937=_super1940.call(this,expressID,Name,Specification);_this1937.Name=Name;_this1937.Specification=Specification;_this1937.ListValues=ListValues;_this1937.Unit=Unit;_this1937.type=2752243245;return _this1937;}return _createClass(IfcPropertyListValue);}(IfcSimpleProperty);IFC4X32.IfcPropertyListValue=IfcPropertyListValue;var IfcPropertyReferenceValue=/*#__PURE__*/function(_IfcSimpleProperty16){_inherits(IfcPropertyReferenceValue,_IfcSimpleProperty16);var _super1941=_createSuper(IfcPropertyReferenceValue);function IfcPropertyReferenceValue(expressID,Name,Specification,UsageName,PropertyReference){var _this1938;_classCallCheck(this,IfcPropertyReferenceValue);_this1938=_super1941.call(this,expressID,Name,Specification);_this1938.Name=Name;_this1938.Specification=Specification;_this1938.UsageName=UsageName;_this1938.PropertyReference=PropertyReference;_this1938.type=941946838;return _this1938;}return _createClass(IfcPropertyReferenceValue);}(IfcSimpleProperty);IFC4X32.IfcPropertyReferenceValue=IfcPropertyReferenceValue;var IfcPropertySet=/*#__PURE__*/function(_IfcPropertySetDefini20){_inherits(IfcPropertySet,_IfcPropertySetDefini20);var _super1942=_createSuper(IfcPropertySet);function IfcPropertySet(expressID,GlobalId,OwnerHistory,Name,Description,HasProperties){var _this1939;_classCallCheck(this,IfcPropertySet);_this1939=_super1942.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1939.GlobalId=GlobalId;_this1939.OwnerHistory=OwnerHistory;_this1939.Name=Name;_this1939.Description=Description;_this1939.HasProperties=HasProperties;_this1939.type=1451395588;return _this1939;}return _createClass(IfcPropertySet);}(IfcPropertySetDefinition);IFC4X32.IfcPropertySet=IfcPropertySet;var IfcPropertySetTemplate=/*#__PURE__*/function(_IfcPropertyTemplateD3){_inherits(IfcPropertySetTemplate,_IfcPropertyTemplateD3);var _super1943=_createSuper(IfcPropertySetTemplate);function IfcPropertySetTemplate(expressID,GlobalId,OwnerHistory,Name,Description,TemplateType,ApplicableEntity,HasPropertyTemplates){var _this1940;_classCallCheck(this,IfcPropertySetTemplate);_this1940=_super1943.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1940.GlobalId=GlobalId;_this1940.OwnerHistory=OwnerHistory;_this1940.Name=Name;_this1940.Description=Description;_this1940.TemplateType=TemplateType;_this1940.ApplicableEntity=ApplicableEntity;_this1940.HasPropertyTemplates=HasPropertyTemplates;_this1940.type=492091185;return _this1940;}return _createClass(IfcPropertySetTemplate);}(IfcPropertyTemplateDefinition);IFC4X32.IfcPropertySetTemplate=IfcPropertySetTemplate;var IfcPropertySingleValue=/*#__PURE__*/function(_IfcSimpleProperty17){_inherits(IfcPropertySingleValue,_IfcSimpleProperty17);var _super1944=_createSuper(IfcPropertySingleValue);function IfcPropertySingleValue(expressID,Name,Specification,NominalValue,Unit){var _this1941;_classCallCheck(this,IfcPropertySingleValue);_this1941=_super1944.call(this,expressID,Name,Specification);_this1941.Name=Name;_this1941.Specification=Specification;_this1941.NominalValue=NominalValue;_this1941.Unit=Unit;_this1941.type=3650150729;return _this1941;}return _createClass(IfcPropertySingleValue);}(IfcSimpleProperty);IFC4X32.IfcPropertySingleValue=IfcPropertySingleValue;var IfcPropertyTableValue=/*#__PURE__*/function(_IfcSimpleProperty18){_inherits(IfcPropertyTableValue,_IfcSimpleProperty18);var _super1945=_createSuper(IfcPropertyTableValue);function IfcPropertyTableValue(expressID,Name,Specification,DefiningValues,DefinedValues,Expression,DefiningUnit,DefinedUnit,CurveInterpolation){var _this1942;_classCallCheck(this,IfcPropertyTableValue);_this1942=_super1945.call(this,expressID,Name,Specification);_this1942.Name=Name;_this1942.Specification=Specification;_this1942.DefiningValues=DefiningValues;_this1942.DefinedValues=DefinedValues;_this1942.Expression=Expression;_this1942.DefiningUnit=DefiningUnit;_this1942.DefinedUnit=DefinedUnit;_this1942.CurveInterpolation=CurveInterpolation;_this1942.type=110355661;return _this1942;}return _createClass(IfcPropertyTableValue);}(IfcSimpleProperty);IFC4X32.IfcPropertyTableValue=IfcPropertyTableValue;var IfcPropertyTemplate=/*#__PURE__*/function(_IfcPropertyTemplateD4){_inherits(IfcPropertyTemplate,_IfcPropertyTemplateD4);var _super1946=_createSuper(IfcPropertyTemplate);function IfcPropertyTemplate(expressID,GlobalId,OwnerHistory,Name,Description){var _this1943;_classCallCheck(this,IfcPropertyTemplate);_this1943=_super1946.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1943.GlobalId=GlobalId;_this1943.OwnerHistory=OwnerHistory;_this1943.Name=Name;_this1943.Description=Description;_this1943.type=3521284610;return _this1943;}return _createClass(IfcPropertyTemplate);}(IfcPropertyTemplateDefinition);IFC4X32.IfcPropertyTemplate=IfcPropertyTemplate;var IfcRectangleHollowProfileDef=/*#__PURE__*/function(_IfcRectangleProfileD6){_inherits(IfcRectangleHollowProfileDef,_IfcRectangleProfileD6);var _super1947=_createSuper(IfcRectangleHollowProfileDef);function IfcRectangleHollowProfileDef(expressID,ProfileType,ProfileName,Position,XDim,YDim,WallThickness,InnerFilletRadius,OuterFilletRadius){var _this1944;_classCallCheck(this,IfcRectangleHollowProfileDef);_this1944=_super1947.call(this,expressID,ProfileType,ProfileName,Position,XDim,YDim);_this1944.ProfileType=ProfileType;_this1944.ProfileName=ProfileName;_this1944.Position=Position;_this1944.XDim=XDim;_this1944.YDim=YDim;_this1944.WallThickness=WallThickness;_this1944.InnerFilletRadius=InnerFilletRadius;_this1944.OuterFilletRadius=OuterFilletRadius;_this1944.type=2770003689;return _this1944;}return _createClass(IfcRectangleHollowProfileDef);}(IfcRectangleProfileDef);IFC4X32.IfcRectangleHollowProfileDef=IfcRectangleHollowProfileDef;var IfcRectangularPyramid=/*#__PURE__*/function(_IfcCsgPrimitive3D11){_inherits(IfcRectangularPyramid,_IfcCsgPrimitive3D11);var _super1948=_createSuper(IfcRectangularPyramid);function IfcRectangularPyramid(expressID,Position,XLength,YLength,Height){var _this1945;_classCallCheck(this,IfcRectangularPyramid);_this1945=_super1948.call(this,expressID,Position);_this1945.Position=Position;_this1945.XLength=XLength;_this1945.YLength=YLength;_this1945.Height=Height;_this1945.type=2798486643;return _this1945;}return _createClass(IfcRectangularPyramid);}(IfcCsgPrimitive3D);IFC4X32.IfcRectangularPyramid=IfcRectangularPyramid;var IfcRectangularTrimmedSurface=/*#__PURE__*/function(_IfcBoundedSurface9){_inherits(IfcRectangularTrimmedSurface,_IfcBoundedSurface9);var _super1949=_createSuper(IfcRectangularTrimmedSurface);function IfcRectangularTrimmedSurface(expressID,BasisSurface,U1,V1,U2,V2,Usense,Vsense){var _this1946;_classCallCheck(this,IfcRectangularTrimmedSurface);_this1946=_super1949.call(this,expressID);_this1946.BasisSurface=BasisSurface;_this1946.U1=U1;_this1946.V1=V1;_this1946.U2=U2;_this1946.V2=V2;_this1946.Usense=Usense;_this1946.Vsense=Vsense;_this1946.type=3454111270;return _this1946;}return _createClass(IfcRectangularTrimmedSurface);}(IfcBoundedSurface);IFC4X32.IfcRectangularTrimmedSurface=IfcRectangularTrimmedSurface;var IfcReinforcementDefinitionProperties=/*#__PURE__*/function(_IfcPreDefinedPropert13){_inherits(IfcReinforcementDefinitionProperties,_IfcPreDefinedPropert13);var _super1950=_createSuper(IfcReinforcementDefinitionProperties);function IfcReinforcementDefinitionProperties(expressID,GlobalId,OwnerHistory,Name,Description,DefinitionType,ReinforcementSectionDefinitions){var _this1947;_classCallCheck(this,IfcReinforcementDefinitionProperties);_this1947=_super1950.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1947.GlobalId=GlobalId;_this1947.OwnerHistory=OwnerHistory;_this1947.Name=Name;_this1947.Description=Description;_this1947.DefinitionType=DefinitionType;_this1947.ReinforcementSectionDefinitions=ReinforcementSectionDefinitions;_this1947.type=3765753017;return _this1947;}return _createClass(IfcReinforcementDefinitionProperties);}(IfcPreDefinedPropertySet);IFC4X32.IfcReinforcementDefinitionProperties=IfcReinforcementDefinitionProperties;var IfcRelAssigns=/*#__PURE__*/function(_IfcRelationship12){_inherits(IfcRelAssigns,_IfcRelationship12);var _super1951=_createSuper(IfcRelAssigns);function IfcRelAssigns(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType){var _this1948;_classCallCheck(this,IfcRelAssigns);_this1948=_super1951.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1948.GlobalId=GlobalId;_this1948.OwnerHistory=OwnerHistory;_this1948.Name=Name;_this1948.Description=Description;_this1948.RelatedObjects=RelatedObjects;_this1948.RelatedObjectsType=RelatedObjectsType;_this1948.type=3939117080;return _this1948;}return _createClass(IfcRelAssigns);}(IfcRelationship);IFC4X32.IfcRelAssigns=IfcRelAssigns;var IfcRelAssignsToActor=/*#__PURE__*/function(_IfcRelAssigns13){_inherits(IfcRelAssignsToActor,_IfcRelAssigns13);var _super1952=_createSuper(IfcRelAssignsToActor);function IfcRelAssignsToActor(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingActor,ActingRole){var _this1949;_classCallCheck(this,IfcRelAssignsToActor);_this1949=_super1952.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1949.GlobalId=GlobalId;_this1949.OwnerHistory=OwnerHistory;_this1949.Name=Name;_this1949.Description=Description;_this1949.RelatedObjects=RelatedObjects;_this1949.RelatedObjectsType=RelatedObjectsType;_this1949.RelatingActor=RelatingActor;_this1949.ActingRole=ActingRole;_this1949.type=1683148259;return _this1949;}return _createClass(IfcRelAssignsToActor);}(IfcRelAssigns);IFC4X32.IfcRelAssignsToActor=IfcRelAssignsToActor;var IfcRelAssignsToControl=/*#__PURE__*/function(_IfcRelAssigns14){_inherits(IfcRelAssignsToControl,_IfcRelAssigns14);var _super1953=_createSuper(IfcRelAssignsToControl);function IfcRelAssignsToControl(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingControl){var _this1950;_classCallCheck(this,IfcRelAssignsToControl);_this1950=_super1953.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1950.GlobalId=GlobalId;_this1950.OwnerHistory=OwnerHistory;_this1950.Name=Name;_this1950.Description=Description;_this1950.RelatedObjects=RelatedObjects;_this1950.RelatedObjectsType=RelatedObjectsType;_this1950.RelatingControl=RelatingControl;_this1950.type=2495723537;return _this1950;}return _createClass(IfcRelAssignsToControl);}(IfcRelAssigns);IFC4X32.IfcRelAssignsToControl=IfcRelAssignsToControl;var IfcRelAssignsToGroup=/*#__PURE__*/function(_IfcRelAssigns15){_inherits(IfcRelAssignsToGroup,_IfcRelAssigns15);var _super1954=_createSuper(IfcRelAssignsToGroup);function IfcRelAssignsToGroup(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingGroup){var _this1951;_classCallCheck(this,IfcRelAssignsToGroup);_this1951=_super1954.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1951.GlobalId=GlobalId;_this1951.OwnerHistory=OwnerHistory;_this1951.Name=Name;_this1951.Description=Description;_this1951.RelatedObjects=RelatedObjects;_this1951.RelatedObjectsType=RelatedObjectsType;_this1951.RelatingGroup=RelatingGroup;_this1951.type=1307041759;return _this1951;}return _createClass(IfcRelAssignsToGroup);}(IfcRelAssigns);IFC4X32.IfcRelAssignsToGroup=IfcRelAssignsToGroup;var IfcRelAssignsToGroupByFactor=/*#__PURE__*/function(_IfcRelAssignsToGroup2){_inherits(IfcRelAssignsToGroupByFactor,_IfcRelAssignsToGroup2);var _super1955=_createSuper(IfcRelAssignsToGroupByFactor);function IfcRelAssignsToGroupByFactor(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingGroup,Factor){var _this1952;_classCallCheck(this,IfcRelAssignsToGroupByFactor);_this1952=_super1955.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingGroup);_this1952.GlobalId=GlobalId;_this1952.OwnerHistory=OwnerHistory;_this1952.Name=Name;_this1952.Description=Description;_this1952.RelatedObjects=RelatedObjects;_this1952.RelatedObjectsType=RelatedObjectsType;_this1952.RelatingGroup=RelatingGroup;_this1952.Factor=Factor;_this1952.type=1027710054;return _this1952;}return _createClass(IfcRelAssignsToGroupByFactor);}(IfcRelAssignsToGroup);IFC4X32.IfcRelAssignsToGroupByFactor=IfcRelAssignsToGroupByFactor;var IfcRelAssignsToProcess=/*#__PURE__*/function(_IfcRelAssigns16){_inherits(IfcRelAssignsToProcess,_IfcRelAssigns16);var _super1956=_createSuper(IfcRelAssignsToProcess);function IfcRelAssignsToProcess(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingProcess,QuantityInProcess){var _this1953;_classCallCheck(this,IfcRelAssignsToProcess);_this1953=_super1956.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1953.GlobalId=GlobalId;_this1953.OwnerHistory=OwnerHistory;_this1953.Name=Name;_this1953.Description=Description;_this1953.RelatedObjects=RelatedObjects;_this1953.RelatedObjectsType=RelatedObjectsType;_this1953.RelatingProcess=RelatingProcess;_this1953.QuantityInProcess=QuantityInProcess;_this1953.type=4278684876;return _this1953;}return _createClass(IfcRelAssignsToProcess);}(IfcRelAssigns);IFC4X32.IfcRelAssignsToProcess=IfcRelAssignsToProcess;var IfcRelAssignsToProduct=/*#__PURE__*/function(_IfcRelAssigns17){_inherits(IfcRelAssignsToProduct,_IfcRelAssigns17);var _super1957=_createSuper(IfcRelAssignsToProduct);function IfcRelAssignsToProduct(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingProduct){var _this1954;_classCallCheck(this,IfcRelAssignsToProduct);_this1954=_super1957.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1954.GlobalId=GlobalId;_this1954.OwnerHistory=OwnerHistory;_this1954.Name=Name;_this1954.Description=Description;_this1954.RelatedObjects=RelatedObjects;_this1954.RelatedObjectsType=RelatedObjectsType;_this1954.RelatingProduct=RelatingProduct;_this1954.type=2857406711;return _this1954;}return _createClass(IfcRelAssignsToProduct);}(IfcRelAssigns);IFC4X32.IfcRelAssignsToProduct=IfcRelAssignsToProduct;var IfcRelAssignsToResource=/*#__PURE__*/function(_IfcRelAssigns18){_inherits(IfcRelAssignsToResource,_IfcRelAssigns18);var _super1958=_createSuper(IfcRelAssignsToResource);function IfcRelAssignsToResource(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType,RelatingResource){var _this1955;_classCallCheck(this,IfcRelAssignsToResource);_this1955=_super1958.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatedObjectsType);_this1955.GlobalId=GlobalId;_this1955.OwnerHistory=OwnerHistory;_this1955.Name=Name;_this1955.Description=Description;_this1955.RelatedObjects=RelatedObjects;_this1955.RelatedObjectsType=RelatedObjectsType;_this1955.RelatingResource=RelatingResource;_this1955.type=205026976;return _this1955;}return _createClass(IfcRelAssignsToResource);}(IfcRelAssigns);IFC4X32.IfcRelAssignsToResource=IfcRelAssignsToResource;var IfcRelAssociates=/*#__PURE__*/function(_IfcRelationship13){_inherits(IfcRelAssociates,_IfcRelationship13);var _super1959=_createSuper(IfcRelAssociates);function IfcRelAssociates(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects){var _this1956;_classCallCheck(this,IfcRelAssociates);_this1956=_super1959.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1956.GlobalId=GlobalId;_this1956.OwnerHistory=OwnerHistory;_this1956.Name=Name;_this1956.Description=Description;_this1956.RelatedObjects=RelatedObjects;_this1956.type=1865459582;return _this1956;}return _createClass(IfcRelAssociates);}(IfcRelationship);IFC4X32.IfcRelAssociates=IfcRelAssociates;var IfcRelAssociatesApproval=/*#__PURE__*/function(_IfcRelAssociates15){_inherits(IfcRelAssociatesApproval,_IfcRelAssociates15);var _super1960=_createSuper(IfcRelAssociatesApproval);function IfcRelAssociatesApproval(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingApproval){var _this1957;_classCallCheck(this,IfcRelAssociatesApproval);_this1957=_super1960.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1957.GlobalId=GlobalId;_this1957.OwnerHistory=OwnerHistory;_this1957.Name=Name;_this1957.Description=Description;_this1957.RelatedObjects=RelatedObjects;_this1957.RelatingApproval=RelatingApproval;_this1957.type=4095574036;return _this1957;}return _createClass(IfcRelAssociatesApproval);}(IfcRelAssociates);IFC4X32.IfcRelAssociatesApproval=IfcRelAssociatesApproval;var IfcRelAssociatesClassification=/*#__PURE__*/function(_IfcRelAssociates16){_inherits(IfcRelAssociatesClassification,_IfcRelAssociates16);var _super1961=_createSuper(IfcRelAssociatesClassification);function IfcRelAssociatesClassification(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingClassification){var _this1958;_classCallCheck(this,IfcRelAssociatesClassification);_this1958=_super1961.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1958.GlobalId=GlobalId;_this1958.OwnerHistory=OwnerHistory;_this1958.Name=Name;_this1958.Description=Description;_this1958.RelatedObjects=RelatedObjects;_this1958.RelatingClassification=RelatingClassification;_this1958.type=919958153;return _this1958;}return _createClass(IfcRelAssociatesClassification);}(IfcRelAssociates);IFC4X32.IfcRelAssociatesClassification=IfcRelAssociatesClassification;var IfcRelAssociatesConstraint=/*#__PURE__*/function(_IfcRelAssociates17){_inherits(IfcRelAssociatesConstraint,_IfcRelAssociates17);var _super1962=_createSuper(IfcRelAssociatesConstraint);function IfcRelAssociatesConstraint(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,Intent,RelatingConstraint){var _this1959;_classCallCheck(this,IfcRelAssociatesConstraint);_this1959=_super1962.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1959.GlobalId=GlobalId;_this1959.OwnerHistory=OwnerHistory;_this1959.Name=Name;_this1959.Description=Description;_this1959.RelatedObjects=RelatedObjects;_this1959.Intent=Intent;_this1959.RelatingConstraint=RelatingConstraint;_this1959.type=2728634034;return _this1959;}return _createClass(IfcRelAssociatesConstraint);}(IfcRelAssociates);IFC4X32.IfcRelAssociatesConstraint=IfcRelAssociatesConstraint;var IfcRelAssociatesDocument=/*#__PURE__*/function(_IfcRelAssociates18){_inherits(IfcRelAssociatesDocument,_IfcRelAssociates18);var _super1963=_createSuper(IfcRelAssociatesDocument);function IfcRelAssociatesDocument(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingDocument){var _this1960;_classCallCheck(this,IfcRelAssociatesDocument);_this1960=_super1963.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1960.GlobalId=GlobalId;_this1960.OwnerHistory=OwnerHistory;_this1960.Name=Name;_this1960.Description=Description;_this1960.RelatedObjects=RelatedObjects;_this1960.RelatingDocument=RelatingDocument;_this1960.type=982818633;return _this1960;}return _createClass(IfcRelAssociatesDocument);}(IfcRelAssociates);IFC4X32.IfcRelAssociatesDocument=IfcRelAssociatesDocument;var IfcRelAssociatesLibrary=/*#__PURE__*/function(_IfcRelAssociates19){_inherits(IfcRelAssociatesLibrary,_IfcRelAssociates19);var _super1964=_createSuper(IfcRelAssociatesLibrary);function IfcRelAssociatesLibrary(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingLibrary){var _this1961;_classCallCheck(this,IfcRelAssociatesLibrary);_this1961=_super1964.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1961.GlobalId=GlobalId;_this1961.OwnerHistory=OwnerHistory;_this1961.Name=Name;_this1961.Description=Description;_this1961.RelatedObjects=RelatedObjects;_this1961.RelatingLibrary=RelatingLibrary;_this1961.type=3840914261;return _this1961;}return _createClass(IfcRelAssociatesLibrary);}(IfcRelAssociates);IFC4X32.IfcRelAssociatesLibrary=IfcRelAssociatesLibrary;var IfcRelAssociatesMaterial=/*#__PURE__*/function(_IfcRelAssociates20){_inherits(IfcRelAssociatesMaterial,_IfcRelAssociates20);var _super1965=_createSuper(IfcRelAssociatesMaterial);function IfcRelAssociatesMaterial(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingMaterial){var _this1962;_classCallCheck(this,IfcRelAssociatesMaterial);_this1962=_super1965.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1962.GlobalId=GlobalId;_this1962.OwnerHistory=OwnerHistory;_this1962.Name=Name;_this1962.Description=Description;_this1962.RelatedObjects=RelatedObjects;_this1962.RelatingMaterial=RelatingMaterial;_this1962.type=2655215786;return _this1962;}return _createClass(IfcRelAssociatesMaterial);}(IfcRelAssociates);IFC4X32.IfcRelAssociatesMaterial=IfcRelAssociatesMaterial;var IfcRelAssociatesProfileDef=/*#__PURE__*/function(_IfcRelAssociates21){_inherits(IfcRelAssociatesProfileDef,_IfcRelAssociates21);var _super1966=_createSuper(IfcRelAssociatesProfileDef);function IfcRelAssociatesProfileDef(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingProfileDef){var _this1963;_classCallCheck(this,IfcRelAssociatesProfileDef);_this1963=_super1966.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects);_this1963.GlobalId=GlobalId;_this1963.OwnerHistory=OwnerHistory;_this1963.Name=Name;_this1963.Description=Description;_this1963.RelatedObjects=RelatedObjects;_this1963.RelatingProfileDef=RelatingProfileDef;_this1963.type=1033248425;return _this1963;}return _createClass(IfcRelAssociatesProfileDef);}(IfcRelAssociates);IFC4X32.IfcRelAssociatesProfileDef=IfcRelAssociatesProfileDef;var IfcRelConnects=/*#__PURE__*/function(_IfcRelationship14){_inherits(IfcRelConnects,_IfcRelationship14);var _super1967=_createSuper(IfcRelConnects);function IfcRelConnects(expressID,GlobalId,OwnerHistory,Name,Description){var _this1964;_classCallCheck(this,IfcRelConnects);_this1964=_super1967.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1964.GlobalId=GlobalId;_this1964.OwnerHistory=OwnerHistory;_this1964.Name=Name;_this1964.Description=Description;_this1964.type=826625072;return _this1964;}return _createClass(IfcRelConnects);}(IfcRelationship);IFC4X32.IfcRelConnects=IfcRelConnects;var IfcRelConnectsElements=/*#__PURE__*/function(_IfcRelConnects34){_inherits(IfcRelConnectsElements,_IfcRelConnects34);var _super1968=_createSuper(IfcRelConnectsElements);function IfcRelConnectsElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement){var _this1965;_classCallCheck(this,IfcRelConnectsElements);_this1965=_super1968.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1965.GlobalId=GlobalId;_this1965.OwnerHistory=OwnerHistory;_this1965.Name=Name;_this1965.Description=Description;_this1965.ConnectionGeometry=ConnectionGeometry;_this1965.RelatingElement=RelatingElement;_this1965.RelatedElement=RelatedElement;_this1965.type=1204542856;return _this1965;}return _createClass(IfcRelConnectsElements);}(IfcRelConnects);IFC4X32.IfcRelConnectsElements=IfcRelConnectsElements;var IfcRelConnectsPathElements=/*#__PURE__*/function(_IfcRelConnectsElemen5){_inherits(IfcRelConnectsPathElements,_IfcRelConnectsElemen5);var _super1969=_createSuper(IfcRelConnectsPathElements);function IfcRelConnectsPathElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement,RelatingPriorities,RelatedPriorities,RelatedConnectionType,RelatingConnectionType){var _this1966;_classCallCheck(this,IfcRelConnectsPathElements);_this1966=_super1969.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement);_this1966.GlobalId=GlobalId;_this1966.OwnerHistory=OwnerHistory;_this1966.Name=Name;_this1966.Description=Description;_this1966.ConnectionGeometry=ConnectionGeometry;_this1966.RelatingElement=RelatingElement;_this1966.RelatedElement=RelatedElement;_this1966.RelatingPriorities=RelatingPriorities;_this1966.RelatedPriorities=RelatedPriorities;_this1966.RelatedConnectionType=RelatedConnectionType;_this1966.RelatingConnectionType=RelatingConnectionType;_this1966.type=3945020480;return _this1966;}return _createClass(IfcRelConnectsPathElements);}(IfcRelConnectsElements);IFC4X32.IfcRelConnectsPathElements=IfcRelConnectsPathElements;var IfcRelConnectsPortToElement=/*#__PURE__*/function(_IfcRelConnects35){_inherits(IfcRelConnectsPortToElement,_IfcRelConnects35);var _super1970=_createSuper(IfcRelConnectsPortToElement);function IfcRelConnectsPortToElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingPort,RelatedElement){var _this1967;_classCallCheck(this,IfcRelConnectsPortToElement);_this1967=_super1970.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1967.GlobalId=GlobalId;_this1967.OwnerHistory=OwnerHistory;_this1967.Name=Name;_this1967.Description=Description;_this1967.RelatingPort=RelatingPort;_this1967.RelatedElement=RelatedElement;_this1967.type=4201705270;return _this1967;}return _createClass(IfcRelConnectsPortToElement);}(IfcRelConnects);IFC4X32.IfcRelConnectsPortToElement=IfcRelConnectsPortToElement;var IfcRelConnectsPorts=/*#__PURE__*/function(_IfcRelConnects36){_inherits(IfcRelConnectsPorts,_IfcRelConnects36);var _super1971=_createSuper(IfcRelConnectsPorts);function IfcRelConnectsPorts(expressID,GlobalId,OwnerHistory,Name,Description,RelatingPort,RelatedPort,RealizingElement){var _this1968;_classCallCheck(this,IfcRelConnectsPorts);_this1968=_super1971.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1968.GlobalId=GlobalId;_this1968.OwnerHistory=OwnerHistory;_this1968.Name=Name;_this1968.Description=Description;_this1968.RelatingPort=RelatingPort;_this1968.RelatedPort=RelatedPort;_this1968.RealizingElement=RealizingElement;_this1968.type=3190031847;return _this1968;}return _createClass(IfcRelConnectsPorts);}(IfcRelConnects);IFC4X32.IfcRelConnectsPorts=IfcRelConnectsPorts;var IfcRelConnectsStructuralActivity=/*#__PURE__*/function(_IfcRelConnects37){_inherits(IfcRelConnectsStructuralActivity,_IfcRelConnects37);var _super1972=_createSuper(IfcRelConnectsStructuralActivity);function IfcRelConnectsStructuralActivity(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedStructuralActivity){var _this1969;_classCallCheck(this,IfcRelConnectsStructuralActivity);_this1969=_super1972.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1969.GlobalId=GlobalId;_this1969.OwnerHistory=OwnerHistory;_this1969.Name=Name;_this1969.Description=Description;_this1969.RelatingElement=RelatingElement;_this1969.RelatedStructuralActivity=RelatedStructuralActivity;_this1969.type=2127690289;return _this1969;}return _createClass(IfcRelConnectsStructuralActivity);}(IfcRelConnects);IFC4X32.IfcRelConnectsStructuralActivity=IfcRelConnectsStructuralActivity;var IfcRelConnectsStructuralMember=/*#__PURE__*/function(_IfcRelConnects38){_inherits(IfcRelConnectsStructuralMember,_IfcRelConnects38);var _super1973=_createSuper(IfcRelConnectsStructuralMember);function IfcRelConnectsStructuralMember(expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem){var _this1970;_classCallCheck(this,IfcRelConnectsStructuralMember);_this1970=_super1973.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1970.GlobalId=GlobalId;_this1970.OwnerHistory=OwnerHistory;_this1970.Name=Name;_this1970.Description=Description;_this1970.RelatingStructuralMember=RelatingStructuralMember;_this1970.RelatedStructuralConnection=RelatedStructuralConnection;_this1970.AppliedCondition=AppliedCondition;_this1970.AdditionalConditions=AdditionalConditions;_this1970.SupportedLength=SupportedLength;_this1970.ConditionCoordinateSystem=ConditionCoordinateSystem;_this1970.type=1638771189;return _this1970;}return _createClass(IfcRelConnectsStructuralMember);}(IfcRelConnects);IFC4X32.IfcRelConnectsStructuralMember=IfcRelConnectsStructuralMember;var IfcRelConnectsWithEccentricity=/*#__PURE__*/function(_IfcRelConnectsStruct3){_inherits(IfcRelConnectsWithEccentricity,_IfcRelConnectsStruct3);var _super1974=_createSuper(IfcRelConnectsWithEccentricity);function IfcRelConnectsWithEccentricity(expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem,ConnectionConstraint){var _this1971;_classCallCheck(this,IfcRelConnectsWithEccentricity);_this1971=_super1974.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingStructuralMember,RelatedStructuralConnection,AppliedCondition,AdditionalConditions,SupportedLength,ConditionCoordinateSystem);_this1971.GlobalId=GlobalId;_this1971.OwnerHistory=OwnerHistory;_this1971.Name=Name;_this1971.Description=Description;_this1971.RelatingStructuralMember=RelatingStructuralMember;_this1971.RelatedStructuralConnection=RelatedStructuralConnection;_this1971.AppliedCondition=AppliedCondition;_this1971.AdditionalConditions=AdditionalConditions;_this1971.SupportedLength=SupportedLength;_this1971.ConditionCoordinateSystem=ConditionCoordinateSystem;_this1971.ConnectionConstraint=ConnectionConstraint;_this1971.type=504942748;return _this1971;}return _createClass(IfcRelConnectsWithEccentricity);}(IfcRelConnectsStructuralMember);IFC4X32.IfcRelConnectsWithEccentricity=IfcRelConnectsWithEccentricity;var IfcRelConnectsWithRealizingElements=/*#__PURE__*/function(_IfcRelConnectsElemen6){_inherits(IfcRelConnectsWithRealizingElements,_IfcRelConnectsElemen6);var _super1975=_createSuper(IfcRelConnectsWithRealizingElements);function IfcRelConnectsWithRealizingElements(expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement,RealizingElements,ConnectionType){var _this1972;_classCallCheck(this,IfcRelConnectsWithRealizingElements);_this1972=_super1975.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ConnectionGeometry,RelatingElement,RelatedElement);_this1972.GlobalId=GlobalId;_this1972.OwnerHistory=OwnerHistory;_this1972.Name=Name;_this1972.Description=Description;_this1972.ConnectionGeometry=ConnectionGeometry;_this1972.RelatingElement=RelatingElement;_this1972.RelatedElement=RelatedElement;_this1972.RealizingElements=RealizingElements;_this1972.ConnectionType=ConnectionType;_this1972.type=3678494232;return _this1972;}return _createClass(IfcRelConnectsWithRealizingElements);}(IfcRelConnectsElements);IFC4X32.IfcRelConnectsWithRealizingElements=IfcRelConnectsWithRealizingElements;var IfcRelContainedInSpatialStructure=/*#__PURE__*/function(_IfcRelConnects39){_inherits(IfcRelContainedInSpatialStructure,_IfcRelConnects39);var _super1976=_createSuper(IfcRelContainedInSpatialStructure);function IfcRelContainedInSpatialStructure(expressID,GlobalId,OwnerHistory,Name,Description,RelatedElements,RelatingStructure){var _this1973;_classCallCheck(this,IfcRelContainedInSpatialStructure);_this1973=_super1976.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1973.GlobalId=GlobalId;_this1973.OwnerHistory=OwnerHistory;_this1973.Name=Name;_this1973.Description=Description;_this1973.RelatedElements=RelatedElements;_this1973.RelatingStructure=RelatingStructure;_this1973.type=3242617779;return _this1973;}return _createClass(IfcRelContainedInSpatialStructure);}(IfcRelConnects);IFC4X32.IfcRelContainedInSpatialStructure=IfcRelContainedInSpatialStructure;var IfcRelCoversBldgElements=/*#__PURE__*/function(_IfcRelConnects40){_inherits(IfcRelCoversBldgElements,_IfcRelConnects40);var _super1977=_createSuper(IfcRelCoversBldgElements);function IfcRelCoversBldgElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatingBuildingElement,RelatedCoverings){var _this1974;_classCallCheck(this,IfcRelCoversBldgElements);_this1974=_super1977.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1974.GlobalId=GlobalId;_this1974.OwnerHistory=OwnerHistory;_this1974.Name=Name;_this1974.Description=Description;_this1974.RelatingBuildingElement=RelatingBuildingElement;_this1974.RelatedCoverings=RelatedCoverings;_this1974.type=886880790;return _this1974;}return _createClass(IfcRelCoversBldgElements);}(IfcRelConnects);IFC4X32.IfcRelCoversBldgElements=IfcRelCoversBldgElements;var IfcRelCoversSpaces=/*#__PURE__*/function(_IfcRelConnects41){_inherits(IfcRelCoversSpaces,_IfcRelConnects41);var _super1978=_createSuper(IfcRelCoversSpaces);function IfcRelCoversSpaces(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedCoverings){var _this1975;_classCallCheck(this,IfcRelCoversSpaces);_this1975=_super1978.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1975.GlobalId=GlobalId;_this1975.OwnerHistory=OwnerHistory;_this1975.Name=Name;_this1975.Description=Description;_this1975.RelatingSpace=RelatingSpace;_this1975.RelatedCoverings=RelatedCoverings;_this1975.type=2802773753;return _this1975;}return _createClass(IfcRelCoversSpaces);}(IfcRelConnects);IFC4X32.IfcRelCoversSpaces=IfcRelCoversSpaces;var IfcRelDeclares=/*#__PURE__*/function(_IfcRelationship15){_inherits(IfcRelDeclares,_IfcRelationship15);var _super1979=_createSuper(IfcRelDeclares);function IfcRelDeclares(expressID,GlobalId,OwnerHistory,Name,Description,RelatingContext,RelatedDefinitions){var _this1976;_classCallCheck(this,IfcRelDeclares);_this1976=_super1979.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1976.GlobalId=GlobalId;_this1976.OwnerHistory=OwnerHistory;_this1976.Name=Name;_this1976.Description=Description;_this1976.RelatingContext=RelatingContext;_this1976.RelatedDefinitions=RelatedDefinitions;_this1976.type=2565941209;return _this1976;}return _createClass(IfcRelDeclares);}(IfcRelationship);IFC4X32.IfcRelDeclares=IfcRelDeclares;var IfcRelDecomposes=/*#__PURE__*/function(_IfcRelationship16){_inherits(IfcRelDecomposes,_IfcRelationship16);var _super1980=_createSuper(IfcRelDecomposes);function IfcRelDecomposes(expressID,GlobalId,OwnerHistory,Name,Description){var _this1977;_classCallCheck(this,IfcRelDecomposes);_this1977=_super1980.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1977.GlobalId=GlobalId;_this1977.OwnerHistory=OwnerHistory;_this1977.Name=Name;_this1977.Description=Description;_this1977.type=2551354335;return _this1977;}return _createClass(IfcRelDecomposes);}(IfcRelationship);IFC4X32.IfcRelDecomposes=IfcRelDecomposes;var IfcRelDefines=/*#__PURE__*/function(_IfcRelationship17){_inherits(IfcRelDefines,_IfcRelationship17);var _super1981=_createSuper(IfcRelDefines);function IfcRelDefines(expressID,GlobalId,OwnerHistory,Name,Description){var _this1978;_classCallCheck(this,IfcRelDefines);_this1978=_super1981.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1978.GlobalId=GlobalId;_this1978.OwnerHistory=OwnerHistory;_this1978.Name=Name;_this1978.Description=Description;_this1978.type=693640335;return _this1978;}return _createClass(IfcRelDefines);}(IfcRelationship);IFC4X32.IfcRelDefines=IfcRelDefines;var IfcRelDefinesByObject=/*#__PURE__*/function(_IfcRelDefines7){_inherits(IfcRelDefinesByObject,_IfcRelDefines7);var _super1982=_createSuper(IfcRelDefinesByObject);function IfcRelDefinesByObject(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingObject){var _this1979;_classCallCheck(this,IfcRelDefinesByObject);_this1979=_super1982.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1979.GlobalId=GlobalId;_this1979.OwnerHistory=OwnerHistory;_this1979.Name=Name;_this1979.Description=Description;_this1979.RelatedObjects=RelatedObjects;_this1979.RelatingObject=RelatingObject;_this1979.type=1462361463;return _this1979;}return _createClass(IfcRelDefinesByObject);}(IfcRelDefines);IFC4X32.IfcRelDefinesByObject=IfcRelDefinesByObject;var IfcRelDefinesByProperties=/*#__PURE__*/function(_IfcRelDefines8){_inherits(IfcRelDefinesByProperties,_IfcRelDefines8);var _super1983=_createSuper(IfcRelDefinesByProperties);function IfcRelDefinesByProperties(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingPropertyDefinition){var _this1980;_classCallCheck(this,IfcRelDefinesByProperties);_this1980=_super1983.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1980.GlobalId=GlobalId;_this1980.OwnerHistory=OwnerHistory;_this1980.Name=Name;_this1980.Description=Description;_this1980.RelatedObjects=RelatedObjects;_this1980.RelatingPropertyDefinition=RelatingPropertyDefinition;_this1980.type=4186316022;return _this1980;}return _createClass(IfcRelDefinesByProperties);}(IfcRelDefines);IFC4X32.IfcRelDefinesByProperties=IfcRelDefinesByProperties;var IfcRelDefinesByTemplate=/*#__PURE__*/function(_IfcRelDefines9){_inherits(IfcRelDefinesByTemplate,_IfcRelDefines9);var _super1984=_createSuper(IfcRelDefinesByTemplate);function IfcRelDefinesByTemplate(expressID,GlobalId,OwnerHistory,Name,Description,RelatedPropertySets,RelatingTemplate){var _this1981;_classCallCheck(this,IfcRelDefinesByTemplate);_this1981=_super1984.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1981.GlobalId=GlobalId;_this1981.OwnerHistory=OwnerHistory;_this1981.Name=Name;_this1981.Description=Description;_this1981.RelatedPropertySets=RelatedPropertySets;_this1981.RelatingTemplate=RelatingTemplate;_this1981.type=307848117;return _this1981;}return _createClass(IfcRelDefinesByTemplate);}(IfcRelDefines);IFC4X32.IfcRelDefinesByTemplate=IfcRelDefinesByTemplate;var IfcRelDefinesByType=/*#__PURE__*/function(_IfcRelDefines10){_inherits(IfcRelDefinesByType,_IfcRelDefines10);var _super1985=_createSuper(IfcRelDefinesByType);function IfcRelDefinesByType(expressID,GlobalId,OwnerHistory,Name,Description,RelatedObjects,RelatingType){var _this1982;_classCallCheck(this,IfcRelDefinesByType);_this1982=_super1985.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1982.GlobalId=GlobalId;_this1982.OwnerHistory=OwnerHistory;_this1982.Name=Name;_this1982.Description=Description;_this1982.RelatedObjects=RelatedObjects;_this1982.RelatingType=RelatingType;_this1982.type=781010003;return _this1982;}return _createClass(IfcRelDefinesByType);}(IfcRelDefines);IFC4X32.IfcRelDefinesByType=IfcRelDefinesByType;var IfcRelFillsElement=/*#__PURE__*/function(_IfcRelConnects42){_inherits(IfcRelFillsElement,_IfcRelConnects42);var _super1986=_createSuper(IfcRelFillsElement);function IfcRelFillsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingOpeningElement,RelatedBuildingElement){var _this1983;_classCallCheck(this,IfcRelFillsElement);_this1983=_super1986.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1983.GlobalId=GlobalId;_this1983.OwnerHistory=OwnerHistory;_this1983.Name=Name;_this1983.Description=Description;_this1983.RelatingOpeningElement=RelatingOpeningElement;_this1983.RelatedBuildingElement=RelatedBuildingElement;_this1983.type=3940055652;return _this1983;}return _createClass(IfcRelFillsElement);}(IfcRelConnects);IFC4X32.IfcRelFillsElement=IfcRelFillsElement;var IfcRelFlowControlElements=/*#__PURE__*/function(_IfcRelConnects43){_inherits(IfcRelFlowControlElements,_IfcRelConnects43);var _super1987=_createSuper(IfcRelFlowControlElements);function IfcRelFlowControlElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatedControlElements,RelatingFlowElement){var _this1984;_classCallCheck(this,IfcRelFlowControlElements);_this1984=_super1987.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1984.GlobalId=GlobalId;_this1984.OwnerHistory=OwnerHistory;_this1984.Name=Name;_this1984.Description=Description;_this1984.RelatedControlElements=RelatedControlElements;_this1984.RelatingFlowElement=RelatingFlowElement;_this1984.type=279856033;return _this1984;}return _createClass(IfcRelFlowControlElements);}(IfcRelConnects);IFC4X32.IfcRelFlowControlElements=IfcRelFlowControlElements;var IfcRelInterferesElements=/*#__PURE__*/function(_IfcRelConnects44){_inherits(IfcRelInterferesElements,_IfcRelConnects44);var _super1988=_createSuper(IfcRelInterferesElements);function IfcRelInterferesElements(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedElement,InterferenceGeometry,InterferenceSpace,InterferenceType,ImpliedOrder){var _this1985;_classCallCheck(this,IfcRelInterferesElements);_this1985=_super1988.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1985.GlobalId=GlobalId;_this1985.OwnerHistory=OwnerHistory;_this1985.Name=Name;_this1985.Description=Description;_this1985.RelatingElement=RelatingElement;_this1985.RelatedElement=RelatedElement;_this1985.InterferenceGeometry=InterferenceGeometry;_this1985.InterferenceSpace=InterferenceSpace;_this1985.InterferenceType=InterferenceType;_this1985.ImpliedOrder=ImpliedOrder;_this1985.type=427948657;return _this1985;}return _createClass(IfcRelInterferesElements);}(IfcRelConnects);IFC4X32.IfcRelInterferesElements=IfcRelInterferesElements;var IfcRelNests=/*#__PURE__*/function(_IfcRelDecomposes7){_inherits(IfcRelNests,_IfcRelDecomposes7);var _super1989=_createSuper(IfcRelNests);function IfcRelNests(expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects){var _this1986;_classCallCheck(this,IfcRelNests);_this1986=_super1989.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1986.GlobalId=GlobalId;_this1986.OwnerHistory=OwnerHistory;_this1986.Name=Name;_this1986.Description=Description;_this1986.RelatingObject=RelatingObject;_this1986.RelatedObjects=RelatedObjects;_this1986.type=3268803585;return _this1986;}return _createClass(IfcRelNests);}(IfcRelDecomposes);IFC4X32.IfcRelNests=IfcRelNests;var IfcRelPositions=/*#__PURE__*/function(_IfcRelConnects45){_inherits(IfcRelPositions,_IfcRelConnects45);var _super1990=_createSuper(IfcRelPositions);function IfcRelPositions(expressID,GlobalId,OwnerHistory,Name,Description,RelatingPositioningElement,RelatedProducts){var _this1987;_classCallCheck(this,IfcRelPositions);_this1987=_super1990.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1987.GlobalId=GlobalId;_this1987.OwnerHistory=OwnerHistory;_this1987.Name=Name;_this1987.Description=Description;_this1987.RelatingPositioningElement=RelatingPositioningElement;_this1987.RelatedProducts=RelatedProducts;_this1987.type=1441486842;return _this1987;}return _createClass(IfcRelPositions);}(IfcRelConnects);IFC4X32.IfcRelPositions=IfcRelPositions;var IfcRelProjectsElement=/*#__PURE__*/function(_IfcRelDecomposes8){_inherits(IfcRelProjectsElement,_IfcRelDecomposes8);var _super1991=_createSuper(IfcRelProjectsElement);function IfcRelProjectsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedFeatureElement){var _this1988;_classCallCheck(this,IfcRelProjectsElement);_this1988=_super1991.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1988.GlobalId=GlobalId;_this1988.OwnerHistory=OwnerHistory;_this1988.Name=Name;_this1988.Description=Description;_this1988.RelatingElement=RelatingElement;_this1988.RelatedFeatureElement=RelatedFeatureElement;_this1988.type=750771296;return _this1988;}return _createClass(IfcRelProjectsElement);}(IfcRelDecomposes);IFC4X32.IfcRelProjectsElement=IfcRelProjectsElement;var IfcRelReferencedInSpatialStructure=/*#__PURE__*/function(_IfcRelConnects46){_inherits(IfcRelReferencedInSpatialStructure,_IfcRelConnects46);var _super1992=_createSuper(IfcRelReferencedInSpatialStructure);function IfcRelReferencedInSpatialStructure(expressID,GlobalId,OwnerHistory,Name,Description,RelatedElements,RelatingStructure){var _this1989;_classCallCheck(this,IfcRelReferencedInSpatialStructure);_this1989=_super1992.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1989.GlobalId=GlobalId;_this1989.OwnerHistory=OwnerHistory;_this1989.Name=Name;_this1989.Description=Description;_this1989.RelatedElements=RelatedElements;_this1989.RelatingStructure=RelatingStructure;_this1989.type=1245217292;return _this1989;}return _createClass(IfcRelReferencedInSpatialStructure);}(IfcRelConnects);IFC4X32.IfcRelReferencedInSpatialStructure=IfcRelReferencedInSpatialStructure;var IfcRelSequence=/*#__PURE__*/function(_IfcRelConnects47){_inherits(IfcRelSequence,_IfcRelConnects47);var _super1993=_createSuper(IfcRelSequence);function IfcRelSequence(expressID,GlobalId,OwnerHistory,Name,Description,RelatingProcess,RelatedProcess,TimeLag,SequenceType,UserDefinedSequenceType){var _this1990;_classCallCheck(this,IfcRelSequence);_this1990=_super1993.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1990.GlobalId=GlobalId;_this1990.OwnerHistory=OwnerHistory;_this1990.Name=Name;_this1990.Description=Description;_this1990.RelatingProcess=RelatingProcess;_this1990.RelatedProcess=RelatedProcess;_this1990.TimeLag=TimeLag;_this1990.SequenceType=SequenceType;_this1990.UserDefinedSequenceType=UserDefinedSequenceType;_this1990.type=4122056220;return _this1990;}return _createClass(IfcRelSequence);}(IfcRelConnects);IFC4X32.IfcRelSequence=IfcRelSequence;var IfcRelServicesBuildings=/*#__PURE__*/function(_IfcRelConnects48){_inherits(IfcRelServicesBuildings,_IfcRelConnects48);var _super1994=_createSuper(IfcRelServicesBuildings);function IfcRelServicesBuildings(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSystem,RelatedBuildings){var _this1991;_classCallCheck(this,IfcRelServicesBuildings);_this1991=_super1994.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1991.GlobalId=GlobalId;_this1991.OwnerHistory=OwnerHistory;_this1991.Name=Name;_this1991.Description=Description;_this1991.RelatingSystem=RelatingSystem;_this1991.RelatedBuildings=RelatedBuildings;_this1991.type=366585022;return _this1991;}return _createClass(IfcRelServicesBuildings);}(IfcRelConnects);IFC4X32.IfcRelServicesBuildings=IfcRelServicesBuildings;var IfcRelSpaceBoundary=/*#__PURE__*/function(_IfcRelConnects49){_inherits(IfcRelSpaceBoundary,_IfcRelConnects49);var _super1995=_createSuper(IfcRelSpaceBoundary);function IfcRelSpaceBoundary(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary){var _this1992;_classCallCheck(this,IfcRelSpaceBoundary);_this1992=_super1995.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1992.GlobalId=GlobalId;_this1992.OwnerHistory=OwnerHistory;_this1992.Name=Name;_this1992.Description=Description;_this1992.RelatingSpace=RelatingSpace;_this1992.RelatedBuildingElement=RelatedBuildingElement;_this1992.ConnectionGeometry=ConnectionGeometry;_this1992.PhysicalOrVirtualBoundary=PhysicalOrVirtualBoundary;_this1992.InternalOrExternalBoundary=InternalOrExternalBoundary;_this1992.type=3451746338;return _this1992;}return _createClass(IfcRelSpaceBoundary);}(IfcRelConnects);IFC4X32.IfcRelSpaceBoundary=IfcRelSpaceBoundary;var IfcRelSpaceBoundary1stLevel=/*#__PURE__*/function(_IfcRelSpaceBoundary3){_inherits(IfcRelSpaceBoundary1stLevel,_IfcRelSpaceBoundary3);var _super1996=_createSuper(IfcRelSpaceBoundary1stLevel);function IfcRelSpaceBoundary1stLevel(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary,ParentBoundary){var _this1993;_classCallCheck(this,IfcRelSpaceBoundary1stLevel);_this1993=_super1996.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary);_this1993.GlobalId=GlobalId;_this1993.OwnerHistory=OwnerHistory;_this1993.Name=Name;_this1993.Description=Description;_this1993.RelatingSpace=RelatingSpace;_this1993.RelatedBuildingElement=RelatedBuildingElement;_this1993.ConnectionGeometry=ConnectionGeometry;_this1993.PhysicalOrVirtualBoundary=PhysicalOrVirtualBoundary;_this1993.InternalOrExternalBoundary=InternalOrExternalBoundary;_this1993.ParentBoundary=ParentBoundary;_this1993.type=3523091289;return _this1993;}return _createClass(IfcRelSpaceBoundary1stLevel);}(IfcRelSpaceBoundary);IFC4X32.IfcRelSpaceBoundary1stLevel=IfcRelSpaceBoundary1stLevel;var IfcRelSpaceBoundary2ndLevel=/*#__PURE__*/function(_IfcRelSpaceBoundary4){_inherits(IfcRelSpaceBoundary2ndLevel,_IfcRelSpaceBoundary4);var _super1997=_createSuper(IfcRelSpaceBoundary2ndLevel);function IfcRelSpaceBoundary2ndLevel(expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary,ParentBoundary,CorrespondingBoundary){var _this1994;_classCallCheck(this,IfcRelSpaceBoundary2ndLevel);_this1994=_super1997.call(this,expressID,GlobalId,OwnerHistory,Name,Description,RelatingSpace,RelatedBuildingElement,ConnectionGeometry,PhysicalOrVirtualBoundary,InternalOrExternalBoundary,ParentBoundary);_this1994.GlobalId=GlobalId;_this1994.OwnerHistory=OwnerHistory;_this1994.Name=Name;_this1994.Description=Description;_this1994.RelatingSpace=RelatingSpace;_this1994.RelatedBuildingElement=RelatedBuildingElement;_this1994.ConnectionGeometry=ConnectionGeometry;_this1994.PhysicalOrVirtualBoundary=PhysicalOrVirtualBoundary;_this1994.InternalOrExternalBoundary=InternalOrExternalBoundary;_this1994.ParentBoundary=ParentBoundary;_this1994.CorrespondingBoundary=CorrespondingBoundary;_this1994.type=1521410863;return _this1994;}return _createClass(IfcRelSpaceBoundary2ndLevel);}(IfcRelSpaceBoundary1stLevel);IFC4X32.IfcRelSpaceBoundary2ndLevel=IfcRelSpaceBoundary2ndLevel;var IfcRelVoidsElement=/*#__PURE__*/function(_IfcRelDecomposes9){_inherits(IfcRelVoidsElement,_IfcRelDecomposes9);var _super1998=_createSuper(IfcRelVoidsElement);function IfcRelVoidsElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingBuildingElement,RelatedOpeningElement){var _this1995;_classCallCheck(this,IfcRelVoidsElement);_this1995=_super1998.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this1995.GlobalId=GlobalId;_this1995.OwnerHistory=OwnerHistory;_this1995.Name=Name;_this1995.Description=Description;_this1995.RelatingBuildingElement=RelatingBuildingElement;_this1995.RelatedOpeningElement=RelatedOpeningElement;_this1995.type=1401173127;return _this1995;}return _createClass(IfcRelVoidsElement);}(IfcRelDecomposes);IFC4X32.IfcRelVoidsElement=IfcRelVoidsElement;var IfcReparametrisedCompositeCurveSegment=/*#__PURE__*/function(_IfcCompositeCurveSeg2){_inherits(IfcReparametrisedCompositeCurveSegment,_IfcCompositeCurveSeg2);var _super1999=_createSuper(IfcReparametrisedCompositeCurveSegment);function IfcReparametrisedCompositeCurveSegment(expressID,Transition,SameSense,ParentCurve,ParamLength){var _this1996;_classCallCheck(this,IfcReparametrisedCompositeCurveSegment);_this1996=_super1999.call(this,expressID,Transition,SameSense,ParentCurve);_this1996.Transition=Transition;_this1996.SameSense=SameSense;_this1996.ParentCurve=ParentCurve;_this1996.ParamLength=ParamLength;_this1996.type=816062949;return _this1996;}return _createClass(IfcReparametrisedCompositeCurveSegment);}(IfcCompositeCurveSegment);IFC4X32.IfcReparametrisedCompositeCurveSegment=IfcReparametrisedCompositeCurveSegment;var IfcResource=/*#__PURE__*/function(_IfcObject16){_inherits(IfcResource,_IfcObject16);var _super2000=_createSuper(IfcResource);function IfcResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription){var _this1997;_classCallCheck(this,IfcResource);_this1997=_super2000.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this1997.GlobalId=GlobalId;_this1997.OwnerHistory=OwnerHistory;_this1997.Name=Name;_this1997.Description=Description;_this1997.ObjectType=ObjectType;_this1997.Identification=Identification;_this1997.LongDescription=LongDescription;_this1997.type=2914609552;return _this1997;}return _createClass(IfcResource);}(IfcObject);IFC4X32.IfcResource=IfcResource;var IfcRevolvedAreaSolid=/*#__PURE__*/function(_IfcSweptAreaSolid10){_inherits(IfcRevolvedAreaSolid,_IfcSweptAreaSolid10);var _super2001=_createSuper(IfcRevolvedAreaSolid);function IfcRevolvedAreaSolid(expressID,SweptArea,Position,Axis,Angle){var _this1998;_classCallCheck(this,IfcRevolvedAreaSolid);_this1998=_super2001.call(this,expressID,SweptArea,Position);_this1998.SweptArea=SweptArea;_this1998.Position=Position;_this1998.Axis=Axis;_this1998.Angle=Angle;_this1998.type=1856042241;return _this1998;}return _createClass(IfcRevolvedAreaSolid);}(IfcSweptAreaSolid);IFC4X32.IfcRevolvedAreaSolid=IfcRevolvedAreaSolid;var IfcRevolvedAreaSolidTapered=/*#__PURE__*/function(_IfcRevolvedAreaSolid2){_inherits(IfcRevolvedAreaSolidTapered,_IfcRevolvedAreaSolid2);var _super2002=_createSuper(IfcRevolvedAreaSolidTapered);function IfcRevolvedAreaSolidTapered(expressID,SweptArea,Position,Axis,Angle,EndSweptArea){var _this1999;_classCallCheck(this,IfcRevolvedAreaSolidTapered);_this1999=_super2002.call(this,expressID,SweptArea,Position,Axis,Angle);_this1999.SweptArea=SweptArea;_this1999.Position=Position;_this1999.Axis=Axis;_this1999.Angle=Angle;_this1999.EndSweptArea=EndSweptArea;_this1999.type=3243963512;return _this1999;}return _createClass(IfcRevolvedAreaSolidTapered);}(IfcRevolvedAreaSolid);IFC4X32.IfcRevolvedAreaSolidTapered=IfcRevolvedAreaSolidTapered;var IfcRightCircularCone=/*#__PURE__*/function(_IfcCsgPrimitive3D12){_inherits(IfcRightCircularCone,_IfcCsgPrimitive3D12);var _super2003=_createSuper(IfcRightCircularCone);function IfcRightCircularCone(expressID,Position,Height,BottomRadius){var _this2000;_classCallCheck(this,IfcRightCircularCone);_this2000=_super2003.call(this,expressID,Position);_this2000.Position=Position;_this2000.Height=Height;_this2000.BottomRadius=BottomRadius;_this2000.type=4158566097;return _this2000;}return _createClass(IfcRightCircularCone);}(IfcCsgPrimitive3D);IFC4X32.IfcRightCircularCone=IfcRightCircularCone;var IfcRightCircularCylinder=/*#__PURE__*/function(_IfcCsgPrimitive3D13){_inherits(IfcRightCircularCylinder,_IfcCsgPrimitive3D13);var _super2004=_createSuper(IfcRightCircularCylinder);function IfcRightCircularCylinder(expressID,Position,Height,Radius){var _this2001;_classCallCheck(this,IfcRightCircularCylinder);_this2001=_super2004.call(this,expressID,Position);_this2001.Position=Position;_this2001.Height=Height;_this2001.Radius=Radius;_this2001.type=3626867408;return _this2001;}return _createClass(IfcRightCircularCylinder);}(IfcCsgPrimitive3D);IFC4X32.IfcRightCircularCylinder=IfcRightCircularCylinder;var IfcSectionedSolid=/*#__PURE__*/function(_IfcSolidModel13){_inherits(IfcSectionedSolid,_IfcSolidModel13);var _super2005=_createSuper(IfcSectionedSolid);function IfcSectionedSolid(expressID,Directrix,CrossSections){var _this2002;_classCallCheck(this,IfcSectionedSolid);_this2002=_super2005.call(this,expressID);_this2002.Directrix=Directrix;_this2002.CrossSections=CrossSections;_this2002.type=1862484736;return _this2002;}return _createClass(IfcSectionedSolid);}(IfcSolidModel);IFC4X32.IfcSectionedSolid=IfcSectionedSolid;var IfcSectionedSolidHorizontal=/*#__PURE__*/function(_IfcSectionedSolid){_inherits(IfcSectionedSolidHorizontal,_IfcSectionedSolid);var _super2006=_createSuper(IfcSectionedSolidHorizontal);function IfcSectionedSolidHorizontal(expressID,Directrix,CrossSections,CrossSectionPositions){var _this2003;_classCallCheck(this,IfcSectionedSolidHorizontal);_this2003=_super2006.call(this,expressID,Directrix,CrossSections);_this2003.Directrix=Directrix;_this2003.CrossSections=CrossSections;_this2003.CrossSectionPositions=CrossSectionPositions;_this2003.type=1290935644;return _this2003;}return _createClass(IfcSectionedSolidHorizontal);}(IfcSectionedSolid);IFC4X32.IfcSectionedSolidHorizontal=IfcSectionedSolidHorizontal;var IfcSectionedSurface=/*#__PURE__*/function(_IfcSurface10){_inherits(IfcSectionedSurface,_IfcSurface10);var _super2007=_createSuper(IfcSectionedSurface);function IfcSectionedSurface(expressID,Directrix,CrossSectionPositions,CrossSections){var _this2004;_classCallCheck(this,IfcSectionedSurface);_this2004=_super2007.call(this,expressID);_this2004.Directrix=Directrix;_this2004.CrossSectionPositions=CrossSectionPositions;_this2004.CrossSections=CrossSections;_this2004.type=1356537516;return _this2004;}return _createClass(IfcSectionedSurface);}(IfcSurface);IFC4X32.IfcSectionedSurface=IfcSectionedSurface;var IfcSimplePropertyTemplate=/*#__PURE__*/function(_IfcPropertyTemplate3){_inherits(IfcSimplePropertyTemplate,_IfcPropertyTemplate3);var _super2008=_createSuper(IfcSimplePropertyTemplate);function IfcSimplePropertyTemplate(expressID,GlobalId,OwnerHistory,Name,Description,TemplateType,PrimaryMeasureType,SecondaryMeasureType,Enumerators,PrimaryUnit,SecondaryUnit,Expression,AccessState){var _this2005;_classCallCheck(this,IfcSimplePropertyTemplate);_this2005=_super2008.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2005.GlobalId=GlobalId;_this2005.OwnerHistory=OwnerHistory;_this2005.Name=Name;_this2005.Description=Description;_this2005.TemplateType=TemplateType;_this2005.PrimaryMeasureType=PrimaryMeasureType;_this2005.SecondaryMeasureType=SecondaryMeasureType;_this2005.Enumerators=Enumerators;_this2005.PrimaryUnit=PrimaryUnit;_this2005.SecondaryUnit=SecondaryUnit;_this2005.Expression=Expression;_this2005.AccessState=AccessState;_this2005.type=3663146110;return _this2005;}return _createClass(IfcSimplePropertyTemplate);}(IfcPropertyTemplate);IFC4X32.IfcSimplePropertyTemplate=IfcSimplePropertyTemplate;var IfcSpatialElement=/*#__PURE__*/function(_IfcProduct17){_inherits(IfcSpatialElement,_IfcProduct17);var _super2009=_createSuper(IfcSpatialElement);function IfcSpatialElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName){var _this2006;_classCallCheck(this,IfcSpatialElement);_this2006=_super2009.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2006.GlobalId=GlobalId;_this2006.OwnerHistory=OwnerHistory;_this2006.Name=Name;_this2006.Description=Description;_this2006.ObjectType=ObjectType;_this2006.ObjectPlacement=ObjectPlacement;_this2006.Representation=Representation;_this2006.LongName=LongName;_this2006.type=1412071761;return _this2006;}return _createClass(IfcSpatialElement);}(IfcProduct);IFC4X32.IfcSpatialElement=IfcSpatialElement;var IfcSpatialElementType=/*#__PURE__*/function(_IfcTypeProduct9){_inherits(IfcSpatialElementType,_IfcTypeProduct9);var _super2010=_createSuper(IfcSpatialElementType);function IfcSpatialElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2007;_classCallCheck(this,IfcSpatialElementType);_this2007=_super2010.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag);_this2007.GlobalId=GlobalId;_this2007.OwnerHistory=OwnerHistory;_this2007.Name=Name;_this2007.Description=Description;_this2007.ApplicableOccurrence=ApplicableOccurrence;_this2007.HasPropertySets=HasPropertySets;_this2007.RepresentationMaps=RepresentationMaps;_this2007.Tag=Tag;_this2007.ElementType=ElementType;_this2007.type=710998568;return _this2007;}return _createClass(IfcSpatialElementType);}(IfcTypeProduct);IFC4X32.IfcSpatialElementType=IfcSpatialElementType;var IfcSpatialStructureElement=/*#__PURE__*/function(_IfcSpatialElement4){_inherits(IfcSpatialStructureElement,_IfcSpatialElement4);var _super2011=_createSuper(IfcSpatialStructureElement);function IfcSpatialStructureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType){var _this2008;_classCallCheck(this,IfcSpatialStructureElement);_this2008=_super2011.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this2008.GlobalId=GlobalId;_this2008.OwnerHistory=OwnerHistory;_this2008.Name=Name;_this2008.Description=Description;_this2008.ObjectType=ObjectType;_this2008.ObjectPlacement=ObjectPlacement;_this2008.Representation=Representation;_this2008.LongName=LongName;_this2008.CompositionType=CompositionType;_this2008.type=2706606064;return _this2008;}return _createClass(IfcSpatialStructureElement);}(IfcSpatialElement);IFC4X32.IfcSpatialStructureElement=IfcSpatialStructureElement;var IfcSpatialStructureElementType=/*#__PURE__*/function(_IfcSpatialElementTyp3){_inherits(IfcSpatialStructureElementType,_IfcSpatialElementTyp3);var _super2012=_createSuper(IfcSpatialStructureElementType);function IfcSpatialStructureElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2009;_classCallCheck(this,IfcSpatialStructureElementType);_this2009=_super2012.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2009.GlobalId=GlobalId;_this2009.OwnerHistory=OwnerHistory;_this2009.Name=Name;_this2009.Description=Description;_this2009.ApplicableOccurrence=ApplicableOccurrence;_this2009.HasPropertySets=HasPropertySets;_this2009.RepresentationMaps=RepresentationMaps;_this2009.Tag=Tag;_this2009.ElementType=ElementType;_this2009.type=3893378262;return _this2009;}return _createClass(IfcSpatialStructureElementType);}(IfcSpatialElementType);IFC4X32.IfcSpatialStructureElementType=IfcSpatialStructureElementType;var IfcSpatialZone=/*#__PURE__*/function(_IfcSpatialElement5){_inherits(IfcSpatialZone,_IfcSpatialElement5);var _super2013=_createSuper(IfcSpatialZone);function IfcSpatialZone(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,PredefinedType){var _this2010;_classCallCheck(this,IfcSpatialZone);_this2010=_super2013.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this2010.GlobalId=GlobalId;_this2010.OwnerHistory=OwnerHistory;_this2010.Name=Name;_this2010.Description=Description;_this2010.ObjectType=ObjectType;_this2010.ObjectPlacement=ObjectPlacement;_this2010.Representation=Representation;_this2010.LongName=LongName;_this2010.PredefinedType=PredefinedType;_this2010.type=463610769;return _this2010;}return _createClass(IfcSpatialZone);}(IfcSpatialElement);IFC4X32.IfcSpatialZone=IfcSpatialZone;var IfcSpatialZoneType=/*#__PURE__*/function(_IfcSpatialElementTyp4){_inherits(IfcSpatialZoneType,_IfcSpatialElementTyp4);var _super2014=_createSuper(IfcSpatialZoneType);function IfcSpatialZoneType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,LongName){var _this2011;_classCallCheck(this,IfcSpatialZoneType);_this2011=_super2014.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2011.GlobalId=GlobalId;_this2011.OwnerHistory=OwnerHistory;_this2011.Name=Name;_this2011.Description=Description;_this2011.ApplicableOccurrence=ApplicableOccurrence;_this2011.HasPropertySets=HasPropertySets;_this2011.RepresentationMaps=RepresentationMaps;_this2011.Tag=Tag;_this2011.ElementType=ElementType;_this2011.PredefinedType=PredefinedType;_this2011.LongName=LongName;_this2011.type=2481509218;return _this2011;}return _createClass(IfcSpatialZoneType);}(IfcSpatialElementType);IFC4X32.IfcSpatialZoneType=IfcSpatialZoneType;var IfcSphere=/*#__PURE__*/function(_IfcCsgPrimitive3D14){_inherits(IfcSphere,_IfcCsgPrimitive3D14);var _super2015=_createSuper(IfcSphere);function IfcSphere(expressID,Position,Radius){var _this2012;_classCallCheck(this,IfcSphere);_this2012=_super2015.call(this,expressID,Position);_this2012.Position=Position;_this2012.Radius=Radius;_this2012.type=451544542;return _this2012;}return _createClass(IfcSphere);}(IfcCsgPrimitive3D);IFC4X32.IfcSphere=IfcSphere;var IfcSphericalSurface=/*#__PURE__*/function(_IfcElementarySurface7){_inherits(IfcSphericalSurface,_IfcElementarySurface7);var _super2016=_createSuper(IfcSphericalSurface);function IfcSphericalSurface(expressID,Position,Radius){var _this2013;_classCallCheck(this,IfcSphericalSurface);_this2013=_super2016.call(this,expressID,Position);_this2013.Position=Position;_this2013.Radius=Radius;_this2013.type=4015995234;return _this2013;}return _createClass(IfcSphericalSurface);}(IfcElementarySurface);IFC4X32.IfcSphericalSurface=IfcSphericalSurface;var IfcSpiral=/*#__PURE__*/function(_IfcCurve17){_inherits(IfcSpiral,_IfcCurve17);var _super2017=_createSuper(IfcSpiral);function IfcSpiral(expressID,Position){var _this2014;_classCallCheck(this,IfcSpiral);_this2014=_super2017.call(this,expressID);_this2014.Position=Position;_this2014.type=2735484536;return _this2014;}return _createClass(IfcSpiral);}(IfcCurve);IFC4X32.IfcSpiral=IfcSpiral;var IfcStructuralActivity=/*#__PURE__*/function(_IfcProduct18){_inherits(IfcStructuralActivity,_IfcProduct18);var _super2018=_createSuper(IfcStructuralActivity);function IfcStructuralActivity(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this2015;_classCallCheck(this,IfcStructuralActivity);_this2015=_super2018.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2015.GlobalId=GlobalId;_this2015.OwnerHistory=OwnerHistory;_this2015.Name=Name;_this2015.Description=Description;_this2015.ObjectType=ObjectType;_this2015.ObjectPlacement=ObjectPlacement;_this2015.Representation=Representation;_this2015.AppliedLoad=AppliedLoad;_this2015.GlobalOrLocal=GlobalOrLocal;_this2015.type=3544373492;return _this2015;}return _createClass(IfcStructuralActivity);}(IfcProduct);IFC4X32.IfcStructuralActivity=IfcStructuralActivity;var IfcStructuralItem=/*#__PURE__*/function(_IfcProduct19){_inherits(IfcStructuralItem,_IfcProduct19);var _super2019=_createSuper(IfcStructuralItem);function IfcStructuralItem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2016;_classCallCheck(this,IfcStructuralItem);_this2016=_super2019.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2016.GlobalId=GlobalId;_this2016.OwnerHistory=OwnerHistory;_this2016.Name=Name;_this2016.Description=Description;_this2016.ObjectType=ObjectType;_this2016.ObjectPlacement=ObjectPlacement;_this2016.Representation=Representation;_this2016.type=3136571912;return _this2016;}return _createClass(IfcStructuralItem);}(IfcProduct);IFC4X32.IfcStructuralItem=IfcStructuralItem;var IfcStructuralMember=/*#__PURE__*/function(_IfcStructuralItem5){_inherits(IfcStructuralMember,_IfcStructuralItem5);var _super2020=_createSuper(IfcStructuralMember);function IfcStructuralMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2017;_classCallCheck(this,IfcStructuralMember);_this2017=_super2020.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2017.GlobalId=GlobalId;_this2017.OwnerHistory=OwnerHistory;_this2017.Name=Name;_this2017.Description=Description;_this2017.ObjectType=ObjectType;_this2017.ObjectPlacement=ObjectPlacement;_this2017.Representation=Representation;_this2017.type=530289379;return _this2017;}return _createClass(IfcStructuralMember);}(IfcStructuralItem);IFC4X32.IfcStructuralMember=IfcStructuralMember;var IfcStructuralReaction=/*#__PURE__*/function(_IfcStructuralActivit5){_inherits(IfcStructuralReaction,_IfcStructuralActivit5);var _super2021=_createSuper(IfcStructuralReaction);function IfcStructuralReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this2018;_classCallCheck(this,IfcStructuralReaction);_this2018=_super2021.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this2018.GlobalId=GlobalId;_this2018.OwnerHistory=OwnerHistory;_this2018.Name=Name;_this2018.Description=Description;_this2018.ObjectType=ObjectType;_this2018.ObjectPlacement=ObjectPlacement;_this2018.Representation=Representation;_this2018.AppliedLoad=AppliedLoad;_this2018.GlobalOrLocal=GlobalOrLocal;_this2018.type=3689010777;return _this2018;}return _createClass(IfcStructuralReaction);}(IfcStructuralActivity);IFC4X32.IfcStructuralReaction=IfcStructuralReaction;var IfcStructuralSurfaceMember=/*#__PURE__*/function(_IfcStructuralMember5){_inherits(IfcStructuralSurfaceMember,_IfcStructuralMember5);var _super2022=_createSuper(IfcStructuralSurfaceMember);function IfcStructuralSurfaceMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness){var _this2019;_classCallCheck(this,IfcStructuralSurfaceMember);_this2019=_super2022.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2019.GlobalId=GlobalId;_this2019.OwnerHistory=OwnerHistory;_this2019.Name=Name;_this2019.Description=Description;_this2019.ObjectType=ObjectType;_this2019.ObjectPlacement=ObjectPlacement;_this2019.Representation=Representation;_this2019.PredefinedType=PredefinedType;_this2019.Thickness=Thickness;_this2019.type=3979015343;return _this2019;}return _createClass(IfcStructuralSurfaceMember);}(IfcStructuralMember);IFC4X32.IfcStructuralSurfaceMember=IfcStructuralSurfaceMember;var IfcStructuralSurfaceMemberVarying=/*#__PURE__*/function(_IfcStructuralSurface4){_inherits(IfcStructuralSurfaceMemberVarying,_IfcStructuralSurface4);var _super2023=_createSuper(IfcStructuralSurfaceMemberVarying);function IfcStructuralSurfaceMemberVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness){var _this2020;_classCallCheck(this,IfcStructuralSurfaceMemberVarying);_this2020=_super2023.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Thickness);_this2020.GlobalId=GlobalId;_this2020.OwnerHistory=OwnerHistory;_this2020.Name=Name;_this2020.Description=Description;_this2020.ObjectType=ObjectType;_this2020.ObjectPlacement=ObjectPlacement;_this2020.Representation=Representation;_this2020.PredefinedType=PredefinedType;_this2020.Thickness=Thickness;_this2020.type=2218152070;return _this2020;}return _createClass(IfcStructuralSurfaceMemberVarying);}(IfcStructuralSurfaceMember);IFC4X32.IfcStructuralSurfaceMemberVarying=IfcStructuralSurfaceMemberVarying;var IfcStructuralSurfaceReaction=/*#__PURE__*/function(_IfcStructuralReactio5){_inherits(IfcStructuralSurfaceReaction,_IfcStructuralReactio5);var _super2024=_createSuper(IfcStructuralSurfaceReaction);function IfcStructuralSurfaceReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,PredefinedType){var _this2021;_classCallCheck(this,IfcStructuralSurfaceReaction);_this2021=_super2024.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this2021.GlobalId=GlobalId;_this2021.OwnerHistory=OwnerHistory;_this2021.Name=Name;_this2021.Description=Description;_this2021.ObjectType=ObjectType;_this2021.ObjectPlacement=ObjectPlacement;_this2021.Representation=Representation;_this2021.AppliedLoad=AppliedLoad;_this2021.GlobalOrLocal=GlobalOrLocal;_this2021.PredefinedType=PredefinedType;_this2021.type=603775116;return _this2021;}return _createClass(IfcStructuralSurfaceReaction);}(IfcStructuralReaction);IFC4X32.IfcStructuralSurfaceReaction=IfcStructuralSurfaceReaction;var IfcSubContractResourceType=/*#__PURE__*/function(_IfcConstructionResou21){_inherits(IfcSubContractResourceType,_IfcConstructionResou21);var _super2025=_createSuper(IfcSubContractResourceType);function IfcSubContractResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this2022;_classCallCheck(this,IfcSubContractResourceType);_this2022=_super2025.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this2022.GlobalId=GlobalId;_this2022.OwnerHistory=OwnerHistory;_this2022.Name=Name;_this2022.Description=Description;_this2022.ApplicableOccurrence=ApplicableOccurrence;_this2022.HasPropertySets=HasPropertySets;_this2022.Identification=Identification;_this2022.LongDescription=LongDescription;_this2022.ResourceType=ResourceType;_this2022.BaseCosts=BaseCosts;_this2022.BaseQuantity=BaseQuantity;_this2022.PredefinedType=PredefinedType;_this2022.type=4095615324;return _this2022;}return _createClass(IfcSubContractResourceType);}(IfcConstructionResourceType);IFC4X32.IfcSubContractResourceType=IfcSubContractResourceType;var IfcSurfaceCurve=/*#__PURE__*/function(_IfcCurve18){_inherits(IfcSurfaceCurve,_IfcCurve18);var _super2026=_createSuper(IfcSurfaceCurve);function IfcSurfaceCurve(expressID,Curve3D,AssociatedGeometry,MasterRepresentation){var _this2023;_classCallCheck(this,IfcSurfaceCurve);_this2023=_super2026.call(this,expressID);_this2023.Curve3D=Curve3D;_this2023.AssociatedGeometry=AssociatedGeometry;_this2023.MasterRepresentation=MasterRepresentation;_this2023.type=699246055;return _this2023;}return _createClass(IfcSurfaceCurve);}(IfcCurve);IFC4X32.IfcSurfaceCurve=IfcSurfaceCurve;var IfcSurfaceCurveSweptAreaSolid=/*#__PURE__*/function(_IfcDirectrixCurveSwe2){_inherits(IfcSurfaceCurveSweptAreaSolid,_IfcDirectrixCurveSwe2);var _super2027=_createSuper(IfcSurfaceCurveSweptAreaSolid);function IfcSurfaceCurveSweptAreaSolid(expressID,SweptArea,Position,Directrix,StartParam,EndParam,ReferenceSurface){var _this2024;_classCallCheck(this,IfcSurfaceCurveSweptAreaSolid);_this2024=_super2027.call(this,expressID,SweptArea,Position,Directrix,StartParam,EndParam);_this2024.SweptArea=SweptArea;_this2024.Position=Position;_this2024.Directrix=Directrix;_this2024.StartParam=StartParam;_this2024.EndParam=EndParam;_this2024.ReferenceSurface=ReferenceSurface;_this2024.type=2028607225;return _this2024;}return _createClass(IfcSurfaceCurveSweptAreaSolid);}(IfcDirectrixCurveSweptAreaSolid);IFC4X32.IfcSurfaceCurveSweptAreaSolid=IfcSurfaceCurveSweptAreaSolid;var IfcSurfaceOfLinearExtrusion=/*#__PURE__*/function(_IfcSweptSurface5){_inherits(IfcSurfaceOfLinearExtrusion,_IfcSweptSurface5);var _super2028=_createSuper(IfcSurfaceOfLinearExtrusion);function IfcSurfaceOfLinearExtrusion(expressID,SweptCurve,Position,ExtrudedDirection,Depth){var _this2025;_classCallCheck(this,IfcSurfaceOfLinearExtrusion);_this2025=_super2028.call(this,expressID,SweptCurve,Position);_this2025.SweptCurve=SweptCurve;_this2025.Position=Position;_this2025.ExtrudedDirection=ExtrudedDirection;_this2025.Depth=Depth;_this2025.type=2809605785;return _this2025;}return _createClass(IfcSurfaceOfLinearExtrusion);}(IfcSweptSurface);IFC4X32.IfcSurfaceOfLinearExtrusion=IfcSurfaceOfLinearExtrusion;var IfcSurfaceOfRevolution=/*#__PURE__*/function(_IfcSweptSurface6){_inherits(IfcSurfaceOfRevolution,_IfcSweptSurface6);var _super2029=_createSuper(IfcSurfaceOfRevolution);function IfcSurfaceOfRevolution(expressID,SweptCurve,Position,AxisPosition){var _this2026;_classCallCheck(this,IfcSurfaceOfRevolution);_this2026=_super2029.call(this,expressID,SweptCurve,Position);_this2026.SweptCurve=SweptCurve;_this2026.Position=Position;_this2026.AxisPosition=AxisPosition;_this2026.type=4124788165;return _this2026;}return _createClass(IfcSurfaceOfRevolution);}(IfcSweptSurface);IFC4X32.IfcSurfaceOfRevolution=IfcSurfaceOfRevolution;var IfcSystemFurnitureElementType=/*#__PURE__*/function(_IfcFurnishingElement8){_inherits(IfcSystemFurnitureElementType,_IfcFurnishingElement8);var _super2030=_createSuper(IfcSystemFurnitureElementType);function IfcSystemFurnitureElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2027;_classCallCheck(this,IfcSystemFurnitureElementType);_this2027=_super2030.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2027.GlobalId=GlobalId;_this2027.OwnerHistory=OwnerHistory;_this2027.Name=Name;_this2027.Description=Description;_this2027.ApplicableOccurrence=ApplicableOccurrence;_this2027.HasPropertySets=HasPropertySets;_this2027.RepresentationMaps=RepresentationMaps;_this2027.Tag=Tag;_this2027.ElementType=ElementType;_this2027.PredefinedType=PredefinedType;_this2027.type=1580310250;return _this2027;}return _createClass(IfcSystemFurnitureElementType);}(IfcFurnishingElementType);IFC4X32.IfcSystemFurnitureElementType=IfcSystemFurnitureElementType;var IfcTask=/*#__PURE__*/function(_IfcProcess6){_inherits(IfcTask,_IfcProcess6);var _super2031=_createSuper(IfcTask);function IfcTask(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Status,WorkMethod,IsMilestone,Priority,TaskTime,PredefinedType){var _this2028;_classCallCheck(this,IfcTask);_this2028=_super2031.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this2028.GlobalId=GlobalId;_this2028.OwnerHistory=OwnerHistory;_this2028.Name=Name;_this2028.Description=Description;_this2028.ObjectType=ObjectType;_this2028.Identification=Identification;_this2028.LongDescription=LongDescription;_this2028.Status=Status;_this2028.WorkMethod=WorkMethod;_this2028.IsMilestone=IsMilestone;_this2028.Priority=Priority;_this2028.TaskTime=TaskTime;_this2028.PredefinedType=PredefinedType;_this2028.type=3473067441;return _this2028;}return _createClass(IfcTask);}(IfcProcess);IFC4X32.IfcTask=IfcTask;var IfcTaskType=/*#__PURE__*/function(_IfcTypeProcess6){_inherits(IfcTaskType,_IfcTypeProcess6);var _super2032=_createSuper(IfcTaskType);function IfcTaskType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType,PredefinedType,WorkMethod){var _this2029;_classCallCheck(this,IfcTaskType);_this2029=_super2032.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ProcessType);_this2029.GlobalId=GlobalId;_this2029.OwnerHistory=OwnerHistory;_this2029.Name=Name;_this2029.Description=Description;_this2029.ApplicableOccurrence=ApplicableOccurrence;_this2029.HasPropertySets=HasPropertySets;_this2029.Identification=Identification;_this2029.LongDescription=LongDescription;_this2029.ProcessType=ProcessType;_this2029.PredefinedType=PredefinedType;_this2029.WorkMethod=WorkMethod;_this2029.type=3206491090;return _this2029;}return _createClass(IfcTaskType);}(IfcTypeProcess);IFC4X32.IfcTaskType=IfcTaskType;var IfcTessellatedFaceSet=/*#__PURE__*/function(_IfcTessellatedItem4){_inherits(IfcTessellatedFaceSet,_IfcTessellatedItem4);var _super2033=_createSuper(IfcTessellatedFaceSet);function IfcTessellatedFaceSet(expressID,Coordinates,Closed){var _this2030;_classCallCheck(this,IfcTessellatedFaceSet);_this2030=_super2033.call(this,expressID);_this2030.Coordinates=Coordinates;_this2030.Closed=Closed;_this2030.type=2387106220;return _this2030;}return _createClass(IfcTessellatedFaceSet);}(IfcTessellatedItem);IFC4X32.IfcTessellatedFaceSet=IfcTessellatedFaceSet;var IfcThirdOrderPolynomialSpiral=/*#__PURE__*/function(_IfcSpiral){_inherits(IfcThirdOrderPolynomialSpiral,_IfcSpiral);var _super2034=_createSuper(IfcThirdOrderPolynomialSpiral);function IfcThirdOrderPolynomialSpiral(expressID,Position,CubicTerm,QuadraticTerm,LinearTerm,ConstantTerm){var _this2031;_classCallCheck(this,IfcThirdOrderPolynomialSpiral);_this2031=_super2034.call(this,expressID,Position);_this2031.Position=Position;_this2031.CubicTerm=CubicTerm;_this2031.QuadraticTerm=QuadraticTerm;_this2031.LinearTerm=LinearTerm;_this2031.ConstantTerm=ConstantTerm;_this2031.type=782932809;return _this2031;}return _createClass(IfcThirdOrderPolynomialSpiral);}(IfcSpiral);IFC4X32.IfcThirdOrderPolynomialSpiral=IfcThirdOrderPolynomialSpiral;var IfcToroidalSurface=/*#__PURE__*/function(_IfcElementarySurface8){_inherits(IfcToroidalSurface,_IfcElementarySurface8);var _super2035=_createSuper(IfcToroidalSurface);function IfcToroidalSurface(expressID,Position,MajorRadius,MinorRadius){var _this2032;_classCallCheck(this,IfcToroidalSurface);_this2032=_super2035.call(this,expressID,Position);_this2032.Position=Position;_this2032.MajorRadius=MajorRadius;_this2032.MinorRadius=MinorRadius;_this2032.type=1935646853;return _this2032;}return _createClass(IfcToroidalSurface);}(IfcElementarySurface);IFC4X32.IfcToroidalSurface=IfcToroidalSurface;var IfcTransportationDeviceType=/*#__PURE__*/function(_IfcElementType17){_inherits(IfcTransportationDeviceType,_IfcElementType17);var _super2036=_createSuper(IfcTransportationDeviceType);function IfcTransportationDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2033;_classCallCheck(this,IfcTransportationDeviceType);_this2033=_super2036.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2033.GlobalId=GlobalId;_this2033.OwnerHistory=OwnerHistory;_this2033.Name=Name;_this2033.Description=Description;_this2033.ApplicableOccurrence=ApplicableOccurrence;_this2033.HasPropertySets=HasPropertySets;_this2033.RepresentationMaps=RepresentationMaps;_this2033.Tag=Tag;_this2033.ElementType=ElementType;_this2033.type=3665877780;return _this2033;}return _createClass(IfcTransportationDeviceType);}(IfcElementType);IFC4X32.IfcTransportationDeviceType=IfcTransportationDeviceType;var IfcTriangulatedFaceSet=/*#__PURE__*/function(_IfcTessellatedFaceSe3){_inherits(IfcTriangulatedFaceSet,_IfcTessellatedFaceSe3);var _super2037=_createSuper(IfcTriangulatedFaceSet);function IfcTriangulatedFaceSet(expressID,Coordinates,Closed,Normals,CoordIndex,PnIndex){var _this2034;_classCallCheck(this,IfcTriangulatedFaceSet);_this2034=_super2037.call(this,expressID,Coordinates,Closed);_this2034.Coordinates=Coordinates;_this2034.Closed=Closed;_this2034.Normals=Normals;_this2034.CoordIndex=CoordIndex;_this2034.PnIndex=PnIndex;_this2034.type=2916149573;return _this2034;}return _createClass(IfcTriangulatedFaceSet);}(IfcTessellatedFaceSet);IFC4X32.IfcTriangulatedFaceSet=IfcTriangulatedFaceSet;var IfcTriangulatedIrregularNetwork=/*#__PURE__*/function(_IfcTriangulatedFaceS){_inherits(IfcTriangulatedIrregularNetwork,_IfcTriangulatedFaceS);var _super2038=_createSuper(IfcTriangulatedIrregularNetwork);function IfcTriangulatedIrregularNetwork(expressID,Coordinates,Closed,Normals,CoordIndex,PnIndex,Flags){var _this2035;_classCallCheck(this,IfcTriangulatedIrregularNetwork);_this2035=_super2038.call(this,expressID,Coordinates,Closed,Normals,CoordIndex,PnIndex);_this2035.Coordinates=Coordinates;_this2035.Closed=Closed;_this2035.Normals=Normals;_this2035.CoordIndex=CoordIndex;_this2035.PnIndex=PnIndex;_this2035.Flags=Flags;_this2035.type=1229763772;return _this2035;}return _createClass(IfcTriangulatedIrregularNetwork);}(IfcTriangulatedFaceSet);IFC4X32.IfcTriangulatedIrregularNetwork=IfcTriangulatedIrregularNetwork;var IfcVehicleType=/*#__PURE__*/function(_IfcTransportationDev){_inherits(IfcVehicleType,_IfcTransportationDev);var _super2039=_createSuper(IfcVehicleType);function IfcVehicleType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2036;_classCallCheck(this,IfcVehicleType);_this2036=_super2039.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2036.GlobalId=GlobalId;_this2036.OwnerHistory=OwnerHistory;_this2036.Name=Name;_this2036.Description=Description;_this2036.ApplicableOccurrence=ApplicableOccurrence;_this2036.HasPropertySets=HasPropertySets;_this2036.RepresentationMaps=RepresentationMaps;_this2036.Tag=Tag;_this2036.ElementType=ElementType;_this2036.PredefinedType=PredefinedType;_this2036.type=3651464721;return _this2036;}return _createClass(IfcVehicleType);}(IfcTransportationDeviceType);IFC4X32.IfcVehicleType=IfcVehicleType;var IfcWindowLiningProperties=/*#__PURE__*/function(_IfcPreDefinedPropert14){_inherits(IfcWindowLiningProperties,_IfcPreDefinedPropert14);var _super2040=_createSuper(IfcWindowLiningProperties);function IfcWindowLiningProperties(expressID,GlobalId,OwnerHistory,Name,Description,LiningDepth,LiningThickness,TransomThickness,MullionThickness,FirstTransomOffset,SecondTransomOffset,FirstMullionOffset,SecondMullionOffset,ShapeAspectStyle,LiningOffset,LiningToPanelOffsetX,LiningToPanelOffsetY){var _this2037;_classCallCheck(this,IfcWindowLiningProperties);_this2037=_super2040.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2037.GlobalId=GlobalId;_this2037.OwnerHistory=OwnerHistory;_this2037.Name=Name;_this2037.Description=Description;_this2037.LiningDepth=LiningDepth;_this2037.LiningThickness=LiningThickness;_this2037.TransomThickness=TransomThickness;_this2037.MullionThickness=MullionThickness;_this2037.FirstTransomOffset=FirstTransomOffset;_this2037.SecondTransomOffset=SecondTransomOffset;_this2037.FirstMullionOffset=FirstMullionOffset;_this2037.SecondMullionOffset=SecondMullionOffset;_this2037.ShapeAspectStyle=ShapeAspectStyle;_this2037.LiningOffset=LiningOffset;_this2037.LiningToPanelOffsetX=LiningToPanelOffsetX;_this2037.LiningToPanelOffsetY=LiningToPanelOffsetY;_this2037.type=336235671;return _this2037;}return _createClass(IfcWindowLiningProperties);}(IfcPreDefinedPropertySet);IFC4X32.IfcWindowLiningProperties=IfcWindowLiningProperties;var IfcWindowPanelProperties=/*#__PURE__*/function(_IfcPreDefinedPropert15){_inherits(IfcWindowPanelProperties,_IfcPreDefinedPropert15);var _super2041=_createSuper(IfcWindowPanelProperties);function IfcWindowPanelProperties(expressID,GlobalId,OwnerHistory,Name,Description,OperationType,PanelPosition,FrameDepth,FrameThickness,ShapeAspectStyle){var _this2038;_classCallCheck(this,IfcWindowPanelProperties);_this2038=_super2041.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2038.GlobalId=GlobalId;_this2038.OwnerHistory=OwnerHistory;_this2038.Name=Name;_this2038.Description=Description;_this2038.OperationType=OperationType;_this2038.PanelPosition=PanelPosition;_this2038.FrameDepth=FrameDepth;_this2038.FrameThickness=FrameThickness;_this2038.ShapeAspectStyle=ShapeAspectStyle;_this2038.type=512836454;return _this2038;}return _createClass(IfcWindowPanelProperties);}(IfcPreDefinedPropertySet);IFC4X32.IfcWindowPanelProperties=IfcWindowPanelProperties;var IfcActor=/*#__PURE__*/function(_IfcObject17){_inherits(IfcActor,_IfcObject17);var _super2042=_createSuper(IfcActor);function IfcActor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor){var _this2039;_classCallCheck(this,IfcActor);_this2039=_super2042.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2039.GlobalId=GlobalId;_this2039.OwnerHistory=OwnerHistory;_this2039.Name=Name;_this2039.Description=Description;_this2039.ObjectType=ObjectType;_this2039.TheActor=TheActor;_this2039.type=2296667514;return _this2039;}return _createClass(IfcActor);}(IfcObject);IFC4X32.IfcActor=IfcActor;var IfcAdvancedBrep=/*#__PURE__*/function(_IfcManifoldSolidBrep5){_inherits(IfcAdvancedBrep,_IfcManifoldSolidBrep5);var _super2043=_createSuper(IfcAdvancedBrep);function IfcAdvancedBrep(expressID,Outer){var _this2040;_classCallCheck(this,IfcAdvancedBrep);_this2040=_super2043.call(this,expressID,Outer);_this2040.Outer=Outer;_this2040.type=1635779807;return _this2040;}return _createClass(IfcAdvancedBrep);}(IfcManifoldSolidBrep);IFC4X32.IfcAdvancedBrep=IfcAdvancedBrep;var IfcAdvancedBrepWithVoids=/*#__PURE__*/function(_IfcAdvancedBrep2){_inherits(IfcAdvancedBrepWithVoids,_IfcAdvancedBrep2);var _super2044=_createSuper(IfcAdvancedBrepWithVoids);function IfcAdvancedBrepWithVoids(expressID,Outer,Voids){var _this2041;_classCallCheck(this,IfcAdvancedBrepWithVoids);_this2041=_super2044.call(this,expressID,Outer);_this2041.Outer=Outer;_this2041.Voids=Voids;_this2041.type=2603310189;return _this2041;}return _createClass(IfcAdvancedBrepWithVoids);}(IfcAdvancedBrep);IFC4X32.IfcAdvancedBrepWithVoids=IfcAdvancedBrepWithVoids;var IfcAnnotation=/*#__PURE__*/function(_IfcProduct20){_inherits(IfcAnnotation,_IfcProduct20);var _super2045=_createSuper(IfcAnnotation);function IfcAnnotation(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType){var _this2042;_classCallCheck(this,IfcAnnotation);_this2042=_super2045.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2042.GlobalId=GlobalId;_this2042.OwnerHistory=OwnerHistory;_this2042.Name=Name;_this2042.Description=Description;_this2042.ObjectType=ObjectType;_this2042.ObjectPlacement=ObjectPlacement;_this2042.Representation=Representation;_this2042.PredefinedType=PredefinedType;_this2042.type=1674181508;return _this2042;}return _createClass(IfcAnnotation);}(IfcProduct);IFC4X32.IfcAnnotation=IfcAnnotation;var IfcBSplineSurface=/*#__PURE__*/function(_IfcBoundedSurface10){_inherits(IfcBSplineSurface,_IfcBoundedSurface10);var _super2046=_createSuper(IfcBSplineSurface);function IfcBSplineSurface(expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect){var _this2043;_classCallCheck(this,IfcBSplineSurface);_this2043=_super2046.call(this,expressID);_this2043.UDegree=UDegree;_this2043.VDegree=VDegree;_this2043.ControlPointsList=ControlPointsList;_this2043.SurfaceForm=SurfaceForm;_this2043.UClosed=UClosed;_this2043.VClosed=VClosed;_this2043.SelfIntersect=SelfIntersect;_this2043.type=2887950389;return _this2043;}return _createClass(IfcBSplineSurface);}(IfcBoundedSurface);IFC4X32.IfcBSplineSurface=IfcBSplineSurface;var IfcBSplineSurfaceWithKnots=/*#__PURE__*/function(_IfcBSplineSurface2){_inherits(IfcBSplineSurfaceWithKnots,_IfcBSplineSurface2);var _super2047=_createSuper(IfcBSplineSurfaceWithKnots);function IfcBSplineSurfaceWithKnots(expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect,UMultiplicities,VMultiplicities,UKnots,VKnots,KnotSpec){var _this2044;_classCallCheck(this,IfcBSplineSurfaceWithKnots);_this2044=_super2047.call(this,expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect);_this2044.UDegree=UDegree;_this2044.VDegree=VDegree;_this2044.ControlPointsList=ControlPointsList;_this2044.SurfaceForm=SurfaceForm;_this2044.UClosed=UClosed;_this2044.VClosed=VClosed;_this2044.SelfIntersect=SelfIntersect;_this2044.UMultiplicities=UMultiplicities;_this2044.VMultiplicities=VMultiplicities;_this2044.UKnots=UKnots;_this2044.VKnots=VKnots;_this2044.KnotSpec=KnotSpec;_this2044.type=167062518;return _this2044;}return _createClass(IfcBSplineSurfaceWithKnots);}(IfcBSplineSurface);IFC4X32.IfcBSplineSurfaceWithKnots=IfcBSplineSurfaceWithKnots;var IfcBlock=/*#__PURE__*/function(_IfcCsgPrimitive3D15){_inherits(IfcBlock,_IfcCsgPrimitive3D15);var _super2048=_createSuper(IfcBlock);function IfcBlock(expressID,Position,XLength,YLength,ZLength){var _this2045;_classCallCheck(this,IfcBlock);_this2045=_super2048.call(this,expressID,Position);_this2045.Position=Position;_this2045.XLength=XLength;_this2045.YLength=YLength;_this2045.ZLength=ZLength;_this2045.type=1334484129;return _this2045;}return _createClass(IfcBlock);}(IfcCsgPrimitive3D);IFC4X32.IfcBlock=IfcBlock;var IfcBooleanClippingResult=/*#__PURE__*/function(_IfcBooleanResult3){_inherits(IfcBooleanClippingResult,_IfcBooleanResult3);var _super2049=_createSuper(IfcBooleanClippingResult);function IfcBooleanClippingResult(expressID,Operator,FirstOperand,SecondOperand){var _this2046;_classCallCheck(this,IfcBooleanClippingResult);_this2046=_super2049.call(this,expressID,Operator,FirstOperand,SecondOperand);_this2046.Operator=Operator;_this2046.FirstOperand=FirstOperand;_this2046.SecondOperand=SecondOperand;_this2046.type=3649129432;return _this2046;}return _createClass(IfcBooleanClippingResult);}(IfcBooleanResult);IFC4X32.IfcBooleanClippingResult=IfcBooleanClippingResult;var IfcBoundedCurve=/*#__PURE__*/function(_IfcCurve19){_inherits(IfcBoundedCurve,_IfcCurve19);var _super2050=_createSuper(IfcBoundedCurve);function IfcBoundedCurve(expressID){var _this2047;_classCallCheck(this,IfcBoundedCurve);_this2047=_super2050.call(this,expressID);_this2047.type=1260505505;return _this2047;}return _createClass(IfcBoundedCurve);}(IfcCurve);IFC4X32.IfcBoundedCurve=IfcBoundedCurve;var IfcBuildingStorey=/*#__PURE__*/function(_IfcSpatialStructureE11){_inherits(IfcBuildingStorey,_IfcSpatialStructureE11);var _super2051=_createSuper(IfcBuildingStorey);function IfcBuildingStorey(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,Elevation){var _this2048;_classCallCheck(this,IfcBuildingStorey);_this2048=_super2051.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2048.GlobalId=GlobalId;_this2048.OwnerHistory=OwnerHistory;_this2048.Name=Name;_this2048.Description=Description;_this2048.ObjectType=ObjectType;_this2048.ObjectPlacement=ObjectPlacement;_this2048.Representation=Representation;_this2048.LongName=LongName;_this2048.CompositionType=CompositionType;_this2048.Elevation=Elevation;_this2048.type=3124254112;return _this2048;}return _createClass(IfcBuildingStorey);}(IfcSpatialStructureElement);IFC4X32.IfcBuildingStorey=IfcBuildingStorey;var IfcBuiltElementType=/*#__PURE__*/function(_IfcElementType18){_inherits(IfcBuiltElementType,_IfcElementType18);var _super2052=_createSuper(IfcBuiltElementType);function IfcBuiltElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2049;_classCallCheck(this,IfcBuiltElementType);_this2049=_super2052.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2049.GlobalId=GlobalId;_this2049.OwnerHistory=OwnerHistory;_this2049.Name=Name;_this2049.Description=Description;_this2049.ApplicableOccurrence=ApplicableOccurrence;_this2049.HasPropertySets=HasPropertySets;_this2049.RepresentationMaps=RepresentationMaps;_this2049.Tag=Tag;_this2049.ElementType=ElementType;_this2049.type=1626504194;return _this2049;}return _createClass(IfcBuiltElementType);}(IfcElementType);IFC4X32.IfcBuiltElementType=IfcBuiltElementType;var IfcChimneyType=/*#__PURE__*/function(_IfcBuiltElementType){_inherits(IfcChimneyType,_IfcBuiltElementType);var _super2053=_createSuper(IfcChimneyType);function IfcChimneyType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2050;_classCallCheck(this,IfcChimneyType);_this2050=_super2053.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2050.GlobalId=GlobalId;_this2050.OwnerHistory=OwnerHistory;_this2050.Name=Name;_this2050.Description=Description;_this2050.ApplicableOccurrence=ApplicableOccurrence;_this2050.HasPropertySets=HasPropertySets;_this2050.RepresentationMaps=RepresentationMaps;_this2050.Tag=Tag;_this2050.ElementType=ElementType;_this2050.PredefinedType=PredefinedType;_this2050.type=2197970202;return _this2050;}return _createClass(IfcChimneyType);}(IfcBuiltElementType);IFC4X32.IfcChimneyType=IfcChimneyType;var IfcCircleHollowProfileDef=/*#__PURE__*/function(_IfcCircleProfileDef3){_inherits(IfcCircleHollowProfileDef,_IfcCircleProfileDef3);var _super2054=_createSuper(IfcCircleHollowProfileDef);function IfcCircleHollowProfileDef(expressID,ProfileType,ProfileName,Position,Radius,WallThickness){var _this2051;_classCallCheck(this,IfcCircleHollowProfileDef);_this2051=_super2054.call(this,expressID,ProfileType,ProfileName,Position,Radius);_this2051.ProfileType=ProfileType;_this2051.ProfileName=ProfileName;_this2051.Position=Position;_this2051.Radius=Radius;_this2051.WallThickness=WallThickness;_this2051.type=2937912522;return _this2051;}return _createClass(IfcCircleHollowProfileDef);}(IfcCircleProfileDef);IFC4X32.IfcCircleHollowProfileDef=IfcCircleHollowProfileDef;var IfcCivilElementType=/*#__PURE__*/function(_IfcElementType19){_inherits(IfcCivilElementType,_IfcElementType19);var _super2055=_createSuper(IfcCivilElementType);function IfcCivilElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2052;_classCallCheck(this,IfcCivilElementType);_this2052=_super2055.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2052.GlobalId=GlobalId;_this2052.OwnerHistory=OwnerHistory;_this2052.Name=Name;_this2052.Description=Description;_this2052.ApplicableOccurrence=ApplicableOccurrence;_this2052.HasPropertySets=HasPropertySets;_this2052.RepresentationMaps=RepresentationMaps;_this2052.Tag=Tag;_this2052.ElementType=ElementType;_this2052.type=3893394355;return _this2052;}return _createClass(IfcCivilElementType);}(IfcElementType);IFC4X32.IfcCivilElementType=IfcCivilElementType;var IfcClothoid=/*#__PURE__*/function(_IfcSpiral2){_inherits(IfcClothoid,_IfcSpiral2);var _super2056=_createSuper(IfcClothoid);function IfcClothoid(expressID,Position,ClothoidConstant){var _this2053;_classCallCheck(this,IfcClothoid);_this2053=_super2056.call(this,expressID,Position);_this2053.Position=Position;_this2053.ClothoidConstant=ClothoidConstant;_this2053.type=3497074424;return _this2053;}return _createClass(IfcClothoid);}(IfcSpiral);IFC4X32.IfcClothoid=IfcClothoid;var IfcColumnType=/*#__PURE__*/function(_IfcBuiltElementType2){_inherits(IfcColumnType,_IfcBuiltElementType2);var _super2057=_createSuper(IfcColumnType);function IfcColumnType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2054;_classCallCheck(this,IfcColumnType);_this2054=_super2057.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2054.GlobalId=GlobalId;_this2054.OwnerHistory=OwnerHistory;_this2054.Name=Name;_this2054.Description=Description;_this2054.ApplicableOccurrence=ApplicableOccurrence;_this2054.HasPropertySets=HasPropertySets;_this2054.RepresentationMaps=RepresentationMaps;_this2054.Tag=Tag;_this2054.ElementType=ElementType;_this2054.PredefinedType=PredefinedType;_this2054.type=300633059;return _this2054;}return _createClass(IfcColumnType);}(IfcBuiltElementType);IFC4X32.IfcColumnType=IfcColumnType;var IfcComplexPropertyTemplate=/*#__PURE__*/function(_IfcPropertyTemplate4){_inherits(IfcComplexPropertyTemplate,_IfcPropertyTemplate4);var _super2058=_createSuper(IfcComplexPropertyTemplate);function IfcComplexPropertyTemplate(expressID,GlobalId,OwnerHistory,Name,Description,UsageName,TemplateType,HasPropertyTemplates){var _this2055;_classCallCheck(this,IfcComplexPropertyTemplate);_this2055=_super2058.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2055.GlobalId=GlobalId;_this2055.OwnerHistory=OwnerHistory;_this2055.Name=Name;_this2055.Description=Description;_this2055.UsageName=UsageName;_this2055.TemplateType=TemplateType;_this2055.HasPropertyTemplates=HasPropertyTemplates;_this2055.type=3875453745;return _this2055;}return _createClass(IfcComplexPropertyTemplate);}(IfcPropertyTemplate);IFC4X32.IfcComplexPropertyTemplate=IfcComplexPropertyTemplate;var IfcCompositeCurve=/*#__PURE__*/function(_IfcBoundedCurve10){_inherits(IfcCompositeCurve,_IfcBoundedCurve10);var _super2059=_createSuper(IfcCompositeCurve);function IfcCompositeCurve(expressID,Segments,SelfIntersect){var _this2056;_classCallCheck(this,IfcCompositeCurve);_this2056=_super2059.call(this,expressID);_this2056.Segments=Segments;_this2056.SelfIntersect=SelfIntersect;_this2056.type=3732776249;return _this2056;}return _createClass(IfcCompositeCurve);}(IfcBoundedCurve);IFC4X32.IfcCompositeCurve=IfcCompositeCurve;var IfcCompositeCurveOnSurface=/*#__PURE__*/function(_IfcCompositeCurve3){_inherits(IfcCompositeCurveOnSurface,_IfcCompositeCurve3);var _super2060=_createSuper(IfcCompositeCurveOnSurface);function IfcCompositeCurveOnSurface(expressID,Segments,SelfIntersect){var _this2057;_classCallCheck(this,IfcCompositeCurveOnSurface);_this2057=_super2060.call(this,expressID,Segments,SelfIntersect);_this2057.Segments=Segments;_this2057.SelfIntersect=SelfIntersect;_this2057.type=15328376;return _this2057;}return _createClass(IfcCompositeCurveOnSurface);}(IfcCompositeCurve);IFC4X32.IfcCompositeCurveOnSurface=IfcCompositeCurveOnSurface;var IfcConic=/*#__PURE__*/function(_IfcCurve20){_inherits(IfcConic,_IfcCurve20);var _super2061=_createSuper(IfcConic);function IfcConic(expressID,Position){var _this2058;_classCallCheck(this,IfcConic);_this2058=_super2061.call(this,expressID);_this2058.Position=Position;_this2058.type=2510884976;return _this2058;}return _createClass(IfcConic);}(IfcCurve);IFC4X32.IfcConic=IfcConic;var IfcConstructionEquipmentResourceType=/*#__PURE__*/function(_IfcConstructionResou22){_inherits(IfcConstructionEquipmentResourceType,_IfcConstructionResou22);var _super2062=_createSuper(IfcConstructionEquipmentResourceType);function IfcConstructionEquipmentResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this2059;_classCallCheck(this,IfcConstructionEquipmentResourceType);_this2059=_super2062.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this2059.GlobalId=GlobalId;_this2059.OwnerHistory=OwnerHistory;_this2059.Name=Name;_this2059.Description=Description;_this2059.ApplicableOccurrence=ApplicableOccurrence;_this2059.HasPropertySets=HasPropertySets;_this2059.Identification=Identification;_this2059.LongDescription=LongDescription;_this2059.ResourceType=ResourceType;_this2059.BaseCosts=BaseCosts;_this2059.BaseQuantity=BaseQuantity;_this2059.PredefinedType=PredefinedType;_this2059.type=2185764099;return _this2059;}return _createClass(IfcConstructionEquipmentResourceType);}(IfcConstructionResourceType);IFC4X32.IfcConstructionEquipmentResourceType=IfcConstructionEquipmentResourceType;var IfcConstructionMaterialResourceType=/*#__PURE__*/function(_IfcConstructionResou23){_inherits(IfcConstructionMaterialResourceType,_IfcConstructionResou23);var _super2063=_createSuper(IfcConstructionMaterialResourceType);function IfcConstructionMaterialResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this2060;_classCallCheck(this,IfcConstructionMaterialResourceType);_this2060=_super2063.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this2060.GlobalId=GlobalId;_this2060.OwnerHistory=OwnerHistory;_this2060.Name=Name;_this2060.Description=Description;_this2060.ApplicableOccurrence=ApplicableOccurrence;_this2060.HasPropertySets=HasPropertySets;_this2060.Identification=Identification;_this2060.LongDescription=LongDescription;_this2060.ResourceType=ResourceType;_this2060.BaseCosts=BaseCosts;_this2060.BaseQuantity=BaseQuantity;_this2060.PredefinedType=PredefinedType;_this2060.type=4105962743;return _this2060;}return _createClass(IfcConstructionMaterialResourceType);}(IfcConstructionResourceType);IFC4X32.IfcConstructionMaterialResourceType=IfcConstructionMaterialResourceType;var IfcConstructionProductResourceType=/*#__PURE__*/function(_IfcConstructionResou24){_inherits(IfcConstructionProductResourceType,_IfcConstructionResou24);var _super2064=_createSuper(IfcConstructionProductResourceType);function IfcConstructionProductResourceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity,PredefinedType){var _this2061;_classCallCheck(this,IfcConstructionProductResourceType);_this2061=_super2064.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,Identification,LongDescription,ResourceType,BaseCosts,BaseQuantity);_this2061.GlobalId=GlobalId;_this2061.OwnerHistory=OwnerHistory;_this2061.Name=Name;_this2061.Description=Description;_this2061.ApplicableOccurrence=ApplicableOccurrence;_this2061.HasPropertySets=HasPropertySets;_this2061.Identification=Identification;_this2061.LongDescription=LongDescription;_this2061.ResourceType=ResourceType;_this2061.BaseCosts=BaseCosts;_this2061.BaseQuantity=BaseQuantity;_this2061.PredefinedType=PredefinedType;_this2061.type=1525564444;return _this2061;}return _createClass(IfcConstructionProductResourceType);}(IfcConstructionResourceType);IFC4X32.IfcConstructionProductResourceType=IfcConstructionProductResourceType;var IfcConstructionResource=/*#__PURE__*/function(_IfcResource3){_inherits(IfcConstructionResource,_IfcResource3);var _super2065=_createSuper(IfcConstructionResource);function IfcConstructionResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity){var _this2062;_classCallCheck(this,IfcConstructionResource);_this2062=_super2065.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this2062.GlobalId=GlobalId;_this2062.OwnerHistory=OwnerHistory;_this2062.Name=Name;_this2062.Description=Description;_this2062.ObjectType=ObjectType;_this2062.Identification=Identification;_this2062.LongDescription=LongDescription;_this2062.Usage=Usage;_this2062.BaseCosts=BaseCosts;_this2062.BaseQuantity=BaseQuantity;_this2062.type=2559216714;return _this2062;}return _createClass(IfcConstructionResource);}(IfcResource);IFC4X32.IfcConstructionResource=IfcConstructionResource;var IfcControl=/*#__PURE__*/function(_IfcObject18){_inherits(IfcControl,_IfcObject18);var _super2066=_createSuper(IfcControl);function IfcControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification){var _this2063;_classCallCheck(this,IfcControl);_this2063=_super2066.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2063.GlobalId=GlobalId;_this2063.OwnerHistory=OwnerHistory;_this2063.Name=Name;_this2063.Description=Description;_this2063.ObjectType=ObjectType;_this2063.Identification=Identification;_this2063.type=3293443760;return _this2063;}return _createClass(IfcControl);}(IfcObject);IFC4X32.IfcControl=IfcControl;var IfcCosineSpiral=/*#__PURE__*/function(_IfcSpiral3){_inherits(IfcCosineSpiral,_IfcSpiral3);var _super2067=_createSuper(IfcCosineSpiral);function IfcCosineSpiral(expressID,Position,CosineTerm,ConstantTerm){var _this2064;_classCallCheck(this,IfcCosineSpiral);_this2064=_super2067.call(this,expressID,Position);_this2064.Position=Position;_this2064.CosineTerm=CosineTerm;_this2064.ConstantTerm=ConstantTerm;_this2064.type=2000195564;return _this2064;}return _createClass(IfcCosineSpiral);}(IfcSpiral);IFC4X32.IfcCosineSpiral=IfcCosineSpiral;var IfcCostItem=/*#__PURE__*/function(_IfcControl24){_inherits(IfcCostItem,_IfcControl24);var _super2068=_createSuper(IfcCostItem);function IfcCostItem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,CostValues,CostQuantities){var _this2065;_classCallCheck(this,IfcCostItem);_this2065=_super2068.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2065.GlobalId=GlobalId;_this2065.OwnerHistory=OwnerHistory;_this2065.Name=Name;_this2065.Description=Description;_this2065.ObjectType=ObjectType;_this2065.Identification=Identification;_this2065.PredefinedType=PredefinedType;_this2065.CostValues=CostValues;_this2065.CostQuantities=CostQuantities;_this2065.type=3895139033;return _this2065;}return _createClass(IfcCostItem);}(IfcControl);IFC4X32.IfcCostItem=IfcCostItem;var IfcCostSchedule=/*#__PURE__*/function(_IfcControl25){_inherits(IfcCostSchedule,_IfcControl25);var _super2069=_createSuper(IfcCostSchedule);function IfcCostSchedule(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,SubmittedOn,UpdateDate){var _this2066;_classCallCheck(this,IfcCostSchedule);_this2066=_super2069.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2066.GlobalId=GlobalId;_this2066.OwnerHistory=OwnerHistory;_this2066.Name=Name;_this2066.Description=Description;_this2066.ObjectType=ObjectType;_this2066.Identification=Identification;_this2066.PredefinedType=PredefinedType;_this2066.Status=Status;_this2066.SubmittedOn=SubmittedOn;_this2066.UpdateDate=UpdateDate;_this2066.type=1419761937;return _this2066;}return _createClass(IfcCostSchedule);}(IfcControl);IFC4X32.IfcCostSchedule=IfcCostSchedule;var IfcCourseType=/*#__PURE__*/function(_IfcBuiltElementType3){_inherits(IfcCourseType,_IfcBuiltElementType3);var _super2070=_createSuper(IfcCourseType);function IfcCourseType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2067;_classCallCheck(this,IfcCourseType);_this2067=_super2070.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2067.GlobalId=GlobalId;_this2067.OwnerHistory=OwnerHistory;_this2067.Name=Name;_this2067.Description=Description;_this2067.ApplicableOccurrence=ApplicableOccurrence;_this2067.HasPropertySets=HasPropertySets;_this2067.RepresentationMaps=RepresentationMaps;_this2067.Tag=Tag;_this2067.ElementType=ElementType;_this2067.PredefinedType=PredefinedType;_this2067.type=4189326743;return _this2067;}return _createClass(IfcCourseType);}(IfcBuiltElementType);IFC4X32.IfcCourseType=IfcCourseType;var IfcCoveringType=/*#__PURE__*/function(_IfcBuiltElementType4){_inherits(IfcCoveringType,_IfcBuiltElementType4);var _super2071=_createSuper(IfcCoveringType);function IfcCoveringType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2068;_classCallCheck(this,IfcCoveringType);_this2068=_super2071.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2068.GlobalId=GlobalId;_this2068.OwnerHistory=OwnerHistory;_this2068.Name=Name;_this2068.Description=Description;_this2068.ApplicableOccurrence=ApplicableOccurrence;_this2068.HasPropertySets=HasPropertySets;_this2068.RepresentationMaps=RepresentationMaps;_this2068.Tag=Tag;_this2068.ElementType=ElementType;_this2068.PredefinedType=PredefinedType;_this2068.type=1916426348;return _this2068;}return _createClass(IfcCoveringType);}(IfcBuiltElementType);IFC4X32.IfcCoveringType=IfcCoveringType;var IfcCrewResource=/*#__PURE__*/function(_IfcConstructionResou25){_inherits(IfcCrewResource,_IfcConstructionResou25);var _super2072=_createSuper(IfcCrewResource);function IfcCrewResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this2069;_classCallCheck(this,IfcCrewResource);_this2069=_super2072.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this2069.GlobalId=GlobalId;_this2069.OwnerHistory=OwnerHistory;_this2069.Name=Name;_this2069.Description=Description;_this2069.ObjectType=ObjectType;_this2069.Identification=Identification;_this2069.LongDescription=LongDescription;_this2069.Usage=Usage;_this2069.BaseCosts=BaseCosts;_this2069.BaseQuantity=BaseQuantity;_this2069.PredefinedType=PredefinedType;_this2069.type=3295246426;return _this2069;}return _createClass(IfcCrewResource);}(IfcConstructionResource);IFC4X32.IfcCrewResource=IfcCrewResource;var IfcCurtainWallType=/*#__PURE__*/function(_IfcBuiltElementType5){_inherits(IfcCurtainWallType,_IfcBuiltElementType5);var _super2073=_createSuper(IfcCurtainWallType);function IfcCurtainWallType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2070;_classCallCheck(this,IfcCurtainWallType);_this2070=_super2073.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2070.GlobalId=GlobalId;_this2070.OwnerHistory=OwnerHistory;_this2070.Name=Name;_this2070.Description=Description;_this2070.ApplicableOccurrence=ApplicableOccurrence;_this2070.HasPropertySets=HasPropertySets;_this2070.RepresentationMaps=RepresentationMaps;_this2070.Tag=Tag;_this2070.ElementType=ElementType;_this2070.PredefinedType=PredefinedType;_this2070.type=1457835157;return _this2070;}return _createClass(IfcCurtainWallType);}(IfcBuiltElementType);IFC4X32.IfcCurtainWallType=IfcCurtainWallType;var IfcCylindricalSurface=/*#__PURE__*/function(_IfcElementarySurface9){_inherits(IfcCylindricalSurface,_IfcElementarySurface9);var _super2074=_createSuper(IfcCylindricalSurface);function IfcCylindricalSurface(expressID,Position,Radius){var _this2071;_classCallCheck(this,IfcCylindricalSurface);_this2071=_super2074.call(this,expressID,Position);_this2071.Position=Position;_this2071.Radius=Radius;_this2071.type=1213902940;return _this2071;}return _createClass(IfcCylindricalSurface);}(IfcElementarySurface);IFC4X32.IfcCylindricalSurface=IfcCylindricalSurface;var IfcDeepFoundationType=/*#__PURE__*/function(_IfcBuiltElementType6){_inherits(IfcDeepFoundationType,_IfcBuiltElementType6);var _super2075=_createSuper(IfcDeepFoundationType);function IfcDeepFoundationType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2072;_classCallCheck(this,IfcDeepFoundationType);_this2072=_super2075.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2072.GlobalId=GlobalId;_this2072.OwnerHistory=OwnerHistory;_this2072.Name=Name;_this2072.Description=Description;_this2072.ApplicableOccurrence=ApplicableOccurrence;_this2072.HasPropertySets=HasPropertySets;_this2072.RepresentationMaps=RepresentationMaps;_this2072.Tag=Tag;_this2072.ElementType=ElementType;_this2072.type=1306400036;return _this2072;}return _createClass(IfcDeepFoundationType);}(IfcBuiltElementType);IFC4X32.IfcDeepFoundationType=IfcDeepFoundationType;var IfcDirectrixDerivedReferenceSweptAreaSolid=/*#__PURE__*/function(_IfcFixedReferenceSwe){_inherits(IfcDirectrixDerivedReferenceSweptAreaSolid,_IfcFixedReferenceSwe);var _super2076=_createSuper(IfcDirectrixDerivedReferenceSweptAreaSolid);function IfcDirectrixDerivedReferenceSweptAreaSolid(expressID,SweptArea,Position,Directrix,StartParam,EndParam,FixedReference){var _this2073;_classCallCheck(this,IfcDirectrixDerivedReferenceSweptAreaSolid);_this2073=_super2076.call(this,expressID,SweptArea,Position,Directrix,StartParam,EndParam,FixedReference);_this2073.SweptArea=SweptArea;_this2073.Position=Position;_this2073.Directrix=Directrix;_this2073.StartParam=StartParam;_this2073.EndParam=EndParam;_this2073.FixedReference=FixedReference;_this2073.type=4234616927;return _this2073;}return _createClass(IfcDirectrixDerivedReferenceSweptAreaSolid);}(IfcFixedReferenceSweptAreaSolid);IFC4X32.IfcDirectrixDerivedReferenceSweptAreaSolid=IfcDirectrixDerivedReferenceSweptAreaSolid;var IfcDistributionElementType=/*#__PURE__*/function(_IfcElementType20){_inherits(IfcDistributionElementType,_IfcElementType20);var _super2077=_createSuper(IfcDistributionElementType);function IfcDistributionElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2074;_classCallCheck(this,IfcDistributionElementType);_this2074=_super2077.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2074.GlobalId=GlobalId;_this2074.OwnerHistory=OwnerHistory;_this2074.Name=Name;_this2074.Description=Description;_this2074.ApplicableOccurrence=ApplicableOccurrence;_this2074.HasPropertySets=HasPropertySets;_this2074.RepresentationMaps=RepresentationMaps;_this2074.Tag=Tag;_this2074.ElementType=ElementType;_this2074.type=3256556792;return _this2074;}return _createClass(IfcDistributionElementType);}(IfcElementType);IFC4X32.IfcDistributionElementType=IfcDistributionElementType;var IfcDistributionFlowElementType=/*#__PURE__*/function(_IfcDistributionEleme9){_inherits(IfcDistributionFlowElementType,_IfcDistributionEleme9);var _super2078=_createSuper(IfcDistributionFlowElementType);function IfcDistributionFlowElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2075;_classCallCheck(this,IfcDistributionFlowElementType);_this2075=_super2078.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2075.GlobalId=GlobalId;_this2075.OwnerHistory=OwnerHistory;_this2075.Name=Name;_this2075.Description=Description;_this2075.ApplicableOccurrence=ApplicableOccurrence;_this2075.HasPropertySets=HasPropertySets;_this2075.RepresentationMaps=RepresentationMaps;_this2075.Tag=Tag;_this2075.ElementType=ElementType;_this2075.type=3849074793;return _this2075;}return _createClass(IfcDistributionFlowElementType);}(IfcDistributionElementType);IFC4X32.IfcDistributionFlowElementType=IfcDistributionFlowElementType;var IfcDoorLiningProperties=/*#__PURE__*/function(_IfcPreDefinedPropert16){_inherits(IfcDoorLiningProperties,_IfcPreDefinedPropert16);var _super2079=_createSuper(IfcDoorLiningProperties);function IfcDoorLiningProperties(expressID,GlobalId,OwnerHistory,Name,Description,LiningDepth,LiningThickness,ThresholdDepth,ThresholdThickness,TransomThickness,TransomOffset,LiningOffset,ThresholdOffset,CasingThickness,CasingDepth,ShapeAspectStyle,LiningToPanelOffsetX,LiningToPanelOffsetY){var _this2076;_classCallCheck(this,IfcDoorLiningProperties);_this2076=_super2079.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2076.GlobalId=GlobalId;_this2076.OwnerHistory=OwnerHistory;_this2076.Name=Name;_this2076.Description=Description;_this2076.LiningDepth=LiningDepth;_this2076.LiningThickness=LiningThickness;_this2076.ThresholdDepth=ThresholdDepth;_this2076.ThresholdThickness=ThresholdThickness;_this2076.TransomThickness=TransomThickness;_this2076.TransomOffset=TransomOffset;_this2076.LiningOffset=LiningOffset;_this2076.ThresholdOffset=ThresholdOffset;_this2076.CasingThickness=CasingThickness;_this2076.CasingDepth=CasingDepth;_this2076.ShapeAspectStyle=ShapeAspectStyle;_this2076.LiningToPanelOffsetX=LiningToPanelOffsetX;_this2076.LiningToPanelOffsetY=LiningToPanelOffsetY;_this2076.type=2963535650;return _this2076;}return _createClass(IfcDoorLiningProperties);}(IfcPreDefinedPropertySet);IFC4X32.IfcDoorLiningProperties=IfcDoorLiningProperties;var IfcDoorPanelProperties=/*#__PURE__*/function(_IfcPreDefinedPropert17){_inherits(IfcDoorPanelProperties,_IfcPreDefinedPropert17);var _super2080=_createSuper(IfcDoorPanelProperties);function IfcDoorPanelProperties(expressID,GlobalId,OwnerHistory,Name,Description,PanelDepth,PanelOperation,PanelWidth,PanelPosition,ShapeAspectStyle){var _this2077;_classCallCheck(this,IfcDoorPanelProperties);_this2077=_super2080.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2077.GlobalId=GlobalId;_this2077.OwnerHistory=OwnerHistory;_this2077.Name=Name;_this2077.Description=Description;_this2077.PanelDepth=PanelDepth;_this2077.PanelOperation=PanelOperation;_this2077.PanelWidth=PanelWidth;_this2077.PanelPosition=PanelPosition;_this2077.ShapeAspectStyle=ShapeAspectStyle;_this2077.type=1714330368;return _this2077;}return _createClass(IfcDoorPanelProperties);}(IfcPreDefinedPropertySet);IFC4X32.IfcDoorPanelProperties=IfcDoorPanelProperties;var IfcDoorType=/*#__PURE__*/function(_IfcBuiltElementType7){_inherits(IfcDoorType,_IfcBuiltElementType7);var _super2081=_createSuper(IfcDoorType);function IfcDoorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,OperationType,ParameterTakesPrecedence,UserDefinedOperationType){var _this2078;_classCallCheck(this,IfcDoorType);_this2078=_super2081.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2078.GlobalId=GlobalId;_this2078.OwnerHistory=OwnerHistory;_this2078.Name=Name;_this2078.Description=Description;_this2078.ApplicableOccurrence=ApplicableOccurrence;_this2078.HasPropertySets=HasPropertySets;_this2078.RepresentationMaps=RepresentationMaps;_this2078.Tag=Tag;_this2078.ElementType=ElementType;_this2078.PredefinedType=PredefinedType;_this2078.OperationType=OperationType;_this2078.ParameterTakesPrecedence=ParameterTakesPrecedence;_this2078.UserDefinedOperationType=UserDefinedOperationType;_this2078.type=2323601079;return _this2078;}return _createClass(IfcDoorType);}(IfcBuiltElementType);IFC4X32.IfcDoorType=IfcDoorType;var IfcDraughtingPreDefinedColour=/*#__PURE__*/function(_IfcPreDefinedColour3){_inherits(IfcDraughtingPreDefinedColour,_IfcPreDefinedColour3);var _super2082=_createSuper(IfcDraughtingPreDefinedColour);function IfcDraughtingPreDefinedColour(expressID,Name){var _this2079;_classCallCheck(this,IfcDraughtingPreDefinedColour);_this2079=_super2082.call(this,expressID,Name);_this2079.Name=Name;_this2079.type=445594917;return _this2079;}return _createClass(IfcDraughtingPreDefinedColour);}(IfcPreDefinedColour);IFC4X32.IfcDraughtingPreDefinedColour=IfcDraughtingPreDefinedColour;var IfcDraughtingPreDefinedCurveFont=/*#__PURE__*/function(_IfcPreDefinedCurveFo3){_inherits(IfcDraughtingPreDefinedCurveFont,_IfcPreDefinedCurveFo3);var _super2083=_createSuper(IfcDraughtingPreDefinedCurveFont);function IfcDraughtingPreDefinedCurveFont(expressID,Name){var _this2080;_classCallCheck(this,IfcDraughtingPreDefinedCurveFont);_this2080=_super2083.call(this,expressID,Name);_this2080.Name=Name;_this2080.type=4006246654;return _this2080;}return _createClass(IfcDraughtingPreDefinedCurveFont);}(IfcPreDefinedCurveFont);IFC4X32.IfcDraughtingPreDefinedCurveFont=IfcDraughtingPreDefinedCurveFont;var IfcElement=/*#__PURE__*/function(_IfcProduct21){_inherits(IfcElement,_IfcProduct21);var _super2084=_createSuper(IfcElement);function IfcElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2081;_classCallCheck(this,IfcElement);_this2081=_super2084.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2081.GlobalId=GlobalId;_this2081.OwnerHistory=OwnerHistory;_this2081.Name=Name;_this2081.Description=Description;_this2081.ObjectType=ObjectType;_this2081.ObjectPlacement=ObjectPlacement;_this2081.Representation=Representation;_this2081.Tag=Tag;_this2081.type=1758889154;return _this2081;}return _createClass(IfcElement);}(IfcProduct);IFC4X32.IfcElement=IfcElement;var IfcElementAssembly=/*#__PURE__*/function(_IfcElement21){_inherits(IfcElementAssembly,_IfcElement21);var _super2085=_createSuper(IfcElementAssembly);function IfcElementAssembly(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,AssemblyPlace,PredefinedType){var _this2082;_classCallCheck(this,IfcElementAssembly);_this2082=_super2085.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2082.GlobalId=GlobalId;_this2082.OwnerHistory=OwnerHistory;_this2082.Name=Name;_this2082.Description=Description;_this2082.ObjectType=ObjectType;_this2082.ObjectPlacement=ObjectPlacement;_this2082.Representation=Representation;_this2082.Tag=Tag;_this2082.AssemblyPlace=AssemblyPlace;_this2082.PredefinedType=PredefinedType;_this2082.type=4123344466;return _this2082;}return _createClass(IfcElementAssembly);}(IfcElement);IFC4X32.IfcElementAssembly=IfcElementAssembly;var IfcElementAssemblyType=/*#__PURE__*/function(_IfcElementType21){_inherits(IfcElementAssemblyType,_IfcElementType21);var _super2086=_createSuper(IfcElementAssemblyType);function IfcElementAssemblyType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2083;_classCallCheck(this,IfcElementAssemblyType);_this2083=_super2086.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2083.GlobalId=GlobalId;_this2083.OwnerHistory=OwnerHistory;_this2083.Name=Name;_this2083.Description=Description;_this2083.ApplicableOccurrence=ApplicableOccurrence;_this2083.HasPropertySets=HasPropertySets;_this2083.RepresentationMaps=RepresentationMaps;_this2083.Tag=Tag;_this2083.ElementType=ElementType;_this2083.PredefinedType=PredefinedType;_this2083.type=2397081782;return _this2083;}return _createClass(IfcElementAssemblyType);}(IfcElementType);IFC4X32.IfcElementAssemblyType=IfcElementAssemblyType;var IfcElementComponent=/*#__PURE__*/function(_IfcElement22){_inherits(IfcElementComponent,_IfcElement22);var _super2087=_createSuper(IfcElementComponent);function IfcElementComponent(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2084;_classCallCheck(this,IfcElementComponent);_this2084=_super2087.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2084.GlobalId=GlobalId;_this2084.OwnerHistory=OwnerHistory;_this2084.Name=Name;_this2084.Description=Description;_this2084.ObjectType=ObjectType;_this2084.ObjectPlacement=ObjectPlacement;_this2084.Representation=Representation;_this2084.Tag=Tag;_this2084.type=1623761950;return _this2084;}return _createClass(IfcElementComponent);}(IfcElement);IFC4X32.IfcElementComponent=IfcElementComponent;var IfcElementComponentType=/*#__PURE__*/function(_IfcElementType22){_inherits(IfcElementComponentType,_IfcElementType22);var _super2088=_createSuper(IfcElementComponentType);function IfcElementComponentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2085;_classCallCheck(this,IfcElementComponentType);_this2085=_super2088.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2085.GlobalId=GlobalId;_this2085.OwnerHistory=OwnerHistory;_this2085.Name=Name;_this2085.Description=Description;_this2085.ApplicableOccurrence=ApplicableOccurrence;_this2085.HasPropertySets=HasPropertySets;_this2085.RepresentationMaps=RepresentationMaps;_this2085.Tag=Tag;_this2085.ElementType=ElementType;_this2085.type=2590856083;return _this2085;}return _createClass(IfcElementComponentType);}(IfcElementType);IFC4X32.IfcElementComponentType=IfcElementComponentType;var IfcEllipse=/*#__PURE__*/function(_IfcConic5){_inherits(IfcEllipse,_IfcConic5);var _super2089=_createSuper(IfcEllipse);function IfcEllipse(expressID,Position,SemiAxis1,SemiAxis2){var _this2086;_classCallCheck(this,IfcEllipse);_this2086=_super2089.call(this,expressID,Position);_this2086.Position=Position;_this2086.SemiAxis1=SemiAxis1;_this2086.SemiAxis2=SemiAxis2;_this2086.type=1704287377;return _this2086;}return _createClass(IfcEllipse);}(IfcConic);IFC4X32.IfcEllipse=IfcEllipse;var IfcEnergyConversionDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE37){_inherits(IfcEnergyConversionDeviceType,_IfcDistributionFlowE37);var _super2090=_createSuper(IfcEnergyConversionDeviceType);function IfcEnergyConversionDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2087;_classCallCheck(this,IfcEnergyConversionDeviceType);_this2087=_super2090.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2087.GlobalId=GlobalId;_this2087.OwnerHistory=OwnerHistory;_this2087.Name=Name;_this2087.Description=Description;_this2087.ApplicableOccurrence=ApplicableOccurrence;_this2087.HasPropertySets=HasPropertySets;_this2087.RepresentationMaps=RepresentationMaps;_this2087.Tag=Tag;_this2087.ElementType=ElementType;_this2087.type=2107101300;return _this2087;}return _createClass(IfcEnergyConversionDeviceType);}(IfcDistributionFlowElementType);IFC4X32.IfcEnergyConversionDeviceType=IfcEnergyConversionDeviceType;var IfcEngineType=/*#__PURE__*/function(_IfcEnergyConversionD59){_inherits(IfcEngineType,_IfcEnergyConversionD59);var _super2091=_createSuper(IfcEngineType);function IfcEngineType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2088;_classCallCheck(this,IfcEngineType);_this2088=_super2091.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2088.GlobalId=GlobalId;_this2088.OwnerHistory=OwnerHistory;_this2088.Name=Name;_this2088.Description=Description;_this2088.ApplicableOccurrence=ApplicableOccurrence;_this2088.HasPropertySets=HasPropertySets;_this2088.RepresentationMaps=RepresentationMaps;_this2088.Tag=Tag;_this2088.ElementType=ElementType;_this2088.PredefinedType=PredefinedType;_this2088.type=132023988;return _this2088;}return _createClass(IfcEngineType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcEngineType=IfcEngineType;var IfcEvaporativeCoolerType=/*#__PURE__*/function(_IfcEnergyConversionD60){_inherits(IfcEvaporativeCoolerType,_IfcEnergyConversionD60);var _super2092=_createSuper(IfcEvaporativeCoolerType);function IfcEvaporativeCoolerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2089;_classCallCheck(this,IfcEvaporativeCoolerType);_this2089=_super2092.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2089.GlobalId=GlobalId;_this2089.OwnerHistory=OwnerHistory;_this2089.Name=Name;_this2089.Description=Description;_this2089.ApplicableOccurrence=ApplicableOccurrence;_this2089.HasPropertySets=HasPropertySets;_this2089.RepresentationMaps=RepresentationMaps;_this2089.Tag=Tag;_this2089.ElementType=ElementType;_this2089.PredefinedType=PredefinedType;_this2089.type=3174744832;return _this2089;}return _createClass(IfcEvaporativeCoolerType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcEvaporativeCoolerType=IfcEvaporativeCoolerType;var IfcEvaporatorType=/*#__PURE__*/function(_IfcEnergyConversionD61){_inherits(IfcEvaporatorType,_IfcEnergyConversionD61);var _super2093=_createSuper(IfcEvaporatorType);function IfcEvaporatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2090;_classCallCheck(this,IfcEvaporatorType);_this2090=_super2093.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2090.GlobalId=GlobalId;_this2090.OwnerHistory=OwnerHistory;_this2090.Name=Name;_this2090.Description=Description;_this2090.ApplicableOccurrence=ApplicableOccurrence;_this2090.HasPropertySets=HasPropertySets;_this2090.RepresentationMaps=RepresentationMaps;_this2090.Tag=Tag;_this2090.ElementType=ElementType;_this2090.PredefinedType=PredefinedType;_this2090.type=3390157468;return _this2090;}return _createClass(IfcEvaporatorType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcEvaporatorType=IfcEvaporatorType;var IfcEvent=/*#__PURE__*/function(_IfcProcess7){_inherits(IfcEvent,_IfcProcess7);var _super2094=_createSuper(IfcEvent);function IfcEvent(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,PredefinedType,EventTriggerType,UserDefinedEventTriggerType,EventOccurenceTime){var _this2091;_classCallCheck(this,IfcEvent);_this2091=_super2094.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this2091.GlobalId=GlobalId;_this2091.OwnerHistory=OwnerHistory;_this2091.Name=Name;_this2091.Description=Description;_this2091.ObjectType=ObjectType;_this2091.Identification=Identification;_this2091.LongDescription=LongDescription;_this2091.PredefinedType=PredefinedType;_this2091.EventTriggerType=EventTriggerType;_this2091.UserDefinedEventTriggerType=UserDefinedEventTriggerType;_this2091.EventOccurenceTime=EventOccurenceTime;_this2091.type=4148101412;return _this2091;}return _createClass(IfcEvent);}(IfcProcess);IFC4X32.IfcEvent=IfcEvent;var IfcExternalSpatialStructureElement=/*#__PURE__*/function(_IfcSpatialElement6){_inherits(IfcExternalSpatialStructureElement,_IfcSpatialElement6);var _super2095=_createSuper(IfcExternalSpatialStructureElement);function IfcExternalSpatialStructureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName){var _this2092;_classCallCheck(this,IfcExternalSpatialStructureElement);_this2092=_super2095.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this2092.GlobalId=GlobalId;_this2092.OwnerHistory=OwnerHistory;_this2092.Name=Name;_this2092.Description=Description;_this2092.ObjectType=ObjectType;_this2092.ObjectPlacement=ObjectPlacement;_this2092.Representation=Representation;_this2092.LongName=LongName;_this2092.type=2853485674;return _this2092;}return _createClass(IfcExternalSpatialStructureElement);}(IfcSpatialElement);IFC4X32.IfcExternalSpatialStructureElement=IfcExternalSpatialStructureElement;var IfcFacetedBrep=/*#__PURE__*/function(_IfcManifoldSolidBrep6){_inherits(IfcFacetedBrep,_IfcManifoldSolidBrep6);var _super2096=_createSuper(IfcFacetedBrep);function IfcFacetedBrep(expressID,Outer){var _this2093;_classCallCheck(this,IfcFacetedBrep);_this2093=_super2096.call(this,expressID,Outer);_this2093.Outer=Outer;_this2093.type=807026263;return _this2093;}return _createClass(IfcFacetedBrep);}(IfcManifoldSolidBrep);IFC4X32.IfcFacetedBrep=IfcFacetedBrep;var IfcFacetedBrepWithVoids=/*#__PURE__*/function(_IfcFacetedBrep2){_inherits(IfcFacetedBrepWithVoids,_IfcFacetedBrep2);var _super2097=_createSuper(IfcFacetedBrepWithVoids);function IfcFacetedBrepWithVoids(expressID,Outer,Voids){var _this2094;_classCallCheck(this,IfcFacetedBrepWithVoids);_this2094=_super2097.call(this,expressID,Outer);_this2094.Outer=Outer;_this2094.Voids=Voids;_this2094.type=3737207727;return _this2094;}return _createClass(IfcFacetedBrepWithVoids);}(IfcFacetedBrep);IFC4X32.IfcFacetedBrepWithVoids=IfcFacetedBrepWithVoids;var IfcFacility=/*#__PURE__*/function(_IfcSpatialStructureE12){_inherits(IfcFacility,_IfcSpatialStructureE12);var _super2098=_createSuper(IfcFacility);function IfcFacility(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType){var _this2095;_classCallCheck(this,IfcFacility);_this2095=_super2098.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2095.GlobalId=GlobalId;_this2095.OwnerHistory=OwnerHistory;_this2095.Name=Name;_this2095.Description=Description;_this2095.ObjectType=ObjectType;_this2095.ObjectPlacement=ObjectPlacement;_this2095.Representation=Representation;_this2095.LongName=LongName;_this2095.CompositionType=CompositionType;_this2095.type=24185140;return _this2095;}return _createClass(IfcFacility);}(IfcSpatialStructureElement);IFC4X32.IfcFacility=IfcFacility;var IfcFacilityPart=/*#__PURE__*/function(_IfcSpatialStructureE13){_inherits(IfcFacilityPart,_IfcSpatialStructureE13);var _super2099=_createSuper(IfcFacilityPart);function IfcFacilityPart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType){var _this2096;_classCallCheck(this,IfcFacilityPart);_this2096=_super2099.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2096.GlobalId=GlobalId;_this2096.OwnerHistory=OwnerHistory;_this2096.Name=Name;_this2096.Description=Description;_this2096.ObjectType=ObjectType;_this2096.ObjectPlacement=ObjectPlacement;_this2096.Representation=Representation;_this2096.LongName=LongName;_this2096.CompositionType=CompositionType;_this2096.UsageType=UsageType;_this2096.type=1310830890;return _this2096;}return _createClass(IfcFacilityPart);}(IfcSpatialStructureElement);IFC4X32.IfcFacilityPart=IfcFacilityPart;var IfcFacilityPartCommon=/*#__PURE__*/function(_IfcFacilityPart){_inherits(IfcFacilityPartCommon,_IfcFacilityPart);var _super2100=_createSuper(IfcFacilityPartCommon);function IfcFacilityPartCommon(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType,PredefinedType){var _this2097;_classCallCheck(this,IfcFacilityPartCommon);_this2097=_super2100.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType);_this2097.GlobalId=GlobalId;_this2097.OwnerHistory=OwnerHistory;_this2097.Name=Name;_this2097.Description=Description;_this2097.ObjectType=ObjectType;_this2097.ObjectPlacement=ObjectPlacement;_this2097.Representation=Representation;_this2097.LongName=LongName;_this2097.CompositionType=CompositionType;_this2097.UsageType=UsageType;_this2097.PredefinedType=PredefinedType;_this2097.type=4228831410;return _this2097;}return _createClass(IfcFacilityPartCommon);}(IfcFacilityPart);IFC4X32.IfcFacilityPartCommon=IfcFacilityPartCommon;var IfcFastener=/*#__PURE__*/function(_IfcElementComponent9){_inherits(IfcFastener,_IfcElementComponent9);var _super2101=_createSuper(IfcFastener);function IfcFastener(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2098;_classCallCheck(this,IfcFastener);_this2098=_super2101.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2098.GlobalId=GlobalId;_this2098.OwnerHistory=OwnerHistory;_this2098.Name=Name;_this2098.Description=Description;_this2098.ObjectType=ObjectType;_this2098.ObjectPlacement=ObjectPlacement;_this2098.Representation=Representation;_this2098.Tag=Tag;_this2098.PredefinedType=PredefinedType;_this2098.type=647756555;return _this2098;}return _createClass(IfcFastener);}(IfcElementComponent);IFC4X32.IfcFastener=IfcFastener;var IfcFastenerType=/*#__PURE__*/function(_IfcElementComponentT9){_inherits(IfcFastenerType,_IfcElementComponentT9);var _super2102=_createSuper(IfcFastenerType);function IfcFastenerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2099;_classCallCheck(this,IfcFastenerType);_this2099=_super2102.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2099.GlobalId=GlobalId;_this2099.OwnerHistory=OwnerHistory;_this2099.Name=Name;_this2099.Description=Description;_this2099.ApplicableOccurrence=ApplicableOccurrence;_this2099.HasPropertySets=HasPropertySets;_this2099.RepresentationMaps=RepresentationMaps;_this2099.Tag=Tag;_this2099.ElementType=ElementType;_this2099.PredefinedType=PredefinedType;_this2099.type=2489546625;return _this2099;}return _createClass(IfcFastenerType);}(IfcElementComponentType);IFC4X32.IfcFastenerType=IfcFastenerType;var IfcFeatureElement=/*#__PURE__*/function(_IfcElement23){_inherits(IfcFeatureElement,_IfcElement23);var _super2103=_createSuper(IfcFeatureElement);function IfcFeatureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2100;_classCallCheck(this,IfcFeatureElement);_this2100=_super2103.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2100.GlobalId=GlobalId;_this2100.OwnerHistory=OwnerHistory;_this2100.Name=Name;_this2100.Description=Description;_this2100.ObjectType=ObjectType;_this2100.ObjectPlacement=ObjectPlacement;_this2100.Representation=Representation;_this2100.Tag=Tag;_this2100.type=2827207264;return _this2100;}return _createClass(IfcFeatureElement);}(IfcElement);IFC4X32.IfcFeatureElement=IfcFeatureElement;var IfcFeatureElementAddition=/*#__PURE__*/function(_IfcFeatureElement6){_inherits(IfcFeatureElementAddition,_IfcFeatureElement6);var _super2104=_createSuper(IfcFeatureElementAddition);function IfcFeatureElementAddition(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2101;_classCallCheck(this,IfcFeatureElementAddition);_this2101=_super2104.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2101.GlobalId=GlobalId;_this2101.OwnerHistory=OwnerHistory;_this2101.Name=Name;_this2101.Description=Description;_this2101.ObjectType=ObjectType;_this2101.ObjectPlacement=ObjectPlacement;_this2101.Representation=Representation;_this2101.Tag=Tag;_this2101.type=2143335405;return _this2101;}return _createClass(IfcFeatureElementAddition);}(IfcFeatureElement);IFC4X32.IfcFeatureElementAddition=IfcFeatureElementAddition;var IfcFeatureElementSubtraction=/*#__PURE__*/function(_IfcFeatureElement7){_inherits(IfcFeatureElementSubtraction,_IfcFeatureElement7);var _super2105=_createSuper(IfcFeatureElementSubtraction);function IfcFeatureElementSubtraction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2102;_classCallCheck(this,IfcFeatureElementSubtraction);_this2102=_super2105.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2102.GlobalId=GlobalId;_this2102.OwnerHistory=OwnerHistory;_this2102.Name=Name;_this2102.Description=Description;_this2102.ObjectType=ObjectType;_this2102.ObjectPlacement=ObjectPlacement;_this2102.Representation=Representation;_this2102.Tag=Tag;_this2102.type=1287392070;return _this2102;}return _createClass(IfcFeatureElementSubtraction);}(IfcFeatureElement);IFC4X32.IfcFeatureElementSubtraction=IfcFeatureElementSubtraction;var IfcFlowControllerType=/*#__PURE__*/function(_IfcDistributionFlowE38){_inherits(IfcFlowControllerType,_IfcDistributionFlowE38);var _super2106=_createSuper(IfcFlowControllerType);function IfcFlowControllerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2103;_classCallCheck(this,IfcFlowControllerType);_this2103=_super2106.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2103.GlobalId=GlobalId;_this2103.OwnerHistory=OwnerHistory;_this2103.Name=Name;_this2103.Description=Description;_this2103.ApplicableOccurrence=ApplicableOccurrence;_this2103.HasPropertySets=HasPropertySets;_this2103.RepresentationMaps=RepresentationMaps;_this2103.Tag=Tag;_this2103.ElementType=ElementType;_this2103.type=3907093117;return _this2103;}return _createClass(IfcFlowControllerType);}(IfcDistributionFlowElementType);IFC4X32.IfcFlowControllerType=IfcFlowControllerType;var IfcFlowFittingType=/*#__PURE__*/function(_IfcDistributionFlowE39){_inherits(IfcFlowFittingType,_IfcDistributionFlowE39);var _super2107=_createSuper(IfcFlowFittingType);function IfcFlowFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2104;_classCallCheck(this,IfcFlowFittingType);_this2104=_super2107.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2104.GlobalId=GlobalId;_this2104.OwnerHistory=OwnerHistory;_this2104.Name=Name;_this2104.Description=Description;_this2104.ApplicableOccurrence=ApplicableOccurrence;_this2104.HasPropertySets=HasPropertySets;_this2104.RepresentationMaps=RepresentationMaps;_this2104.Tag=Tag;_this2104.ElementType=ElementType;_this2104.type=3198132628;return _this2104;}return _createClass(IfcFlowFittingType);}(IfcDistributionFlowElementType);IFC4X32.IfcFlowFittingType=IfcFlowFittingType;var IfcFlowMeterType=/*#__PURE__*/function(_IfcFlowControllerTyp16){_inherits(IfcFlowMeterType,_IfcFlowControllerTyp16);var _super2108=_createSuper(IfcFlowMeterType);function IfcFlowMeterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2105;_classCallCheck(this,IfcFlowMeterType);_this2105=_super2108.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2105.GlobalId=GlobalId;_this2105.OwnerHistory=OwnerHistory;_this2105.Name=Name;_this2105.Description=Description;_this2105.ApplicableOccurrence=ApplicableOccurrence;_this2105.HasPropertySets=HasPropertySets;_this2105.RepresentationMaps=RepresentationMaps;_this2105.Tag=Tag;_this2105.ElementType=ElementType;_this2105.PredefinedType=PredefinedType;_this2105.type=3815607619;return _this2105;}return _createClass(IfcFlowMeterType);}(IfcFlowControllerType);IFC4X32.IfcFlowMeterType=IfcFlowMeterType;var IfcFlowMovingDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE40){_inherits(IfcFlowMovingDeviceType,_IfcDistributionFlowE40);var _super2109=_createSuper(IfcFlowMovingDeviceType);function IfcFlowMovingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2106;_classCallCheck(this,IfcFlowMovingDeviceType);_this2106=_super2109.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2106.GlobalId=GlobalId;_this2106.OwnerHistory=OwnerHistory;_this2106.Name=Name;_this2106.Description=Description;_this2106.ApplicableOccurrence=ApplicableOccurrence;_this2106.HasPropertySets=HasPropertySets;_this2106.RepresentationMaps=RepresentationMaps;_this2106.Tag=Tag;_this2106.ElementType=ElementType;_this2106.type=1482959167;return _this2106;}return _createClass(IfcFlowMovingDeviceType);}(IfcDistributionFlowElementType);IFC4X32.IfcFlowMovingDeviceType=IfcFlowMovingDeviceType;var IfcFlowSegmentType=/*#__PURE__*/function(_IfcDistributionFlowE41){_inherits(IfcFlowSegmentType,_IfcDistributionFlowE41);var _super2110=_createSuper(IfcFlowSegmentType);function IfcFlowSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2107;_classCallCheck(this,IfcFlowSegmentType);_this2107=_super2110.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2107.GlobalId=GlobalId;_this2107.OwnerHistory=OwnerHistory;_this2107.Name=Name;_this2107.Description=Description;_this2107.ApplicableOccurrence=ApplicableOccurrence;_this2107.HasPropertySets=HasPropertySets;_this2107.RepresentationMaps=RepresentationMaps;_this2107.Tag=Tag;_this2107.ElementType=ElementType;_this2107.type=1834744321;return _this2107;}return _createClass(IfcFlowSegmentType);}(IfcDistributionFlowElementType);IFC4X32.IfcFlowSegmentType=IfcFlowSegmentType;var IfcFlowStorageDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE42){_inherits(IfcFlowStorageDeviceType,_IfcDistributionFlowE42);var _super2111=_createSuper(IfcFlowStorageDeviceType);function IfcFlowStorageDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2108;_classCallCheck(this,IfcFlowStorageDeviceType);_this2108=_super2111.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2108.GlobalId=GlobalId;_this2108.OwnerHistory=OwnerHistory;_this2108.Name=Name;_this2108.Description=Description;_this2108.ApplicableOccurrence=ApplicableOccurrence;_this2108.HasPropertySets=HasPropertySets;_this2108.RepresentationMaps=RepresentationMaps;_this2108.Tag=Tag;_this2108.ElementType=ElementType;_this2108.type=1339347760;return _this2108;}return _createClass(IfcFlowStorageDeviceType);}(IfcDistributionFlowElementType);IFC4X32.IfcFlowStorageDeviceType=IfcFlowStorageDeviceType;var IfcFlowTerminalType=/*#__PURE__*/function(_IfcDistributionFlowE43){_inherits(IfcFlowTerminalType,_IfcDistributionFlowE43);var _super2112=_createSuper(IfcFlowTerminalType);function IfcFlowTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2109;_classCallCheck(this,IfcFlowTerminalType);_this2109=_super2112.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2109.GlobalId=GlobalId;_this2109.OwnerHistory=OwnerHistory;_this2109.Name=Name;_this2109.Description=Description;_this2109.ApplicableOccurrence=ApplicableOccurrence;_this2109.HasPropertySets=HasPropertySets;_this2109.RepresentationMaps=RepresentationMaps;_this2109.Tag=Tag;_this2109.ElementType=ElementType;_this2109.type=2297155007;return _this2109;}return _createClass(IfcFlowTerminalType);}(IfcDistributionFlowElementType);IFC4X32.IfcFlowTerminalType=IfcFlowTerminalType;var IfcFlowTreatmentDeviceType=/*#__PURE__*/function(_IfcDistributionFlowE44){_inherits(IfcFlowTreatmentDeviceType,_IfcDistributionFlowE44);var _super2113=_createSuper(IfcFlowTreatmentDeviceType);function IfcFlowTreatmentDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2110;_classCallCheck(this,IfcFlowTreatmentDeviceType);_this2110=_super2113.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2110.GlobalId=GlobalId;_this2110.OwnerHistory=OwnerHistory;_this2110.Name=Name;_this2110.Description=Description;_this2110.ApplicableOccurrence=ApplicableOccurrence;_this2110.HasPropertySets=HasPropertySets;_this2110.RepresentationMaps=RepresentationMaps;_this2110.Tag=Tag;_this2110.ElementType=ElementType;_this2110.type=3009222698;return _this2110;}return _createClass(IfcFlowTreatmentDeviceType);}(IfcDistributionFlowElementType);IFC4X32.IfcFlowTreatmentDeviceType=IfcFlowTreatmentDeviceType;var IfcFootingType=/*#__PURE__*/function(_IfcBuiltElementType8){_inherits(IfcFootingType,_IfcBuiltElementType8);var _super2114=_createSuper(IfcFootingType);function IfcFootingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2111;_classCallCheck(this,IfcFootingType);_this2111=_super2114.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2111.GlobalId=GlobalId;_this2111.OwnerHistory=OwnerHistory;_this2111.Name=Name;_this2111.Description=Description;_this2111.ApplicableOccurrence=ApplicableOccurrence;_this2111.HasPropertySets=HasPropertySets;_this2111.RepresentationMaps=RepresentationMaps;_this2111.Tag=Tag;_this2111.ElementType=ElementType;_this2111.PredefinedType=PredefinedType;_this2111.type=1893162501;return _this2111;}return _createClass(IfcFootingType);}(IfcBuiltElementType);IFC4X32.IfcFootingType=IfcFootingType;var IfcFurnishingElement=/*#__PURE__*/function(_IfcElement24){_inherits(IfcFurnishingElement,_IfcElement24);var _super2115=_createSuper(IfcFurnishingElement);function IfcFurnishingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2112;_classCallCheck(this,IfcFurnishingElement);_this2112=_super2115.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2112.GlobalId=GlobalId;_this2112.OwnerHistory=OwnerHistory;_this2112.Name=Name;_this2112.Description=Description;_this2112.ObjectType=ObjectType;_this2112.ObjectPlacement=ObjectPlacement;_this2112.Representation=Representation;_this2112.Tag=Tag;_this2112.type=263784265;return _this2112;}return _createClass(IfcFurnishingElement);}(IfcElement);IFC4X32.IfcFurnishingElement=IfcFurnishingElement;var IfcFurniture=/*#__PURE__*/function(_IfcFurnishingElement9){_inherits(IfcFurniture,_IfcFurnishingElement9);var _super2116=_createSuper(IfcFurniture);function IfcFurniture(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2113;_classCallCheck(this,IfcFurniture);_this2113=_super2116.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2113.GlobalId=GlobalId;_this2113.OwnerHistory=OwnerHistory;_this2113.Name=Name;_this2113.Description=Description;_this2113.ObjectType=ObjectType;_this2113.ObjectPlacement=ObjectPlacement;_this2113.Representation=Representation;_this2113.Tag=Tag;_this2113.PredefinedType=PredefinedType;_this2113.type=1509553395;return _this2113;}return _createClass(IfcFurniture);}(IfcFurnishingElement);IFC4X32.IfcFurniture=IfcFurniture;var IfcGeographicElement=/*#__PURE__*/function(_IfcElement25){_inherits(IfcGeographicElement,_IfcElement25);var _super2117=_createSuper(IfcGeographicElement);function IfcGeographicElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2114;_classCallCheck(this,IfcGeographicElement);_this2114=_super2117.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2114.GlobalId=GlobalId;_this2114.OwnerHistory=OwnerHistory;_this2114.Name=Name;_this2114.Description=Description;_this2114.ObjectType=ObjectType;_this2114.ObjectPlacement=ObjectPlacement;_this2114.Representation=Representation;_this2114.Tag=Tag;_this2114.PredefinedType=PredefinedType;_this2114.type=3493046030;return _this2114;}return _createClass(IfcGeographicElement);}(IfcElement);IFC4X32.IfcGeographicElement=IfcGeographicElement;var IfcGeotechnicalElement=/*#__PURE__*/function(_IfcElement26){_inherits(IfcGeotechnicalElement,_IfcElement26);var _super2118=_createSuper(IfcGeotechnicalElement);function IfcGeotechnicalElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2115;_classCallCheck(this,IfcGeotechnicalElement);_this2115=_super2118.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2115.GlobalId=GlobalId;_this2115.OwnerHistory=OwnerHistory;_this2115.Name=Name;_this2115.Description=Description;_this2115.ObjectType=ObjectType;_this2115.ObjectPlacement=ObjectPlacement;_this2115.Representation=Representation;_this2115.Tag=Tag;_this2115.type=4230923436;return _this2115;}return _createClass(IfcGeotechnicalElement);}(IfcElement);IFC4X32.IfcGeotechnicalElement=IfcGeotechnicalElement;var IfcGeotechnicalStratum=/*#__PURE__*/function(_IfcGeotechnicalEleme){_inherits(IfcGeotechnicalStratum,_IfcGeotechnicalEleme);var _super2119=_createSuper(IfcGeotechnicalStratum);function IfcGeotechnicalStratum(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2116;_classCallCheck(this,IfcGeotechnicalStratum);_this2116=_super2119.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2116.GlobalId=GlobalId;_this2116.OwnerHistory=OwnerHistory;_this2116.Name=Name;_this2116.Description=Description;_this2116.ObjectType=ObjectType;_this2116.ObjectPlacement=ObjectPlacement;_this2116.Representation=Representation;_this2116.Tag=Tag;_this2116.PredefinedType=PredefinedType;_this2116.type=1594536857;return _this2116;}return _createClass(IfcGeotechnicalStratum);}(IfcGeotechnicalElement);IFC4X32.IfcGeotechnicalStratum=IfcGeotechnicalStratum;var IfcGradientCurve=/*#__PURE__*/function(_IfcCompositeCurve4){_inherits(IfcGradientCurve,_IfcCompositeCurve4);var _super2120=_createSuper(IfcGradientCurve);function IfcGradientCurve(expressID,Segments,SelfIntersect,BaseCurve,EndPoint){var _this2117;_classCallCheck(this,IfcGradientCurve);_this2117=_super2120.call(this,expressID,Segments,SelfIntersect);_this2117.Segments=Segments;_this2117.SelfIntersect=SelfIntersect;_this2117.BaseCurve=BaseCurve;_this2117.EndPoint=EndPoint;_this2117.type=2898700619;return _this2117;}return _createClass(IfcGradientCurve);}(IfcCompositeCurve);IFC4X32.IfcGradientCurve=IfcGradientCurve;var IfcGroup=/*#__PURE__*/function(_IfcObject19){_inherits(IfcGroup,_IfcObject19);var _super2121=_createSuper(IfcGroup);function IfcGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this2118;_classCallCheck(this,IfcGroup);_this2118=_super2121.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2118.GlobalId=GlobalId;_this2118.OwnerHistory=OwnerHistory;_this2118.Name=Name;_this2118.Description=Description;_this2118.ObjectType=ObjectType;_this2118.type=2706460486;return _this2118;}return _createClass(IfcGroup);}(IfcObject);IFC4X32.IfcGroup=IfcGroup;var IfcHeatExchangerType=/*#__PURE__*/function(_IfcEnergyConversionD62){_inherits(IfcHeatExchangerType,_IfcEnergyConversionD62);var _super2122=_createSuper(IfcHeatExchangerType);function IfcHeatExchangerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2119;_classCallCheck(this,IfcHeatExchangerType);_this2119=_super2122.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2119.GlobalId=GlobalId;_this2119.OwnerHistory=OwnerHistory;_this2119.Name=Name;_this2119.Description=Description;_this2119.ApplicableOccurrence=ApplicableOccurrence;_this2119.HasPropertySets=HasPropertySets;_this2119.RepresentationMaps=RepresentationMaps;_this2119.Tag=Tag;_this2119.ElementType=ElementType;_this2119.PredefinedType=PredefinedType;_this2119.type=1251058090;return _this2119;}return _createClass(IfcHeatExchangerType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcHeatExchangerType=IfcHeatExchangerType;var IfcHumidifierType=/*#__PURE__*/function(_IfcEnergyConversionD63){_inherits(IfcHumidifierType,_IfcEnergyConversionD63);var _super2123=_createSuper(IfcHumidifierType);function IfcHumidifierType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2120;_classCallCheck(this,IfcHumidifierType);_this2120=_super2123.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2120.GlobalId=GlobalId;_this2120.OwnerHistory=OwnerHistory;_this2120.Name=Name;_this2120.Description=Description;_this2120.ApplicableOccurrence=ApplicableOccurrence;_this2120.HasPropertySets=HasPropertySets;_this2120.RepresentationMaps=RepresentationMaps;_this2120.Tag=Tag;_this2120.ElementType=ElementType;_this2120.PredefinedType=PredefinedType;_this2120.type=1806887404;return _this2120;}return _createClass(IfcHumidifierType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcHumidifierType=IfcHumidifierType;var IfcImpactProtectionDevice=/*#__PURE__*/function(_IfcElementComponent10){_inherits(IfcImpactProtectionDevice,_IfcElementComponent10);var _super2124=_createSuper(IfcImpactProtectionDevice);function IfcImpactProtectionDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2121;_classCallCheck(this,IfcImpactProtectionDevice);_this2121=_super2124.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2121.GlobalId=GlobalId;_this2121.OwnerHistory=OwnerHistory;_this2121.Name=Name;_this2121.Description=Description;_this2121.ObjectType=ObjectType;_this2121.ObjectPlacement=ObjectPlacement;_this2121.Representation=Representation;_this2121.Tag=Tag;_this2121.PredefinedType=PredefinedType;_this2121.type=2568555532;return _this2121;}return _createClass(IfcImpactProtectionDevice);}(IfcElementComponent);IFC4X32.IfcImpactProtectionDevice=IfcImpactProtectionDevice;var IfcImpactProtectionDeviceType=/*#__PURE__*/function(_IfcElementComponentT10){_inherits(IfcImpactProtectionDeviceType,_IfcElementComponentT10);var _super2125=_createSuper(IfcImpactProtectionDeviceType);function IfcImpactProtectionDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2122;_classCallCheck(this,IfcImpactProtectionDeviceType);_this2122=_super2125.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2122.GlobalId=GlobalId;_this2122.OwnerHistory=OwnerHistory;_this2122.Name=Name;_this2122.Description=Description;_this2122.ApplicableOccurrence=ApplicableOccurrence;_this2122.HasPropertySets=HasPropertySets;_this2122.RepresentationMaps=RepresentationMaps;_this2122.Tag=Tag;_this2122.ElementType=ElementType;_this2122.PredefinedType=PredefinedType;_this2122.type=3948183225;return _this2122;}return _createClass(IfcImpactProtectionDeviceType);}(IfcElementComponentType);IFC4X32.IfcImpactProtectionDeviceType=IfcImpactProtectionDeviceType;var IfcIndexedPolyCurve=/*#__PURE__*/function(_IfcBoundedCurve11){_inherits(IfcIndexedPolyCurve,_IfcBoundedCurve11);var _super2126=_createSuper(IfcIndexedPolyCurve);function IfcIndexedPolyCurve(expressID,Points,Segments,SelfIntersect){var _this2123;_classCallCheck(this,IfcIndexedPolyCurve);_this2123=_super2126.call(this,expressID);_this2123.Points=Points;_this2123.Segments=Segments;_this2123.SelfIntersect=SelfIntersect;_this2123.type=2571569899;return _this2123;}return _createClass(IfcIndexedPolyCurve);}(IfcBoundedCurve);IFC4X32.IfcIndexedPolyCurve=IfcIndexedPolyCurve;var IfcInterceptorType=/*#__PURE__*/function(_IfcFlowTreatmentDevi9){_inherits(IfcInterceptorType,_IfcFlowTreatmentDevi9);var _super2127=_createSuper(IfcInterceptorType);function IfcInterceptorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2124;_classCallCheck(this,IfcInterceptorType);_this2124=_super2127.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2124.GlobalId=GlobalId;_this2124.OwnerHistory=OwnerHistory;_this2124.Name=Name;_this2124.Description=Description;_this2124.ApplicableOccurrence=ApplicableOccurrence;_this2124.HasPropertySets=HasPropertySets;_this2124.RepresentationMaps=RepresentationMaps;_this2124.Tag=Tag;_this2124.ElementType=ElementType;_this2124.PredefinedType=PredefinedType;_this2124.type=3946677679;return _this2124;}return _createClass(IfcInterceptorType);}(IfcFlowTreatmentDeviceType);IFC4X32.IfcInterceptorType=IfcInterceptorType;var IfcIntersectionCurve=/*#__PURE__*/function(_IfcSurfaceCurve3){_inherits(IfcIntersectionCurve,_IfcSurfaceCurve3);var _super2128=_createSuper(IfcIntersectionCurve);function IfcIntersectionCurve(expressID,Curve3D,AssociatedGeometry,MasterRepresentation){var _this2125;_classCallCheck(this,IfcIntersectionCurve);_this2125=_super2128.call(this,expressID,Curve3D,AssociatedGeometry,MasterRepresentation);_this2125.Curve3D=Curve3D;_this2125.AssociatedGeometry=AssociatedGeometry;_this2125.MasterRepresentation=MasterRepresentation;_this2125.type=3113134337;return _this2125;}return _createClass(IfcIntersectionCurve);}(IfcSurfaceCurve);IFC4X32.IfcIntersectionCurve=IfcIntersectionCurve;var IfcInventory=/*#__PURE__*/function(_IfcGroup13){_inherits(IfcInventory,_IfcGroup13);var _super2129=_createSuper(IfcInventory);function IfcInventory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,Jurisdiction,ResponsiblePersons,LastUpdateDate,CurrentValue,OriginalValue){var _this2126;_classCallCheck(this,IfcInventory);_this2126=_super2129.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2126.GlobalId=GlobalId;_this2126.OwnerHistory=OwnerHistory;_this2126.Name=Name;_this2126.Description=Description;_this2126.ObjectType=ObjectType;_this2126.PredefinedType=PredefinedType;_this2126.Jurisdiction=Jurisdiction;_this2126.ResponsiblePersons=ResponsiblePersons;_this2126.LastUpdateDate=LastUpdateDate;_this2126.CurrentValue=CurrentValue;_this2126.OriginalValue=OriginalValue;_this2126.type=2391368822;return _this2126;}return _createClass(IfcInventory);}(IfcGroup);IFC4X32.IfcInventory=IfcInventory;var IfcJunctionBoxType=/*#__PURE__*/function(_IfcFlowFittingType10){_inherits(IfcJunctionBoxType,_IfcFlowFittingType10);var _super2130=_createSuper(IfcJunctionBoxType);function IfcJunctionBoxType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2127;_classCallCheck(this,IfcJunctionBoxType);_this2127=_super2130.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2127.GlobalId=GlobalId;_this2127.OwnerHistory=OwnerHistory;_this2127.Name=Name;_this2127.Description=Description;_this2127.ApplicableOccurrence=ApplicableOccurrence;_this2127.HasPropertySets=HasPropertySets;_this2127.RepresentationMaps=RepresentationMaps;_this2127.Tag=Tag;_this2127.ElementType=ElementType;_this2127.PredefinedType=PredefinedType;_this2127.type=4288270099;return _this2127;}return _createClass(IfcJunctionBoxType);}(IfcFlowFittingType);IFC4X32.IfcJunctionBoxType=IfcJunctionBoxType;var IfcKerbType=/*#__PURE__*/function(_IfcBuiltElementType9){_inherits(IfcKerbType,_IfcBuiltElementType9);var _super2131=_createSuper(IfcKerbType);function IfcKerbType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,Mountable){var _this2128;_classCallCheck(this,IfcKerbType);_this2128=_super2131.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2128.GlobalId=GlobalId;_this2128.OwnerHistory=OwnerHistory;_this2128.Name=Name;_this2128.Description=Description;_this2128.ApplicableOccurrence=ApplicableOccurrence;_this2128.HasPropertySets=HasPropertySets;_this2128.RepresentationMaps=RepresentationMaps;_this2128.Tag=Tag;_this2128.ElementType=ElementType;_this2128.Mountable=Mountable;_this2128.type=679976338;return _this2128;}return _createClass(IfcKerbType);}(IfcBuiltElementType);IFC4X32.IfcKerbType=IfcKerbType;var IfcLaborResource=/*#__PURE__*/function(_IfcConstructionResou26){_inherits(IfcLaborResource,_IfcConstructionResou26);var _super2132=_createSuper(IfcLaborResource);function IfcLaborResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this2129;_classCallCheck(this,IfcLaborResource);_this2129=_super2132.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this2129.GlobalId=GlobalId;_this2129.OwnerHistory=OwnerHistory;_this2129.Name=Name;_this2129.Description=Description;_this2129.ObjectType=ObjectType;_this2129.Identification=Identification;_this2129.LongDescription=LongDescription;_this2129.Usage=Usage;_this2129.BaseCosts=BaseCosts;_this2129.BaseQuantity=BaseQuantity;_this2129.PredefinedType=PredefinedType;_this2129.type=3827777499;return _this2129;}return _createClass(IfcLaborResource);}(IfcConstructionResource);IFC4X32.IfcLaborResource=IfcLaborResource;var IfcLampType=/*#__PURE__*/function(_IfcFlowTerminalType25){_inherits(IfcLampType,_IfcFlowTerminalType25);var _super2133=_createSuper(IfcLampType);function IfcLampType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2130;_classCallCheck(this,IfcLampType);_this2130=_super2133.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2130.GlobalId=GlobalId;_this2130.OwnerHistory=OwnerHistory;_this2130.Name=Name;_this2130.Description=Description;_this2130.ApplicableOccurrence=ApplicableOccurrence;_this2130.HasPropertySets=HasPropertySets;_this2130.RepresentationMaps=RepresentationMaps;_this2130.Tag=Tag;_this2130.ElementType=ElementType;_this2130.PredefinedType=PredefinedType;_this2130.type=1051575348;return _this2130;}return _createClass(IfcLampType);}(IfcFlowTerminalType);IFC4X32.IfcLampType=IfcLampType;var IfcLightFixtureType=/*#__PURE__*/function(_IfcFlowTerminalType26){_inherits(IfcLightFixtureType,_IfcFlowTerminalType26);var _super2134=_createSuper(IfcLightFixtureType);function IfcLightFixtureType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2131;_classCallCheck(this,IfcLightFixtureType);_this2131=_super2134.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2131.GlobalId=GlobalId;_this2131.OwnerHistory=OwnerHistory;_this2131.Name=Name;_this2131.Description=Description;_this2131.ApplicableOccurrence=ApplicableOccurrence;_this2131.HasPropertySets=HasPropertySets;_this2131.RepresentationMaps=RepresentationMaps;_this2131.Tag=Tag;_this2131.ElementType=ElementType;_this2131.PredefinedType=PredefinedType;_this2131.type=1161773419;return _this2131;}return _createClass(IfcLightFixtureType);}(IfcFlowTerminalType);IFC4X32.IfcLightFixtureType=IfcLightFixtureType;var IfcLinearElement=/*#__PURE__*/function(_IfcProduct22){_inherits(IfcLinearElement,_IfcProduct22);var _super2135=_createSuper(IfcLinearElement);function IfcLinearElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2132;_classCallCheck(this,IfcLinearElement);_this2132=_super2135.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2132.GlobalId=GlobalId;_this2132.OwnerHistory=OwnerHistory;_this2132.Name=Name;_this2132.Description=Description;_this2132.ObjectType=ObjectType;_this2132.ObjectPlacement=ObjectPlacement;_this2132.Representation=Representation;_this2132.type=2176059722;return _this2132;}return _createClass(IfcLinearElement);}(IfcProduct);IFC4X32.IfcLinearElement=IfcLinearElement;var IfcLiquidTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType27){_inherits(IfcLiquidTerminalType,_IfcFlowTerminalType27);var _super2136=_createSuper(IfcLiquidTerminalType);function IfcLiquidTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2133;_classCallCheck(this,IfcLiquidTerminalType);_this2133=_super2136.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2133.GlobalId=GlobalId;_this2133.OwnerHistory=OwnerHistory;_this2133.Name=Name;_this2133.Description=Description;_this2133.ApplicableOccurrence=ApplicableOccurrence;_this2133.HasPropertySets=HasPropertySets;_this2133.RepresentationMaps=RepresentationMaps;_this2133.Tag=Tag;_this2133.ElementType=ElementType;_this2133.PredefinedType=PredefinedType;_this2133.type=1770583370;return _this2133;}return _createClass(IfcLiquidTerminalType);}(IfcFlowTerminalType);IFC4X32.IfcLiquidTerminalType=IfcLiquidTerminalType;var IfcMarineFacility=/*#__PURE__*/function(_IfcFacility){_inherits(IfcMarineFacility,_IfcFacility);var _super2137=_createSuper(IfcMarineFacility);function IfcMarineFacility(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,PredefinedType){var _this2134;_classCallCheck(this,IfcMarineFacility);_this2134=_super2137.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2134.GlobalId=GlobalId;_this2134.OwnerHistory=OwnerHistory;_this2134.Name=Name;_this2134.Description=Description;_this2134.ObjectType=ObjectType;_this2134.ObjectPlacement=ObjectPlacement;_this2134.Representation=Representation;_this2134.LongName=LongName;_this2134.CompositionType=CompositionType;_this2134.PredefinedType=PredefinedType;_this2134.type=525669439;return _this2134;}return _createClass(IfcMarineFacility);}(IfcFacility);IFC4X32.IfcMarineFacility=IfcMarineFacility;var IfcMarinePart=/*#__PURE__*/function(_IfcFacilityPart2){_inherits(IfcMarinePart,_IfcFacilityPart2);var _super2138=_createSuper(IfcMarinePart);function IfcMarinePart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType,PredefinedType){var _this2135;_classCallCheck(this,IfcMarinePart);_this2135=_super2138.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType);_this2135.GlobalId=GlobalId;_this2135.OwnerHistory=OwnerHistory;_this2135.Name=Name;_this2135.Description=Description;_this2135.ObjectType=ObjectType;_this2135.ObjectPlacement=ObjectPlacement;_this2135.Representation=Representation;_this2135.LongName=LongName;_this2135.CompositionType=CompositionType;_this2135.UsageType=UsageType;_this2135.PredefinedType=PredefinedType;_this2135.type=976884017;return _this2135;}return _createClass(IfcMarinePart);}(IfcFacilityPart);IFC4X32.IfcMarinePart=IfcMarinePart;var IfcMechanicalFastener=/*#__PURE__*/function(_IfcElementComponent11){_inherits(IfcMechanicalFastener,_IfcElementComponent11);var _super2139=_createSuper(IfcMechanicalFastener);function IfcMechanicalFastener(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,NominalDiameter,NominalLength,PredefinedType){var _this2136;_classCallCheck(this,IfcMechanicalFastener);_this2136=_super2139.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2136.GlobalId=GlobalId;_this2136.OwnerHistory=OwnerHistory;_this2136.Name=Name;_this2136.Description=Description;_this2136.ObjectType=ObjectType;_this2136.ObjectPlacement=ObjectPlacement;_this2136.Representation=Representation;_this2136.Tag=Tag;_this2136.NominalDiameter=NominalDiameter;_this2136.NominalLength=NominalLength;_this2136.PredefinedType=PredefinedType;_this2136.type=377706215;return _this2136;}return _createClass(IfcMechanicalFastener);}(IfcElementComponent);IFC4X32.IfcMechanicalFastener=IfcMechanicalFastener;var IfcMechanicalFastenerType=/*#__PURE__*/function(_IfcElementComponentT11){_inherits(IfcMechanicalFastenerType,_IfcElementComponentT11);var _super2140=_createSuper(IfcMechanicalFastenerType);function IfcMechanicalFastenerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,NominalDiameter,NominalLength){var _this2137;_classCallCheck(this,IfcMechanicalFastenerType);_this2137=_super2140.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2137.GlobalId=GlobalId;_this2137.OwnerHistory=OwnerHistory;_this2137.Name=Name;_this2137.Description=Description;_this2137.ApplicableOccurrence=ApplicableOccurrence;_this2137.HasPropertySets=HasPropertySets;_this2137.RepresentationMaps=RepresentationMaps;_this2137.Tag=Tag;_this2137.ElementType=ElementType;_this2137.PredefinedType=PredefinedType;_this2137.NominalDiameter=NominalDiameter;_this2137.NominalLength=NominalLength;_this2137.type=2108223431;return _this2137;}return _createClass(IfcMechanicalFastenerType);}(IfcElementComponentType);IFC4X32.IfcMechanicalFastenerType=IfcMechanicalFastenerType;var IfcMedicalDeviceType=/*#__PURE__*/function(_IfcFlowTerminalType28){_inherits(IfcMedicalDeviceType,_IfcFlowTerminalType28);var _super2141=_createSuper(IfcMedicalDeviceType);function IfcMedicalDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2138;_classCallCheck(this,IfcMedicalDeviceType);_this2138=_super2141.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2138.GlobalId=GlobalId;_this2138.OwnerHistory=OwnerHistory;_this2138.Name=Name;_this2138.Description=Description;_this2138.ApplicableOccurrence=ApplicableOccurrence;_this2138.HasPropertySets=HasPropertySets;_this2138.RepresentationMaps=RepresentationMaps;_this2138.Tag=Tag;_this2138.ElementType=ElementType;_this2138.PredefinedType=PredefinedType;_this2138.type=1114901282;return _this2138;}return _createClass(IfcMedicalDeviceType);}(IfcFlowTerminalType);IFC4X32.IfcMedicalDeviceType=IfcMedicalDeviceType;var IfcMemberType=/*#__PURE__*/function(_IfcBuiltElementType10){_inherits(IfcMemberType,_IfcBuiltElementType10);var _super2142=_createSuper(IfcMemberType);function IfcMemberType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2139;_classCallCheck(this,IfcMemberType);_this2139=_super2142.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2139.GlobalId=GlobalId;_this2139.OwnerHistory=OwnerHistory;_this2139.Name=Name;_this2139.Description=Description;_this2139.ApplicableOccurrence=ApplicableOccurrence;_this2139.HasPropertySets=HasPropertySets;_this2139.RepresentationMaps=RepresentationMaps;_this2139.Tag=Tag;_this2139.ElementType=ElementType;_this2139.PredefinedType=PredefinedType;_this2139.type=3181161470;return _this2139;}return _createClass(IfcMemberType);}(IfcBuiltElementType);IFC4X32.IfcMemberType=IfcMemberType;var IfcMobileTelecommunicationsApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType29){_inherits(IfcMobileTelecommunicationsApplianceType,_IfcFlowTerminalType29);var _super2143=_createSuper(IfcMobileTelecommunicationsApplianceType);function IfcMobileTelecommunicationsApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2140;_classCallCheck(this,IfcMobileTelecommunicationsApplianceType);_this2140=_super2143.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2140.GlobalId=GlobalId;_this2140.OwnerHistory=OwnerHistory;_this2140.Name=Name;_this2140.Description=Description;_this2140.ApplicableOccurrence=ApplicableOccurrence;_this2140.HasPropertySets=HasPropertySets;_this2140.RepresentationMaps=RepresentationMaps;_this2140.Tag=Tag;_this2140.ElementType=ElementType;_this2140.PredefinedType=PredefinedType;_this2140.type=1950438474;return _this2140;}return _createClass(IfcMobileTelecommunicationsApplianceType);}(IfcFlowTerminalType);IFC4X32.IfcMobileTelecommunicationsApplianceType=IfcMobileTelecommunicationsApplianceType;var IfcMooringDeviceType=/*#__PURE__*/function(_IfcBuiltElementType11){_inherits(IfcMooringDeviceType,_IfcBuiltElementType11);var _super2144=_createSuper(IfcMooringDeviceType);function IfcMooringDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2141;_classCallCheck(this,IfcMooringDeviceType);_this2141=_super2144.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2141.GlobalId=GlobalId;_this2141.OwnerHistory=OwnerHistory;_this2141.Name=Name;_this2141.Description=Description;_this2141.ApplicableOccurrence=ApplicableOccurrence;_this2141.HasPropertySets=HasPropertySets;_this2141.RepresentationMaps=RepresentationMaps;_this2141.Tag=Tag;_this2141.ElementType=ElementType;_this2141.PredefinedType=PredefinedType;_this2141.type=710110818;return _this2141;}return _createClass(IfcMooringDeviceType);}(IfcBuiltElementType);IFC4X32.IfcMooringDeviceType=IfcMooringDeviceType;var IfcMotorConnectionType=/*#__PURE__*/function(_IfcEnergyConversionD64){_inherits(IfcMotorConnectionType,_IfcEnergyConversionD64);var _super2145=_createSuper(IfcMotorConnectionType);function IfcMotorConnectionType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2142;_classCallCheck(this,IfcMotorConnectionType);_this2142=_super2145.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2142.GlobalId=GlobalId;_this2142.OwnerHistory=OwnerHistory;_this2142.Name=Name;_this2142.Description=Description;_this2142.ApplicableOccurrence=ApplicableOccurrence;_this2142.HasPropertySets=HasPropertySets;_this2142.RepresentationMaps=RepresentationMaps;_this2142.Tag=Tag;_this2142.ElementType=ElementType;_this2142.PredefinedType=PredefinedType;_this2142.type=977012517;return _this2142;}return _createClass(IfcMotorConnectionType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcMotorConnectionType=IfcMotorConnectionType;var IfcNavigationElementType=/*#__PURE__*/function(_IfcBuiltElementType12){_inherits(IfcNavigationElementType,_IfcBuiltElementType12);var _super2146=_createSuper(IfcNavigationElementType);function IfcNavigationElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2143;_classCallCheck(this,IfcNavigationElementType);_this2143=_super2146.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2143.GlobalId=GlobalId;_this2143.OwnerHistory=OwnerHistory;_this2143.Name=Name;_this2143.Description=Description;_this2143.ApplicableOccurrence=ApplicableOccurrence;_this2143.HasPropertySets=HasPropertySets;_this2143.RepresentationMaps=RepresentationMaps;_this2143.Tag=Tag;_this2143.ElementType=ElementType;_this2143.PredefinedType=PredefinedType;_this2143.type=506776471;return _this2143;}return _createClass(IfcNavigationElementType);}(IfcBuiltElementType);IFC4X32.IfcNavigationElementType=IfcNavigationElementType;var IfcOccupant=/*#__PURE__*/function(_IfcActor3){_inherits(IfcOccupant,_IfcActor3);var _super2147=_createSuper(IfcOccupant);function IfcOccupant(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor,PredefinedType){var _this2144;_classCallCheck(this,IfcOccupant);_this2144=_super2147.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheActor);_this2144.GlobalId=GlobalId;_this2144.OwnerHistory=OwnerHistory;_this2144.Name=Name;_this2144.Description=Description;_this2144.ObjectType=ObjectType;_this2144.TheActor=TheActor;_this2144.PredefinedType=PredefinedType;_this2144.type=4143007308;return _this2144;}return _createClass(IfcOccupant);}(IfcActor);IFC4X32.IfcOccupant=IfcOccupant;var IfcOpeningElement=/*#__PURE__*/function(_IfcFeatureElementSub5){_inherits(IfcOpeningElement,_IfcFeatureElementSub5);var _super2148=_createSuper(IfcOpeningElement);function IfcOpeningElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2145;_classCallCheck(this,IfcOpeningElement);_this2145=_super2148.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2145.GlobalId=GlobalId;_this2145.OwnerHistory=OwnerHistory;_this2145.Name=Name;_this2145.Description=Description;_this2145.ObjectType=ObjectType;_this2145.ObjectPlacement=ObjectPlacement;_this2145.Representation=Representation;_this2145.Tag=Tag;_this2145.PredefinedType=PredefinedType;_this2145.type=3588315303;return _this2145;}return _createClass(IfcOpeningElement);}(IfcFeatureElementSubtraction);IFC4X32.IfcOpeningElement=IfcOpeningElement;var IfcOutletType=/*#__PURE__*/function(_IfcFlowTerminalType30){_inherits(IfcOutletType,_IfcFlowTerminalType30);var _super2149=_createSuper(IfcOutletType);function IfcOutletType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2146;_classCallCheck(this,IfcOutletType);_this2146=_super2149.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2146.GlobalId=GlobalId;_this2146.OwnerHistory=OwnerHistory;_this2146.Name=Name;_this2146.Description=Description;_this2146.ApplicableOccurrence=ApplicableOccurrence;_this2146.HasPropertySets=HasPropertySets;_this2146.RepresentationMaps=RepresentationMaps;_this2146.Tag=Tag;_this2146.ElementType=ElementType;_this2146.PredefinedType=PredefinedType;_this2146.type=2837617999;return _this2146;}return _createClass(IfcOutletType);}(IfcFlowTerminalType);IFC4X32.IfcOutletType=IfcOutletType;var IfcPavementType=/*#__PURE__*/function(_IfcBuiltElementType13){_inherits(IfcPavementType,_IfcBuiltElementType13);var _super2150=_createSuper(IfcPavementType);function IfcPavementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2147;_classCallCheck(this,IfcPavementType);_this2147=_super2150.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2147.GlobalId=GlobalId;_this2147.OwnerHistory=OwnerHistory;_this2147.Name=Name;_this2147.Description=Description;_this2147.ApplicableOccurrence=ApplicableOccurrence;_this2147.HasPropertySets=HasPropertySets;_this2147.RepresentationMaps=RepresentationMaps;_this2147.Tag=Tag;_this2147.ElementType=ElementType;_this2147.PredefinedType=PredefinedType;_this2147.type=514975943;return _this2147;}return _createClass(IfcPavementType);}(IfcBuiltElementType);IFC4X32.IfcPavementType=IfcPavementType;var IfcPerformanceHistory=/*#__PURE__*/function(_IfcControl26){_inherits(IfcPerformanceHistory,_IfcControl26);var _super2151=_createSuper(IfcPerformanceHistory);function IfcPerformanceHistory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LifeCyclePhase,PredefinedType){var _this2148;_classCallCheck(this,IfcPerformanceHistory);_this2148=_super2151.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2148.GlobalId=GlobalId;_this2148.OwnerHistory=OwnerHistory;_this2148.Name=Name;_this2148.Description=Description;_this2148.ObjectType=ObjectType;_this2148.Identification=Identification;_this2148.LifeCyclePhase=LifeCyclePhase;_this2148.PredefinedType=PredefinedType;_this2148.type=2382730787;return _this2148;}return _createClass(IfcPerformanceHistory);}(IfcControl);IFC4X32.IfcPerformanceHistory=IfcPerformanceHistory;var IfcPermeableCoveringProperties=/*#__PURE__*/function(_IfcPreDefinedPropert18){_inherits(IfcPermeableCoveringProperties,_IfcPreDefinedPropert18);var _super2152=_createSuper(IfcPermeableCoveringProperties);function IfcPermeableCoveringProperties(expressID,GlobalId,OwnerHistory,Name,Description,OperationType,PanelPosition,FrameDepth,FrameThickness,ShapeAspectStyle){var _this2149;_classCallCheck(this,IfcPermeableCoveringProperties);_this2149=_super2152.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2149.GlobalId=GlobalId;_this2149.OwnerHistory=OwnerHistory;_this2149.Name=Name;_this2149.Description=Description;_this2149.OperationType=OperationType;_this2149.PanelPosition=PanelPosition;_this2149.FrameDepth=FrameDepth;_this2149.FrameThickness=FrameThickness;_this2149.ShapeAspectStyle=ShapeAspectStyle;_this2149.type=3566463478;return _this2149;}return _createClass(IfcPermeableCoveringProperties);}(IfcPreDefinedPropertySet);IFC4X32.IfcPermeableCoveringProperties=IfcPermeableCoveringProperties;var IfcPermit=/*#__PURE__*/function(_IfcControl27){_inherits(IfcPermit,_IfcControl27);var _super2153=_createSuper(IfcPermit);function IfcPermit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,LongDescription){var _this2150;_classCallCheck(this,IfcPermit);_this2150=_super2153.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2150.GlobalId=GlobalId;_this2150.OwnerHistory=OwnerHistory;_this2150.Name=Name;_this2150.Description=Description;_this2150.ObjectType=ObjectType;_this2150.Identification=Identification;_this2150.PredefinedType=PredefinedType;_this2150.Status=Status;_this2150.LongDescription=LongDescription;_this2150.type=3327091369;return _this2150;}return _createClass(IfcPermit);}(IfcControl);IFC4X32.IfcPermit=IfcPermit;var IfcPileType=/*#__PURE__*/function(_IfcDeepFoundationTyp){_inherits(IfcPileType,_IfcDeepFoundationTyp);var _super2154=_createSuper(IfcPileType);function IfcPileType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2151;_classCallCheck(this,IfcPileType);_this2151=_super2154.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2151.GlobalId=GlobalId;_this2151.OwnerHistory=OwnerHistory;_this2151.Name=Name;_this2151.Description=Description;_this2151.ApplicableOccurrence=ApplicableOccurrence;_this2151.HasPropertySets=HasPropertySets;_this2151.RepresentationMaps=RepresentationMaps;_this2151.Tag=Tag;_this2151.ElementType=ElementType;_this2151.PredefinedType=PredefinedType;_this2151.type=1158309216;return _this2151;}return _createClass(IfcPileType);}(IfcDeepFoundationType);IFC4X32.IfcPileType=IfcPileType;var IfcPipeFittingType=/*#__PURE__*/function(_IfcFlowFittingType11){_inherits(IfcPipeFittingType,_IfcFlowFittingType11);var _super2155=_createSuper(IfcPipeFittingType);function IfcPipeFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2152;_classCallCheck(this,IfcPipeFittingType);_this2152=_super2155.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2152.GlobalId=GlobalId;_this2152.OwnerHistory=OwnerHistory;_this2152.Name=Name;_this2152.Description=Description;_this2152.ApplicableOccurrence=ApplicableOccurrence;_this2152.HasPropertySets=HasPropertySets;_this2152.RepresentationMaps=RepresentationMaps;_this2152.Tag=Tag;_this2152.ElementType=ElementType;_this2152.PredefinedType=PredefinedType;_this2152.type=804291784;return _this2152;}return _createClass(IfcPipeFittingType);}(IfcFlowFittingType);IFC4X32.IfcPipeFittingType=IfcPipeFittingType;var IfcPipeSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType9){_inherits(IfcPipeSegmentType,_IfcFlowSegmentType9);var _super2156=_createSuper(IfcPipeSegmentType);function IfcPipeSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2153;_classCallCheck(this,IfcPipeSegmentType);_this2153=_super2156.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2153.GlobalId=GlobalId;_this2153.OwnerHistory=OwnerHistory;_this2153.Name=Name;_this2153.Description=Description;_this2153.ApplicableOccurrence=ApplicableOccurrence;_this2153.HasPropertySets=HasPropertySets;_this2153.RepresentationMaps=RepresentationMaps;_this2153.Tag=Tag;_this2153.ElementType=ElementType;_this2153.PredefinedType=PredefinedType;_this2153.type=4231323485;return _this2153;}return _createClass(IfcPipeSegmentType);}(IfcFlowSegmentType);IFC4X32.IfcPipeSegmentType=IfcPipeSegmentType;var IfcPlateType=/*#__PURE__*/function(_IfcBuiltElementType14){_inherits(IfcPlateType,_IfcBuiltElementType14);var _super2157=_createSuper(IfcPlateType);function IfcPlateType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2154;_classCallCheck(this,IfcPlateType);_this2154=_super2157.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2154.GlobalId=GlobalId;_this2154.OwnerHistory=OwnerHistory;_this2154.Name=Name;_this2154.Description=Description;_this2154.ApplicableOccurrence=ApplicableOccurrence;_this2154.HasPropertySets=HasPropertySets;_this2154.RepresentationMaps=RepresentationMaps;_this2154.Tag=Tag;_this2154.ElementType=ElementType;_this2154.PredefinedType=PredefinedType;_this2154.type=4017108033;return _this2154;}return _createClass(IfcPlateType);}(IfcBuiltElementType);IFC4X32.IfcPlateType=IfcPlateType;var IfcPolygonalFaceSet=/*#__PURE__*/function(_IfcTessellatedFaceSe4){_inherits(IfcPolygonalFaceSet,_IfcTessellatedFaceSe4);var _super2158=_createSuper(IfcPolygonalFaceSet);function IfcPolygonalFaceSet(expressID,Coordinates,Closed,Faces,PnIndex){var _this2155;_classCallCheck(this,IfcPolygonalFaceSet);_this2155=_super2158.call(this,expressID,Coordinates,Closed);_this2155.Coordinates=Coordinates;_this2155.Closed=Closed;_this2155.Faces=Faces;_this2155.PnIndex=PnIndex;_this2155.type=2839578677;return _this2155;}return _createClass(IfcPolygonalFaceSet);}(IfcTessellatedFaceSet);IFC4X32.IfcPolygonalFaceSet=IfcPolygonalFaceSet;var IfcPolyline=/*#__PURE__*/function(_IfcBoundedCurve12){_inherits(IfcPolyline,_IfcBoundedCurve12);var _super2159=_createSuper(IfcPolyline);function IfcPolyline(expressID,Points){var _this2156;_classCallCheck(this,IfcPolyline);_this2156=_super2159.call(this,expressID);_this2156.Points=Points;_this2156.type=3724593414;return _this2156;}return _createClass(IfcPolyline);}(IfcBoundedCurve);IFC4X32.IfcPolyline=IfcPolyline;var IfcPort=/*#__PURE__*/function(_IfcProduct23){_inherits(IfcPort,_IfcProduct23);var _super2160=_createSuper(IfcPort);function IfcPort(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2157;_classCallCheck(this,IfcPort);_this2157=_super2160.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2157.GlobalId=GlobalId;_this2157.OwnerHistory=OwnerHistory;_this2157.Name=Name;_this2157.Description=Description;_this2157.ObjectType=ObjectType;_this2157.ObjectPlacement=ObjectPlacement;_this2157.Representation=Representation;_this2157.type=3740093272;return _this2157;}return _createClass(IfcPort);}(IfcProduct);IFC4X32.IfcPort=IfcPort;var IfcPositioningElement=/*#__PURE__*/function(_IfcProduct24){_inherits(IfcPositioningElement,_IfcProduct24);var _super2161=_createSuper(IfcPositioningElement);function IfcPositioningElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2158;_classCallCheck(this,IfcPositioningElement);_this2158=_super2161.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2158.GlobalId=GlobalId;_this2158.OwnerHistory=OwnerHistory;_this2158.Name=Name;_this2158.Description=Description;_this2158.ObjectType=ObjectType;_this2158.ObjectPlacement=ObjectPlacement;_this2158.Representation=Representation;_this2158.type=1946335990;return _this2158;}return _createClass(IfcPositioningElement);}(IfcProduct);IFC4X32.IfcPositioningElement=IfcPositioningElement;var IfcProcedure=/*#__PURE__*/function(_IfcProcess8){_inherits(IfcProcedure,_IfcProcess8);var _super2162=_createSuper(IfcProcedure);function IfcProcedure(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,PredefinedType){var _this2159;_classCallCheck(this,IfcProcedure);_this2159=_super2162.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription);_this2159.GlobalId=GlobalId;_this2159.OwnerHistory=OwnerHistory;_this2159.Name=Name;_this2159.Description=Description;_this2159.ObjectType=ObjectType;_this2159.Identification=Identification;_this2159.LongDescription=LongDescription;_this2159.PredefinedType=PredefinedType;_this2159.type=2744685151;return _this2159;}return _createClass(IfcProcedure);}(IfcProcess);IFC4X32.IfcProcedure=IfcProcedure;var IfcProjectOrder=/*#__PURE__*/function(_IfcControl28){_inherits(IfcProjectOrder,_IfcControl28);var _super2163=_createSuper(IfcProjectOrder);function IfcProjectOrder(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,LongDescription){var _this2160;_classCallCheck(this,IfcProjectOrder);_this2160=_super2163.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2160.GlobalId=GlobalId;_this2160.OwnerHistory=OwnerHistory;_this2160.Name=Name;_this2160.Description=Description;_this2160.ObjectType=ObjectType;_this2160.Identification=Identification;_this2160.PredefinedType=PredefinedType;_this2160.Status=Status;_this2160.LongDescription=LongDescription;_this2160.type=2904328755;return _this2160;}return _createClass(IfcProjectOrder);}(IfcControl);IFC4X32.IfcProjectOrder=IfcProjectOrder;var IfcProjectionElement=/*#__PURE__*/function(_IfcFeatureElementAdd3){_inherits(IfcProjectionElement,_IfcFeatureElementAdd3);var _super2164=_createSuper(IfcProjectionElement);function IfcProjectionElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2161;_classCallCheck(this,IfcProjectionElement);_this2161=_super2164.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2161.GlobalId=GlobalId;_this2161.OwnerHistory=OwnerHistory;_this2161.Name=Name;_this2161.Description=Description;_this2161.ObjectType=ObjectType;_this2161.ObjectPlacement=ObjectPlacement;_this2161.Representation=Representation;_this2161.Tag=Tag;_this2161.PredefinedType=PredefinedType;_this2161.type=3651124850;return _this2161;}return _createClass(IfcProjectionElement);}(IfcFeatureElementAddition);IFC4X32.IfcProjectionElement=IfcProjectionElement;var IfcProtectiveDeviceType=/*#__PURE__*/function(_IfcFlowControllerTyp17){_inherits(IfcProtectiveDeviceType,_IfcFlowControllerTyp17);var _super2165=_createSuper(IfcProtectiveDeviceType);function IfcProtectiveDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2162;_classCallCheck(this,IfcProtectiveDeviceType);_this2162=_super2165.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2162.GlobalId=GlobalId;_this2162.OwnerHistory=OwnerHistory;_this2162.Name=Name;_this2162.Description=Description;_this2162.ApplicableOccurrence=ApplicableOccurrence;_this2162.HasPropertySets=HasPropertySets;_this2162.RepresentationMaps=RepresentationMaps;_this2162.Tag=Tag;_this2162.ElementType=ElementType;_this2162.PredefinedType=PredefinedType;_this2162.type=1842657554;return _this2162;}return _createClass(IfcProtectiveDeviceType);}(IfcFlowControllerType);IFC4X32.IfcProtectiveDeviceType=IfcProtectiveDeviceType;var IfcPumpType=/*#__PURE__*/function(_IfcFlowMovingDeviceT7){_inherits(IfcPumpType,_IfcFlowMovingDeviceT7);var _super2166=_createSuper(IfcPumpType);function IfcPumpType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2163;_classCallCheck(this,IfcPumpType);_this2163=_super2166.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2163.GlobalId=GlobalId;_this2163.OwnerHistory=OwnerHistory;_this2163.Name=Name;_this2163.Description=Description;_this2163.ApplicableOccurrence=ApplicableOccurrence;_this2163.HasPropertySets=HasPropertySets;_this2163.RepresentationMaps=RepresentationMaps;_this2163.Tag=Tag;_this2163.ElementType=ElementType;_this2163.PredefinedType=PredefinedType;_this2163.type=2250791053;return _this2163;}return _createClass(IfcPumpType);}(IfcFlowMovingDeviceType);IFC4X32.IfcPumpType=IfcPumpType;var IfcRailType=/*#__PURE__*/function(_IfcBuiltElementType15){_inherits(IfcRailType,_IfcBuiltElementType15);var _super2167=_createSuper(IfcRailType);function IfcRailType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2164;_classCallCheck(this,IfcRailType);_this2164=_super2167.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2164.GlobalId=GlobalId;_this2164.OwnerHistory=OwnerHistory;_this2164.Name=Name;_this2164.Description=Description;_this2164.ApplicableOccurrence=ApplicableOccurrence;_this2164.HasPropertySets=HasPropertySets;_this2164.RepresentationMaps=RepresentationMaps;_this2164.Tag=Tag;_this2164.ElementType=ElementType;_this2164.PredefinedType=PredefinedType;_this2164.type=1763565496;return _this2164;}return _createClass(IfcRailType);}(IfcBuiltElementType);IFC4X32.IfcRailType=IfcRailType;var IfcRailingType=/*#__PURE__*/function(_IfcBuiltElementType16){_inherits(IfcRailingType,_IfcBuiltElementType16);var _super2168=_createSuper(IfcRailingType);function IfcRailingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2165;_classCallCheck(this,IfcRailingType);_this2165=_super2168.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2165.GlobalId=GlobalId;_this2165.OwnerHistory=OwnerHistory;_this2165.Name=Name;_this2165.Description=Description;_this2165.ApplicableOccurrence=ApplicableOccurrence;_this2165.HasPropertySets=HasPropertySets;_this2165.RepresentationMaps=RepresentationMaps;_this2165.Tag=Tag;_this2165.ElementType=ElementType;_this2165.PredefinedType=PredefinedType;_this2165.type=2893384427;return _this2165;}return _createClass(IfcRailingType);}(IfcBuiltElementType);IFC4X32.IfcRailingType=IfcRailingType;var IfcRailway=/*#__PURE__*/function(_IfcFacility2){_inherits(IfcRailway,_IfcFacility2);var _super2169=_createSuper(IfcRailway);function IfcRailway(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,PredefinedType){var _this2166;_classCallCheck(this,IfcRailway);_this2166=_super2169.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2166.GlobalId=GlobalId;_this2166.OwnerHistory=OwnerHistory;_this2166.Name=Name;_this2166.Description=Description;_this2166.ObjectType=ObjectType;_this2166.ObjectPlacement=ObjectPlacement;_this2166.Representation=Representation;_this2166.LongName=LongName;_this2166.CompositionType=CompositionType;_this2166.PredefinedType=PredefinedType;_this2166.type=3992365140;return _this2166;}return _createClass(IfcRailway);}(IfcFacility);IFC4X32.IfcRailway=IfcRailway;var IfcRailwayPart=/*#__PURE__*/function(_IfcFacilityPart3){_inherits(IfcRailwayPart,_IfcFacilityPart3);var _super2170=_createSuper(IfcRailwayPart);function IfcRailwayPart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType,PredefinedType){var _this2167;_classCallCheck(this,IfcRailwayPart);_this2167=_super2170.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType);_this2167.GlobalId=GlobalId;_this2167.OwnerHistory=OwnerHistory;_this2167.Name=Name;_this2167.Description=Description;_this2167.ObjectType=ObjectType;_this2167.ObjectPlacement=ObjectPlacement;_this2167.Representation=Representation;_this2167.LongName=LongName;_this2167.CompositionType=CompositionType;_this2167.UsageType=UsageType;_this2167.PredefinedType=PredefinedType;_this2167.type=1891881377;return _this2167;}return _createClass(IfcRailwayPart);}(IfcFacilityPart);IFC4X32.IfcRailwayPart=IfcRailwayPart;var IfcRampFlightType=/*#__PURE__*/function(_IfcBuiltElementType17){_inherits(IfcRampFlightType,_IfcBuiltElementType17);var _super2171=_createSuper(IfcRampFlightType);function IfcRampFlightType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2168;_classCallCheck(this,IfcRampFlightType);_this2168=_super2171.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2168.GlobalId=GlobalId;_this2168.OwnerHistory=OwnerHistory;_this2168.Name=Name;_this2168.Description=Description;_this2168.ApplicableOccurrence=ApplicableOccurrence;_this2168.HasPropertySets=HasPropertySets;_this2168.RepresentationMaps=RepresentationMaps;_this2168.Tag=Tag;_this2168.ElementType=ElementType;_this2168.PredefinedType=PredefinedType;_this2168.type=2324767716;return _this2168;}return _createClass(IfcRampFlightType);}(IfcBuiltElementType);IFC4X32.IfcRampFlightType=IfcRampFlightType;var IfcRampType=/*#__PURE__*/function(_IfcBuiltElementType18){_inherits(IfcRampType,_IfcBuiltElementType18);var _super2172=_createSuper(IfcRampType);function IfcRampType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2169;_classCallCheck(this,IfcRampType);_this2169=_super2172.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2169.GlobalId=GlobalId;_this2169.OwnerHistory=OwnerHistory;_this2169.Name=Name;_this2169.Description=Description;_this2169.ApplicableOccurrence=ApplicableOccurrence;_this2169.HasPropertySets=HasPropertySets;_this2169.RepresentationMaps=RepresentationMaps;_this2169.Tag=Tag;_this2169.ElementType=ElementType;_this2169.PredefinedType=PredefinedType;_this2169.type=1469900589;return _this2169;}return _createClass(IfcRampType);}(IfcBuiltElementType);IFC4X32.IfcRampType=IfcRampType;var IfcRationalBSplineSurfaceWithKnots=/*#__PURE__*/function(_IfcBSplineSurfaceWit2){_inherits(IfcRationalBSplineSurfaceWithKnots,_IfcBSplineSurfaceWit2);var _super2173=_createSuper(IfcRationalBSplineSurfaceWithKnots);function IfcRationalBSplineSurfaceWithKnots(expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect,UMultiplicities,VMultiplicities,UKnots,VKnots,KnotSpec,WeightsData){var _this2170;_classCallCheck(this,IfcRationalBSplineSurfaceWithKnots);_this2170=_super2173.call(this,expressID,UDegree,VDegree,ControlPointsList,SurfaceForm,UClosed,VClosed,SelfIntersect,UMultiplicities,VMultiplicities,UKnots,VKnots,KnotSpec);_this2170.UDegree=UDegree;_this2170.VDegree=VDegree;_this2170.ControlPointsList=ControlPointsList;_this2170.SurfaceForm=SurfaceForm;_this2170.UClosed=UClosed;_this2170.VClosed=VClosed;_this2170.SelfIntersect=SelfIntersect;_this2170.UMultiplicities=UMultiplicities;_this2170.VMultiplicities=VMultiplicities;_this2170.UKnots=UKnots;_this2170.VKnots=VKnots;_this2170.KnotSpec=KnotSpec;_this2170.WeightsData=WeightsData;_this2170.type=683857671;return _this2170;}return _createClass(IfcRationalBSplineSurfaceWithKnots);}(IfcBSplineSurfaceWithKnots);IFC4X32.IfcRationalBSplineSurfaceWithKnots=IfcRationalBSplineSurfaceWithKnots;var IfcReferent=/*#__PURE__*/function(_IfcPositioningElemen){_inherits(IfcReferent,_IfcPositioningElemen);var _super2174=_createSuper(IfcReferent);function IfcReferent(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType){var _this2171;_classCallCheck(this,IfcReferent);_this2171=_super2174.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2171.GlobalId=GlobalId;_this2171.OwnerHistory=OwnerHistory;_this2171.Name=Name;_this2171.Description=Description;_this2171.ObjectType=ObjectType;_this2171.ObjectPlacement=ObjectPlacement;_this2171.Representation=Representation;_this2171.PredefinedType=PredefinedType;_this2171.type=4021432810;return _this2171;}return _createClass(IfcReferent);}(IfcPositioningElement);IFC4X32.IfcReferent=IfcReferent;var IfcReinforcingElement=/*#__PURE__*/function(_IfcElementComponent12){_inherits(IfcReinforcingElement,_IfcElementComponent12);var _super2175=_createSuper(IfcReinforcingElement);function IfcReinforcingElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade){var _this2172;_classCallCheck(this,IfcReinforcingElement);_this2172=_super2175.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2172.GlobalId=GlobalId;_this2172.OwnerHistory=OwnerHistory;_this2172.Name=Name;_this2172.Description=Description;_this2172.ObjectType=ObjectType;_this2172.ObjectPlacement=ObjectPlacement;_this2172.Representation=Representation;_this2172.Tag=Tag;_this2172.SteelGrade=SteelGrade;_this2172.type=3027567501;return _this2172;}return _createClass(IfcReinforcingElement);}(IfcElementComponent);IFC4X32.IfcReinforcingElement=IfcReinforcingElement;var IfcReinforcingElementType=/*#__PURE__*/function(_IfcElementComponentT12){_inherits(IfcReinforcingElementType,_IfcElementComponentT12);var _super2176=_createSuper(IfcReinforcingElementType);function IfcReinforcingElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2173;_classCallCheck(this,IfcReinforcingElementType);_this2173=_super2176.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2173.GlobalId=GlobalId;_this2173.OwnerHistory=OwnerHistory;_this2173.Name=Name;_this2173.Description=Description;_this2173.ApplicableOccurrence=ApplicableOccurrence;_this2173.HasPropertySets=HasPropertySets;_this2173.RepresentationMaps=RepresentationMaps;_this2173.Tag=Tag;_this2173.ElementType=ElementType;_this2173.type=964333572;return _this2173;}return _createClass(IfcReinforcingElementType);}(IfcElementComponentType);IFC4X32.IfcReinforcingElementType=IfcReinforcingElementType;var IfcReinforcingMesh=/*#__PURE__*/function(_IfcReinforcingElemen13){_inherits(IfcReinforcingMesh,_IfcReinforcingElemen13);var _super2177=_createSuper(IfcReinforcingMesh);function IfcReinforcingMesh(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,MeshLength,MeshWidth,LongitudinalBarNominalDiameter,TransverseBarNominalDiameter,LongitudinalBarCrossSectionArea,TransverseBarCrossSectionArea,LongitudinalBarSpacing,TransverseBarSpacing,PredefinedType){var _this2174;_classCallCheck(this,IfcReinforcingMesh);_this2174=_super2177.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this2174.GlobalId=GlobalId;_this2174.OwnerHistory=OwnerHistory;_this2174.Name=Name;_this2174.Description=Description;_this2174.ObjectType=ObjectType;_this2174.ObjectPlacement=ObjectPlacement;_this2174.Representation=Representation;_this2174.Tag=Tag;_this2174.SteelGrade=SteelGrade;_this2174.MeshLength=MeshLength;_this2174.MeshWidth=MeshWidth;_this2174.LongitudinalBarNominalDiameter=LongitudinalBarNominalDiameter;_this2174.TransverseBarNominalDiameter=TransverseBarNominalDiameter;_this2174.LongitudinalBarCrossSectionArea=LongitudinalBarCrossSectionArea;_this2174.TransverseBarCrossSectionArea=TransverseBarCrossSectionArea;_this2174.LongitudinalBarSpacing=LongitudinalBarSpacing;_this2174.TransverseBarSpacing=TransverseBarSpacing;_this2174.PredefinedType=PredefinedType;_this2174.type=2320036040;return _this2174;}return _createClass(IfcReinforcingMesh);}(IfcReinforcingElement);IFC4X32.IfcReinforcingMesh=IfcReinforcingMesh;var IfcReinforcingMeshType=/*#__PURE__*/function(_IfcReinforcingElemen14){_inherits(IfcReinforcingMeshType,_IfcReinforcingElemen14);var _super2178=_createSuper(IfcReinforcingMeshType);function IfcReinforcingMeshType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,MeshLength,MeshWidth,LongitudinalBarNominalDiameter,TransverseBarNominalDiameter,LongitudinalBarCrossSectionArea,TransverseBarCrossSectionArea,LongitudinalBarSpacing,TransverseBarSpacing,BendingShapeCode,BendingParameters){var _this2175;_classCallCheck(this,IfcReinforcingMeshType);_this2175=_super2178.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2175.GlobalId=GlobalId;_this2175.OwnerHistory=OwnerHistory;_this2175.Name=Name;_this2175.Description=Description;_this2175.ApplicableOccurrence=ApplicableOccurrence;_this2175.HasPropertySets=HasPropertySets;_this2175.RepresentationMaps=RepresentationMaps;_this2175.Tag=Tag;_this2175.ElementType=ElementType;_this2175.PredefinedType=PredefinedType;_this2175.MeshLength=MeshLength;_this2175.MeshWidth=MeshWidth;_this2175.LongitudinalBarNominalDiameter=LongitudinalBarNominalDiameter;_this2175.TransverseBarNominalDiameter=TransverseBarNominalDiameter;_this2175.LongitudinalBarCrossSectionArea=LongitudinalBarCrossSectionArea;_this2175.TransverseBarCrossSectionArea=TransverseBarCrossSectionArea;_this2175.LongitudinalBarSpacing=LongitudinalBarSpacing;_this2175.TransverseBarSpacing=TransverseBarSpacing;_this2175.BendingShapeCode=BendingShapeCode;_this2175.BendingParameters=BendingParameters;_this2175.type=2310774935;return _this2175;}return _createClass(IfcReinforcingMeshType);}(IfcReinforcingElementType);IFC4X32.IfcReinforcingMeshType=IfcReinforcingMeshType;var IfcRelAdheresToElement=/*#__PURE__*/function(_IfcRelDecomposes10){_inherits(IfcRelAdheresToElement,_IfcRelDecomposes10);var _super2179=_createSuper(IfcRelAdheresToElement);function IfcRelAdheresToElement(expressID,GlobalId,OwnerHistory,Name,Description,RelatingElement,RelatedSurfaceFeatures){var _this2176;_classCallCheck(this,IfcRelAdheresToElement);_this2176=_super2179.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2176.GlobalId=GlobalId;_this2176.OwnerHistory=OwnerHistory;_this2176.Name=Name;_this2176.Description=Description;_this2176.RelatingElement=RelatingElement;_this2176.RelatedSurfaceFeatures=RelatedSurfaceFeatures;_this2176.type=3818125796;return _this2176;}return _createClass(IfcRelAdheresToElement);}(IfcRelDecomposes);IFC4X32.IfcRelAdheresToElement=IfcRelAdheresToElement;var IfcRelAggregates=/*#__PURE__*/function(_IfcRelDecomposes11){_inherits(IfcRelAggregates,_IfcRelDecomposes11);var _super2180=_createSuper(IfcRelAggregates);function IfcRelAggregates(expressID,GlobalId,OwnerHistory,Name,Description,RelatingObject,RelatedObjects){var _this2177;_classCallCheck(this,IfcRelAggregates);_this2177=_super2180.call(this,expressID,GlobalId,OwnerHistory,Name,Description);_this2177.GlobalId=GlobalId;_this2177.OwnerHistory=OwnerHistory;_this2177.Name=Name;_this2177.Description=Description;_this2177.RelatingObject=RelatingObject;_this2177.RelatedObjects=RelatedObjects;_this2177.type=160246688;return _this2177;}return _createClass(IfcRelAggregates);}(IfcRelDecomposes);IFC4X32.IfcRelAggregates=IfcRelAggregates;var IfcRoad=/*#__PURE__*/function(_IfcFacility3){_inherits(IfcRoad,_IfcFacility3);var _super2181=_createSuper(IfcRoad);function IfcRoad(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,PredefinedType){var _this2178;_classCallCheck(this,IfcRoad);_this2178=_super2181.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2178.GlobalId=GlobalId;_this2178.OwnerHistory=OwnerHistory;_this2178.Name=Name;_this2178.Description=Description;_this2178.ObjectType=ObjectType;_this2178.ObjectPlacement=ObjectPlacement;_this2178.Representation=Representation;_this2178.LongName=LongName;_this2178.CompositionType=CompositionType;_this2178.PredefinedType=PredefinedType;_this2178.type=146592293;return _this2178;}return _createClass(IfcRoad);}(IfcFacility);IFC4X32.IfcRoad=IfcRoad;var IfcRoadPart=/*#__PURE__*/function(_IfcFacilityPart4){_inherits(IfcRoadPart,_IfcFacilityPart4);var _super2182=_createSuper(IfcRoadPart);function IfcRoadPart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType,PredefinedType){var _this2179;_classCallCheck(this,IfcRoadPart);_this2179=_super2182.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType);_this2179.GlobalId=GlobalId;_this2179.OwnerHistory=OwnerHistory;_this2179.Name=Name;_this2179.Description=Description;_this2179.ObjectType=ObjectType;_this2179.ObjectPlacement=ObjectPlacement;_this2179.Representation=Representation;_this2179.LongName=LongName;_this2179.CompositionType=CompositionType;_this2179.UsageType=UsageType;_this2179.PredefinedType=PredefinedType;_this2179.type=550521510;return _this2179;}return _createClass(IfcRoadPart);}(IfcFacilityPart);IFC4X32.IfcRoadPart=IfcRoadPart;var IfcRoofType=/*#__PURE__*/function(_IfcBuiltElementType19){_inherits(IfcRoofType,_IfcBuiltElementType19);var _super2183=_createSuper(IfcRoofType);function IfcRoofType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2180;_classCallCheck(this,IfcRoofType);_this2180=_super2183.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2180.GlobalId=GlobalId;_this2180.OwnerHistory=OwnerHistory;_this2180.Name=Name;_this2180.Description=Description;_this2180.ApplicableOccurrence=ApplicableOccurrence;_this2180.HasPropertySets=HasPropertySets;_this2180.RepresentationMaps=RepresentationMaps;_this2180.Tag=Tag;_this2180.ElementType=ElementType;_this2180.PredefinedType=PredefinedType;_this2180.type=2781568857;return _this2180;}return _createClass(IfcRoofType);}(IfcBuiltElementType);IFC4X32.IfcRoofType=IfcRoofType;var IfcSanitaryTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType31){_inherits(IfcSanitaryTerminalType,_IfcFlowTerminalType31);var _super2184=_createSuper(IfcSanitaryTerminalType);function IfcSanitaryTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2181;_classCallCheck(this,IfcSanitaryTerminalType);_this2181=_super2184.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2181.GlobalId=GlobalId;_this2181.OwnerHistory=OwnerHistory;_this2181.Name=Name;_this2181.Description=Description;_this2181.ApplicableOccurrence=ApplicableOccurrence;_this2181.HasPropertySets=HasPropertySets;_this2181.RepresentationMaps=RepresentationMaps;_this2181.Tag=Tag;_this2181.ElementType=ElementType;_this2181.PredefinedType=PredefinedType;_this2181.type=1768891740;return _this2181;}return _createClass(IfcSanitaryTerminalType);}(IfcFlowTerminalType);IFC4X32.IfcSanitaryTerminalType=IfcSanitaryTerminalType;var IfcSeamCurve=/*#__PURE__*/function(_IfcSurfaceCurve4){_inherits(IfcSeamCurve,_IfcSurfaceCurve4);var _super2185=_createSuper(IfcSeamCurve);function IfcSeamCurve(expressID,Curve3D,AssociatedGeometry,MasterRepresentation){var _this2182;_classCallCheck(this,IfcSeamCurve);_this2182=_super2185.call(this,expressID,Curve3D,AssociatedGeometry,MasterRepresentation);_this2182.Curve3D=Curve3D;_this2182.AssociatedGeometry=AssociatedGeometry;_this2182.MasterRepresentation=MasterRepresentation;_this2182.type=2157484638;return _this2182;}return _createClass(IfcSeamCurve);}(IfcSurfaceCurve);IFC4X32.IfcSeamCurve=IfcSeamCurve;var IfcSecondOrderPolynomialSpiral=/*#__PURE__*/function(_IfcSpiral4){_inherits(IfcSecondOrderPolynomialSpiral,_IfcSpiral4);var _super2186=_createSuper(IfcSecondOrderPolynomialSpiral);function IfcSecondOrderPolynomialSpiral(expressID,Position,QuadraticTerm,LinearTerm,ConstantTerm){var _this2183;_classCallCheck(this,IfcSecondOrderPolynomialSpiral);_this2183=_super2186.call(this,expressID,Position);_this2183.Position=Position;_this2183.QuadraticTerm=QuadraticTerm;_this2183.LinearTerm=LinearTerm;_this2183.ConstantTerm=ConstantTerm;_this2183.type=3649235739;return _this2183;}return _createClass(IfcSecondOrderPolynomialSpiral);}(IfcSpiral);IFC4X32.IfcSecondOrderPolynomialSpiral=IfcSecondOrderPolynomialSpiral;var IfcSegmentedReferenceCurve=/*#__PURE__*/function(_IfcCompositeCurve5){_inherits(IfcSegmentedReferenceCurve,_IfcCompositeCurve5);var _super2187=_createSuper(IfcSegmentedReferenceCurve);function IfcSegmentedReferenceCurve(expressID,Segments,SelfIntersect,BaseCurve,EndPoint){var _this2184;_classCallCheck(this,IfcSegmentedReferenceCurve);_this2184=_super2187.call(this,expressID,Segments,SelfIntersect);_this2184.Segments=Segments;_this2184.SelfIntersect=SelfIntersect;_this2184.BaseCurve=BaseCurve;_this2184.EndPoint=EndPoint;_this2184.type=544395925;return _this2184;}return _createClass(IfcSegmentedReferenceCurve);}(IfcCompositeCurve);IFC4X32.IfcSegmentedReferenceCurve=IfcSegmentedReferenceCurve;var IfcSeventhOrderPolynomialSpiral=/*#__PURE__*/function(_IfcSpiral5){_inherits(IfcSeventhOrderPolynomialSpiral,_IfcSpiral5);var _super2188=_createSuper(IfcSeventhOrderPolynomialSpiral);function IfcSeventhOrderPolynomialSpiral(expressID,Position,SepticTerm,SexticTerm,QuinticTerm,QuarticTerm,CubicTerm,QuadraticTerm,LinearTerm,ConstantTerm){var _this2185;_classCallCheck(this,IfcSeventhOrderPolynomialSpiral);_this2185=_super2188.call(this,expressID,Position);_this2185.Position=Position;_this2185.SepticTerm=SepticTerm;_this2185.SexticTerm=SexticTerm;_this2185.QuinticTerm=QuinticTerm;_this2185.QuarticTerm=QuarticTerm;_this2185.CubicTerm=CubicTerm;_this2185.QuadraticTerm=QuadraticTerm;_this2185.LinearTerm=LinearTerm;_this2185.ConstantTerm=ConstantTerm;_this2185.type=1027922057;return _this2185;}return _createClass(IfcSeventhOrderPolynomialSpiral);}(IfcSpiral);IFC4X32.IfcSeventhOrderPolynomialSpiral=IfcSeventhOrderPolynomialSpiral;var IfcShadingDeviceType=/*#__PURE__*/function(_IfcBuiltElementType20){_inherits(IfcShadingDeviceType,_IfcBuiltElementType20);var _super2189=_createSuper(IfcShadingDeviceType);function IfcShadingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2186;_classCallCheck(this,IfcShadingDeviceType);_this2186=_super2189.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2186.GlobalId=GlobalId;_this2186.OwnerHistory=OwnerHistory;_this2186.Name=Name;_this2186.Description=Description;_this2186.ApplicableOccurrence=ApplicableOccurrence;_this2186.HasPropertySets=HasPropertySets;_this2186.RepresentationMaps=RepresentationMaps;_this2186.Tag=Tag;_this2186.ElementType=ElementType;_this2186.PredefinedType=PredefinedType;_this2186.type=4074543187;return _this2186;}return _createClass(IfcShadingDeviceType);}(IfcBuiltElementType);IFC4X32.IfcShadingDeviceType=IfcShadingDeviceType;var IfcSign=/*#__PURE__*/function(_IfcElementComponent13){_inherits(IfcSign,_IfcElementComponent13);var _super2190=_createSuper(IfcSign);function IfcSign(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2187;_classCallCheck(this,IfcSign);_this2187=_super2190.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2187.GlobalId=GlobalId;_this2187.OwnerHistory=OwnerHistory;_this2187.Name=Name;_this2187.Description=Description;_this2187.ObjectType=ObjectType;_this2187.ObjectPlacement=ObjectPlacement;_this2187.Representation=Representation;_this2187.Tag=Tag;_this2187.PredefinedType=PredefinedType;_this2187.type=33720170;return _this2187;}return _createClass(IfcSign);}(IfcElementComponent);IFC4X32.IfcSign=IfcSign;var IfcSignType=/*#__PURE__*/function(_IfcElementComponentT13){_inherits(IfcSignType,_IfcElementComponentT13);var _super2191=_createSuper(IfcSignType);function IfcSignType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2188;_classCallCheck(this,IfcSignType);_this2188=_super2191.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2188.GlobalId=GlobalId;_this2188.OwnerHistory=OwnerHistory;_this2188.Name=Name;_this2188.Description=Description;_this2188.ApplicableOccurrence=ApplicableOccurrence;_this2188.HasPropertySets=HasPropertySets;_this2188.RepresentationMaps=RepresentationMaps;_this2188.Tag=Tag;_this2188.ElementType=ElementType;_this2188.PredefinedType=PredefinedType;_this2188.type=3599934289;return _this2188;}return _createClass(IfcSignType);}(IfcElementComponentType);IFC4X32.IfcSignType=IfcSignType;var IfcSignalType=/*#__PURE__*/function(_IfcFlowTerminalType32){_inherits(IfcSignalType,_IfcFlowTerminalType32);var _super2192=_createSuper(IfcSignalType);function IfcSignalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2189;_classCallCheck(this,IfcSignalType);_this2189=_super2192.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2189.GlobalId=GlobalId;_this2189.OwnerHistory=OwnerHistory;_this2189.Name=Name;_this2189.Description=Description;_this2189.ApplicableOccurrence=ApplicableOccurrence;_this2189.HasPropertySets=HasPropertySets;_this2189.RepresentationMaps=RepresentationMaps;_this2189.Tag=Tag;_this2189.ElementType=ElementType;_this2189.PredefinedType=PredefinedType;_this2189.type=1894708472;return _this2189;}return _createClass(IfcSignalType);}(IfcFlowTerminalType);IFC4X32.IfcSignalType=IfcSignalType;var IfcSineSpiral=/*#__PURE__*/function(_IfcSpiral6){_inherits(IfcSineSpiral,_IfcSpiral6);var _super2193=_createSuper(IfcSineSpiral);function IfcSineSpiral(expressID,Position,SineTerm,LinearTerm,ConstantTerm){var _this2190;_classCallCheck(this,IfcSineSpiral);_this2190=_super2193.call(this,expressID,Position);_this2190.Position=Position;_this2190.SineTerm=SineTerm;_this2190.LinearTerm=LinearTerm;_this2190.ConstantTerm=ConstantTerm;_this2190.type=42703149;return _this2190;}return _createClass(IfcSineSpiral);}(IfcSpiral);IFC4X32.IfcSineSpiral=IfcSineSpiral;var IfcSite=/*#__PURE__*/function(_IfcSpatialStructureE14){_inherits(IfcSite,_IfcSpatialStructureE14);var _super2194=_createSuper(IfcSite);function IfcSite(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,RefLatitude,RefLongitude,RefElevation,LandTitleNumber,SiteAddress){var _this2191;_classCallCheck(this,IfcSite);_this2191=_super2194.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2191.GlobalId=GlobalId;_this2191.OwnerHistory=OwnerHistory;_this2191.Name=Name;_this2191.Description=Description;_this2191.ObjectType=ObjectType;_this2191.ObjectPlacement=ObjectPlacement;_this2191.Representation=Representation;_this2191.LongName=LongName;_this2191.CompositionType=CompositionType;_this2191.RefLatitude=RefLatitude;_this2191.RefLongitude=RefLongitude;_this2191.RefElevation=RefElevation;_this2191.LandTitleNumber=LandTitleNumber;_this2191.SiteAddress=SiteAddress;_this2191.type=4097777520;return _this2191;}return _createClass(IfcSite);}(IfcSpatialStructureElement);IFC4X32.IfcSite=IfcSite;var IfcSlabType=/*#__PURE__*/function(_IfcBuiltElementType21){_inherits(IfcSlabType,_IfcBuiltElementType21);var _super2195=_createSuper(IfcSlabType);function IfcSlabType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2192;_classCallCheck(this,IfcSlabType);_this2192=_super2195.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2192.GlobalId=GlobalId;_this2192.OwnerHistory=OwnerHistory;_this2192.Name=Name;_this2192.Description=Description;_this2192.ApplicableOccurrence=ApplicableOccurrence;_this2192.HasPropertySets=HasPropertySets;_this2192.RepresentationMaps=RepresentationMaps;_this2192.Tag=Tag;_this2192.ElementType=ElementType;_this2192.PredefinedType=PredefinedType;_this2192.type=2533589738;return _this2192;}return _createClass(IfcSlabType);}(IfcBuiltElementType);IFC4X32.IfcSlabType=IfcSlabType;var IfcSolarDeviceType=/*#__PURE__*/function(_IfcEnergyConversionD65){_inherits(IfcSolarDeviceType,_IfcEnergyConversionD65);var _super2196=_createSuper(IfcSolarDeviceType);function IfcSolarDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2193;_classCallCheck(this,IfcSolarDeviceType);_this2193=_super2196.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2193.GlobalId=GlobalId;_this2193.OwnerHistory=OwnerHistory;_this2193.Name=Name;_this2193.Description=Description;_this2193.ApplicableOccurrence=ApplicableOccurrence;_this2193.HasPropertySets=HasPropertySets;_this2193.RepresentationMaps=RepresentationMaps;_this2193.Tag=Tag;_this2193.ElementType=ElementType;_this2193.PredefinedType=PredefinedType;_this2193.type=1072016465;return _this2193;}return _createClass(IfcSolarDeviceType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcSolarDeviceType=IfcSolarDeviceType;var IfcSpace=/*#__PURE__*/function(_IfcSpatialStructureE15){_inherits(IfcSpace,_IfcSpatialStructureE15);var _super2197=_createSuper(IfcSpace);function IfcSpace(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,PredefinedType,ElevationWithFlooring){var _this2194;_classCallCheck(this,IfcSpace);_this2194=_super2197.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2194.GlobalId=GlobalId;_this2194.OwnerHistory=OwnerHistory;_this2194.Name=Name;_this2194.Description=Description;_this2194.ObjectType=ObjectType;_this2194.ObjectPlacement=ObjectPlacement;_this2194.Representation=Representation;_this2194.LongName=LongName;_this2194.CompositionType=CompositionType;_this2194.PredefinedType=PredefinedType;_this2194.ElevationWithFlooring=ElevationWithFlooring;_this2194.type=3856911033;return _this2194;}return _createClass(IfcSpace);}(IfcSpatialStructureElement);IFC4X32.IfcSpace=IfcSpace;var IfcSpaceHeaterType=/*#__PURE__*/function(_IfcFlowTerminalType33){_inherits(IfcSpaceHeaterType,_IfcFlowTerminalType33);var _super2198=_createSuper(IfcSpaceHeaterType);function IfcSpaceHeaterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2195;_classCallCheck(this,IfcSpaceHeaterType);_this2195=_super2198.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2195.GlobalId=GlobalId;_this2195.OwnerHistory=OwnerHistory;_this2195.Name=Name;_this2195.Description=Description;_this2195.ApplicableOccurrence=ApplicableOccurrence;_this2195.HasPropertySets=HasPropertySets;_this2195.RepresentationMaps=RepresentationMaps;_this2195.Tag=Tag;_this2195.ElementType=ElementType;_this2195.PredefinedType=PredefinedType;_this2195.type=1305183839;return _this2195;}return _createClass(IfcSpaceHeaterType);}(IfcFlowTerminalType);IFC4X32.IfcSpaceHeaterType=IfcSpaceHeaterType;var IfcSpaceType=/*#__PURE__*/function(_IfcSpatialStructureE16){_inherits(IfcSpaceType,_IfcSpatialStructureE16);var _super2199=_createSuper(IfcSpaceType);function IfcSpaceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,LongName){var _this2196;_classCallCheck(this,IfcSpaceType);_this2196=_super2199.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2196.GlobalId=GlobalId;_this2196.OwnerHistory=OwnerHistory;_this2196.Name=Name;_this2196.Description=Description;_this2196.ApplicableOccurrence=ApplicableOccurrence;_this2196.HasPropertySets=HasPropertySets;_this2196.RepresentationMaps=RepresentationMaps;_this2196.Tag=Tag;_this2196.ElementType=ElementType;_this2196.PredefinedType=PredefinedType;_this2196.LongName=LongName;_this2196.type=3812236995;return _this2196;}return _createClass(IfcSpaceType);}(IfcSpatialStructureElementType);IFC4X32.IfcSpaceType=IfcSpaceType;var IfcStackTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType34){_inherits(IfcStackTerminalType,_IfcFlowTerminalType34);var _super2200=_createSuper(IfcStackTerminalType);function IfcStackTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2197;_classCallCheck(this,IfcStackTerminalType);_this2197=_super2200.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2197.GlobalId=GlobalId;_this2197.OwnerHistory=OwnerHistory;_this2197.Name=Name;_this2197.Description=Description;_this2197.ApplicableOccurrence=ApplicableOccurrence;_this2197.HasPropertySets=HasPropertySets;_this2197.RepresentationMaps=RepresentationMaps;_this2197.Tag=Tag;_this2197.ElementType=ElementType;_this2197.PredefinedType=PredefinedType;_this2197.type=3112655638;return _this2197;}return _createClass(IfcStackTerminalType);}(IfcFlowTerminalType);IFC4X32.IfcStackTerminalType=IfcStackTerminalType;var IfcStairFlightType=/*#__PURE__*/function(_IfcBuiltElementType22){_inherits(IfcStairFlightType,_IfcBuiltElementType22);var _super2201=_createSuper(IfcStairFlightType);function IfcStairFlightType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2198;_classCallCheck(this,IfcStairFlightType);_this2198=_super2201.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2198.GlobalId=GlobalId;_this2198.OwnerHistory=OwnerHistory;_this2198.Name=Name;_this2198.Description=Description;_this2198.ApplicableOccurrence=ApplicableOccurrence;_this2198.HasPropertySets=HasPropertySets;_this2198.RepresentationMaps=RepresentationMaps;_this2198.Tag=Tag;_this2198.ElementType=ElementType;_this2198.PredefinedType=PredefinedType;_this2198.type=1039846685;return _this2198;}return _createClass(IfcStairFlightType);}(IfcBuiltElementType);IFC4X32.IfcStairFlightType=IfcStairFlightType;var IfcStairType=/*#__PURE__*/function(_IfcBuiltElementType23){_inherits(IfcStairType,_IfcBuiltElementType23);var _super2202=_createSuper(IfcStairType);function IfcStairType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2199;_classCallCheck(this,IfcStairType);_this2199=_super2202.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2199.GlobalId=GlobalId;_this2199.OwnerHistory=OwnerHistory;_this2199.Name=Name;_this2199.Description=Description;_this2199.ApplicableOccurrence=ApplicableOccurrence;_this2199.HasPropertySets=HasPropertySets;_this2199.RepresentationMaps=RepresentationMaps;_this2199.Tag=Tag;_this2199.ElementType=ElementType;_this2199.PredefinedType=PredefinedType;_this2199.type=338393293;return _this2199;}return _createClass(IfcStairType);}(IfcBuiltElementType);IFC4X32.IfcStairType=IfcStairType;var IfcStructuralAction=/*#__PURE__*/function(_IfcStructuralActivit6){_inherits(IfcStructuralAction,_IfcStructuralActivit6);var _super2203=_createSuper(IfcStructuralAction);function IfcStructuralAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad){var _this2200;_classCallCheck(this,IfcStructuralAction);_this2200=_super2203.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this2200.GlobalId=GlobalId;_this2200.OwnerHistory=OwnerHistory;_this2200.Name=Name;_this2200.Description=Description;_this2200.ObjectType=ObjectType;_this2200.ObjectPlacement=ObjectPlacement;_this2200.Representation=Representation;_this2200.AppliedLoad=AppliedLoad;_this2200.GlobalOrLocal=GlobalOrLocal;_this2200.DestabilizingLoad=DestabilizingLoad;_this2200.type=682877961;return _this2200;}return _createClass(IfcStructuralAction);}(IfcStructuralActivity);IFC4X32.IfcStructuralAction=IfcStructuralAction;var IfcStructuralConnection=/*#__PURE__*/function(_IfcStructuralItem6){_inherits(IfcStructuralConnection,_IfcStructuralItem6);var _super2204=_createSuper(IfcStructuralConnection);function IfcStructuralConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this2201;_classCallCheck(this,IfcStructuralConnection);_this2201=_super2204.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2201.GlobalId=GlobalId;_this2201.OwnerHistory=OwnerHistory;_this2201.Name=Name;_this2201.Description=Description;_this2201.ObjectType=ObjectType;_this2201.ObjectPlacement=ObjectPlacement;_this2201.Representation=Representation;_this2201.AppliedCondition=AppliedCondition;_this2201.type=1179482911;return _this2201;}return _createClass(IfcStructuralConnection);}(IfcStructuralItem);IFC4X32.IfcStructuralConnection=IfcStructuralConnection;var IfcStructuralCurveAction=/*#__PURE__*/function(_IfcStructuralAction7){_inherits(IfcStructuralCurveAction,_IfcStructuralAction7);var _super2205=_createSuper(IfcStructuralCurveAction);function IfcStructuralCurveAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this2202;_classCallCheck(this,IfcStructuralCurveAction);_this2202=_super2205.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad);_this2202.GlobalId=GlobalId;_this2202.OwnerHistory=OwnerHistory;_this2202.Name=Name;_this2202.Description=Description;_this2202.ObjectType=ObjectType;_this2202.ObjectPlacement=ObjectPlacement;_this2202.Representation=Representation;_this2202.AppliedLoad=AppliedLoad;_this2202.GlobalOrLocal=GlobalOrLocal;_this2202.DestabilizingLoad=DestabilizingLoad;_this2202.ProjectedOrTrue=ProjectedOrTrue;_this2202.PredefinedType=PredefinedType;_this2202.type=1004757350;return _this2202;}return _createClass(IfcStructuralCurveAction);}(IfcStructuralAction);IFC4X32.IfcStructuralCurveAction=IfcStructuralCurveAction;var IfcStructuralCurveConnection=/*#__PURE__*/function(_IfcStructuralConnect13){_inherits(IfcStructuralCurveConnection,_IfcStructuralConnect13);var _super2206=_createSuper(IfcStructuralCurveConnection);function IfcStructuralCurveConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition,AxisDirection){var _this2203;_classCallCheck(this,IfcStructuralCurveConnection);_this2203=_super2206.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this2203.GlobalId=GlobalId;_this2203.OwnerHistory=OwnerHistory;_this2203.Name=Name;_this2203.Description=Description;_this2203.ObjectType=ObjectType;_this2203.ObjectPlacement=ObjectPlacement;_this2203.Representation=Representation;_this2203.AppliedCondition=AppliedCondition;_this2203.AxisDirection=AxisDirection;_this2203.type=4243806635;return _this2203;}return _createClass(IfcStructuralCurveConnection);}(IfcStructuralConnection);IFC4X32.IfcStructuralCurveConnection=IfcStructuralCurveConnection;var IfcStructuralCurveMember=/*#__PURE__*/function(_IfcStructuralMember6){_inherits(IfcStructuralCurveMember,_IfcStructuralMember6);var _super2207=_createSuper(IfcStructuralCurveMember);function IfcStructuralCurveMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Axis){var _this2204;_classCallCheck(this,IfcStructuralCurveMember);_this2204=_super2207.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2204.GlobalId=GlobalId;_this2204.OwnerHistory=OwnerHistory;_this2204.Name=Name;_this2204.Description=Description;_this2204.ObjectType=ObjectType;_this2204.ObjectPlacement=ObjectPlacement;_this2204.Representation=Representation;_this2204.PredefinedType=PredefinedType;_this2204.Axis=Axis;_this2204.type=214636428;return _this2204;}return _createClass(IfcStructuralCurveMember);}(IfcStructuralMember);IFC4X32.IfcStructuralCurveMember=IfcStructuralCurveMember;var IfcStructuralCurveMemberVarying=/*#__PURE__*/function(_IfcStructuralCurveMe3){_inherits(IfcStructuralCurveMemberVarying,_IfcStructuralCurveMe3);var _super2208=_createSuper(IfcStructuralCurveMemberVarying);function IfcStructuralCurveMemberVarying(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Axis){var _this2205;_classCallCheck(this,IfcStructuralCurveMemberVarying);_this2205=_super2208.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType,Axis);_this2205.GlobalId=GlobalId;_this2205.OwnerHistory=OwnerHistory;_this2205.Name=Name;_this2205.Description=Description;_this2205.ObjectType=ObjectType;_this2205.ObjectPlacement=ObjectPlacement;_this2205.Representation=Representation;_this2205.PredefinedType=PredefinedType;_this2205.Axis=Axis;_this2205.type=2445595289;return _this2205;}return _createClass(IfcStructuralCurveMemberVarying);}(IfcStructuralCurveMember);IFC4X32.IfcStructuralCurveMemberVarying=IfcStructuralCurveMemberVarying;var IfcStructuralCurveReaction=/*#__PURE__*/function(_IfcStructuralReactio6){_inherits(IfcStructuralCurveReaction,_IfcStructuralReactio6);var _super2209=_createSuper(IfcStructuralCurveReaction);function IfcStructuralCurveReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,PredefinedType){var _this2206;_classCallCheck(this,IfcStructuralCurveReaction);_this2206=_super2209.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this2206.GlobalId=GlobalId;_this2206.OwnerHistory=OwnerHistory;_this2206.Name=Name;_this2206.Description=Description;_this2206.ObjectType=ObjectType;_this2206.ObjectPlacement=ObjectPlacement;_this2206.Representation=Representation;_this2206.AppliedLoad=AppliedLoad;_this2206.GlobalOrLocal=GlobalOrLocal;_this2206.PredefinedType=PredefinedType;_this2206.type=2757150158;return _this2206;}return _createClass(IfcStructuralCurveReaction);}(IfcStructuralReaction);IFC4X32.IfcStructuralCurveReaction=IfcStructuralCurveReaction;var IfcStructuralLinearAction=/*#__PURE__*/function(_IfcStructuralCurveAc2){_inherits(IfcStructuralLinearAction,_IfcStructuralCurveAc2);var _super2210=_createSuper(IfcStructuralLinearAction);function IfcStructuralLinearAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this2207;_classCallCheck(this,IfcStructuralLinearAction);_this2207=_super2210.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType);_this2207.GlobalId=GlobalId;_this2207.OwnerHistory=OwnerHistory;_this2207.Name=Name;_this2207.Description=Description;_this2207.ObjectType=ObjectType;_this2207.ObjectPlacement=ObjectPlacement;_this2207.Representation=Representation;_this2207.AppliedLoad=AppliedLoad;_this2207.GlobalOrLocal=GlobalOrLocal;_this2207.DestabilizingLoad=DestabilizingLoad;_this2207.ProjectedOrTrue=ProjectedOrTrue;_this2207.PredefinedType=PredefinedType;_this2207.type=1807405624;return _this2207;}return _createClass(IfcStructuralLinearAction);}(IfcStructuralCurveAction);IFC4X32.IfcStructuralLinearAction=IfcStructuralLinearAction;var IfcStructuralLoadGroup=/*#__PURE__*/function(_IfcGroup14){_inherits(IfcStructuralLoadGroup,_IfcGroup14);var _super2211=_createSuper(IfcStructuralLoadGroup);function IfcStructuralLoadGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,ActionType,ActionSource,Coefficient,Purpose){var _this2208;_classCallCheck(this,IfcStructuralLoadGroup);_this2208=_super2211.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2208.GlobalId=GlobalId;_this2208.OwnerHistory=OwnerHistory;_this2208.Name=Name;_this2208.Description=Description;_this2208.ObjectType=ObjectType;_this2208.PredefinedType=PredefinedType;_this2208.ActionType=ActionType;_this2208.ActionSource=ActionSource;_this2208.Coefficient=Coefficient;_this2208.Purpose=Purpose;_this2208.type=1252848954;return _this2208;}return _createClass(IfcStructuralLoadGroup);}(IfcGroup);IFC4X32.IfcStructuralLoadGroup=IfcStructuralLoadGroup;var IfcStructuralPointAction=/*#__PURE__*/function(_IfcStructuralAction8){_inherits(IfcStructuralPointAction,_IfcStructuralAction8);var _super2212=_createSuper(IfcStructuralPointAction);function IfcStructuralPointAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad){var _this2209;_classCallCheck(this,IfcStructuralPointAction);_this2209=_super2212.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad);_this2209.GlobalId=GlobalId;_this2209.OwnerHistory=OwnerHistory;_this2209.Name=Name;_this2209.Description=Description;_this2209.ObjectType=ObjectType;_this2209.ObjectPlacement=ObjectPlacement;_this2209.Representation=Representation;_this2209.AppliedLoad=AppliedLoad;_this2209.GlobalOrLocal=GlobalOrLocal;_this2209.DestabilizingLoad=DestabilizingLoad;_this2209.type=2082059205;return _this2209;}return _createClass(IfcStructuralPointAction);}(IfcStructuralAction);IFC4X32.IfcStructuralPointAction=IfcStructuralPointAction;var IfcStructuralPointConnection=/*#__PURE__*/function(_IfcStructuralConnect14){_inherits(IfcStructuralPointConnection,_IfcStructuralConnect14);var _super2213=_createSuper(IfcStructuralPointConnection);function IfcStructuralPointConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition,ConditionCoordinateSystem){var _this2210;_classCallCheck(this,IfcStructuralPointConnection);_this2210=_super2213.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this2210.GlobalId=GlobalId;_this2210.OwnerHistory=OwnerHistory;_this2210.Name=Name;_this2210.Description=Description;_this2210.ObjectType=ObjectType;_this2210.ObjectPlacement=ObjectPlacement;_this2210.Representation=Representation;_this2210.AppliedCondition=AppliedCondition;_this2210.ConditionCoordinateSystem=ConditionCoordinateSystem;_this2210.type=734778138;return _this2210;}return _createClass(IfcStructuralPointConnection);}(IfcStructuralConnection);IFC4X32.IfcStructuralPointConnection=IfcStructuralPointConnection;var IfcStructuralPointReaction=/*#__PURE__*/function(_IfcStructuralReactio7){_inherits(IfcStructuralPointReaction,_IfcStructuralReactio7);var _super2214=_createSuper(IfcStructuralPointReaction);function IfcStructuralPointReaction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal){var _this2211;_classCallCheck(this,IfcStructuralPointReaction);_this2211=_super2214.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal);_this2211.GlobalId=GlobalId;_this2211.OwnerHistory=OwnerHistory;_this2211.Name=Name;_this2211.Description=Description;_this2211.ObjectType=ObjectType;_this2211.ObjectPlacement=ObjectPlacement;_this2211.Representation=Representation;_this2211.AppliedLoad=AppliedLoad;_this2211.GlobalOrLocal=GlobalOrLocal;_this2211.type=1235345126;return _this2211;}return _createClass(IfcStructuralPointReaction);}(IfcStructuralReaction);IFC4X32.IfcStructuralPointReaction=IfcStructuralPointReaction;var IfcStructuralResultGroup=/*#__PURE__*/function(_IfcGroup15){_inherits(IfcStructuralResultGroup,_IfcGroup15);var _super2215=_createSuper(IfcStructuralResultGroup);function IfcStructuralResultGroup(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,TheoryType,ResultForLoadGroup,IsLinear){var _this2212;_classCallCheck(this,IfcStructuralResultGroup);_this2212=_super2215.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2212.GlobalId=GlobalId;_this2212.OwnerHistory=OwnerHistory;_this2212.Name=Name;_this2212.Description=Description;_this2212.ObjectType=ObjectType;_this2212.TheoryType=TheoryType;_this2212.ResultForLoadGroup=ResultForLoadGroup;_this2212.IsLinear=IsLinear;_this2212.type=2986769608;return _this2212;}return _createClass(IfcStructuralResultGroup);}(IfcGroup);IFC4X32.IfcStructuralResultGroup=IfcStructuralResultGroup;var IfcStructuralSurfaceAction=/*#__PURE__*/function(_IfcStructuralAction9){_inherits(IfcStructuralSurfaceAction,_IfcStructuralAction9);var _super2216=_createSuper(IfcStructuralSurfaceAction);function IfcStructuralSurfaceAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this2213;_classCallCheck(this,IfcStructuralSurfaceAction);_this2213=_super2216.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad);_this2213.GlobalId=GlobalId;_this2213.OwnerHistory=OwnerHistory;_this2213.Name=Name;_this2213.Description=Description;_this2213.ObjectType=ObjectType;_this2213.ObjectPlacement=ObjectPlacement;_this2213.Representation=Representation;_this2213.AppliedLoad=AppliedLoad;_this2213.GlobalOrLocal=GlobalOrLocal;_this2213.DestabilizingLoad=DestabilizingLoad;_this2213.ProjectedOrTrue=ProjectedOrTrue;_this2213.PredefinedType=PredefinedType;_this2213.type=3657597509;return _this2213;}return _createClass(IfcStructuralSurfaceAction);}(IfcStructuralAction);IFC4X32.IfcStructuralSurfaceAction=IfcStructuralSurfaceAction;var IfcStructuralSurfaceConnection=/*#__PURE__*/function(_IfcStructuralConnect15){_inherits(IfcStructuralSurfaceConnection,_IfcStructuralConnect15);var _super2217=_createSuper(IfcStructuralSurfaceConnection);function IfcStructuralSurfaceConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition){var _this2214;_classCallCheck(this,IfcStructuralSurfaceConnection);_this2214=_super2217.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedCondition);_this2214.GlobalId=GlobalId;_this2214.OwnerHistory=OwnerHistory;_this2214.Name=Name;_this2214.Description=Description;_this2214.ObjectType=ObjectType;_this2214.ObjectPlacement=ObjectPlacement;_this2214.Representation=Representation;_this2214.AppliedCondition=AppliedCondition;_this2214.type=1975003073;return _this2214;}return _createClass(IfcStructuralSurfaceConnection);}(IfcStructuralConnection);IFC4X32.IfcStructuralSurfaceConnection=IfcStructuralSurfaceConnection;var IfcSubContractResource=/*#__PURE__*/function(_IfcConstructionResou27){_inherits(IfcSubContractResource,_IfcConstructionResou27);var _super2218=_createSuper(IfcSubContractResource);function IfcSubContractResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this2215;_classCallCheck(this,IfcSubContractResource);_this2215=_super2218.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this2215.GlobalId=GlobalId;_this2215.OwnerHistory=OwnerHistory;_this2215.Name=Name;_this2215.Description=Description;_this2215.ObjectType=ObjectType;_this2215.Identification=Identification;_this2215.LongDescription=LongDescription;_this2215.Usage=Usage;_this2215.BaseCosts=BaseCosts;_this2215.BaseQuantity=BaseQuantity;_this2215.PredefinedType=PredefinedType;_this2215.type=148013059;return _this2215;}return _createClass(IfcSubContractResource);}(IfcConstructionResource);IFC4X32.IfcSubContractResource=IfcSubContractResource;var IfcSurfaceFeature=/*#__PURE__*/function(_IfcFeatureElement8){_inherits(IfcSurfaceFeature,_IfcFeatureElement8);var _super2219=_createSuper(IfcSurfaceFeature);function IfcSurfaceFeature(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2216;_classCallCheck(this,IfcSurfaceFeature);_this2216=_super2219.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2216.GlobalId=GlobalId;_this2216.OwnerHistory=OwnerHistory;_this2216.Name=Name;_this2216.Description=Description;_this2216.ObjectType=ObjectType;_this2216.ObjectPlacement=ObjectPlacement;_this2216.Representation=Representation;_this2216.Tag=Tag;_this2216.PredefinedType=PredefinedType;_this2216.type=3101698114;return _this2216;}return _createClass(IfcSurfaceFeature);}(IfcFeatureElement);IFC4X32.IfcSurfaceFeature=IfcSurfaceFeature;var IfcSwitchingDeviceType=/*#__PURE__*/function(_IfcFlowControllerTyp18){_inherits(IfcSwitchingDeviceType,_IfcFlowControllerTyp18);var _super2220=_createSuper(IfcSwitchingDeviceType);function IfcSwitchingDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2217;_classCallCheck(this,IfcSwitchingDeviceType);_this2217=_super2220.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2217.GlobalId=GlobalId;_this2217.OwnerHistory=OwnerHistory;_this2217.Name=Name;_this2217.Description=Description;_this2217.ApplicableOccurrence=ApplicableOccurrence;_this2217.HasPropertySets=HasPropertySets;_this2217.RepresentationMaps=RepresentationMaps;_this2217.Tag=Tag;_this2217.ElementType=ElementType;_this2217.PredefinedType=PredefinedType;_this2217.type=2315554128;return _this2217;}return _createClass(IfcSwitchingDeviceType);}(IfcFlowControllerType);IFC4X32.IfcSwitchingDeviceType=IfcSwitchingDeviceType;var IfcSystem=/*#__PURE__*/function(_IfcGroup16){_inherits(IfcSystem,_IfcGroup16);var _super2221=_createSuper(IfcSystem);function IfcSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType){var _this2218;_classCallCheck(this,IfcSystem);_this2218=_super2221.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2218.GlobalId=GlobalId;_this2218.OwnerHistory=OwnerHistory;_this2218.Name=Name;_this2218.Description=Description;_this2218.ObjectType=ObjectType;_this2218.type=2254336722;return _this2218;}return _createClass(IfcSystem);}(IfcGroup);IFC4X32.IfcSystem=IfcSystem;var IfcSystemFurnitureElement=/*#__PURE__*/function(_IfcFurnishingElement10){_inherits(IfcSystemFurnitureElement,_IfcFurnishingElement10);var _super2222=_createSuper(IfcSystemFurnitureElement);function IfcSystemFurnitureElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2219;_classCallCheck(this,IfcSystemFurnitureElement);_this2219=_super2222.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2219.GlobalId=GlobalId;_this2219.OwnerHistory=OwnerHistory;_this2219.Name=Name;_this2219.Description=Description;_this2219.ObjectType=ObjectType;_this2219.ObjectPlacement=ObjectPlacement;_this2219.Representation=Representation;_this2219.Tag=Tag;_this2219.PredefinedType=PredefinedType;_this2219.type=413509423;return _this2219;}return _createClass(IfcSystemFurnitureElement);}(IfcFurnishingElement);IFC4X32.IfcSystemFurnitureElement=IfcSystemFurnitureElement;var IfcTankType=/*#__PURE__*/function(_IfcFlowStorageDevice7){_inherits(IfcTankType,_IfcFlowStorageDevice7);var _super2223=_createSuper(IfcTankType);function IfcTankType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2220;_classCallCheck(this,IfcTankType);_this2220=_super2223.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2220.GlobalId=GlobalId;_this2220.OwnerHistory=OwnerHistory;_this2220.Name=Name;_this2220.Description=Description;_this2220.ApplicableOccurrence=ApplicableOccurrence;_this2220.HasPropertySets=HasPropertySets;_this2220.RepresentationMaps=RepresentationMaps;_this2220.Tag=Tag;_this2220.ElementType=ElementType;_this2220.PredefinedType=PredefinedType;_this2220.type=5716631;return _this2220;}return _createClass(IfcTankType);}(IfcFlowStorageDeviceType);IFC4X32.IfcTankType=IfcTankType;var IfcTendon=/*#__PURE__*/function(_IfcReinforcingElemen15){_inherits(IfcTendon,_IfcReinforcingElemen15);var _super2224=_createSuper(IfcTendon);function IfcTendon(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,PredefinedType,NominalDiameter,CrossSectionArea,TensionForce,PreStress,FrictionCoefficient,AnchorageSlip,MinCurvatureRadius){var _this2221;_classCallCheck(this,IfcTendon);_this2221=_super2224.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this2221.GlobalId=GlobalId;_this2221.OwnerHistory=OwnerHistory;_this2221.Name=Name;_this2221.Description=Description;_this2221.ObjectType=ObjectType;_this2221.ObjectPlacement=ObjectPlacement;_this2221.Representation=Representation;_this2221.Tag=Tag;_this2221.SteelGrade=SteelGrade;_this2221.PredefinedType=PredefinedType;_this2221.NominalDiameter=NominalDiameter;_this2221.CrossSectionArea=CrossSectionArea;_this2221.TensionForce=TensionForce;_this2221.PreStress=PreStress;_this2221.FrictionCoefficient=FrictionCoefficient;_this2221.AnchorageSlip=AnchorageSlip;_this2221.MinCurvatureRadius=MinCurvatureRadius;_this2221.type=3824725483;return _this2221;}return _createClass(IfcTendon);}(IfcReinforcingElement);IFC4X32.IfcTendon=IfcTendon;var IfcTendonAnchor=/*#__PURE__*/function(_IfcReinforcingElemen16){_inherits(IfcTendonAnchor,_IfcReinforcingElemen16);var _super2225=_createSuper(IfcTendonAnchor);function IfcTendonAnchor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,PredefinedType){var _this2222;_classCallCheck(this,IfcTendonAnchor);_this2222=_super2225.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this2222.GlobalId=GlobalId;_this2222.OwnerHistory=OwnerHistory;_this2222.Name=Name;_this2222.Description=Description;_this2222.ObjectType=ObjectType;_this2222.ObjectPlacement=ObjectPlacement;_this2222.Representation=Representation;_this2222.Tag=Tag;_this2222.SteelGrade=SteelGrade;_this2222.PredefinedType=PredefinedType;_this2222.type=2347447852;return _this2222;}return _createClass(IfcTendonAnchor);}(IfcReinforcingElement);IFC4X32.IfcTendonAnchor=IfcTendonAnchor;var IfcTendonAnchorType=/*#__PURE__*/function(_IfcReinforcingElemen17){_inherits(IfcTendonAnchorType,_IfcReinforcingElemen17);var _super2226=_createSuper(IfcTendonAnchorType);function IfcTendonAnchorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2223;_classCallCheck(this,IfcTendonAnchorType);_this2223=_super2226.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2223.GlobalId=GlobalId;_this2223.OwnerHistory=OwnerHistory;_this2223.Name=Name;_this2223.Description=Description;_this2223.ApplicableOccurrence=ApplicableOccurrence;_this2223.HasPropertySets=HasPropertySets;_this2223.RepresentationMaps=RepresentationMaps;_this2223.Tag=Tag;_this2223.ElementType=ElementType;_this2223.PredefinedType=PredefinedType;_this2223.type=3081323446;return _this2223;}return _createClass(IfcTendonAnchorType);}(IfcReinforcingElementType);IFC4X32.IfcTendonAnchorType=IfcTendonAnchorType;var IfcTendonConduit=/*#__PURE__*/function(_IfcReinforcingElemen18){_inherits(IfcTendonConduit,_IfcReinforcingElemen18);var _super2227=_createSuper(IfcTendonConduit);function IfcTendonConduit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,PredefinedType){var _this2224;_classCallCheck(this,IfcTendonConduit);_this2224=_super2227.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this2224.GlobalId=GlobalId;_this2224.OwnerHistory=OwnerHistory;_this2224.Name=Name;_this2224.Description=Description;_this2224.ObjectType=ObjectType;_this2224.ObjectPlacement=ObjectPlacement;_this2224.Representation=Representation;_this2224.Tag=Tag;_this2224.SteelGrade=SteelGrade;_this2224.PredefinedType=PredefinedType;_this2224.type=3663046924;return _this2224;}return _createClass(IfcTendonConduit);}(IfcReinforcingElement);IFC4X32.IfcTendonConduit=IfcTendonConduit;var IfcTendonConduitType=/*#__PURE__*/function(_IfcReinforcingElemen19){_inherits(IfcTendonConduitType,_IfcReinforcingElemen19);var _super2228=_createSuper(IfcTendonConduitType);function IfcTendonConduitType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2225;_classCallCheck(this,IfcTendonConduitType);_this2225=_super2228.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2225.GlobalId=GlobalId;_this2225.OwnerHistory=OwnerHistory;_this2225.Name=Name;_this2225.Description=Description;_this2225.ApplicableOccurrence=ApplicableOccurrence;_this2225.HasPropertySets=HasPropertySets;_this2225.RepresentationMaps=RepresentationMaps;_this2225.Tag=Tag;_this2225.ElementType=ElementType;_this2225.PredefinedType=PredefinedType;_this2225.type=2281632017;return _this2225;}return _createClass(IfcTendonConduitType);}(IfcReinforcingElementType);IFC4X32.IfcTendonConduitType=IfcTendonConduitType;var IfcTendonType=/*#__PURE__*/function(_IfcReinforcingElemen20){_inherits(IfcTendonType,_IfcReinforcingElemen20);var _super2229=_createSuper(IfcTendonType);function IfcTendonType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,NominalDiameter,CrossSectionArea,SheathDiameter){var _this2226;_classCallCheck(this,IfcTendonType);_this2226=_super2229.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2226.GlobalId=GlobalId;_this2226.OwnerHistory=OwnerHistory;_this2226.Name=Name;_this2226.Description=Description;_this2226.ApplicableOccurrence=ApplicableOccurrence;_this2226.HasPropertySets=HasPropertySets;_this2226.RepresentationMaps=RepresentationMaps;_this2226.Tag=Tag;_this2226.ElementType=ElementType;_this2226.PredefinedType=PredefinedType;_this2226.NominalDiameter=NominalDiameter;_this2226.CrossSectionArea=CrossSectionArea;_this2226.SheathDiameter=SheathDiameter;_this2226.type=2415094496;return _this2226;}return _createClass(IfcTendonType);}(IfcReinforcingElementType);IFC4X32.IfcTendonType=IfcTendonType;var IfcTrackElementType=/*#__PURE__*/function(_IfcBuiltElementType24){_inherits(IfcTrackElementType,_IfcBuiltElementType24);var _super2230=_createSuper(IfcTrackElementType);function IfcTrackElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2227;_classCallCheck(this,IfcTrackElementType);_this2227=_super2230.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2227.GlobalId=GlobalId;_this2227.OwnerHistory=OwnerHistory;_this2227.Name=Name;_this2227.Description=Description;_this2227.ApplicableOccurrence=ApplicableOccurrence;_this2227.HasPropertySets=HasPropertySets;_this2227.RepresentationMaps=RepresentationMaps;_this2227.Tag=Tag;_this2227.ElementType=ElementType;_this2227.PredefinedType=PredefinedType;_this2227.type=618700268;return _this2227;}return _createClass(IfcTrackElementType);}(IfcBuiltElementType);IFC4X32.IfcTrackElementType=IfcTrackElementType;var IfcTransformerType=/*#__PURE__*/function(_IfcEnergyConversionD66){_inherits(IfcTransformerType,_IfcEnergyConversionD66);var _super2231=_createSuper(IfcTransformerType);function IfcTransformerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2228;_classCallCheck(this,IfcTransformerType);_this2228=_super2231.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2228.GlobalId=GlobalId;_this2228.OwnerHistory=OwnerHistory;_this2228.Name=Name;_this2228.Description=Description;_this2228.ApplicableOccurrence=ApplicableOccurrence;_this2228.HasPropertySets=HasPropertySets;_this2228.RepresentationMaps=RepresentationMaps;_this2228.Tag=Tag;_this2228.ElementType=ElementType;_this2228.PredefinedType=PredefinedType;_this2228.type=1692211062;return _this2228;}return _createClass(IfcTransformerType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcTransformerType=IfcTransformerType;var IfcTransportElementType=/*#__PURE__*/function(_IfcTransportationDev2){_inherits(IfcTransportElementType,_IfcTransportationDev2);var _super2232=_createSuper(IfcTransportElementType);function IfcTransportElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2229;_classCallCheck(this,IfcTransportElementType);_this2229=_super2232.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2229.GlobalId=GlobalId;_this2229.OwnerHistory=OwnerHistory;_this2229.Name=Name;_this2229.Description=Description;_this2229.ApplicableOccurrence=ApplicableOccurrence;_this2229.HasPropertySets=HasPropertySets;_this2229.RepresentationMaps=RepresentationMaps;_this2229.Tag=Tag;_this2229.ElementType=ElementType;_this2229.PredefinedType=PredefinedType;_this2229.type=2097647324;return _this2229;}return _createClass(IfcTransportElementType);}(IfcTransportationDeviceType);IFC4X32.IfcTransportElementType=IfcTransportElementType;var IfcTransportationDevice=/*#__PURE__*/function(_IfcElement27){_inherits(IfcTransportationDevice,_IfcElement27);var _super2233=_createSuper(IfcTransportationDevice);function IfcTransportationDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2230;_classCallCheck(this,IfcTransportationDevice);_this2230=_super2233.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2230.GlobalId=GlobalId;_this2230.OwnerHistory=OwnerHistory;_this2230.Name=Name;_this2230.Description=Description;_this2230.ObjectType=ObjectType;_this2230.ObjectPlacement=ObjectPlacement;_this2230.Representation=Representation;_this2230.Tag=Tag;_this2230.type=1953115116;return _this2230;}return _createClass(IfcTransportationDevice);}(IfcElement);IFC4X32.IfcTransportationDevice=IfcTransportationDevice;var IfcTrimmedCurve=/*#__PURE__*/function(_IfcBoundedCurve13){_inherits(IfcTrimmedCurve,_IfcBoundedCurve13);var _super2234=_createSuper(IfcTrimmedCurve);function IfcTrimmedCurve(expressID,BasisCurve,Trim1,Trim2,SenseAgreement,MasterRepresentation){var _this2231;_classCallCheck(this,IfcTrimmedCurve);_this2231=_super2234.call(this,expressID);_this2231.BasisCurve=BasisCurve;_this2231.Trim1=Trim1;_this2231.Trim2=Trim2;_this2231.SenseAgreement=SenseAgreement;_this2231.MasterRepresentation=MasterRepresentation;_this2231.type=3593883385;return _this2231;}return _createClass(IfcTrimmedCurve);}(IfcBoundedCurve);IFC4X32.IfcTrimmedCurve=IfcTrimmedCurve;var IfcTubeBundleType=/*#__PURE__*/function(_IfcEnergyConversionD67){_inherits(IfcTubeBundleType,_IfcEnergyConversionD67);var _super2235=_createSuper(IfcTubeBundleType);function IfcTubeBundleType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2232;_classCallCheck(this,IfcTubeBundleType);_this2232=_super2235.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2232.GlobalId=GlobalId;_this2232.OwnerHistory=OwnerHistory;_this2232.Name=Name;_this2232.Description=Description;_this2232.ApplicableOccurrence=ApplicableOccurrence;_this2232.HasPropertySets=HasPropertySets;_this2232.RepresentationMaps=RepresentationMaps;_this2232.Tag=Tag;_this2232.ElementType=ElementType;_this2232.PredefinedType=PredefinedType;_this2232.type=1600972822;return _this2232;}return _createClass(IfcTubeBundleType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcTubeBundleType=IfcTubeBundleType;var IfcUnitaryEquipmentType=/*#__PURE__*/function(_IfcEnergyConversionD68){_inherits(IfcUnitaryEquipmentType,_IfcEnergyConversionD68);var _super2236=_createSuper(IfcUnitaryEquipmentType);function IfcUnitaryEquipmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2233;_classCallCheck(this,IfcUnitaryEquipmentType);_this2233=_super2236.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2233.GlobalId=GlobalId;_this2233.OwnerHistory=OwnerHistory;_this2233.Name=Name;_this2233.Description=Description;_this2233.ApplicableOccurrence=ApplicableOccurrence;_this2233.HasPropertySets=HasPropertySets;_this2233.RepresentationMaps=RepresentationMaps;_this2233.Tag=Tag;_this2233.ElementType=ElementType;_this2233.PredefinedType=PredefinedType;_this2233.type=1911125066;return _this2233;}return _createClass(IfcUnitaryEquipmentType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcUnitaryEquipmentType=IfcUnitaryEquipmentType;var IfcValveType=/*#__PURE__*/function(_IfcFlowControllerTyp19){_inherits(IfcValveType,_IfcFlowControllerTyp19);var _super2237=_createSuper(IfcValveType);function IfcValveType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2234;_classCallCheck(this,IfcValveType);_this2234=_super2237.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2234.GlobalId=GlobalId;_this2234.OwnerHistory=OwnerHistory;_this2234.Name=Name;_this2234.Description=Description;_this2234.ApplicableOccurrence=ApplicableOccurrence;_this2234.HasPropertySets=HasPropertySets;_this2234.RepresentationMaps=RepresentationMaps;_this2234.Tag=Tag;_this2234.ElementType=ElementType;_this2234.PredefinedType=PredefinedType;_this2234.type=728799441;return _this2234;}return _createClass(IfcValveType);}(IfcFlowControllerType);IFC4X32.IfcValveType=IfcValveType;var IfcVehicle=/*#__PURE__*/function(_IfcTransportationDev3){_inherits(IfcVehicle,_IfcTransportationDev3);var _super2238=_createSuper(IfcVehicle);function IfcVehicle(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2235;_classCallCheck(this,IfcVehicle);_this2235=_super2238.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2235.GlobalId=GlobalId;_this2235.OwnerHistory=OwnerHistory;_this2235.Name=Name;_this2235.Description=Description;_this2235.ObjectType=ObjectType;_this2235.ObjectPlacement=ObjectPlacement;_this2235.Representation=Representation;_this2235.Tag=Tag;_this2235.PredefinedType=PredefinedType;_this2235.type=840318589;return _this2235;}return _createClass(IfcVehicle);}(IfcTransportationDevice);IFC4X32.IfcVehicle=IfcVehicle;var IfcVibrationDamper=/*#__PURE__*/function(_IfcElementComponent14){_inherits(IfcVibrationDamper,_IfcElementComponent14);var _super2239=_createSuper(IfcVibrationDamper);function IfcVibrationDamper(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2236;_classCallCheck(this,IfcVibrationDamper);_this2236=_super2239.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2236.GlobalId=GlobalId;_this2236.OwnerHistory=OwnerHistory;_this2236.Name=Name;_this2236.Description=Description;_this2236.ObjectType=ObjectType;_this2236.ObjectPlacement=ObjectPlacement;_this2236.Representation=Representation;_this2236.Tag=Tag;_this2236.PredefinedType=PredefinedType;_this2236.type=1530820697;return _this2236;}return _createClass(IfcVibrationDamper);}(IfcElementComponent);IFC4X32.IfcVibrationDamper=IfcVibrationDamper;var IfcVibrationDamperType=/*#__PURE__*/function(_IfcElementComponentT14){_inherits(IfcVibrationDamperType,_IfcElementComponentT14);var _super2240=_createSuper(IfcVibrationDamperType);function IfcVibrationDamperType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2237;_classCallCheck(this,IfcVibrationDamperType);_this2237=_super2240.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2237.GlobalId=GlobalId;_this2237.OwnerHistory=OwnerHistory;_this2237.Name=Name;_this2237.Description=Description;_this2237.ApplicableOccurrence=ApplicableOccurrence;_this2237.HasPropertySets=HasPropertySets;_this2237.RepresentationMaps=RepresentationMaps;_this2237.Tag=Tag;_this2237.ElementType=ElementType;_this2237.PredefinedType=PredefinedType;_this2237.type=3956297820;return _this2237;}return _createClass(IfcVibrationDamperType);}(IfcElementComponentType);IFC4X32.IfcVibrationDamperType=IfcVibrationDamperType;var IfcVibrationIsolator=/*#__PURE__*/function(_IfcElementComponent15){_inherits(IfcVibrationIsolator,_IfcElementComponent15);var _super2241=_createSuper(IfcVibrationIsolator);function IfcVibrationIsolator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2238;_classCallCheck(this,IfcVibrationIsolator);_this2238=_super2241.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2238.GlobalId=GlobalId;_this2238.OwnerHistory=OwnerHistory;_this2238.Name=Name;_this2238.Description=Description;_this2238.ObjectType=ObjectType;_this2238.ObjectPlacement=ObjectPlacement;_this2238.Representation=Representation;_this2238.Tag=Tag;_this2238.PredefinedType=PredefinedType;_this2238.type=2391383451;return _this2238;}return _createClass(IfcVibrationIsolator);}(IfcElementComponent);IFC4X32.IfcVibrationIsolator=IfcVibrationIsolator;var IfcVibrationIsolatorType=/*#__PURE__*/function(_IfcElementComponentT15){_inherits(IfcVibrationIsolatorType,_IfcElementComponentT15);var _super2242=_createSuper(IfcVibrationIsolatorType);function IfcVibrationIsolatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2239;_classCallCheck(this,IfcVibrationIsolatorType);_this2239=_super2242.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2239.GlobalId=GlobalId;_this2239.OwnerHistory=OwnerHistory;_this2239.Name=Name;_this2239.Description=Description;_this2239.ApplicableOccurrence=ApplicableOccurrence;_this2239.HasPropertySets=HasPropertySets;_this2239.RepresentationMaps=RepresentationMaps;_this2239.Tag=Tag;_this2239.ElementType=ElementType;_this2239.PredefinedType=PredefinedType;_this2239.type=3313531582;return _this2239;}return _createClass(IfcVibrationIsolatorType);}(IfcElementComponentType);IFC4X32.IfcVibrationIsolatorType=IfcVibrationIsolatorType;var IfcVirtualElement=/*#__PURE__*/function(_IfcElement28){_inherits(IfcVirtualElement,_IfcElement28);var _super2243=_createSuper(IfcVirtualElement);function IfcVirtualElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2240;_classCallCheck(this,IfcVirtualElement);_this2240=_super2243.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2240.GlobalId=GlobalId;_this2240.OwnerHistory=OwnerHistory;_this2240.Name=Name;_this2240.Description=Description;_this2240.ObjectType=ObjectType;_this2240.ObjectPlacement=ObjectPlacement;_this2240.Representation=Representation;_this2240.Tag=Tag;_this2240.PredefinedType=PredefinedType;_this2240.type=2769231204;return _this2240;}return _createClass(IfcVirtualElement);}(IfcElement);IFC4X32.IfcVirtualElement=IfcVirtualElement;var IfcVoidingFeature=/*#__PURE__*/function(_IfcFeatureElementSub6){_inherits(IfcVoidingFeature,_IfcFeatureElementSub6);var _super2244=_createSuper(IfcVoidingFeature);function IfcVoidingFeature(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2241;_classCallCheck(this,IfcVoidingFeature);_this2241=_super2244.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2241.GlobalId=GlobalId;_this2241.OwnerHistory=OwnerHistory;_this2241.Name=Name;_this2241.Description=Description;_this2241.ObjectType=ObjectType;_this2241.ObjectPlacement=ObjectPlacement;_this2241.Representation=Representation;_this2241.Tag=Tag;_this2241.PredefinedType=PredefinedType;_this2241.type=926996030;return _this2241;}return _createClass(IfcVoidingFeature);}(IfcFeatureElementSubtraction);IFC4X32.IfcVoidingFeature=IfcVoidingFeature;var IfcWallType=/*#__PURE__*/function(_IfcBuiltElementType25){_inherits(IfcWallType,_IfcBuiltElementType25);var _super2245=_createSuper(IfcWallType);function IfcWallType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2242;_classCallCheck(this,IfcWallType);_this2242=_super2245.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2242.GlobalId=GlobalId;_this2242.OwnerHistory=OwnerHistory;_this2242.Name=Name;_this2242.Description=Description;_this2242.ApplicableOccurrence=ApplicableOccurrence;_this2242.HasPropertySets=HasPropertySets;_this2242.RepresentationMaps=RepresentationMaps;_this2242.Tag=Tag;_this2242.ElementType=ElementType;_this2242.PredefinedType=PredefinedType;_this2242.type=1898987631;return _this2242;}return _createClass(IfcWallType);}(IfcBuiltElementType);IFC4X32.IfcWallType=IfcWallType;var IfcWasteTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType35){_inherits(IfcWasteTerminalType,_IfcFlowTerminalType35);var _super2246=_createSuper(IfcWasteTerminalType);function IfcWasteTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2243;_classCallCheck(this,IfcWasteTerminalType);_this2243=_super2246.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2243.GlobalId=GlobalId;_this2243.OwnerHistory=OwnerHistory;_this2243.Name=Name;_this2243.Description=Description;_this2243.ApplicableOccurrence=ApplicableOccurrence;_this2243.HasPropertySets=HasPropertySets;_this2243.RepresentationMaps=RepresentationMaps;_this2243.Tag=Tag;_this2243.ElementType=ElementType;_this2243.PredefinedType=PredefinedType;_this2243.type=1133259667;return _this2243;}return _createClass(IfcWasteTerminalType);}(IfcFlowTerminalType);IFC4X32.IfcWasteTerminalType=IfcWasteTerminalType;var IfcWindowType=/*#__PURE__*/function(_IfcBuiltElementType26){_inherits(IfcWindowType,_IfcBuiltElementType26);var _super2247=_createSuper(IfcWindowType);function IfcWindowType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,PartitioningType,ParameterTakesPrecedence,UserDefinedPartitioningType){var _this2244;_classCallCheck(this,IfcWindowType);_this2244=_super2247.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2244.GlobalId=GlobalId;_this2244.OwnerHistory=OwnerHistory;_this2244.Name=Name;_this2244.Description=Description;_this2244.ApplicableOccurrence=ApplicableOccurrence;_this2244.HasPropertySets=HasPropertySets;_this2244.RepresentationMaps=RepresentationMaps;_this2244.Tag=Tag;_this2244.ElementType=ElementType;_this2244.PredefinedType=PredefinedType;_this2244.PartitioningType=PartitioningType;_this2244.ParameterTakesPrecedence=ParameterTakesPrecedence;_this2244.UserDefinedPartitioningType=UserDefinedPartitioningType;_this2244.type=4009809668;return _this2244;}return _createClass(IfcWindowType);}(IfcBuiltElementType);IFC4X32.IfcWindowType=IfcWindowType;var IfcWorkCalendar=/*#__PURE__*/function(_IfcControl29){_inherits(IfcWorkCalendar,_IfcControl29);var _super2248=_createSuper(IfcWorkCalendar);function IfcWorkCalendar(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,WorkingTimes,ExceptionTimes,PredefinedType){var _this2245;_classCallCheck(this,IfcWorkCalendar);_this2245=_super2248.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2245.GlobalId=GlobalId;_this2245.OwnerHistory=OwnerHistory;_this2245.Name=Name;_this2245.Description=Description;_this2245.ObjectType=ObjectType;_this2245.Identification=Identification;_this2245.WorkingTimes=WorkingTimes;_this2245.ExceptionTimes=ExceptionTimes;_this2245.PredefinedType=PredefinedType;_this2245.type=4088093105;return _this2245;}return _createClass(IfcWorkCalendar);}(IfcControl);IFC4X32.IfcWorkCalendar=IfcWorkCalendar;var IfcWorkControl=/*#__PURE__*/function(_IfcControl30){_inherits(IfcWorkControl,_IfcControl30);var _super2249=_createSuper(IfcWorkControl);function IfcWorkControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime){var _this2246;_classCallCheck(this,IfcWorkControl);_this2246=_super2249.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2246.GlobalId=GlobalId;_this2246.OwnerHistory=OwnerHistory;_this2246.Name=Name;_this2246.Description=Description;_this2246.ObjectType=ObjectType;_this2246.Identification=Identification;_this2246.CreationDate=CreationDate;_this2246.Creators=Creators;_this2246.Purpose=Purpose;_this2246.Duration=Duration;_this2246.TotalFloat=TotalFloat;_this2246.StartTime=StartTime;_this2246.FinishTime=FinishTime;_this2246.type=1028945134;return _this2246;}return _createClass(IfcWorkControl);}(IfcControl);IFC4X32.IfcWorkControl=IfcWorkControl;var IfcWorkPlan=/*#__PURE__*/function(_IfcWorkControl5){_inherits(IfcWorkPlan,_IfcWorkControl5);var _super2250=_createSuper(IfcWorkPlan);function IfcWorkPlan(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,PredefinedType){var _this2247;_classCallCheck(this,IfcWorkPlan);_this2247=_super2250.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime);_this2247.GlobalId=GlobalId;_this2247.OwnerHistory=OwnerHistory;_this2247.Name=Name;_this2247.Description=Description;_this2247.ObjectType=ObjectType;_this2247.Identification=Identification;_this2247.CreationDate=CreationDate;_this2247.Creators=Creators;_this2247.Purpose=Purpose;_this2247.Duration=Duration;_this2247.TotalFloat=TotalFloat;_this2247.StartTime=StartTime;_this2247.FinishTime=FinishTime;_this2247.PredefinedType=PredefinedType;_this2247.type=4218914973;return _this2247;}return _createClass(IfcWorkPlan);}(IfcWorkControl);IFC4X32.IfcWorkPlan=IfcWorkPlan;var IfcWorkSchedule=/*#__PURE__*/function(_IfcWorkControl6){_inherits(IfcWorkSchedule,_IfcWorkControl6);var _super2251=_createSuper(IfcWorkSchedule);function IfcWorkSchedule(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime,PredefinedType){var _this2248;_classCallCheck(this,IfcWorkSchedule);_this2248=_super2251.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,CreationDate,Creators,Purpose,Duration,TotalFloat,StartTime,FinishTime);_this2248.GlobalId=GlobalId;_this2248.OwnerHistory=OwnerHistory;_this2248.Name=Name;_this2248.Description=Description;_this2248.ObjectType=ObjectType;_this2248.Identification=Identification;_this2248.CreationDate=CreationDate;_this2248.Creators=Creators;_this2248.Purpose=Purpose;_this2248.Duration=Duration;_this2248.TotalFloat=TotalFloat;_this2248.StartTime=StartTime;_this2248.FinishTime=FinishTime;_this2248.PredefinedType=PredefinedType;_this2248.type=3342526732;return _this2248;}return _createClass(IfcWorkSchedule);}(IfcWorkControl);IFC4X32.IfcWorkSchedule=IfcWorkSchedule;var IfcZone=/*#__PURE__*/function(_IfcSystem7){_inherits(IfcZone,_IfcSystem7);var _super2252=_createSuper(IfcZone);function IfcZone(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName){var _this2249;_classCallCheck(this,IfcZone);_this2249=_super2252.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2249.GlobalId=GlobalId;_this2249.OwnerHistory=OwnerHistory;_this2249.Name=Name;_this2249.Description=Description;_this2249.ObjectType=ObjectType;_this2249.LongName=LongName;_this2249.type=1033361043;return _this2249;}return _createClass(IfcZone);}(IfcSystem);IFC4X32.IfcZone=IfcZone;var IfcActionRequest=/*#__PURE__*/function(_IfcControl31){_inherits(IfcActionRequest,_IfcControl31);var _super2253=_createSuper(IfcActionRequest);function IfcActionRequest(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,PredefinedType,Status,LongDescription){var _this2250;_classCallCheck(this,IfcActionRequest);_this2250=_super2253.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification);_this2250.GlobalId=GlobalId;_this2250.OwnerHistory=OwnerHistory;_this2250.Name=Name;_this2250.Description=Description;_this2250.ObjectType=ObjectType;_this2250.Identification=Identification;_this2250.PredefinedType=PredefinedType;_this2250.Status=Status;_this2250.LongDescription=LongDescription;_this2250.type=3821786052;return _this2250;}return _createClass(IfcActionRequest);}(IfcControl);IFC4X32.IfcActionRequest=IfcActionRequest;var IfcAirTerminalBoxType=/*#__PURE__*/function(_IfcFlowControllerTyp20){_inherits(IfcAirTerminalBoxType,_IfcFlowControllerTyp20);var _super2254=_createSuper(IfcAirTerminalBoxType);function IfcAirTerminalBoxType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2251;_classCallCheck(this,IfcAirTerminalBoxType);_this2251=_super2254.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2251.GlobalId=GlobalId;_this2251.OwnerHistory=OwnerHistory;_this2251.Name=Name;_this2251.Description=Description;_this2251.ApplicableOccurrence=ApplicableOccurrence;_this2251.HasPropertySets=HasPropertySets;_this2251.RepresentationMaps=RepresentationMaps;_this2251.Tag=Tag;_this2251.ElementType=ElementType;_this2251.PredefinedType=PredefinedType;_this2251.type=1411407467;return _this2251;}return _createClass(IfcAirTerminalBoxType);}(IfcFlowControllerType);IFC4X32.IfcAirTerminalBoxType=IfcAirTerminalBoxType;var IfcAirTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType36){_inherits(IfcAirTerminalType,_IfcFlowTerminalType36);var _super2255=_createSuper(IfcAirTerminalType);function IfcAirTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2252;_classCallCheck(this,IfcAirTerminalType);_this2252=_super2255.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2252.GlobalId=GlobalId;_this2252.OwnerHistory=OwnerHistory;_this2252.Name=Name;_this2252.Description=Description;_this2252.ApplicableOccurrence=ApplicableOccurrence;_this2252.HasPropertySets=HasPropertySets;_this2252.RepresentationMaps=RepresentationMaps;_this2252.Tag=Tag;_this2252.ElementType=ElementType;_this2252.PredefinedType=PredefinedType;_this2252.type=3352864051;return _this2252;}return _createClass(IfcAirTerminalType);}(IfcFlowTerminalType);IFC4X32.IfcAirTerminalType=IfcAirTerminalType;var IfcAirToAirHeatRecoveryType=/*#__PURE__*/function(_IfcEnergyConversionD69){_inherits(IfcAirToAirHeatRecoveryType,_IfcEnergyConversionD69);var _super2256=_createSuper(IfcAirToAirHeatRecoveryType);function IfcAirToAirHeatRecoveryType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2253;_classCallCheck(this,IfcAirToAirHeatRecoveryType);_this2253=_super2256.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2253.GlobalId=GlobalId;_this2253.OwnerHistory=OwnerHistory;_this2253.Name=Name;_this2253.Description=Description;_this2253.ApplicableOccurrence=ApplicableOccurrence;_this2253.HasPropertySets=HasPropertySets;_this2253.RepresentationMaps=RepresentationMaps;_this2253.Tag=Tag;_this2253.ElementType=ElementType;_this2253.PredefinedType=PredefinedType;_this2253.type=1871374353;return _this2253;}return _createClass(IfcAirToAirHeatRecoveryType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcAirToAirHeatRecoveryType=IfcAirToAirHeatRecoveryType;var IfcAlignmentCant=/*#__PURE__*/function(_IfcLinearElement){_inherits(IfcAlignmentCant,_IfcLinearElement);var _super2257=_createSuper(IfcAlignmentCant);function IfcAlignmentCant(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,RailHeadDistance){var _this2254;_classCallCheck(this,IfcAlignmentCant);_this2254=_super2257.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2254.GlobalId=GlobalId;_this2254.OwnerHistory=OwnerHistory;_this2254.Name=Name;_this2254.Description=Description;_this2254.ObjectType=ObjectType;_this2254.ObjectPlacement=ObjectPlacement;_this2254.Representation=Representation;_this2254.RailHeadDistance=RailHeadDistance;_this2254.type=4266260250;return _this2254;}return _createClass(IfcAlignmentCant);}(IfcLinearElement);IFC4X32.IfcAlignmentCant=IfcAlignmentCant;var IfcAlignmentHorizontal=/*#__PURE__*/function(_IfcLinearElement2){_inherits(IfcAlignmentHorizontal,_IfcLinearElement2);var _super2258=_createSuper(IfcAlignmentHorizontal);function IfcAlignmentHorizontal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2255;_classCallCheck(this,IfcAlignmentHorizontal);_this2255=_super2258.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2255.GlobalId=GlobalId;_this2255.OwnerHistory=OwnerHistory;_this2255.Name=Name;_this2255.Description=Description;_this2255.ObjectType=ObjectType;_this2255.ObjectPlacement=ObjectPlacement;_this2255.Representation=Representation;_this2255.type=1545765605;return _this2255;}return _createClass(IfcAlignmentHorizontal);}(IfcLinearElement);IFC4X32.IfcAlignmentHorizontal=IfcAlignmentHorizontal;var IfcAlignmentSegment=/*#__PURE__*/function(_IfcLinearElement3){_inherits(IfcAlignmentSegment,_IfcLinearElement3);var _super2259=_createSuper(IfcAlignmentSegment);function IfcAlignmentSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,DesignParameters){var _this2256;_classCallCheck(this,IfcAlignmentSegment);_this2256=_super2259.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2256.GlobalId=GlobalId;_this2256.OwnerHistory=OwnerHistory;_this2256.Name=Name;_this2256.Description=Description;_this2256.ObjectType=ObjectType;_this2256.ObjectPlacement=ObjectPlacement;_this2256.Representation=Representation;_this2256.DesignParameters=DesignParameters;_this2256.type=317615605;return _this2256;}return _createClass(IfcAlignmentSegment);}(IfcLinearElement);IFC4X32.IfcAlignmentSegment=IfcAlignmentSegment;var IfcAlignmentVertical=/*#__PURE__*/function(_IfcLinearElement4){_inherits(IfcAlignmentVertical,_IfcLinearElement4);var _super2260=_createSuper(IfcAlignmentVertical);function IfcAlignmentVertical(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2257;_classCallCheck(this,IfcAlignmentVertical);_this2257=_super2260.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2257.GlobalId=GlobalId;_this2257.OwnerHistory=OwnerHistory;_this2257.Name=Name;_this2257.Description=Description;_this2257.ObjectType=ObjectType;_this2257.ObjectPlacement=ObjectPlacement;_this2257.Representation=Representation;_this2257.type=1662888072;return _this2257;}return _createClass(IfcAlignmentVertical);}(IfcLinearElement);IFC4X32.IfcAlignmentVertical=IfcAlignmentVertical;var IfcAsset=/*#__PURE__*/function(_IfcGroup17){_inherits(IfcAsset,_IfcGroup17);var _super2261=_createSuper(IfcAsset);function IfcAsset(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,OriginalValue,CurrentValue,TotalReplacementCost,Owner,User,ResponsiblePerson,IncorporationDate,DepreciatedValue){var _this2258;_classCallCheck(this,IfcAsset);_this2258=_super2261.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2258.GlobalId=GlobalId;_this2258.OwnerHistory=OwnerHistory;_this2258.Name=Name;_this2258.Description=Description;_this2258.ObjectType=ObjectType;_this2258.Identification=Identification;_this2258.OriginalValue=OriginalValue;_this2258.CurrentValue=CurrentValue;_this2258.TotalReplacementCost=TotalReplacementCost;_this2258.Owner=Owner;_this2258.User=User;_this2258.ResponsiblePerson=ResponsiblePerson;_this2258.IncorporationDate=IncorporationDate;_this2258.DepreciatedValue=DepreciatedValue;_this2258.type=3460190687;return _this2258;}return _createClass(IfcAsset);}(IfcGroup);IFC4X32.IfcAsset=IfcAsset;var IfcAudioVisualApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType37){_inherits(IfcAudioVisualApplianceType,_IfcFlowTerminalType37);var _super2262=_createSuper(IfcAudioVisualApplianceType);function IfcAudioVisualApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2259;_classCallCheck(this,IfcAudioVisualApplianceType);_this2259=_super2262.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2259.GlobalId=GlobalId;_this2259.OwnerHistory=OwnerHistory;_this2259.Name=Name;_this2259.Description=Description;_this2259.ApplicableOccurrence=ApplicableOccurrence;_this2259.HasPropertySets=HasPropertySets;_this2259.RepresentationMaps=RepresentationMaps;_this2259.Tag=Tag;_this2259.ElementType=ElementType;_this2259.PredefinedType=PredefinedType;_this2259.type=1532957894;return _this2259;}return _createClass(IfcAudioVisualApplianceType);}(IfcFlowTerminalType);IFC4X32.IfcAudioVisualApplianceType=IfcAudioVisualApplianceType;var IfcBSplineCurve=/*#__PURE__*/function(_IfcBoundedCurve14){_inherits(IfcBSplineCurve,_IfcBoundedCurve14);var _super2263=_createSuper(IfcBSplineCurve);function IfcBSplineCurve(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect){var _this2260;_classCallCheck(this,IfcBSplineCurve);_this2260=_super2263.call(this,expressID);_this2260.Degree=Degree;_this2260.ControlPointsList=ControlPointsList;_this2260.CurveForm=CurveForm;_this2260.ClosedCurve=ClosedCurve;_this2260.SelfIntersect=SelfIntersect;_this2260.type=1967976161;return _this2260;}return _createClass(IfcBSplineCurve);}(IfcBoundedCurve);IFC4X32.IfcBSplineCurve=IfcBSplineCurve;var IfcBSplineCurveWithKnots=/*#__PURE__*/function(_IfcBSplineCurve3){_inherits(IfcBSplineCurveWithKnots,_IfcBSplineCurve3);var _super2264=_createSuper(IfcBSplineCurveWithKnots);function IfcBSplineCurveWithKnots(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect,KnotMultiplicities,Knots,KnotSpec){var _this2261;_classCallCheck(this,IfcBSplineCurveWithKnots);_this2261=_super2264.call(this,expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect);_this2261.Degree=Degree;_this2261.ControlPointsList=ControlPointsList;_this2261.CurveForm=CurveForm;_this2261.ClosedCurve=ClosedCurve;_this2261.SelfIntersect=SelfIntersect;_this2261.KnotMultiplicities=KnotMultiplicities;_this2261.Knots=Knots;_this2261.KnotSpec=KnotSpec;_this2261.type=2461110595;return _this2261;}return _createClass(IfcBSplineCurveWithKnots);}(IfcBSplineCurve);IFC4X32.IfcBSplineCurveWithKnots=IfcBSplineCurveWithKnots;var IfcBeamType=/*#__PURE__*/function(_IfcBuiltElementType27){_inherits(IfcBeamType,_IfcBuiltElementType27);var _super2265=_createSuper(IfcBeamType);function IfcBeamType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2262;_classCallCheck(this,IfcBeamType);_this2262=_super2265.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2262.GlobalId=GlobalId;_this2262.OwnerHistory=OwnerHistory;_this2262.Name=Name;_this2262.Description=Description;_this2262.ApplicableOccurrence=ApplicableOccurrence;_this2262.HasPropertySets=HasPropertySets;_this2262.RepresentationMaps=RepresentationMaps;_this2262.Tag=Tag;_this2262.ElementType=ElementType;_this2262.PredefinedType=PredefinedType;_this2262.type=819618141;return _this2262;}return _createClass(IfcBeamType);}(IfcBuiltElementType);IFC4X32.IfcBeamType=IfcBeamType;var IfcBearingType=/*#__PURE__*/function(_IfcBuiltElementType28){_inherits(IfcBearingType,_IfcBuiltElementType28);var _super2266=_createSuper(IfcBearingType);function IfcBearingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2263;_classCallCheck(this,IfcBearingType);_this2263=_super2266.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2263.GlobalId=GlobalId;_this2263.OwnerHistory=OwnerHistory;_this2263.Name=Name;_this2263.Description=Description;_this2263.ApplicableOccurrence=ApplicableOccurrence;_this2263.HasPropertySets=HasPropertySets;_this2263.RepresentationMaps=RepresentationMaps;_this2263.Tag=Tag;_this2263.ElementType=ElementType;_this2263.PredefinedType=PredefinedType;_this2263.type=3649138523;return _this2263;}return _createClass(IfcBearingType);}(IfcBuiltElementType);IFC4X32.IfcBearingType=IfcBearingType;var IfcBoilerType=/*#__PURE__*/function(_IfcEnergyConversionD70){_inherits(IfcBoilerType,_IfcEnergyConversionD70);var _super2267=_createSuper(IfcBoilerType);function IfcBoilerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2264;_classCallCheck(this,IfcBoilerType);_this2264=_super2267.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2264.GlobalId=GlobalId;_this2264.OwnerHistory=OwnerHistory;_this2264.Name=Name;_this2264.Description=Description;_this2264.ApplicableOccurrence=ApplicableOccurrence;_this2264.HasPropertySets=HasPropertySets;_this2264.RepresentationMaps=RepresentationMaps;_this2264.Tag=Tag;_this2264.ElementType=ElementType;_this2264.PredefinedType=PredefinedType;_this2264.type=231477066;return _this2264;}return _createClass(IfcBoilerType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcBoilerType=IfcBoilerType;var IfcBoundaryCurve=/*#__PURE__*/function(_IfcCompositeCurveOnS2){_inherits(IfcBoundaryCurve,_IfcCompositeCurveOnS2);var _super2268=_createSuper(IfcBoundaryCurve);function IfcBoundaryCurve(expressID,Segments,SelfIntersect){var _this2265;_classCallCheck(this,IfcBoundaryCurve);_this2265=_super2268.call(this,expressID,Segments,SelfIntersect);_this2265.Segments=Segments;_this2265.SelfIntersect=SelfIntersect;_this2265.type=1136057603;return _this2265;}return _createClass(IfcBoundaryCurve);}(IfcCompositeCurveOnSurface);IFC4X32.IfcBoundaryCurve=IfcBoundaryCurve;var IfcBridge=/*#__PURE__*/function(_IfcFacility4){_inherits(IfcBridge,_IfcFacility4);var _super2269=_createSuper(IfcBridge);function IfcBridge(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,PredefinedType){var _this2266;_classCallCheck(this,IfcBridge);_this2266=_super2269.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2266.GlobalId=GlobalId;_this2266.OwnerHistory=OwnerHistory;_this2266.Name=Name;_this2266.Description=Description;_this2266.ObjectType=ObjectType;_this2266.ObjectPlacement=ObjectPlacement;_this2266.Representation=Representation;_this2266.LongName=LongName;_this2266.CompositionType=CompositionType;_this2266.PredefinedType=PredefinedType;_this2266.type=644574406;return _this2266;}return _createClass(IfcBridge);}(IfcFacility);IFC4X32.IfcBridge=IfcBridge;var IfcBridgePart=/*#__PURE__*/function(_IfcFacilityPart5){_inherits(IfcBridgePart,_IfcFacilityPart5);var _super2270=_createSuper(IfcBridgePart);function IfcBridgePart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType,PredefinedType){var _this2267;_classCallCheck(this,IfcBridgePart);_this2267=_super2270.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,UsageType);_this2267.GlobalId=GlobalId;_this2267.OwnerHistory=OwnerHistory;_this2267.Name=Name;_this2267.Description=Description;_this2267.ObjectType=ObjectType;_this2267.ObjectPlacement=ObjectPlacement;_this2267.Representation=Representation;_this2267.LongName=LongName;_this2267.CompositionType=CompositionType;_this2267.UsageType=UsageType;_this2267.PredefinedType=PredefinedType;_this2267.type=963979645;return _this2267;}return _createClass(IfcBridgePart);}(IfcFacilityPart);IFC4X32.IfcBridgePart=IfcBridgePart;var IfcBuilding=/*#__PURE__*/function(_IfcFacility5){_inherits(IfcBuilding,_IfcFacility5);var _super2271=_createSuper(IfcBuilding);function IfcBuilding(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType,ElevationOfRefHeight,ElevationOfTerrain,BuildingAddress){var _this2268;_classCallCheck(this,IfcBuilding);_this2268=_super2271.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,CompositionType);_this2268.GlobalId=GlobalId;_this2268.OwnerHistory=OwnerHistory;_this2268.Name=Name;_this2268.Description=Description;_this2268.ObjectType=ObjectType;_this2268.ObjectPlacement=ObjectPlacement;_this2268.Representation=Representation;_this2268.LongName=LongName;_this2268.CompositionType=CompositionType;_this2268.ElevationOfRefHeight=ElevationOfRefHeight;_this2268.ElevationOfTerrain=ElevationOfTerrain;_this2268.BuildingAddress=BuildingAddress;_this2268.type=4031249490;return _this2268;}return _createClass(IfcBuilding);}(IfcFacility);IFC4X32.IfcBuilding=IfcBuilding;var IfcBuildingElementPart=/*#__PURE__*/function(_IfcElementComponent16){_inherits(IfcBuildingElementPart,_IfcElementComponent16);var _super2272=_createSuper(IfcBuildingElementPart);function IfcBuildingElementPart(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2269;_classCallCheck(this,IfcBuildingElementPart);_this2269=_super2272.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2269.GlobalId=GlobalId;_this2269.OwnerHistory=OwnerHistory;_this2269.Name=Name;_this2269.Description=Description;_this2269.ObjectType=ObjectType;_this2269.ObjectPlacement=ObjectPlacement;_this2269.Representation=Representation;_this2269.Tag=Tag;_this2269.PredefinedType=PredefinedType;_this2269.type=2979338954;return _this2269;}return _createClass(IfcBuildingElementPart);}(IfcElementComponent);IFC4X32.IfcBuildingElementPart=IfcBuildingElementPart;var IfcBuildingElementPartType=/*#__PURE__*/function(_IfcElementComponentT16){_inherits(IfcBuildingElementPartType,_IfcElementComponentT16);var _super2273=_createSuper(IfcBuildingElementPartType);function IfcBuildingElementPartType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2270;_classCallCheck(this,IfcBuildingElementPartType);_this2270=_super2273.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2270.GlobalId=GlobalId;_this2270.OwnerHistory=OwnerHistory;_this2270.Name=Name;_this2270.Description=Description;_this2270.ApplicableOccurrence=ApplicableOccurrence;_this2270.HasPropertySets=HasPropertySets;_this2270.RepresentationMaps=RepresentationMaps;_this2270.Tag=Tag;_this2270.ElementType=ElementType;_this2270.PredefinedType=PredefinedType;_this2270.type=39481116;return _this2270;}return _createClass(IfcBuildingElementPartType);}(IfcElementComponentType);IFC4X32.IfcBuildingElementPartType=IfcBuildingElementPartType;var IfcBuildingElementProxyType=/*#__PURE__*/function(_IfcBuiltElementType29){_inherits(IfcBuildingElementProxyType,_IfcBuiltElementType29);var _super2274=_createSuper(IfcBuildingElementProxyType);function IfcBuildingElementProxyType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2271;_classCallCheck(this,IfcBuildingElementProxyType);_this2271=_super2274.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2271.GlobalId=GlobalId;_this2271.OwnerHistory=OwnerHistory;_this2271.Name=Name;_this2271.Description=Description;_this2271.ApplicableOccurrence=ApplicableOccurrence;_this2271.HasPropertySets=HasPropertySets;_this2271.RepresentationMaps=RepresentationMaps;_this2271.Tag=Tag;_this2271.ElementType=ElementType;_this2271.PredefinedType=PredefinedType;_this2271.type=1909888760;return _this2271;}return _createClass(IfcBuildingElementProxyType);}(IfcBuiltElementType);IFC4X32.IfcBuildingElementProxyType=IfcBuildingElementProxyType;var IfcBuildingSystem=/*#__PURE__*/function(_IfcSystem8){_inherits(IfcBuildingSystem,_IfcSystem8);var _super2275=_createSuper(IfcBuildingSystem);function IfcBuildingSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,LongName){var _this2272;_classCallCheck(this,IfcBuildingSystem);_this2272=_super2275.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2272.GlobalId=GlobalId;_this2272.OwnerHistory=OwnerHistory;_this2272.Name=Name;_this2272.Description=Description;_this2272.ObjectType=ObjectType;_this2272.PredefinedType=PredefinedType;_this2272.LongName=LongName;_this2272.type=1177604601;return _this2272;}return _createClass(IfcBuildingSystem);}(IfcSystem);IFC4X32.IfcBuildingSystem=IfcBuildingSystem;var IfcBuiltElement=/*#__PURE__*/function(_IfcElement29){_inherits(IfcBuiltElement,_IfcElement29);var _super2276=_createSuper(IfcBuiltElement);function IfcBuiltElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2273;_classCallCheck(this,IfcBuiltElement);_this2273=_super2276.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2273.GlobalId=GlobalId;_this2273.OwnerHistory=OwnerHistory;_this2273.Name=Name;_this2273.Description=Description;_this2273.ObjectType=ObjectType;_this2273.ObjectPlacement=ObjectPlacement;_this2273.Representation=Representation;_this2273.Tag=Tag;_this2273.type=1876633798;return _this2273;}return _createClass(IfcBuiltElement);}(IfcElement);IFC4X32.IfcBuiltElement=IfcBuiltElement;var IfcBuiltSystem=/*#__PURE__*/function(_IfcSystem9){_inherits(IfcBuiltSystem,_IfcSystem9);var _super2277=_createSuper(IfcBuiltSystem);function IfcBuiltSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,LongName){var _this2274;_classCallCheck(this,IfcBuiltSystem);_this2274=_super2277.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2274.GlobalId=GlobalId;_this2274.OwnerHistory=OwnerHistory;_this2274.Name=Name;_this2274.Description=Description;_this2274.ObjectType=ObjectType;_this2274.PredefinedType=PredefinedType;_this2274.LongName=LongName;_this2274.type=3862327254;return _this2274;}return _createClass(IfcBuiltSystem);}(IfcSystem);IFC4X32.IfcBuiltSystem=IfcBuiltSystem;var IfcBurnerType=/*#__PURE__*/function(_IfcEnergyConversionD71){_inherits(IfcBurnerType,_IfcEnergyConversionD71);var _super2278=_createSuper(IfcBurnerType);function IfcBurnerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2275;_classCallCheck(this,IfcBurnerType);_this2275=_super2278.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2275.GlobalId=GlobalId;_this2275.OwnerHistory=OwnerHistory;_this2275.Name=Name;_this2275.Description=Description;_this2275.ApplicableOccurrence=ApplicableOccurrence;_this2275.HasPropertySets=HasPropertySets;_this2275.RepresentationMaps=RepresentationMaps;_this2275.Tag=Tag;_this2275.ElementType=ElementType;_this2275.PredefinedType=PredefinedType;_this2275.type=2188180465;return _this2275;}return _createClass(IfcBurnerType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcBurnerType=IfcBurnerType;var IfcCableCarrierFittingType=/*#__PURE__*/function(_IfcFlowFittingType12){_inherits(IfcCableCarrierFittingType,_IfcFlowFittingType12);var _super2279=_createSuper(IfcCableCarrierFittingType);function IfcCableCarrierFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2276;_classCallCheck(this,IfcCableCarrierFittingType);_this2276=_super2279.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2276.GlobalId=GlobalId;_this2276.OwnerHistory=OwnerHistory;_this2276.Name=Name;_this2276.Description=Description;_this2276.ApplicableOccurrence=ApplicableOccurrence;_this2276.HasPropertySets=HasPropertySets;_this2276.RepresentationMaps=RepresentationMaps;_this2276.Tag=Tag;_this2276.ElementType=ElementType;_this2276.PredefinedType=PredefinedType;_this2276.type=395041908;return _this2276;}return _createClass(IfcCableCarrierFittingType);}(IfcFlowFittingType);IFC4X32.IfcCableCarrierFittingType=IfcCableCarrierFittingType;var IfcCableCarrierSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType10){_inherits(IfcCableCarrierSegmentType,_IfcFlowSegmentType10);var _super2280=_createSuper(IfcCableCarrierSegmentType);function IfcCableCarrierSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2277;_classCallCheck(this,IfcCableCarrierSegmentType);_this2277=_super2280.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2277.GlobalId=GlobalId;_this2277.OwnerHistory=OwnerHistory;_this2277.Name=Name;_this2277.Description=Description;_this2277.ApplicableOccurrence=ApplicableOccurrence;_this2277.HasPropertySets=HasPropertySets;_this2277.RepresentationMaps=RepresentationMaps;_this2277.Tag=Tag;_this2277.ElementType=ElementType;_this2277.PredefinedType=PredefinedType;_this2277.type=3293546465;return _this2277;}return _createClass(IfcCableCarrierSegmentType);}(IfcFlowSegmentType);IFC4X32.IfcCableCarrierSegmentType=IfcCableCarrierSegmentType;var IfcCableFittingType=/*#__PURE__*/function(_IfcFlowFittingType13){_inherits(IfcCableFittingType,_IfcFlowFittingType13);var _super2281=_createSuper(IfcCableFittingType);function IfcCableFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2278;_classCallCheck(this,IfcCableFittingType);_this2278=_super2281.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2278.GlobalId=GlobalId;_this2278.OwnerHistory=OwnerHistory;_this2278.Name=Name;_this2278.Description=Description;_this2278.ApplicableOccurrence=ApplicableOccurrence;_this2278.HasPropertySets=HasPropertySets;_this2278.RepresentationMaps=RepresentationMaps;_this2278.Tag=Tag;_this2278.ElementType=ElementType;_this2278.PredefinedType=PredefinedType;_this2278.type=2674252688;return _this2278;}return _createClass(IfcCableFittingType);}(IfcFlowFittingType);IFC4X32.IfcCableFittingType=IfcCableFittingType;var IfcCableSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType11){_inherits(IfcCableSegmentType,_IfcFlowSegmentType11);var _super2282=_createSuper(IfcCableSegmentType);function IfcCableSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2279;_classCallCheck(this,IfcCableSegmentType);_this2279=_super2282.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2279.GlobalId=GlobalId;_this2279.OwnerHistory=OwnerHistory;_this2279.Name=Name;_this2279.Description=Description;_this2279.ApplicableOccurrence=ApplicableOccurrence;_this2279.HasPropertySets=HasPropertySets;_this2279.RepresentationMaps=RepresentationMaps;_this2279.Tag=Tag;_this2279.ElementType=ElementType;_this2279.PredefinedType=PredefinedType;_this2279.type=1285652485;return _this2279;}return _createClass(IfcCableSegmentType);}(IfcFlowSegmentType);IFC4X32.IfcCableSegmentType=IfcCableSegmentType;var IfcCaissonFoundationType=/*#__PURE__*/function(_IfcDeepFoundationTyp2){_inherits(IfcCaissonFoundationType,_IfcDeepFoundationTyp2);var _super2283=_createSuper(IfcCaissonFoundationType);function IfcCaissonFoundationType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2280;_classCallCheck(this,IfcCaissonFoundationType);_this2280=_super2283.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2280.GlobalId=GlobalId;_this2280.OwnerHistory=OwnerHistory;_this2280.Name=Name;_this2280.Description=Description;_this2280.ApplicableOccurrence=ApplicableOccurrence;_this2280.HasPropertySets=HasPropertySets;_this2280.RepresentationMaps=RepresentationMaps;_this2280.Tag=Tag;_this2280.ElementType=ElementType;_this2280.PredefinedType=PredefinedType;_this2280.type=3203706013;return _this2280;}return _createClass(IfcCaissonFoundationType);}(IfcDeepFoundationType);IFC4X32.IfcCaissonFoundationType=IfcCaissonFoundationType;var IfcChillerType=/*#__PURE__*/function(_IfcEnergyConversionD72){_inherits(IfcChillerType,_IfcEnergyConversionD72);var _super2284=_createSuper(IfcChillerType);function IfcChillerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2281;_classCallCheck(this,IfcChillerType);_this2281=_super2284.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2281.GlobalId=GlobalId;_this2281.OwnerHistory=OwnerHistory;_this2281.Name=Name;_this2281.Description=Description;_this2281.ApplicableOccurrence=ApplicableOccurrence;_this2281.HasPropertySets=HasPropertySets;_this2281.RepresentationMaps=RepresentationMaps;_this2281.Tag=Tag;_this2281.ElementType=ElementType;_this2281.PredefinedType=PredefinedType;_this2281.type=2951183804;return _this2281;}return _createClass(IfcChillerType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcChillerType=IfcChillerType;var IfcChimney=/*#__PURE__*/function(_IfcBuiltElement){_inherits(IfcChimney,_IfcBuiltElement);var _super2285=_createSuper(IfcChimney);function IfcChimney(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2282;_classCallCheck(this,IfcChimney);_this2282=_super2285.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2282.GlobalId=GlobalId;_this2282.OwnerHistory=OwnerHistory;_this2282.Name=Name;_this2282.Description=Description;_this2282.ObjectType=ObjectType;_this2282.ObjectPlacement=ObjectPlacement;_this2282.Representation=Representation;_this2282.Tag=Tag;_this2282.PredefinedType=PredefinedType;_this2282.type=3296154744;return _this2282;}return _createClass(IfcChimney);}(IfcBuiltElement);IFC4X32.IfcChimney=IfcChimney;var IfcCircle=/*#__PURE__*/function(_IfcConic6){_inherits(IfcCircle,_IfcConic6);var _super2286=_createSuper(IfcCircle);function IfcCircle(expressID,Position,Radius){var _this2283;_classCallCheck(this,IfcCircle);_this2283=_super2286.call(this,expressID,Position);_this2283.Position=Position;_this2283.Radius=Radius;_this2283.type=2611217952;return _this2283;}return _createClass(IfcCircle);}(IfcConic);IFC4X32.IfcCircle=IfcCircle;var IfcCivilElement=/*#__PURE__*/function(_IfcElement30){_inherits(IfcCivilElement,_IfcElement30);var _super2287=_createSuper(IfcCivilElement);function IfcCivilElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2284;_classCallCheck(this,IfcCivilElement);_this2284=_super2287.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2284.GlobalId=GlobalId;_this2284.OwnerHistory=OwnerHistory;_this2284.Name=Name;_this2284.Description=Description;_this2284.ObjectType=ObjectType;_this2284.ObjectPlacement=ObjectPlacement;_this2284.Representation=Representation;_this2284.Tag=Tag;_this2284.type=1677625105;return _this2284;}return _createClass(IfcCivilElement);}(IfcElement);IFC4X32.IfcCivilElement=IfcCivilElement;var IfcCoilType=/*#__PURE__*/function(_IfcEnergyConversionD73){_inherits(IfcCoilType,_IfcEnergyConversionD73);var _super2288=_createSuper(IfcCoilType);function IfcCoilType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2285;_classCallCheck(this,IfcCoilType);_this2285=_super2288.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2285.GlobalId=GlobalId;_this2285.OwnerHistory=OwnerHistory;_this2285.Name=Name;_this2285.Description=Description;_this2285.ApplicableOccurrence=ApplicableOccurrence;_this2285.HasPropertySets=HasPropertySets;_this2285.RepresentationMaps=RepresentationMaps;_this2285.Tag=Tag;_this2285.ElementType=ElementType;_this2285.PredefinedType=PredefinedType;_this2285.type=2301859152;return _this2285;}return _createClass(IfcCoilType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcCoilType=IfcCoilType;var IfcColumn=/*#__PURE__*/function(_IfcBuiltElement2){_inherits(IfcColumn,_IfcBuiltElement2);var _super2289=_createSuper(IfcColumn);function IfcColumn(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2286;_classCallCheck(this,IfcColumn);_this2286=_super2289.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2286.GlobalId=GlobalId;_this2286.OwnerHistory=OwnerHistory;_this2286.Name=Name;_this2286.Description=Description;_this2286.ObjectType=ObjectType;_this2286.ObjectPlacement=ObjectPlacement;_this2286.Representation=Representation;_this2286.Tag=Tag;_this2286.PredefinedType=PredefinedType;_this2286.type=843113511;return _this2286;}return _createClass(IfcColumn);}(IfcBuiltElement);IFC4X32.IfcColumn=IfcColumn;var IfcCommunicationsApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType38){_inherits(IfcCommunicationsApplianceType,_IfcFlowTerminalType38);var _super2290=_createSuper(IfcCommunicationsApplianceType);function IfcCommunicationsApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2287;_classCallCheck(this,IfcCommunicationsApplianceType);_this2287=_super2290.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2287.GlobalId=GlobalId;_this2287.OwnerHistory=OwnerHistory;_this2287.Name=Name;_this2287.Description=Description;_this2287.ApplicableOccurrence=ApplicableOccurrence;_this2287.HasPropertySets=HasPropertySets;_this2287.RepresentationMaps=RepresentationMaps;_this2287.Tag=Tag;_this2287.ElementType=ElementType;_this2287.PredefinedType=PredefinedType;_this2287.type=400855858;return _this2287;}return _createClass(IfcCommunicationsApplianceType);}(IfcFlowTerminalType);IFC4X32.IfcCommunicationsApplianceType=IfcCommunicationsApplianceType;var IfcCompressorType=/*#__PURE__*/function(_IfcFlowMovingDeviceT8){_inherits(IfcCompressorType,_IfcFlowMovingDeviceT8);var _super2291=_createSuper(IfcCompressorType);function IfcCompressorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2288;_classCallCheck(this,IfcCompressorType);_this2288=_super2291.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2288.GlobalId=GlobalId;_this2288.OwnerHistory=OwnerHistory;_this2288.Name=Name;_this2288.Description=Description;_this2288.ApplicableOccurrence=ApplicableOccurrence;_this2288.HasPropertySets=HasPropertySets;_this2288.RepresentationMaps=RepresentationMaps;_this2288.Tag=Tag;_this2288.ElementType=ElementType;_this2288.PredefinedType=PredefinedType;_this2288.type=3850581409;return _this2288;}return _createClass(IfcCompressorType);}(IfcFlowMovingDeviceType);IFC4X32.IfcCompressorType=IfcCompressorType;var IfcCondenserType=/*#__PURE__*/function(_IfcEnergyConversionD74){_inherits(IfcCondenserType,_IfcEnergyConversionD74);var _super2292=_createSuper(IfcCondenserType);function IfcCondenserType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2289;_classCallCheck(this,IfcCondenserType);_this2289=_super2292.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2289.GlobalId=GlobalId;_this2289.OwnerHistory=OwnerHistory;_this2289.Name=Name;_this2289.Description=Description;_this2289.ApplicableOccurrence=ApplicableOccurrence;_this2289.HasPropertySets=HasPropertySets;_this2289.RepresentationMaps=RepresentationMaps;_this2289.Tag=Tag;_this2289.ElementType=ElementType;_this2289.PredefinedType=PredefinedType;_this2289.type=2816379211;return _this2289;}return _createClass(IfcCondenserType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcCondenserType=IfcCondenserType;var IfcConstructionEquipmentResource=/*#__PURE__*/function(_IfcConstructionResou28){_inherits(IfcConstructionEquipmentResource,_IfcConstructionResou28);var _super2293=_createSuper(IfcConstructionEquipmentResource);function IfcConstructionEquipmentResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this2290;_classCallCheck(this,IfcConstructionEquipmentResource);_this2290=_super2293.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this2290.GlobalId=GlobalId;_this2290.OwnerHistory=OwnerHistory;_this2290.Name=Name;_this2290.Description=Description;_this2290.ObjectType=ObjectType;_this2290.Identification=Identification;_this2290.LongDescription=LongDescription;_this2290.Usage=Usage;_this2290.BaseCosts=BaseCosts;_this2290.BaseQuantity=BaseQuantity;_this2290.PredefinedType=PredefinedType;_this2290.type=3898045240;return _this2290;}return _createClass(IfcConstructionEquipmentResource);}(IfcConstructionResource);IFC4X32.IfcConstructionEquipmentResource=IfcConstructionEquipmentResource;var IfcConstructionMaterialResource=/*#__PURE__*/function(_IfcConstructionResou29){_inherits(IfcConstructionMaterialResource,_IfcConstructionResou29);var _super2294=_createSuper(IfcConstructionMaterialResource);function IfcConstructionMaterialResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this2291;_classCallCheck(this,IfcConstructionMaterialResource);_this2291=_super2294.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this2291.GlobalId=GlobalId;_this2291.OwnerHistory=OwnerHistory;_this2291.Name=Name;_this2291.Description=Description;_this2291.ObjectType=ObjectType;_this2291.Identification=Identification;_this2291.LongDescription=LongDescription;_this2291.Usage=Usage;_this2291.BaseCosts=BaseCosts;_this2291.BaseQuantity=BaseQuantity;_this2291.PredefinedType=PredefinedType;_this2291.type=1060000209;return _this2291;}return _createClass(IfcConstructionMaterialResource);}(IfcConstructionResource);IFC4X32.IfcConstructionMaterialResource=IfcConstructionMaterialResource;var IfcConstructionProductResource=/*#__PURE__*/function(_IfcConstructionResou30){_inherits(IfcConstructionProductResource,_IfcConstructionResou30);var _super2295=_createSuper(IfcConstructionProductResource);function IfcConstructionProductResource(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity,PredefinedType){var _this2292;_classCallCheck(this,IfcConstructionProductResource);_this2292=_super2295.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,Identification,LongDescription,Usage,BaseCosts,BaseQuantity);_this2292.GlobalId=GlobalId;_this2292.OwnerHistory=OwnerHistory;_this2292.Name=Name;_this2292.Description=Description;_this2292.ObjectType=ObjectType;_this2292.Identification=Identification;_this2292.LongDescription=LongDescription;_this2292.Usage=Usage;_this2292.BaseCosts=BaseCosts;_this2292.BaseQuantity=BaseQuantity;_this2292.PredefinedType=PredefinedType;_this2292.type=488727124;return _this2292;}return _createClass(IfcConstructionProductResource);}(IfcConstructionResource);IFC4X32.IfcConstructionProductResource=IfcConstructionProductResource;var IfcConveyorSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType12){_inherits(IfcConveyorSegmentType,_IfcFlowSegmentType12);var _super2296=_createSuper(IfcConveyorSegmentType);function IfcConveyorSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2293;_classCallCheck(this,IfcConveyorSegmentType);_this2293=_super2296.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2293.GlobalId=GlobalId;_this2293.OwnerHistory=OwnerHistory;_this2293.Name=Name;_this2293.Description=Description;_this2293.ApplicableOccurrence=ApplicableOccurrence;_this2293.HasPropertySets=HasPropertySets;_this2293.RepresentationMaps=RepresentationMaps;_this2293.Tag=Tag;_this2293.ElementType=ElementType;_this2293.PredefinedType=PredefinedType;_this2293.type=2940368186;return _this2293;}return _createClass(IfcConveyorSegmentType);}(IfcFlowSegmentType);IFC4X32.IfcConveyorSegmentType=IfcConveyorSegmentType;var IfcCooledBeamType=/*#__PURE__*/function(_IfcEnergyConversionD75){_inherits(IfcCooledBeamType,_IfcEnergyConversionD75);var _super2297=_createSuper(IfcCooledBeamType);function IfcCooledBeamType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2294;_classCallCheck(this,IfcCooledBeamType);_this2294=_super2297.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2294.GlobalId=GlobalId;_this2294.OwnerHistory=OwnerHistory;_this2294.Name=Name;_this2294.Description=Description;_this2294.ApplicableOccurrence=ApplicableOccurrence;_this2294.HasPropertySets=HasPropertySets;_this2294.RepresentationMaps=RepresentationMaps;_this2294.Tag=Tag;_this2294.ElementType=ElementType;_this2294.PredefinedType=PredefinedType;_this2294.type=335055490;return _this2294;}return _createClass(IfcCooledBeamType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcCooledBeamType=IfcCooledBeamType;var IfcCoolingTowerType=/*#__PURE__*/function(_IfcEnergyConversionD76){_inherits(IfcCoolingTowerType,_IfcEnergyConversionD76);var _super2298=_createSuper(IfcCoolingTowerType);function IfcCoolingTowerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2295;_classCallCheck(this,IfcCoolingTowerType);_this2295=_super2298.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2295.GlobalId=GlobalId;_this2295.OwnerHistory=OwnerHistory;_this2295.Name=Name;_this2295.Description=Description;_this2295.ApplicableOccurrence=ApplicableOccurrence;_this2295.HasPropertySets=HasPropertySets;_this2295.RepresentationMaps=RepresentationMaps;_this2295.Tag=Tag;_this2295.ElementType=ElementType;_this2295.PredefinedType=PredefinedType;_this2295.type=2954562838;return _this2295;}return _createClass(IfcCoolingTowerType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcCoolingTowerType=IfcCoolingTowerType;var IfcCourse=/*#__PURE__*/function(_IfcBuiltElement3){_inherits(IfcCourse,_IfcBuiltElement3);var _super2299=_createSuper(IfcCourse);function IfcCourse(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2296;_classCallCheck(this,IfcCourse);_this2296=_super2299.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2296.GlobalId=GlobalId;_this2296.OwnerHistory=OwnerHistory;_this2296.Name=Name;_this2296.Description=Description;_this2296.ObjectType=ObjectType;_this2296.ObjectPlacement=ObjectPlacement;_this2296.Representation=Representation;_this2296.Tag=Tag;_this2296.PredefinedType=PredefinedType;_this2296.type=1502416096;return _this2296;}return _createClass(IfcCourse);}(IfcBuiltElement);IFC4X32.IfcCourse=IfcCourse;var IfcCovering=/*#__PURE__*/function(_IfcBuiltElement4){_inherits(IfcCovering,_IfcBuiltElement4);var _super2300=_createSuper(IfcCovering);function IfcCovering(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2297;_classCallCheck(this,IfcCovering);_this2297=_super2300.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2297.GlobalId=GlobalId;_this2297.OwnerHistory=OwnerHistory;_this2297.Name=Name;_this2297.Description=Description;_this2297.ObjectType=ObjectType;_this2297.ObjectPlacement=ObjectPlacement;_this2297.Representation=Representation;_this2297.Tag=Tag;_this2297.PredefinedType=PredefinedType;_this2297.type=1973544240;return _this2297;}return _createClass(IfcCovering);}(IfcBuiltElement);IFC4X32.IfcCovering=IfcCovering;var IfcCurtainWall=/*#__PURE__*/function(_IfcBuiltElement5){_inherits(IfcCurtainWall,_IfcBuiltElement5);var _super2301=_createSuper(IfcCurtainWall);function IfcCurtainWall(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2298;_classCallCheck(this,IfcCurtainWall);_this2298=_super2301.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2298.GlobalId=GlobalId;_this2298.OwnerHistory=OwnerHistory;_this2298.Name=Name;_this2298.Description=Description;_this2298.ObjectType=ObjectType;_this2298.ObjectPlacement=ObjectPlacement;_this2298.Representation=Representation;_this2298.Tag=Tag;_this2298.PredefinedType=PredefinedType;_this2298.type=3495092785;return _this2298;}return _createClass(IfcCurtainWall);}(IfcBuiltElement);IFC4X32.IfcCurtainWall=IfcCurtainWall;var IfcDamperType=/*#__PURE__*/function(_IfcFlowControllerTyp21){_inherits(IfcDamperType,_IfcFlowControllerTyp21);var _super2302=_createSuper(IfcDamperType);function IfcDamperType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2299;_classCallCheck(this,IfcDamperType);_this2299=_super2302.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2299.GlobalId=GlobalId;_this2299.OwnerHistory=OwnerHistory;_this2299.Name=Name;_this2299.Description=Description;_this2299.ApplicableOccurrence=ApplicableOccurrence;_this2299.HasPropertySets=HasPropertySets;_this2299.RepresentationMaps=RepresentationMaps;_this2299.Tag=Tag;_this2299.ElementType=ElementType;_this2299.PredefinedType=PredefinedType;_this2299.type=3961806047;return _this2299;}return _createClass(IfcDamperType);}(IfcFlowControllerType);IFC4X32.IfcDamperType=IfcDamperType;var IfcDeepFoundation=/*#__PURE__*/function(_IfcBuiltElement6){_inherits(IfcDeepFoundation,_IfcBuiltElement6);var _super2303=_createSuper(IfcDeepFoundation);function IfcDeepFoundation(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2300;_classCallCheck(this,IfcDeepFoundation);_this2300=_super2303.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2300.GlobalId=GlobalId;_this2300.OwnerHistory=OwnerHistory;_this2300.Name=Name;_this2300.Description=Description;_this2300.ObjectType=ObjectType;_this2300.ObjectPlacement=ObjectPlacement;_this2300.Representation=Representation;_this2300.Tag=Tag;_this2300.type=3426335179;return _this2300;}return _createClass(IfcDeepFoundation);}(IfcBuiltElement);IFC4X32.IfcDeepFoundation=IfcDeepFoundation;var IfcDiscreteAccessory=/*#__PURE__*/function(_IfcElementComponent17){_inherits(IfcDiscreteAccessory,_IfcElementComponent17);var _super2304=_createSuper(IfcDiscreteAccessory);function IfcDiscreteAccessory(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2301;_classCallCheck(this,IfcDiscreteAccessory);_this2301=_super2304.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2301.GlobalId=GlobalId;_this2301.OwnerHistory=OwnerHistory;_this2301.Name=Name;_this2301.Description=Description;_this2301.ObjectType=ObjectType;_this2301.ObjectPlacement=ObjectPlacement;_this2301.Representation=Representation;_this2301.Tag=Tag;_this2301.PredefinedType=PredefinedType;_this2301.type=1335981549;return _this2301;}return _createClass(IfcDiscreteAccessory);}(IfcElementComponent);IFC4X32.IfcDiscreteAccessory=IfcDiscreteAccessory;var IfcDiscreteAccessoryType=/*#__PURE__*/function(_IfcElementComponentT17){_inherits(IfcDiscreteAccessoryType,_IfcElementComponentT17);var _super2305=_createSuper(IfcDiscreteAccessoryType);function IfcDiscreteAccessoryType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2302;_classCallCheck(this,IfcDiscreteAccessoryType);_this2302=_super2305.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2302.GlobalId=GlobalId;_this2302.OwnerHistory=OwnerHistory;_this2302.Name=Name;_this2302.Description=Description;_this2302.ApplicableOccurrence=ApplicableOccurrence;_this2302.HasPropertySets=HasPropertySets;_this2302.RepresentationMaps=RepresentationMaps;_this2302.Tag=Tag;_this2302.ElementType=ElementType;_this2302.PredefinedType=PredefinedType;_this2302.type=2635815018;return _this2302;}return _createClass(IfcDiscreteAccessoryType);}(IfcElementComponentType);IFC4X32.IfcDiscreteAccessoryType=IfcDiscreteAccessoryType;var IfcDistributionBoardType=/*#__PURE__*/function(_IfcFlowControllerTyp22){_inherits(IfcDistributionBoardType,_IfcFlowControllerTyp22);var _super2306=_createSuper(IfcDistributionBoardType);function IfcDistributionBoardType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2303;_classCallCheck(this,IfcDistributionBoardType);_this2303=_super2306.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2303.GlobalId=GlobalId;_this2303.OwnerHistory=OwnerHistory;_this2303.Name=Name;_this2303.Description=Description;_this2303.ApplicableOccurrence=ApplicableOccurrence;_this2303.HasPropertySets=HasPropertySets;_this2303.RepresentationMaps=RepresentationMaps;_this2303.Tag=Tag;_this2303.ElementType=ElementType;_this2303.PredefinedType=PredefinedType;_this2303.type=479945903;return _this2303;}return _createClass(IfcDistributionBoardType);}(IfcFlowControllerType);IFC4X32.IfcDistributionBoardType=IfcDistributionBoardType;var IfcDistributionChamberElementType=/*#__PURE__*/function(_IfcDistributionFlowE45){_inherits(IfcDistributionChamberElementType,_IfcDistributionFlowE45);var _super2307=_createSuper(IfcDistributionChamberElementType);function IfcDistributionChamberElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2304;_classCallCheck(this,IfcDistributionChamberElementType);_this2304=_super2307.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2304.GlobalId=GlobalId;_this2304.OwnerHistory=OwnerHistory;_this2304.Name=Name;_this2304.Description=Description;_this2304.ApplicableOccurrence=ApplicableOccurrence;_this2304.HasPropertySets=HasPropertySets;_this2304.RepresentationMaps=RepresentationMaps;_this2304.Tag=Tag;_this2304.ElementType=ElementType;_this2304.PredefinedType=PredefinedType;_this2304.type=1599208980;return _this2304;}return _createClass(IfcDistributionChamberElementType);}(IfcDistributionFlowElementType);IFC4X32.IfcDistributionChamberElementType=IfcDistributionChamberElementType;var IfcDistributionControlElementType=/*#__PURE__*/function(_IfcDistributionEleme10){_inherits(IfcDistributionControlElementType,_IfcDistributionEleme10);var _super2308=_createSuper(IfcDistributionControlElementType);function IfcDistributionControlElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType){var _this2305;_classCallCheck(this,IfcDistributionControlElementType);_this2305=_super2308.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2305.GlobalId=GlobalId;_this2305.OwnerHistory=OwnerHistory;_this2305.Name=Name;_this2305.Description=Description;_this2305.ApplicableOccurrence=ApplicableOccurrence;_this2305.HasPropertySets=HasPropertySets;_this2305.RepresentationMaps=RepresentationMaps;_this2305.Tag=Tag;_this2305.ElementType=ElementType;_this2305.type=2063403501;return _this2305;}return _createClass(IfcDistributionControlElementType);}(IfcDistributionElementType);IFC4X32.IfcDistributionControlElementType=IfcDistributionControlElementType;var IfcDistributionElement=/*#__PURE__*/function(_IfcElement31){_inherits(IfcDistributionElement,_IfcElement31);var _super2309=_createSuper(IfcDistributionElement);function IfcDistributionElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2306;_classCallCheck(this,IfcDistributionElement);_this2306=_super2309.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2306.GlobalId=GlobalId;_this2306.OwnerHistory=OwnerHistory;_this2306.Name=Name;_this2306.Description=Description;_this2306.ObjectType=ObjectType;_this2306.ObjectPlacement=ObjectPlacement;_this2306.Representation=Representation;_this2306.Tag=Tag;_this2306.type=1945004755;return _this2306;}return _createClass(IfcDistributionElement);}(IfcElement);IFC4X32.IfcDistributionElement=IfcDistributionElement;var IfcDistributionFlowElement=/*#__PURE__*/function(_IfcDistributionEleme11){_inherits(IfcDistributionFlowElement,_IfcDistributionEleme11);var _super2310=_createSuper(IfcDistributionFlowElement);function IfcDistributionFlowElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2307;_classCallCheck(this,IfcDistributionFlowElement);_this2307=_super2310.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2307.GlobalId=GlobalId;_this2307.OwnerHistory=OwnerHistory;_this2307.Name=Name;_this2307.Description=Description;_this2307.ObjectType=ObjectType;_this2307.ObjectPlacement=ObjectPlacement;_this2307.Representation=Representation;_this2307.Tag=Tag;_this2307.type=3040386961;return _this2307;}return _createClass(IfcDistributionFlowElement);}(IfcDistributionElement);IFC4X32.IfcDistributionFlowElement=IfcDistributionFlowElement;var IfcDistributionPort=/*#__PURE__*/function(_IfcPort3){_inherits(IfcDistributionPort,_IfcPort3);var _super2311=_createSuper(IfcDistributionPort);function IfcDistributionPort(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,FlowDirection,PredefinedType,SystemType){var _this2308;_classCallCheck(this,IfcDistributionPort);_this2308=_super2311.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2308.GlobalId=GlobalId;_this2308.OwnerHistory=OwnerHistory;_this2308.Name=Name;_this2308.Description=Description;_this2308.ObjectType=ObjectType;_this2308.ObjectPlacement=ObjectPlacement;_this2308.Representation=Representation;_this2308.FlowDirection=FlowDirection;_this2308.PredefinedType=PredefinedType;_this2308.SystemType=SystemType;_this2308.type=3041715199;return _this2308;}return _createClass(IfcDistributionPort);}(IfcPort);IFC4X32.IfcDistributionPort=IfcDistributionPort;var IfcDistributionSystem=/*#__PURE__*/function(_IfcSystem10){_inherits(IfcDistributionSystem,_IfcSystem10);var _super2312=_createSuper(IfcDistributionSystem);function IfcDistributionSystem(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,PredefinedType){var _this2309;_classCallCheck(this,IfcDistributionSystem);_this2309=_super2312.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2309.GlobalId=GlobalId;_this2309.OwnerHistory=OwnerHistory;_this2309.Name=Name;_this2309.Description=Description;_this2309.ObjectType=ObjectType;_this2309.LongName=LongName;_this2309.PredefinedType=PredefinedType;_this2309.type=3205830791;return _this2309;}return _createClass(IfcDistributionSystem);}(IfcSystem);IFC4X32.IfcDistributionSystem=IfcDistributionSystem;var IfcDoor=/*#__PURE__*/function(_IfcBuiltElement7){_inherits(IfcDoor,_IfcBuiltElement7);var _super2313=_createSuper(IfcDoor);function IfcDoor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,OperationType,UserDefinedOperationType){var _this2310;_classCallCheck(this,IfcDoor);_this2310=_super2313.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2310.GlobalId=GlobalId;_this2310.OwnerHistory=OwnerHistory;_this2310.Name=Name;_this2310.Description=Description;_this2310.ObjectType=ObjectType;_this2310.ObjectPlacement=ObjectPlacement;_this2310.Representation=Representation;_this2310.Tag=Tag;_this2310.OverallHeight=OverallHeight;_this2310.OverallWidth=OverallWidth;_this2310.PredefinedType=PredefinedType;_this2310.OperationType=OperationType;_this2310.UserDefinedOperationType=UserDefinedOperationType;_this2310.type=395920057;return _this2310;}return _createClass(IfcDoor);}(IfcBuiltElement);IFC4X32.IfcDoor=IfcDoor;var IfcDuctFittingType=/*#__PURE__*/function(_IfcFlowFittingType14){_inherits(IfcDuctFittingType,_IfcFlowFittingType14);var _super2314=_createSuper(IfcDuctFittingType);function IfcDuctFittingType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2311;_classCallCheck(this,IfcDuctFittingType);_this2311=_super2314.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2311.GlobalId=GlobalId;_this2311.OwnerHistory=OwnerHistory;_this2311.Name=Name;_this2311.Description=Description;_this2311.ApplicableOccurrence=ApplicableOccurrence;_this2311.HasPropertySets=HasPropertySets;_this2311.RepresentationMaps=RepresentationMaps;_this2311.Tag=Tag;_this2311.ElementType=ElementType;_this2311.PredefinedType=PredefinedType;_this2311.type=869906466;return _this2311;}return _createClass(IfcDuctFittingType);}(IfcFlowFittingType);IFC4X32.IfcDuctFittingType=IfcDuctFittingType;var IfcDuctSegmentType=/*#__PURE__*/function(_IfcFlowSegmentType13){_inherits(IfcDuctSegmentType,_IfcFlowSegmentType13);var _super2315=_createSuper(IfcDuctSegmentType);function IfcDuctSegmentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2312;_classCallCheck(this,IfcDuctSegmentType);_this2312=_super2315.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2312.GlobalId=GlobalId;_this2312.OwnerHistory=OwnerHistory;_this2312.Name=Name;_this2312.Description=Description;_this2312.ApplicableOccurrence=ApplicableOccurrence;_this2312.HasPropertySets=HasPropertySets;_this2312.RepresentationMaps=RepresentationMaps;_this2312.Tag=Tag;_this2312.ElementType=ElementType;_this2312.PredefinedType=PredefinedType;_this2312.type=3760055223;return _this2312;}return _createClass(IfcDuctSegmentType);}(IfcFlowSegmentType);IFC4X32.IfcDuctSegmentType=IfcDuctSegmentType;var IfcDuctSilencerType=/*#__PURE__*/function(_IfcFlowTreatmentDevi10){_inherits(IfcDuctSilencerType,_IfcFlowTreatmentDevi10);var _super2316=_createSuper(IfcDuctSilencerType);function IfcDuctSilencerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2313;_classCallCheck(this,IfcDuctSilencerType);_this2313=_super2316.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2313.GlobalId=GlobalId;_this2313.OwnerHistory=OwnerHistory;_this2313.Name=Name;_this2313.Description=Description;_this2313.ApplicableOccurrence=ApplicableOccurrence;_this2313.HasPropertySets=HasPropertySets;_this2313.RepresentationMaps=RepresentationMaps;_this2313.Tag=Tag;_this2313.ElementType=ElementType;_this2313.PredefinedType=PredefinedType;_this2313.type=2030761528;return _this2313;}return _createClass(IfcDuctSilencerType);}(IfcFlowTreatmentDeviceType);IFC4X32.IfcDuctSilencerType=IfcDuctSilencerType;var IfcEarthworksCut=/*#__PURE__*/function(_IfcFeatureElementSub7){_inherits(IfcEarthworksCut,_IfcFeatureElementSub7);var _super2317=_createSuper(IfcEarthworksCut);function IfcEarthworksCut(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2314;_classCallCheck(this,IfcEarthworksCut);_this2314=_super2317.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2314.GlobalId=GlobalId;_this2314.OwnerHistory=OwnerHistory;_this2314.Name=Name;_this2314.Description=Description;_this2314.ObjectType=ObjectType;_this2314.ObjectPlacement=ObjectPlacement;_this2314.Representation=Representation;_this2314.Tag=Tag;_this2314.PredefinedType=PredefinedType;_this2314.type=3071239417;return _this2314;}return _createClass(IfcEarthworksCut);}(IfcFeatureElementSubtraction);IFC4X32.IfcEarthworksCut=IfcEarthworksCut;var IfcEarthworksElement=/*#__PURE__*/function(_IfcBuiltElement8){_inherits(IfcEarthworksElement,_IfcBuiltElement8);var _super2318=_createSuper(IfcEarthworksElement);function IfcEarthworksElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2315;_classCallCheck(this,IfcEarthworksElement);_this2315=_super2318.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2315.GlobalId=GlobalId;_this2315.OwnerHistory=OwnerHistory;_this2315.Name=Name;_this2315.Description=Description;_this2315.ObjectType=ObjectType;_this2315.ObjectPlacement=ObjectPlacement;_this2315.Representation=Representation;_this2315.Tag=Tag;_this2315.type=1077100507;return _this2315;}return _createClass(IfcEarthworksElement);}(IfcBuiltElement);IFC4X32.IfcEarthworksElement=IfcEarthworksElement;var IfcEarthworksFill=/*#__PURE__*/function(_IfcEarthworksElement){_inherits(IfcEarthworksFill,_IfcEarthworksElement);var _super2319=_createSuper(IfcEarthworksFill);function IfcEarthworksFill(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2316;_classCallCheck(this,IfcEarthworksFill);_this2316=_super2319.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2316.GlobalId=GlobalId;_this2316.OwnerHistory=OwnerHistory;_this2316.Name=Name;_this2316.Description=Description;_this2316.ObjectType=ObjectType;_this2316.ObjectPlacement=ObjectPlacement;_this2316.Representation=Representation;_this2316.Tag=Tag;_this2316.PredefinedType=PredefinedType;_this2316.type=3376911765;return _this2316;}return _createClass(IfcEarthworksFill);}(IfcEarthworksElement);IFC4X32.IfcEarthworksFill=IfcEarthworksFill;var IfcElectricApplianceType=/*#__PURE__*/function(_IfcFlowTerminalType39){_inherits(IfcElectricApplianceType,_IfcFlowTerminalType39);var _super2320=_createSuper(IfcElectricApplianceType);function IfcElectricApplianceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2317;_classCallCheck(this,IfcElectricApplianceType);_this2317=_super2320.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2317.GlobalId=GlobalId;_this2317.OwnerHistory=OwnerHistory;_this2317.Name=Name;_this2317.Description=Description;_this2317.ApplicableOccurrence=ApplicableOccurrence;_this2317.HasPropertySets=HasPropertySets;_this2317.RepresentationMaps=RepresentationMaps;_this2317.Tag=Tag;_this2317.ElementType=ElementType;_this2317.PredefinedType=PredefinedType;_this2317.type=663422040;return _this2317;}return _createClass(IfcElectricApplianceType);}(IfcFlowTerminalType);IFC4X32.IfcElectricApplianceType=IfcElectricApplianceType;var IfcElectricDistributionBoardType=/*#__PURE__*/function(_IfcFlowControllerTyp23){_inherits(IfcElectricDistributionBoardType,_IfcFlowControllerTyp23);var _super2321=_createSuper(IfcElectricDistributionBoardType);function IfcElectricDistributionBoardType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2318;_classCallCheck(this,IfcElectricDistributionBoardType);_this2318=_super2321.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2318.GlobalId=GlobalId;_this2318.OwnerHistory=OwnerHistory;_this2318.Name=Name;_this2318.Description=Description;_this2318.ApplicableOccurrence=ApplicableOccurrence;_this2318.HasPropertySets=HasPropertySets;_this2318.RepresentationMaps=RepresentationMaps;_this2318.Tag=Tag;_this2318.ElementType=ElementType;_this2318.PredefinedType=PredefinedType;_this2318.type=2417008758;return _this2318;}return _createClass(IfcElectricDistributionBoardType);}(IfcFlowControllerType);IFC4X32.IfcElectricDistributionBoardType=IfcElectricDistributionBoardType;var IfcElectricFlowStorageDeviceType=/*#__PURE__*/function(_IfcFlowStorageDevice8){_inherits(IfcElectricFlowStorageDeviceType,_IfcFlowStorageDevice8);var _super2322=_createSuper(IfcElectricFlowStorageDeviceType);function IfcElectricFlowStorageDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2319;_classCallCheck(this,IfcElectricFlowStorageDeviceType);_this2319=_super2322.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2319.GlobalId=GlobalId;_this2319.OwnerHistory=OwnerHistory;_this2319.Name=Name;_this2319.Description=Description;_this2319.ApplicableOccurrence=ApplicableOccurrence;_this2319.HasPropertySets=HasPropertySets;_this2319.RepresentationMaps=RepresentationMaps;_this2319.Tag=Tag;_this2319.ElementType=ElementType;_this2319.PredefinedType=PredefinedType;_this2319.type=3277789161;return _this2319;}return _createClass(IfcElectricFlowStorageDeviceType);}(IfcFlowStorageDeviceType);IFC4X32.IfcElectricFlowStorageDeviceType=IfcElectricFlowStorageDeviceType;var IfcElectricFlowTreatmentDeviceType=/*#__PURE__*/function(_IfcFlowTreatmentDevi11){_inherits(IfcElectricFlowTreatmentDeviceType,_IfcFlowTreatmentDevi11);var _super2323=_createSuper(IfcElectricFlowTreatmentDeviceType);function IfcElectricFlowTreatmentDeviceType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2320;_classCallCheck(this,IfcElectricFlowTreatmentDeviceType);_this2320=_super2323.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2320.GlobalId=GlobalId;_this2320.OwnerHistory=OwnerHistory;_this2320.Name=Name;_this2320.Description=Description;_this2320.ApplicableOccurrence=ApplicableOccurrence;_this2320.HasPropertySets=HasPropertySets;_this2320.RepresentationMaps=RepresentationMaps;_this2320.Tag=Tag;_this2320.ElementType=ElementType;_this2320.PredefinedType=PredefinedType;_this2320.type=2142170206;return _this2320;}return _createClass(IfcElectricFlowTreatmentDeviceType);}(IfcFlowTreatmentDeviceType);IFC4X32.IfcElectricFlowTreatmentDeviceType=IfcElectricFlowTreatmentDeviceType;var IfcElectricGeneratorType=/*#__PURE__*/function(_IfcEnergyConversionD77){_inherits(IfcElectricGeneratorType,_IfcEnergyConversionD77);var _super2324=_createSuper(IfcElectricGeneratorType);function IfcElectricGeneratorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2321;_classCallCheck(this,IfcElectricGeneratorType);_this2321=_super2324.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2321.GlobalId=GlobalId;_this2321.OwnerHistory=OwnerHistory;_this2321.Name=Name;_this2321.Description=Description;_this2321.ApplicableOccurrence=ApplicableOccurrence;_this2321.HasPropertySets=HasPropertySets;_this2321.RepresentationMaps=RepresentationMaps;_this2321.Tag=Tag;_this2321.ElementType=ElementType;_this2321.PredefinedType=PredefinedType;_this2321.type=1534661035;return _this2321;}return _createClass(IfcElectricGeneratorType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcElectricGeneratorType=IfcElectricGeneratorType;var IfcElectricMotorType=/*#__PURE__*/function(_IfcEnergyConversionD78){_inherits(IfcElectricMotorType,_IfcEnergyConversionD78);var _super2325=_createSuper(IfcElectricMotorType);function IfcElectricMotorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2322;_classCallCheck(this,IfcElectricMotorType);_this2322=_super2325.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2322.GlobalId=GlobalId;_this2322.OwnerHistory=OwnerHistory;_this2322.Name=Name;_this2322.Description=Description;_this2322.ApplicableOccurrence=ApplicableOccurrence;_this2322.HasPropertySets=HasPropertySets;_this2322.RepresentationMaps=RepresentationMaps;_this2322.Tag=Tag;_this2322.ElementType=ElementType;_this2322.PredefinedType=PredefinedType;_this2322.type=1217240411;return _this2322;}return _createClass(IfcElectricMotorType);}(IfcEnergyConversionDeviceType);IFC4X32.IfcElectricMotorType=IfcElectricMotorType;var IfcElectricTimeControlType=/*#__PURE__*/function(_IfcFlowControllerTyp24){_inherits(IfcElectricTimeControlType,_IfcFlowControllerTyp24);var _super2326=_createSuper(IfcElectricTimeControlType);function IfcElectricTimeControlType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2323;_classCallCheck(this,IfcElectricTimeControlType);_this2323=_super2326.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2323.GlobalId=GlobalId;_this2323.OwnerHistory=OwnerHistory;_this2323.Name=Name;_this2323.Description=Description;_this2323.ApplicableOccurrence=ApplicableOccurrence;_this2323.HasPropertySets=HasPropertySets;_this2323.RepresentationMaps=RepresentationMaps;_this2323.Tag=Tag;_this2323.ElementType=ElementType;_this2323.PredefinedType=PredefinedType;_this2323.type=712377611;return _this2323;}return _createClass(IfcElectricTimeControlType);}(IfcFlowControllerType);IFC4X32.IfcElectricTimeControlType=IfcElectricTimeControlType;var IfcEnergyConversionDevice=/*#__PURE__*/function(_IfcDistributionFlowE46){_inherits(IfcEnergyConversionDevice,_IfcDistributionFlowE46);var _super2327=_createSuper(IfcEnergyConversionDevice);function IfcEnergyConversionDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2324;_classCallCheck(this,IfcEnergyConversionDevice);_this2324=_super2327.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2324.GlobalId=GlobalId;_this2324.OwnerHistory=OwnerHistory;_this2324.Name=Name;_this2324.Description=Description;_this2324.ObjectType=ObjectType;_this2324.ObjectPlacement=ObjectPlacement;_this2324.Representation=Representation;_this2324.Tag=Tag;_this2324.type=1658829314;return _this2324;}return _createClass(IfcEnergyConversionDevice);}(IfcDistributionFlowElement);IFC4X32.IfcEnergyConversionDevice=IfcEnergyConversionDevice;var IfcEngine=/*#__PURE__*/function(_IfcEnergyConversionD79){_inherits(IfcEngine,_IfcEnergyConversionD79);var _super2328=_createSuper(IfcEngine);function IfcEngine(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2325;_classCallCheck(this,IfcEngine);_this2325=_super2328.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2325.GlobalId=GlobalId;_this2325.OwnerHistory=OwnerHistory;_this2325.Name=Name;_this2325.Description=Description;_this2325.ObjectType=ObjectType;_this2325.ObjectPlacement=ObjectPlacement;_this2325.Representation=Representation;_this2325.Tag=Tag;_this2325.PredefinedType=PredefinedType;_this2325.type=2814081492;return _this2325;}return _createClass(IfcEngine);}(IfcEnergyConversionDevice);IFC4X32.IfcEngine=IfcEngine;var IfcEvaporativeCooler=/*#__PURE__*/function(_IfcEnergyConversionD80){_inherits(IfcEvaporativeCooler,_IfcEnergyConversionD80);var _super2329=_createSuper(IfcEvaporativeCooler);function IfcEvaporativeCooler(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2326;_classCallCheck(this,IfcEvaporativeCooler);_this2326=_super2329.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2326.GlobalId=GlobalId;_this2326.OwnerHistory=OwnerHistory;_this2326.Name=Name;_this2326.Description=Description;_this2326.ObjectType=ObjectType;_this2326.ObjectPlacement=ObjectPlacement;_this2326.Representation=Representation;_this2326.Tag=Tag;_this2326.PredefinedType=PredefinedType;_this2326.type=3747195512;return _this2326;}return _createClass(IfcEvaporativeCooler);}(IfcEnergyConversionDevice);IFC4X32.IfcEvaporativeCooler=IfcEvaporativeCooler;var IfcEvaporator=/*#__PURE__*/function(_IfcEnergyConversionD81){_inherits(IfcEvaporator,_IfcEnergyConversionD81);var _super2330=_createSuper(IfcEvaporator);function IfcEvaporator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2327;_classCallCheck(this,IfcEvaporator);_this2327=_super2330.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2327.GlobalId=GlobalId;_this2327.OwnerHistory=OwnerHistory;_this2327.Name=Name;_this2327.Description=Description;_this2327.ObjectType=ObjectType;_this2327.ObjectPlacement=ObjectPlacement;_this2327.Representation=Representation;_this2327.Tag=Tag;_this2327.PredefinedType=PredefinedType;_this2327.type=484807127;return _this2327;}return _createClass(IfcEvaporator);}(IfcEnergyConversionDevice);IFC4X32.IfcEvaporator=IfcEvaporator;var IfcExternalSpatialElement=/*#__PURE__*/function(_IfcExternalSpatialSt2){_inherits(IfcExternalSpatialElement,_IfcExternalSpatialSt2);var _super2331=_createSuper(IfcExternalSpatialElement);function IfcExternalSpatialElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName,PredefinedType){var _this2328;_classCallCheck(this,IfcExternalSpatialElement);_this2328=_super2331.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,LongName);_this2328.GlobalId=GlobalId;_this2328.OwnerHistory=OwnerHistory;_this2328.Name=Name;_this2328.Description=Description;_this2328.ObjectType=ObjectType;_this2328.ObjectPlacement=ObjectPlacement;_this2328.Representation=Representation;_this2328.LongName=LongName;_this2328.PredefinedType=PredefinedType;_this2328.type=1209101575;return _this2328;}return _createClass(IfcExternalSpatialElement);}(IfcExternalSpatialStructureElement);IFC4X32.IfcExternalSpatialElement=IfcExternalSpatialElement;var IfcFanType=/*#__PURE__*/function(_IfcFlowMovingDeviceT9){_inherits(IfcFanType,_IfcFlowMovingDeviceT9);var _super2332=_createSuper(IfcFanType);function IfcFanType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2329;_classCallCheck(this,IfcFanType);_this2329=_super2332.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2329.GlobalId=GlobalId;_this2329.OwnerHistory=OwnerHistory;_this2329.Name=Name;_this2329.Description=Description;_this2329.ApplicableOccurrence=ApplicableOccurrence;_this2329.HasPropertySets=HasPropertySets;_this2329.RepresentationMaps=RepresentationMaps;_this2329.Tag=Tag;_this2329.ElementType=ElementType;_this2329.PredefinedType=PredefinedType;_this2329.type=346874300;return _this2329;}return _createClass(IfcFanType);}(IfcFlowMovingDeviceType);IFC4X32.IfcFanType=IfcFanType;var IfcFilterType=/*#__PURE__*/function(_IfcFlowTreatmentDevi12){_inherits(IfcFilterType,_IfcFlowTreatmentDevi12);var _super2333=_createSuper(IfcFilterType);function IfcFilterType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2330;_classCallCheck(this,IfcFilterType);_this2330=_super2333.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2330.GlobalId=GlobalId;_this2330.OwnerHistory=OwnerHistory;_this2330.Name=Name;_this2330.Description=Description;_this2330.ApplicableOccurrence=ApplicableOccurrence;_this2330.HasPropertySets=HasPropertySets;_this2330.RepresentationMaps=RepresentationMaps;_this2330.Tag=Tag;_this2330.ElementType=ElementType;_this2330.PredefinedType=PredefinedType;_this2330.type=1810631287;return _this2330;}return _createClass(IfcFilterType);}(IfcFlowTreatmentDeviceType);IFC4X32.IfcFilterType=IfcFilterType;var IfcFireSuppressionTerminalType=/*#__PURE__*/function(_IfcFlowTerminalType40){_inherits(IfcFireSuppressionTerminalType,_IfcFlowTerminalType40);var _super2334=_createSuper(IfcFireSuppressionTerminalType);function IfcFireSuppressionTerminalType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2331;_classCallCheck(this,IfcFireSuppressionTerminalType);_this2331=_super2334.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2331.GlobalId=GlobalId;_this2331.OwnerHistory=OwnerHistory;_this2331.Name=Name;_this2331.Description=Description;_this2331.ApplicableOccurrence=ApplicableOccurrence;_this2331.HasPropertySets=HasPropertySets;_this2331.RepresentationMaps=RepresentationMaps;_this2331.Tag=Tag;_this2331.ElementType=ElementType;_this2331.PredefinedType=PredefinedType;_this2331.type=4222183408;return _this2331;}return _createClass(IfcFireSuppressionTerminalType);}(IfcFlowTerminalType);IFC4X32.IfcFireSuppressionTerminalType=IfcFireSuppressionTerminalType;var IfcFlowController=/*#__PURE__*/function(_IfcDistributionFlowE47){_inherits(IfcFlowController,_IfcDistributionFlowE47);var _super2335=_createSuper(IfcFlowController);function IfcFlowController(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2332;_classCallCheck(this,IfcFlowController);_this2332=_super2335.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2332.GlobalId=GlobalId;_this2332.OwnerHistory=OwnerHistory;_this2332.Name=Name;_this2332.Description=Description;_this2332.ObjectType=ObjectType;_this2332.ObjectPlacement=ObjectPlacement;_this2332.Representation=Representation;_this2332.Tag=Tag;_this2332.type=2058353004;return _this2332;}return _createClass(IfcFlowController);}(IfcDistributionFlowElement);IFC4X32.IfcFlowController=IfcFlowController;var IfcFlowFitting=/*#__PURE__*/function(_IfcDistributionFlowE48){_inherits(IfcFlowFitting,_IfcDistributionFlowE48);var _super2336=_createSuper(IfcFlowFitting);function IfcFlowFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2333;_classCallCheck(this,IfcFlowFitting);_this2333=_super2336.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2333.GlobalId=GlobalId;_this2333.OwnerHistory=OwnerHistory;_this2333.Name=Name;_this2333.Description=Description;_this2333.ObjectType=ObjectType;_this2333.ObjectPlacement=ObjectPlacement;_this2333.Representation=Representation;_this2333.Tag=Tag;_this2333.type=4278956645;return _this2333;}return _createClass(IfcFlowFitting);}(IfcDistributionFlowElement);IFC4X32.IfcFlowFitting=IfcFlowFitting;var IfcFlowInstrumentType=/*#__PURE__*/function(_IfcDistributionContr20){_inherits(IfcFlowInstrumentType,_IfcDistributionContr20);var _super2337=_createSuper(IfcFlowInstrumentType);function IfcFlowInstrumentType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2334;_classCallCheck(this,IfcFlowInstrumentType);_this2334=_super2337.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2334.GlobalId=GlobalId;_this2334.OwnerHistory=OwnerHistory;_this2334.Name=Name;_this2334.Description=Description;_this2334.ApplicableOccurrence=ApplicableOccurrence;_this2334.HasPropertySets=HasPropertySets;_this2334.RepresentationMaps=RepresentationMaps;_this2334.Tag=Tag;_this2334.ElementType=ElementType;_this2334.PredefinedType=PredefinedType;_this2334.type=4037862832;return _this2334;}return _createClass(IfcFlowInstrumentType);}(IfcDistributionControlElementType);IFC4X32.IfcFlowInstrumentType=IfcFlowInstrumentType;var IfcFlowMeter=/*#__PURE__*/function(_IfcFlowController10){_inherits(IfcFlowMeter,_IfcFlowController10);var _super2338=_createSuper(IfcFlowMeter);function IfcFlowMeter(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2335;_classCallCheck(this,IfcFlowMeter);_this2335=_super2338.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2335.GlobalId=GlobalId;_this2335.OwnerHistory=OwnerHistory;_this2335.Name=Name;_this2335.Description=Description;_this2335.ObjectType=ObjectType;_this2335.ObjectPlacement=ObjectPlacement;_this2335.Representation=Representation;_this2335.Tag=Tag;_this2335.PredefinedType=PredefinedType;_this2335.type=2188021234;return _this2335;}return _createClass(IfcFlowMeter);}(IfcFlowController);IFC4X32.IfcFlowMeter=IfcFlowMeter;var IfcFlowMovingDevice=/*#__PURE__*/function(_IfcDistributionFlowE49){_inherits(IfcFlowMovingDevice,_IfcDistributionFlowE49);var _super2339=_createSuper(IfcFlowMovingDevice);function IfcFlowMovingDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2336;_classCallCheck(this,IfcFlowMovingDevice);_this2336=_super2339.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2336.GlobalId=GlobalId;_this2336.OwnerHistory=OwnerHistory;_this2336.Name=Name;_this2336.Description=Description;_this2336.ObjectType=ObjectType;_this2336.ObjectPlacement=ObjectPlacement;_this2336.Representation=Representation;_this2336.Tag=Tag;_this2336.type=3132237377;return _this2336;}return _createClass(IfcFlowMovingDevice);}(IfcDistributionFlowElement);IFC4X32.IfcFlowMovingDevice=IfcFlowMovingDevice;var IfcFlowSegment=/*#__PURE__*/function(_IfcDistributionFlowE50){_inherits(IfcFlowSegment,_IfcDistributionFlowE50);var _super2340=_createSuper(IfcFlowSegment);function IfcFlowSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2337;_classCallCheck(this,IfcFlowSegment);_this2337=_super2340.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2337.GlobalId=GlobalId;_this2337.OwnerHistory=OwnerHistory;_this2337.Name=Name;_this2337.Description=Description;_this2337.ObjectType=ObjectType;_this2337.ObjectPlacement=ObjectPlacement;_this2337.Representation=Representation;_this2337.Tag=Tag;_this2337.type=987401354;return _this2337;}return _createClass(IfcFlowSegment);}(IfcDistributionFlowElement);IFC4X32.IfcFlowSegment=IfcFlowSegment;var IfcFlowStorageDevice=/*#__PURE__*/function(_IfcDistributionFlowE51){_inherits(IfcFlowStorageDevice,_IfcDistributionFlowE51);var _super2341=_createSuper(IfcFlowStorageDevice);function IfcFlowStorageDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2338;_classCallCheck(this,IfcFlowStorageDevice);_this2338=_super2341.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2338.GlobalId=GlobalId;_this2338.OwnerHistory=OwnerHistory;_this2338.Name=Name;_this2338.Description=Description;_this2338.ObjectType=ObjectType;_this2338.ObjectPlacement=ObjectPlacement;_this2338.Representation=Representation;_this2338.Tag=Tag;_this2338.type=707683696;return _this2338;}return _createClass(IfcFlowStorageDevice);}(IfcDistributionFlowElement);IFC4X32.IfcFlowStorageDevice=IfcFlowStorageDevice;var IfcFlowTerminal=/*#__PURE__*/function(_IfcDistributionFlowE52){_inherits(IfcFlowTerminal,_IfcDistributionFlowE52);var _super2342=_createSuper(IfcFlowTerminal);function IfcFlowTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2339;_classCallCheck(this,IfcFlowTerminal);_this2339=_super2342.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2339.GlobalId=GlobalId;_this2339.OwnerHistory=OwnerHistory;_this2339.Name=Name;_this2339.Description=Description;_this2339.ObjectType=ObjectType;_this2339.ObjectPlacement=ObjectPlacement;_this2339.Representation=Representation;_this2339.Tag=Tag;_this2339.type=2223149337;return _this2339;}return _createClass(IfcFlowTerminal);}(IfcDistributionFlowElement);IFC4X32.IfcFlowTerminal=IfcFlowTerminal;var IfcFlowTreatmentDevice=/*#__PURE__*/function(_IfcDistributionFlowE53){_inherits(IfcFlowTreatmentDevice,_IfcDistributionFlowE53);var _super2343=_createSuper(IfcFlowTreatmentDevice);function IfcFlowTreatmentDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2340;_classCallCheck(this,IfcFlowTreatmentDevice);_this2340=_super2343.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2340.GlobalId=GlobalId;_this2340.OwnerHistory=OwnerHistory;_this2340.Name=Name;_this2340.Description=Description;_this2340.ObjectType=ObjectType;_this2340.ObjectPlacement=ObjectPlacement;_this2340.Representation=Representation;_this2340.Tag=Tag;_this2340.type=3508470533;return _this2340;}return _createClass(IfcFlowTreatmentDevice);}(IfcDistributionFlowElement);IFC4X32.IfcFlowTreatmentDevice=IfcFlowTreatmentDevice;var IfcFooting=/*#__PURE__*/function(_IfcBuiltElement9){_inherits(IfcFooting,_IfcBuiltElement9);var _super2344=_createSuper(IfcFooting);function IfcFooting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2341;_classCallCheck(this,IfcFooting);_this2341=_super2344.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2341.GlobalId=GlobalId;_this2341.OwnerHistory=OwnerHistory;_this2341.Name=Name;_this2341.Description=Description;_this2341.ObjectType=ObjectType;_this2341.ObjectPlacement=ObjectPlacement;_this2341.Representation=Representation;_this2341.Tag=Tag;_this2341.PredefinedType=PredefinedType;_this2341.type=900683007;return _this2341;}return _createClass(IfcFooting);}(IfcBuiltElement);IFC4X32.IfcFooting=IfcFooting;var IfcGeotechnicalAssembly=/*#__PURE__*/function(_IfcGeotechnicalEleme2){_inherits(IfcGeotechnicalAssembly,_IfcGeotechnicalEleme2);var _super2345=_createSuper(IfcGeotechnicalAssembly);function IfcGeotechnicalAssembly(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2342;_classCallCheck(this,IfcGeotechnicalAssembly);_this2342=_super2345.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2342.GlobalId=GlobalId;_this2342.OwnerHistory=OwnerHistory;_this2342.Name=Name;_this2342.Description=Description;_this2342.ObjectType=ObjectType;_this2342.ObjectPlacement=ObjectPlacement;_this2342.Representation=Representation;_this2342.Tag=Tag;_this2342.type=2713699986;return _this2342;}return _createClass(IfcGeotechnicalAssembly);}(IfcGeotechnicalElement);IFC4X32.IfcGeotechnicalAssembly=IfcGeotechnicalAssembly;var IfcGrid=/*#__PURE__*/function(_IfcPositioningElemen2){_inherits(IfcGrid,_IfcPositioningElemen2);var _super2346=_createSuper(IfcGrid);function IfcGrid(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,UAxes,VAxes,WAxes,PredefinedType){var _this2343;_classCallCheck(this,IfcGrid);_this2343=_super2346.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2343.GlobalId=GlobalId;_this2343.OwnerHistory=OwnerHistory;_this2343.Name=Name;_this2343.Description=Description;_this2343.ObjectType=ObjectType;_this2343.ObjectPlacement=ObjectPlacement;_this2343.Representation=Representation;_this2343.UAxes=UAxes;_this2343.VAxes=VAxes;_this2343.WAxes=WAxes;_this2343.PredefinedType=PredefinedType;_this2343.type=3009204131;return _this2343;}return _createClass(IfcGrid);}(IfcPositioningElement);IFC4X32.IfcGrid=IfcGrid;var IfcHeatExchanger=/*#__PURE__*/function(_IfcEnergyConversionD82){_inherits(IfcHeatExchanger,_IfcEnergyConversionD82);var _super2347=_createSuper(IfcHeatExchanger);function IfcHeatExchanger(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2344;_classCallCheck(this,IfcHeatExchanger);_this2344=_super2347.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2344.GlobalId=GlobalId;_this2344.OwnerHistory=OwnerHistory;_this2344.Name=Name;_this2344.Description=Description;_this2344.ObjectType=ObjectType;_this2344.ObjectPlacement=ObjectPlacement;_this2344.Representation=Representation;_this2344.Tag=Tag;_this2344.PredefinedType=PredefinedType;_this2344.type=3319311131;return _this2344;}return _createClass(IfcHeatExchanger);}(IfcEnergyConversionDevice);IFC4X32.IfcHeatExchanger=IfcHeatExchanger;var IfcHumidifier=/*#__PURE__*/function(_IfcEnergyConversionD83){_inherits(IfcHumidifier,_IfcEnergyConversionD83);var _super2348=_createSuper(IfcHumidifier);function IfcHumidifier(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2345;_classCallCheck(this,IfcHumidifier);_this2345=_super2348.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2345.GlobalId=GlobalId;_this2345.OwnerHistory=OwnerHistory;_this2345.Name=Name;_this2345.Description=Description;_this2345.ObjectType=ObjectType;_this2345.ObjectPlacement=ObjectPlacement;_this2345.Representation=Representation;_this2345.Tag=Tag;_this2345.PredefinedType=PredefinedType;_this2345.type=2068733104;return _this2345;}return _createClass(IfcHumidifier);}(IfcEnergyConversionDevice);IFC4X32.IfcHumidifier=IfcHumidifier;var IfcInterceptor=/*#__PURE__*/function(_IfcFlowTreatmentDevi13){_inherits(IfcInterceptor,_IfcFlowTreatmentDevi13);var _super2349=_createSuper(IfcInterceptor);function IfcInterceptor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2346;_classCallCheck(this,IfcInterceptor);_this2346=_super2349.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2346.GlobalId=GlobalId;_this2346.OwnerHistory=OwnerHistory;_this2346.Name=Name;_this2346.Description=Description;_this2346.ObjectType=ObjectType;_this2346.ObjectPlacement=ObjectPlacement;_this2346.Representation=Representation;_this2346.Tag=Tag;_this2346.PredefinedType=PredefinedType;_this2346.type=4175244083;return _this2346;}return _createClass(IfcInterceptor);}(IfcFlowTreatmentDevice);IFC4X32.IfcInterceptor=IfcInterceptor;var IfcJunctionBox=/*#__PURE__*/function(_IfcFlowFitting6){_inherits(IfcJunctionBox,_IfcFlowFitting6);var _super2350=_createSuper(IfcJunctionBox);function IfcJunctionBox(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2347;_classCallCheck(this,IfcJunctionBox);_this2347=_super2350.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2347.GlobalId=GlobalId;_this2347.OwnerHistory=OwnerHistory;_this2347.Name=Name;_this2347.Description=Description;_this2347.ObjectType=ObjectType;_this2347.ObjectPlacement=ObjectPlacement;_this2347.Representation=Representation;_this2347.Tag=Tag;_this2347.PredefinedType=PredefinedType;_this2347.type=2176052936;return _this2347;}return _createClass(IfcJunctionBox);}(IfcFlowFitting);IFC4X32.IfcJunctionBox=IfcJunctionBox;var IfcKerb=/*#__PURE__*/function(_IfcBuiltElement10){_inherits(IfcKerb,_IfcBuiltElement10);var _super2351=_createSuper(IfcKerb);function IfcKerb(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,Mountable){var _this2348;_classCallCheck(this,IfcKerb);_this2348=_super2351.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2348.GlobalId=GlobalId;_this2348.OwnerHistory=OwnerHistory;_this2348.Name=Name;_this2348.Description=Description;_this2348.ObjectType=ObjectType;_this2348.ObjectPlacement=ObjectPlacement;_this2348.Representation=Representation;_this2348.Tag=Tag;_this2348.Mountable=Mountable;_this2348.type=2696325953;return _this2348;}return _createClass(IfcKerb);}(IfcBuiltElement);IFC4X32.IfcKerb=IfcKerb;var IfcLamp=/*#__PURE__*/function(_IfcFlowTerminal14){_inherits(IfcLamp,_IfcFlowTerminal14);var _super2352=_createSuper(IfcLamp);function IfcLamp(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2349;_classCallCheck(this,IfcLamp);_this2349=_super2352.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2349.GlobalId=GlobalId;_this2349.OwnerHistory=OwnerHistory;_this2349.Name=Name;_this2349.Description=Description;_this2349.ObjectType=ObjectType;_this2349.ObjectPlacement=ObjectPlacement;_this2349.Representation=Representation;_this2349.Tag=Tag;_this2349.PredefinedType=PredefinedType;_this2349.type=76236018;return _this2349;}return _createClass(IfcLamp);}(IfcFlowTerminal);IFC4X32.IfcLamp=IfcLamp;var IfcLightFixture=/*#__PURE__*/function(_IfcFlowTerminal15){_inherits(IfcLightFixture,_IfcFlowTerminal15);var _super2353=_createSuper(IfcLightFixture);function IfcLightFixture(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2350;_classCallCheck(this,IfcLightFixture);_this2350=_super2353.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2350.GlobalId=GlobalId;_this2350.OwnerHistory=OwnerHistory;_this2350.Name=Name;_this2350.Description=Description;_this2350.ObjectType=ObjectType;_this2350.ObjectPlacement=ObjectPlacement;_this2350.Representation=Representation;_this2350.Tag=Tag;_this2350.PredefinedType=PredefinedType;_this2350.type=629592764;return _this2350;}return _createClass(IfcLightFixture);}(IfcFlowTerminal);IFC4X32.IfcLightFixture=IfcLightFixture;var IfcLinearPositioningElement=/*#__PURE__*/function(_IfcPositioningElemen3){_inherits(IfcLinearPositioningElement,_IfcPositioningElemen3);var _super2354=_createSuper(IfcLinearPositioningElement);function IfcLinearPositioningElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation){var _this2351;_classCallCheck(this,IfcLinearPositioningElement);_this2351=_super2354.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2351.GlobalId=GlobalId;_this2351.OwnerHistory=OwnerHistory;_this2351.Name=Name;_this2351.Description=Description;_this2351.ObjectType=ObjectType;_this2351.ObjectPlacement=ObjectPlacement;_this2351.Representation=Representation;_this2351.type=1154579445;return _this2351;}return _createClass(IfcLinearPositioningElement);}(IfcPositioningElement);IFC4X32.IfcLinearPositioningElement=IfcLinearPositioningElement;var IfcLiquidTerminal=/*#__PURE__*/function(_IfcFlowTerminal16){_inherits(IfcLiquidTerminal,_IfcFlowTerminal16);var _super2355=_createSuper(IfcLiquidTerminal);function IfcLiquidTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2352;_classCallCheck(this,IfcLiquidTerminal);_this2352=_super2355.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2352.GlobalId=GlobalId;_this2352.OwnerHistory=OwnerHistory;_this2352.Name=Name;_this2352.Description=Description;_this2352.ObjectType=ObjectType;_this2352.ObjectPlacement=ObjectPlacement;_this2352.Representation=Representation;_this2352.Tag=Tag;_this2352.PredefinedType=PredefinedType;_this2352.type=1638804497;return _this2352;}return _createClass(IfcLiquidTerminal);}(IfcFlowTerminal);IFC4X32.IfcLiquidTerminal=IfcLiquidTerminal;var IfcMedicalDevice=/*#__PURE__*/function(_IfcFlowTerminal17){_inherits(IfcMedicalDevice,_IfcFlowTerminal17);var _super2356=_createSuper(IfcMedicalDevice);function IfcMedicalDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2353;_classCallCheck(this,IfcMedicalDevice);_this2353=_super2356.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2353.GlobalId=GlobalId;_this2353.OwnerHistory=OwnerHistory;_this2353.Name=Name;_this2353.Description=Description;_this2353.ObjectType=ObjectType;_this2353.ObjectPlacement=ObjectPlacement;_this2353.Representation=Representation;_this2353.Tag=Tag;_this2353.PredefinedType=PredefinedType;_this2353.type=1437502449;return _this2353;}return _createClass(IfcMedicalDevice);}(IfcFlowTerminal);IFC4X32.IfcMedicalDevice=IfcMedicalDevice;var IfcMember=/*#__PURE__*/function(_IfcBuiltElement11){_inherits(IfcMember,_IfcBuiltElement11);var _super2357=_createSuper(IfcMember);function IfcMember(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2354;_classCallCheck(this,IfcMember);_this2354=_super2357.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2354.GlobalId=GlobalId;_this2354.OwnerHistory=OwnerHistory;_this2354.Name=Name;_this2354.Description=Description;_this2354.ObjectType=ObjectType;_this2354.ObjectPlacement=ObjectPlacement;_this2354.Representation=Representation;_this2354.Tag=Tag;_this2354.PredefinedType=PredefinedType;_this2354.type=1073191201;return _this2354;}return _createClass(IfcMember);}(IfcBuiltElement);IFC4X32.IfcMember=IfcMember;var IfcMobileTelecommunicationsAppliance=/*#__PURE__*/function(_IfcFlowTerminal18){_inherits(IfcMobileTelecommunicationsAppliance,_IfcFlowTerminal18);var _super2358=_createSuper(IfcMobileTelecommunicationsAppliance);function IfcMobileTelecommunicationsAppliance(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2355;_classCallCheck(this,IfcMobileTelecommunicationsAppliance);_this2355=_super2358.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2355.GlobalId=GlobalId;_this2355.OwnerHistory=OwnerHistory;_this2355.Name=Name;_this2355.Description=Description;_this2355.ObjectType=ObjectType;_this2355.ObjectPlacement=ObjectPlacement;_this2355.Representation=Representation;_this2355.Tag=Tag;_this2355.PredefinedType=PredefinedType;_this2355.type=2078563270;return _this2355;}return _createClass(IfcMobileTelecommunicationsAppliance);}(IfcFlowTerminal);IFC4X32.IfcMobileTelecommunicationsAppliance=IfcMobileTelecommunicationsAppliance;var IfcMooringDevice=/*#__PURE__*/function(_IfcBuiltElement12){_inherits(IfcMooringDevice,_IfcBuiltElement12);var _super2359=_createSuper(IfcMooringDevice);function IfcMooringDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2356;_classCallCheck(this,IfcMooringDevice);_this2356=_super2359.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2356.GlobalId=GlobalId;_this2356.OwnerHistory=OwnerHistory;_this2356.Name=Name;_this2356.Description=Description;_this2356.ObjectType=ObjectType;_this2356.ObjectPlacement=ObjectPlacement;_this2356.Representation=Representation;_this2356.Tag=Tag;_this2356.PredefinedType=PredefinedType;_this2356.type=234836483;return _this2356;}return _createClass(IfcMooringDevice);}(IfcBuiltElement);IFC4X32.IfcMooringDevice=IfcMooringDevice;var IfcMotorConnection=/*#__PURE__*/function(_IfcEnergyConversionD84){_inherits(IfcMotorConnection,_IfcEnergyConversionD84);var _super2360=_createSuper(IfcMotorConnection);function IfcMotorConnection(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2357;_classCallCheck(this,IfcMotorConnection);_this2357=_super2360.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2357.GlobalId=GlobalId;_this2357.OwnerHistory=OwnerHistory;_this2357.Name=Name;_this2357.Description=Description;_this2357.ObjectType=ObjectType;_this2357.ObjectPlacement=ObjectPlacement;_this2357.Representation=Representation;_this2357.Tag=Tag;_this2357.PredefinedType=PredefinedType;_this2357.type=2474470126;return _this2357;}return _createClass(IfcMotorConnection);}(IfcEnergyConversionDevice);IFC4X32.IfcMotorConnection=IfcMotorConnection;var IfcNavigationElement=/*#__PURE__*/function(_IfcBuiltElement13){_inherits(IfcNavigationElement,_IfcBuiltElement13);var _super2361=_createSuper(IfcNavigationElement);function IfcNavigationElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2358;_classCallCheck(this,IfcNavigationElement);_this2358=_super2361.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2358.GlobalId=GlobalId;_this2358.OwnerHistory=OwnerHistory;_this2358.Name=Name;_this2358.Description=Description;_this2358.ObjectType=ObjectType;_this2358.ObjectPlacement=ObjectPlacement;_this2358.Representation=Representation;_this2358.Tag=Tag;_this2358.PredefinedType=PredefinedType;_this2358.type=2182337498;return _this2358;}return _createClass(IfcNavigationElement);}(IfcBuiltElement);IFC4X32.IfcNavigationElement=IfcNavigationElement;var IfcOuterBoundaryCurve=/*#__PURE__*/function(_IfcBoundaryCurve2){_inherits(IfcOuterBoundaryCurve,_IfcBoundaryCurve2);var _super2362=_createSuper(IfcOuterBoundaryCurve);function IfcOuterBoundaryCurve(expressID,Segments,SelfIntersect){var _this2359;_classCallCheck(this,IfcOuterBoundaryCurve);_this2359=_super2362.call(this,expressID,Segments,SelfIntersect);_this2359.Segments=Segments;_this2359.SelfIntersect=SelfIntersect;_this2359.type=144952367;return _this2359;}return _createClass(IfcOuterBoundaryCurve);}(IfcBoundaryCurve);IFC4X32.IfcOuterBoundaryCurve=IfcOuterBoundaryCurve;var IfcOutlet=/*#__PURE__*/function(_IfcFlowTerminal19){_inherits(IfcOutlet,_IfcFlowTerminal19);var _super2363=_createSuper(IfcOutlet);function IfcOutlet(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2360;_classCallCheck(this,IfcOutlet);_this2360=_super2363.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2360.GlobalId=GlobalId;_this2360.OwnerHistory=OwnerHistory;_this2360.Name=Name;_this2360.Description=Description;_this2360.ObjectType=ObjectType;_this2360.ObjectPlacement=ObjectPlacement;_this2360.Representation=Representation;_this2360.Tag=Tag;_this2360.PredefinedType=PredefinedType;_this2360.type=3694346114;return _this2360;}return _createClass(IfcOutlet);}(IfcFlowTerminal);IFC4X32.IfcOutlet=IfcOutlet;var IfcPavement=/*#__PURE__*/function(_IfcBuiltElement14){_inherits(IfcPavement,_IfcBuiltElement14);var _super2364=_createSuper(IfcPavement);function IfcPavement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2361;_classCallCheck(this,IfcPavement);_this2361=_super2364.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2361.GlobalId=GlobalId;_this2361.OwnerHistory=OwnerHistory;_this2361.Name=Name;_this2361.Description=Description;_this2361.ObjectType=ObjectType;_this2361.ObjectPlacement=ObjectPlacement;_this2361.Representation=Representation;_this2361.Tag=Tag;_this2361.PredefinedType=PredefinedType;_this2361.type=1383356374;return _this2361;}return _createClass(IfcPavement);}(IfcBuiltElement);IFC4X32.IfcPavement=IfcPavement;var IfcPile=/*#__PURE__*/function(_IfcDeepFoundation){_inherits(IfcPile,_IfcDeepFoundation);var _super2365=_createSuper(IfcPile);function IfcPile(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType,ConstructionType){var _this2362;_classCallCheck(this,IfcPile);_this2362=_super2365.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2362.GlobalId=GlobalId;_this2362.OwnerHistory=OwnerHistory;_this2362.Name=Name;_this2362.Description=Description;_this2362.ObjectType=ObjectType;_this2362.ObjectPlacement=ObjectPlacement;_this2362.Representation=Representation;_this2362.Tag=Tag;_this2362.PredefinedType=PredefinedType;_this2362.ConstructionType=ConstructionType;_this2362.type=1687234759;return _this2362;}return _createClass(IfcPile);}(IfcDeepFoundation);IFC4X32.IfcPile=IfcPile;var IfcPipeFitting=/*#__PURE__*/function(_IfcFlowFitting7){_inherits(IfcPipeFitting,_IfcFlowFitting7);var _super2366=_createSuper(IfcPipeFitting);function IfcPipeFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2363;_classCallCheck(this,IfcPipeFitting);_this2363=_super2366.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2363.GlobalId=GlobalId;_this2363.OwnerHistory=OwnerHistory;_this2363.Name=Name;_this2363.Description=Description;_this2363.ObjectType=ObjectType;_this2363.ObjectPlacement=ObjectPlacement;_this2363.Representation=Representation;_this2363.Tag=Tag;_this2363.PredefinedType=PredefinedType;_this2363.type=310824031;return _this2363;}return _createClass(IfcPipeFitting);}(IfcFlowFitting);IFC4X32.IfcPipeFitting=IfcPipeFitting;var IfcPipeSegment=/*#__PURE__*/function(_IfcFlowSegment5){_inherits(IfcPipeSegment,_IfcFlowSegment5);var _super2367=_createSuper(IfcPipeSegment);function IfcPipeSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2364;_classCallCheck(this,IfcPipeSegment);_this2364=_super2367.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2364.GlobalId=GlobalId;_this2364.OwnerHistory=OwnerHistory;_this2364.Name=Name;_this2364.Description=Description;_this2364.ObjectType=ObjectType;_this2364.ObjectPlacement=ObjectPlacement;_this2364.Representation=Representation;_this2364.Tag=Tag;_this2364.PredefinedType=PredefinedType;_this2364.type=3612865200;return _this2364;}return _createClass(IfcPipeSegment);}(IfcFlowSegment);IFC4X32.IfcPipeSegment=IfcPipeSegment;var IfcPlate=/*#__PURE__*/function(_IfcBuiltElement15){_inherits(IfcPlate,_IfcBuiltElement15);var _super2368=_createSuper(IfcPlate);function IfcPlate(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2365;_classCallCheck(this,IfcPlate);_this2365=_super2368.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2365.GlobalId=GlobalId;_this2365.OwnerHistory=OwnerHistory;_this2365.Name=Name;_this2365.Description=Description;_this2365.ObjectType=ObjectType;_this2365.ObjectPlacement=ObjectPlacement;_this2365.Representation=Representation;_this2365.Tag=Tag;_this2365.PredefinedType=PredefinedType;_this2365.type=3171933400;return _this2365;}return _createClass(IfcPlate);}(IfcBuiltElement);IFC4X32.IfcPlate=IfcPlate;var IfcProtectiveDevice=/*#__PURE__*/function(_IfcFlowController11){_inherits(IfcProtectiveDevice,_IfcFlowController11);var _super2369=_createSuper(IfcProtectiveDevice);function IfcProtectiveDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2366;_classCallCheck(this,IfcProtectiveDevice);_this2366=_super2369.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2366.GlobalId=GlobalId;_this2366.OwnerHistory=OwnerHistory;_this2366.Name=Name;_this2366.Description=Description;_this2366.ObjectType=ObjectType;_this2366.ObjectPlacement=ObjectPlacement;_this2366.Representation=Representation;_this2366.Tag=Tag;_this2366.PredefinedType=PredefinedType;_this2366.type=738039164;return _this2366;}return _createClass(IfcProtectiveDevice);}(IfcFlowController);IFC4X32.IfcProtectiveDevice=IfcProtectiveDevice;var IfcProtectiveDeviceTrippingUnitType=/*#__PURE__*/function(_IfcDistributionContr21){_inherits(IfcProtectiveDeviceTrippingUnitType,_IfcDistributionContr21);var _super2370=_createSuper(IfcProtectiveDeviceTrippingUnitType);function IfcProtectiveDeviceTrippingUnitType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2367;_classCallCheck(this,IfcProtectiveDeviceTrippingUnitType);_this2367=_super2370.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2367.GlobalId=GlobalId;_this2367.OwnerHistory=OwnerHistory;_this2367.Name=Name;_this2367.Description=Description;_this2367.ApplicableOccurrence=ApplicableOccurrence;_this2367.HasPropertySets=HasPropertySets;_this2367.RepresentationMaps=RepresentationMaps;_this2367.Tag=Tag;_this2367.ElementType=ElementType;_this2367.PredefinedType=PredefinedType;_this2367.type=655969474;return _this2367;}return _createClass(IfcProtectiveDeviceTrippingUnitType);}(IfcDistributionControlElementType);IFC4X32.IfcProtectiveDeviceTrippingUnitType=IfcProtectiveDeviceTrippingUnitType;var IfcPump=/*#__PURE__*/function(_IfcFlowMovingDevice4){_inherits(IfcPump,_IfcFlowMovingDevice4);var _super2371=_createSuper(IfcPump);function IfcPump(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2368;_classCallCheck(this,IfcPump);_this2368=_super2371.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2368.GlobalId=GlobalId;_this2368.OwnerHistory=OwnerHistory;_this2368.Name=Name;_this2368.Description=Description;_this2368.ObjectType=ObjectType;_this2368.ObjectPlacement=ObjectPlacement;_this2368.Representation=Representation;_this2368.Tag=Tag;_this2368.PredefinedType=PredefinedType;_this2368.type=90941305;return _this2368;}return _createClass(IfcPump);}(IfcFlowMovingDevice);IFC4X32.IfcPump=IfcPump;var IfcRail=/*#__PURE__*/function(_IfcBuiltElement16){_inherits(IfcRail,_IfcBuiltElement16);var _super2372=_createSuper(IfcRail);function IfcRail(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2369;_classCallCheck(this,IfcRail);_this2369=_super2372.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2369.GlobalId=GlobalId;_this2369.OwnerHistory=OwnerHistory;_this2369.Name=Name;_this2369.Description=Description;_this2369.ObjectType=ObjectType;_this2369.ObjectPlacement=ObjectPlacement;_this2369.Representation=Representation;_this2369.Tag=Tag;_this2369.PredefinedType=PredefinedType;_this2369.type=3290496277;return _this2369;}return _createClass(IfcRail);}(IfcBuiltElement);IFC4X32.IfcRail=IfcRail;var IfcRailing=/*#__PURE__*/function(_IfcBuiltElement17){_inherits(IfcRailing,_IfcBuiltElement17);var _super2373=_createSuper(IfcRailing);function IfcRailing(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2370;_classCallCheck(this,IfcRailing);_this2370=_super2373.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2370.GlobalId=GlobalId;_this2370.OwnerHistory=OwnerHistory;_this2370.Name=Name;_this2370.Description=Description;_this2370.ObjectType=ObjectType;_this2370.ObjectPlacement=ObjectPlacement;_this2370.Representation=Representation;_this2370.Tag=Tag;_this2370.PredefinedType=PredefinedType;_this2370.type=2262370178;return _this2370;}return _createClass(IfcRailing);}(IfcBuiltElement);IFC4X32.IfcRailing=IfcRailing;var IfcRamp=/*#__PURE__*/function(_IfcBuiltElement18){_inherits(IfcRamp,_IfcBuiltElement18);var _super2374=_createSuper(IfcRamp);function IfcRamp(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2371;_classCallCheck(this,IfcRamp);_this2371=_super2374.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2371.GlobalId=GlobalId;_this2371.OwnerHistory=OwnerHistory;_this2371.Name=Name;_this2371.Description=Description;_this2371.ObjectType=ObjectType;_this2371.ObjectPlacement=ObjectPlacement;_this2371.Representation=Representation;_this2371.Tag=Tag;_this2371.PredefinedType=PredefinedType;_this2371.type=3024970846;return _this2371;}return _createClass(IfcRamp);}(IfcBuiltElement);IFC4X32.IfcRamp=IfcRamp;var IfcRampFlight=/*#__PURE__*/function(_IfcBuiltElement19){_inherits(IfcRampFlight,_IfcBuiltElement19);var _super2375=_createSuper(IfcRampFlight);function IfcRampFlight(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2372;_classCallCheck(this,IfcRampFlight);_this2372=_super2375.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2372.GlobalId=GlobalId;_this2372.OwnerHistory=OwnerHistory;_this2372.Name=Name;_this2372.Description=Description;_this2372.ObjectType=ObjectType;_this2372.ObjectPlacement=ObjectPlacement;_this2372.Representation=Representation;_this2372.Tag=Tag;_this2372.PredefinedType=PredefinedType;_this2372.type=3283111854;return _this2372;}return _createClass(IfcRampFlight);}(IfcBuiltElement);IFC4X32.IfcRampFlight=IfcRampFlight;var IfcRationalBSplineCurveWithKnots=/*#__PURE__*/function(_IfcBSplineCurveWithK2){_inherits(IfcRationalBSplineCurveWithKnots,_IfcBSplineCurveWithK2);var _super2376=_createSuper(IfcRationalBSplineCurveWithKnots);function IfcRationalBSplineCurveWithKnots(expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect,KnotMultiplicities,Knots,KnotSpec,WeightsData){var _this2373;_classCallCheck(this,IfcRationalBSplineCurveWithKnots);_this2373=_super2376.call(this,expressID,Degree,ControlPointsList,CurveForm,ClosedCurve,SelfIntersect,KnotMultiplicities,Knots,KnotSpec);_this2373.Degree=Degree;_this2373.ControlPointsList=ControlPointsList;_this2373.CurveForm=CurveForm;_this2373.ClosedCurve=ClosedCurve;_this2373.SelfIntersect=SelfIntersect;_this2373.KnotMultiplicities=KnotMultiplicities;_this2373.Knots=Knots;_this2373.KnotSpec=KnotSpec;_this2373.WeightsData=WeightsData;_this2373.type=1232101972;return _this2373;}return _createClass(IfcRationalBSplineCurveWithKnots);}(IfcBSplineCurveWithKnots);IFC4X32.IfcRationalBSplineCurveWithKnots=IfcRationalBSplineCurveWithKnots;var IfcReinforcedSoil=/*#__PURE__*/function(_IfcEarthworksElement2){_inherits(IfcReinforcedSoil,_IfcEarthworksElement2);var _super2377=_createSuper(IfcReinforcedSoil);function IfcReinforcedSoil(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2374;_classCallCheck(this,IfcReinforcedSoil);_this2374=_super2377.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2374.GlobalId=GlobalId;_this2374.OwnerHistory=OwnerHistory;_this2374.Name=Name;_this2374.Description=Description;_this2374.ObjectType=ObjectType;_this2374.ObjectPlacement=ObjectPlacement;_this2374.Representation=Representation;_this2374.Tag=Tag;_this2374.PredefinedType=PredefinedType;_this2374.type=3798194928;return _this2374;}return _createClass(IfcReinforcedSoil);}(IfcEarthworksElement);IFC4X32.IfcReinforcedSoil=IfcReinforcedSoil;var IfcReinforcingBar=/*#__PURE__*/function(_IfcReinforcingElemen21){_inherits(IfcReinforcingBar,_IfcReinforcingElemen21);var _super2378=_createSuper(IfcReinforcingBar);function IfcReinforcingBar(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade,NominalDiameter,CrossSectionArea,BarLength,PredefinedType,BarSurface){var _this2375;_classCallCheck(this,IfcReinforcingBar);_this2375=_super2378.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,SteelGrade);_this2375.GlobalId=GlobalId;_this2375.OwnerHistory=OwnerHistory;_this2375.Name=Name;_this2375.Description=Description;_this2375.ObjectType=ObjectType;_this2375.ObjectPlacement=ObjectPlacement;_this2375.Representation=Representation;_this2375.Tag=Tag;_this2375.SteelGrade=SteelGrade;_this2375.NominalDiameter=NominalDiameter;_this2375.CrossSectionArea=CrossSectionArea;_this2375.BarLength=BarLength;_this2375.PredefinedType=PredefinedType;_this2375.BarSurface=BarSurface;_this2375.type=979691226;return _this2375;}return _createClass(IfcReinforcingBar);}(IfcReinforcingElement);IFC4X32.IfcReinforcingBar=IfcReinforcingBar;var IfcReinforcingBarType=/*#__PURE__*/function(_IfcReinforcingElemen22){_inherits(IfcReinforcingBarType,_IfcReinforcingElemen22);var _super2379=_createSuper(IfcReinforcingBarType);function IfcReinforcingBarType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType,NominalDiameter,CrossSectionArea,BarLength,BarSurface,BendingShapeCode,BendingParameters){var _this2376;_classCallCheck(this,IfcReinforcingBarType);_this2376=_super2379.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2376.GlobalId=GlobalId;_this2376.OwnerHistory=OwnerHistory;_this2376.Name=Name;_this2376.Description=Description;_this2376.ApplicableOccurrence=ApplicableOccurrence;_this2376.HasPropertySets=HasPropertySets;_this2376.RepresentationMaps=RepresentationMaps;_this2376.Tag=Tag;_this2376.ElementType=ElementType;_this2376.PredefinedType=PredefinedType;_this2376.NominalDiameter=NominalDiameter;_this2376.CrossSectionArea=CrossSectionArea;_this2376.BarLength=BarLength;_this2376.BarSurface=BarSurface;_this2376.BendingShapeCode=BendingShapeCode;_this2376.BendingParameters=BendingParameters;_this2376.type=2572171363;return _this2376;}return _createClass(IfcReinforcingBarType);}(IfcReinforcingElementType);IFC4X32.IfcReinforcingBarType=IfcReinforcingBarType;var IfcRoof=/*#__PURE__*/function(_IfcBuiltElement20){_inherits(IfcRoof,_IfcBuiltElement20);var _super2380=_createSuper(IfcRoof);function IfcRoof(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2377;_classCallCheck(this,IfcRoof);_this2377=_super2380.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2377.GlobalId=GlobalId;_this2377.OwnerHistory=OwnerHistory;_this2377.Name=Name;_this2377.Description=Description;_this2377.ObjectType=ObjectType;_this2377.ObjectPlacement=ObjectPlacement;_this2377.Representation=Representation;_this2377.Tag=Tag;_this2377.PredefinedType=PredefinedType;_this2377.type=2016517767;return _this2377;}return _createClass(IfcRoof);}(IfcBuiltElement);IFC4X32.IfcRoof=IfcRoof;var IfcSanitaryTerminal=/*#__PURE__*/function(_IfcFlowTerminal20){_inherits(IfcSanitaryTerminal,_IfcFlowTerminal20);var _super2381=_createSuper(IfcSanitaryTerminal);function IfcSanitaryTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2378;_classCallCheck(this,IfcSanitaryTerminal);_this2378=_super2381.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2378.GlobalId=GlobalId;_this2378.OwnerHistory=OwnerHistory;_this2378.Name=Name;_this2378.Description=Description;_this2378.ObjectType=ObjectType;_this2378.ObjectPlacement=ObjectPlacement;_this2378.Representation=Representation;_this2378.Tag=Tag;_this2378.PredefinedType=PredefinedType;_this2378.type=3053780830;return _this2378;}return _createClass(IfcSanitaryTerminal);}(IfcFlowTerminal);IFC4X32.IfcSanitaryTerminal=IfcSanitaryTerminal;var IfcSensorType=/*#__PURE__*/function(_IfcDistributionContr22){_inherits(IfcSensorType,_IfcDistributionContr22);var _super2382=_createSuper(IfcSensorType);function IfcSensorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2379;_classCallCheck(this,IfcSensorType);_this2379=_super2382.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2379.GlobalId=GlobalId;_this2379.OwnerHistory=OwnerHistory;_this2379.Name=Name;_this2379.Description=Description;_this2379.ApplicableOccurrence=ApplicableOccurrence;_this2379.HasPropertySets=HasPropertySets;_this2379.RepresentationMaps=RepresentationMaps;_this2379.Tag=Tag;_this2379.ElementType=ElementType;_this2379.PredefinedType=PredefinedType;_this2379.type=1783015770;return _this2379;}return _createClass(IfcSensorType);}(IfcDistributionControlElementType);IFC4X32.IfcSensorType=IfcSensorType;var IfcShadingDevice=/*#__PURE__*/function(_IfcBuiltElement21){_inherits(IfcShadingDevice,_IfcBuiltElement21);var _super2383=_createSuper(IfcShadingDevice);function IfcShadingDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2380;_classCallCheck(this,IfcShadingDevice);_this2380=_super2383.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2380.GlobalId=GlobalId;_this2380.OwnerHistory=OwnerHistory;_this2380.Name=Name;_this2380.Description=Description;_this2380.ObjectType=ObjectType;_this2380.ObjectPlacement=ObjectPlacement;_this2380.Representation=Representation;_this2380.Tag=Tag;_this2380.PredefinedType=PredefinedType;_this2380.type=1329646415;return _this2380;}return _createClass(IfcShadingDevice);}(IfcBuiltElement);IFC4X32.IfcShadingDevice=IfcShadingDevice;var IfcSignal=/*#__PURE__*/function(_IfcFlowTerminal21){_inherits(IfcSignal,_IfcFlowTerminal21);var _super2384=_createSuper(IfcSignal);function IfcSignal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2381;_classCallCheck(this,IfcSignal);_this2381=_super2384.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2381.GlobalId=GlobalId;_this2381.OwnerHistory=OwnerHistory;_this2381.Name=Name;_this2381.Description=Description;_this2381.ObjectType=ObjectType;_this2381.ObjectPlacement=ObjectPlacement;_this2381.Representation=Representation;_this2381.Tag=Tag;_this2381.PredefinedType=PredefinedType;_this2381.type=991950508;return _this2381;}return _createClass(IfcSignal);}(IfcFlowTerminal);IFC4X32.IfcSignal=IfcSignal;var IfcSlab=/*#__PURE__*/function(_IfcBuiltElement22){_inherits(IfcSlab,_IfcBuiltElement22);var _super2385=_createSuper(IfcSlab);function IfcSlab(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2382;_classCallCheck(this,IfcSlab);_this2382=_super2385.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2382.GlobalId=GlobalId;_this2382.OwnerHistory=OwnerHistory;_this2382.Name=Name;_this2382.Description=Description;_this2382.ObjectType=ObjectType;_this2382.ObjectPlacement=ObjectPlacement;_this2382.Representation=Representation;_this2382.Tag=Tag;_this2382.PredefinedType=PredefinedType;_this2382.type=1529196076;return _this2382;}return _createClass(IfcSlab);}(IfcBuiltElement);IFC4X32.IfcSlab=IfcSlab;var IfcSolarDevice=/*#__PURE__*/function(_IfcEnergyConversionD85){_inherits(IfcSolarDevice,_IfcEnergyConversionD85);var _super2386=_createSuper(IfcSolarDevice);function IfcSolarDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2383;_classCallCheck(this,IfcSolarDevice);_this2383=_super2386.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2383.GlobalId=GlobalId;_this2383.OwnerHistory=OwnerHistory;_this2383.Name=Name;_this2383.Description=Description;_this2383.ObjectType=ObjectType;_this2383.ObjectPlacement=ObjectPlacement;_this2383.Representation=Representation;_this2383.Tag=Tag;_this2383.PredefinedType=PredefinedType;_this2383.type=3420628829;return _this2383;}return _createClass(IfcSolarDevice);}(IfcEnergyConversionDevice);IFC4X32.IfcSolarDevice=IfcSolarDevice;var IfcSpaceHeater=/*#__PURE__*/function(_IfcFlowTerminal22){_inherits(IfcSpaceHeater,_IfcFlowTerminal22);var _super2387=_createSuper(IfcSpaceHeater);function IfcSpaceHeater(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2384;_classCallCheck(this,IfcSpaceHeater);_this2384=_super2387.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2384.GlobalId=GlobalId;_this2384.OwnerHistory=OwnerHistory;_this2384.Name=Name;_this2384.Description=Description;_this2384.ObjectType=ObjectType;_this2384.ObjectPlacement=ObjectPlacement;_this2384.Representation=Representation;_this2384.Tag=Tag;_this2384.PredefinedType=PredefinedType;_this2384.type=1999602285;return _this2384;}return _createClass(IfcSpaceHeater);}(IfcFlowTerminal);IFC4X32.IfcSpaceHeater=IfcSpaceHeater;var IfcStackTerminal=/*#__PURE__*/function(_IfcFlowTerminal23){_inherits(IfcStackTerminal,_IfcFlowTerminal23);var _super2388=_createSuper(IfcStackTerminal);function IfcStackTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2385;_classCallCheck(this,IfcStackTerminal);_this2385=_super2388.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2385.GlobalId=GlobalId;_this2385.OwnerHistory=OwnerHistory;_this2385.Name=Name;_this2385.Description=Description;_this2385.ObjectType=ObjectType;_this2385.ObjectPlacement=ObjectPlacement;_this2385.Representation=Representation;_this2385.Tag=Tag;_this2385.PredefinedType=PredefinedType;_this2385.type=1404847402;return _this2385;}return _createClass(IfcStackTerminal);}(IfcFlowTerminal);IFC4X32.IfcStackTerminal=IfcStackTerminal;var IfcStair=/*#__PURE__*/function(_IfcBuiltElement23){_inherits(IfcStair,_IfcBuiltElement23);var _super2389=_createSuper(IfcStair);function IfcStair(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2386;_classCallCheck(this,IfcStair);_this2386=_super2389.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2386.GlobalId=GlobalId;_this2386.OwnerHistory=OwnerHistory;_this2386.Name=Name;_this2386.Description=Description;_this2386.ObjectType=ObjectType;_this2386.ObjectPlacement=ObjectPlacement;_this2386.Representation=Representation;_this2386.Tag=Tag;_this2386.PredefinedType=PredefinedType;_this2386.type=331165859;return _this2386;}return _createClass(IfcStair);}(IfcBuiltElement);IFC4X32.IfcStair=IfcStair;var IfcStairFlight=/*#__PURE__*/function(_IfcBuiltElement24){_inherits(IfcStairFlight,_IfcBuiltElement24);var _super2390=_createSuper(IfcStairFlight);function IfcStairFlight(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,NumberOfRisers,NumberOfTreads,RiserHeight,TreadLength,PredefinedType){var _this2387;_classCallCheck(this,IfcStairFlight);_this2387=_super2390.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2387.GlobalId=GlobalId;_this2387.OwnerHistory=OwnerHistory;_this2387.Name=Name;_this2387.Description=Description;_this2387.ObjectType=ObjectType;_this2387.ObjectPlacement=ObjectPlacement;_this2387.Representation=Representation;_this2387.Tag=Tag;_this2387.NumberOfRisers=NumberOfRisers;_this2387.NumberOfTreads=NumberOfTreads;_this2387.RiserHeight=RiserHeight;_this2387.TreadLength=TreadLength;_this2387.PredefinedType=PredefinedType;_this2387.type=4252922144;return _this2387;}return _createClass(IfcStairFlight);}(IfcBuiltElement);IFC4X32.IfcStairFlight=IfcStairFlight;var IfcStructuralAnalysisModel=/*#__PURE__*/function(_IfcSystem11){_inherits(IfcStructuralAnalysisModel,_IfcSystem11);var _super2391=_createSuper(IfcStructuralAnalysisModel);function IfcStructuralAnalysisModel(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,OrientationOf2DPlane,LoadedBy,HasResults,SharedPlacement){var _this2388;_classCallCheck(this,IfcStructuralAnalysisModel);_this2388=_super2391.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType);_this2388.GlobalId=GlobalId;_this2388.OwnerHistory=OwnerHistory;_this2388.Name=Name;_this2388.Description=Description;_this2388.ObjectType=ObjectType;_this2388.PredefinedType=PredefinedType;_this2388.OrientationOf2DPlane=OrientationOf2DPlane;_this2388.LoadedBy=LoadedBy;_this2388.HasResults=HasResults;_this2388.SharedPlacement=SharedPlacement;_this2388.type=2515109513;return _this2388;}return _createClass(IfcStructuralAnalysisModel);}(IfcSystem);IFC4X32.IfcStructuralAnalysisModel=IfcStructuralAnalysisModel;var IfcStructuralLoadCase=/*#__PURE__*/function(_IfcStructuralLoadGro2){_inherits(IfcStructuralLoadCase,_IfcStructuralLoadGro2);var _super2392=_createSuper(IfcStructuralLoadCase);function IfcStructuralLoadCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,ActionType,ActionSource,Coefficient,Purpose,SelfWeightCoefficients){var _this2389;_classCallCheck(this,IfcStructuralLoadCase);_this2389=_super2392.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,PredefinedType,ActionType,ActionSource,Coefficient,Purpose);_this2389.GlobalId=GlobalId;_this2389.OwnerHistory=OwnerHistory;_this2389.Name=Name;_this2389.Description=Description;_this2389.ObjectType=ObjectType;_this2389.PredefinedType=PredefinedType;_this2389.ActionType=ActionType;_this2389.ActionSource=ActionSource;_this2389.Coefficient=Coefficient;_this2389.Purpose=Purpose;_this2389.SelfWeightCoefficients=SelfWeightCoefficients;_this2389.type=385403989;return _this2389;}return _createClass(IfcStructuralLoadCase);}(IfcStructuralLoadGroup);IFC4X32.IfcStructuralLoadCase=IfcStructuralLoadCase;var IfcStructuralPlanarAction=/*#__PURE__*/function(_IfcStructuralSurface5){_inherits(IfcStructuralPlanarAction,_IfcStructuralSurface5);var _super2393=_createSuper(IfcStructuralPlanarAction);function IfcStructuralPlanarAction(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType){var _this2390;_classCallCheck(this,IfcStructuralPlanarAction);_this2390=_super2393.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,AppliedLoad,GlobalOrLocal,DestabilizingLoad,ProjectedOrTrue,PredefinedType);_this2390.GlobalId=GlobalId;_this2390.OwnerHistory=OwnerHistory;_this2390.Name=Name;_this2390.Description=Description;_this2390.ObjectType=ObjectType;_this2390.ObjectPlacement=ObjectPlacement;_this2390.Representation=Representation;_this2390.AppliedLoad=AppliedLoad;_this2390.GlobalOrLocal=GlobalOrLocal;_this2390.DestabilizingLoad=DestabilizingLoad;_this2390.ProjectedOrTrue=ProjectedOrTrue;_this2390.PredefinedType=PredefinedType;_this2390.type=1621171031;return _this2390;}return _createClass(IfcStructuralPlanarAction);}(IfcStructuralSurfaceAction);IFC4X32.IfcStructuralPlanarAction=IfcStructuralPlanarAction;var IfcSwitchingDevice=/*#__PURE__*/function(_IfcFlowController12){_inherits(IfcSwitchingDevice,_IfcFlowController12);var _super2394=_createSuper(IfcSwitchingDevice);function IfcSwitchingDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2391;_classCallCheck(this,IfcSwitchingDevice);_this2391=_super2394.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2391.GlobalId=GlobalId;_this2391.OwnerHistory=OwnerHistory;_this2391.Name=Name;_this2391.Description=Description;_this2391.ObjectType=ObjectType;_this2391.ObjectPlacement=ObjectPlacement;_this2391.Representation=Representation;_this2391.Tag=Tag;_this2391.PredefinedType=PredefinedType;_this2391.type=1162798199;return _this2391;}return _createClass(IfcSwitchingDevice);}(IfcFlowController);IFC4X32.IfcSwitchingDevice=IfcSwitchingDevice;var IfcTank=/*#__PURE__*/function(_IfcFlowStorageDevice9){_inherits(IfcTank,_IfcFlowStorageDevice9);var _super2395=_createSuper(IfcTank);function IfcTank(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2392;_classCallCheck(this,IfcTank);_this2392=_super2395.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2392.GlobalId=GlobalId;_this2392.OwnerHistory=OwnerHistory;_this2392.Name=Name;_this2392.Description=Description;_this2392.ObjectType=ObjectType;_this2392.ObjectPlacement=ObjectPlacement;_this2392.Representation=Representation;_this2392.Tag=Tag;_this2392.PredefinedType=PredefinedType;_this2392.type=812556717;return _this2392;}return _createClass(IfcTank);}(IfcFlowStorageDevice);IFC4X32.IfcTank=IfcTank;var IfcTrackElement=/*#__PURE__*/function(_IfcBuiltElement25){_inherits(IfcTrackElement,_IfcBuiltElement25);var _super2396=_createSuper(IfcTrackElement);function IfcTrackElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2393;_classCallCheck(this,IfcTrackElement);_this2393=_super2396.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2393.GlobalId=GlobalId;_this2393.OwnerHistory=OwnerHistory;_this2393.Name=Name;_this2393.Description=Description;_this2393.ObjectType=ObjectType;_this2393.ObjectPlacement=ObjectPlacement;_this2393.Representation=Representation;_this2393.Tag=Tag;_this2393.PredefinedType=PredefinedType;_this2393.type=3425753595;return _this2393;}return _createClass(IfcTrackElement);}(IfcBuiltElement);IFC4X32.IfcTrackElement=IfcTrackElement;var IfcTransformer=/*#__PURE__*/function(_IfcEnergyConversionD86){_inherits(IfcTransformer,_IfcEnergyConversionD86);var _super2397=_createSuper(IfcTransformer);function IfcTransformer(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2394;_classCallCheck(this,IfcTransformer);_this2394=_super2397.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2394.GlobalId=GlobalId;_this2394.OwnerHistory=OwnerHistory;_this2394.Name=Name;_this2394.Description=Description;_this2394.ObjectType=ObjectType;_this2394.ObjectPlacement=ObjectPlacement;_this2394.Representation=Representation;_this2394.Tag=Tag;_this2394.PredefinedType=PredefinedType;_this2394.type=3825984169;return _this2394;}return _createClass(IfcTransformer);}(IfcEnergyConversionDevice);IFC4X32.IfcTransformer=IfcTransformer;var IfcTransportElement=/*#__PURE__*/function(_IfcTransportationDev4){_inherits(IfcTransportElement,_IfcTransportationDev4);var _super2398=_createSuper(IfcTransportElement);function IfcTransportElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2395;_classCallCheck(this,IfcTransportElement);_this2395=_super2398.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2395.GlobalId=GlobalId;_this2395.OwnerHistory=OwnerHistory;_this2395.Name=Name;_this2395.Description=Description;_this2395.ObjectType=ObjectType;_this2395.ObjectPlacement=ObjectPlacement;_this2395.Representation=Representation;_this2395.Tag=Tag;_this2395.PredefinedType=PredefinedType;_this2395.type=1620046519;return _this2395;}return _createClass(IfcTransportElement);}(IfcTransportationDevice);IFC4X32.IfcTransportElement=IfcTransportElement;var IfcTubeBundle=/*#__PURE__*/function(_IfcEnergyConversionD87){_inherits(IfcTubeBundle,_IfcEnergyConversionD87);var _super2399=_createSuper(IfcTubeBundle);function IfcTubeBundle(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2396;_classCallCheck(this,IfcTubeBundle);_this2396=_super2399.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2396.GlobalId=GlobalId;_this2396.OwnerHistory=OwnerHistory;_this2396.Name=Name;_this2396.Description=Description;_this2396.ObjectType=ObjectType;_this2396.ObjectPlacement=ObjectPlacement;_this2396.Representation=Representation;_this2396.Tag=Tag;_this2396.PredefinedType=PredefinedType;_this2396.type=3026737570;return _this2396;}return _createClass(IfcTubeBundle);}(IfcEnergyConversionDevice);IFC4X32.IfcTubeBundle=IfcTubeBundle;var IfcUnitaryControlElementType=/*#__PURE__*/function(_IfcDistributionContr23){_inherits(IfcUnitaryControlElementType,_IfcDistributionContr23);var _super2400=_createSuper(IfcUnitaryControlElementType);function IfcUnitaryControlElementType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2397;_classCallCheck(this,IfcUnitaryControlElementType);_this2397=_super2400.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2397.GlobalId=GlobalId;_this2397.OwnerHistory=OwnerHistory;_this2397.Name=Name;_this2397.Description=Description;_this2397.ApplicableOccurrence=ApplicableOccurrence;_this2397.HasPropertySets=HasPropertySets;_this2397.RepresentationMaps=RepresentationMaps;_this2397.Tag=Tag;_this2397.ElementType=ElementType;_this2397.PredefinedType=PredefinedType;_this2397.type=3179687236;return _this2397;}return _createClass(IfcUnitaryControlElementType);}(IfcDistributionControlElementType);IFC4X32.IfcUnitaryControlElementType=IfcUnitaryControlElementType;var IfcUnitaryEquipment=/*#__PURE__*/function(_IfcEnergyConversionD88){_inherits(IfcUnitaryEquipment,_IfcEnergyConversionD88);var _super2401=_createSuper(IfcUnitaryEquipment);function IfcUnitaryEquipment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2398;_classCallCheck(this,IfcUnitaryEquipment);_this2398=_super2401.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2398.GlobalId=GlobalId;_this2398.OwnerHistory=OwnerHistory;_this2398.Name=Name;_this2398.Description=Description;_this2398.ObjectType=ObjectType;_this2398.ObjectPlacement=ObjectPlacement;_this2398.Representation=Representation;_this2398.Tag=Tag;_this2398.PredefinedType=PredefinedType;_this2398.type=4292641817;return _this2398;}return _createClass(IfcUnitaryEquipment);}(IfcEnergyConversionDevice);IFC4X32.IfcUnitaryEquipment=IfcUnitaryEquipment;var IfcValve=/*#__PURE__*/function(_IfcFlowController13){_inherits(IfcValve,_IfcFlowController13);var _super2402=_createSuper(IfcValve);function IfcValve(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2399;_classCallCheck(this,IfcValve);_this2399=_super2402.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2399.GlobalId=GlobalId;_this2399.OwnerHistory=OwnerHistory;_this2399.Name=Name;_this2399.Description=Description;_this2399.ObjectType=ObjectType;_this2399.ObjectPlacement=ObjectPlacement;_this2399.Representation=Representation;_this2399.Tag=Tag;_this2399.PredefinedType=PredefinedType;_this2399.type=4207607924;return _this2399;}return _createClass(IfcValve);}(IfcFlowController);IFC4X32.IfcValve=IfcValve;var IfcWall=/*#__PURE__*/function(_IfcBuiltElement26){_inherits(IfcWall,_IfcBuiltElement26);var _super2403=_createSuper(IfcWall);function IfcWall(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2400;_classCallCheck(this,IfcWall);_this2400=_super2403.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2400.GlobalId=GlobalId;_this2400.OwnerHistory=OwnerHistory;_this2400.Name=Name;_this2400.Description=Description;_this2400.ObjectType=ObjectType;_this2400.ObjectPlacement=ObjectPlacement;_this2400.Representation=Representation;_this2400.Tag=Tag;_this2400.PredefinedType=PredefinedType;_this2400.type=2391406946;return _this2400;}return _createClass(IfcWall);}(IfcBuiltElement);IFC4X32.IfcWall=IfcWall;var IfcWallStandardCase=/*#__PURE__*/function(_IfcWall4){_inherits(IfcWallStandardCase,_IfcWall4);var _super2404=_createSuper(IfcWallStandardCase);function IfcWallStandardCase(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2401;_classCallCheck(this,IfcWallStandardCase);_this2401=_super2404.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType);_this2401.GlobalId=GlobalId;_this2401.OwnerHistory=OwnerHistory;_this2401.Name=Name;_this2401.Description=Description;_this2401.ObjectType=ObjectType;_this2401.ObjectPlacement=ObjectPlacement;_this2401.Representation=Representation;_this2401.Tag=Tag;_this2401.PredefinedType=PredefinedType;_this2401.type=3512223829;return _this2401;}return _createClass(IfcWallStandardCase);}(IfcWall);IFC4X32.IfcWallStandardCase=IfcWallStandardCase;var IfcWasteTerminal=/*#__PURE__*/function(_IfcFlowTerminal24){_inherits(IfcWasteTerminal,_IfcFlowTerminal24);var _super2405=_createSuper(IfcWasteTerminal);function IfcWasteTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2402;_classCallCheck(this,IfcWasteTerminal);_this2402=_super2405.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2402.GlobalId=GlobalId;_this2402.OwnerHistory=OwnerHistory;_this2402.Name=Name;_this2402.Description=Description;_this2402.ObjectType=ObjectType;_this2402.ObjectPlacement=ObjectPlacement;_this2402.Representation=Representation;_this2402.Tag=Tag;_this2402.PredefinedType=PredefinedType;_this2402.type=4237592921;return _this2402;}return _createClass(IfcWasteTerminal);}(IfcFlowTerminal);IFC4X32.IfcWasteTerminal=IfcWasteTerminal;var IfcWindow=/*#__PURE__*/function(_IfcBuiltElement27){_inherits(IfcWindow,_IfcBuiltElement27);var _super2406=_createSuper(IfcWindow);function IfcWindow(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,OverallHeight,OverallWidth,PredefinedType,PartitioningType,UserDefinedPartitioningType){var _this2403;_classCallCheck(this,IfcWindow);_this2403=_super2406.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2403.GlobalId=GlobalId;_this2403.OwnerHistory=OwnerHistory;_this2403.Name=Name;_this2403.Description=Description;_this2403.ObjectType=ObjectType;_this2403.ObjectPlacement=ObjectPlacement;_this2403.Representation=Representation;_this2403.Tag=Tag;_this2403.OverallHeight=OverallHeight;_this2403.OverallWidth=OverallWidth;_this2403.PredefinedType=PredefinedType;_this2403.PartitioningType=PartitioningType;_this2403.UserDefinedPartitioningType=UserDefinedPartitioningType;_this2403.type=3304561284;return _this2403;}return _createClass(IfcWindow);}(IfcBuiltElement);IFC4X32.IfcWindow=IfcWindow;var IfcActuatorType=/*#__PURE__*/function(_IfcDistributionContr24){_inherits(IfcActuatorType,_IfcDistributionContr24);var _super2407=_createSuper(IfcActuatorType);function IfcActuatorType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2404;_classCallCheck(this,IfcActuatorType);_this2404=_super2407.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2404.GlobalId=GlobalId;_this2404.OwnerHistory=OwnerHistory;_this2404.Name=Name;_this2404.Description=Description;_this2404.ApplicableOccurrence=ApplicableOccurrence;_this2404.HasPropertySets=HasPropertySets;_this2404.RepresentationMaps=RepresentationMaps;_this2404.Tag=Tag;_this2404.ElementType=ElementType;_this2404.PredefinedType=PredefinedType;_this2404.type=2874132201;return _this2404;}return _createClass(IfcActuatorType);}(IfcDistributionControlElementType);IFC4X32.IfcActuatorType=IfcActuatorType;var IfcAirTerminal=/*#__PURE__*/function(_IfcFlowTerminal25){_inherits(IfcAirTerminal,_IfcFlowTerminal25);var _super2408=_createSuper(IfcAirTerminal);function IfcAirTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2405;_classCallCheck(this,IfcAirTerminal);_this2405=_super2408.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2405.GlobalId=GlobalId;_this2405.OwnerHistory=OwnerHistory;_this2405.Name=Name;_this2405.Description=Description;_this2405.ObjectType=ObjectType;_this2405.ObjectPlacement=ObjectPlacement;_this2405.Representation=Representation;_this2405.Tag=Tag;_this2405.PredefinedType=PredefinedType;_this2405.type=1634111441;return _this2405;}return _createClass(IfcAirTerminal);}(IfcFlowTerminal);IFC4X32.IfcAirTerminal=IfcAirTerminal;var IfcAirTerminalBox=/*#__PURE__*/function(_IfcFlowController14){_inherits(IfcAirTerminalBox,_IfcFlowController14);var _super2409=_createSuper(IfcAirTerminalBox);function IfcAirTerminalBox(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2406;_classCallCheck(this,IfcAirTerminalBox);_this2406=_super2409.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2406.GlobalId=GlobalId;_this2406.OwnerHistory=OwnerHistory;_this2406.Name=Name;_this2406.Description=Description;_this2406.ObjectType=ObjectType;_this2406.ObjectPlacement=ObjectPlacement;_this2406.Representation=Representation;_this2406.Tag=Tag;_this2406.PredefinedType=PredefinedType;_this2406.type=177149247;return _this2406;}return _createClass(IfcAirTerminalBox);}(IfcFlowController);IFC4X32.IfcAirTerminalBox=IfcAirTerminalBox;var IfcAirToAirHeatRecovery=/*#__PURE__*/function(_IfcEnergyConversionD89){_inherits(IfcAirToAirHeatRecovery,_IfcEnergyConversionD89);var _super2410=_createSuper(IfcAirToAirHeatRecovery);function IfcAirToAirHeatRecovery(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2407;_classCallCheck(this,IfcAirToAirHeatRecovery);_this2407=_super2410.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2407.GlobalId=GlobalId;_this2407.OwnerHistory=OwnerHistory;_this2407.Name=Name;_this2407.Description=Description;_this2407.ObjectType=ObjectType;_this2407.ObjectPlacement=ObjectPlacement;_this2407.Representation=Representation;_this2407.Tag=Tag;_this2407.PredefinedType=PredefinedType;_this2407.type=2056796094;return _this2407;}return _createClass(IfcAirToAirHeatRecovery);}(IfcEnergyConversionDevice);IFC4X32.IfcAirToAirHeatRecovery=IfcAirToAirHeatRecovery;var IfcAlarmType=/*#__PURE__*/function(_IfcDistributionContr25){_inherits(IfcAlarmType,_IfcDistributionContr25);var _super2411=_createSuper(IfcAlarmType);function IfcAlarmType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2408;_classCallCheck(this,IfcAlarmType);_this2408=_super2411.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2408.GlobalId=GlobalId;_this2408.OwnerHistory=OwnerHistory;_this2408.Name=Name;_this2408.Description=Description;_this2408.ApplicableOccurrence=ApplicableOccurrence;_this2408.HasPropertySets=HasPropertySets;_this2408.RepresentationMaps=RepresentationMaps;_this2408.Tag=Tag;_this2408.ElementType=ElementType;_this2408.PredefinedType=PredefinedType;_this2408.type=3001207471;return _this2408;}return _createClass(IfcAlarmType);}(IfcDistributionControlElementType);IFC4X32.IfcAlarmType=IfcAlarmType;var IfcAlignment=/*#__PURE__*/function(_IfcLinearPositioning){_inherits(IfcAlignment,_IfcLinearPositioning);var _super2412=_createSuper(IfcAlignment);function IfcAlignment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,PredefinedType){var _this2409;_classCallCheck(this,IfcAlignment);_this2409=_super2412.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation);_this2409.GlobalId=GlobalId;_this2409.OwnerHistory=OwnerHistory;_this2409.Name=Name;_this2409.Description=Description;_this2409.ObjectType=ObjectType;_this2409.ObjectPlacement=ObjectPlacement;_this2409.Representation=Representation;_this2409.PredefinedType=PredefinedType;_this2409.type=325726236;return _this2409;}return _createClass(IfcAlignment);}(IfcLinearPositioningElement);IFC4X32.IfcAlignment=IfcAlignment;var IfcAudioVisualAppliance=/*#__PURE__*/function(_IfcFlowTerminal26){_inherits(IfcAudioVisualAppliance,_IfcFlowTerminal26);var _super2413=_createSuper(IfcAudioVisualAppliance);function IfcAudioVisualAppliance(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2410;_classCallCheck(this,IfcAudioVisualAppliance);_this2410=_super2413.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2410.GlobalId=GlobalId;_this2410.OwnerHistory=OwnerHistory;_this2410.Name=Name;_this2410.Description=Description;_this2410.ObjectType=ObjectType;_this2410.ObjectPlacement=ObjectPlacement;_this2410.Representation=Representation;_this2410.Tag=Tag;_this2410.PredefinedType=PredefinedType;_this2410.type=277319702;return _this2410;}return _createClass(IfcAudioVisualAppliance);}(IfcFlowTerminal);IFC4X32.IfcAudioVisualAppliance=IfcAudioVisualAppliance;var IfcBeam=/*#__PURE__*/function(_IfcBuiltElement28){_inherits(IfcBeam,_IfcBuiltElement28);var _super2414=_createSuper(IfcBeam);function IfcBeam(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2411;_classCallCheck(this,IfcBeam);_this2411=_super2414.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2411.GlobalId=GlobalId;_this2411.OwnerHistory=OwnerHistory;_this2411.Name=Name;_this2411.Description=Description;_this2411.ObjectType=ObjectType;_this2411.ObjectPlacement=ObjectPlacement;_this2411.Representation=Representation;_this2411.Tag=Tag;_this2411.PredefinedType=PredefinedType;_this2411.type=753842376;return _this2411;}return _createClass(IfcBeam);}(IfcBuiltElement);IFC4X32.IfcBeam=IfcBeam;var IfcBearing=/*#__PURE__*/function(_IfcBuiltElement29){_inherits(IfcBearing,_IfcBuiltElement29);var _super2415=_createSuper(IfcBearing);function IfcBearing(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2412;_classCallCheck(this,IfcBearing);_this2412=_super2415.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2412.GlobalId=GlobalId;_this2412.OwnerHistory=OwnerHistory;_this2412.Name=Name;_this2412.Description=Description;_this2412.ObjectType=ObjectType;_this2412.ObjectPlacement=ObjectPlacement;_this2412.Representation=Representation;_this2412.Tag=Tag;_this2412.PredefinedType=PredefinedType;_this2412.type=4196446775;return _this2412;}return _createClass(IfcBearing);}(IfcBuiltElement);IFC4X32.IfcBearing=IfcBearing;var IfcBoiler=/*#__PURE__*/function(_IfcEnergyConversionD90){_inherits(IfcBoiler,_IfcEnergyConversionD90);var _super2416=_createSuper(IfcBoiler);function IfcBoiler(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2413;_classCallCheck(this,IfcBoiler);_this2413=_super2416.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2413.GlobalId=GlobalId;_this2413.OwnerHistory=OwnerHistory;_this2413.Name=Name;_this2413.Description=Description;_this2413.ObjectType=ObjectType;_this2413.ObjectPlacement=ObjectPlacement;_this2413.Representation=Representation;_this2413.Tag=Tag;_this2413.PredefinedType=PredefinedType;_this2413.type=32344328;return _this2413;}return _createClass(IfcBoiler);}(IfcEnergyConversionDevice);IFC4X32.IfcBoiler=IfcBoiler;var IfcBorehole=/*#__PURE__*/function(_IfcGeotechnicalAssem){_inherits(IfcBorehole,_IfcGeotechnicalAssem);var _super2417=_createSuper(IfcBorehole);function IfcBorehole(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2414;_classCallCheck(this,IfcBorehole);_this2414=_super2417.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2414.GlobalId=GlobalId;_this2414.OwnerHistory=OwnerHistory;_this2414.Name=Name;_this2414.Description=Description;_this2414.ObjectType=ObjectType;_this2414.ObjectPlacement=ObjectPlacement;_this2414.Representation=Representation;_this2414.Tag=Tag;_this2414.type=3314249567;return _this2414;}return _createClass(IfcBorehole);}(IfcGeotechnicalAssembly);IFC4X32.IfcBorehole=IfcBorehole;var IfcBuildingElementProxy=/*#__PURE__*/function(_IfcBuiltElement30){_inherits(IfcBuildingElementProxy,_IfcBuiltElement30);var _super2418=_createSuper(IfcBuildingElementProxy);function IfcBuildingElementProxy(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2415;_classCallCheck(this,IfcBuildingElementProxy);_this2415=_super2418.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2415.GlobalId=GlobalId;_this2415.OwnerHistory=OwnerHistory;_this2415.Name=Name;_this2415.Description=Description;_this2415.ObjectType=ObjectType;_this2415.ObjectPlacement=ObjectPlacement;_this2415.Representation=Representation;_this2415.Tag=Tag;_this2415.PredefinedType=PredefinedType;_this2415.type=1095909175;return _this2415;}return _createClass(IfcBuildingElementProxy);}(IfcBuiltElement);IFC4X32.IfcBuildingElementProxy=IfcBuildingElementProxy;var IfcBurner=/*#__PURE__*/function(_IfcEnergyConversionD91){_inherits(IfcBurner,_IfcEnergyConversionD91);var _super2419=_createSuper(IfcBurner);function IfcBurner(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2416;_classCallCheck(this,IfcBurner);_this2416=_super2419.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2416.GlobalId=GlobalId;_this2416.OwnerHistory=OwnerHistory;_this2416.Name=Name;_this2416.Description=Description;_this2416.ObjectType=ObjectType;_this2416.ObjectPlacement=ObjectPlacement;_this2416.Representation=Representation;_this2416.Tag=Tag;_this2416.PredefinedType=PredefinedType;_this2416.type=2938176219;return _this2416;}return _createClass(IfcBurner);}(IfcEnergyConversionDevice);IFC4X32.IfcBurner=IfcBurner;var IfcCableCarrierFitting=/*#__PURE__*/function(_IfcFlowFitting8){_inherits(IfcCableCarrierFitting,_IfcFlowFitting8);var _super2420=_createSuper(IfcCableCarrierFitting);function IfcCableCarrierFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2417;_classCallCheck(this,IfcCableCarrierFitting);_this2417=_super2420.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2417.GlobalId=GlobalId;_this2417.OwnerHistory=OwnerHistory;_this2417.Name=Name;_this2417.Description=Description;_this2417.ObjectType=ObjectType;_this2417.ObjectPlacement=ObjectPlacement;_this2417.Representation=Representation;_this2417.Tag=Tag;_this2417.PredefinedType=PredefinedType;_this2417.type=635142910;return _this2417;}return _createClass(IfcCableCarrierFitting);}(IfcFlowFitting);IFC4X32.IfcCableCarrierFitting=IfcCableCarrierFitting;var IfcCableCarrierSegment=/*#__PURE__*/function(_IfcFlowSegment6){_inherits(IfcCableCarrierSegment,_IfcFlowSegment6);var _super2421=_createSuper(IfcCableCarrierSegment);function IfcCableCarrierSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2418;_classCallCheck(this,IfcCableCarrierSegment);_this2418=_super2421.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2418.GlobalId=GlobalId;_this2418.OwnerHistory=OwnerHistory;_this2418.Name=Name;_this2418.Description=Description;_this2418.ObjectType=ObjectType;_this2418.ObjectPlacement=ObjectPlacement;_this2418.Representation=Representation;_this2418.Tag=Tag;_this2418.PredefinedType=PredefinedType;_this2418.type=3758799889;return _this2418;}return _createClass(IfcCableCarrierSegment);}(IfcFlowSegment);IFC4X32.IfcCableCarrierSegment=IfcCableCarrierSegment;var IfcCableFitting=/*#__PURE__*/function(_IfcFlowFitting9){_inherits(IfcCableFitting,_IfcFlowFitting9);var _super2422=_createSuper(IfcCableFitting);function IfcCableFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2419;_classCallCheck(this,IfcCableFitting);_this2419=_super2422.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2419.GlobalId=GlobalId;_this2419.OwnerHistory=OwnerHistory;_this2419.Name=Name;_this2419.Description=Description;_this2419.ObjectType=ObjectType;_this2419.ObjectPlacement=ObjectPlacement;_this2419.Representation=Representation;_this2419.Tag=Tag;_this2419.PredefinedType=PredefinedType;_this2419.type=1051757585;return _this2419;}return _createClass(IfcCableFitting);}(IfcFlowFitting);IFC4X32.IfcCableFitting=IfcCableFitting;var IfcCableSegment=/*#__PURE__*/function(_IfcFlowSegment7){_inherits(IfcCableSegment,_IfcFlowSegment7);var _super2423=_createSuper(IfcCableSegment);function IfcCableSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2420;_classCallCheck(this,IfcCableSegment);_this2420=_super2423.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2420.GlobalId=GlobalId;_this2420.OwnerHistory=OwnerHistory;_this2420.Name=Name;_this2420.Description=Description;_this2420.ObjectType=ObjectType;_this2420.ObjectPlacement=ObjectPlacement;_this2420.Representation=Representation;_this2420.Tag=Tag;_this2420.PredefinedType=PredefinedType;_this2420.type=4217484030;return _this2420;}return _createClass(IfcCableSegment);}(IfcFlowSegment);IFC4X32.IfcCableSegment=IfcCableSegment;var IfcCaissonFoundation=/*#__PURE__*/function(_IfcDeepFoundation2){_inherits(IfcCaissonFoundation,_IfcDeepFoundation2);var _super2424=_createSuper(IfcCaissonFoundation);function IfcCaissonFoundation(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2421;_classCallCheck(this,IfcCaissonFoundation);_this2421=_super2424.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2421.GlobalId=GlobalId;_this2421.OwnerHistory=OwnerHistory;_this2421.Name=Name;_this2421.Description=Description;_this2421.ObjectType=ObjectType;_this2421.ObjectPlacement=ObjectPlacement;_this2421.Representation=Representation;_this2421.Tag=Tag;_this2421.PredefinedType=PredefinedType;_this2421.type=3999819293;return _this2421;}return _createClass(IfcCaissonFoundation);}(IfcDeepFoundation);IFC4X32.IfcCaissonFoundation=IfcCaissonFoundation;var IfcChiller=/*#__PURE__*/function(_IfcEnergyConversionD92){_inherits(IfcChiller,_IfcEnergyConversionD92);var _super2425=_createSuper(IfcChiller);function IfcChiller(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2422;_classCallCheck(this,IfcChiller);_this2422=_super2425.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2422.GlobalId=GlobalId;_this2422.OwnerHistory=OwnerHistory;_this2422.Name=Name;_this2422.Description=Description;_this2422.ObjectType=ObjectType;_this2422.ObjectPlacement=ObjectPlacement;_this2422.Representation=Representation;_this2422.Tag=Tag;_this2422.PredefinedType=PredefinedType;_this2422.type=3902619387;return _this2422;}return _createClass(IfcChiller);}(IfcEnergyConversionDevice);IFC4X32.IfcChiller=IfcChiller;var IfcCoil=/*#__PURE__*/function(_IfcEnergyConversionD93){_inherits(IfcCoil,_IfcEnergyConversionD93);var _super2426=_createSuper(IfcCoil);function IfcCoil(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2423;_classCallCheck(this,IfcCoil);_this2423=_super2426.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2423.GlobalId=GlobalId;_this2423.OwnerHistory=OwnerHistory;_this2423.Name=Name;_this2423.Description=Description;_this2423.ObjectType=ObjectType;_this2423.ObjectPlacement=ObjectPlacement;_this2423.Representation=Representation;_this2423.Tag=Tag;_this2423.PredefinedType=PredefinedType;_this2423.type=639361253;return _this2423;}return _createClass(IfcCoil);}(IfcEnergyConversionDevice);IFC4X32.IfcCoil=IfcCoil;var IfcCommunicationsAppliance=/*#__PURE__*/function(_IfcFlowTerminal27){_inherits(IfcCommunicationsAppliance,_IfcFlowTerminal27);var _super2427=_createSuper(IfcCommunicationsAppliance);function IfcCommunicationsAppliance(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2424;_classCallCheck(this,IfcCommunicationsAppliance);_this2424=_super2427.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2424.GlobalId=GlobalId;_this2424.OwnerHistory=OwnerHistory;_this2424.Name=Name;_this2424.Description=Description;_this2424.ObjectType=ObjectType;_this2424.ObjectPlacement=ObjectPlacement;_this2424.Representation=Representation;_this2424.Tag=Tag;_this2424.PredefinedType=PredefinedType;_this2424.type=3221913625;return _this2424;}return _createClass(IfcCommunicationsAppliance);}(IfcFlowTerminal);IFC4X32.IfcCommunicationsAppliance=IfcCommunicationsAppliance;var IfcCompressor=/*#__PURE__*/function(_IfcFlowMovingDevice5){_inherits(IfcCompressor,_IfcFlowMovingDevice5);var _super2428=_createSuper(IfcCompressor);function IfcCompressor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2425;_classCallCheck(this,IfcCompressor);_this2425=_super2428.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2425.GlobalId=GlobalId;_this2425.OwnerHistory=OwnerHistory;_this2425.Name=Name;_this2425.Description=Description;_this2425.ObjectType=ObjectType;_this2425.ObjectPlacement=ObjectPlacement;_this2425.Representation=Representation;_this2425.Tag=Tag;_this2425.PredefinedType=PredefinedType;_this2425.type=3571504051;return _this2425;}return _createClass(IfcCompressor);}(IfcFlowMovingDevice);IFC4X32.IfcCompressor=IfcCompressor;var IfcCondenser=/*#__PURE__*/function(_IfcEnergyConversionD94){_inherits(IfcCondenser,_IfcEnergyConversionD94);var _super2429=_createSuper(IfcCondenser);function IfcCondenser(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2426;_classCallCheck(this,IfcCondenser);_this2426=_super2429.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2426.GlobalId=GlobalId;_this2426.OwnerHistory=OwnerHistory;_this2426.Name=Name;_this2426.Description=Description;_this2426.ObjectType=ObjectType;_this2426.ObjectPlacement=ObjectPlacement;_this2426.Representation=Representation;_this2426.Tag=Tag;_this2426.PredefinedType=PredefinedType;_this2426.type=2272882330;return _this2426;}return _createClass(IfcCondenser);}(IfcEnergyConversionDevice);IFC4X32.IfcCondenser=IfcCondenser;var IfcControllerType=/*#__PURE__*/function(_IfcDistributionContr26){_inherits(IfcControllerType,_IfcDistributionContr26);var _super2430=_createSuper(IfcControllerType);function IfcControllerType(expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType,PredefinedType){var _this2427;_classCallCheck(this,IfcControllerType);_this2427=_super2430.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ApplicableOccurrence,HasPropertySets,RepresentationMaps,Tag,ElementType);_this2427.GlobalId=GlobalId;_this2427.OwnerHistory=OwnerHistory;_this2427.Name=Name;_this2427.Description=Description;_this2427.ApplicableOccurrence=ApplicableOccurrence;_this2427.HasPropertySets=HasPropertySets;_this2427.RepresentationMaps=RepresentationMaps;_this2427.Tag=Tag;_this2427.ElementType=ElementType;_this2427.PredefinedType=PredefinedType;_this2427.type=578613899;return _this2427;}return _createClass(IfcControllerType);}(IfcDistributionControlElementType);IFC4X32.IfcControllerType=IfcControllerType;var IfcConveyorSegment=/*#__PURE__*/function(_IfcFlowSegment8){_inherits(IfcConveyorSegment,_IfcFlowSegment8);var _super2431=_createSuper(IfcConveyorSegment);function IfcConveyorSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2428;_classCallCheck(this,IfcConveyorSegment);_this2428=_super2431.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2428.GlobalId=GlobalId;_this2428.OwnerHistory=OwnerHistory;_this2428.Name=Name;_this2428.Description=Description;_this2428.ObjectType=ObjectType;_this2428.ObjectPlacement=ObjectPlacement;_this2428.Representation=Representation;_this2428.Tag=Tag;_this2428.PredefinedType=PredefinedType;_this2428.type=3460952963;return _this2428;}return _createClass(IfcConveyorSegment);}(IfcFlowSegment);IFC4X32.IfcConveyorSegment=IfcConveyorSegment;var IfcCooledBeam=/*#__PURE__*/function(_IfcEnergyConversionD95){_inherits(IfcCooledBeam,_IfcEnergyConversionD95);var _super2432=_createSuper(IfcCooledBeam);function IfcCooledBeam(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2429;_classCallCheck(this,IfcCooledBeam);_this2429=_super2432.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2429.GlobalId=GlobalId;_this2429.OwnerHistory=OwnerHistory;_this2429.Name=Name;_this2429.Description=Description;_this2429.ObjectType=ObjectType;_this2429.ObjectPlacement=ObjectPlacement;_this2429.Representation=Representation;_this2429.Tag=Tag;_this2429.PredefinedType=PredefinedType;_this2429.type=4136498852;return _this2429;}return _createClass(IfcCooledBeam);}(IfcEnergyConversionDevice);IFC4X32.IfcCooledBeam=IfcCooledBeam;var IfcCoolingTower=/*#__PURE__*/function(_IfcEnergyConversionD96){_inherits(IfcCoolingTower,_IfcEnergyConversionD96);var _super2433=_createSuper(IfcCoolingTower);function IfcCoolingTower(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2430;_classCallCheck(this,IfcCoolingTower);_this2430=_super2433.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2430.GlobalId=GlobalId;_this2430.OwnerHistory=OwnerHistory;_this2430.Name=Name;_this2430.Description=Description;_this2430.ObjectType=ObjectType;_this2430.ObjectPlacement=ObjectPlacement;_this2430.Representation=Representation;_this2430.Tag=Tag;_this2430.PredefinedType=PredefinedType;_this2430.type=3640358203;return _this2430;}return _createClass(IfcCoolingTower);}(IfcEnergyConversionDevice);IFC4X32.IfcCoolingTower=IfcCoolingTower;var IfcDamper=/*#__PURE__*/function(_IfcFlowController15){_inherits(IfcDamper,_IfcFlowController15);var _super2434=_createSuper(IfcDamper);function IfcDamper(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2431;_classCallCheck(this,IfcDamper);_this2431=_super2434.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2431.GlobalId=GlobalId;_this2431.OwnerHistory=OwnerHistory;_this2431.Name=Name;_this2431.Description=Description;_this2431.ObjectType=ObjectType;_this2431.ObjectPlacement=ObjectPlacement;_this2431.Representation=Representation;_this2431.Tag=Tag;_this2431.PredefinedType=PredefinedType;_this2431.type=4074379575;return _this2431;}return _createClass(IfcDamper);}(IfcFlowController);IFC4X32.IfcDamper=IfcDamper;var IfcDistributionBoard=/*#__PURE__*/function(_IfcFlowController16){_inherits(IfcDistributionBoard,_IfcFlowController16);var _super2435=_createSuper(IfcDistributionBoard);function IfcDistributionBoard(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2432;_classCallCheck(this,IfcDistributionBoard);_this2432=_super2435.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2432.GlobalId=GlobalId;_this2432.OwnerHistory=OwnerHistory;_this2432.Name=Name;_this2432.Description=Description;_this2432.ObjectType=ObjectType;_this2432.ObjectPlacement=ObjectPlacement;_this2432.Representation=Representation;_this2432.Tag=Tag;_this2432.PredefinedType=PredefinedType;_this2432.type=3693000487;return _this2432;}return _createClass(IfcDistributionBoard);}(IfcFlowController);IFC4X32.IfcDistributionBoard=IfcDistributionBoard;var IfcDistributionChamberElement=/*#__PURE__*/function(_IfcDistributionFlowE54){_inherits(IfcDistributionChamberElement,_IfcDistributionFlowE54);var _super2436=_createSuper(IfcDistributionChamberElement);function IfcDistributionChamberElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2433;_classCallCheck(this,IfcDistributionChamberElement);_this2433=_super2436.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2433.GlobalId=GlobalId;_this2433.OwnerHistory=OwnerHistory;_this2433.Name=Name;_this2433.Description=Description;_this2433.ObjectType=ObjectType;_this2433.ObjectPlacement=ObjectPlacement;_this2433.Representation=Representation;_this2433.Tag=Tag;_this2433.PredefinedType=PredefinedType;_this2433.type=1052013943;return _this2433;}return _createClass(IfcDistributionChamberElement);}(IfcDistributionFlowElement);IFC4X32.IfcDistributionChamberElement=IfcDistributionChamberElement;var IfcDistributionCircuit=/*#__PURE__*/function(_IfcDistributionSyste2){_inherits(IfcDistributionCircuit,_IfcDistributionSyste2);var _super2437=_createSuper(IfcDistributionCircuit);function IfcDistributionCircuit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,PredefinedType){var _this2434;_classCallCheck(this,IfcDistributionCircuit);_this2434=_super2437.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,LongName,PredefinedType);_this2434.GlobalId=GlobalId;_this2434.OwnerHistory=OwnerHistory;_this2434.Name=Name;_this2434.Description=Description;_this2434.ObjectType=ObjectType;_this2434.LongName=LongName;_this2434.PredefinedType=PredefinedType;_this2434.type=562808652;return _this2434;}return _createClass(IfcDistributionCircuit);}(IfcDistributionSystem);IFC4X32.IfcDistributionCircuit=IfcDistributionCircuit;var IfcDistributionControlElement=/*#__PURE__*/function(_IfcDistributionEleme12){_inherits(IfcDistributionControlElement,_IfcDistributionEleme12);var _super2438=_createSuper(IfcDistributionControlElement);function IfcDistributionControlElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2435;_classCallCheck(this,IfcDistributionControlElement);_this2435=_super2438.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2435.GlobalId=GlobalId;_this2435.OwnerHistory=OwnerHistory;_this2435.Name=Name;_this2435.Description=Description;_this2435.ObjectType=ObjectType;_this2435.ObjectPlacement=ObjectPlacement;_this2435.Representation=Representation;_this2435.Tag=Tag;_this2435.type=1062813311;return _this2435;}return _createClass(IfcDistributionControlElement);}(IfcDistributionElement);IFC4X32.IfcDistributionControlElement=IfcDistributionControlElement;var IfcDuctFitting=/*#__PURE__*/function(_IfcFlowFitting10){_inherits(IfcDuctFitting,_IfcFlowFitting10);var _super2439=_createSuper(IfcDuctFitting);function IfcDuctFitting(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2436;_classCallCheck(this,IfcDuctFitting);_this2436=_super2439.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2436.GlobalId=GlobalId;_this2436.OwnerHistory=OwnerHistory;_this2436.Name=Name;_this2436.Description=Description;_this2436.ObjectType=ObjectType;_this2436.ObjectPlacement=ObjectPlacement;_this2436.Representation=Representation;_this2436.Tag=Tag;_this2436.PredefinedType=PredefinedType;_this2436.type=342316401;return _this2436;}return _createClass(IfcDuctFitting);}(IfcFlowFitting);IFC4X32.IfcDuctFitting=IfcDuctFitting;var IfcDuctSegment=/*#__PURE__*/function(_IfcFlowSegment9){_inherits(IfcDuctSegment,_IfcFlowSegment9);var _super2440=_createSuper(IfcDuctSegment);function IfcDuctSegment(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2437;_classCallCheck(this,IfcDuctSegment);_this2437=_super2440.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2437.GlobalId=GlobalId;_this2437.OwnerHistory=OwnerHistory;_this2437.Name=Name;_this2437.Description=Description;_this2437.ObjectType=ObjectType;_this2437.ObjectPlacement=ObjectPlacement;_this2437.Representation=Representation;_this2437.Tag=Tag;_this2437.PredefinedType=PredefinedType;_this2437.type=3518393246;return _this2437;}return _createClass(IfcDuctSegment);}(IfcFlowSegment);IFC4X32.IfcDuctSegment=IfcDuctSegment;var IfcDuctSilencer=/*#__PURE__*/function(_IfcFlowTreatmentDevi14){_inherits(IfcDuctSilencer,_IfcFlowTreatmentDevi14);var _super2441=_createSuper(IfcDuctSilencer);function IfcDuctSilencer(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2438;_classCallCheck(this,IfcDuctSilencer);_this2438=_super2441.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2438.GlobalId=GlobalId;_this2438.OwnerHistory=OwnerHistory;_this2438.Name=Name;_this2438.Description=Description;_this2438.ObjectType=ObjectType;_this2438.ObjectPlacement=ObjectPlacement;_this2438.Representation=Representation;_this2438.Tag=Tag;_this2438.PredefinedType=PredefinedType;_this2438.type=1360408905;return _this2438;}return _createClass(IfcDuctSilencer);}(IfcFlowTreatmentDevice);IFC4X32.IfcDuctSilencer=IfcDuctSilencer;var IfcElectricAppliance=/*#__PURE__*/function(_IfcFlowTerminal28){_inherits(IfcElectricAppliance,_IfcFlowTerminal28);var _super2442=_createSuper(IfcElectricAppliance);function IfcElectricAppliance(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2439;_classCallCheck(this,IfcElectricAppliance);_this2439=_super2442.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2439.GlobalId=GlobalId;_this2439.OwnerHistory=OwnerHistory;_this2439.Name=Name;_this2439.Description=Description;_this2439.ObjectType=ObjectType;_this2439.ObjectPlacement=ObjectPlacement;_this2439.Representation=Representation;_this2439.Tag=Tag;_this2439.PredefinedType=PredefinedType;_this2439.type=1904799276;return _this2439;}return _createClass(IfcElectricAppliance);}(IfcFlowTerminal);IFC4X32.IfcElectricAppliance=IfcElectricAppliance;var IfcElectricDistributionBoard=/*#__PURE__*/function(_IfcFlowController17){_inherits(IfcElectricDistributionBoard,_IfcFlowController17);var _super2443=_createSuper(IfcElectricDistributionBoard);function IfcElectricDistributionBoard(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2440;_classCallCheck(this,IfcElectricDistributionBoard);_this2440=_super2443.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2440.GlobalId=GlobalId;_this2440.OwnerHistory=OwnerHistory;_this2440.Name=Name;_this2440.Description=Description;_this2440.ObjectType=ObjectType;_this2440.ObjectPlacement=ObjectPlacement;_this2440.Representation=Representation;_this2440.Tag=Tag;_this2440.PredefinedType=PredefinedType;_this2440.type=862014818;return _this2440;}return _createClass(IfcElectricDistributionBoard);}(IfcFlowController);IFC4X32.IfcElectricDistributionBoard=IfcElectricDistributionBoard;var IfcElectricFlowStorageDevice=/*#__PURE__*/function(_IfcFlowStorageDevice10){_inherits(IfcElectricFlowStorageDevice,_IfcFlowStorageDevice10);var _super2444=_createSuper(IfcElectricFlowStorageDevice);function IfcElectricFlowStorageDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2441;_classCallCheck(this,IfcElectricFlowStorageDevice);_this2441=_super2444.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2441.GlobalId=GlobalId;_this2441.OwnerHistory=OwnerHistory;_this2441.Name=Name;_this2441.Description=Description;_this2441.ObjectType=ObjectType;_this2441.ObjectPlacement=ObjectPlacement;_this2441.Representation=Representation;_this2441.Tag=Tag;_this2441.PredefinedType=PredefinedType;_this2441.type=3310460725;return _this2441;}return _createClass(IfcElectricFlowStorageDevice);}(IfcFlowStorageDevice);IFC4X32.IfcElectricFlowStorageDevice=IfcElectricFlowStorageDevice;var IfcElectricFlowTreatmentDevice=/*#__PURE__*/function(_IfcFlowTreatmentDevi15){_inherits(IfcElectricFlowTreatmentDevice,_IfcFlowTreatmentDevi15);var _super2445=_createSuper(IfcElectricFlowTreatmentDevice);function IfcElectricFlowTreatmentDevice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2442;_classCallCheck(this,IfcElectricFlowTreatmentDevice);_this2442=_super2445.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2442.GlobalId=GlobalId;_this2442.OwnerHistory=OwnerHistory;_this2442.Name=Name;_this2442.Description=Description;_this2442.ObjectType=ObjectType;_this2442.ObjectPlacement=ObjectPlacement;_this2442.Representation=Representation;_this2442.Tag=Tag;_this2442.PredefinedType=PredefinedType;_this2442.type=24726584;return _this2442;}return _createClass(IfcElectricFlowTreatmentDevice);}(IfcFlowTreatmentDevice);IFC4X32.IfcElectricFlowTreatmentDevice=IfcElectricFlowTreatmentDevice;var IfcElectricGenerator=/*#__PURE__*/function(_IfcEnergyConversionD97){_inherits(IfcElectricGenerator,_IfcEnergyConversionD97);var _super2446=_createSuper(IfcElectricGenerator);function IfcElectricGenerator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2443;_classCallCheck(this,IfcElectricGenerator);_this2443=_super2446.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2443.GlobalId=GlobalId;_this2443.OwnerHistory=OwnerHistory;_this2443.Name=Name;_this2443.Description=Description;_this2443.ObjectType=ObjectType;_this2443.ObjectPlacement=ObjectPlacement;_this2443.Representation=Representation;_this2443.Tag=Tag;_this2443.PredefinedType=PredefinedType;_this2443.type=264262732;return _this2443;}return _createClass(IfcElectricGenerator);}(IfcEnergyConversionDevice);IFC4X32.IfcElectricGenerator=IfcElectricGenerator;var IfcElectricMotor=/*#__PURE__*/function(_IfcEnergyConversionD98){_inherits(IfcElectricMotor,_IfcEnergyConversionD98);var _super2447=_createSuper(IfcElectricMotor);function IfcElectricMotor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2444;_classCallCheck(this,IfcElectricMotor);_this2444=_super2447.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2444.GlobalId=GlobalId;_this2444.OwnerHistory=OwnerHistory;_this2444.Name=Name;_this2444.Description=Description;_this2444.ObjectType=ObjectType;_this2444.ObjectPlacement=ObjectPlacement;_this2444.Representation=Representation;_this2444.Tag=Tag;_this2444.PredefinedType=PredefinedType;_this2444.type=402227799;return _this2444;}return _createClass(IfcElectricMotor);}(IfcEnergyConversionDevice);IFC4X32.IfcElectricMotor=IfcElectricMotor;var IfcElectricTimeControl=/*#__PURE__*/function(_IfcFlowController18){_inherits(IfcElectricTimeControl,_IfcFlowController18);var _super2448=_createSuper(IfcElectricTimeControl);function IfcElectricTimeControl(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2445;_classCallCheck(this,IfcElectricTimeControl);_this2445=_super2448.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2445.GlobalId=GlobalId;_this2445.OwnerHistory=OwnerHistory;_this2445.Name=Name;_this2445.Description=Description;_this2445.ObjectType=ObjectType;_this2445.ObjectPlacement=ObjectPlacement;_this2445.Representation=Representation;_this2445.Tag=Tag;_this2445.PredefinedType=PredefinedType;_this2445.type=1003880860;return _this2445;}return _createClass(IfcElectricTimeControl);}(IfcFlowController);IFC4X32.IfcElectricTimeControl=IfcElectricTimeControl;var IfcFan=/*#__PURE__*/function(_IfcFlowMovingDevice6){_inherits(IfcFan,_IfcFlowMovingDevice6);var _super2449=_createSuper(IfcFan);function IfcFan(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2446;_classCallCheck(this,IfcFan);_this2446=_super2449.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2446.GlobalId=GlobalId;_this2446.OwnerHistory=OwnerHistory;_this2446.Name=Name;_this2446.Description=Description;_this2446.ObjectType=ObjectType;_this2446.ObjectPlacement=ObjectPlacement;_this2446.Representation=Representation;_this2446.Tag=Tag;_this2446.PredefinedType=PredefinedType;_this2446.type=3415622556;return _this2446;}return _createClass(IfcFan);}(IfcFlowMovingDevice);IFC4X32.IfcFan=IfcFan;var IfcFilter=/*#__PURE__*/function(_IfcFlowTreatmentDevi16){_inherits(IfcFilter,_IfcFlowTreatmentDevi16);var _super2450=_createSuper(IfcFilter);function IfcFilter(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2447;_classCallCheck(this,IfcFilter);_this2447=_super2450.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2447.GlobalId=GlobalId;_this2447.OwnerHistory=OwnerHistory;_this2447.Name=Name;_this2447.Description=Description;_this2447.ObjectType=ObjectType;_this2447.ObjectPlacement=ObjectPlacement;_this2447.Representation=Representation;_this2447.Tag=Tag;_this2447.PredefinedType=PredefinedType;_this2447.type=819412036;return _this2447;}return _createClass(IfcFilter);}(IfcFlowTreatmentDevice);IFC4X32.IfcFilter=IfcFilter;var IfcFireSuppressionTerminal=/*#__PURE__*/function(_IfcFlowTerminal29){_inherits(IfcFireSuppressionTerminal,_IfcFlowTerminal29);var _super2451=_createSuper(IfcFireSuppressionTerminal);function IfcFireSuppressionTerminal(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2448;_classCallCheck(this,IfcFireSuppressionTerminal);_this2448=_super2451.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2448.GlobalId=GlobalId;_this2448.OwnerHistory=OwnerHistory;_this2448.Name=Name;_this2448.Description=Description;_this2448.ObjectType=ObjectType;_this2448.ObjectPlacement=ObjectPlacement;_this2448.Representation=Representation;_this2448.Tag=Tag;_this2448.PredefinedType=PredefinedType;_this2448.type=1426591983;return _this2448;}return _createClass(IfcFireSuppressionTerminal);}(IfcFlowTerminal);IFC4X32.IfcFireSuppressionTerminal=IfcFireSuppressionTerminal;var IfcFlowInstrument=/*#__PURE__*/function(_IfcDistributionContr27){_inherits(IfcFlowInstrument,_IfcDistributionContr27);var _super2452=_createSuper(IfcFlowInstrument);function IfcFlowInstrument(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2449;_classCallCheck(this,IfcFlowInstrument);_this2449=_super2452.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2449.GlobalId=GlobalId;_this2449.OwnerHistory=OwnerHistory;_this2449.Name=Name;_this2449.Description=Description;_this2449.ObjectType=ObjectType;_this2449.ObjectPlacement=ObjectPlacement;_this2449.Representation=Representation;_this2449.Tag=Tag;_this2449.PredefinedType=PredefinedType;_this2449.type=182646315;return _this2449;}return _createClass(IfcFlowInstrument);}(IfcDistributionControlElement);IFC4X32.IfcFlowInstrument=IfcFlowInstrument;var IfcGeomodel=/*#__PURE__*/function(_IfcGeotechnicalAssem2){_inherits(IfcGeomodel,_IfcGeotechnicalAssem2);var _super2453=_createSuper(IfcGeomodel);function IfcGeomodel(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2450;_classCallCheck(this,IfcGeomodel);_this2450=_super2453.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2450.GlobalId=GlobalId;_this2450.OwnerHistory=OwnerHistory;_this2450.Name=Name;_this2450.Description=Description;_this2450.ObjectType=ObjectType;_this2450.ObjectPlacement=ObjectPlacement;_this2450.Representation=Representation;_this2450.Tag=Tag;_this2450.type=2680139844;return _this2450;}return _createClass(IfcGeomodel);}(IfcGeotechnicalAssembly);IFC4X32.IfcGeomodel=IfcGeomodel;var IfcGeoslice=/*#__PURE__*/function(_IfcGeotechnicalAssem3){_inherits(IfcGeoslice,_IfcGeotechnicalAssem3);var _super2454=_createSuper(IfcGeoslice);function IfcGeoslice(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag){var _this2451;_classCallCheck(this,IfcGeoslice);_this2451=_super2454.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2451.GlobalId=GlobalId;_this2451.OwnerHistory=OwnerHistory;_this2451.Name=Name;_this2451.Description=Description;_this2451.ObjectType=ObjectType;_this2451.ObjectPlacement=ObjectPlacement;_this2451.Representation=Representation;_this2451.Tag=Tag;_this2451.type=1971632696;return _this2451;}return _createClass(IfcGeoslice);}(IfcGeotechnicalAssembly);IFC4X32.IfcGeoslice=IfcGeoslice;var IfcProtectiveDeviceTrippingUnit=/*#__PURE__*/function(_IfcDistributionContr28){_inherits(IfcProtectiveDeviceTrippingUnit,_IfcDistributionContr28);var _super2455=_createSuper(IfcProtectiveDeviceTrippingUnit);function IfcProtectiveDeviceTrippingUnit(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2452;_classCallCheck(this,IfcProtectiveDeviceTrippingUnit);_this2452=_super2455.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2452.GlobalId=GlobalId;_this2452.OwnerHistory=OwnerHistory;_this2452.Name=Name;_this2452.Description=Description;_this2452.ObjectType=ObjectType;_this2452.ObjectPlacement=ObjectPlacement;_this2452.Representation=Representation;_this2452.Tag=Tag;_this2452.PredefinedType=PredefinedType;_this2452.type=2295281155;return _this2452;}return _createClass(IfcProtectiveDeviceTrippingUnit);}(IfcDistributionControlElement);IFC4X32.IfcProtectiveDeviceTrippingUnit=IfcProtectiveDeviceTrippingUnit;var IfcSensor=/*#__PURE__*/function(_IfcDistributionContr29){_inherits(IfcSensor,_IfcDistributionContr29);var _super2456=_createSuper(IfcSensor);function IfcSensor(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2453;_classCallCheck(this,IfcSensor);_this2453=_super2456.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2453.GlobalId=GlobalId;_this2453.OwnerHistory=OwnerHistory;_this2453.Name=Name;_this2453.Description=Description;_this2453.ObjectType=ObjectType;_this2453.ObjectPlacement=ObjectPlacement;_this2453.Representation=Representation;_this2453.Tag=Tag;_this2453.PredefinedType=PredefinedType;_this2453.type=4086658281;return _this2453;}return _createClass(IfcSensor);}(IfcDistributionControlElement);IFC4X32.IfcSensor=IfcSensor;var IfcUnitaryControlElement=/*#__PURE__*/function(_IfcDistributionContr30){_inherits(IfcUnitaryControlElement,_IfcDistributionContr30);var _super2457=_createSuper(IfcUnitaryControlElement);function IfcUnitaryControlElement(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2454;_classCallCheck(this,IfcUnitaryControlElement);_this2454=_super2457.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2454.GlobalId=GlobalId;_this2454.OwnerHistory=OwnerHistory;_this2454.Name=Name;_this2454.Description=Description;_this2454.ObjectType=ObjectType;_this2454.ObjectPlacement=ObjectPlacement;_this2454.Representation=Representation;_this2454.Tag=Tag;_this2454.PredefinedType=PredefinedType;_this2454.type=630975310;return _this2454;}return _createClass(IfcUnitaryControlElement);}(IfcDistributionControlElement);IFC4X32.IfcUnitaryControlElement=IfcUnitaryControlElement;var IfcActuator=/*#__PURE__*/function(_IfcDistributionContr31){_inherits(IfcActuator,_IfcDistributionContr31);var _super2458=_createSuper(IfcActuator);function IfcActuator(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2455;_classCallCheck(this,IfcActuator);_this2455=_super2458.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2455.GlobalId=GlobalId;_this2455.OwnerHistory=OwnerHistory;_this2455.Name=Name;_this2455.Description=Description;_this2455.ObjectType=ObjectType;_this2455.ObjectPlacement=ObjectPlacement;_this2455.Representation=Representation;_this2455.Tag=Tag;_this2455.PredefinedType=PredefinedType;_this2455.type=4288193352;return _this2455;}return _createClass(IfcActuator);}(IfcDistributionControlElement);IFC4X32.IfcActuator=IfcActuator;var IfcAlarm=/*#__PURE__*/function(_IfcDistributionContr32){_inherits(IfcAlarm,_IfcDistributionContr32);var _super2459=_createSuper(IfcAlarm);function IfcAlarm(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2456;_classCallCheck(this,IfcAlarm);_this2456=_super2459.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2456.GlobalId=GlobalId;_this2456.OwnerHistory=OwnerHistory;_this2456.Name=Name;_this2456.Description=Description;_this2456.ObjectType=ObjectType;_this2456.ObjectPlacement=ObjectPlacement;_this2456.Representation=Representation;_this2456.Tag=Tag;_this2456.PredefinedType=PredefinedType;_this2456.type=3087945054;return _this2456;}return _createClass(IfcAlarm);}(IfcDistributionControlElement);IFC4X32.IfcAlarm=IfcAlarm;var IfcController=/*#__PURE__*/function(_IfcDistributionContr33){_inherits(IfcController,_IfcDistributionContr33);var _super2460=_createSuper(IfcController);function IfcController(expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag,PredefinedType){var _this2457;_classCallCheck(this,IfcController);_this2457=_super2460.call(this,expressID,GlobalId,OwnerHistory,Name,Description,ObjectType,ObjectPlacement,Representation,Tag);_this2457.GlobalId=GlobalId;_this2457.OwnerHistory=OwnerHistory;_this2457.Name=Name;_this2457.Description=Description;_this2457.ObjectType=ObjectType;_this2457.ObjectPlacement=ObjectPlacement;_this2457.Representation=Representation;_this2457.Tag=Tag;_this2457.PredefinedType=PredefinedType;_this2457.type=25142252;return _this2457;}return _createClass(IfcController);}(IfcDistributionControlElement);IFC4X32.IfcController=IfcController;})(IFC4X3||(IFC4X3={}));// dist/helpers/properties.ts -var PropsNames={aggregates:{name:IFCRELAGGREGATES,relating:"RelatingObject",related:"RelatedObjects",key:"children"},spatial:{name:IFCRELCONTAINEDINSPATIALSTRUCTURE,relating:"RelatingStructure",related:"RelatedElements",key:"children"},psets:{name:IFCRELDEFINESBYPROPERTIES,relating:"RelatingPropertyDefinition",related:"RelatedObjects",key:"IsDefinedBy"},materials:{name:IFCRELASSOCIATESMATERIAL,relating:"RelatingMaterial",related:"RelatedObjects",key:"HasAssociations"},type:{name:IFCRELDEFINESBYTYPE,relating:"RelatingType",related:"RelatedObjects",key:"IsDefinedBy"}};var Properties=/*#__PURE__*/function(){function Properties(api){_classCallCheck(this,Properties);this.api=api;}_createClass(Properties,[{key:"getItemProperties",value:function getItemProperties(modelID,id){var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var inverse=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){return _regeneratorRuntime().wrap(function _callee7$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:return _context11.abrupt("return",this.api.GetLine(modelID,id,recursive,inverse));case 1:case"end":return _context11.stop();}}},_callee7,this);}));}},{key:"getPropertySets",value:function getPropertySets(modelID){var elementID=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){return _regeneratorRuntime().wrap(function _callee8$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:_context12.next=2;return this.getRelatedProperties(modelID,elementID,PropsNames.psets,recursive);case 2:return _context12.abrupt("return",_context12.sent);case 3:case"end":return _context12.stop();}}},_callee8,this);}));}},{key:"setPropertySets",value:function setPropertySets(modelID,elementID,psetID){return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){return _regeneratorRuntime().wrap(function _callee9$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:return _context13.abrupt("return",this.setItemProperties(modelID,elementID,psetID,PropsNames.psets));case 1:case"end":return _context13.stop();}}},_callee9,this);}));}},{key:"getTypeProperties",value:function getTypeProperties(modelID){var elementID=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){return _regeneratorRuntime().wrap(function _callee10$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:if(!(this.api.GetModelSchema(modelID)=="IFC2X3")){_context14.next=6;break;}_context14.next=3;return this.getRelatedProperties(modelID,elementID,PropsNames.type,recursive);case 3:return _context14.abrupt("return",_context14.sent);case 6:_context14.next=8;return this.getRelatedProperties(modelID,elementID,__spreadProps(__spreadValues({},PropsNames.type),{key:"IsTypedBy"}),recursive);case 8:return _context14.abrupt("return",_context14.sent);case 9:case"end":return _context14.stop();}}},_callee10,this);}));}},{key:"getMaterialsProperties",value:function getMaterialsProperties(modelID){var elementID=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){return _regeneratorRuntime().wrap(function _callee11$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:_context15.next=2;return this.getRelatedProperties(modelID,elementID,PropsNames.materials,recursive);case 2:return _context15.abrupt("return",_context15.sent);case 3:case"end":return _context15.stop();}}},_callee11,this);}));}},{key:"setMaterialsProperties",value:function setMaterialsProperties(modelID,elementID,materialID){return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){return _regeneratorRuntime().wrap(function _callee12$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:return _context16.abrupt("return",this.setItemProperties(modelID,elementID,materialID,PropsNames.materials));case 1:case"end":return _context16.stop();}}},_callee12,this);}));}},{key:"getSpatialStructure",value:function getSpatialStructure(modelID){var includeProperties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var chunks,allLines,projectID,project;return _regeneratorRuntime().wrap(function _callee13$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:_context17.next=2;return this.getSpatialTreeChunks(modelID);case 2:chunks=_context17.sent;_context17.next=5;return this.api.GetLineIDsWithType(modelID,IFCPROJECT);case 5:allLines=_context17.sent;projectID=allLines.get(0);project=Properties.newIfcProject(projectID);_context17.next=10;return this.getSpatialNode(modelID,project,chunks,includeProperties);case 10:return _context17.abrupt("return",project);case 11:case"end":return _context17.stop();}}},_callee13,this);}));}},{key:"getRelatedProperties",value:function getRelatedProperties(modelID,elementID,propsName){var recursive=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var result,rels,vec,_i571,_i572,propSetIds,x;return _regeneratorRuntime().wrap(function _callee14$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:result=[];rels=null;if(!(elementID!==0)){_context18.next=8;break;}_context18.next=5;return this.api.GetLine(modelID,elementID,false,true)[propsName.key];case 5:rels=_context18.sent;_context18.next=11;break;case 8:vec=this.api.GetLineIDsWithType(modelID,propsName.name);rels=[];for(_i571=0;_i5711?_len119-1:0),_key13=1;_key13<_len119;_key13++){args[_key13-1]=arguments[_key13];}(_console7=console).log.apply(_console7,[msg].concat(args));}}},{key:"debug",value:function debug(msg){if(this.logLevel<=0){var _console8;for(var _len120=arguments.length,args=new Array(_len120>1?_len120-1:0),_key14=1;_key14<_len120;_key14++){args[_key14-1]=arguments[_key14];}(_console8=console).trace.apply(_console8,["DEBUG: ",msg].concat(args));}}},{key:"info",value:function info(msg){if(this.logLevel<=1){var _console9;for(var _len121=arguments.length,args=new Array(_len121>1?_len121-1:0),_key15=1;_key15<_len121;_key15++){args[_key15-1]=arguments[_key15];}(_console9=console).info.apply(_console9,["INFO: ",msg].concat(args));}}},{key:"warn",value:function warn(msg){if(this.logLevel<=2){var _console10;for(var _len122=arguments.length,args=new Array(_len122>1?_len122-1:0),_key16=1;_key16<_len122;_key16++){args[_key16-1]=arguments[_key16];}(_console10=console).warn.apply(_console10,["WARN: ",msg].concat(args));}}},{key:"error",value:function error(msg){if(this.logLevel<=3){var _console11;for(var _len123=arguments.length,args=new Array(_len123>1?_len123-1:0),_key17=1;_key17<_len123;_key17++){args[_key17-1]=arguments[_key17];}(_console11=console).error.apply(_console11,["ERROR: ",msg].concat(args));}}}]);return Log;}();Log.logLevel=1;var WebIFCWasm;if(typeof self!=="undefined"&&self.crossOriginIsolated){try{WebIFCWasm=require_web_ifc_mt();}catch(ex){WebIFCWasm=require_web_ifc();}}else WebIFCWasm=require_web_ifc();var STRING=1;var IfcAPI2=/*#__PURE__*/function(){function IfcAPI2(){_classCallCheck(this,IfcAPI2);this.wasmModule=void 0;this.wasmPath="";this.isWasmPathAbsolute=false;this.modelSchemaList=[];this.ifcGuidMap=new Map();this.properties=new Properties(this);}_createClass(IfcAPI2,[{key:"Init",value:function Init(customLocateFileHandler){return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(){var _this2459=this;var locateFileHandler;return _regeneratorRuntime().wrap(function _callee20$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:if(!WebIFCWasm){_context24.next=7;break;}locateFileHandler=function locateFileHandler(path,prefix){if(path.endsWith(".wasm")){if(_this2459.isWasmPathAbsolute){return _this2459.wasmPath+path;}return prefix+_this2459.wasmPath+path;}return prefix+path;};_context24.next=4;return WebIFCWasm({noInitialRun:true,locateFile:customLocateFileHandler||locateFileHandler});case 4:this.wasmModule=_context24.sent;_context24.next=8;break;case 7:Log.error("Could not find wasm module at './web-ifc' from web-ifc-api.ts");case 8:case"end":return _context24.stop();}}},_callee20,this);}));}},{key:"OpenModels",value:function OpenModels(dataSets,settings){var s=__spreadValues({MEMORY_LIMIT:3221225472},settings);s.MEMORY_LIMIT=s.MEMORY_LIMIT/dataSets.length;var modelIDs=[];var _iterator45=_createForOfIteratorHelper(dataSets),_step45;try{for(_iterator45.s();!(_step45=_iterator45.n()).done;){var dataSet=_step45.value;modelIDs.push(this.OpenModel(dataSet,s));}}catch(err){_iterator45.e(err);}finally{_iterator45.f();}return modelIDs;}},{key:"CreateSettings",value:function CreateSettings(settings){var s=__spreadValues({COORDINATE_TO_ORIGIN:false,CIRCLE_SEGMENTS:12,TAPE_SIZE:67108864,MEMORY_LIMIT:3221225472},settings);var deprecated=["USE_FAST_BOOLS","CIRCLE_SEGMENTS_LOW","CIRCLE_SEGMENTS_MEDIUM","CIRCLE_SEGMENTS_HIGH"];for(var d in deprecated){if(d in s){Log.info("Use of deprecated settings "+d+" detected");}}return s;}},{key:"OpenModel",value:function OpenModel(data,settings){var _this2460=this;var s=this.CreateSettings(settings);var result=this.wasmModule.OpenModel(s,function(destPtr,offsetInSrc,destSize){var srcSize=Math.min(data.byteLength-offsetInSrc,destSize);var dest=_this2460.wasmModule.HEAPU8.subarray(destPtr,destPtr+srcSize);var src=data.subarray(offsetInSrc,offsetInSrc+srcSize);dest.set(src);return srcSize;});var schemaName=this.GetHeaderLine(result,FILE_SCHEMA).arguments[0][0].value;this.modelSchemaList[result]=SchemaNames.indexOf(schemaName);if(this.modelSchemaList[result]==-1){Log.error("Unsupported Schema:"+schemaName);this.CloseModel(result);return-1;}Log.info("Parsing Model using "+schemaName+" Schema");return result;}},{key:"GetModelSchema",value:function GetModelSchema(modelID){return SchemaNames[this.modelSchemaList[modelID]];}},{key:"CreateModel",value:function CreateModel(model,settings){var _a,_b,_c;var s=this.CreateSettings(settings);var result=this.wasmModule.CreateModel(s);this.modelSchemaList[result]=SchemaNames.indexOf(model.schema);var modelName=model.name||"web-ifc-model-"+result+".ifc";var timestamp=new Date().toISOString().slice(0,19);var description=((_a=model.description)==null?void 0:_a.map(function(d){return{type:STRING,value:d};}))||[{type:STRING,value:"ViewDefinition [CoordinationView]"}];var authors=((_b=model.authors)==null?void 0:_b.map(function(a){return{type:STRING,value:a};}))||[null];var orgs=((_c=model.organizations)==null?void 0:_c.map(function(o){return{type:STRING,value:o};}))||[null];var auth=model.authorization?{type:STRING,value:model.authorization}:null;this.wasmModule.WriteHeaderLine(result,FILE_DESCRIPTION,[description,{type:STRING,value:"2;1"}]);this.wasmModule.WriteHeaderLine(result,FILE_NAME,[{type:STRING,value:modelName},{type:STRING,value:timestamp},authors,orgs,{type:STRING,value:"ifcjs/web-ifc-api"},{type:STRING,value:"ifcjs/web-ifc-api"},auth]);this.wasmModule.WriteHeaderLine(result,FILE_SCHEMA,[[{type:STRING,value:model.schema}]]);return result;}},{key:"SaveModel",value:function SaveModel(modelID){var _this2461=this;var modelSize=this.wasmModule.GetModelSize(modelID);var headerBytes=512;var dataBuffer=new Uint8Array(modelSize+headerBytes);var size=0;this.wasmModule.SaveModel(modelID,function(srcPtr,srcSize){var src=_this2461.wasmModule.HEAPU8.subarray(srcPtr,srcPtr+srcSize);size=srcSize;dataBuffer.set(src,0);});var newBuffer=new Uint8Array(size);newBuffer.set(dataBuffer.subarray(0,size),0);return newBuffer;}},{key:"ExportFileAsIFC",value:function ExportFileAsIFC(modelID){Log.warn("ExportFileAsIFC is deprecated, use SaveModel instead");return this.SaveModel(modelID);}},{key:"GetGeometry",value:function GetGeometry(modelID,geometryExpressID){return this.wasmModule.GetGeometry(modelID,geometryExpressID);}},{key:"GetHeaderLine",value:function GetHeaderLine(modelID,headerType){return this.wasmModule.GetHeaderLine(modelID,headerType);}},{key:"GetAllTypesOfModel",value:function GetAllTypesOfModel(modelID){var typesNames=[];var elements=Object.keys(FromRawLineData[this.modelSchemaList[modelID]]).map(function(e){return parseInt(e);});for(var _i577=0;_i5770)typesNames.push({typeID:elements[_i577],typeName:this.wasmModule.GetNameFromTypeCode(elements[_i577])});}return typesNames;}},{key:"GetLine",value:function GetLine(modelID,expressID){var flatten=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var inverse=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var expressCheck=this.wasmModule.ValidateExpressID(modelID,expressID);if(!expressCheck){return;}var rawLineData=this.GetRawLineData(modelID,expressID);var lineData=FromRawLineData[this.modelSchemaList[modelID]][rawLineData.type](rawLineData.ID,rawLineData.arguments);if(flatten){this.FlattenLine(modelID,lineData);}var inverseData=InversePropertyDef[this.modelSchemaList[modelID]][rawLineData.type];if(inverse&&inverseData!=null){var _iterator46=_createForOfIteratorHelper(inverseData),_step46;try{for(_iterator46.s();!(_step46=_iterator46.n()).done;){var inverseProp=_step46.value;if(!inverseProp[3])lineData[inverseProp[0]]=null;else lineData[inverseProp[0]]=[];var targetTypes=[inverseProp[1]];if(typeof InheritanceDef[this.modelSchemaList[modelID]][inverseProp[1]]!="undefined"){targetTypes=targetTypes.concat(InheritanceDef[this.modelSchemaList[modelID]][inverseProp[1]]);}var inverseIDs=this.wasmModule.GetInversePropertyForItem(modelID,expressID,targetTypes,inverseProp[2],inverseProp[3]);if(!inverseProp[3]&&inverseIDs.size()>0){if(!flatten)lineData[inverseProp[0]]={type:5,value:inverseIDs.get(0)};else lineData[inverseProp[0]]=this.GetLine(modelID,inverseIDs.get(0));}else{for(var x=0;x2?_len124-2:0),_key18=2;_key18<_len124;_key18++){args[_key18-2]=arguments[_key18];}return Constructors[this.modelSchemaList[modelID]][type](-1,args);}},{key:"CreateIfcType",value:function CreateIfcType(modelID,type,value){return TypeInitialisers[this.modelSchemaList[modelID]][type](value);}},{key:"GetNameFromTypeCode",value:function GetNameFromTypeCode(type){return this.wasmModule.GetNameFromTypeCode(type);}},{key:"GetTypeCodeFromName",value:function GetTypeCodeFromName(typeName){return this.wasmModule.GetTypeCodeFromName(typeName);}},{key:"IsIfcElement",value:function IsIfcElement(type){return this.wasmModule.IsIfcElement(type);}},{key:"GetIfcEntityList",value:function GetIfcEntityList(modelID){return Object.keys(FromRawLineData[this.modelSchemaList[modelID]]).map(function(x){return parseInt(x);});}},{key:"WriteLine",value:function WriteLine(modelID,lineObject){var property;for(property in lineObject){var lineProperty=lineObject[property];if(lineProperty&&lineProperty.expressID!==void 0){this.WriteLine(modelID,lineProperty);lineObject[property]=new Handle(lineProperty.expressID);}else if(Array.isArray(lineProperty)&&lineProperty.length>0){for(var _i578=0;_i5780&&property[0].type===5){for(var _i579=0;_i5792&&arguments[2]!==undefined?arguments[2]:false;var types=[];types.push(type);if(includeInherited&&typeof InheritanceDef[this.modelSchemaList[modelID]][type]!="undefined"){types=types.concat(InheritanceDef[this.modelSchemaList[modelID]][type]);}return this.wasmModule.GetLineIDsWithType(modelID,types);}},{key:"GetAllLines",value:function GetAllLines(modelID){return this.wasmModule.GetAllLines(modelID);}},{key:"GetAllAlignments",value:function GetAllAlignments(modelID){var alignments=this.wasmModule.GetAllAlignments(modelID);var alignmentList=[];for(var _i580=0;_i5801&&arguments[1]!==undefined?arguments[1]:false;this.wasmPath=path;this.isWasmPathAbsolute=absolute;}},{key:"SetLogLevel",value:function SetLogLevel(level){Log.setLogLevel(level);this.wasmModule.SetLogLevel(level);}}]);return IfcAPI2;}();/** +var PropsNames={aggregates:{name:IFCRELAGGREGATES,relating:"RelatingObject",related:"RelatedObjects",key:"children"},spatial:{name:IFCRELCONTAINEDINSPATIALSTRUCTURE,relating:"RelatingStructure",related:"RelatedElements",key:"children"},psets:{name:IFCRELDEFINESBYPROPERTIES,relating:"RelatingPropertyDefinition",related:"RelatedObjects",key:"IsDefinedBy"},materials:{name:IFCRELASSOCIATESMATERIAL,relating:"RelatingMaterial",related:"RelatedObjects",key:"HasAssociations"},type:{name:IFCRELDEFINESBYTYPE,relating:"RelatingType",related:"RelatedObjects",key:"IsDefinedBy"}};var Properties=/*#__PURE__*/function(){function Properties(api){_classCallCheck(this,Properties);this.api=api;}_createClass(Properties,[{key:"getItemProperties",value:function getItemProperties(modelID,id){var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var inverse=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee7(){return _regeneratorRuntime().wrap(function _callee7$(_context11){while(1){switch(_context11.prev=_context11.next){case 0:return _context11.abrupt("return",this.api.GetLine(modelID,id,recursive,inverse));case 1:case"end":return _context11.stop();}}},_callee7,this);}));}},{key:"getPropertySets",value:function getPropertySets(modelID){var elementID=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee8(){return _regeneratorRuntime().wrap(function _callee8$(_context12){while(1){switch(_context12.prev=_context12.next){case 0:_context12.next=2;return this.getRelatedProperties(modelID,elementID,PropsNames.psets,recursive);case 2:return _context12.abrupt("return",_context12.sent);case 3:case"end":return _context12.stop();}}},_callee8,this);}));}},{key:"setPropertySets",value:function setPropertySets(modelID,elementID,psetID){return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(){return _regeneratorRuntime().wrap(function _callee9$(_context13){while(1){switch(_context13.prev=_context13.next){case 0:return _context13.abrupt("return",this.setItemProperties(modelID,elementID,psetID,PropsNames.psets));case 1:case"end":return _context13.stop();}}},_callee9,this);}));}},{key:"getTypeProperties",value:function getTypeProperties(modelID){var elementID=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(){return _regeneratorRuntime().wrap(function _callee10$(_context14){while(1){switch(_context14.prev=_context14.next){case 0:if(!(this.api.GetModelSchema(modelID)=="IFC2X3")){_context14.next=6;break;}_context14.next=3;return this.getRelatedProperties(modelID,elementID,PropsNames.type,recursive);case 3:return _context14.abrupt("return",_context14.sent);case 6:_context14.next=8;return this.getRelatedProperties(modelID,elementID,__spreadProps(__spreadValues({},PropsNames.type),{key:"IsTypedBy"}),recursive);case 8:return _context14.abrupt("return",_context14.sent);case 9:case"end":return _context14.stop();}}},_callee10,this);}));}},{key:"getMaterialsProperties",value:function getMaterialsProperties(modelID){var elementID=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var recursive=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(){return _regeneratorRuntime().wrap(function _callee11$(_context15){while(1){switch(_context15.prev=_context15.next){case 0:_context15.next=2;return this.getRelatedProperties(modelID,elementID,PropsNames.materials,recursive);case 2:return _context15.abrupt("return",_context15.sent);case 3:case"end":return _context15.stop();}}},_callee11,this);}));}},{key:"setMaterialsProperties",value:function setMaterialsProperties(modelID,elementID,materialID){return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee12(){return _regeneratorRuntime().wrap(function _callee12$(_context16){while(1){switch(_context16.prev=_context16.next){case 0:return _context16.abrupt("return",this.setItemProperties(modelID,elementID,materialID,PropsNames.materials));case 1:case"end":return _context16.stop();}}},_callee12,this);}));}},{key:"getSpatialStructure",value:function getSpatialStructure(modelID){var includeProperties=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee13(){var chunks,allLines,projectID,project;return _regeneratorRuntime().wrap(function _callee13$(_context17){while(1){switch(_context17.prev=_context17.next){case 0:_context17.next=2;return this.getSpatialTreeChunks(modelID);case 2:chunks=_context17.sent;_context17.next=5;return this.api.GetLineIDsWithType(modelID,IFCPROJECT);case 5:allLines=_context17.sent;projectID=allLines.get(0);project=Properties.newIfcProject(projectID);_context17.next=10;return this.getSpatialNode(modelID,project,chunks,includeProperties);case 10:return _context17.abrupt("return",project);case 11:case"end":return _context17.stop();}}},_callee13,this);}));}},{key:"getRelatedProperties",value:function getRelatedProperties(modelID,elementID,propsName){var recursive=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee14(){var result,rels,vec,_i572,_i573,propSetIds,x;return _regeneratorRuntime().wrap(function _callee14$(_context18){while(1){switch(_context18.prev=_context18.next){case 0:result=[];rels=null;if(!(elementID!==0)){_context18.next=8;break;}_context18.next=5;return this.api.GetLine(modelID,elementID,false,true)[propsName.key];case 5:rels=_context18.sent;_context18.next=11;break;case 8:vec=this.api.GetLineIDsWithType(modelID,propsName.name);rels=[];for(_i572=0;_i5721?_len119-1:0),_key13=1;_key13<_len119;_key13++){args[_key13-1]=arguments[_key13];}(_console7=console).log.apply(_console7,[msg].concat(args));}}},{key:"debug",value:function debug(msg){if(this.logLevel<=0){var _console8;for(var _len120=arguments.length,args=new Array(_len120>1?_len120-1:0),_key14=1;_key14<_len120;_key14++){args[_key14-1]=arguments[_key14];}(_console8=console).trace.apply(_console8,["DEBUG: ",msg].concat(args));}}},{key:"info",value:function info(msg){if(this.logLevel<=1){var _console9;for(var _len121=arguments.length,args=new Array(_len121>1?_len121-1:0),_key15=1;_key15<_len121;_key15++){args[_key15-1]=arguments[_key15];}(_console9=console).info.apply(_console9,["INFO: ",msg].concat(args));}}},{key:"warn",value:function warn(msg){if(this.logLevel<=2){var _console10;for(var _len122=arguments.length,args=new Array(_len122>1?_len122-1:0),_key16=1;_key16<_len122;_key16++){args[_key16-1]=arguments[_key16];}(_console10=console).warn.apply(_console10,["WARN: ",msg].concat(args));}}},{key:"error",value:function error(msg){if(this.logLevel<=3){var _console11;for(var _len123=arguments.length,args=new Array(_len123>1?_len123-1:0),_key17=1;_key17<_len123;_key17++){args[_key17-1]=arguments[_key17];}(_console11=console).error.apply(_console11,["ERROR: ",msg].concat(args));}}}]);return Log;}();Log.logLevel=1;var WebIFCWasm;if(typeof self!=="undefined"&&self.crossOriginIsolated){try{WebIFCWasm=require_web_ifc_mt();}catch(ex){WebIFCWasm=require_web_ifc();}}else WebIFCWasm=require_web_ifc();var STRING=1;var IfcAPI2=/*#__PURE__*/function(){function IfcAPI2(){_classCallCheck(this,IfcAPI2);this.wasmModule=void 0;this.wasmPath="";this.isWasmPathAbsolute=false;this.modelSchemaList=[];this.ifcGuidMap=new Map();this.properties=new Properties(this);}_createClass(IfcAPI2,[{key:"Init",value:function Init(customLocateFileHandler){return __async(this,null,/*#__PURE__*/_regeneratorRuntime().mark(function _callee20(){var _this2459=this;var locateFileHandler;return _regeneratorRuntime().wrap(function _callee20$(_context24){while(1){switch(_context24.prev=_context24.next){case 0:if(!WebIFCWasm){_context24.next=7;break;}locateFileHandler=function locateFileHandler(path,prefix){if(path.endsWith(".wasm")){if(_this2459.isWasmPathAbsolute){return _this2459.wasmPath+path;}return prefix+_this2459.wasmPath+path;}return prefix+path;};_context24.next=4;return WebIFCWasm({noInitialRun:true,locateFile:customLocateFileHandler||locateFileHandler});case 4:this.wasmModule=_context24.sent;_context24.next=8;break;case 7:Log.error("Could not find wasm module at './web-ifc' from web-ifc-api.ts");case 8:case"end":return _context24.stop();}}},_callee20,this);}));}},{key:"OpenModels",value:function OpenModels(dataSets,settings){var s=__spreadValues({MEMORY_LIMIT:3221225472},settings);s.MEMORY_LIMIT=s.MEMORY_LIMIT/dataSets.length;var modelIDs=[];var _iterator45=_createForOfIteratorHelper(dataSets),_step45;try{for(_iterator45.s();!(_step45=_iterator45.n()).done;){var dataSet=_step45.value;modelIDs.push(this.OpenModel(dataSet,s));}}catch(err){_iterator45.e(err);}finally{_iterator45.f();}return modelIDs;}},{key:"CreateSettings",value:function CreateSettings(settings){var s=__spreadValues({COORDINATE_TO_ORIGIN:false,CIRCLE_SEGMENTS:12,TAPE_SIZE:67108864,MEMORY_LIMIT:3221225472},settings);var deprecated=["USE_FAST_BOOLS","CIRCLE_SEGMENTS_LOW","CIRCLE_SEGMENTS_MEDIUM","CIRCLE_SEGMENTS_HIGH"];for(var d in deprecated){if(d in s){Log.info("Use of deprecated settings "+d+" detected");}}return s;}},{key:"OpenModel",value:function OpenModel(data,settings){var _this2460=this;var s=this.CreateSettings(settings);var result=this.wasmModule.OpenModel(s,function(destPtr,offsetInSrc,destSize){var srcSize=Math.min(data.byteLength-offsetInSrc,destSize);var dest=_this2460.wasmModule.HEAPU8.subarray(destPtr,destPtr+srcSize);var src=data.subarray(offsetInSrc,offsetInSrc+srcSize);dest.set(src);return srcSize;});var schemaName=this.GetHeaderLine(result,FILE_SCHEMA).arguments[0][0].value;this.modelSchemaList[result]=SchemaNames.indexOf(schemaName);if(this.modelSchemaList[result]==-1){Log.error("Unsupported Schema:"+schemaName);this.CloseModel(result);return-1;}Log.info("Parsing Model using "+schemaName+" Schema");return result;}},{key:"GetModelSchema",value:function GetModelSchema(modelID){return SchemaNames[this.modelSchemaList[modelID]];}},{key:"CreateModel",value:function CreateModel(model,settings){var _a,_b,_c;var s=this.CreateSettings(settings);var result=this.wasmModule.CreateModel(s);this.modelSchemaList[result]=SchemaNames.indexOf(model.schema);var modelName=model.name||"web-ifc-model-"+result+".ifc";var timestamp=new Date().toISOString().slice(0,19);var description=((_a=model.description)==null?void 0:_a.map(function(d){return{type:STRING,value:d};}))||[{type:STRING,value:"ViewDefinition [CoordinationView]"}];var authors=((_b=model.authors)==null?void 0:_b.map(function(a){return{type:STRING,value:a};}))||[null];var orgs=((_c=model.organizations)==null?void 0:_c.map(function(o){return{type:STRING,value:o};}))||[null];var auth=model.authorization?{type:STRING,value:model.authorization}:null;this.wasmModule.WriteHeaderLine(result,FILE_DESCRIPTION,[description,{type:STRING,value:"2;1"}]);this.wasmModule.WriteHeaderLine(result,FILE_NAME,[{type:STRING,value:modelName},{type:STRING,value:timestamp},authors,orgs,{type:STRING,value:"ifcjs/web-ifc-api"},{type:STRING,value:"ifcjs/web-ifc-api"},auth]);this.wasmModule.WriteHeaderLine(result,FILE_SCHEMA,[[{type:STRING,value:model.schema}]]);return result;}},{key:"SaveModel",value:function SaveModel(modelID){var _this2461=this;var modelSize=this.wasmModule.GetModelSize(modelID);var headerBytes=512;var dataBuffer=new Uint8Array(modelSize+headerBytes);var size=0;this.wasmModule.SaveModel(modelID,function(srcPtr,srcSize){var src=_this2461.wasmModule.HEAPU8.subarray(srcPtr,srcPtr+srcSize);size=srcSize;dataBuffer.set(src,0);});var newBuffer=new Uint8Array(size);newBuffer.set(dataBuffer.subarray(0,size),0);return newBuffer;}},{key:"ExportFileAsIFC",value:function ExportFileAsIFC(modelID){Log.warn("ExportFileAsIFC is deprecated, use SaveModel instead");return this.SaveModel(modelID);}},{key:"GetGeometry",value:function GetGeometry(modelID,geometryExpressID){return this.wasmModule.GetGeometry(modelID,geometryExpressID);}},{key:"GetHeaderLine",value:function GetHeaderLine(modelID,headerType){return this.wasmModule.GetHeaderLine(modelID,headerType);}},{key:"GetAllTypesOfModel",value:function GetAllTypesOfModel(modelID){var typesNames=[];var elements=Object.keys(FromRawLineData[this.modelSchemaList[modelID]]).map(function(e){return parseInt(e);});for(var _i578=0;_i5780)typesNames.push({typeID:elements[_i578],typeName:this.wasmModule.GetNameFromTypeCode(elements[_i578])});}return typesNames;}},{key:"GetLine",value:function GetLine(modelID,expressID){var flatten=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var inverse=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var expressCheck=this.wasmModule.ValidateExpressID(modelID,expressID);if(!expressCheck){return;}var rawLineData=this.GetRawLineData(modelID,expressID);var lineData=FromRawLineData[this.modelSchemaList[modelID]][rawLineData.type](rawLineData.ID,rawLineData.arguments);if(flatten){this.FlattenLine(modelID,lineData);}var inverseData=InversePropertyDef[this.modelSchemaList[modelID]][rawLineData.type];if(inverse&&inverseData!=null){var _iterator46=_createForOfIteratorHelper(inverseData),_step46;try{for(_iterator46.s();!(_step46=_iterator46.n()).done;){var inverseProp=_step46.value;if(!inverseProp[3])lineData[inverseProp[0]]=null;else lineData[inverseProp[0]]=[];var targetTypes=[inverseProp[1]];if(typeof InheritanceDef[this.modelSchemaList[modelID]][inverseProp[1]]!="undefined"){targetTypes=targetTypes.concat(InheritanceDef[this.modelSchemaList[modelID]][inverseProp[1]]);}var inverseIDs=this.wasmModule.GetInversePropertyForItem(modelID,expressID,targetTypes,inverseProp[2],inverseProp[3]);if(!inverseProp[3]&&inverseIDs.size()>0){if(!flatten)lineData[inverseProp[0]]={type:5,value:inverseIDs.get(0)};else lineData[inverseProp[0]]=this.GetLine(modelID,inverseIDs.get(0));}else{for(var x=0;x2?_len124-2:0),_key18=2;_key18<_len124;_key18++){args[_key18-2]=arguments[_key18];}return Constructors[this.modelSchemaList[modelID]][type](-1,args);}},{key:"CreateIfcType",value:function CreateIfcType(modelID,type,value){return TypeInitialisers[this.modelSchemaList[modelID]][type](value);}},{key:"GetNameFromTypeCode",value:function GetNameFromTypeCode(type){return this.wasmModule.GetNameFromTypeCode(type);}},{key:"GetTypeCodeFromName",value:function GetTypeCodeFromName(typeName){return this.wasmModule.GetTypeCodeFromName(typeName);}},{key:"IsIfcElement",value:function IsIfcElement(type){return this.wasmModule.IsIfcElement(type);}},{key:"GetIfcEntityList",value:function GetIfcEntityList(modelID){return Object.keys(FromRawLineData[this.modelSchemaList[modelID]]).map(function(x){return parseInt(x);});}},{key:"WriteLine",value:function WriteLine(modelID,lineObject){var property;for(property in lineObject){var lineProperty=lineObject[property];if(lineProperty&&lineProperty.expressID!==void 0){this.WriteLine(modelID,lineProperty);lineObject[property]=new Handle(lineProperty.expressID);}else if(Array.isArray(lineProperty)&&lineProperty.length>0){for(var _i579=0;_i5790&&property[0].type===5){for(var _i580=0;_i5802&&arguments[2]!==undefined?arguments[2]:false;var types=[];types.push(type);if(includeInherited&&typeof InheritanceDef[this.modelSchemaList[modelID]][type]!="undefined"){types=types.concat(InheritanceDef[this.modelSchemaList[modelID]][type]);}return this.wasmModule.GetLineIDsWithType(modelID,types);}},{key:"GetAllLines",value:function GetAllLines(modelID){return this.wasmModule.GetAllLines(modelID);}},{key:"GetAllAlignments",value:function GetAllAlignments(modelID){var alignments=this.wasmModule.GetAllAlignments(modelID);var alignmentList=[];for(var _i581=0;_i5811&&arguments[1]!==undefined?arguments[1]:false;this.wasmPath=path;this.isWasmPathAbsolute=absolute;}},{key:"SetLogLevel",value:function SetLogLevel(level){Log.setLogLevel(level);this.wasmModule.SetLogLevel(level);}}]);return IfcAPI2;}();/** * Default data access strategy for {@link WebIFCLoaderPlugin}. */var WebIFCDefaultDataSource=/*#__PURE__*/function(){function WebIFCDefaultDataSource(){_classCallCheck(this,WebIFCDefaultDataSource);}/** * Gets the contents of the given IFC file in an arraybuffer. @@ -28606,9 +28610,9 @@ var isBase64=!!dataUriRegexResult[2];var data=dataUriRegexResult[3];data=window. * primitives. Only works while {@link DTX#enabled} is also ````true````. * @returns {Entity} Entity representing the model, which will have {@link Entity#isModel} set ````true```` and will be registered by {@link Entity#id} in {@link Scene#models}. */},{key:"load",value:function load(){var _this2464=this;var params=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};if(params.id&&this.viewer.scene.components[params.id]){this.error("Component with this ID already exists in viewer: "+params.id+" - will autogenerate this ID");delete params.id;}var sceneModel=new SceneModel(this.viewer.scene,utils.apply(params,{isModel:true}));if(!params.src&&!params.ifc){this.error("load() param expected: src or IFC");return sceneModel;// Return new empty model -}var options={autoNormals:true};if(params.loadMetadata!==false){var includeTypes=params.includeTypes||this._includeTypes;var excludeTypes=params.excludeTypes||this._excludeTypes;var objectDefaults=params.objectDefaults||this._objectDefaults;if(includeTypes){options.includeTypesMap={};for(var _i581=0,len=includeTypes.length;_i5810){var propertySetType="Default";var propertySetName=relatingPropertyDefinition.Name.value;var properties=[];for(var _i587=0,len=props.length;_i5870){var propertySetType="Default";var propertySetName=relatingPropertyDefinition.Name.value;var properties=[];for(var _i588=0,len=props.length;_i5880&&arguments[0]!==undefined?arguments[0]:{};if(params.id&&this.viewer.scene.components[params.id]){this.error("Component with this ID already exists in viewer: "+params.id+" - will autogenerate this ID");delete params.id;}var sceneModel=new SceneModel(this.viewer.scene,utils.apply(params,{isModel:true}));if(!params.src&&!params.las){this.error("load() param expected: src or las");return sceneModel;// Return new empty model -}var options={las:{skip:this._skip,fp64:this._fp64,colorDepth:this._colorDepth}};if(params.src){this._loadModel(params.src,params,options,sceneModel);}else{var spinner=this.viewer.scene.canvas.spinner;spinner.processes++;this._parseModel(params.las,params,options,sceneModel).then(function(){spinner.processes--;},function(errMsg){spinner.processes--;_this2469.error(errMsg);sceneModel.fire("error",errMsg);});}return sceneModel;}},{key:"_loadModel",value:function _loadModel(src,params,options,sceneModel){var _this2470=this;var spinner=this.viewer.scene.canvas.spinner;spinner.processes++;this._dataSource.getLAS(params.src,function(arrayBuffer){_this2470._parseModel(arrayBuffer,params,options,sceneModel).then(function(){spinner.processes--;},function(errMsg){spinner.processes--;_this2470.error(errMsg);sceneModel.fire("error",errMsg);});},function(errMsg){spinner.processes--;_this2470.error(errMsg);sceneModel.fire("error",errMsg);});}},{key:"_parseModel",value:function _parseModel(arrayBuffer,params,options,sceneModel){var _this2471=this;function readPositions(attributesPosition){var positionsValue=attributesPosition.value;if(params.rotateX){if(positionsValue){for(var _i590=0,len=positionsValue.length;_i590=array.length){return array;}var result=[];for(var _i594=0;_i594=array.length){return array;}var result=[];for(var _i595=0;_i5950&&arguments[0]!==undefined?arguments[0]:{};if(params.id&&this.viewer.scene.components[params.id]){this.error("Component with this ID already exists in viewer: "+params.id+" - will autogenerate this ID");delete params.id;}var sceneModel=new SceneModel(this.viewer.scene,utils.apply(params,{isModel:true,edges:true}));if(!params.src&&!params.cityJSON){this.error("load() param expected: src or cityJSON");return sceneModel;// Return new empty model }var options={};if(params.src){this._loadModel(params.src,params,options,sceneModel);}else{var spinner=this.viewer.scene.canvas.spinner;spinner.processes++;this._parseModel(params.cityJSON,params,options,sceneModel);spinner.processes--;}return sceneModel;}},{key:"_loadModel",value:function _loadModel(src,params,options,sceneModel){var _this2473=this;var spinner=this.viewer.scene.canvas.spinner;spinner.processes++;this._dataSource.getCityJSON(params.src,function(data){_this2473._parseModel(data,params,options,sceneModel);spinner.processes--;},function(errMsg){spinner.processes--;_this2473.error(errMsg);sceneModel.fire("error",errMsg);});}},{key:"_parseModel",value:function _parseModel(data,params,options,sceneModel){if(sceneModel.destroyed){return;}var vertices=data.transform?this._transformVertices(data.vertices,data.transform,options.rotateX):data.vertices;var stats=params.stats||{};stats.sourceFormat=data.type||"CityJSON";stats.schemaVersion=data.version||"";stats.title="";stats.author="";stats.created="";stats.numMetaObjects=0;stats.numPropertySets=0;stats.numObjects=0;stats.numGeometries=0;stats.numTriangles=0;stats.numVertices=0;var loadMetadata=params.loadMetadata!==false;var rootMetaObject=loadMetadata?{id:math.createUUID(),name:"Model",type:"Model"}:null;var metadata=loadMetadata?{id:"",projectId:"",author:"",createdAt:"",schema:data.version||"",creatingApplication:"",metaObjects:[rootMetaObject],propertySets:[]}:null;var ctx={data:data,vertices:vertices,sceneModel:sceneModel,loadMetadata:loadMetadata,metadata:metadata,rootMetaObject:rootMetaObject,nextId:0,stats:stats};this._parseCityJSON(ctx);sceneModel.finalize();if(loadMetadata){var metaModelId=sceneModel.id;this.viewer.metaScene.createMetaModel(metaModelId,ctx.metadata,options);}sceneModel.scene.once("tick",function(){if(sceneModel.destroyed){return;}sceneModel.scene.fire("modelLoaded",sceneModel.id);// FIXME: Assumes listeners know order of these two events sceneModel.fire("loaded",true,false);// Don't forget the event, for late subscribers -});}},{key:"_transformVertices",value:function _transformVertices(vertices,transform,rotateX){var transformedVertices=[];var scale=transform.scale||math.vec3([1,1,1]);var translate=transform.translate||math.vec3([0,0,0]);for(var _i595=0,j=0;_i5950)){return;}var meshIds=[];for(var _i596=0,len=cityObject.geometry.length;_i5960){var themeId=themeIds[0];var theme=geometryMaterial[themeId];if(theme.value!==undefined){objectMaterial=materials[theme.value];}else{var values=theme.values;if(values){surfaceMaterials=[];for(var j=0,lenj=values.length;j0){sceneModel.createEntity({id:objectId,meshIds:meshIds,isObject:true});ctx.stats.numObjects++;}}},{key:"_parseGeometrySurfacesWithOwnMaterials",value:function _parseGeometrySurfacesWithOwnMaterials(ctx,geometry,surfaceMaterials,meshIds){var geomType=geometry.type;switch(geomType){case"MultiPoint":break;case"MultiLineString":break;case"MultiSurface":case"CompositeSurface":var surfaces=geometry.boundaries;this._parseSurfacesWithOwnMaterials(ctx,surfaceMaterials,surfaces,meshIds);break;case"Solid":var shells=geometry.boundaries;for(var j=0;j0){holes.push(face.length);}var newFace=this._extractLocalIndices(ctx,surface[j],sharedIndices,geometryCfg);face.push.apply(face,_toConsumableArray(newFace));}if(face.length===3){// Triangle +});}},{key:"_transformVertices",value:function _transformVertices(vertices,transform,rotateX){var transformedVertices=[];var scale=transform.scale||math.vec3([1,1,1]);var translate=transform.translate||math.vec3([0,0,0]);for(var _i596=0,j=0;_i5960)){return;}var meshIds=[];for(var _i597=0,len=cityObject.geometry.length;_i5970){var themeId=themeIds[0];var theme=geometryMaterial[themeId];if(theme.value!==undefined){objectMaterial=materials[theme.value];}else{var values=theme.values;if(values){surfaceMaterials=[];for(var j=0,lenj=values.length;j0){sceneModel.createEntity({id:objectId,meshIds:meshIds,isObject:true});ctx.stats.numObjects++;}}},{key:"_parseGeometrySurfacesWithOwnMaterials",value:function _parseGeometrySurfacesWithOwnMaterials(ctx,geometry,surfaceMaterials,meshIds){var geomType=geometry.type;switch(geomType){case"MultiPoint":break;case"MultiLineString":break;case"MultiSurface":case"CompositeSurface":var surfaces=geometry.boundaries;this._parseSurfacesWithOwnMaterials(ctx,surfaceMaterials,surfaces,meshIds);break;case"Solid":var shells=geometry.boundaries;for(var j=0;j0){holes.push(face.length);}var newFace=this._extractLocalIndices(ctx,surface[j],sharedIndices,geometryCfg);face.push.apply(face,_toConsumableArray(newFace));}if(face.length===3){// Triangle geometryCfg.indices.push(face[0]);geometryCfg.indices.push(face[1]);geometryCfg.indices.push(face[2]);}else if(face.length>3){// Polygon // Prepare to triangulate var pList=[];for(var k=0;k0&&geometryCfg.indices.length>0){var meshId=""+ctx.nextId++;sceneModel.createMesh({id:meshId,primitive:"triangles",positions:geometryCfg.positions,indices:geometryCfg.indices,color:objectMaterial&&objectMaterial.diffuseColor?objectMaterial.diffuseColor:[0.8,0.8,0.8],opacity:1.0//opacity: (objectMaterial && objectMaterial.transparency !== undefined) ? (1.0 - objectMaterial.transparency) : 1.0 -});meshIds.push(meshId);ctx.stats.numGeometries++;ctx.stats.numVertices+=geometryCfg.positions.length/3;ctx.stats.numTriangles+=geometryCfg.indices.length/3;}}},{key:"_parseSurfacesWithSharedMaterial",value:function _parseSurfacesWithSharedMaterial(ctx,surfaces,sharedIndices,primitiveCfg){var vertices=ctx.vertices;for(var _i598=0;_i5980){holes.push(boundary.length);}var newBoundary=this._extractLocalIndices(ctx,surfaces[_i598][j],sharedIndices,primitiveCfg);boundary.push.apply(boundary,_toConsumableArray(newBoundary));}if(boundary.length===3){// Triangle +});meshIds.push(meshId);ctx.stats.numGeometries++;ctx.stats.numVertices+=geometryCfg.positions.length/3;ctx.stats.numTriangles+=geometryCfg.indices.length/3;}}},{key:"_parseSurfacesWithSharedMaterial",value:function _parseSurfacesWithSharedMaterial(ctx,surfaces,sharedIndices,primitiveCfg){var vertices=ctx.vertices;for(var _i599=0;_i5990){holes.push(boundary.length);}var newBoundary=this._extractLocalIndices(ctx,surfaces[_i599][j],sharedIndices,primitiveCfg);boundary.push.apply(boundary,_toConsumableArray(newBoundary));}if(boundary.length===3){// Triangle primitiveCfg.indices.push(boundary[0]);primitiveCfg.indices.push(boundary[1]);primitiveCfg.indices.push(boundary[2]);}else if(boundary.length>3){// Polygon -var pList=[];for(var k=0;kr,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new a(e||2),vec3:e=>new a(e||3),vec4:e=>new a(e||4),mat3:e=>new a(e||9),mat3ToMat4:(e,t=new a(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new a(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const n=new a(2);for(let i=0,r=e.length;i{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&n|128]}${e[n>>8&255]}-${e[n>>16&255]}${e[n>>24&255]}${e[255&i]}${e[i>>8&255]}${e[i>>16&255]}${e[i>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new a(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],n=e[1],i=e[2],r=t[0],a=t[1],o=t[2];return[n*o-i*a,i*r-s*o,s*a-n*r,0]},cross3Vec3(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=t[0],o=t[1],l=t[2];return s[0]=i*l-r*o,s[1]=r*a-n*l,s[2]=n*o-i*a,s},sqLenVec4:e=>h.dotVec4(e,e),lenVec4:e=>Math.sqrt(h.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>h.dotVec3(e,e),sqLenVec2:e=>h.dotVec2(e,e),lenVec3:e=>Math.sqrt(h.sqLenVec3(e)),distVec3:(()=>{const e=new a(3);return(t,s)=>h.lenVec3(h.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(h.sqLenVec2(e)),distVec2:(()=>{const e=new a(2);return(t,s)=>h.lenVec2(h.subVec2(t,s,e))})(),rcpVec3:(e,t)=>h.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/h.lenVec4(e);return h.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/h.lenVec3(e);return h.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/h.lenVec2(e);return h.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=h.dotVec3(e,t)/Math.sqrt(h.sqLenVec3(e)*h.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new a(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=h.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=h.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=h.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,n=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||h.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>h.m4s(0),setMat4ToOnes:()=>h.m4s(1),diagonalMat4v:e=>new a([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,n)=>h.diagonalMat4v([e,t,s,n]),diagonalMat4s:e=>h.diagonalMat4c(e,e,e,e),identityMat4:(e=new a(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new a(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>h.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=e[9],d=e[10],A=e[11],f=e[12],I=e[13],m=e[14],y=e[15],v=t[0],w=t[1],g=t[2],E=t[3],T=t[4],b=t[5],D=t[6],P=t[7],C=t[8],_=t[9],R=t[10],B=t[11],O=t[12],S=t[13],N=t[14],x=t[15];return s[0]=v*n+w*o+g*h+E*f,s[1]=v*i+w*l+g*p+E*I,s[2]=v*r+w*c+g*d+E*m,s[3]=v*a+w*u+g*A+E*y,s[4]=T*n+b*o+D*h+P*f,s[5]=T*i+b*l+D*p+P*I,s[6]=T*r+b*c+D*d+P*m,s[7]=T*a+b*u+D*A+P*y,s[8]=C*n+_*o+R*h+B*f,s[9]=C*i+_*l+R*p+B*I,s[10]=C*r+_*c+R*d+B*m,s[11]=C*a+_*u+R*A+B*y,s[12]=O*n+S*o+N*h+x*f,s[13]=O*i+S*l+N*p+x*I,s[14]=O*r+S*c+N*d+x*m,s[15]=O*a+S*u+N*A+x*y,s},mulMat3(e,t,s){s||(s=new a(9));const n=e[0],i=e[3],r=e[6],o=e[1],l=e[4],c=e[7],u=e[2],h=e[5],p=e[8],d=t[0],A=t[3],f=t[6],I=t[1],m=t[4],y=t[7],v=t[2],w=t[5],g=t[8];return s[0]=n*d+i*I+r*v,s[3]=n*A+i*m+r*w,s[6]=n*f+i*y+r*g,s[1]=o*d+l*I+c*v,s[4]=o*A+l*m+c*w,s[7]=o*f+l*y+c*g,s[2]=u*d+h*I+p*v,s[5]=u*A+h*m+p*w,s[8]=u*f+h*y+p*g,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=h.vec4()){const n=t[0],i=t[1],r=t[2],a=t[3];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12]*a,s[1]=e[1]*n+e[5]*i+e[9]*r+e[13]*a,s[2]=e[2]*n+e[6]*i+e[10]*r+e[14]*a,s[3]=e[3]*n+e[7]*i+e[11]*r+e[15]*a,s},transposeMat4(e,t){const s=e[4],n=e[14],i=e[8],r=e[13],a=e[12],o=e[9];if(!t||e===t){const t=e[1],l=e[2],c=e[3],u=e[6],h=e[7],p=e[11];return e[1]=s,e[2]=i,e[3]=a,e[4]=t,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[11]=n,e[12]=c,e[13]=h,e[14]=p,e}return t[0]=e[0],t[1]=s,t[2]=i,t[3]=a,t[4]=e[1],t[5]=e[5],t[6]=o,t[7]=r,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=n,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],n=e[2],i=e[3],r=e[4],a=e[5],o=e[6],l=e[7],c=e[8],u=e[9],h=e[10],p=e[11],d=e[12],A=e[13],f=e[14],I=e[15];return d*u*o*i-c*A*o*i-d*a*h*i+r*A*h*i+c*a*f*i-r*u*f*i-d*u*n*l+c*A*n*l+d*s*h*l-t*A*h*l-c*s*f*l+t*u*f*l+d*a*n*p-r*A*n*p-d*s*o*p+t*A*o*p+r*s*f*p-t*a*f*p-c*a*n*I+r*u*n*I+c*s*o*I-t*u*o*I-r*s*h*I+t*a*h*I},inverseMat4(e,t){t||(t=e);const s=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=e[9],p=e[10],d=e[11],A=e[12],f=e[13],I=e[14],m=e[15],y=s*o-n*a,v=s*l-i*a,w=s*c-r*a,g=n*l-i*o,E=n*c-r*o,T=i*c-r*l,b=u*f-h*A,D=u*I-p*A,P=u*m-d*A,C=h*I-p*f,_=h*m-d*f,R=p*m-d*I,B=1/(y*R-v*_+w*C+g*P-E*D+T*b);return t[0]=(o*R-l*_+c*C)*B,t[1]=(-n*R+i*_-r*C)*B,t[2]=(f*T-I*E+m*g)*B,t[3]=(-h*T+p*E-d*g)*B,t[4]=(-a*R+l*P-c*D)*B,t[5]=(s*R-i*P+r*D)*B,t[6]=(-A*T+I*w-m*v)*B,t[7]=(u*T-p*w+d*v)*B,t[8]=(a*_-o*P+c*b)*B,t[9]=(-s*_+n*P-r*b)*B,t[10]=(A*E-f*w+m*y)*B,t[11]=(-u*E+h*w-d*y)*B,t[12]=(-a*C+o*D-l*b)*B,t[13]=(s*C-n*D+i*b)*B,t[14]=(-A*g+f*v-I*y)*B,t[15]=(u*g-h*v+p*y)*B,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||h.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||h.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new a(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,h.translationMat4v(e,i))})(),translationMat4s:(e,t)=>h.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>h.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,n){const i=n[3];n[0]+=i*e,n[1]+=i*t,n[2]+=i*s;const r=n[7];n[4]+=r*e,n[5]+=r*t,n[6]+=r*s;const a=n[11];n[8]+=a*e,n[9]+=a*t,n[10]+=a*s;const o=n[15];return n[12]+=o*e,n[13]+=o*t,n[14]+=o*s,n},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const n=h.normalizeVec4([t[0],t[1],t[2],0],[]),i=Math.sin(e),r=Math.cos(e),a=1-r,o=n[0],l=n[1],c=n[2];let u,p,d,A,f,I;return u=o*l,p=l*c,d=c*o,A=o*i,f=l*i,I=c*i,(s=s||h.mat4())[0]=a*o*o+r,s[1]=a*u+I,s[2]=a*d-f,s[3]=0,s[4]=a*u-I,s[5]=a*l*l+r,s[6]=a*p+A,s[7]=0,s[8]=a*d+f,s[9]=a*p-A,s[10]=a*c*c+r,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,n,i)=>h.rotationMat4v(e,[t,s,n],i),scalingMat4v:(e,t=h.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=h.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new a(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,h.scalingMat4v(e,i))})(),scaleMat4c:(e,t,s,n)=>(n[0]*=e,n[4]*=t,n[8]*=s,n[1]*=e,n[5]*=t,n[9]*=s,n[2]*=e,n[6]*=t,n[10]*=s,n[3]*=e,n[7]*=t,n[11]*=s,n),scaleMat4v(e,t){const s=e[0],n=e[1],i=e[2];return t[0]*=s,t[4]*=n,t[8]*=i,t[1]*=s,t[5]*=n,t[9]*=i,t[2]*=s,t[6]*=n,t[10]*=i,t[3]*=s,t[7]*=n,t[11]*=i,t},scalingMat4s:e=>h.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=h.mat4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=n+n,l=i+i,c=r+r,u=n*o,p=n*l,d=n*c,A=i*l,f=i*c,I=r*c,m=a*o,y=a*l,v=a*c;return s[0]=1-(A+I),s[1]=p+v,s[2]=d-y,s[3]=0,s[4]=p-v,s[5]=1-(u+I),s[6]=f+m,s[7]=0,s[8]=d+y,s[9]=f-m,s[10]=1-(u+A),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=h.vec4()){const n=h.clamp,i=e[0],r=e[4],a=e[8],o=e[1],l=e[5],c=e[9],u=e[2],p=e[6],d=e[10];return"XYZ"===t?(s[1]=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-c,d),s[2]=Math.atan2(-r,i)):(s[0]=Math.atan2(p,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(s[1]=Math.atan2(a,d),s[2]=Math.atan2(o,l)):(s[1]=Math.atan2(-u,i),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(n(p,-1,1)),Math.abs(p)<.99999?(s[1]=Math.atan2(-u,d),s[2]=Math.atan2(-r,l)):(s[1]=0,s[2]=Math.atan2(o,i))):"ZYX"===t?(s[1]=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(s[0]=Math.atan2(p,d),s[2]=Math.atan2(o,i)):(s[0]=0,s[2]=Math.atan2(-r,l))):"YZX"===t?(s[2]=Math.asin(n(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(-c,l),s[1]=Math.atan2(-u,i)):(s[0]=0,s[1]=Math.atan2(a,d))):"XZY"===t&&(s[2]=Math.asin(-n(r,-1,1)),Math.abs(r)<.99999?(s[0]=Math.atan2(p,l),s[1]=Math.atan2(a,i)):(s[0]=Math.atan2(-c,d),s[1]=0)),s},composeMat4:(e,t,s,n=h.mat4())=>(h.quaternionToRotationMat4(t,n),h.scaleMat4v(s,n),h.translateMat4v(e,n),n),decomposeMat4:(()=>{const e=new a(3),t=new a(16);return function(s,n,i,r){e[0]=s[0],e[1]=s[1],e[2]=s[2];let a=h.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const o=h.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=h.lenVec3(e);h.determinantMat4(s)<0&&(a=-a),n[0]=s[12],n[1]=s[13],n[2]=s[14],t.set(s);const c=1/a,u=1/o,p=1/l;return t[0]*=c,t[1]*=c,t[2]*=c,t[4]*=u,t[5]*=u,t[6]*=u,t[8]*=p,t[9]*=p,t[10]*=p,h.mat4ToQuaternion(t,i),r[0]=a,r[1]=o,r[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,n){n||(n=h.mat4());const i=e[0],r=e[1],a=e[2],o=s[0],l=s[1],c=s[2],u=t[0],p=t[1],d=t[2];if(i===u&&r===p&&a===d)return h.identityMat4();let A,f,I,m,y,v,w,g,E,T;return A=i-u,f=r-p,I=a-d,T=1/Math.sqrt(A*A+f*f+I*I),A*=T,f*=T,I*=T,m=l*I-c*f,y=c*A-o*I,v=o*f-l*A,T=Math.sqrt(m*m+y*y+v*v),T?(T=1/T,m*=T,y*=T,v*=T):(m=0,y=0,v=0),w=f*v-I*y,g=I*m-A*v,E=A*y-f*m,T=Math.sqrt(w*w+g*g+E*E),T?(T=1/T,w*=T,g*=T,E*=T):(w=0,g=0,E=0),n[0]=m,n[1]=w,n[2]=A,n[3]=0,n[4]=y,n[5]=g,n[6]=f,n[7]=0,n[8]=v,n[9]=E,n[10]=I,n[11]=0,n[12]=-(m*i+y*r+v*a),n[13]=-(w*i+g*r+E*a),n[14]=-(A*i+f*r+I*a),n[15]=1,n},lookAtMat4c:(e,t,s,n,i,r,a,o,l)=>h.lookAtMat4v([e,t,s],[n,i,r],[a,o,l],[]),orthoMat4c(e,t,s,n,i,r,a){a||(a=h.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=-2/c,a[11]=0,a[12]=-(e+t)/o,a[13]=-(n+s)/l,a[14]=-(r+i)/c,a[15]=1,a},frustumMat4v(e,t,s){s||(s=h.mat4());const n=[e[0],e[1],e[2],0],i=[t[0],t[1],t[2],0];h.addVec4(i,n,l),h.subVec4(i,n,c);const r=2*n[2],a=c[0],o=c[1],u=c[2];return s[0]=r/a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r/o,s[6]=0,s[7]=0,s[8]=l[0]/a,s[9]=l[1]/o,s[10]=-l[2]/u,s[11]=-1,s[12]=0,s[13]=0,s[14]=-r*i[2]/u,s[15]=0,s},frustumMat4(e,t,s,n,i,r,a){a||(a=h.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2*i/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*i/l,a[6]=0,a[7]=0,a[8]=(t+e)/o,a[9]=(n+s)/l,a[10]=-(r+i)/c,a[11]=-1,a[12]=0,a[13]=0,a[14]=-r*i*2/c,a[15]=0,a},perspectiveMat4(e,t,s,n,i){const r=[],a=[];return r[2]=s,a[2]=n,a[1]=r[2]*Math.tan(e/2),r[1]=-a[1],a[0]=a[1]*t,r[0]=-a[0],h.frustumMat4v(r,a,i)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=h.vec3()){const n=t[0],i=t[1],r=t[2];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12],s[1]=e[1]*n+e[5]*i+e[9]*r+e[13],s[2]=e[2]*n+e[6]*i+e[10]*r+e[14],s},transformPoint4:(e,t,s=h.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const n=s||[],i=t.length;let r,a,o,l;const c=e[0],u=e[1],h=e[2],p=e[3],d=e[4],A=e[5],f=e[6],I=e[7],m=e[8],y=e[9],v=e[10],w=e[11],g=e[12],E=e[13],T=e[14],b=e[15];let D;for(let e=0;e{const e=new a(16),t=new a(16),s=new a(16);return function(n,i,r,a){return this.transformVec3(this.mulMat4(this.inverseMat4(i,e),this.inverseMat4(r,t),s),n,a)}})(),lerpVec3(e,t,s,n,i,r){const a=r||h.vec3(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a},lerpMat4(e,t,s,n,i,r){const a=r||h.mat4(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a[3]=n[3]+o*(i[3]-n[3]),a[4]=n[4]+o*(i[4]-n[4]),a[5]=n[5]+o*(i[5]-n[5]),a[6]=n[6]+o*(i[6]-n[6]),a[7]=n[7]+o*(i[7]-n[7]),a[8]=n[8]+o*(i[8]-n[8]),a[9]=n[9]+o*(i[9]-n[9]),a[10]=n[10]+o*(i[10]-n[10]),a[11]=n[11]+o*(i[11]-n[11]),a[12]=n[12]+o*(i[12]-n[12]),a[13]=n[13]+o*(i[13]-n[13]),a[14]=n[14]+o*(i[14]-n[14]),a[15]=n[15]+o*(i[15]-n[15]),a},flatten(e){const t=[];let s,n,i,r,a;for(s=0,n=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=h.vec4()){const n=e[0]*h.DEGTORAD/2,i=e[1]*h.DEGTORAD/2,r=e[2]*h.DEGTORAD/2,a=Math.cos(n),o=Math.cos(i),l=Math.cos(r),c=Math.sin(n),u=Math.sin(i),p=Math.sin(r);return"XYZ"===t?(s[0]=c*o*l+a*u*p,s[1]=a*u*l-c*o*p,s[2]=a*o*p+c*u*l,s[3]=a*o*l-c*u*p):"YXZ"===t?(s[0]=c*o*l+a*u*p,s[1]=a*u*l-c*o*p,s[2]=a*o*p-c*u*l,s[3]=a*o*l+c*u*p):"ZXY"===t?(s[0]=c*o*l-a*u*p,s[1]=a*u*l+c*o*p,s[2]=a*o*p+c*u*l,s[3]=a*o*l-c*u*p):"ZYX"===t?(s[0]=c*o*l-a*u*p,s[1]=a*u*l+c*o*p,s[2]=a*o*p-c*u*l,s[3]=a*o*l+c*u*p):"YZX"===t?(s[0]=c*o*l+a*u*p,s[1]=a*u*l+c*o*p,s[2]=a*o*p-c*u*l,s[3]=a*o*l-c*u*p):"XZY"===t&&(s[0]=c*o*l-a*u*p,s[1]=a*u*l-c*o*p,s[2]=a*o*p+c*u*l,s[3]=a*o*l+c*u*p),s},mat4ToQuaternion(e,t=h.vec4()){const s=e[0],n=e[4],i=e[8],r=e[1],a=e[5],o=e[9],l=e[2],c=e[6],u=e[10];let p;const d=s+a+u;return d>0?(p=.5/Math.sqrt(d+1),t[3]=.25/p,t[0]=(c-o)*p,t[1]=(i-l)*p,t[2]=(r-n)*p):s>a&&s>u?(p=2*Math.sqrt(1+s-a-u),t[3]=(c-o)/p,t[0]=.25*p,t[1]=(n+r)/p,t[2]=(i+l)/p):a>u?(p=2*Math.sqrt(1+a-s-u),t[3]=(i-l)/p,t[0]=(n+r)/p,t[1]=.25*p,t[2]=(o+c)/p):(p=2*Math.sqrt(1+u-s-a),t[3]=(r-n)/p,t[0]=(i+l)/p,t[1]=(o+c)/p,t[2]=.25*p),t},vec3PairToQuaternion(e,t,s=h.vec4()){const n=Math.sqrt(h.dotVec3(e,e)*h.dotVec3(t,t));let i=n+h.dotVec3(e,t);return i<1e-8*n?(i=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):h.cross3Vec3(e,t,s),s[3]=i,h.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=h.vec4()){const s=e[3]/2,n=Math.sin(s);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new a(16);return(t,s,n)=>(n=n||h.vec3(),h.quaternionToRotationMat4(t,e),h.mat4ToEuler(e,s,n),n)})(),mulQuaternions(e,t,s=h.vec4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=t[0],l=t[1],c=t[2],u=t[3];return s[0]=a*o+n*u+i*c-r*l,s[1]=a*l+i*u+r*o-n*c,s[2]=a*c+r*u+n*l-i*o,s[3]=a*u-n*o-i*l-r*c,s},vec3ApplyQuaternion(e,t,s=h.vec3()){const n=t[0],i=t[1],r=t[2],a=e[0],o=e[1],l=e[2],c=e[3],u=c*n+o*r-l*i,p=c*i+l*n-a*r,d=c*r+a*i-o*n,A=-a*n-o*i-l*r;return s[0]=u*c+A*-a+p*-l-d*-o,s[1]=p*c+A*-o+d*-a-u*-l,s[2]=d*c+A*-l+u*-o-p*-a,s},quaternionToMat4(e,t){t=h.identityMat4(t);const s=e[0],n=e[1],i=e[2],r=e[3],a=2*s,o=2*n,l=2*i,c=a*r,u=o*r,p=l*r,d=a*s,A=o*s,f=l*s,I=o*n,m=l*n,y=l*i;return t[0]=1-(I+y),t[1]=A+p,t[2]=f-u,t[4]=A-p,t[5]=1-(d+y),t[6]=m+c,t[8]=f+u,t[9]=m-c,t[10]=1-(d+I),t},quaternionToRotationMat4(e,t){const s=e[0],n=e[1],i=e[2],r=e[3],a=s+s,o=n+n,l=i+i,c=s*a,u=s*o,h=s*l,p=n*o,d=n*l,A=i*l,f=r*a,I=r*o,m=r*l;return t[0]=1-(p+A),t[4]=u-m,t[8]=h+I,t[1]=u+m,t[5]=1-(c+A),t[9]=d-f,t[2]=h-I,t[6]=d+f,t[10]=1-(c+p),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=h.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>h.normalizeQuaternion(h.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=h.vec4()){const s=(e=h.normalizeQuaternion(e,u))[3],n=2*Math.acos(s),i=Math.sqrt(1-s*s);return i<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i),t[3]=n,t},AABB3:e=>new a(e||6),AABB2:e=>new a(e||4),OBB3:e=>new a(e||32),OBB2:e=>new a(e||16),Sphere3:(e,t,s,n)=>new a([e,t,s,n]),transformOBB3(e,t,s=t){let n;const i=t.length;let r,a,o;const l=e[0],c=e[1],u=e[2],h=e[3],p=e[4],d=e[5],A=e[6],f=e[7],I=e[8],m=e[9],y=e[10],v=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;n{const e=new a(3),t=new a(3),s=new a(3);return n=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5],h.subVec3(t,e,s),Math.abs(h.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new a(3),t=new a(3),s=new a(3);return(n,i)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5];const r=h.subVec3(t,e,s),a=i[0]-n[0],o=n[3]-i[0],l=i[1]-n[1],c=n[4]-i[1],u=i[2]-n[2],p=n[5]-i[2];return r[0]+=a>o?a:o,r[1]+=l>c?l:c,r[2]+=u>p?u:p,Math.abs(h.lenVec3(r))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||h.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||h.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=h.AABB3())=>(e[0]=h.MAX_DOUBLE,e[1]=h.MAX_DOUBLE,e[2]=h.MAX_DOUBLE,e[3]=h.MIN_DOUBLE,e[4]=h.MIN_DOUBLE,e[5]=h.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=h.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new a(3);return(t,s,n)=>{s=s||h.AABB3();let i,r,a,o=h.MAX_DOUBLE,l=h.MAX_DOUBLE,c=h.MAX_DOUBLE,u=h.MIN_DOUBLE,p=h.MIN_DOUBLE,d=h.MIN_DOUBLE;for(let s=0,A=t.length;su&&(u=i),r>p&&(p=r),a>d&&(d=a);return s[0]=o,s[1]=l,s[2]=c,s[3]=u,s[4]=p,s[5]=d,s}})(),OBB3ToAABB3(e,t=h.AABB3()){let s,n,i,r=h.MAX_DOUBLE,a=h.MAX_DOUBLE,o=h.MAX_DOUBLE,l=h.MIN_DOUBLE,c=h.MIN_DOUBLE,u=h.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToAABB3(e,t=h.AABB3()){let s,n,i,r=h.MAX_DOUBLE,a=h.MAX_DOUBLE,o=h.MAX_DOUBLE,l=h.MIN_DOUBLE,c=h.MIN_DOUBLE,u=h.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToSphere3:(()=>{const e=new a(3);return(t,s)=>{s=s||h.vec4();let n,i=0,r=0,a=0;const o=t.length;for(n=0;nc&&(c=l);return s[3]=c,s}})(),positions3ToSphere3:(()=>{const e=new a(3),t=new a(3);return(s,n)=>{n=n||h.vec4();let i,r=0,a=0,o=0;const l=s.length;let c=0;for(i=0;ic&&(c=p);return n[3]=c,n}})(),OBB3ToSphere3:(()=>{const e=new a(3),t=new a(3);return(s,n)=>{n=n||h.vec4();let i,r=0,a=0,o=0;const l=s.length,c=l/4;for(i=0;ip&&(p=u);return n[3]=p,n}})(),getSphere3Center:(e,t=h.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=h.vec3()){let s=0,n=0,i=0;for(var r=0,a=e.length;r(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>n&&(e[1]=n),e[2]>i&&(e[2]=i),e[3](e[0]=h.MAX_DOUBLE,e[1]=h.MAX_DOUBLE,e[2]=h.MIN_DOUBLE,e[3]=h.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(n=e[0]*s[0],i=e[0]*s[3]):(n=e[0]*s[3],i=e[0]*s[0]),e[1]>0?(n+=e[1]*s[1],i+=e[1]*s[4]):(n+=e[1]*s[4],i+=e[1]*s[1]),e[2]>0?(n+=e[2]*s[2],i+=e[2]*s[5]):(n+=e[2]*s[5],i+=e[2]*s[2]);if(n<=-t&&i<=-t)return-1;return n>=-t&&i>=-t?1:0},OBB3ToAABB2(e,t=h.AABB2()){let s,n,i,r,a=h.MAX_DOUBLE,o=h.MAX_DOUBLE,l=h.MIN_DOUBLE,c=h.MIN_DOUBLE;for(let t=0,u=e.length;tl&&(l=s),n>c&&(c=n);return t[0]=a,t[1]=o,t[2]=l,t[3]=c,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(n-s),tangentQuadraticBezier3:(e,t,s,n,i)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*n*(1-e)-3*e*e*n+3*e*e*i,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,n,i){const r=.5*(s-e),a=.5*(n-t),o=i*i;return(2*t-2*s+r+a)*(i*o)+(-3*t+3*s-2*r-a)*o+r*i+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,n){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,n)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,n,i){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,n)+this.b3p3(e,i)},triangleNormal(e,t,s,n=h.vec3()){const i=t[0]-e[0],r=t[1]-e[1],a=t[2]-e[2],o=s[0]-e[0],l=s[1]-e[1],c=s[2]-e[2],u=r*c-a*l,p=a*o-i*c,d=i*l-r*o,A=Math.sqrt(u*u+p*p+d*d);return 0===A?(n[0]=0,n[1]=0,n[2]=0):(n[0]=u/A,n[1]=p/A,n[2]=d/A),n},rayTriangleIntersect:(()=>{const e=new a(3),t=new a(3),s=new a(3),n=new a(3),i=new a(3);return(r,a,o,l,c,u)=>{u=u||h.vec3();const p=h.subVec3(l,o,e),d=h.subVec3(c,o,t),A=h.cross3Vec3(a,d,s),f=h.dotVec3(p,A);if(f<1e-6)return null;const I=h.subVec3(r,o,n),m=h.dotVec3(I,A);if(m<0||m>f)return null;const y=h.cross3Vec3(I,p,i),v=h.dotVec3(a,y);if(v<0||m+v>f)return null;const w=h.dotVec3(d,y)/f;return u[0]=r[0]+w*a[0],u[1]=r[1]+w*a[1],u[2]=r[2]+w*a[2],u}})(),rayPlaneIntersect:(()=>{const e=new a(3),t=new a(3),s=new a(3),n=new a(3);return(i,r,a,o,l,c)=>{c=c||h.vec3(),r=h.normalizeVec3(r,e);const u=h.subVec3(o,a,t),p=h.subVec3(l,a,s),d=h.cross3Vec3(u,p,n);h.normalizeVec3(d,d);const A=-h.dotVec3(a,d),f=-(h.dotVec3(i,d)+A)/h.dotVec3(r,d);return c[0]=i[0]+f*r[0],c[1]=i[1]+f*r[1],c[2]=i[2]+f*r[2],c}})(),cartesianToBarycentric:(()=>{const e=new a(3),t=new a(3),s=new a(3);return(n,i,r,a,o)=>{const l=h.subVec3(a,i,e),c=h.subVec3(r,i,t),u=h.subVec3(n,i,s),p=h.dotVec3(l,l),d=h.dotVec3(l,c),A=h.dotVec3(l,u),f=h.dotVec3(c,c),I=h.dotVec3(c,u),m=p*f-d*d;if(0===m)return null;const y=1/m,v=(f*A-d*I)*y,w=(p*I-d*A)*y;return o[0]=1-v-w,o[1]=w,o[2]=v,o}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,n,i=h.vec3()){const r=e[0],a=e[1],o=e[2];return i[0]=t[0]*r+s[0]*a+n[0]*o,i[1]=t[1]*r+s[1]*a+n[1]*o,i[2]=t[2]*r+s[2]*a+n[2]*o,i},mergeVertices(e,t,s,n){const i={},r=[],a=[],o=t?[]:null,l=s?[]:null,c=[];let u,h,p,d;const A=1e4;let f,I,m=0;for(f=0,I=e.length;f{const e=new a(3),t=new a(3),s=new a(3),n=new a(3),i=new a(3),r=new a(3);return(a,o,l)=>{let c,u;const p=new Array(a.length/3);let d,A,f,I,m,y,v;for(c=0,u=o.length;c{const e=new a(3),t=new a(3),s=new a(3),n=new a(3),i=new a(3),r=new a(3),o=new a(3);return(a,l,c)=>{const u=new Float32Array(a.length);for(let p=0;p>24&255,u=p>>16&255,c=p>>8&255,l=255&p,o=t[s],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+1],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+2],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,p++;return{positions:i,colors:r}},faceToVertexNormals(e,t,s={}){const n=s.smoothNormalsAngleThreshold||20,i={},r=[],a={};let o,l,c,u,p;const d=1e4;let A,f,I,m,y,v;for(f=0,m=e.length;f{const e=new a(4),t=new a(4);return(s,n,i,r,a)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=1,h.transformVec4(s,e,t),r[0]=t[0],r[1]=t[1],r[2]=t[2],e[0]=i[0],e[1]=i[1],e[2]=i[2],h.transformVec3(s,e,t),h.normalizeVec3(t),a[0]=t[0],a[1]=t[1],a[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new a(16),t=new a(16),s=new a(4),n=new a(4),i=new a(4),r=new a(4);return(a,o,l,c,u,p)=>{const d=h.mulMat4(l,o,e),A=h.inverseMat4(d,t),f=a.width,I=a.height,m=(c[0]-f/2)/(f/2),y=-(c[1]-I/2)/(I/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,h.transformVec4(A,s,n),h.mulVec4Scalar(n,1/n[3]),i[0]=m,i[1]=y,i[2]=1,i[3]=1,h.transformVec4(A,i,r),h.mulVec4Scalar(r,1/r[3]),u[0]=r[0],u[1]=r[1],u[2]=r[2],h.subVec3(r,n,p),h.normalizeVec3(p)}})(),canvasPosToLocalRay:(()=>{const e=new a(3),t=new a(3);return(s,n,i,r,a,o,l)=>{h.canvasPosToWorldRay(s,n,i,a,e,t),h.worldRayToLocalRay(r,e,t,o,l)}})(),worldRayToLocalRay:(()=>{const e=new a(16),t=new a(4),s=new a(4);return(n,i,r,a,o)=>{const l=h.inverseMat4(n,e);t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,h.transformVec4(l,t,s),a[0]=s[0],a[1]=s[1],a[2]=s[2],h.transformVec3(l,r,o)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,n,i,r){const o=new a(6),l={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:o};let c,u;for(o[0]=o[1]=o[2]=Number.POSITIVE_INFINITY,o[3]=o[4]=o[5]=Number.NEGATIVE_INFINITY,c=0,u=s.length;co[3]&&(o[3]=i[t]),i[t+1]o[4]&&(o[4]=i[t+1]),i[t+2]o[5]&&(o[5]=i[t+2])}}if(s.length<20||r>10)return l.triangles=s,l.leaf=!0,l;e[0]=o[3]-o[0],e[1]=o[4]-o[1],e[2]=o[5]-o[2];let p=0;e[1]>e[p]&&(p=1),e[2]>e[p]&&(p=2),l.splitDim=p;const d=(o[p]+o[p+3])/2,A=new Array(s.length);let f=0;const I=new Array(s.length);let m=0;for(c=0,u=s.length;c{const n=e.length/3,i=new Array(n);for(let e=0;e=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t},octDecodeVec2s(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t}};h.buildEdgeIndices=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=h.vec3(),u=h.vec3(),p=h.vec3(),d=h.vec3(),A=h.vec3(),f=h.vec3(),I=h.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}(),h.planeClipsPositions3=function(e,t,s,n=3){for(let i=0,r=s.length;i=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}}const A={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var f=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),n=s+e[1],i=s;i{};t=t||n,s=s||n;var i=new XMLHttpRequest;i.overrideMimeType("application/json"),i.open("GET",e,!0),i.addEventListener("load",(function(e){var n=e.target.response;if(200===this.status){var i;try{i=JSON.parse(n)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(i)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(n))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),i.addEventListener("error",(function(e){s(e)}),!1),i.send(null)},loadArraybuffer:function(e,t,s){var n=e=>{};t=t||n,s=s||n;const i=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(i){const e=!!i[2];var r=i[3];r=window.decodeURIComponent(r),e&&(r=window.atob(r));try{const e=new ArrayBuffer(r.length),s=new Uint8Array(e);for(var a=0;a{t(e)}))}catch(e){C.scheduleTask((()=>{s(e)}))}}else{const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t(n.response):s("loadArrayBuffer error : "+n.response))},n.send(null)}},queryString:m,isArray:function(e){return e&&!e.propertyIsEnumerable("length")&&"object"==typeof e&&"number"==typeof e.length},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isID:function(e){return y.isString(e)||y.isNumeric(e)},isSameComponent:function(e,t){return!(!e||!t)&&(y.isNumeric(e)||y.isString(e)?`${e}`:e.id)===(y.isNumeric(t)||y.isString(t)?`${t}`:t.id)},isFunction:function(e){return"function"==typeof e},isObject:function(e){const t={}.constructor;return!!e&&e.constructor===t},copy:function(e){return y.apply(e,{})},apply:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t},apply2:function(e,t){for(const s in e)e.hasOwnProperty(s)&&void 0!==e[s]&&null!==e[s]&&(t[s]=e[s]);return t},applyIf:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(void 0!==t[s]&&null!==t[s]||(t[s]=e[s]));return t},isEmptyObject:function(e){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0},inQuotes:function(e){return y.isNumeric(e)?`${e}`:`'${e}'`},concat:function(e,t){const s=new e.constructor(e.length+t.length);return s.set(e),s.set(t,e.length),s},flattenParentChildHierarchy:function(e){var t=[];return function e(s){s.id=s.uuid,delete s.oid,t.push(s);var n=s.children;if(n)for(var i=0,r=n.length;i{w.removeItem(e.id),delete C.scenes[e.id],delete v[e.id],A.components.scenes--}))},this.clear=function(){let e;for(const t in C.scenes)C.scenes.hasOwnProperty(t)&&(e=C.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete C.scenes[e.id]))},this.scheduleTask=function(e,t=null){g.push(e),g.push(t)},this.runTasks=function(e=-1){let t,s,n=(new Date).getTime(),i=0;for(;g.length>0&&(e<0||n0&&b>0){var t=1e3/b;P+=t,T.push(t),T.length>=30&&(P-=T.shift()),A.frame.fps=Math.round(P/T.length)}for(let e in C.scenes)C.scenes[e].compile();B(e),D=e};new class{worker=null;constructor(e,t){const s=new Blob([`setInterval(() => postMessage(0), ${t});`]),n=URL.createObjectURL(s);this.worker=new Worker(n),this.worker.onmessage=e}stop(){this.worker.terminate()}}(_,100);const R=function(){let e=Date.now();if(b=e-D,D>0&&b>0){var t=1e3/b;P+=t,T.push(t),T.length>=30&&(P-=T.shift()),A.frame.fps=Math.round(P/T.length)}B(e),function(e){for(var t in E.time=e,C.scenes)if(C.scenes.hasOwnProperty(t)){var s=C.scenes[t];E.sceneId=t,E.startTime=s.startTime,E.deltaTime=null!=E.prevTime?E.time-E.prevTime:0,s.fire("tick",E,!0)}E.prevTime=e}(e),function(){const e=C.scenes,t=!1;let s,n,i,r,a;for(a in e)e.hasOwnProperty(a)&&(s=e[a],n=v[a],n||(n=v[a]={}),i=s.ticksPerOcclusionTest,n.ticksPerOcclusionTest!==i&&(n.ticksPerOcclusionTest=i,n.renderCountdown=i),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=i),r=s.ticksPerRender,n.ticksPerRender!==r&&(n.ticksPerRender=r,n.renderCountdown=r),0==--n.renderCountdown&&(s.render(t),n.renderCountdown=r))}(),void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(_):requestAnimationFrame(R)};function B(e){const t=C.runTasks(e+10),s=C.getNumTasks();A.frame.tasksRun=t,A.frame.tasksScheduled=s,A.frame.tasksBudget=10}R();class O{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof O))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];let i;if(n)for(const s in n)n.hasOwnProperty(s)&&(i=n[s],this._eventCallDepth++,this._eventCallDepth<300?i.callback.call(i.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let i=this._eventSubs[t];i?this._eventSubsNum[t]++:(i={},this._eventSubs[t]=i,this._eventSubsNum[t]=1);const r=this._subIdMap.addItem();i[r]={callback:s,scope:n||this},this._subIdEvents[r]=t;const a=this._events[t];return void 0!==a&&s.call(n||this,a),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const n=this,i=this.on(e,(function(e){n.off(i),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+y.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const n=e.sceneDefault,i=e.sceneSingleton,r=e.type,a=e.on,o=!1!==e.recompiles;if(s&&(y.isNumeric(s)||y.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+y.inQuotes(e))}if(!s)if(!0===i){const e=this.scene.types[r];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===n&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+y.inQuotes(s.id));if(r&&!s.isType(r))return void this.error("Expected a "+r+" type or subtype: "+s.type+" "+y.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let c,u,h;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(c=e.subs,u=0,h=c.length;u{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():C.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}scheduleTask(e){C.scheduleTask(e,null)}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,n,i,r;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,n=t.subs,i=0,r=n.length;i=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class M{constructor(){this.planes=[new L,new L,new L,new L,new L,new L]}}function F(e,t,s){const n=h.mulMat4(s,t,x),i=n[0],r=n[1],a=n[2],o=n[3],l=n[4],c=n[5],u=n[6],p=n[7],d=n[8],A=n[9],f=n[10],I=n[11],m=n[12],y=n[13],v=n[14],w=n[15];e.planes[0].set(o-i,p-l,I-d,w-m),e.planes[1].set(o+i,p+l,I+d,w+m),e.planes[2].set(o-r,p-c,I-A,w-y),e.planes[3].set(o+r,p+c,I+A,w+y),e.planes[4].set(o-a,p-u,I-f,w-v),e.planes[5].set(o+a,p+u,I+f,w+v)}function H(e,t){let s=M.INSIDE;const n=S,i=N;n[0]=t[0],n[1]=t[1],n[2]=t[2],i[0]=t[3],i[1]=t[4],i[2]=t[5];const r=[n,i];for(let t=0;t<6;++t){const n=e.planes[t];if(n.normal[0]*r[n.testVertex[0]][0]+n.normal[1]*r[n.testVertex[1]][1]+n.normal[2]*r[n.testVertex[2]][2]+n.offset<0)return M.OUTSIDE;n.normal[0]*r[1-n.testVertex[0]][0]+n.normal[1]*r[1-n.testVertex[1]][1]+n.normal[2]*r[1-n.testVertex[2]][2]+n.offset<0&&(s=M.INTERSECT)}return s}M.INSIDE=0,M.INTERSECT=1,M.OUTSIDE=2;class U extends O{constructor(e={}){if(!e.viewer)throw"[MarqueePicker] Missing config: viewer";if(!e.objectsKdTree3)throw"[MarqueePicker] Missing config: objectsKdTree3";super(e.viewer.scene,e),this.viewer=e.viewer,this._objectsKdTree3=e.objectsKdTree3,this._canvasMarqueeCorner1=h.vec2(),this._canvasMarqueeCorner2=h.vec2(),this._canvasMarquee=h.AABB2(),this._marqueeFrustum=new M,this._marqueeFrustumProjMat=h.mat4(),this._pickMode=!1,this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement),this._marqueeElement.style.position="absolute",this._marqueeElement.style["z-index"]="40000005",this._marqueeElement.style.width="8px",this._marqueeElement.style.height="8px",this._marqueeElement.style.visibility="hidden",this._marqueeElement.style.top="0px",this._marqueeElement.style.left="0px",this._marqueeElement.style["box-shadow"]="0 2px 5px 0 #182A3D;",this._marqueeElement.style.opacity=1,this._marqueeElement.style["pointer-events"]="none"}setMarqueeCorner1(e){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarqueeCorner2(e){this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarquee(e,t){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(t),this._updateMarquee()}setMarqueeVisible(e){this._marqueVisible=e,this._marqueeElement.style.visibility=e?"visible":"hidden"}getMarqueeVisible(){return this._marqueVisible}setPickMode(e){if(e!==U.PICK_MODE_INSIDE&&e!==U.PICK_MODE_INTERSECTS)throw"Illegal MarqueePicker pickMode: must be MarqueePicker.PICK_MODE_INSIDE or MarqueePicker.PICK_MODE_INTERSECTS";e!==this._pickMode&&(this._marqueeElement.style["background-image"]=e===U.PICK_MODE_INSIDE?"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4'/%3e%3c/svg%3e\")":"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e\")",this._pickMode=e)}getPickMode(){return this._pickMode}clear(){this.fire("clear",{})}pick(){this._updateMarquee(),this._buildMarqueeFrustum();const e=[],t=(s,n=M.INTERSECT)=>{if(n===M.INTERSECT&&(n=H(this._marqueeFrustum,s.aabb)),n!==M.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,n=t.length;s3||this._canvasMarquee[3]-this._canvasMarquee[1]>3)&&t(this._objectsKdTree3.root),this.fire("picked",e),e}_updateMarquee(){this._canvasMarquee[0]=Math.min(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[1]=Math.min(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._canvasMarquee[2]=Math.max(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[3]=Math.max(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._marqueeElement.style.width=this._canvasMarquee[2]-this._canvasMarquee[0]+"px",this._marqueeElement.style.height=this._canvasMarquee[3]-this._canvasMarquee[1]+"px",this._marqueeElement.style.left=`${this._canvasMarquee[0]}px`,this._marqueeElement.style.top=`${this._canvasMarquee[1]}px`}_buildMarqueeFrustum(){const e=this.viewer.scene.canvas.canvas,t=e.clientWidth,s=e.clientHeight,n=e.clientLeft,i=e.clientTop,r=2/t,a=2/s,o=e.clientHeight/e.clientWidth,l=(this._canvasMarquee[0]-n)*r-1,c=(this._canvasMarquee[2]-n)*r-1,u=-(this._canvasMarquee[3]-i)*a+1,p=-(this._canvasMarquee[1]-i)*a+1,d=this.viewer.scene.camera.frustum.near*(17*o);h.frustumMat4(l,c,u*o,p*o,d,1e4,this._marqueeFrustumProjMat),F(this._marqueeFrustum,this.viewer.scene.camera.viewMatrix,this._marqueeFrustumProjMat)}destroy(){super.destroy(),this._marqueeElement.parentElement&&(this._marqueeElement.parentElement.removeChild(this._marqueeElement),this._marqueeElement=null,this._objectsKdTree3=null)}}U.PICK_MODE_INTERSECTS=0,U.PICK_MODE_INSIDE=1;class G{constructor(e,t,s){this.id=s&&s.id?s.id:e,this.viewer=t,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,t.addPlugin(this)}scheduleTask(e){C.scheduleTask(e,null)}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];let i;if(n)for(const s in n)n.hasOwnProperty(s)&&(i=n[s],this._eventCallDepth++,this._eventCallDepth<300?i.callback.call(i.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let i=this._eventSubs[t];i?this._eventSubsNum[t]++:(i={},this._eventSubs[t]=i,this._eventSubsNum[t]=1);const r=this._subIdMap.addItem();i[r]={callback:s,scope:n||this},this._subIdEvents[r]=t;const a=this._events[t];return void 0!==a&&s.call(n||this,a),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const n=this,i=this.on(e,(function(e){n.off(i),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}const j=h.vec3(),V=function(){const e=new Float64Array(16),t=new Float64Array(4),s=new Float64Array(4);return function(n,i,r){return r=r||e,t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,h.transformVec4(n,t,s),h.setMat4Translation(n,s,r),r.slice()}}();function k(e,t,s){const n=Float32Array.from([e[0]])[0],i=e[0]-n,r=Float32Array.from([e[1]])[0],a=e[1]-r,o=Float32Array.from([e[2]])[0],l=e[2]-o;t[0]=n,t[1]=r,t[2]=o,s[0]=i,s[1]=a,s[2]=l}function Q(e,t,s,n=1e3){const i=h.getPositionsCenter(e,j),r=Math.round(i[0]/n)*n,a=Math.round(i[1]/n)*n,o=Math.round(i[2]/n)*n;s[0]=r,s[1]=a,s[2]=o;const l=0!==s[0]||0!==s[1]||0!==s[2];if(l)for(let s=0,n=e.length;s0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let n=255;if(t){if(e<0?e=0:e>1&&(e=1),n=Math.floor(255*e),s===n)return}else if(n=255,s===n)return;for(let e=0,t=this.meshes.length;e{this._viewPosDirty=!0,this._needUpdate()})),this._onCameraProjMatrix=this.scene.camera.on("projMatrix",(()=>{this._canvasPosDirty=!0,this._needUpdate()})),this._onEntityDestroyed=null,this._onEntityModelDestroyed=null,this._renderer.addMarker(this),this.entity=t.entity,this.worldPos=t.worldPos,this.occludable=t.occludable}_update(){if(this._viewPosDirty&&(h.transformPoint3(this.scene.camera.viewMatrix,this._worldPos,this._viewPos),this._viewPosDirty=!1,this._canvasPosDirty=!0,this.fire("viewPos",this._viewPos)),this._canvasPosDirty){ie.set(this._viewPos),ie[3]=1,h.transformPoint4(this.scene.camera.projMatrix,ie,re);const e=this.scene.canvas.boundary;this._canvasPos[0]=Math.floor((1+re[0]/re[3])*e[2]/2),this._canvasPos[1]=Math.floor((1-re[1]/re[3])*e[3]/2),this._canvasPosDirty=!1,this.fire("canvasPos",this._canvasPos)}}_setVisible(e){this._visible,this._visible=e,this.fire("visible",this._visible)}set entity(e){if(this._entity){if(this._entity===e)return;null!==this._onEntityDestroyed&&(this._entity.off(this._onEntityDestroyed),this._onEntityDestroyed=null),null!==this._onEntityModelDestroyed&&(this._entity.model.off(this._onEntityModelDestroyed),this._onEntityModelDestroyed=null)}this._entity=e,this._entity&&(this._entity instanceof ne?this._onEntityModelDestroyed=this._entity.model.on("destroyed",(()=>{this._entity=null,this._onEntityModelDestroyed=null})):this._onEntityDestroyed=this._entity.on("destroyed",(()=>{this._entity=null,this._onEntityDestroyed=null}))),this.fire("entity",this._entity,!0)}get entity(){return this._entity}set occludable(e){(e=!!e)!==this._occludable&&(this._occludable=e)}get occludable(){return this._occludable}set worldPos(e){this._worldPos.set(e||[0,0,0]),k(this._worldPos,this._origin,this._rtcPos),this._occludable&&this._renderer.markerWorldPosUpdated(this),this._viewPosDirty=!0,this.fire("worldPos",this._worldPos),this._needUpdate()}get worldPos(){return this._worldPos}get origin(){return this._origin}get rtcPos(){return this._rtcPos}get viewPos(){return this._update(),this._viewPos}get canvasPos(){return this._update(),this._canvasPos}get visible(){return!!this._visible}destroy(){this.fire("destroyed",!0),this.scene.camera.off(this._onCameraViewMatrix),this.scene.camera.off(this._onCameraProjMatrix),this._entity&&(null!==this._onEntityDestroyed&&this._entity.off(this._onEntityDestroyed),null!==this._onEntityModelDestroyed&&this._entity.model.off(this._onEntityModelDestroyed)),this._renderer.removeMarker(this),super.destroy()}}class oe{constructor(e,t={}){this._color=t.color||"black",this._highlightClass="viewer-ruler-wire-highlighted",this._wire=document.createElement("div"),this._wire.className+=this._wire.className?" viewer-ruler-wire":"viewer-ruler-wire",this._wireClickable=document.createElement("div"),this._wireClickable.className+=this._wireClickable.className?" viewer-ruler-wire-clickable":"viewer-ruler-wire-clickable",this._thickness=t.thickness||1,this._thicknessClickable=t.thicknessClickable||6,this._visible=!0,this._culled=!1;var s=this._wire,n=s.style;n.border="solid "+this._thickness+"px "+this._color,n.position="absolute",n["z-index"]=void 0===t.zIndex?"2000001":t.zIndex,n.width="0px",n.height="0px",n.visibility="visible",n.top="0px",n.left="0px",n["-webkit-transform-origin"]="0 0",n["-moz-transform-origin"]="0 0",n["-ms-transform-origin"]="0 0",n["-o-transform-origin"]="0 0",n["transform-origin"]="0 0",n["-webkit-transform"]="rotate(0deg)",n["-moz-transform"]="rotate(0deg)",n["-ms-transform"]="rotate(0deg)",n["-o-transform"]="rotate(0deg)",n.transform="rotate(0deg)",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._wireClickable,r=i.style;r.border="solid "+this._thicknessClickable+"px "+this._color,r.position="absolute",r["z-index"]=void 0===t.zIndex?"2000002":t.zIndex+1,r.width="0px",r.height="0px",r.visibility="visible",r.top="0px",r.left="0px",r["-webkit-transform-origin"]="0 0",r["-moz-transform-origin"]="0 0",r["-ms-transform-origin"]="0 0",r["-o-transform-origin"]="0 0",r["transform-origin"]="0 0",r["-webkit-transform"]="rotate(0deg)",r["-moz-transform"]="rotate(0deg)",r["-ms-transform"]="rotate(0deg)",r["-o-transform"]="rotate(0deg)",r.transform="rotate(0deg)",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),t.onMouseOver&&i.addEventListener("mouseover",(e=>{t.onMouseOver(e,this)})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this._x1=0,this._y1=0,this._x2=0,this._y2=0,this._update()}get visible(){return"visible"===this._wire.style.visibility}_update(){var e=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2))),t=180*Math.atan2(this._y2-this._y1,this._x2-this._x1)/Math.PI,s=this._wire.style;s.width=Math.round(e)+"px",s.left=Math.round(this._x1)+"px",s.top=Math.round(this._y1)+"px",s["-webkit-transform"]="rotate("+t+"deg)",s["-moz-transform"]="rotate("+t+"deg)",s["-ms-transform"]="rotate("+t+"deg)",s["-o-transform"]="rotate("+t+"deg)",s.transform="rotate("+t+"deg)";var n=this._wireClickable.style;n.width=Math.round(e)+"px",n.left=Math.round(this._x1)+"px",n.top=Math.round(this._y1)+"px",n["-webkit-transform"]="rotate("+t+"deg)",n["-moz-transform"]="rotate("+t+"deg)",n["-ms-transform"]="rotate("+t+"deg)",n["-o-transform"]="rotate("+t+"deg)",n.transform="rotate("+t+"deg)"}setStartAndEnd(e,t,s,n){this._x1=e,this._y1=t,this._x2=s,this._y2=n,this._update()}setColor(e){this._color=e||"black",this._wire.style.border="solid "+this._thickness+"px "+this._color}setOpacity(e){this._wire.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._wireClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._wire.classList.add(this._highlightClass):this._wire.classList.remove(this._highlightClass))}destroy(e){this._wire.parentElement&&this._wire.parentElement.removeChild(this._wire),this._wireClickable.parentElement&&this._wireClickable.parentElement.removeChild(this._wireClickable)}}class le{constructor(e,t={}){this._highlightClass="viewer-ruler-dot-highlighted",this._x=0,this._y=0,this._visible=!0,this._dot=document.createElement("div"),this._dot.className+=this._dot.className?" viewer-ruler-dot":"viewer-ruler-dot",this._dotClickable=document.createElement("div"),this._dotClickable.className+=this._dotClickable.className?" viewer-ruler-dot-clickable":"viewer-ruler-dot-clickable",this._visible=!0,this._culled=!1;var s=this._dot,n=s.style;n["border-radius"]="25px",n.border="solid 2px white",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"40000005":t.zIndex,n.width="8px",n.height="8px",n.visibility=!1!==t.visible?"visible":"hidden",n.top="0px",n.left="0px",n["box-shadow"]="0 2px 5px 0 #182A3D;",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._dotClickable,r=i.style;r["border-radius"]="35px",r.border="solid 10px white",r.position="absolute",r["z-index"]=void 0===t.zIndex?"40000007":t.zIndex+1,r.width="8px",r.height="8px",r.visibility="visible",r.top="0px",r.left="0px",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),i.addEventListener("click",(t=>{e.dispatchEvent(new MouseEvent("mouseover",t))})),t.onMouseOver&&i.addEventListener("mouseover",(s=>{t.onMouseOver(s,this),e.dispatchEvent(new MouseEvent("mouseover",s))})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.borderColor)}setPos(e,t){this._x=e,this._y=t;var s=this._dot.style;s.left=Math.round(e)-4+"px",s.top=Math.round(t)-4+"px";var n=this._dotClickable.style;n.left=Math.round(e)-9+"px",n.top=Math.round(t)-9+"px"}setFillColor(e){this._dot.style.background=e||"lightgreen"}setBorderColor(e){this._dot.style.border="solid 2px"+(e||"black")}setOpacity(e){this._dot.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._dotClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._dot.classList.add(this._highlightClass):this._dot.classList.remove(this._highlightClass))}destroy(){this.setVisible(!1),this._dot.parentElement&&this._dot.parentElement.removeChild(this._dot),this._dotClickable.parentElement&&this._dotClickable.parentElement.removeChild(this._dotClickable)}}class ce{constructor(e,t={}){this._highlightClass="viewer-ruler-label-highlighted",this._prefix=t.prefix||"",this._x=0,this._y=0,this._visible=!0,this._culled=!1,this._label=document.createElement("div"),this._label.className+=this._label.className?" viewer-ruler-label":"viewer-ruler-label";var s=this._label,n=s.style;n["border-radius"]="5px",n.color="white",n.padding="4px",n.border="solid 1px",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"5000005":t.zIndex,n.width="auto",n.height="auto",n.visibility="visible",n.top="0px",n.left="0px",n["pointer-events"]="all",n.opacity=1,t.onContextMenu,s.innerText="",e.appendChild(s),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.fillColor),this.setText(t.text),t.onMouseOver&&s.addEventListener("mouseover",(e=>{t.onMouseOver(e,this),e.preventDefault()})),t.onMouseLeave&&s.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this),e.preventDefault()})),t.onMouseWheel&&s.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&s.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&s.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&s.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&s.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()}))}setPos(e,t){this._x=e,this._y=t;var s=this._label.style;s.left=Math.round(e)-20+"px",s.top=Math.round(t)-12+"px"}setPosOnWire(e,t,s,n){var i=e+.5*(s-e),r=t+.5*(n-t),a=this._label.style;a.left=Math.round(i)-20+"px",a.top=Math.round(r)-12+"px"}setPosBetweenWires(e,t,s,n,i,r){var a=(e+s+i)/3,o=(t+n+r)/3,l=this._label.style;l.left=Math.round(a)-20+"px",l.top=Math.round(o)-12+"px"}setText(e){this._label.innerHTML=this._prefix+(e||"")}setFillColor(e){this._fillColor=e||"lightgreen",this._label.style.background=this._fillColor}setBorderColor(e){this._borderColor=e||"black",this._label.style.border="solid 1px "+this._borderColor}setOpacity(e){this._label.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._label.classList.add(this._highlightClass):this._label.classList.remove(this._highlightClass))}setClickable(e){this._label.style["pointer-events"]=e?"all":"none"}destroy(){this._label.parentElement&&this._label.parentElement.removeChild(this._label)}}var ue=h.vec3(),he=h.vec3();class pe extends O{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._color=t.color||e.defaultColor;var s=this.plugin.viewer.scene;this._originMarker=new ae(s,t.origin),this._cornerMarker=new ae(s,t.corner),this._targetMarker=new ae(s,t.target),this._originWorld=h.vec3(),this._cornerWorld=h.vec3(),this._targetWorld=h.vec3(),this._wp=new Float64Array(12),this._vp=new Float64Array(12),this._pp=new Float64Array(12),this._cp=new Int16Array(6);const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},l=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))};this._originDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._cornerDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._originWire=new oe(this._container,{color:this._color||"blue",thickness:1,zIndex:e.zIndex,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetWire=new oe(this._container,{color:this._color||"red",thickness:1,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._angleLabel=new ce(this._container,{fillColor:this._color||"#00BBFF",prefix:"",text:"",zIndex:e.zIndex+2,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._visible=!1,this._originVisible=!1,this._cornerVisible=!1,this._targetVisible=!1,this._originWireVisible=!1,this._targetWireVisible=!1,this._angleVisible=!1,this._labelsVisible=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._cornerMarker.on("worldPos",(e=>{this._cornerWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.cornerVisible=t.cornerVisible,this.targetVisible=t.targetVisible,this.originWireVisible=t.originWireVisible,this.targetWireVisible=t.targetWireVisible,this.angleVisible=t.angleVisible,this.labelsVisible=t.labelsVisible}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._cornerWorld[0],this._wp[5]=this._cornerWorld[1],this._wp[6]=this._cornerWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._targetWorld[2],this._wp[11]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(h.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._angleLabel.setCulled(!0),this._originWire.setCulled(!0),this._targetWire.setCulled(!0),this._originDot.setCulled(!0),this._cornerDot.setCulled(!0),void this._targetDot.setCulled(!0);this._angleLabel.setCulled(!1),this._originWire.setCulled(!1),this._targetWire.setCulled(!1),this._originDot.setCulled(!1),this._cornerDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}if(this._cpDirty){const d=-.3,A=this._originMarker.viewPos[2],f=this._cornerMarker.viewPos[2],I=this._targetMarker.viewPos[2];if(A>d||f>d||I>d)return this._originDot.setVisible(!1),this._cornerDot.setVisible(!1),this._targetDot.setVisible(!1),this._originWire.setVisible(!1),this._targetWire.setVisible(!1),void this._angleLabel.setCulled(!0);h.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var t=this._pp,s=this._cp,n=e.canvas.canvas.getBoundingClientRect();const m=this._container.getBoundingClientRect();for(var i=n.top-m.top,r=n.left-m.left,a=e.canvas.boundary,o=a[2],l=a[3],c=0,u=0,p=t.length;u{e.snappedToVertex||e.snappedToEdge?(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!0),this.markerDiv.style.background="greenyellow",this.markerDiv.style.border="2px solid green"):(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.canvasPos,n.snapped=!1),this.markerDiv.style.background="pink",this.markerDiv.style.border="2px solid red");const s=e.snappedCanvasPos||e.canvasPos;switch(i=!0,r=e.entity,l.set(e.worldPos),c.set(s),this._mouseState){case 0:const n=t.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=n.left+i,o=n.top+r;this.markerDiv.style.marginLeft=a+s[0]-5+"px",this.markerDiv.style.marginTop=o+s[1]-5+"px";break;case 1:this._currentAngleMeasurement&&(this._currentAngleMeasurement.originWireVisible=!0,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.cornerVisible=!0,this._currentAngleMeasurement.angleVisible=!1,this._currentAngleMeasurement.corner.worldPos=e.worldPos,this._currentAngleMeasurement.corner.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer";break;case 2:this._currentAngleMeasurement&&(this._currentAngleMeasurement.targetWireVisible=!0,this._currentAngleMeasurement.targetVisible=!0,this._currentAngleMeasurement.angleVisible=!0,this._currentAngleMeasurement.target.worldPos=e.worldPos,this._currentAngleMeasurement.target.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer"}})),t.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(a=e.clientX,o=e.clientY)}),t.addEventListener("mouseup",this._onMouseUp=e=>{if(1===e.which&&!(e.clientX>a+20||e.clientXo+20||e.clientY{if(i=!1,n&&(n.visible=!0,n.pointerPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!1),this.markerDiv.style.marginLeft="-100px",this.markerDiv.style.marginTop="-100px",this._currentAngleMeasurement){switch(this._mouseState){case 0:this._currentAngleMeasurement.originVisible=!1;break;case 1:this._currentAngleMeasurement.cornerVisible=!1,this._currentAngleMeasurement.originWireVisible=!1,this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1;break;case 2:this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1}t.style.cursor="default"}})),this._active=!0}deactivate(){if(!this._active)return;this.pointerLens&&(this.pointerLens.visible=!1),this.markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.angleMeasurementsPlugin.viewer.cameraControl;t.off(this._onMouseHoverSurface),t.off(this._onPickedSurface),t.off(this._onHoverNothing),t.off(this._onPickedNothing),this._currentAngleMeasurement=null,this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentAngleMeasurement&&(this._currentAngleMeasurement.destroy(),this._currentAngleMeasurement=null),this._mouseState=0)}destroy(){this.deactivate(),super.destroy()}}class fe extends ae{constructor(e,t){if(super(e,t),this.plugin=t.plugin,this._container=t.container,!this._container)throw"config missing: container";if(!t.markerElement&&!t.markerHTML)throw"config missing: need either markerElement or markerHTML";if(!t.labelElement&&!t.labelHTML)throw"config missing: need either labelElement or labelHTML";this._htmlDirty=!1,t.markerElement?(this._marker=t.markerElement,this._marker.addEventListener("click",this._onMouseClickedExternalMarker=()=>{this.plugin.fire("markerClicked",this)}),this._marker.addEventListener("mouseenter",this._onMouseEnterExternalMarker=()=>{this.plugin.fire("markerMouseEnter",this)}),this._marker.addEventListener("mouseleave",this._onMouseLeaveExternalMarker=()=>{this.plugin.fire("markerMouseLeave",this)}),this._markerExternal=!0):(this._markerHTML=t.markerHTML,this._htmlDirty=!0,this._markerExternal=!1),t.labelElement?(this._label=t.labelElement,this._labelExternal=!0):(this._labelHTML=t.labelHTML,this._htmlDirty=!0,this._labelExternal=!1),this._markerShown=!!t.markerShown,this._labelShown=!!t.labelShown,this._values=t.values||{},this._layoutDirty=!0,this._visibilityDirty=!0,this._buildHTML(),this._onTick=this.scene.on("tick",(()=>{this._htmlDirty&&(this._buildHTML(),this._htmlDirty=!1,this._layoutDirty=!0,this._visibilityDirty=!0),(this._layoutDirty||this._visibilityDirty)&&(this._markerShown||this._labelShown)&&(this._updatePosition(),this._layoutDirty=!1),this._visibilityDirty&&(this._marker.style.visibility=this.visible&&this._markerShown?"visible":"hidden",this._label.style.visibility=this.visible&&this._markerShown&&this._labelShown?"visible":"hidden",this._visibilityDirty=!1)})),this.on("canvasPos",(()=>{this._layoutDirty=!0})),this.on("visible",(()=>{this._visibilityDirty=!0})),this.setMarkerShown(!1!==t.markerShown),this.setLabelShown(t.labelShown),this.eye=t.eye?t.eye.slice():null,this.look=t.look?t.look.slice():null,this.up=t.up?t.up.slice():null,this.projection=t.projection}_buildHTML(){if(!this._markerExternal){this._marker&&(this._container.removeChild(this._marker),this._marker=null);let e=this._markerHTML||"

";y.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._marker=t.firstChild,this._container.appendChild(this._marker),this._marker.style.visibility=this._markerShown?"visible":"hidden",this._marker.addEventListener("click",(()=>{this.plugin.fire("markerClicked",this)})),this._marker.addEventListener("mouseenter",(()=>{this.plugin.fire("markerMouseEnter",this)})),this._marker.addEventListener("mouseleave",(()=>{this.plugin.fire("markerMouseLeave",this)})),this._marker.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}if(!this._labelExternal){this._label&&(this._container.removeChild(this._label),this._label=null);let e=this._labelHTML||"

";y.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._label=t.firstChild,this._container.appendChild(this._label),this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden",this._label.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}}_updatePosition(){const e=this.scene.canvas.boundary,t=e[0],s=e[1],n=this.canvasPos;this._marker.style.left=Math.floor(t+n[0])-12+"px",this._marker.style.top=Math.floor(s+n[1])-12+"px",this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;this._label.style.left=20+Math.floor(t+n[0]+20)+"px",this._label.style.top=Math.floor(s+n[1]+-17)+"px",this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1}_renderTemplate(e){for(var t in this._values)if(this._values.hasOwnProperty(t)){const s=this._values[t];e=e.replace(new RegExp("{{"+t+"}}","g"),s)}return e}setMarkerShown(e){e=!!e,this._markerShown!==e&&(this._markerShown=e,this._visibilityDirty=!0)}getMarkerShown(){return this._markerShown}setLabelShown(e){e=!!e,this._labelShown!==e&&(this._labelShown=e,this._visibilityDirty=!0)}getLabelShown(){return this._labelShown}setField(e,t){this._values[e]=t||"",this._htmlDirty=!0}getField(e){return this._values[e]}setValues(e){for(var t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setField(t,s)}}getValues(){return this._values}destroy(){this._marker&&(this._markerExternal?(this._marker.removeEventListener("click",this._onMouseClickedExternalMarker),this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker),this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker),this._marker=null):this._marker.parentNode.removeChild(this._marker)),this._label&&(this._labelExternal||this._label.parentNode.removeChild(this._label),this._label=null),this.scene.off(this._onTick),super.destroy()}}const Ie=h.vec3(),me=h.vec3(),ye=h.vec3();class ve extends O{get type(){return"Spinner"}constructor(e,t={}){super(e,t),this._canvas=t.canvas,this._element=null,this._isCustom=!1,t.elementId&&(this._element=document.getElementById(t.elementId),this._element?this._adjustPosition():this.error("Can't find given Spinner HTML element: '"+t.elementId+"' - will automatically create default element")),this._element||this._createDefaultSpinner(),this.processes=0}_createDefaultSpinner(){this._injectDefaultCSS();const e=document.createElement("div"),t=e.style;t["z-index"]="9000",t.position="absolute",e.innerHTML='
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const we=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class ge extends O{constructor(e,t={}){super(e,t),this._backgroundColor=h.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let n=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(n=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{n&&(n=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new ve(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+h.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),n=s.style;n.height="100%",n.width="100%",n.padding="0",n.margin="0",n.background="rgba(0,0,0,0);",n.float="left",n.left="0",n.top="0",n.position="absolute",n.opacity="1.0",n["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0?Te.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?Te.FS_MAX_FLOAT_PRECISION="mediump":Te.FS_MAX_FLOAT_PRECISION="lowp":Te.FS_MAX_FLOAT_PRECISION="mediump",Te.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),Te.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),Te.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),Te.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),Te.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Te.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Te.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),Te.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),Te.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),Te.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){Te.SUPPORTED_EXTENSIONS[e]=!0})))}class De{constructor(){this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._canvasPos=new Int16Array([0,0]),this._snappedCanvasPos=new Int16Array([0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}get canvasPos(){return this._gotCanvasPos?this._canvasPos:null}set canvasPos(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}get origin(){return this._gotOrigin?this._origin:null}set origin(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}get direction(){return this._gotDirection?this._direction:null}set direction(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}get indices(){return this.entity&&this._gotIndices?this._indices:null}set indices(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}get localPos(){return this.entity&&this._gotLocalPos?this._localPos:null}set localPos(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}get snappedCanvasPos(){return this._gotSnappedCanvasPos?this._snappedCanvasPos:null}set snappedCanvasPos(e){e?(this._snappedCanvasPos[0]=e[0],this._snappedCanvasPos[1]=e[1],this._gotSnappedCanvasPos=!0):this._gotSnappedCanvasPos=!1}get worldPos(){return this._gotWorldPos?this._worldPos:null}set worldPos(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}get viewPos(){return this.entity&&this._gotViewPos?this._viewPos:null}set viewPos(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}get bary(){return this.entity&&this._gotBary?this._bary:null}set bary(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}get worldNormal(){return this.entity&&this._gotWorldNormal?this._worldNormal:null}set worldNormal(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}get uv(){return this.entity&&this._gotUV?this._uv:null}set uv(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}reset(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotSnappedCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}class Pe{constructor(e,t,s){if(this.allocated=!1,this.compiled=!1,this.handle=e.createShader(t),this.handle){if(this.allocated=!0,e.shaderSource(this.handle,s),e.compileShader(this.handle),this.compiled=e.getShaderParameter(this.handle,e.COMPILE_STATUS),!this.compiled&&!e.isContextLost()){const t=s.split("\n"),n=[];for(let e=0;e0&&"/"===s.charAt(n+1)&&(s=s.substring(0,n)),t.push(s);return t.join("\n")}function Oe(e){console.error(e.join("\n"))}class Se{constructor(e,t){this.id=Re.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new Pe(e,e.VERTEX_SHADER,Be(this.source.vertex)),this._fragmentShader=new Pe(e,e.FRAGMENT_SHADER,Be(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void Oe(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void Oe(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void Oe(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void Oe(this.errors);let t,s,n,i,r;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void Oe(this.errors);const a=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class xe{constructor(e,t){this.scene=e,this.aabb=h.AABB3(),this.origin=h.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const a=s.canvasPos,o=a[0],l=a[1];o+10<0||l+10<0||o-10>n||l-10>i?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[r++]=o,this.pixels[r++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new xe(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let n=this._occlusionLayers[s];n||(n=new xe(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),n.addMarker(e),this._markersToOcclusionLayersMap[e.id]=n}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// OcclusionTester fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),n.push("}"),n}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new Se(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=n.sectionPlanes;for(let n=0;n{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=h.mat4();return()=>(e&&h.inverseMat4(n.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,n=this._scene,i=n.sao,r=t.drawingBufferWidth,a=t.drawingBufferHeight,o=n.camera.project._state,l=o.near,c=o.far,u=o.matrix,p=this._getInverseProjectMat(),d=Math.random(),A="perspective"===n.camera.projection;He[0]=r,He[1]=a,t.viewport(0,0,r,a),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,c),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,u),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,p),t.uniform1i(this._uPerspective,A),t.uniform1f(this._uScale,i.scale*(c/5)),t.uniform1f(this._uIntensity,i.intensity),t.uniform1f(this._uBias,i.bias),t.uniform1f(this._uKernelRadius,i.kernelRadius),t.uniform1f(this._uMinResolution,i.minResolution),t.uniform2fv(this._uViewport,He),t.uniform1f(this._uRandomSeed,d);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new Se(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const n=new Float32Array([1,1,0,1,0,0,1,0]),i=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),r=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ne(s,s.ARRAY_BUFFER,i,i.length,3,s.STATIC_DRAW),this._uvBuf=new Ne(s,s.ARRAY_BUFFER,n,n.length,2,s.STATIC_DRAW),this._indicesBuf=new Ne(s,s.ELEMENT_ARRAY_BUFFER,r,r.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const Ge=new Float32Array(ze(17,[0,1])),je=new Float32Array(ze(17,[1,0])),Ve=new Float32Array(function(e,t){const s=[];for(let n=0;n<=e;n++)s.push(We(n,t));return s}(17,4)),ke=new Float32Array(2);class Qe{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new Se(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),n=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ne(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new Ne(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new Ne(e,e.ELEMENT_ARRAY_BUFFER,n,n.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=h.mat4();return()=>(e&&h.inverseMat4(r.camera.projMatrix,t),t)})());const n=this._scene.canvas.gl,i=this._program,r=this._scene,a=n.drawingBufferWidth,o=n.drawingBufferHeight,l=r.camera.project._state,c=l.near,u=l.far;n.viewport(0,0,a,o),n.clearColor(0,0,0,1),n.enable(n.DEPTH_TEST),n.disable(n.BLEND),n.frontFace(n.CCW),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),i.bind(),ke[0]=a,ke[1]=o,n.uniform2fv(this._uViewport,ke),n.uniform1f(this._uCameraNear,c),n.uniform1f(this._uCameraFar,u),n.uniform1f(this._uDepthCutoff,.01),0===s?n.uniform2fv(this._uSampleOffsets,je):n.uniform2fv(this._uSampleOffsets,Ge),n.uniform1fv(this._uSampleWeights,Ve);const p=e.getDepthTexture(),d=t.getTexture();i.bindTexture(this._uDepthTexture,p,0),i.bindTexture(this._uOcclusionTexture,d,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),n.drawElements(n.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function We(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function ze(e,t){const s=[];for(let n=0;n<=e;n++)s.push(t[0]*n),s.push(t[1]*n);return s}class Ke{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(...e){if(this._touch(...e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}createTexture(e,t,s=null){const n=this.gl,i=n.createTexture();return n.bindTexture(n.TEXTURE_2D,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),s?n.texStorage2D(n.TEXTURE_2D,1,s,e,t):n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e,t,0,n.RGBA,n.UNSIGNED_BYTE,null),i}_touch(...e){let t,s;const n=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=n.drawingBufferWidth,s=n.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;this.buffer.textures.forEach((e=>n.deleteTexture(e))),n.deleteFramebuffer(this.buffer.framebuf),n.deleteRenderbuffer(this.buffer.renderbuf)}const i=[];let r;e.length>0?i.push(...e.map((e=>this.createTexture(t,s,e)))):i.push(this.createTexture(t,s)),this._hasDepthTexture&&(r=n.createTexture(),n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texImage2D(n.TEXTURE_2D,0,n.DEPTH_COMPONENT32F,t,s,0,n.DEPTH_COMPONENT,n.FLOAT,null));const a=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,a),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT32F,t,s);const o=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,o);for(let e=0;e0&&n.drawBuffers(i.map(((e,t)=>n.COLOR_ATTACHMENT0+t))),this._hasDepthTexture?n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,r,0):n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,a),n.bindTexture(n.TEXTURE_2D,null),n.bindRenderbuffer(n.RENDERBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,o),!n.isFramebuffer(o))throw"Invalid framebuffer";n.bindFramebuffer(n.FRAMEBUFFER,null);const l=n.checkFramebufferStatus(n.FRAMEBUFFER);switch(l){case n.FRAMEBUFFER_COMPLETE:break;case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:o,renderbuf:a,texture:i[0],textures:i,depthTexture:r,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,n=null,i=Uint8Array,r=4,a=0){const o=e,l=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,c=new i(r),u=this.gl;return u.readBuffer(u.COLOR_ATTACHMENT0+a),u.readPixels(o,l,1,1,s||u.RGBA,n||u.UNSIGNED_BYTE,c,0),c}readArray(e=null,t=null,s=Uint8Array,n=4,i=0){const r=new s(this.buffer.width*this.buffer.height*n),a=this.gl;return a.readBuffer(a.COLOR_ATTACHMENT0+i),a.readPixels(0,0,this.buffer.width,this.buffer.height,e||a.RGBA,t||a.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,n=t.canvas,i=t.imageData,r=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const a=this.buffer.width,o=this.buffer.height,l=o/2|0,c=4*a,u=new Uint8Array(4*a);for(let e=0;ee.deleteTexture(t))),e.deleteTexture(this.buffer.depthTexture),e.deleteFramebuffer(this.buffer.framebuf),e.deleteRenderbuffer(this.buffer.renderbuf),this.allocated=!1,this.buffer=null,this.bound=!1}this._imageDataCache=null,this._texture=null,this._depthTexture=null}}class Ye{constructor(e){this.scene=e,this._renderBuffersBasic={},this._renderBuffersScaled={}}getRenderBuffer(e,t){const s=1===this.scene.canvas.resolutionScale?this._renderBuffersBasic:this._renderBuffersScaled;let n=s[e];return n||(n=new Ke(this.scene.canvas.canvas,this.scene.canvas.gl,t),s[e]=n),n}destroy(){for(let e in this._renderBuffersBasic)this._renderBuffersBasic[e].destroy();for(let e in this._renderBuffersScaled)this._renderBuffersScaled[e].destroy()}}function Xe(e,t){if(void 0===e._cachedExtensions&&(e._cachedExtensions={}),void 0!==e._cachedExtensions[t])return e._cachedExtensions[t];let s;switch(t){case"WEBGL_depth_texture":s=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":s=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":s=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":s=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:s=e.getExtension(t)}return e._cachedExtensions[t]=s,s}const qe=function(t,s){s=s||{};const n=new Ee(t),i=t.canvas.canvas,r=t.canvas.gl,a=!!s.transparent,o=s.alphaDepthMask,l=new e({});let c={},u={},p=!0,d=!0,f=!0,I=!0,m=!0,y=!0,v=!0,w=!0;const g=new Ye(t);let E=!1;const T=new Ue(t),b=new Qe(t);function D(){p&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableMap,n=t.drawableListPreCull;let i=0;for(let e in s)s.hasOwnProperty(e)&&(n[i++]=s[e]);n.length=i}}(),p=!1,d=!0),d&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e];t.isStateSortable&&t.drawableListPreCull.sort(t.stateSortCompare)}}(),d=!1,f=!0),f&&function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableListPreCull,n=t.drawableList;let i=0;for(let e=0,t=s.length;e0)for(n.withSAO=!0,S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||k>0||H>0||U>0){if(r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):(r.blendEquation(r.FUNC_ADD),r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA)),n.backfaces=!1,o||r.depthMask(!1),(H>0||U>0)&&r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),U>0)for(S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||W>0){if(n.lastProgramId=null,t.highlightMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),W>0)for(S=0;S0)for(S=0;S0||K>0||Q>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),r.enable(r.CULL_FACE),K>0)for(S=0;S0)for(S=0;S0||X>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),X>0)for(S=0;S0)for(S=0;S0||J>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),J>0)for(S=0;S0)for(S=0;S0){const t=Math.floor(e/4),s=d.size[0],n=t%s-Math.floor(s/2),i=Math.floor(t/s)-Math.floor(s/2),r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));C.push({x:n,y:i,dist:r,isVertex:a&&o?y[e+3]>m.length/2:a,result:[y[e+0],y[e+1],y[e+2],y[e+3]],normal:[v[e+0],v[e+1],v[e+2],v[e+3]],id:[w[e+0],w[e+1],w[e+2],w[e+3]]})}let O=null,S=null,N=null,x=null;if(C.length>0){C.sort(((e,t)=>e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist)),x=C[0].isVertex?"vertex":"edge";const e=C[0].result,t=C[0].normal,s=C[0].id,n=m[e[3]],i=n.origin,r=n.coordinateScale;S=h.normalizeVec3([t[0]/h.MAX_INT,t[1]/h.MAX_INT,t[2]/h.MAX_INT]),O=[e[0]*r[0]+i[0],e[1]*r[1]+i[1],e[2]*r[2]+i[2]],N=l.items[s[0]+(s[1]<<8)+(s[2]<<16)+(s[3]<<24)]}if(null===E&&null==O)return null;let L=null;null!==O&&(L=t.camera.projectWorldPos(O));const M=N&&N.delegatePickedEntity?N.delegatePickedEntity():N;return u.reset(),u.snappedToEdge="edge"===x,u.snappedToVertex="vertex"===x,u.worldPos=O,u.worldNormal=S,u.entity=M,u.canvasPos=s,u.snappedCanvasPos=L||s,u}}(),this.addMarker=function(e){this._occlusionTester=this._occlusionTester||new Fe(t,g),this._occlusionTester.addMarker(e),t.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){D(),this._occlusionTester.bindRenderBuf(),n.reset(),n.backfaces=!0,n.frontface=!0,r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.clearColor(0,0,0,0),r.enable(r.DEPTH_TEST),r.disable(r.CULL_FACE),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT);for(let e in c)if(c.hasOwnProperty(e)){const t=c[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}});const e=this.scene.tickify((()=>this.fire("mousemove",this.mouseCanvasPos,!0)));this.element.addEventListener("mousemove",this._mouseMoveListener=t=>{this.enabled&&(this._getMouseCanvasPos(t),e(),this.mouseover&&t.preventDefault())});const t=this.scene.tickify((e=>{this.fire("mousewheel",e,!0)}));this.element.addEventListener("wheel",this._mouseWheelListener=(e,s)=>{if(!this.enabled)return;const n=Math.max(-1,Math.min(1,40*-e.deltaY));t(n)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(n=>{e>=n[0]-s&&e<=n[0]+s&&t>=n[1]-s&&t<=n[1]+s&&this.fire("mouseclicked",n,!0)}))}this._eventsBound=!0}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,n=0;for(;t.offsetParent;)s+=t.offsetLeft,n+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-n}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const Ze=new e({});class $e{constructor(e){this.id=Ze.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){Ze.removeItem(this.id)}}class et extends O{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new $e({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class tt extends O{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let n=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(n/=t),n=Math.min(n,120),h.perspectiveMat4(n*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class st extends O{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,n=s[2],i=s[3],r=n/i;let a,o,l,c;n>i?(a=-t,o=t,l=t/r,c=-t/r):(a=-t*r,o=t*r,l=t,c=-t),h.orthoMat4c(a,o,c,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class nt extends O{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){h.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class it extends O{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy()}}const rt=h.vec3(),at=h.vec3(),ot=h.vec3(),lt=h.vec3(),ct=h.vec3(),ut=h.vec3(),ht=h.vec4(),pt=h.vec4(),dt=h.vec4(),At=h.mat4(),ft=h.mat4(),It=h.vec3(),mt=h.vec3(),yt=h.vec3(),vt=h.vec3();class wt extends O{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new $e({deviceMatrix:h.mat4(),hasDeviceMatrix:!1,matrix:h.mat4(),normalMatrix:h.mat4(),inverseMatrix:h.mat4()}),this._perspective=new tt(this),this._ortho=new st(this),this._frustum=new nt(this),this._customProjection=new it(this),this._project=this._perspective,this._eye=h.vec3([0,0,10]),this._look=h.vec3([0,0,0]),this._up=h.vec3([0,1,0]),this._worldUp=h.vec3([0,1,0]),this._worldRight=h.vec3([1,0,0]),this._worldForward=h.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(h.subVec3(this._eye,this._look,It),h.normalizeVec3(It,mt),h.mulVec3Scalar(mt,1e3,yt),h.addVec3(this._look,yt,vt),t=vt):t=this._eye,e.hasDeviceMatrix?(h.lookAtMat4v(t,this._look,this._up,ft),h.mulMat4(e.deviceMatrix,ft,e.matrix)):h.lookAtMat4v(t,this._look,this._up,e.matrix),h.inverseMat4(this._state.matrix,this._state.inverseMatrix),h.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=h.subVec3(this._eye,this._look,rt);h.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,At),t=h.transformPoint3(At,t,at),this.eye=h.addVec3(this._look,t,ot),this.up=h.transformPoint3(At,this._up,lt)}orbitPitch(e){if(this._constrainPitch&&(e=h.dotVec3(this._up,this._worldUp)/h.DEGTORAD)<1)return;let t=h.subVec3(this._eye,this._look,rt);const s=h.cross3Vec3(h.normalizeVec3(t,at),h.normalizeVec3(this._up,ot));h.rotationMat4v(.0174532925*e,s,At),t=h.transformPoint3(At,t,lt),this.up=h.transformPoint3(At,this._up,ct),this.eye=h.addVec3(t,this._look,ut)}yaw(e){let t=h.subVec3(this._look,this._eye,rt);h.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,At),t=h.transformPoint3(At,t,at),this.look=h.addVec3(t,this._eye,ot),this._gimbalLock&&(this.up=h.transformPoint3(At,this._up,lt))}pitch(e){if(this._constrainPitch&&(e=h.dotVec3(this._up,this._worldUp)/h.DEGTORAD)<1)return;let t=h.subVec3(this._look,this._eye,rt);const s=h.cross3Vec3(h.normalizeVec3(t,at),h.normalizeVec3(this._up,ot));h.rotationMat4v(.0174532925*e,s,At),this.up=h.transformPoint3(At,this._up,ut),t=h.transformPoint3(At,t,lt),this.look=h.addVec3(t,this._eye,ct)}pan(e){const t=h.subVec3(this._eye,this._look,rt),s=[0,0,0];let n;if(0!==e[0]){const i=h.cross3Vec3(h.normalizeVec3(t,[]),h.normalizeVec3(this._up,at));n=h.mulVec3Scalar(i,e[0]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]}0!==e[1]&&(n=h.mulVec3Scalar(h.normalizeVec3(this._up,ot),e[1]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),0!==e[2]&&(n=h.mulVec3Scalar(h.normalizeVec3(t,lt),e[2]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),this.eye=h.addVec3(this._eye,s,ct),this.look=h.addVec3(this._look,s,ut)}zoom(e){const t=h.subVec3(this._eye,this._look,rt),s=Math.abs(h.lenVec3(t,at)),n=Math.abs(s+e);if(n<.5)return;const i=h.normalizeVec3(t,ot);this.eye=h.addVec3(this._look,h.mulVec3Scalar(i,n),lt)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=h.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return h.lenVec3(h.subVec3(this._look,this._eye,rt))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=ht,s=pt,n=dt;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,h.mulMat4v4(this.viewMatrix,t,s),h.mulMat4v4(this.projMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1;const i=this.scene.canvas.canvas,r=i.offsetWidth/2,a=i.offsetHeight/2;return[n[0]*r+r,n[1]*a+a]}destroy(){super.destroy(),this._state.destroy()}}class gt extends O{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class Et extends gt{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,n=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=n.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new $e({type:"dir",dir:h.vec3([1,1,1]),color:h.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=h.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,n=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],i=[0,1,0];h.lookAtMat4v(n,s,i,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=h.identityMat4()),h.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new Ke(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class Tt extends gt{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:h.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class bt extends O{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),A.memory.meshes++}destroy(){super.destroy(),A.memory.meshes--}}var Dt=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=h.vec3(),u=h.vec3(),p=h.vec3(),d=h.vec3(),A=h.vec3(),f=h.vec3(),I=h.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}();const Pt=function(){const e=h.mat4(),t=h.mat4();return function(s,n){n=n||h.mat4();const i=s[0],r=s[1],a=s[2],o=s[3]-i,l=s[4]-r,c=s[5]-a,u=65535;return h.identityMat4(e),h.translationMat4v(s,e),h.identityMat4(t),h.scalingMat4v([o/u,l/u,c/u],t),h.mulMat4(e,t,n),n}}();var Ct=function(){const e=h.mat4(),t=h.mat4();return function(s,n,i){const r=new Uint16Array(s.length),a=new Float32Array([i[0]!==n[0]?65535/(i[0]-n[0]):0,i[1]!==n[1]?65535/(i[1]-n[1]):0,i[2]!==n[2]?65535/(i[2]-n[2]):0]);let o;for(o=0;o=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1);i=e,r=t}return new Int8Array([Math[s](127.5*i+(i<0?-1:0)),Math[n](127.5*r+(r<0?-1:0))])}function Bt(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}function Ot(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const St={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let n,i;for(n=0;n<3;n++)t[n]=Number.MAX_VALUE,s[n]=-Number.MAX_VALUE;for(n=0;na&&(i=s,a=r),s=Rt(e,o,"floor","ceil"),n=Bt(s),r=Ot(e,o,n),r>a&&(i=s,a=r),s=Rt(e,o,"ceil","ceil"),n=Bt(s),r=Ot(e,o,n),r>a&&(i=s,a=r),t[o]=i[0],t[o+1]=i[1];return t},decompressNormals:function(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t},decompressNormal:function(e,t){let s=e[0],n=e[1];s=(2*s+1)/255,n=(2*n+1)/255;const i=1-Math.abs(s)-Math.abs(n);i<0&&(s=(1-Math.abs(n))*(s>=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t}},Nt=A.memory,xt=h.AABB3();class Lt extends bt{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new $e({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=St.getPositionsBounds(t.positions),n=St.compressPositions(t.positions,e.min,e.max);s.positions=n.quantized,s.positionsDecodeMatrix=n.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=St.getUVBounds(t.uv),n=St.compressUVs(t.uv,e.min,e.max);s.uv=n.quantized,s.uvDecodeMatrix=n.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=St.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),Nt.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),Nt.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),Nt.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new Ne(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),Nt.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),Nt.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new Ne(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),Nt.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=Dt(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),Nt.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=h.buildPickTriangles(e.positions,e.indices,e.compressGeometry),n=s.positions,i=s.colors;this._pickTrianglePositionsBuf=new Ne(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,4,t.STATIC_DRAW,!0),Nt.positions+=this._pickTrianglePositionsBuf.numItems,Nt.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),St.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=St.getPositionsBounds(e),n=St.compressPositions(e,s.min,s.max);e=n.quantized,t.positionsDecodeMatrix=n.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),St.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),St.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=h.AABB3()),h.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=h.OBB3()),h.positions3ToAABB3(this._state.positions,xt,this._state.positionsDecodeMatrix),h.AABB3ToOBB3(xt,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),Nt.meshes--}}function Mt(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return y.apply(e,{positions:[h,p,d,l,p,d,l,c,d,h,c,d,h,p,d,h,c,d,h,c,u,h,p,u,h,p,d,h,p,u,l,p,u,l,p,d,l,p,d,l,p,u,l,c,u,l,c,d,l,c,u,h,c,u,h,c,d,l,c,d,h,c,u,l,c,u,l,p,u,h,p,u],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class Ft extends O{get type(){return"Material"}constructor(e,t={}){super(e,t),A.memory.materials++}destroy(){super.destroy(),A.memory.materials--}}const Ht={opaque:0,mask:1,blend:2},Ut=["opaque","mask","blend"];class Gt extends Ft{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new $e({type:"PhongMaterial",ambient:h.vec3([1,1,1]),diffuse:h.vec3([1,1,1]),specular:h.vec3([1,1,1]),emissive:h.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=Ht[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return Ut[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const jt={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class Vt extends Ft{get type(){return"EmphasisMaterial"}get presets(){return jt}constructor(e,t={}){super(e,t),this._state=new $e({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=jt[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(jt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const kt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class Qt extends Ft{get type(){return"EdgeMaterial"}get presets(){return kt}constructor(e,t={}){super(e,t),this._state=new $e({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=kt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(kt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const Wt={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class zt extends O{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=h.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return Wt}set units(e){e||(e="meters");Wt[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=h.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=h.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class Kt extends O{constructor(e,t={}){super(e,t),this._supported=Te.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const Yt={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class Xt extends Ft{get type(){return"PointsMaterial"}get presets(){return Yt}constructor(e,t={}){super(e,t),this._state=new $e({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=Yt[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Yt).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const qt={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class Jt extends Ft{get type(){return"LinesMaterial"}get presets(){return qt}constructor(e,t={}){super(e,t),this._state=new $e({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=qt[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(qt).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}function Zt(e,t){const s={};let n,i;for(let r=0,a=t.length;r{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new qe(this,{transparent:n,alphaDepthMask:i}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1,this._numCachedSectionPlanes=0;let e=null;this.getHash=function(){if(e)return e;const t=this.getNumAllocatedSectionPlanes();if(this.sectionPlanes,0===t)return this.hash=";";const s=[];for(let e=0,n=t;ethis._numCachedSectionPlanes?e:this._numCachedSectionPlanes}},this._sectionPlanesState.setNumCachedSectionPlanes(t.numCachedSectionPlanes||0),this._lightsState=new function(){const e=h.vec4([0,0,0,0]),t=h.vec4();this.lights=[],this.reflectionMaps=[],this.lightMaps=[];let s=null,n=null;this.getHash=function(){if(s)return s;const e=[],t=this.lights;let n;for(let s=0,i=t.length;s0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),n=null,s=null},this.removeLight=function(e){for(let t=0,i=this.lights.length;t{this._renderer.imageDirty()}))}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+y.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=h.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const n=this.types[s];n&&(delete n[t],y.isEmptyObject(n)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_deRegisterVisibleObject(e){delete this.visibleObjects[e.id],this._numVisibleObjects--,this._visibleObjectIds=null}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_deRegisterXRayedObject(e){delete this.xrayedObjects[e.id],this._numXRayedObjects--,this._xrayedObjectIds=null}_objectHighlightedUpdated(e){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null}_deRegisterHighlightedObject(e){delete this.highlightedObjects[e.id],this._numHighlightedObjects--,this._highlightedObjectIds=null}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_deRegisterSelectedObject(e){delete this.selectedObjects[e.id],this._numSelectedObjects--,this._selectedObjectIds=null}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_deRegisterColorizedObject(e){delete this.colorizedObjects[e.id],this._numColorizedObjects--,this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_deRegisterOpacityObject(e){delete this.opacityObjects[e.id],this._numOpacityObjects--,this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_deRegisterOffsetObject(e){delete this.offsetObjects[e.id],this._numOffsetObjects--,this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set numCachedSectionPlanes(e){e=e||0,this._sectionPlanesState.getNumCachedSectionPlanes()!==e&&(this._sectionPlanesState.setNumCachedSectionPlanes(e),this._needRecompile=!0,this.glRedraw())}get numCachedSectionPlanes(){return this._sectionPlanesState.getNumCachedSectionPlanes()}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&C.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,n=this._clearEachPass;let i,r;for(i=0;ii&&(i=e[3]),e[4]>r&&(r=e[4]),e[5]>a&&(a=e[5]),c=!0}c||(t=-100,s=-100,n=-100,i=100,r=100,a=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=n,this._aabb[3]=i,this._aabb[4]=r,this._aabb[5]=a,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=Zt(this,s));const n=e.excludeEntities||e.exclude;return n&&(e.excludeEntityIds=Zt(this,n)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=e.snapToEdge||e.snapToVertex?this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge,t):this._renderer.pick(e,t))&&t.entity&&t.entity.fire&&t.entity.fire("picked",t),t}snapPick(e){return void 0===this._warnSnapPickDeprecated&&(this._warnSnapPickDeprecated=!0,this.warn("Scene.snapPick() is deprecated since v2.4.2 - use Scene.pick() instead")),this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]r&&(r=l[3]),l[4]>a&&(a=l[4]),l[5]>o&&(o=l[5]),t=!0}})),t){const e=h.AABB3();return e[0]=s,e[1]=n,e[2]=i,e[3]=r,e[4]=a,e[5]=o,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){y.isString(e)&&(e=[e]);let s=!1;for(let n=0,i=e.length;n{i>n&&(n=i,e(...s))}));return this._tickifiedFunctions[t]={tickSubId:a,wrapperFunc:r},r}destroy(){super.destroy();for(const e in this.components)this.components.hasOwnProperty(e)&&this.components[e].destroy();this.canvas.gl=null,this.components=null,this.models=null,this.objects=null,this.visibleObjects=null,this.xrayedObjects=null,this.highlightedObjects=null,this.selectedObjects=null,this.colorizedObjects=null,this.opacityObjects=null,this.sectionPlanes=null,this.lights=null,this.lightMaps=null,this.reflectionMaps=null,this._objectIds=null,this._visibleObjectIds=null,this._xrayedObjectIds=null,this._highlightedObjectIds=null,this._selectedObjectIds=null,this._colorizedObjectIds=null,this.types=null,this.components=null,this.canvas=null,this._renderer=null,this.input=null,this._viewport=null,this._camera=null}}const es=function(e){"LambertMaterial"===e._material._state.type?(this.vertex=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene._lightsState,i=e._geometry._state,r=e._state.billboard,a=e._state.stationary,o=s.getNumAllocatedSectionPlanes()>0,l=!!i.compressGeometry,c=[];c.push("#version 300 es"),c.push("// Lambertian drawing vertex shader"),c.push("in vec3 position;"),c.push("uniform mat4 modelMatrix;"),c.push("uniform mat4 viewMatrix;"),c.push("uniform mat4 projMatrix;"),c.push("uniform vec4 colorize;"),c.push("uniform vec3 offset;"),l&&c.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(c.push("uniform float logDepthBufFC;"),c.push("out float vFragDepth;"),c.push("bool isPerspectiveMatrix(mat4 m) {"),c.push(" return (m[2][3] == - 1.0);"),c.push("}"),c.push("out float isPerspective;"));o&&c.push("out vec4 vWorldPosition;");if(c.push("uniform vec4 lightAmbient;"),c.push("uniform vec4 materialColor;"),c.push("uniform vec3 materialEmissive;"),i.normalsBuf){c.push("in vec3 normal;"),c.push("uniform mat4 modelNormalMatrix;"),c.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=n.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),c.push(" }"),c.push(" return normalize(v);"),c.push("}"))}c.push("out vec4 vColor;"),"points"===i.primitiveName&&c.push("uniform float pointSize;");"spherical"!==r&&"cylindrical"!==r||(c.push("void billboard(inout mat4 mat) {"),c.push(" mat[0][0] = 1.0;"),c.push(" mat[0][1] = 0.0;"),c.push(" mat[0][2] = 0.0;"),"spherical"===r&&(c.push(" mat[1][0] = 0.0;"),c.push(" mat[1][1] = 1.0;"),c.push(" mat[1][2] = 0.0;")),c.push(" mat[2][0] = 0.0;"),c.push(" mat[2][1] = 0.0;"),c.push(" mat[2][2] =1.0;"),c.push("}"));c.push("void main(void) {"),c.push("vec4 localPosition = vec4(position, 1.0); "),c.push("vec4 worldPosition;"),l&&c.push("localPosition = positionsDecodeMatrix * localPosition;");i.normalsBuf&&(l?c.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):c.push("vec4 localNormal = vec4(normal, 0.0); "),c.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),c.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));c.push("mat4 viewMatrix2 = viewMatrix;"),c.push("mat4 modelMatrix2 = modelMatrix;"),a&&c.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(c.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),c.push("billboard(modelMatrix2);"),c.push("billboard(viewMatrix2);"),c.push("billboard(modelViewMatrix);"),i.normalsBuf&&(c.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),c.push("billboard(modelNormalMatrix2);"),c.push("billboard(viewNormalMatrix2);"),c.push("billboard(modelViewNormalMatrix);")),c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i.normalsBuf&&c.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(c.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),c.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),c.push("float lambertian = 1.0;"),i.normalsBuf)for(let e=0,t=n.lights.length;e0,r=t.gammaOutput,a=[];a.push("#version 300 es"),a.push("// Lambertian drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}"points"===n.primitiveName&&(a.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),a.push("float r = dot(cxy, cxy);"),a.push("if (r > 1.0) {"),a.push(" discard;"),a.push("}"));t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,n=t._sectionPlanesState,i=e._geometry._state,r=t._lightsState;let a;const o=s.billboard,l=s.background,c=s.stationary,u=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),h=ns(e),p=n.getNumAllocatedSectionPlanes()>0,d=ss(e),A=!!i.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),A&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),p&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));r.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(h){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=r.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}u&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),A&&f.push("uniform mat3 uvDecodeMatrix;"));i.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===i.primitiveName&&f.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===o&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(d){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=r.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=r.lights.length;e0,l=ns(e),c=n.uvBuf,u="PhongMaterial"===a.type,h="MetallicMaterial"===a.type,p="SpecularMaterial"===a.type,d=ss(e);t.gammaInput;const A=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));d&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),A&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(o){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var I=0;I0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),r.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),u&&((r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = "+ts[r.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(h||p)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),r.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+ts[r.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),n.colors&&f.push("in vec4 vColor;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(r.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));a.ambient&&f.push("uniform vec3 materialAmbient;");a.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==a.alpha&&null!==a.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");a.emissive&&f.push("uniform vec3 materialEmissive;");a.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==a.glossiness&&null!==a.glossiness&&f.push("uniform float materialGlossiness;");void 0!==a.shininess&&null!==a.shininess&&f.push("uniform float materialShininess;");a.specular&&f.push("uniform vec3 materialSpecular;");void 0!==a.metallic&&null!==a.metallic&&f.push("uniform float materialMetallic;");void 0!==a.roughness&&null!==a.roughness&&f.push("uniform float materialRoughness;");void 0!==a.specularF0&&null!==a.specularF0&&f.push("uniform float materialSpecularF0;");c&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));c&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));c&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));c&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&c&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&c&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&c&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));c&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));c&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&c&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&c&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&c&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=r.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===n.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),a.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");a.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):a.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");n.colors&&f.push("diffuseColor *= vColor.rgb;");a.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");a.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==a.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");n.colors&&f.push("alpha *= vColor.a;");void 0!==a.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==a.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==a.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==a.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));c&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+ts[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));c&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+ts[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));c&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+ts[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));c&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+ts[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));c&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));c&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(r.lights.length>0||r.lightMaps.length>0||r.reflectionMaps.length>0)){c&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),c&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),c&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),c&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),c&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),c&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),c&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),u&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),p&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),h&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),r.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),u&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(p||h)&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=r.lights.length;e0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),i.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(u=0,h=r.sectionPlanes.length;u0&&i.lightMaps[0].texture&&this._uLightMap&&(o.bindTexture(this._uLightMap,i.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),i.reflectionMaps.length>0&&i.reflectionMaps[0].texture&&this._uReflectionMap&&(o.bindTexture(this._uReflectionMap,i.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&n.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class ls{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,n=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),i=t._sectionPlanesState.getNumAllocatedSectionPlanes()>0,r=!!e._geometry._state.compressGeometry,a=e._state.billboard,o=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),r&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));i&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),n){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===a||"cylindrical"===a)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===a&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),r&&l.push("localPosition = positionsDecodeMatrix * localPosition;");n&&(r?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),o&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===a||"cylindrical"===a?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),n&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),n)for(let e=0,t=s.lights.length;e0,r=[];r.push("#version 300 es"),r.push("// Lambertian drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}"points"===e._geometry._state.primitiveName&&(r.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),r.push("float r = dot(cxy, cxy);"),r.push("if (r > 1.0) {"),r.push(" discard;"),r.push("}"));t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const cs=new e({}),us=h.vec3(),hs=function(e,t){this.id=cs.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new ls(t),this._allocate(t)},ps={};hs.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=ps[t];return s||(s=new hs(t,e),ps[t]=s,A.memory.programs++),s._useCount++,s},hs.prototype.put=function(){0==--this._useCount&&(cs.removeItem(this.id),this._program&&this._program.destroy(),delete ps[this._hash],A.memory.programs--)},hs.prototype.webglContextRestored=function(){this._program=null},hs.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl,a=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,o=t._state,l=t._geometry._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(o.originHash,c):i.viewMatrix),r.uniformMatrix4fv(this._uViewNormalMatrix,!1,i.viewNormalMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Edges drawing vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec4 edgeColor;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));s&&a.push("out vec4 vWorldPosition;");a.push("out vec4 vColor;"),("spherical"===i||"cylindrical"===i)&&(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));a.push("vColor = edgeColor;"),s&&a.push("vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene.gammaOutput,i=s.getNumAllocatedSectionPlanes()>0,r=[];r.push("#version 300 es"),r.push("// Edges drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const As=new e({}),fs=h.vec3(),Is=function(e,t){this.id=As.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new ds(t),this._allocate(t)},ms={};Is.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=ms[t];return s||(s=new Is(t,e),ms[t]=s,A.memory.programs++),s._useCount++,s},Is.prototype.put=function(){0==--this._useCount&&(As.removeItem(this.id),this._program&&this._program.destroy(),delete ms[this._hash],A.memory.programs--)},Is.prototype.webglContextRestored=function(){this._program=null},Is.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl;let a;const o=t._state,l=t._geometry,c=l._state,u=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,u?e.getRTCViewMatrix(o.originHash,u):i.viewMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh picking vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("out vec4 vViewPosition;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("uniform vec2 pickClipPos;"),a.push("vec4 remapClipPos(vec4 clipPos) {"),a.push(" clipPos.xy /= clipPos.w;"),a.push(" clipPos.xy -= pickClipPos;"),a.push(" clipPos.xy *= clipPos.w;"),a.push(" return clipPos;"),a.push("}"),a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==i&&"cylindrical"!==i||(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"));a.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),a.push(" worldPosition.xyz = worldPosition.xyz + offset;"),a.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = remapClipPos(clipPos);"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(i.push("uniform vec4 pickColor;"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = pickColor; "),i.push("}"),i}(e)}}const vs=h.vec3(),ws=function(e,t){this._hash=e,this._shaderSource=new ys(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},gs={};ws.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=gs[t];if(!s){if(s=new ws(t,e),s.errors)return console.log(s.errors.join("\n")),null;gs[t]=s,A.memory.programs++}return s._useCount++,s},ws.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete gs[this._hash],A.memory.programs--)},ws.prototype.webglContextRestored=function(){this._program=null},ws.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCPickViewMatrix(i.originHash,o):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t>24&255,u=l>>16&255,h=l>>8&255,p=255&l;n.uniform4f(this._uPickColor,p/255,h/255,u/255,c/255),n.uniform2fv(this._uPickClipPos,e.pickClipPos),a.indicesBuf?(n.drawElements(a.primitive,a.indicesBuf.numItems,a.indicesBuf.itemType,0),e.drawElements++):a.positions&&n.drawArrays(n.TRIANGLES,0,a.positions.numItems)},ws.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Se(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,n=!!e._geometry._state.compressGeometry,i=[];i.push("#version 300 es"),i.push("// Surface picking vertex shader"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform vec3 offset;"),s&&(i.push("uniform bool clippable;"),i.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out float isPerspective;"));i.push("uniform vec2 pickClipPos;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy -= pickClipPos;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("out vec4 vColor;"),n&&i.push("uniform mat4 positionsDecodeMatrix;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),n&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push(" vec4 worldPosition = modelMatrix * localPosition; "),i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&i.push(" vWorldPosition = worldPosition;");i.push(" vColor = color;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Surface picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = vColor;"),i.push("}"),i}(e)}}const Ts=h.vec3(),bs=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Es(t),this._allocate(t)},Ds={};bs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Ds[t];if(!s){if(s=new bs(t,e),s.errors)return console.log(s.errors.join("\n")),null;Ds[t]=s,A.memory.programs++}return s._useCount++,s},bs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ds[this._hash],A.memory.programs--)},bs.prototype.webglContextRestored=function(){this._program=null},bs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry,o=t._geometry._state,l=t.origin,c=r.backfaces,u=r.frontface,h=s.camera.project,p=a._getPickTrianglePositions(),d=a._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(h.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}if(n.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(i.originHash,l):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh occlusion vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push("}"),i}(e)}}const Cs=h.vec3(),_s=function(e,t){this._hash=e,this._shaderSource=new Ps(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Rs={};_s.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=Rs[t];if(!s){if(s=new _s(t,e),s.errors)return console.log(s.errors.join("\n")),null;Rs[t]=s,A.memory.programs++}return s._useCount++,s},_s.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Rs[this._hash],A.memory.programs--)},_s.prototype.webglContextRestored=function(){this._program=null},_s.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._material._state,r=t._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?n.disable(n.CULL_FACE):n.enable(n.CULL_FACE),e.backfaces=t);const s=i.frontface;e.frontface!==s&&(s?n.frontFace(n.CCW):n.frontFace(n.CW),e.frontface=s),this._lastMaterialId=i.id}const l=s.camera;if(n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCViewMatrix(r.originHash,o):l.viewMatrix),r.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,n=[];n.push("// Mesh shadow vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),n.push("uniform vec3 offset;"),s&&n.push("uniform mat4 positionsDecodeMatrix;");t&&n.push("out vec4 vWorldPosition;");n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),s&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("worldPosition = modelMatrix * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&n.push("vWorldPosition = worldPosition;");return n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("// Mesh shadow fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return i.push("outColor = encodeFloat(gl_FragCoord.z);"),i.push("}"),i}(e)}}const Os=function(e,t){this._hash=e,this._shaderSource=new Bs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ss={};Os.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let n=Ss[s];if(!n){if(n=new Os(s,e),n.errors)return console.log(n.errors.join("\n")),null;Ss[s]=n,A.memory.programs++}return n._useCount++,n},Os.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ss[this._hash],A.memory.programs--)},Os.prototype.webglContextRestored=function(){this._program=null},Os.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,n=t._material._state,i=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.id!==this._lastMaterialId){const t=n.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const i=n.frontface;e.frontface!==i&&(i?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=i),e.lineWidth!==n.lineWidth&&(s.lineWidth(n.lineWidth),e.lineWidth=n.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,n.pointSize),this._lastMaterialId=n.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),i.combineGeometry){const n=t.vertexBufs;n.id!==this._lastVertexBufsId&&(n.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(n.positionsBuf,n.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=n.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),i.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,i.positionsDecodeMatrix),i.combineGeometry?i.indicesBufCombined&&(i.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),i.indicesBuf&&(i.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=i.id),i.combineGeometry?i.indicesBufCombined&&(s.drawElements(i.primitive,i.indicesBufCombined.numItems,i.indicesBufCombined.itemType,0),e.drawElements++):i.indicesBuf?(s.drawElements(i.primitive,i.indicesBuf.numItems,i.indicesBuf.itemType,0),e.drawElements++):i.positions&&(s.drawArrays(s.TRIANGLES,0,i.positions.numItems),e.drawArrays++)},Os.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Se(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uShadowViewMatrix=n.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=n.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,i,r,a;for(let o=0,l=this._uSectionPlanes.length;o0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const Ws=function(){const e=h.vec3(),t=h.vec3(),s=h.vec3(),n=h.vec3(),i=h.vec3(),r=h.vec3(),a=h.vec4(),o=h.vec3(),l=h.vec3(),c=h.vec3(),u=h.vec3(),p=h.vec3(),d=h.vec3(),A=h.vec3(),f=h.vec3(),I=h.vec3(),m=h.vec4(),y=h.vec4(),v=h.vec4(),w=h.vec3(),g=h.vec3(),E=h.vec3(),T=h.vec3(),b=h.vec3(),D=h.vec3(),P=h.vec3(),C=h.vec3(),_=h.vec3(),R=h.vec3(),B=h.vec3();return function(O,S,N,x){var L=x.primIndex;if(null!=L&&L>-1){const U=O.geometry._state,G=O.scene,j=G.camera,k=G.canvas;if("triangles"===U.primitiveName){x.primitive="triangle";const G=L,Q=U.indices,W=U.positions;let z,K,Y;if(Q){var M=Q[G+0],F=Q[G+1],H=Q[G+2];r[0]=M,r[1]=F,r[2]=H,x.indices=r,z=3*M,K=3*F,Y=3*H}else z=3*G,K=z+3,Y=K+3;if(s[0]=W[z+0],s[1]=W[z+1],s[2]=W[z+2],n[0]=W[K+0],n[1]=W[K+1],n[2]=W[K+2],i[0]=W[Y+0],i[1]=W[Y+1],i[2]=W[Y+2],U.compressGeometry){const e=U.positionsDecodeMatrix;e&&(St.decompressPosition(s,e,s),St.decompressPosition(n,e,n),St.decompressPosition(i,e,i))}x.canvasPos?h.canvasPosToLocalRay(k.canvas,O.origin?V(S,O.origin):S,N,O.worldMatrix,x.canvasPos,e,t):x.origin&&x.direction&&h.worldRayToLocalRay(O.worldMatrix,x.origin,x.direction,e,t),h.normalizeVec3(t),h.rayPlaneIntersect(e,t,s,n,i,a),x.localPos=a,x.position=a,m[0]=a[0],m[1]=a[1],m[2]=a[2],m[3]=1,h.transformVec4(O.worldMatrix,m,y),o[0]=y[0],o[1]=y[1],o[2]=y[2],x.canvasPos&&O.origin&&(o[0]+=O.origin[0],o[1]+=O.origin[1],o[2]+=O.origin[2]),x.worldPos=o,h.transformVec4(j.matrix,y,v),l[0]=v[0],l[1]=v[1],l[2]=v[2],x.viewPos=l,h.cartesianToBarycentric(a,s,n,i,c),x.bary=c;const X=U.normals;if(X){if(U.compressGeometry){const e=3*M,t=3*F,s=3*H;St.decompressNormal(X.subarray(e,e+2),u),St.decompressNormal(X.subarray(t,t+2),p),St.decompressNormal(X.subarray(s,s+2),d)}else u[0]=X[z],u[1]=X[z+1],u[2]=X[z+2],p[0]=X[K],p[1]=X[K+1],p[2]=X[K+2],d[0]=X[Y],d[1]=X[Y+1],d[2]=X[Y+2];const e=h.addVec3(h.addVec3(h.mulVec3Scalar(u,c[0],w),h.mulVec3Scalar(p,c[1],g),E),h.mulVec3Scalar(d,c[2],T),b);x.worldNormal=h.normalizeVec3(h.transformVec3(O.worldNormalMatrix,e,D))}const q=U.uv;if(q){if(A[0]=q[2*M],A[1]=q[2*M+1],f[0]=q[2*F],f[1]=q[2*F+1],I[0]=q[2*H],I[1]=q[2*H+1],U.compressGeometry){const e=U.uvDecodeMatrix;e&&(St.decompressUV(A,e,A),St.decompressUV(f,e,f),St.decompressUV(I,e,I))}x.uv=h.addVec3(h.addVec3(h.mulVec2Scalar(A,c[0],P),h.mulVec2Scalar(f,c[1],C),_),h.mulVec2Scalar(I,c[2],R),B)}}}}}();function zs(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let n=e.height||1;n<0&&(console.error("negative height not allowed - will invert"),n*=-1);let i=e.radialSegments||32;i<0&&(console.error("negative radialSegments not allowed - will invert"),i*=-1),i<3&&(i=3);let r=e.heightSegments||1;r<0&&(console.error("negative heightSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const a=!!e.openEnded;let o=e.center;const l=o?o[0]:0,c=o?o[1]:0,u=o?o[2]:0,h=n/2,p=n/r,d=2*Math.PI/i,A=1/i,f=(t-s)/r,I=[],m=[],v=[],w=[];let g,E,T,b,D,P,C,_,R,B,O;const S=(90-180*Math.atan(n/(s-t))/Math.PI)/90;for(g=0;g<=r;g++)for(D=t-g*f,P=h-g*p,E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),m.push(D*T),m.push(S),m.push(D*b),v.push(E*A),v.push(1*g/r),I.push(D*T+l),I.push(P+c),I.push(D*b+u);for(g=0;g0){for(R=I.length/3,m.push(0),m.push(1),m.push(0),v.push(.5),v.push(.5),I.push(0+l),I.push(h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(t*T),m.push(1),m.push(t*b),v.push(B),v.push(O),I.push(t*T+l),I.push(h+c),I.push(t*b+u);for(E=0;E0){for(R=I.length/3,m.push(0),m.push(-1),m.push(0),v.push(.5),v.push(.5),I.push(0+l),I.push(0-h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(s*T),m.push(-1),m.push(s*b),v.push(B),v.push(O),I.push(s*T+l),I.push(0-h+c),I.push(s*b+u);for(E=0;E":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function Xs(e={}){var t=e.origin||[0,0,0],s=t[0],n=t[1],i=t[2],r=e.size||1,a=[],o=[],l=e.text;y.isNumeric(l)&&(l=""+l);for(var c,u,h,p,d,A,f,I,m,v=(l||"").split("\n"),w=0,g=0,E=.04,T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,n=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const r=fn(s,this.wrapS);r&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,r);const a=fn(s,this.wrapT);if(a&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,a),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=fn(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}i?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,vn(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,vn(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,fn(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,fn(s,this.magFilter)));const o=fn(s,this.format,this.encoding),l=fn(s,this.type),c=yn(s,this.internalFormat,o,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,n,c,e[0].width,e[0].height);for(let t=0,n=e.length;t>t;return e+1}class Tn extends O{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new $e({texture:new mn({gl:this.scene.canvas.gl}),matrix:h.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=h.vec2([0,0]),this._scale=h.vec2([1,1]),this._rotate=h.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),A.memory.textures++}_checkMinFilter(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}_checkMagFilter(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}_checkWrapS(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkWrapT(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this._state.texture=new mn({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=h.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=h.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?h.mulMat4(t,s):s),0!==this._rotate&&(s=h.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?h.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=wn(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=wn(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),A.memory.textures--}}const bn=A.memory,Dn=h.AABB3();class Pn extends bt{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new $e({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=h.OBB3();const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var i;if(t.positionsDecodeMatrix);else{const e=St.getPositionsBounds(t.positions),r=St.compressPositions(t.positions,e.min,e.max);i=r.quantized,s.positionsDecodeMatrix=r.decodeMatrix,s.positionsBuf=new Ne(n,n.ARRAY_BUFFER,i,i.length,3,n.STATIC_DRAW),bn.positions+=s.positionsBuf.numItems,h.positions3ToAABB3(t.positions,this._aabb),h.positions3ToAABB3(i,Dn,s.positionsDecodeMatrix),h.AABB3ToOBB3(Dn,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new Ne(n,n.ARRAY_BUFFER,e,e.length,4,n.STATIC_DRAW),bn.colors+=s.colorsBuf.numItems}if(t.uv){const e=St.getUVBounds(t.uv),i=St.compressUVs(t.uv,e.min,e.max),r=i.quantized;s.uvDecodeMatrix=i.decodeMatrix,s.uvBuf=new Ne(n,n.ARRAY_BUFFER,r,r.length,2,n.STATIC_DRAW),bn.uvs+=s.uvBuf.numItems}if(t.normals){const e=St.compressNormals(t.normals);let i=s.compressGeometry;s.normalsBuf=new Ne(n,n.ARRAY_BUFFER,e,e.length,3,n.STATIC_DRAW,i),bn.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,e,e.length,1,n.STATIC_DRAW),bn.indices+=s.indicesBuf.numItems;const r=Dt(i,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,r,r.length,1,n.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),bn.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),bn.meshes--}}var Cn={};function _n(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return y.apply(e,{primitive:"lines",positions:[l,c,u,l,c,d,l,p,u,l,p,d,h,c,u,h,c,d,h,p,u,h,p,d],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]})}function Rn(e={}){let t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);let s=e.divisions||1;s<0&&(console.error("negative divisions not allowed - will invert"),s*=-1),s<1&&(s=1),t=t||10,s=s||10;const n=t/s,i=t/2,r=[],a=[];let o=0;for(let e=0,t=-i;e<=s;e++,t+=n)r.push(-i),r.push(0),r.push(t),r.push(i),r.push(0),r.push(t),r.push(t),r.push(0),r.push(-i),r.push(t),r.push(0),r.push(i),a.push(o++),a.push(o++),a.push(o++),a.push(o++);return y.apply(e,{primitive:"lines",positions:r,indices:a})}function Bn(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let n=e.xSegments||1;n<0&&(console.error("negative xSegments not allowed - will invert"),n*=-1),n<1&&(n=1);let i=e.xSegments||1;i<0&&(console.error("negative zSegments not allowed - will invert"),i*=-1),i<1&&(i=1);const r=e.center,a=r?r[0]:0,o=r?r[1]:0,l=r?r[2]:0,c=t/2,u=s/2,h=Math.floor(n)||1,p=Math.floor(i)||1,d=h+1,A=p+1,f=t/h,I=s/p,m=new Float32Array(d*A*3),v=new Float32Array(d*A*3),w=new Float32Array(d*A*2);let g,E,T,b,D,P,C,_=0,R=0;for(g=0;g65535?Uint32Array:Uint16Array)(h*p*6);for(g=0;g360&&(r=360);const a=e.center;let o=a?a[0]:0,l=a?a[1]:0;const c=a?a[2]:0,u=[],p=[],d=[],A=[];let f,I,m,v,w,g,E,T,b,D,P,C;for(T=0;T<=i;T++)for(E=0;E<=n;E++)f=E/n*r,I=.785398+T/i*Math.PI*2,o=t*Math.cos(f),l=t*Math.sin(f),m=(t+s*Math.cos(I))*Math.cos(f),v=(t+s*Math.cos(I))*Math.sin(f),w=s*Math.sin(I),u.push(m+o),u.push(v+l),u.push(w+c),d.push(1-E/n),d.push(T/i),g=h.normalizeVec3(h.subVec3([m,v,w],[o,l,c],[]),[]),p.push(g[0]),p.push(g[1]),p.push(g[2]);for(T=1;T<=i;T++)for(E=1;E<=n;E++)b=(n+1)*T+E-1,D=(n+1)*(T-1)+E-1,P=(n+1)*(T-1)+E,C=(n+1)*T+E,A.push(b),A.push(D),A.push(P),A.push(P),A.push(C),A.push(b);return y.apply(e,{positions:u,normals:p,uv:d,indices:A})}function Sn(e={}){if(e.points.length%3!=0)throw"Size of points array for given polyline should be divisible by 3";let t=e.points.length/3;if(t<2)throw"There should be at least 2 points to create a polyline";let s=[];for(let e=0;e>8},Cn.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},Cn.parse={},Cn.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",n=0;ni&&(i=l),cr&&(r=c),ua&&(a=u)}return{min:{x:t,y:s,z:n},max:{x:i,y:r,z:a}}};class Nn extends O{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=h.vec3(t.pos||[0,0,0]),this._up=h.vec3(t.up||[0,1,0]),this._normal=h.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=h.vec3(),this._rtcPos=h.vec3(),this._imageSize=h.vec2(),this._texture=new Tn(this,{flipY:!0}),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new on(this,{matrix:h.inverseMat4(h.lookAtMat4v(this._pos,h.subVec3(this._pos,this._normal,h.mat4()),this._up,h.mat4())),children:[this._bitmapMesh=new Qs(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new Lt(this,Bn({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new Gt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height/e,1,this._height]}}const xn=h.OBB3(),Ln=h.OBB3(),Mn=h.OBB3();class Fn{constructor(e,t,s,n,i,r,a=null,o=0){this.model=e,this.object=null,this.parent=null,this.transform=i,this.textureSet=r,this._matrixDirty=!1,this._matrixUpdateScheduled=!1,this.id=t,this.obb=null,this._aabbLocal=null,this._aabbWorld=h.AABB3(),this._aabbWorldDirty=!1,this.layer=a,this.portionId=o,this._color=new Uint8Array([s[0],s[1],s[2],n]),this._colorize=new Uint8Array([s[0],s[1],s[2],n]),this._colorizing=!1,this._transparent=n<255,this.numTriangles=0,this.origin=null,this.entity=null,i&&i._addMesh(this)}_sceneModelDirty(){this._aabbWorldDirty=!0,this.layer.aabbDirty=!0}_transformDirty(){this._matrixDirty||this._matrixUpdateScheduled||(this.model._meshMatrixDirty(this),this._matrixDirty=!0,this._matrixUpdateScheduled=!0),this._aabbWorldDirty=!0,this.layer.aabbDirty=!0,this.entity&&this.entity._transformDirty()}_updateMatrix(){this.transform&&this._matrixDirty&&this.layer.setMatrix(this.portionId,this.transform.worldMatrix),this._matrixDirty=!1,this._matrixUpdateScheduled=!1}_finalize(e){this.layer.initFlags(this.portionId,e,this._transparent)}_finalize2(){this.layer.flushInitFlags&&this.layer.flushInitFlags()}_setVisible(e){this.layer.setVisible(this.portionId,e,this._transparent)}_setColor(e){this._color[0]=e[0],this._color[1]=e[1],this._color[2]=e[2],this._colorizing||this.layer.setColor(this.portionId,this._color,!1)}_setColorize(e){e?(this._colorize[0]=e[0],this._colorize[1]=e[1],this._colorize[2]=e[2],this.layer.setColor(this.portionId,this._colorize,false),this._colorizing=!0):(this.layer.setColor(this.portionId,this._color,false),this._colorizing=!1)}_setOpacity(e,t){const s=e<255,n=this._transparent!==s;this._color[3]=e,this._colorize[3]=e,this._transparent=s,this._colorizing?this.layer.setColor(this.portionId,this._colorize):this.layer.setColor(this.portionId,this._color),n&&this.layer.setTransparent(this.portionId,t,s)}_setOffset(e){this.layer.setOffset(this.portionId,e)}_setHighlighted(e){this.layer.setHighlighted(this.portionId,e,this._transparent)}_setXRayed(e){this.layer.setXRayed(this.portionId,e,this._transparent)}_setSelected(e){this.layer.setSelected(this.portionId,e,this._transparent)}_setEdges(e){this.layer.setEdges(this.portionId,e,this._transparent)}_setClippable(e){this.layer.setClippable(this.portionId,e,this._transparent)}_setCollidable(e){this.layer.setCollidable(this.portionId,e)}_setPickable(e){this.layer.setPickable(this.portionId,e,this._transparent)}_setCulled(e){this.layer.setCulled(this.portionId,e,this._transparent)}canPickTriangle(){return!1}drawPickTriangles(e,t){}pickTriangleSurface(e){}precisionRayPickSurface(e,t,s,n){return!!this.layer.precisionRayPickSurface&&this.layer.precisionRayPickSurface(this.portionId,e,t,s,n)}canPickWorldPos(){return!0}drawPickDepths(e){this.model.drawPickDepths(e)}drawPickNormals(e){this.model.drawPickNormals(e)}delegatePickedEntity(){return this.parent}getEachVertex(e){this.layer.getEachVertex(this.portionId,e)}set aabb(e){this._aabbLocal=e}get aabb(){if(this._aabbWorldDirty){if(h.AABB3ToOBB3(this._aabbLocal,xn),this.transform?(h.transformOBB3(this.transform.worldMatrix,xn,Ln),h.transformOBB3(this.model.worldMatrix,Ln,Mn),h.OBB3ToAABB3(Mn,this._aabbWorld)):(h.transformOBB3(this.model.worldMatrix,xn,Ln),h.OBB3ToAABB3(Ln,this._aabbWorld)),this.origin){const e=this.origin;this._aabbWorld[0]+=e[0],this._aabbWorld[1]+=e[1],this._aabbWorld[2]+=e[2],this._aabbWorld[3]+=e[0],this._aabbWorld[4]+=e[1],this._aabbWorld[5]+=e[2]}this._aabbWorldDirty=!1}return this._aabbWorld}_destroy(){this.model.scene._renderer.putPickID(this.pickId)}}const Hn=new class{constructor(){this._uint8Arrays={},this._float32Arrays={}}_clear(){this._uint8Arrays={},this._float32Arrays={}}getUInt8Array(e){let t=this._uint8Arrays[e];return t||(t=new Uint8Array(e),this._uint8Arrays[e]=t),t}getFloat32Array(e){let t=this._float32Arrays[e];return t||(t=new Float32Array(e),this._float32Arrays[e]=t),t}};let Un=0;const Gn={NOT_RENDERED:0,COLOR_OPAQUE:1,COLOR_TRANSPARENT:2,SILHOUETTE_HIGHLIGHTED:3,SILHOUETTE_SELECTED:4,SILHOUETTE_XRAYED:5,EDGES_COLOR_OPAQUE:6,EDGES_COLOR_TRANSPARENT:7,EDGES_HIGHLIGHTED:8,EDGES_SELECTED:9,EDGES_XRAYED:10,PICK:11},jn=new Float32Array([1,1,1,1]),Vn=new Float32Array([0,0,0,1]),kn=h.vec4(),Qn=h.vec3(),Wn=h.vec3(),zn=h.mat4();class Kn{constructor(e,t=!1,{instancing:s=!1,edges:n=!1}={}){this._scene=e,this._withSAO=t,this._instancing=s,this._edges=n,this._hash=this._getHash(),this._matricesUniformBlockBufferBindingPoint=0,this._matricesUniformBlockBuffer=this._scene.canvas.gl.createBuffer(),this._matricesUniformBlockBufferData=new Float32Array(96),this._vaoCache=new WeakMap,this._allocate()}_getHash(){return this._scene._sectionPlanesState.getHash()}_buildShader(){return{vertex:this._buildVertexShader(),fragment:this._buildFragmentShader()}}_buildVertexShader(){return[""]}_buildFragmentShader(){return[""]}_addMatricesUniformBlockLines(e,t=!1){return e.push("uniform Matrices {"),e.push(" mat4 worldMatrix;"),e.push(" mat4 viewMatrix;"),e.push(" mat4 projMatrix;"),e.push(" mat4 positionsDecodeMatrix;"),t&&(e.push(" mat4 worldNormalMatrix;"),e.push(" mat4 viewNormalMatrix;")),e.push("};"),e}_addRemapClipPosLines(e,t=1){return e.push("uniform vec2 drawingBufferSize;"),e.push("uniform vec2 pickClipPos;"),e.push("vec4 remapClipPos(vec4 clipPos) {"),e.push(" clipPos.xy /= clipPos.w;"),1===t?e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"):e.push(` clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(${t}));`),e.push(" clipPos.xy *= clipPos.w;"),e.push(" return clipPos;"),e.push("}"),e}getValid(){return this._hash===this._getHash()}setSectionPlanesStateUniforms(e){const t=this._scene,{gl:s}=t.canvas,{model:n,layerIndex:i}=e,r=t._sectionPlanesState.getNumAllocatedSectionPlanes(),a=t._sectionPlanesState.sectionPlanes.length;if(r>0){const o=t._sectionPlanesState.sectionPlanes,l=i*a,c=n.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0&&A.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,A.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),A.lightMaps.length>0&&A.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,A.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),this._withSAO){const t=a.sao;if(t.possible){const s=o.drawingBufferWidth,n=o.drawingBufferHeight;kn[0]=s,kn[1]=n,kn[2]=t.blendCutoff,kn[3]=t.blendFactor,o.uniform4fv(this._uSAOParams,kn),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++}}if(n){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===Gn[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=a.xrayMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===Gn[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=a.highlightMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===Gn[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=a.selectedMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else o.uniform4fv(this._uColor,this._edges?Vn:jn)}this._draw({state:l,frameCtx:e,incrementDrawState:i}),o.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,A.memory.programs--}}class Yn extends Kn{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!1,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=n.pickElementsCount||s.indicesBuf.numItems,r=n.pickElementsOffset?n.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,r),i&&n.drawElements++}}}class Xn extends Yn{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i;const r=[];r.push("#version 300 es"),r.push("// Triangles batching draw vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class qn extends Yn{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching flat-shading draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),n){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}i.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),i.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),i.push("float lambertian = 1.0;"),i.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),i.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),i.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, color.a ));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}class Zn extends Yn{constructor(e){super(e,!1,{instancing:!1,edges:!0})}}class $n extends Zn{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class ei extends Zn{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry edges drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class ti extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class si extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class ni extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class ii extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class ri extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching depth fragment shader"),n.push("precision highp float;"),n.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),n.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),n.push("}"),n}}class ai extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class oi extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class li extends Yn{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Triangles batching quality draw vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),r.push("vFragDepth = 1.0 + clipPos.w;")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Triangles batching quality draw fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),a.push("uniform sampler2D uAOMap;"),a.push("in vec4 vViewPosition;"),a.push("in vec3 vViewNormal;"),a.push("in vec4 vColor;"),a.push("in vec2 vUV;"),a.push("in vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick flat normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class ui extends Yn{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,n=e._sectionPlanesState,i=n.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching color texture fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform sampler2D uColorMap;"),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),r.push("uniform float gammaFactor;"),r.push("vec4 linearToLinear( in vec4 value ) {"),r.push(" return value;"),r.push("}"),r.push("vec4 sRGBToLinear( in vec4 value ) {"),r.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),r.push("}"),r.push("vec4 gammaToLinear( in vec4 value) {"),r.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),r.push("}"),t&&(r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const mi=h.vec3(),yi=h.vec3(),vi=h.vec3(),wi=h.vec3(),gi=h.mat4();class Ei extends Kn{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=mi;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=yi;if(l){const e=vi;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,gi),m=wi,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElements(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0),o.edgeIndicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Ti{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new Jn(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new ti(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new si(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Ii(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Ei(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Xn(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Xn(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new qn(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new qn(this._scene,!0)),this._flatColorRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new ui(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new ui(this._scene,!0)),this._colorTextureRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new li(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new li(this._scene,!0)),this._pbrRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Jn(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ri(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new ai(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new $n(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new ei(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new ti(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new ni(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new ci(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new si(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new ii(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new oi(this._scene)),this._shadowRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Ei(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ii(this._scene)),this._snapInitRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const bi={};let Di=65536,Pi=5e6;class Ci{constructor(){}set doublePrecisionEnabled(e){h.setDoublePrecisionEnabled(e)}get doublePrecisionEnabled(){return h.getDoublePrecisionEnabled()}set maxDataTextureHeight(e){(e=1024*Math.ceil(e/1024))>4096?e=4096:e<1024&&(e=1024),Di=e}get maxDataTextureHeight(){return Di}set maxGeometryBatchSize(e){e<1e5?e=1e5:e>5e6&&(e=5e6),Pi=e}get maxGeometryBatchSize(){return Pi}}const _i=new Ci;class Ri{constructor(){this.maxVerts=_i.maxGeometryBatchSize,this.maxIndices=3*_i.maxGeometryBatchSize,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const Bi=h.mat4(),Oi=h.mat4();function Si(e,t,s){const n=e.length,i=new Uint16Array(n),r=t[0],a=t[1],o=t[2],l=t[3]-r,c=t[4]-a,u=t[5]-o,p=65525,d=p/l,A=p/c,f=p/u,I=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(n))*(i>=0?1:-1),n=e,i=t}return new Int8Array([Math[t](127.5*n+(n<0?-1:0)),Math[s](127.5*i+(i<0?-1:0))])}function Li(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}const Mi=h.mat4(),Fi=h.mat4(),Hi=h.vec4([0,0,0,1]),Ui=h.vec3(),Gi=h.vec3(),ji=h.vec3(),Vi=h.vec3(),ki=h.vec3(),Qi=h.vec3(),Wi=h.vec3();class zi{constructor(e){console.info("Creating VBOBatchingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=bi[t];return s||(s=new Ti(e),bi[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete bi[t],s._destroy()}))),s}(e.model.scene),this._buffer=new Ri(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new $e({origin:h.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=h.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=h.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=h.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.solid=!!e.solid}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)for(let e=0,t=r.length;e0){const e=Mi;m?h.inverseMat4(h.transposeMat4(m,Fi),e):h.identityMat4(e,e),function(e,t,s,n,i){function r(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let a,o,l,c,u,p,d=new Float32Array([0,0,0,0]),A=new Float32Array([0,0,0,0]);for(p=0;pu&&(l=a,u=c),a=xi(A,"floor","ceil"),o=Li(a),c=r(A,o),c>u&&(l=a,u=c),a=xi(A,"ceil","ceil"),o=Li(a),c=r(A,o),c>u&&(l=a,u=c),n[i+p+0]=l[0],n[i+p+1]=l[1],n[i+p+2]=0}(e,i,i.length,w.normals,w.normals.length)}if(l)for(let e=0,t=l.length;e0)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0){const n=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):Si(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=h.mat4());if(e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const n=new Int8Array(s.normals);let i=!0;e.normalsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.normals.length,3,t.STATIC_DRAW,i)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.uv.length>0)if(e.uvDecodeMatrix){let n=!1;e.uvBuf=new Ne(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,n)}else{const n=St.getUVBounds(s.uv),i=St.compressUVs(s.uv,n.min,n.max),r=i.quantized;let a=!1;e.uvDecodeMatrix=h.mat3(i.decodeMatrix),e.uvBuf=new Ne(t,t.ARRAY_BUFFER,r,r.length,2,t.STATIC_DRAW,a)}if(s.metallicRoughness.length>0){const n=new Uint8Array(s.metallicRoughness);let i=!1;e.metallicRoughnessBuf=new Ne(t,t.ARRAY_BUFFER,n,s.metallicRoughness.length,2,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n),r=!1;e.flagsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const n=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,n,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,n=this._portions[s],i=4*n.vertsBaseIndex,r=4*n.numVerts,a=this._scratchMemory.getUInt8Array(r),o=t[0],l=t[1],c=t[2],u=t[3];for(let e=0;ey)&&(y=e,n.set(v),i&&h.triangleNormal(A,f,I,i),m=!0)}}return m&&i&&(h.transformVec3(this.model.worldNormalMatrix,i,i),h.normalizeVec3(i)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class Ki extends Kn{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),i&&n.drawElements++)}}class Yi extends Ki{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i,r,a;const o=[];for(o.push("#version 300 es"),o.push("// Instancing geometry drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec2 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;"),i=0,r=s.lights.length;i= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),n&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),o.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),i=0,r=s.lights.length;i0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class Xi extends Ki{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let n,i;const r=t.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry flat-shading drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),r){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),n=0,i=s.lights.length;n0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing fill fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Ji extends Ki{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class Zi extends Ji{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class $i extends Ji{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesColorRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class er extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class tr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class sr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class nr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class ir extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("precision highp float;"),r.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),r.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),r.push("}"),r}}class rr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class ar extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const or={3e3:"linearToLinear",3001:"sRGBToLinear"};class lr extends Ki{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Instancing geometry quality drawing vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("in vec4 modelNormalMatrixCol0;"),r.push("in vec4 modelNormalMatrixCol1;"),r.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),r.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Instancing geometry quality drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),a.push("#define PI 3.14159265359"),a.push("#define RECIPROCAL_PI 0.31830988618"),a.push("#define RECIPROCAL_PI2 0.15915494"),a.push("#define EPSILON 1e-6"),a.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),a.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),a.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),a.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),a.push(" return normalize(surf_norm );"),a.push(" }"),a.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),a.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),a.push(" vec2 st0 = dFdx( uv.st );"),a.push(" vec2 st1 = dFdy( uv.st );"),a.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),a.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),a.push(" vec3 N = normalize( surf_norm );"),a.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),a.push(" mat3 tsn = mat3( S, T, N );"),a.push(" return normalize( tsn * mapN );"),a.push("}"),a.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),a.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),a.push("}"),a.push("struct IncidentLight {"),a.push(" vec3 color;"),a.push(" vec3 direction;"),a.push("};"),a.push("struct ReflectedLight {"),a.push(" vec3 diffuse;"),a.push(" vec3 specular;"),a.push("};"),a.push("struct Geometry {"),a.push(" vec3 position;"),a.push(" vec3 viewNormal;"),a.push(" vec3 worldNormal;"),a.push(" vec3 viewEyeDir;"),a.push("};"),a.push("struct Material {"),a.push(" vec3 diffuseColor;"),a.push(" float specularRoughness;"),a.push(" vec3 specularColor;"),a.push(" float shine;"),a.push("};"),a.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),a.push(" float r = ggxRoughness + 0.0001;"),a.push(" return (2.0 / (r * r) - 2.0);"),a.push("}"),a.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),a.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),a.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),a.push("}"),n.reflectionMaps.length>0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = "+or[n.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = "+or[n.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class ur extends Ki{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState;let i,r;const a=s.getNumAllocatedSectionPlanes()>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),a){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}for(o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=n.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const mr=h.vec3(),yr=h.vec3(),vr=h.vec3(),wr=h.vec3(),gr=h.mat4();class Er extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=mr;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=yr;if(l){const e=h.transformPoint3(u,l,vr);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,gr),m=wr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0,o.numInstances),o.edgeIndicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Tr{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new qi(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new er(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new tr(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Ir(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Er(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Yi(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Yi(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new Xi(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new Xi(this._scene,!0)),this._flatColorRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new lr(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new lr(this._scene,!0)),this._pbrRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new ur(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new ur(this._scene,!0)),this._colorTextureRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new qi(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ir(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new rr(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Zi(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new $i(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new er(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new sr(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new cr(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new tr(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new nr(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new ar(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ir(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Er(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const br={};const Dr=new Uint8Array(4),Pr=new Float32Array(1),Cr=h.vec4([0,0,0,1]),_r=new Float32Array(3),Rr=h.vec3(),Br=h.vec3(),Or=h.vec3(),Sr=h.vec3(),Nr=h.vec3(),xr=h.vec3(),Lr=h.vec3(),Mr=new Float32Array(4);class Fr{constructor(e){console.info("Creating VBOInstancingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=br[t];return s||(s=new Tr(e),br[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete br[t],s._destroy()}))),s}(e.model.scene),this._aabb=h.collapseAABB3(),this._state=new $e({numInstances:0,obb:h.OBB3(),origin:h.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrix=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;e.colorsBuf=new Ne(n,n.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,n.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new Ne(n,n.ARRAY_BUFFER,t,this._metallicRoughness.length,2,n.STATIC_DRAW,s)}if(r>0){let t=!1;e.flagsBuf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(r),r,1,n.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,n.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new Ne(n,n.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,n.STATIC_DRAW,s),e.positionsDecodeMatrix=h.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),i=!1;e.colorsBuf=new Ne(n,n.ARRAY_BUFFER,s,s.length,4,n.STATIC_DRAW,i)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new Ne(n,n.ARRAY_BUFFER,s,s.length,2,n.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,n.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,n.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelMatrixCol1Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelMatrixCol2Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new Ne(n,n.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,n.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Dr[0]=t[0],Dr[1]=t[1],Dr[2]=t[2],Dr[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Dr,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&z),i=!!(t&J),r=!!(t&Z),a=!!(t&$),o=!!(t&ee),l=!!(t&Y),c=!!(t&K);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?Gn.NOT_RENDERED:s?Gn.COLOR_TRANSPARENT:Gn.COLOR_OPAQUE,h=!n||c?Gn.NOT_RENDERED:a?Gn.SILHOUETTE_SELECTED:r?Gn.SILHOUETTE_HIGHLIGHTED:i?Gn.SILHOUETTE_XRAYED:Gn.NOT_RENDERED;let p=0;p=!n||c?Gn.NOT_RENDERED:a?Gn.EDGES_SELECTED:r?Gn.EDGES_HIGHLIGHTED:i?Gn.EDGES_XRAYED:o?s?Gn.EDGES_COLOR_TRANSPARENT:Gn.EDGES_COLOR_OPAQUE:Gn.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?Gn.PICK:Gn.NOT_RENDERED)<<12,d|=(t&X?1:0)<<16,Pr[0]=d,this._state.flagsBuf&&this._state.flagsBuf.setData(Pr,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(_r[0]=t[0],_r[1]=t[1],_r[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(_r,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,n=s.geometry,i=this._portions[e];if(!i)return void this.model.error("portion not found: "+e);const r=n.quantizedPositions,a=s.origin,o=i.offset,l=a[0]+o[0],c=a[1]+o[1],u=a[2]+o[2],p=Cr,d=i.matrix,A=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=r.length;ev)&&(v=e,n.set(w),i&&h.triangleNormal(f,I,m,i),y=!0)}}return y&&i&&(h.transformVec3(o.normalMatrix,i,i),h.transformVec3(this.model.worldNormalMatrix,i,i),h.normalizeVec3(i)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class Hr extends Kn{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),i&&n.drawElements++}}class Ur extends Hr{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Gr extends Hr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const jr=h.vec3(),Vr=h.vec3(),kr=h.vec3(),Qr=h.vec3(),Wr=h.mat4();class zr extends Kn{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=jr;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Vr;if(l){const e=kr;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Wr),m=Qr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Kr=h.vec3(),Yr=h.vec3(),Xr=h.vec3(),qr=h.vec3(),Jr=h.mat4();class Zr extends Kn{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Kr;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Yr;if(l){const e=Xr;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Jr),m=qr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class $r{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Ur(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Gr(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new zr(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Zr(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const ea={};class ta{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}class sa{constructor(e){console.info("Creating VBOBatchingLinesLayer"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=ea[t];return s||(s=new $r(e),ea[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete ea[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new ta(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new $e({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:h.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=h.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=h.vec3(e.origin))}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=Si(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.colors.length>0){const n=s.colors.length/4,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2],c=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines instancing color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class ra extends na{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const aa=h.vec3(),oa=h.vec3(),la=h.vec3();h.vec3();const ca=h.mat4();class ua extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=aa;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=oa;if(l){const e=h.transformPoint3(u,l,la);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,ca),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),o.indicesBuf.bind(),r.drawElementsInstanced(r.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind(),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ha=h.vec3(),pa=h.vec3(),da=h.vec3();h.vec3();const Aa=h.mat4();class fa extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=ha;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=pa;if(l){const e=h.transformPoint3(u,l,da);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Aa),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Ia{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._snapInitRenderer||(this._snapInitRenderer=new ua(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new fa(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new ia(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new ra(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new ua(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new fa(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const ma={};const ya=new Uint8Array(4),va=new Float32Array(1),wa=new Float32Array(3),ga=new Float32Array(4);class Ea{constructor(e){console.info("VBOInstancingLinesLayer"),this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=ma[t];return s||(s=new Ia(e),ma[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete ma[t],s._destroy()}))),s}(e.model.scene),this._aabb=h.collapseAABB3(),this._state=new $e({obb:h.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,e.origin&&(this._state.origin=h.vec3(e.origin)),this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;this._state.colorsBuf=new Ne(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(i>0){let t=!1;this._state.flagsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(i),i,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(s.colorsCompressed&&s.colorsCompressed.length>0){const n=new Uint8Array(s.colorsCompressed),i=!1;t.colorsBuf=new Ne(e,e.ARRAY_BUFFER,n,n.length,4,e.STATIC_DRAW,i)}if(s.positionsCompressed&&s.positionsCompressed.length>0){const n=!1;t.positionsBuf=new Ne(e,e.ARRAY_BUFFER,s.positionsCompressed,s.positionsCompressed.length,3,e.STATIC_DRAW,n),t.positionsDecodeMatrix=h.mat4(s.positionsDecodeMatrix)}if(s.indices&&s.indices.length>0&&(t.indicesBuf=new Ne(e,e.ELEMENT_ARRAY_BUFFER,new Uint32Array(s.indices),s.indices.length,1,e.STATIC_DRAW),t.numIndices=s.indices.length),this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";ya[0]=t[0],ya[1]=t[1],ya[2]=t[2],ya[3]=t[3],this._state.colorsBuf.setData(ya,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&z),i=!!(t&J),r=!!(t&Z),a=!!(t&$),o=!!(t&ee),l=!!(t&Y),c=!!(t&K);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?Gn.NOT_RENDERED:s?Gn.COLOR_TRANSPARENT:Gn.COLOR_OPAQUE,h=!n||c?Gn.NOT_RENDERED:a?Gn.SILHOUETTE_SELECTED:r?Gn.SILHOUETTE_HIGHLIGHTED:i?Gn.SILHOUETTE_XRAYED:Gn.NOT_RENDERED;let p=0;p=!n||c?Gn.NOT_RENDERED:a?Gn.EDGES_SELECTED:r?Gn.EDGES_HIGHLIGHTED:i?Gn.EDGES_XRAYED:o?s?Gn.EDGES_COLOR_TRANSPARENT:Gn.EDGES_COLOR_OPAQUE:Gn.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?Gn.PICK:Gn.NOT_RENDERED)<<12,d|=(t&X?255:0)<<16,va[0]=d,this._state.flagsBuf.setData(va,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(wa[0]=t[0],wa[1]=t[1],wa[2]=t[2],this._state.offsetsBuf.setData(wa,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;ga[0]=t[0],ga[1]=t[4],ga[2]=t[8],ga[3]=t[12],this._state.modelMatrixCol0Buf.setData(ga,s),ga[0]=t[1],ga[1]=t[5],ga[2]=t[9],ga[3]=t[13],this._state.modelMatrixCol1Buf.setData(ga,s),ga[0]=t[2],ga[1]=t[6],ga[2]=t[10],ga[3]=t[14],this._state.modelMatrixCol2Buf.setData(ga,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,Gn.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,Gn.PICK)}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class Ta extends Kn{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),i&&n.drawArrays++}}class ba extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial,n=[];return n.push("#version 300 es"),n.push("// Points batching color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Da extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 color;"),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching silhouette vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}class Pa extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class Ca extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batched pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batched pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class _a extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push(" gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching occlusion fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}const Ra=h.vec3(),Ba=h.vec3(),Oa=h.vec3(),Sa=h.vec3(),Na=h.mat4();class xa extends Kn{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Ra;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Ba;if(l){const e=Oa;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Na),m=Sa,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const La=h.vec3(),Ma=h.vec3(),Fa=h.vec3(),Ha=h.vec3(),Ua=h.mat4();class Ga extends Kn{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=La;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Ma;if(l){const e=Fa;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Ua),m=Ha,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class ja{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new ba(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Da(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Pa(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Ca(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new _a(this._scene)),this._occlusionRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new xa(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Ga(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Va={};class ka{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}class Qa{constructor(e){console.info("Creating VBOBatchingPointsLayer"),this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Va[t];return s||(s=new ja(e),Va[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Va[t],s._destroy()}))),s}(e.model.scene),this._buffer=new ka(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new $e({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:h.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=h.collapseAABB3(),this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=h.vec3(e.origin))}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=Si(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Ka extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 silhouetteColor;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Ya extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick mesh fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class Xa extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class qa extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Ja extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing depth vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class Za extends Wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }"),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const $a=h.vec3(),eo=h.vec3(),to=h.vec3();h.vec3();const so=h.mat4();class no extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=$a;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=eo;if(l){const e=h.transformPoint3(u,l,to);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,so),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),r.drawArraysInstanced(r.POINTS,0,o.positionsBuf.numItems,o.numInstances),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const io=h.vec3(),ro=h.vec3(),ao=h.vec3();h.vec3();const oo=h.mat4();class lo extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=io;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=ro;if(l){const e=h.transformPoint3(u,l,ao);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,oo),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class co{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new za(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ka(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Ja(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Ya(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Xa(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new qa(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new Za(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new no(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new lo(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const uo={};const ho=new Uint8Array(4),po=new Float32Array(1),Ao=new Float32Array(3),fo=new Float32Array(4);class Io{constructor(e){console.info("VBOInstancingPointsLayer"),this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=uo[t];return s||(s=new co(e),uo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete uo[t],s._destroy()}))),s}(e.model.scene),this._aabb=h.collapseAABB3(),this._state=new $e({obb:h.OBB3(),numInstances:0,origin:e.origin?h.vec3(e.origin):null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let n=!1;s.flagsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,n)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;s.offsetsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(n.positionsCompressed&&n.positionsCompressed.length>0){const t=!1;s.positionsBuf=new Ne(e,e.ARRAY_BUFFER,n.positionsCompressed,n.positionsCompressed.length,3,e.STATIC_DRAW,t),s.positionsDecodeMatrix=h.mat4(n.positionsDecodeMatrix)}if(n.colorsCompressed&&n.colorsCompressed.length>0){const t=new Uint8Array(n.colorsCompressed),i=!1;s.colorsBuf=new Ne(e,e.ARRAY_BUFFER,t,t.length,4,e.STATIC_DRAW,i)}if(this._modelMatrixCol0.length>0){const t=!1;s.modelMatrixCol0Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),s.modelMatrixCol1Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),s.modelMatrixCol2Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;s.pickColorsBuf=new Ne(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}s.geometry=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";ho[0]=t[0],ho[1]=t[1],ho[2]=t[2],this._state.colorsBuf.setData(ho,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&z),i=!!(t&J),r=!!(t&Z),a=!!(t&$),o=!!(t&ee),l=!!(t&Y),c=!!(t&K);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?Gn.NOT_RENDERED:s?Gn.COLOR_TRANSPARENT:Gn.COLOR_OPAQUE,h=!n||c?Gn.NOT_RENDERED:a?Gn.SILHOUETTE_SELECTED:r?Gn.SILHOUETTE_HIGHLIGHTED:i?Gn.SILHOUETTE_XRAYED:Gn.NOT_RENDERED;let p=0;p=!n||c?Gn.NOT_RENDERED:a?Gn.EDGES_SELECTED:r?Gn.EDGES_HIGHLIGHTED:i?Gn.EDGES_XRAYED:o?s?Gn.EDGES_COLOR_TRANSPARENT:Gn.EDGES_COLOR_OPAQUE:Gn.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?Gn.PICK:Gn.NOT_RENDERED)<<12,d|=(t&X?255:0)<<16,po[0]=d,this._state.flagsBuf.setData(po,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Ao[0]=t[0],Ao[1]=t[1],Ao[2]=t[2],this._state.offsetsBuf.setData(Ao,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;fo[0]=t[0],fo[1]=t[4],fo[2]=t[8],fo[3]=t[12],this._state.modelMatrixCol0Buf.setData(fo,s),fo[0]=t[1],fo[1]=t[5],fo[2]=t[9],fo[3]=t[13],this._state.modelMatrixCol1Buf.setData(fo,s),fo[0]=t[2],fo[1]=t[6],fo[2]=t[10],fo[3]=t[14],this._state.modelMatrixCol2Buf.setData(fo,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,Gn.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,Gn.PICK)}drawPickNormals(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,Gn.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,Gn.PICK)}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}const mo=h.vec3(),yo=h.vec3(),vo=h.mat4();class wo{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uPerObjectDecodeMatrix,this._uPerVertexPosition,this.uPerObjectColorAndFlags,this._uPerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=mo;if(I){const t=h.transformPoint3(p,c,yo);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,vo)}else f=A;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,8),a.drawArrays(a.LINES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,16),a.drawArrays(a.LINES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,32),a.drawArrays(a.LINES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// LinesDataTextureColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uPerObjectDecodeMatrix;"),s.push("uniform highp sampler2D uPerObjectMatrix;"),s.push("uniform lowp usampler2D uPerObjectColorAndFlags;"),s.push("uniform mediump usampler2D uPerVertexPosition;"),s.push("uniform highp usampler2D uPerLineIndices;"),s.push("uniform mediump usampler2D uPerLineObject;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push(" int lineIndex = gl_VertexID / 2;"),s.push(" int h_packed_object_id_index = (lineIndex >> 3) & 4095;"),s.push(" int v_packed_object_id_index = (lineIndex >> 3) >> 12;"),s.push(" int objectIndex = int(texelFetch(uPerLineObject, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push(" ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" } else {"),s.push(" ivec4 packedVertexBase = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push(" ivec4 packedLineIndexBaseOffset = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push(" int lineIndexBaseOffset = (packedLineIndexBaseOffset.r << 24) + (packedLineIndexBaseOffset.g << 16) + (packedLineIndexBaseOffset.b << 8) + packedLineIndexBaseOffset.a;"),s.push(" int h_index = (lineIndex - lineIndexBaseOffset) & 4095;"),s.push(" int v_index = (lineIndex - lineIndexBaseOffset) >> 12;"),s.push(" ivec3 vertexIndices = ivec3(texelFetch(uPerLineIndices, ivec2(h_index, v_index), 0));"),s.push(" ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push(" int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push(" int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push(" mat4 objectInstanceMatrix = mat4 (texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" vec3 position = vec3(texelFetch(uPerVertexPosition, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" uvec4 color = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push(" if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" };"),s.push(" vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push(" vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push(" vFragDepth = 1.0 + clipPos.w;"),s.push(" isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push(" gl_Position = clipPos;"),s.push(" vec4 rgb = vec4(color.rgba);"),s.push(" vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// LinesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class go{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null)}eagerCreateRenders(){}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new wo(this._scene,!1)),this._colorRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy()}}const Eo={};class To{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perLineNumberPortionId8Bits=[],this.perLineNumberPortionId16Bits=[],this.perLineNumberPortionId32Bits=[]}}class bo{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerLineIdPortionIds8Bits=null,this.texturePerLineIdPortionIds16Bits=null,this.texturePerLineIdPortionIds32Bits=null,this.texturePerLineIdIndices8Bits=null,this.texturePerLineIdIndices16Bits=null,this.texturePerLineIdIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerLineIdIndices8Bits,16:this.texturePerLineIdIndices16Bits,32:this.texturePerLineIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerLineIdPortionIds8Bits,16:this.texturePerLineIdPortionIds16Bits,32:this.texturePerLineIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindLineIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}}class Do{constructor(e,t,s,n,i=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=n,this._textureData=i}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const Po={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalLines:0,totalLines8Bits:0,totalLines16Bits:0,totalLines32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Po,null,4));let e=0;Object.keys(Po).forEach((t=>{t.startsWith("size")&&(e+=Po[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/Po.totalLines).toFixed(2)}`);let t={};Object.keys(Po).forEach((s=>{s.startsWith("size")&&(t[s]=`${(Po[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class Co{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateTextureForColorsAndFlags(e,t,s,n,i){const r=t.length;this.numPortions=r;const a=4096,o=Math.ceil(r/512);if(0===o)throw"texture height===0";const l=new Uint8Array(16384*o);Po.sizeDataColorsAndFlags+=l.byteLength,Po.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),l.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20);const c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,a,o),e.texSubImage2D(e.TEXTURE_2D,0,0,0,a,o,e.RGBA_INTEGER,e.UNSIGNED_BYTE,l,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,c,a,o,l)}generateTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);Po.sizeDataTextureOffsets+=i.byteLength,Po.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,r,s,n,i)}generateTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);Po.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Eo[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new To,this._dataTextureState=new bo,this._dataTextureGenerator=new Co,this._state=new $e({origin:h.vec3(t.origin),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&Po.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/2})),(this._state.numVertices+n>4096*Ro||t+i>4096*Ro)&&Po.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*Ro&&t+i<=4096*Ro}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/2/8)*2;Po.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}const s=t.positionsCompressed,n=t.indices,i=this._buffer;i.positionsCompressed.push(s);const r=i.lenPositionsCompressed/3,a=s.length/3;let o;i.lenPositionsCompressed+=s.length;let l=0;if(n){let e;l=n.length/2,a<=256?(e=i.indices8Bits,o=i.lenIndices8Bits/2,i.lenIndices8Bits+=n.length):a<=65536?(e=i.indices16Bits,o=i.lenIndices16Bits/2,i.lenIndices16Bits+=n.length):(e=i.indices32Bits,o=i.lenIndices32Bits/2,i.lenIndices32Bits+=n.length),e.push(n)}this._state.numVertices+=a,Po.numberOfGeometries++;return{vertexBase:r,numVertices:a,numLines:l,indicesBase:o}}_createSubPortion(e,t){const s=e.color,n=e.colors,i=e.opacity,r=e.meshMatrix,a=e.pickColor,o=this._buffer,l=this._state;o.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),o.perObjectInstancePositioningMatrices.push(r||xo),o.perObjectSolid.push(!!e.solid),n?o.perObjectColors.push([255*n[0],255*n[1],255*n[2],255]):s&&o.perObjectColors.push([s[0],s[1],s[2],i]),o.perObjectPickColors.push(a),o.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?l.numIndices8Bits:t.numVertices<=65536?l.numIndices16Bits:l.numIndices32Bits,o.perObjectIndexBaseOffsets.push(e/2-t.indicesBase)}const c=this._subPortions.length;if(t.numLines>0){let e,s=2*t.numLines;t.numVertices<=256?(e=o.perLineNumberPortionId8Bits,l.numIndices8Bits+=s,Po.totalLines8Bits+=t.numLines):t.numVertices<=65536?(e=o.perLineNumberPortionId16Bits,l.numIndices16Bits+=s,Po.totalLines16Bits+=t.numLines):(e=o.perLineNumberPortionId32Bits,l.numIndices32Bits+=s,Po.totalLines32Bits+=t.numLines),Po.totalLines+=t.numLines;for(let s=0;s0&&(t.texturePerLineIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerLineIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerLineIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,Oo))}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),h.bindTexture(h.TEXTURE_2D,u.texturePerObjectColorsAndFlags._texture),h.texSubImage2D(h.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,h.RGBA_INTEGER,h.UNSIGNED_BYTE,Oo))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,Oo))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,So))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,Bo))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){}drawSilhouetteHighlighted(e,t){}drawSilhouetteSelected(e,t){}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}setPickMatrices(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawSnapInit(e,t){}drawSnap(e,t){}drawPickNormals(e,t){}destroy(){if(this._destroyed)return;const e=this._state;this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const Mo=h.vec3(),Fo=h.vec3(),Ho=h.vec3();h.vec3();const Uo=h.vec4(),Go=h.mat4();class jo{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Mo;if(I){const t=h.transformPoint3(p,c,Fo);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(i.viewMatrix,e,Go),f=Ho,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new Se(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uLightAmbient=n.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const i=s.lights;let r;for(let e=0,t=i.length;e0;let i;const r=[];r.push("#version 300 es"),r.push("// TrianglesDataTextureColorRenderer vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("uniform mat4 sceneModelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),r.push("uniform highp sampler2D uTexturePerObjectMatrix;"),r.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),r.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),r.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),r.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),r.push("uniform vec3 uCameraEyeRtc;"),r.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("out float isPerspective;")),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),r.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),r.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),r.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),r.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),r.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),r.push("if (int(flags.x) != renderPass) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("} else {"),r.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),r.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),r.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),r.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),r.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),r.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),r.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),r.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),r.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),r.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),r.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),r.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),r.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),r.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),r.push("if (color.a == 0u) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("};"),r.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),r.push("vec3 position;"),r.push("position = positions[gl_VertexID % 3];"),r.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),r.push("if (solid != 1u) {"),r.push("if (isPerspectiveMatrix(projMatrix)) {"),r.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),r.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("} else {"),r.push("if (viewNormal.z < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("}"),r.push("}"),r.push("vec4 worldPosition = sceneModelMatrix * ((objectDecodeAndInstanceMatrix * vec4(position, 1.0))); "),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Vo=new Float32Array([1,1,1]),ko=h.vec3(),Qo=h.vec3(),Wo=h.vec3();h.vec3();const zo=h.mat4();class Ko{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=ko;if(c){const t=Qo;h.transformPoint3(p,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,zo),I=Wo,I[0]=i.eye[0]-e[0],I[1]=i.eye[1]-e[1],I[2]=i.eye[2]-e[2]}else f=A,I=i.eye;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s===Gn.SILHOUETTE_XRAYED){const e=n.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.SILHOUETTE_HIGHLIGHTED){const e=n.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.SILHOUETTE_SELECTED){const e=n.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,Vo);if(n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=n._sectionPlanesState.getNumAllocatedSectionPlanes(),y=n._sectionPlanesState.sectionPlanes.length;if(m>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = color;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Yo=new Float32Array([0,0,0,1]),Xo=h.vec3(),qo=h.vec3();h.vec3();const Jo=h.mat4();class Zo{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Xo;if(I){const t=h.transformPoint3(p,c,qo);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,Jo)}else f=A;if(a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===Gn.EDGES_XRAYED){const e=i.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.EDGES_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.EDGES_SELECTED){const e=i.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,Yo);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("mat4 matrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer fragment shader"),e.logarithmicDepthBufferEnabled&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const $o=h.vec3(),el=h.vec3(),tl=h.mat4();class sl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=$o;if(I){const t=h.transformPoint3(p,c,el);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,tl)}else f=A;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uObjectPerObjectOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const nl=h.vec3(),il=h.vec3(),rl=h.vec3(),al=h.mat4();class ol{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n;let A,f;l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=nl;if(I){const t=h.transformPoint3(p,c,il);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(r.viewMatrix,e,al),f=rl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=r.viewMatrix,f=r.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const e=2/(Math.log(r.project.far+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,e)}const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry picking fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uvec4 vFlags2;");for(var n=0;n 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outPickColor = vPickColor; "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ll=h.vec3(),cl=h.vec3(),ul=h.vec3();h.vec3();const hl=h.mat4();class pl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=e.pickViewMatrix||r.viewMatrix;let f,I;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const t=ll;if(c){const e=cl;h.transformPoint3(p,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],f=V(A,t,hl),I=ul,I[0]=r.eye[0]-t[0],I[1]=r.eye[1]-t[1],I[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=A,I=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniform1f(this._uPickZNear,e.pickZNear),a.uniform1f(this._uPickZFar,e.pickZFar),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform float pickZNear;"),s.push("uniform float pickZFar;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(var n=0;n 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),s.push(" outPackedDepth = packDepth(zNormalizedDepth); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const dl=h.vec3(),Al=h.vec3(),fl=h.vec3(),Il=h.vec3();h.vec3();const ml=h.mat4();class yl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=dl;let m,y;I[0]=h.safeInv(A[3]-A[0])*h.MAX_INT,I[1]=h.safeInv(A[4]-A[1])*h.MAX_INT,I[2]=h.safeInv(A[5]-A[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(I[0]),e.snapPickCoordinateScale[1]=h.safeInv(I[1]),e.snapPickCoordinateScale[2]=h.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=Al;if(v){const e=h.transformPoint3(p,c,fl);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=V(f,t,ml),y=Il,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(T,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(T,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(T,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const vl=h.vec3(),wl=h.vec3(),gl=h.vec3(),El=h.vec3();h.vec3();const Tl=h.mat4();class bl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=vl;let m,y;I[0]=h.safeInv(A[3]-A[0])*h.MAX_INT,I[1]=h.safeInv(A[4]-A[1])*h.MAX_INT,I[2]=h.safeInv(A[5]-A[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(I[0]),e.snapPickCoordinateScale[1]=h.safeInv(I[1]),e.snapPickCoordinateScale[2]=h.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=wl;if(v){const e=gl;h.transformPoint3(p,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=V(f,t,Tl),y=El,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this._uVectorA,e.snapVectorA),a.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Dl=h.vec3(),Pl=h.vec3(),Cl=h.vec3();h.vec3();const _l=h.mat4();class Rl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=e.pickViewMatrix||r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=Dl;if(c){const t=Pl;h.transformPoint3(p,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,_l),I=Cl,I[0]=r.eye[0]-e[0],I[1]=r.eye[1]-e[1],I[2]=r.eye[2]-e[2]}else f=A,I=r.eye;a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureOcclusionRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Bl=h.vec3(),Ol=h.vec3(),Sl=h.vec3();h.vec3();const Nl=h.mat4();class xl{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Bl;if(I){const t=h.transformPoint3(p,c,Ol);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(i.viewMatrix,e,Nl),f=Sl,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("objectDecodeAndInstanceMatrix"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture draw vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out highp vec2 vHighPrecisionZW;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in highp vec2 vHighPrecisionZW;"),s.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),s.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Ll=h.vec3(),Ml=h.vec3(),Fl=h.vec3();h.vec3();const Hl=h.mat4();class Ul{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const I=0!==l[0]||0!==l[1]||0!==l[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(I||m){const e=Ll;if(I){const t=Ml;h.transformPoint3(u,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],A=V(d,e,Hl),f=Fl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=d,f=r.eye;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.uniformMatrix4fv(this._uWorldNormalMatrix,!1,n.worldNormalMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 objectDecodeAndInstanceMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(Te.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Gl=h.vec3(),jl=h.vec3(),Vl=h.vec3();h.vec3(),h.vec4();const kl=h.mat4();class Ql{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Gl;if(I){const t=h.transformPoint3(p,c,jl);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(i.viewMatrix,e,kl),f=Vl,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// trianglesDatatextureNormalsRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("in vec4 vWorldPosition;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(` outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Wl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new Ko(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new ol(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new pl(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new Ql(this._scene)),this._snapRenderer||(this._snapRenderer=new yl(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new bl(this._scene)),this._snapRenderer||(this._snapRenderer=new yl(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new jo(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new jo(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ko(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new xl(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Ul(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Zo(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new sl(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new ol(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Ql(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Ql(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new pl(this._scene)),this._pickDepthRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new yl(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new bl(this._scene)),this._snapInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Rl(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const zl={};class Kl{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.metallicRoughness=[],this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.edgeIndices8Bits=[],this.lenEdgeIndices8Bits=0,this.edgeIndices16Bits=[],this.lenEdgeIndices16Bits=0,this.edgeIndices32Bits=[],this.lenEdgeIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class Yl{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindTriangleIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}bindEdgeIndicesTextures(e,t,s,n){this.edgeIndicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[n].bindTexture(e,s,6)}}const Xl={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Xl,null,4));let e=0;Object.keys(Xl).forEach((t=>{t.startsWith("size")&&(e+=Xl[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/Xl.totalPolygons).toFixed(2)}`);let t={};Object.keys(Xl).forEach((s=>{s.startsWith("size")&&(t[s]=`${(Xl[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class ql{constructor(){}disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}createTextureForColorsAndFlags(e,t,s,n,i,r,a){const o=t.length;this.numPortions=o;const l=4096,c=Math.ceil(o/512);if(0===c)throw"texture height===0";const u=new Uint8Array(16384*c);Xl.sizeDataColorsAndFlags+=u.byteLength,Xl.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),u.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20),u.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+24),u.set([a[e]?1:0,0,0,0],32*e+28);const h=e.createTexture();return e.bindTexture(e.TEXTURE_2D,h),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,c),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,c,e.RGBA_INTEGER,e.UNSIGNED_BYTE,u,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,h,l,c,u)}createTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);Xl.sizeDataTextureOffsets+=i.byteLength,Xl.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,r,s,n,i)}createTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);Xl.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete zl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new Kl,this._dtxState=new Yl,this._dtxTextureFactory=new ql,this._state=new $e({origin:h.vec3(t.origin),metallicRoughnessBuf:null,textureState:this._dtxState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&Xl.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/3})),(this._state.numVertices+n>4096*Zl||t+i>4096*Zl)&&Xl.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*Zl&&t+i<=4096*Zl}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;Xl.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;Xl.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,n=t.indices,i=t.edgeIndices,r=this._buffer;r.positionsCompressed.push(s);const a=r.lenPositionsCompressed/3,o=s.length/3;let l;r.lenPositionsCompressed+=s.length;let c,u=0;if(n){let e;u=n.length/3,o<=256?(e=r.indices8Bits,l=r.lenIndices8Bits/3,r.lenIndices8Bits+=n.length):o<=65536?(e=r.indices16Bits,l=r.lenIndices16Bits/3,r.lenIndices16Bits+=n.length):(e=r.indices32Bits,l=r.lenIndices32Bits/3,r.lenIndices32Bits+=n.length),e.push(n)}let h=0;if(i){let e;h=i.length/2,o<=256?(e=r.edgeIndices8Bits,c=r.lenEdgeIndices8Bits/2,r.lenEdgeIndices8Bits+=i.length):o<=65536?(e=r.edgeIndices16Bits,c=r.lenEdgeIndices16Bits/2,r.lenEdgeIndices16Bits+=i.length):(e=r.edgeIndices32Bits,c=r.lenEdgeIndices32Bits/2,r.lenEdgeIndices32Bits+=i.length),e.push(i)}this._state.numVertices+=o,Xl.numberOfGeometries++;return{vertexBase:a,numVertices:o,numTriangles:u,numEdges:h,indicesBase:l,edgeIndicesBase:c}}_createSubPortion(e,t,s,n){const i=e.color;e.metallic,e.roughness;const r=e.colors,a=e.opacity,o=e.meshMatrix,l=e.pickColor,c=this._buffer,u=this._state;c.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),c.perObjectInstancePositioningMatrices.push(o||nc),c.perObjectSolid.push(!!e.solid),r?c.perObjectColors.push([255*r[0],255*r[1],255*r[2],255]):i&&c.perObjectColors.push([i[0],i[1],i[2],a]),c.perObjectPickColors.push(l),c.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?u.numIndices8Bits:t.numVertices<=65536?u.numIndices16Bits:u.numIndices32Bits,c.perObjectIndexBaseOffsets.push(e/3-t.indicesBase)}{let e;e=t.numVertices<=256?u.numEdgeIndices8Bits:t.numVertices<=65536?u.numEdgeIndices16Bits:u.numEdgeIndices32Bits,c.perObjectEdgeIndexBaseOffsets.push(e/2-t.edgeIndicesBase)}const h=this._subPortions.length;if(t.numTriangles>0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=c.perTriangleNumberPortionId8Bits,u.numIndices8Bits+=s,Xl.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=c.perTriangleNumberPortionId16Bits,u.numIndices16Bits+=s,Xl.totalPolygons16Bits+=t.numTriangles):(e=c.perTriangleNumberPortionId32Bits,u.numIndices32Bits+=s,Xl.totalPolygons32Bits+=t.numTriangles),Xl.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=c.perEdgeNumberPortionId8Bits,u.numEdgeIndices8Bits+=s,Xl.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=c.perEdgeNumberPortionId16Bits,u.numEdgeIndices16Bits+=s,Xl.totalEdges16Bits+=t.numEdges):(e=c.perEdgeNumberPortionId32Bits,u.numEdgeIndices32Bits+=s,Xl.totalEdges32Bits+=t.numEdges),Xl.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId8Bits)),n.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId16Bits)),n.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId32Bits)),n.lenIndices8Bits>0&&(t.texturePerPolygonIdIndices8Bits=this._dtxTextureFactory.createTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerPolygonIdIndices16Bits=this._dtxTextureFactory.createTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerPolygonIdIndices32Bits=this._dtxTextureFactory.createTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),n.lenEdgeIndices8Bits>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dtxTextureFactory.createTextureFor8BitsEdgeIndices(s,n.edgeIndices8Bits,n.lenEdgeIndices8Bits)),n.lenEdgeIndices16Bits>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dtxTextureFactory.createTextureFor16BitsEdgeIndices(s,n.edgeIndices16Bits,n.lenEdgeIndices16Bits)),n.lenEdgeIndices32Bits>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dtxTextureFactory.createTextureFor32BitsEdgeIndices(s,n.edgeIndices32Bits,n.lenEdgeIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dtxState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,ec)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),A.bindTexture(A.TEXTURE_2D,d.texturePerObjectColorsAndFlags._texture),A.texSubImage2D(A.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,A.RGBA_INTEGER,A.UNSIGNED_BYTE,ec))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,ec))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,tc))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,$l))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._renderers.colorRendererWithSAO&&this._renderers.colorRendererWithSAO.drawLayer(t,this,Gn.COLOR_OPAQUE):this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.depthRenderer&&this._renderers.depthRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.normalsRenderer&&this._renderers.normalsRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,Gn.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,Gn.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,Gn.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,Gn.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,Gn.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.shadowRenderer&&this._renderers.shadowRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}setPickMatrices(e,t){}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,Gn.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,Gn.PICK))}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,Gn.PICK))}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,Gn.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickNormalsRenderer&&this._renderers.pickNormalsRenderer.drawLayer(t,this,Gn.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}class rc{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class ac{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const oc={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class lc{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==hc[e])return void hc[e].push({onLoad:t,onProgress:s,onError:n});hc[e]=[],hc[e].push({onLoad:t,onProgress:s,onError:n});const r=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(r).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=hc[e],n=t.body.getReader(),i=t.headers.get("Content-Length"),r=i?parseInt(i):0,a=0!==r;let o=0;const l=new ReadableStream({start(e){!function t(){n.read().then((({done:n,value:i})=>{if(n)e.close();else{o+=i.byteLength;const n=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:r});for(let e=0,t=s.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),s=t&&t[1]?t[1].toLowerCase():void 0,n=new TextDecoder(s);return e.arrayBuffer().then((e=>n.decode(e)))}}})).then((t=>{oc.add(e,t);const s=hc[e];delete hc[e];for(let e=0,n=s.length;e{const s=hc[e];if(void 0===s)throw this.manager.itemError(e),t;delete hc[e];for(let e=0,n=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class dc{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const n=this._getIdleWorker();-1!==n?(this._initWorker(n),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let Ac=0;class fc{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new dc,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const n=e.capabilities;this._workerConfig={astcSupported:n.astcSupported,etc1Supported:n.etc1Supported,etc2Supported:n.etc2Supported,dxtSupported:n.dxtSupported,bptcSupported:n.bptcSupported,pvrtcSupported:n.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new pc;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new pc;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const n=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,n]).then((([e,t])=>{const s=fc.BasisWorker.toString(),n=["/* constants */","let _EngineFormat = "+JSON.stringify(fc.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(fc.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(fc.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([n])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),Ac>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),Ac++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((n,i)=>{const r=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:r},e))).then((e=>{const s=e.data,{mipmaps:r,width:a,height:o,format:l,type:c,error:u,dfdTransferFn:h,dfdFlags:p}=s;if("error"===c)return i(u);t.setCompressedData({mipmaps:r,props:{format:l,minFilter:1===r.length?1006:1008,magFilter:1===r.length?1006:1008,encoding:2===h?3001:3e3,premultiplyAlpha:!!(1&p)}}),n()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),Ac--}}fc.BasisFormat={ETC1S:0,UASTC_4x4:1},fc.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},fc.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},fc.BasisWorker=function(){let e,t,s;const n=_EngineFormat,i=_TranscoderFormat,r=_BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":e=u.config,h=u.transcoderBinary,t=new Promise((e=>{s={wasmBinary:h,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:a,hasAlpha:h,mipmaps:p,format:d,dfdTransferFn:A,dfdFlags:f}=function(t){const a=new s.KTX2File(new Uint8Array(t));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const h=a.isUASTC()?r.UASTC_4x4:r.ETC1S,p=a.getWidth(),d=a.getHeight(),A=a.getLevels(),f=a.getHasAlpha(),I=a.getDFDTransferFunc(),m=a.getDFDFlags(),{transcoderFormat:y,engineFormat:v}=function(t,s,a,u){let h,p;const d=t===r.ETC1S?o:l;for(let n=0;n{delete Ic[t],s.destroy()}))),s} +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});class e{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}const t=new e;class s{constructor(e){this.id=e,this.parentItem=null,this.groups=[],this.menuElement=null,this.shown=!1,this.mouseOver=0}}class n{constructor(){this.items=[]}}class i{constructor(e,t,s,n,i){this.id=e,this.getTitle=t,this.doAction=s,this.getEnabled=n,this.getShown=i,this.itemElement=null,this.subMenu=null,this.enabled=!0}}let r=!0,a=r?Float64Array:Float32Array;const o=new a(3),l=new a(16),c=new a(16),u=new a(4),h={setDoublePrecisionEnabled(e){r=e,a=r?Float64Array:Float32Array},getDoublePrecisionEnabled:()=>r,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new a(e||2),vec3:e=>new a(e||3),vec4:e=>new a(e||4),mat3:e=>new a(e||9),mat3ToMat4:(e,t=new a(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new a(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const n=new a(2);for(let i=0,r=e.length;i{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&n|128]}${e[n>>8&255]}-${e[n>>16&255]}${e[n>>24&255]}${e[255&i]}${e[i>>8&255]}${e[i>>16&255]}${e[i>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new a(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],n=e[1],i=e[2],r=t[0],a=t[1],o=t[2];return[n*o-i*a,i*r-s*o,s*a-n*r,0]},cross3Vec3(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=t[0],o=t[1],l=t[2];return s[0]=i*l-r*o,s[1]=r*a-n*l,s[2]=n*o-i*a,s},sqLenVec4:e=>h.dotVec4(e,e),lenVec4:e=>Math.sqrt(h.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>h.dotVec3(e,e),sqLenVec2:e=>h.dotVec2(e,e),lenVec3:e=>Math.sqrt(h.sqLenVec3(e)),distVec3:(()=>{const e=new a(3);return(t,s)=>h.lenVec3(h.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(h.sqLenVec2(e)),distVec2:(()=>{const e=new a(2);return(t,s)=>h.lenVec2(h.subVec2(t,s,e))})(),rcpVec3:(e,t)=>h.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/h.lenVec4(e);return h.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/h.lenVec3(e);return h.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/h.lenVec2(e);return h.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=h.dotVec3(e,t)/Math.sqrt(h.sqLenVec3(e)*h.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new a(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=h.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=h.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=h.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,n=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||h.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>h.m4s(0),setMat4ToOnes:()=>h.m4s(1),diagonalMat4v:e=>new a([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,n)=>h.diagonalMat4v([e,t,s,n]),diagonalMat4s:e=>h.diagonalMat4c(e,e,e,e),identityMat4:(e=new a(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new a(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>h.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=e[9],d=e[10],A=e[11],f=e[12],I=e[13],m=e[14],y=e[15],v=t[0],w=t[1],g=t[2],E=t[3],T=t[4],b=t[5],D=t[6],P=t[7],C=t[8],_=t[9],R=t[10],B=t[11],O=t[12],S=t[13],N=t[14],x=t[15];return s[0]=v*n+w*o+g*h+E*f,s[1]=v*i+w*l+g*p+E*I,s[2]=v*r+w*c+g*d+E*m,s[3]=v*a+w*u+g*A+E*y,s[4]=T*n+b*o+D*h+P*f,s[5]=T*i+b*l+D*p+P*I,s[6]=T*r+b*c+D*d+P*m,s[7]=T*a+b*u+D*A+P*y,s[8]=C*n+_*o+R*h+B*f,s[9]=C*i+_*l+R*p+B*I,s[10]=C*r+_*c+R*d+B*m,s[11]=C*a+_*u+R*A+B*y,s[12]=O*n+S*o+N*h+x*f,s[13]=O*i+S*l+N*p+x*I,s[14]=O*r+S*c+N*d+x*m,s[15]=O*a+S*u+N*A+x*y,s},mulMat3(e,t,s){s||(s=new a(9));const n=e[0],i=e[3],r=e[6],o=e[1],l=e[4],c=e[7],u=e[2],h=e[5],p=e[8],d=t[0],A=t[3],f=t[6],I=t[1],m=t[4],y=t[7],v=t[2],w=t[5],g=t[8];return s[0]=n*d+i*I+r*v,s[3]=n*A+i*m+r*w,s[6]=n*f+i*y+r*g,s[1]=o*d+l*I+c*v,s[4]=o*A+l*m+c*w,s[7]=o*f+l*y+c*g,s[2]=u*d+h*I+p*v,s[5]=u*A+h*m+p*w,s[8]=u*f+h*y+p*g,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=h.vec4()){const n=t[0],i=t[1],r=t[2],a=t[3];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12]*a,s[1]=e[1]*n+e[5]*i+e[9]*r+e[13]*a,s[2]=e[2]*n+e[6]*i+e[10]*r+e[14]*a,s[3]=e[3]*n+e[7]*i+e[11]*r+e[15]*a,s},transposeMat4(e,t){const s=e[4],n=e[14],i=e[8],r=e[13],a=e[12],o=e[9];if(!t||e===t){const t=e[1],l=e[2],c=e[3],u=e[6],h=e[7],p=e[11];return e[1]=s,e[2]=i,e[3]=a,e[4]=t,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[11]=n,e[12]=c,e[13]=h,e[14]=p,e}return t[0]=e[0],t[1]=s,t[2]=i,t[3]=a,t[4]=e[1],t[5]=e[5],t[6]=o,t[7]=r,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=n,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],n=e[2],i=e[3],r=e[4],a=e[5],o=e[6],l=e[7],c=e[8],u=e[9],h=e[10],p=e[11],d=e[12],A=e[13],f=e[14],I=e[15];return d*u*o*i-c*A*o*i-d*a*h*i+r*A*h*i+c*a*f*i-r*u*f*i-d*u*n*l+c*A*n*l+d*s*h*l-t*A*h*l-c*s*f*l+t*u*f*l+d*a*n*p-r*A*n*p-d*s*o*p+t*A*o*p+r*s*f*p-t*a*f*p-c*a*n*I+r*u*n*I+c*s*o*I-t*u*o*I-r*s*h*I+t*a*h*I},inverseMat4(e,t){t||(t=e);const s=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=e[9],p=e[10],d=e[11],A=e[12],f=e[13],I=e[14],m=e[15],y=s*o-n*a,v=s*l-i*a,w=s*c-r*a,g=n*l-i*o,E=n*c-r*o,T=i*c-r*l,b=u*f-h*A,D=u*I-p*A,P=u*m-d*A,C=h*I-p*f,_=h*m-d*f,R=p*m-d*I,B=1/(y*R-v*_+w*C+g*P-E*D+T*b);return t[0]=(o*R-l*_+c*C)*B,t[1]=(-n*R+i*_-r*C)*B,t[2]=(f*T-I*E+m*g)*B,t[3]=(-h*T+p*E-d*g)*B,t[4]=(-a*R+l*P-c*D)*B,t[5]=(s*R-i*P+r*D)*B,t[6]=(-A*T+I*w-m*v)*B,t[7]=(u*T-p*w+d*v)*B,t[8]=(a*_-o*P+c*b)*B,t[9]=(-s*_+n*P-r*b)*B,t[10]=(A*E-f*w+m*y)*B,t[11]=(-u*E+h*w-d*y)*B,t[12]=(-a*C+o*D-l*b)*B,t[13]=(s*C-n*D+i*b)*B,t[14]=(-A*g+f*v-I*y)*B,t[15]=(u*g-h*v+p*y)*B,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||h.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||h.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new a(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,h.translationMat4v(e,i))})(),translationMat4s:(e,t)=>h.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>h.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,n){const i=n[3];n[0]+=i*e,n[1]+=i*t,n[2]+=i*s;const r=n[7];n[4]+=r*e,n[5]+=r*t,n[6]+=r*s;const a=n[11];n[8]+=a*e,n[9]+=a*t,n[10]+=a*s;const o=n[15];return n[12]+=o*e,n[13]+=o*t,n[14]+=o*s,n},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const n=h.normalizeVec4([t[0],t[1],t[2],0],[]),i=Math.sin(e),r=Math.cos(e),a=1-r,o=n[0],l=n[1],c=n[2];let u,p,d,A,f,I;return u=o*l,p=l*c,d=c*o,A=o*i,f=l*i,I=c*i,(s=s||h.mat4())[0]=a*o*o+r,s[1]=a*u+I,s[2]=a*d-f,s[3]=0,s[4]=a*u-I,s[5]=a*l*l+r,s[6]=a*p+A,s[7]=0,s[8]=a*d+f,s[9]=a*p-A,s[10]=a*c*c+r,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,n,i)=>h.rotationMat4v(e,[t,s,n],i),scalingMat4v:(e,t=h.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=h.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new a(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,h.scalingMat4v(e,i))})(),scaleMat4c:(e,t,s,n)=>(n[0]*=e,n[4]*=t,n[8]*=s,n[1]*=e,n[5]*=t,n[9]*=s,n[2]*=e,n[6]*=t,n[10]*=s,n[3]*=e,n[7]*=t,n[11]*=s,n),scaleMat4v(e,t){const s=e[0],n=e[1],i=e[2];return t[0]*=s,t[4]*=n,t[8]*=i,t[1]*=s,t[5]*=n,t[9]*=i,t[2]*=s,t[6]*=n,t[10]*=i,t[3]*=s,t[7]*=n,t[11]*=i,t},scalingMat4s:e=>h.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=h.mat4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=n+n,l=i+i,c=r+r,u=n*o,p=n*l,d=n*c,A=i*l,f=i*c,I=r*c,m=a*o,y=a*l,v=a*c;return s[0]=1-(A+I),s[1]=p+v,s[2]=d-y,s[3]=0,s[4]=p-v,s[5]=1-(u+I),s[6]=f+m,s[7]=0,s[8]=d+y,s[9]=f-m,s[10]=1-(u+A),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=h.vec4()){const n=h.clamp,i=e[0],r=e[4],a=e[8],o=e[1],l=e[5],c=e[9],u=e[2],p=e[6],d=e[10];return"XYZ"===t?(s[1]=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-c,d),s[2]=Math.atan2(-r,i)):(s[0]=Math.atan2(p,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(s[1]=Math.atan2(a,d),s[2]=Math.atan2(o,l)):(s[1]=Math.atan2(-u,i),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(n(p,-1,1)),Math.abs(p)<.99999?(s[1]=Math.atan2(-u,d),s[2]=Math.atan2(-r,l)):(s[1]=0,s[2]=Math.atan2(o,i))):"ZYX"===t?(s[1]=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(s[0]=Math.atan2(p,d),s[2]=Math.atan2(o,i)):(s[0]=0,s[2]=Math.atan2(-r,l))):"YZX"===t?(s[2]=Math.asin(n(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(-c,l),s[1]=Math.atan2(-u,i)):(s[0]=0,s[1]=Math.atan2(a,d))):"XZY"===t&&(s[2]=Math.asin(-n(r,-1,1)),Math.abs(r)<.99999?(s[0]=Math.atan2(p,l),s[1]=Math.atan2(a,i)):(s[0]=Math.atan2(-c,d),s[1]=0)),s},composeMat4:(e,t,s,n=h.mat4())=>(h.quaternionToRotationMat4(t,n),h.scaleMat4v(s,n),h.translateMat4v(e,n),n),decomposeMat4:(()=>{const e=new a(3),t=new a(16);return function(s,n,i,r){e[0]=s[0],e[1]=s[1],e[2]=s[2];let a=h.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const o=h.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=h.lenVec3(e);h.determinantMat4(s)<0&&(a=-a),n[0]=s[12],n[1]=s[13],n[2]=s[14],t.set(s);const c=1/a,u=1/o,p=1/l;return t[0]*=c,t[1]*=c,t[2]*=c,t[4]*=u,t[5]*=u,t[6]*=u,t[8]*=p,t[9]*=p,t[10]*=p,h.mat4ToQuaternion(t,i),r[0]=a,r[1]=o,r[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,n){n||(n=h.mat4());const i=e[0],r=e[1],a=e[2],o=s[0],l=s[1],c=s[2],u=t[0],p=t[1],d=t[2];if(i===u&&r===p&&a===d)return h.identityMat4();let A,f,I,m,y,v,w,g,E,T;return A=i-u,f=r-p,I=a-d,T=1/Math.sqrt(A*A+f*f+I*I),A*=T,f*=T,I*=T,m=l*I-c*f,y=c*A-o*I,v=o*f-l*A,T=Math.sqrt(m*m+y*y+v*v),T?(T=1/T,m*=T,y*=T,v*=T):(m=0,y=0,v=0),w=f*v-I*y,g=I*m-A*v,E=A*y-f*m,T=Math.sqrt(w*w+g*g+E*E),T?(T=1/T,w*=T,g*=T,E*=T):(w=0,g=0,E=0),n[0]=m,n[1]=w,n[2]=A,n[3]=0,n[4]=y,n[5]=g,n[6]=f,n[7]=0,n[8]=v,n[9]=E,n[10]=I,n[11]=0,n[12]=-(m*i+y*r+v*a),n[13]=-(w*i+g*r+E*a),n[14]=-(A*i+f*r+I*a),n[15]=1,n},lookAtMat4c:(e,t,s,n,i,r,a,o,l)=>h.lookAtMat4v([e,t,s],[n,i,r],[a,o,l],[]),orthoMat4c(e,t,s,n,i,r,a){a||(a=h.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=-2/c,a[11]=0,a[12]=-(e+t)/o,a[13]=-(n+s)/l,a[14]=-(r+i)/c,a[15]=1,a},frustumMat4v(e,t,s){s||(s=h.mat4());const n=[e[0],e[1],e[2],0],i=[t[0],t[1],t[2],0];h.addVec4(i,n,l),h.subVec4(i,n,c);const r=2*n[2],a=c[0],o=c[1],u=c[2];return s[0]=r/a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r/o,s[6]=0,s[7]=0,s[8]=l[0]/a,s[9]=l[1]/o,s[10]=-l[2]/u,s[11]=-1,s[12]=0,s[13]=0,s[14]=-r*i[2]/u,s[15]=0,s},frustumMat4(e,t,s,n,i,r,a){a||(a=h.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2*i/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*i/l,a[6]=0,a[7]=0,a[8]=(t+e)/o,a[9]=(n+s)/l,a[10]=-(r+i)/c,a[11]=-1,a[12]=0,a[13]=0,a[14]=-r*i*2/c,a[15]=0,a},perspectiveMat4(e,t,s,n,i){const r=[],a=[];return r[2]=s,a[2]=n,a[1]=r[2]*Math.tan(e/2),r[1]=-a[1],a[0]=a[1]*t,r[0]=-a[0],h.frustumMat4v(r,a,i)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=h.vec3()){const n=t[0],i=t[1],r=t[2];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12],s[1]=e[1]*n+e[5]*i+e[9]*r+e[13],s[2]=e[2]*n+e[6]*i+e[10]*r+e[14],s},transformPoint4:(e,t,s=h.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const n=s||[],i=t.length;let r,a,o,l;const c=e[0],u=e[1],h=e[2],p=e[3],d=e[4],A=e[5],f=e[6],I=e[7],m=e[8],y=e[9],v=e[10],w=e[11],g=e[12],E=e[13],T=e[14],b=e[15];let D;for(let e=0;e{const e=new a(16),t=new a(16),s=new a(16);return function(n,i,r,a){return this.transformVec3(this.mulMat4(this.inverseMat4(i,e),this.inverseMat4(r,t),s),n,a)}})(),lerpVec3(e,t,s,n,i,r){const a=r||h.vec3(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a},lerpMat4(e,t,s,n,i,r){const a=r||h.mat4(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a[3]=n[3]+o*(i[3]-n[3]),a[4]=n[4]+o*(i[4]-n[4]),a[5]=n[5]+o*(i[5]-n[5]),a[6]=n[6]+o*(i[6]-n[6]),a[7]=n[7]+o*(i[7]-n[7]),a[8]=n[8]+o*(i[8]-n[8]),a[9]=n[9]+o*(i[9]-n[9]),a[10]=n[10]+o*(i[10]-n[10]),a[11]=n[11]+o*(i[11]-n[11]),a[12]=n[12]+o*(i[12]-n[12]),a[13]=n[13]+o*(i[13]-n[13]),a[14]=n[14]+o*(i[14]-n[14]),a[15]=n[15]+o*(i[15]-n[15]),a},flatten(e){const t=[];let s,n,i,r,a;for(s=0,n=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=h.vec4()){const n=e[0]*h.DEGTORAD/2,i=e[1]*h.DEGTORAD/2,r=e[2]*h.DEGTORAD/2,a=Math.cos(n),o=Math.cos(i),l=Math.cos(r),c=Math.sin(n),u=Math.sin(i),p=Math.sin(r);return"XYZ"===t?(s[0]=c*o*l+a*u*p,s[1]=a*u*l-c*o*p,s[2]=a*o*p+c*u*l,s[3]=a*o*l-c*u*p):"YXZ"===t?(s[0]=c*o*l+a*u*p,s[1]=a*u*l-c*o*p,s[2]=a*o*p-c*u*l,s[3]=a*o*l+c*u*p):"ZXY"===t?(s[0]=c*o*l-a*u*p,s[1]=a*u*l+c*o*p,s[2]=a*o*p+c*u*l,s[3]=a*o*l-c*u*p):"ZYX"===t?(s[0]=c*o*l-a*u*p,s[1]=a*u*l+c*o*p,s[2]=a*o*p-c*u*l,s[3]=a*o*l+c*u*p):"YZX"===t?(s[0]=c*o*l+a*u*p,s[1]=a*u*l+c*o*p,s[2]=a*o*p-c*u*l,s[3]=a*o*l-c*u*p):"XZY"===t&&(s[0]=c*o*l-a*u*p,s[1]=a*u*l-c*o*p,s[2]=a*o*p+c*u*l,s[3]=a*o*l+c*u*p),s},mat4ToQuaternion(e,t=h.vec4()){const s=e[0],n=e[4],i=e[8],r=e[1],a=e[5],o=e[9],l=e[2],c=e[6],u=e[10];let p;const d=s+a+u;return d>0?(p=.5/Math.sqrt(d+1),t[3]=.25/p,t[0]=(c-o)*p,t[1]=(i-l)*p,t[2]=(r-n)*p):s>a&&s>u?(p=2*Math.sqrt(1+s-a-u),t[3]=(c-o)/p,t[0]=.25*p,t[1]=(n+r)/p,t[2]=(i+l)/p):a>u?(p=2*Math.sqrt(1+a-s-u),t[3]=(i-l)/p,t[0]=(n+r)/p,t[1]=.25*p,t[2]=(o+c)/p):(p=2*Math.sqrt(1+u-s-a),t[3]=(r-n)/p,t[0]=(i+l)/p,t[1]=(o+c)/p,t[2]=.25*p),t},vec3PairToQuaternion(e,t,s=h.vec4()){const n=Math.sqrt(h.dotVec3(e,e)*h.dotVec3(t,t));let i=n+h.dotVec3(e,t);return i<1e-8*n?(i=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):h.cross3Vec3(e,t,s),s[3]=i,h.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=h.vec4()){const s=e[3]/2,n=Math.sin(s);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new a(16);return(t,s,n)=>(n=n||h.vec3(),h.quaternionToRotationMat4(t,e),h.mat4ToEuler(e,s,n),n)})(),mulQuaternions(e,t,s=h.vec4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=t[0],l=t[1],c=t[2],u=t[3];return s[0]=a*o+n*u+i*c-r*l,s[1]=a*l+i*u+r*o-n*c,s[2]=a*c+r*u+n*l-i*o,s[3]=a*u-n*o-i*l-r*c,s},vec3ApplyQuaternion(e,t,s=h.vec3()){const n=t[0],i=t[1],r=t[2],a=e[0],o=e[1],l=e[2],c=e[3],u=c*n+o*r-l*i,p=c*i+l*n-a*r,d=c*r+a*i-o*n,A=-a*n-o*i-l*r;return s[0]=u*c+A*-a+p*-l-d*-o,s[1]=p*c+A*-o+d*-a-u*-l,s[2]=d*c+A*-l+u*-o-p*-a,s},quaternionToMat4(e,t){t=h.identityMat4(t);const s=e[0],n=e[1],i=e[2],r=e[3],a=2*s,o=2*n,l=2*i,c=a*r,u=o*r,p=l*r,d=a*s,A=o*s,f=l*s,I=o*n,m=l*n,y=l*i;return t[0]=1-(I+y),t[1]=A+p,t[2]=f-u,t[4]=A-p,t[5]=1-(d+y),t[6]=m+c,t[8]=f+u,t[9]=m-c,t[10]=1-(d+I),t},quaternionToRotationMat4(e,t){const s=e[0],n=e[1],i=e[2],r=e[3],a=s+s,o=n+n,l=i+i,c=s*a,u=s*o,h=s*l,p=n*o,d=n*l,A=i*l,f=r*a,I=r*o,m=r*l;return t[0]=1-(p+A),t[4]=u-m,t[8]=h+I,t[1]=u+m,t[5]=1-(c+A),t[9]=d-f,t[2]=h-I,t[6]=d+f,t[10]=1-(c+p),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=h.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>h.normalizeQuaternion(h.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=h.vec4()){const s=(e=h.normalizeQuaternion(e,u))[3],n=2*Math.acos(s),i=Math.sqrt(1-s*s);return i<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i),t[3]=n,t},AABB3:e=>new a(e||6),AABB2:e=>new a(e||4),OBB3:e=>new a(e||32),OBB2:e=>new a(e||16),Sphere3:(e,t,s,n)=>new a([e,t,s,n]),transformOBB3(e,t,s=t){let n;const i=t.length;let r,a,o;const l=e[0],c=e[1],u=e[2],h=e[3],p=e[4],d=e[5],A=e[6],f=e[7],I=e[8],m=e[9],y=e[10],v=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;n{const e=new a(3),t=new a(3),s=new a(3);return n=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5],h.subVec3(t,e,s),Math.abs(h.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new a(3),t=new a(3),s=new a(3);return(n,i)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5];const r=h.subVec3(t,e,s),a=i[0]-n[0],o=n[3]-i[0],l=i[1]-n[1],c=n[4]-i[1],u=i[2]-n[2],p=n[5]-i[2];return r[0]+=a>o?a:o,r[1]+=l>c?l:c,r[2]+=u>p?u:p,Math.abs(h.lenVec3(r))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||h.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||h.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=h.AABB3())=>(e[0]=h.MAX_DOUBLE,e[1]=h.MAX_DOUBLE,e[2]=h.MAX_DOUBLE,e[3]=h.MIN_DOUBLE,e[4]=h.MIN_DOUBLE,e[5]=h.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=h.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new a(3);return(t,s,n)=>{s=s||h.AABB3();let i,r,a,o=h.MAX_DOUBLE,l=h.MAX_DOUBLE,c=h.MAX_DOUBLE,u=h.MIN_DOUBLE,p=h.MIN_DOUBLE,d=h.MIN_DOUBLE;for(let s=0,A=t.length;su&&(u=i),r>p&&(p=r),a>d&&(d=a);return s[0]=o,s[1]=l,s[2]=c,s[3]=u,s[4]=p,s[5]=d,s}})(),OBB3ToAABB3(e,t=h.AABB3()){let s,n,i,r=h.MAX_DOUBLE,a=h.MAX_DOUBLE,o=h.MAX_DOUBLE,l=h.MIN_DOUBLE,c=h.MIN_DOUBLE,u=h.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToAABB3(e,t=h.AABB3()){let s,n,i,r=h.MAX_DOUBLE,a=h.MAX_DOUBLE,o=h.MAX_DOUBLE,l=h.MIN_DOUBLE,c=h.MIN_DOUBLE,u=h.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToSphere3:(()=>{const e=new a(3);return(t,s)=>{s=s||h.vec4();let n,i=0,r=0,a=0;const o=t.length;for(n=0;nc&&(c=l);return s[3]=c,s}})(),positions3ToSphere3:(()=>{const e=new a(3),t=new a(3);return(s,n)=>{n=n||h.vec4();let i,r=0,a=0,o=0;const l=s.length;let c=0;for(i=0;ic&&(c=p);return n[3]=c,n}})(),OBB3ToSphere3:(()=>{const e=new a(3),t=new a(3);return(s,n)=>{n=n||h.vec4();let i,r=0,a=0,o=0;const l=s.length,c=l/4;for(i=0;ip&&(p=u);return n[3]=p,n}})(),getSphere3Center:(e,t=h.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=h.vec3()){let s=0,n=0,i=0;for(var r=0,a=e.length;r(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>n&&(e[1]=n),e[2]>i&&(e[2]=i),e[3](e[0]=h.MAX_DOUBLE,e[1]=h.MAX_DOUBLE,e[2]=h.MIN_DOUBLE,e[3]=h.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(n=e[0]*s[0],i=e[0]*s[3]):(n=e[0]*s[3],i=e[0]*s[0]),e[1]>0?(n+=e[1]*s[1],i+=e[1]*s[4]):(n+=e[1]*s[4],i+=e[1]*s[1]),e[2]>0?(n+=e[2]*s[2],i+=e[2]*s[5]):(n+=e[2]*s[5],i+=e[2]*s[2]);if(n<=-t&&i<=-t)return-1;return n>=-t&&i>=-t?1:0},OBB3ToAABB2(e,t=h.AABB2()){let s,n,i,r,a=h.MAX_DOUBLE,o=h.MAX_DOUBLE,l=h.MIN_DOUBLE,c=h.MIN_DOUBLE;for(let t=0,u=e.length;tl&&(l=s),n>c&&(c=n);return t[0]=a,t[1]=o,t[2]=l,t[3]=c,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(n-s),tangentQuadraticBezier3:(e,t,s,n,i)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*n*(1-e)-3*e*e*n+3*e*e*i,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,n,i){const r=.5*(s-e),a=.5*(n-t),o=i*i;return(2*t-2*s+r+a)*(i*o)+(-3*t+3*s-2*r-a)*o+r*i+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,n){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,n)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,n,i){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,n)+this.b3p3(e,i)},triangleNormal(e,t,s,n=h.vec3()){const i=t[0]-e[0],r=t[1]-e[1],a=t[2]-e[2],o=s[0]-e[0],l=s[1]-e[1],c=s[2]-e[2],u=r*c-a*l,p=a*o-i*c,d=i*l-r*o,A=Math.sqrt(u*u+p*p+d*d);return 0===A?(n[0]=0,n[1]=0,n[2]=0):(n[0]=u/A,n[1]=p/A,n[2]=d/A),n},rayTriangleIntersect:(()=>{const e=new a(3),t=new a(3),s=new a(3),n=new a(3),i=new a(3);return(r,a,o,l,c,u)=>{u=u||h.vec3();const p=h.subVec3(l,o,e),d=h.subVec3(c,o,t),A=h.cross3Vec3(a,d,s),f=h.dotVec3(p,A);if(f<1e-6)return null;const I=h.subVec3(r,o,n),m=h.dotVec3(I,A);if(m<0||m>f)return null;const y=h.cross3Vec3(I,p,i),v=h.dotVec3(a,y);if(v<0||m+v>f)return null;const w=h.dotVec3(d,y)/f;return u[0]=r[0]+w*a[0],u[1]=r[1]+w*a[1],u[2]=r[2]+w*a[2],u}})(),rayPlaneIntersect:(()=>{const e=new a(3),t=new a(3),s=new a(3),n=new a(3);return(i,r,a,o,l,c)=>{c=c||h.vec3(),r=h.normalizeVec3(r,e);const u=h.subVec3(o,a,t),p=h.subVec3(l,a,s),d=h.cross3Vec3(u,p,n);h.normalizeVec3(d,d);const A=-h.dotVec3(a,d),f=-(h.dotVec3(i,d)+A)/h.dotVec3(r,d);return c[0]=i[0]+f*r[0],c[1]=i[1]+f*r[1],c[2]=i[2]+f*r[2],c}})(),cartesianToBarycentric:(()=>{const e=new a(3),t=new a(3),s=new a(3);return(n,i,r,a,o)=>{const l=h.subVec3(a,i,e),c=h.subVec3(r,i,t),u=h.subVec3(n,i,s),p=h.dotVec3(l,l),d=h.dotVec3(l,c),A=h.dotVec3(l,u),f=h.dotVec3(c,c),I=h.dotVec3(c,u),m=p*f-d*d;if(0===m)return null;const y=1/m,v=(f*A-d*I)*y,w=(p*I-d*A)*y;return o[0]=1-v-w,o[1]=w,o[2]=v,o}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,n,i=h.vec3()){const r=e[0],a=e[1],o=e[2];return i[0]=t[0]*r+s[0]*a+n[0]*o,i[1]=t[1]*r+s[1]*a+n[1]*o,i[2]=t[2]*r+s[2]*a+n[2]*o,i},mergeVertices(e,t,s,n){const i={},r=[],a=[],o=t?[]:null,l=s?[]:null,c=[];let u,h,p,d;const A=1e4;let f,I,m=0;for(f=0,I=e.length;f{const e=new a(3),t=new a(3),s=new a(3),n=new a(3),i=new a(3),r=new a(3);return(a,o,l)=>{let c,u;const p=new Array(a.length/3);let d,A,f,I,m,y,v;for(c=0,u=o.length;c{const e=new a(3),t=new a(3),s=new a(3),n=new a(3),i=new a(3),r=new a(3),o=new a(3);return(a,l,c)=>{const u=new Float32Array(a.length);for(let p=0;p>24&255,u=p>>16&255,c=p>>8&255,l=255&p,o=t[s],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+1],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+2],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,p++;return{positions:i,colors:r}},faceToVertexNormals(e,t,s={}){const n=s.smoothNormalsAngleThreshold||20,i={},r=[],a={};let o,l,c,u,p;const d=1e4;let A,f,I,m,y,v;for(f=0,m=e.length;f{const e=new a(4),t=new a(4);return(s,n,i,r,a)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=1,h.transformVec4(s,e,t),r[0]=t[0],r[1]=t[1],r[2]=t[2],e[0]=i[0],e[1]=i[1],e[2]=i[2],h.transformVec3(s,e,t),h.normalizeVec3(t),a[0]=t[0],a[1]=t[1],a[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new a(16),t=new a(16),s=new a(4),n=new a(4),i=new a(4),r=new a(4);return(a,o,l,c,u,p)=>{const d=h.mulMat4(l,o,e),A=h.inverseMat4(d,t),f=a.width,I=a.height,m=(c[0]-f/2)/(f/2),y=-(c[1]-I/2)/(I/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,h.transformVec4(A,s,n),h.mulVec4Scalar(n,1/n[3]),i[0]=m,i[1]=y,i[2]=1,i[3]=1,h.transformVec4(A,i,r),h.mulVec4Scalar(r,1/r[3]),u[0]=r[0],u[1]=r[1],u[2]=r[2],h.subVec3(r,n,p),h.normalizeVec3(p)}})(),canvasPosToLocalRay:(()=>{const e=new a(3),t=new a(3);return(s,n,i,r,a,o,l)=>{h.canvasPosToWorldRay(s,n,i,a,e,t),h.worldRayToLocalRay(r,e,t,o,l)}})(),worldRayToLocalRay:(()=>{const e=new a(16),t=new a(4),s=new a(4);return(n,i,r,a,o)=>{const l=h.inverseMat4(n,e);t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,h.transformVec4(l,t,s),a[0]=s[0],a[1]=s[1],a[2]=s[2],h.transformVec3(l,r,o)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,n,i,r){const o=new a(6),l={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:o};let c,u;for(o[0]=o[1]=o[2]=Number.POSITIVE_INFINITY,o[3]=o[4]=o[5]=Number.NEGATIVE_INFINITY,c=0,u=s.length;co[3]&&(o[3]=i[t]),i[t+1]o[4]&&(o[4]=i[t+1]),i[t+2]o[5]&&(o[5]=i[t+2])}}if(s.length<20||r>10)return l.triangles=s,l.leaf=!0,l;e[0]=o[3]-o[0],e[1]=o[4]-o[1],e[2]=o[5]-o[2];let p=0;e[1]>e[p]&&(p=1),e[2]>e[p]&&(p=2),l.splitDim=p;const d=(o[p]+o[p+3])/2,A=new Array(s.length);let f=0;const I=new Array(s.length);let m=0;for(c=0,u=s.length;c{const n=e.length/3,i=new Array(n);for(let e=0;e=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t},octDecodeVec2s(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t}};h.buildEdgeIndices=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=h.vec3(),u=h.vec3(),p=h.vec3(),d=h.vec3(),A=h.vec3(),f=h.vec3(),I=h.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}(),h.planeClipsPositions3=function(e,t,s,n=3){for(let i=0,r=s.length;i=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}}const A={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var f=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),n=s+e[1],i=s;i{};t=t||n,s=s||n;var i=new XMLHttpRequest;i.overrideMimeType("application/json"),i.open("GET",e,!0),i.addEventListener("load",(function(e){var n=e.target.response;if(200===this.status){var i;try{i=JSON.parse(n)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(i)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(n))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),i.addEventListener("error",(function(e){s(e)}),!1),i.send(null)},loadArraybuffer:function(e,t,s){var n=e=>{};t=t||n,s=s||n;const i=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(i){const e=!!i[2];var r=i[3];r=window.decodeURIComponent(r),e&&(r=window.atob(r));try{const e=new ArrayBuffer(r.length),s=new Uint8Array(e);for(var a=0;a{t(e)}))}catch(e){C.scheduleTask((()=>{s(e)}))}}else{const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t(n.response):s("loadArrayBuffer error : "+n.response))},n.send(null)}},queryString:m,isArray:function(e){return e&&!e.propertyIsEnumerable("length")&&"object"==typeof e&&"number"==typeof e.length},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isID:function(e){return y.isString(e)||y.isNumeric(e)},isSameComponent:function(e,t){return!(!e||!t)&&(y.isNumeric(e)||y.isString(e)?`${e}`:e.id)===(y.isNumeric(t)||y.isString(t)?`${t}`:t.id)},isFunction:function(e){return"function"==typeof e},isObject:function(e){const t={}.constructor;return!!e&&e.constructor===t},copy:function(e){return y.apply(e,{})},apply:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t},apply2:function(e,t){for(const s in e)e.hasOwnProperty(s)&&void 0!==e[s]&&null!==e[s]&&(t[s]=e[s]);return t},applyIf:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(void 0!==t[s]&&null!==t[s]||(t[s]=e[s]));return t},isEmptyObject:function(e){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0},inQuotes:function(e){return y.isNumeric(e)?`${e}`:`'${e}'`},concat:function(e,t){const s=new e.constructor(e.length+t.length);return s.set(e),s.set(t,e.length),s},flattenParentChildHierarchy:function(e){var t=[];return function e(s){s.id=s.uuid,delete s.oid,t.push(s);var n=s.children;if(n)for(var i=0,r=n.length;i{w.removeItem(e.id),delete C.scenes[e.id],delete v[e.id],A.components.scenes--}))},this.clear=function(){let e;for(const t in C.scenes)C.scenes.hasOwnProperty(t)&&(e=C.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete C.scenes[e.id]))},this.scheduleTask=function(e,t=null){g.push(e),g.push(t)},this.runTasks=function(e=-1){let t,s,n=(new Date).getTime(),i=0;for(;g.length>0&&(e<0||n0&&b>0){var t=1e3/b;P+=t,T.push(t),T.length>=30&&(P-=T.shift()),A.frame.fps=Math.round(P/T.length)}for(let e in C.scenes)C.scenes[e].compile();B(e),D=e};new class{worker=null;constructor(e,t){const s=new Blob([`setInterval(() => postMessage(0), ${t});`]),n=URL.createObjectURL(s);this.worker=new Worker(n),this.worker.onmessage=e}stop(){this.worker.terminate()}}(_,100);const R=function(){let e=Date.now();if(b=e-D,D>0&&b>0){var t=1e3/b;P+=t,T.push(t),T.length>=30&&(P-=T.shift()),A.frame.fps=Math.round(P/T.length)}B(e),function(e){for(var t in E.time=e,C.scenes)if(C.scenes.hasOwnProperty(t)){var s=C.scenes[t];E.sceneId=t,E.startTime=s.startTime,E.deltaTime=null!=E.prevTime?E.time-E.prevTime:0,s.fire("tick",E,!0)}E.prevTime=e}(e),function(){const e=C.scenes,t=!1;let s,n,i,r,a;for(a in e)e.hasOwnProperty(a)&&(s=e[a],n=v[a],n||(n=v[a]={}),i=s.ticksPerOcclusionTest,n.ticksPerOcclusionTest!==i&&(n.ticksPerOcclusionTest=i,n.renderCountdown=i),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=i),r=s.ticksPerRender,n.ticksPerRender!==r&&(n.ticksPerRender=r,n.renderCountdown=r),0==--n.renderCountdown&&(s.render(t),n.renderCountdown=r))}(),void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(_):requestAnimationFrame(R)};function B(e){const t=C.runTasks(e+10),s=C.getNumTasks();A.frame.tasksRun=t,A.frame.tasksScheduled=s,A.frame.tasksBudget=10}R();class O{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof O))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];let i;if(n)for(const s in n)n.hasOwnProperty(s)&&(i=n[s],this._eventCallDepth++,this._eventCallDepth<300?i.callback.call(i.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let i=this._eventSubs[t];i?this._eventSubsNum[t]++:(i={},this._eventSubs[t]=i,this._eventSubsNum[t]=1);const r=this._subIdMap.addItem();i[r]={callback:s,scope:n||this},this._subIdEvents[r]=t;const a=this._events[t];return void 0!==a&&s.call(n||this,a),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const n=this,i=this.on(e,(function(e){n.off(i),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+y.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const n=e.sceneDefault,i=e.sceneSingleton,r=e.type,a=e.on,o=!1!==e.recompiles;if(s&&(y.isNumeric(s)||y.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+y.inQuotes(e))}if(!s)if(!0===i){const e=this.scene.types[r];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===n&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+y.inQuotes(s.id));if(r&&!s.isType(r))return void this.error("Expected a "+r+" type or subtype: "+s.type+" "+y.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let c,u,h;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(c=e.subs,u=0,h=c.length;u{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():C.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}scheduleTask(e){C.scheduleTask(e,null)}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,n,i,r;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,n=t.subs,i=0,r=n.length;i=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class M{constructor(){this.planes=[new L,new L,new L,new L,new L,new L]}}function F(e,t,s){const n=h.mulMat4(s,t,x),i=n[0],r=n[1],a=n[2],o=n[3],l=n[4],c=n[5],u=n[6],p=n[7],d=n[8],A=n[9],f=n[10],I=n[11],m=n[12],y=n[13],v=n[14],w=n[15];e.planes[0].set(o-i,p-l,I-d,w-m),e.planes[1].set(o+i,p+l,I+d,w+m),e.planes[2].set(o-r,p-c,I-A,w-y),e.planes[3].set(o+r,p+c,I+A,w+y),e.planes[4].set(o-a,p-u,I-f,w-v),e.planes[5].set(o+a,p+u,I+f,w+v)}function H(e,t){let s=M.INSIDE;const n=S,i=N;n[0]=t[0],n[1]=t[1],n[2]=t[2],i[0]=t[3],i[1]=t[4],i[2]=t[5];const r=[n,i];for(let t=0;t<6;++t){const n=e.planes[t];if(n.normal[0]*r[n.testVertex[0]][0]+n.normal[1]*r[n.testVertex[1]][1]+n.normal[2]*r[n.testVertex[2]][2]+n.offset<0)return M.OUTSIDE;n.normal[0]*r[1-n.testVertex[0]][0]+n.normal[1]*r[1-n.testVertex[1]][1]+n.normal[2]*r[1-n.testVertex[2]][2]+n.offset<0&&(s=M.INTERSECT)}return s}M.INSIDE=0,M.INTERSECT=1,M.OUTSIDE=2;class U extends O{constructor(e={}){if(!e.viewer)throw"[MarqueePicker] Missing config: viewer";if(!e.objectsKdTree3)throw"[MarqueePicker] Missing config: objectsKdTree3";super(e.viewer.scene,e),this.viewer=e.viewer,this._objectsKdTree3=e.objectsKdTree3,this._canvasMarqueeCorner1=h.vec2(),this._canvasMarqueeCorner2=h.vec2(),this._canvasMarquee=h.AABB2(),this._marqueeFrustum=new M,this._marqueeFrustumProjMat=h.mat4(),this._pickMode=!1,this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement),this._marqueeElement.style.position="absolute",this._marqueeElement.style["z-index"]="40000005",this._marqueeElement.style.width="8px",this._marqueeElement.style.height="8px",this._marqueeElement.style.visibility="hidden",this._marqueeElement.style.top="0px",this._marqueeElement.style.left="0px",this._marqueeElement.style["box-shadow"]="0 2px 5px 0 #182A3D;",this._marqueeElement.style.opacity=1,this._marqueeElement.style["pointer-events"]="none"}setMarqueeCorner1(e){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarqueeCorner2(e){this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarquee(e,t){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(t),this._updateMarquee()}setMarqueeVisible(e){this._marqueVisible=e,this._marqueeElement.style.visibility=e?"visible":"hidden"}getMarqueeVisible(){return this._marqueVisible}setPickMode(e){if(e!==U.PICK_MODE_INSIDE&&e!==U.PICK_MODE_INTERSECTS)throw"Illegal MarqueePicker pickMode: must be MarqueePicker.PICK_MODE_INSIDE or MarqueePicker.PICK_MODE_INTERSECTS";e!==this._pickMode&&(this._marqueeElement.style["background-image"]=e===U.PICK_MODE_INSIDE?"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4'/%3e%3c/svg%3e\")":"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e\")",this._pickMode=e)}getPickMode(){return this._pickMode}clear(){this.fire("clear",{})}pick(){this._updateMarquee(),this._buildMarqueeFrustum();const e=[],t=(s,n=M.INTERSECT)=>{if(n===M.INTERSECT&&(n=H(this._marqueeFrustum,s.aabb)),n!==M.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,n=t.length;s3||this._canvasMarquee[3]-this._canvasMarquee[1]>3)&&t(this._objectsKdTree3.root),this.fire("picked",e),e}_updateMarquee(){this._canvasMarquee[0]=Math.min(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[1]=Math.min(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._canvasMarquee[2]=Math.max(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[3]=Math.max(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._marqueeElement.style.width=this._canvasMarquee[2]-this._canvasMarquee[0]+"px",this._marqueeElement.style.height=this._canvasMarquee[3]-this._canvasMarquee[1]+"px",this._marqueeElement.style.left=`${this._canvasMarquee[0]}px`,this._marqueeElement.style.top=`${this._canvasMarquee[1]}px`}_buildMarqueeFrustum(){const e=this.viewer.scene.canvas.canvas,t=e.clientWidth,s=e.clientHeight,n=e.clientLeft,i=e.clientTop,r=2/t,a=2/s,o=e.clientHeight/e.clientWidth,l=(this._canvasMarquee[0]-n)*r-1,c=(this._canvasMarquee[2]-n)*r-1,u=-(this._canvasMarquee[3]-i)*a+1,p=-(this._canvasMarquee[1]-i)*a+1,d=this.viewer.scene.camera.frustum.near*(17*o);h.frustumMat4(l,c,u*o,p*o,d,1e4,this._marqueeFrustumProjMat),F(this._marqueeFrustum,this.viewer.scene.camera.viewMatrix,this._marqueeFrustumProjMat)}destroy(){super.destroy(),this._marqueeElement.parentElement&&(this._marqueeElement.parentElement.removeChild(this._marqueeElement),this._marqueeElement=null,this._objectsKdTree3=null)}}U.PICK_MODE_INTERSECTS=0,U.PICK_MODE_INSIDE=1;class G{constructor(e,t,s){this.id=s&&s.id?s.id:e,this.viewer=t,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,t.addPlugin(this)}scheduleTask(e){C.scheduleTask(e,null)}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];let i;if(n)for(const s in n)n.hasOwnProperty(s)&&(i=n[s],this._eventCallDepth++,this._eventCallDepth<300?i.callback.call(i.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let i=this._eventSubs[t];i?this._eventSubsNum[t]++:(i={},this._eventSubs[t]=i,this._eventSubsNum[t]=1);const r=this._subIdMap.addItem();i[r]={callback:s,scope:n||this},this._subIdEvents[r]=t;const a=this._events[t];return void 0!==a&&s.call(n||this,a),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const n=this,i=this.on(e,(function(e){n.off(i),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}const j=h.vec3(),V=function(){const e=new Float64Array(16),t=new Float64Array(4),s=new Float64Array(4);return function(n,i,r){return r=r||e,t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,h.transformVec4(n,t,s),h.setMat4Translation(n,s,r),r.slice()}}();function k(e,t,s){const n=Float32Array.from([e[0]])[0],i=e[0]-n,r=Float32Array.from([e[1]])[0],a=e[1]-r,o=Float32Array.from([e[2]])[0],l=e[2]-o;t[0]=n,t[1]=r,t[2]=o,s[0]=i,s[1]=a,s[2]=l}function Q(e,t,s,n=1e3){const i=h.getPositionsCenter(e,j),r=Math.round(i[0]/n)*n,a=Math.round(i[1]/n)*n,o=Math.round(i[2]/n)*n;s[0]=r,s[1]=a,s[2]=o;const l=0!==s[0]||0!==s[1]||0!==s[2];if(l)for(let s=0,n=e.length;s0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let n=255;if(t){if(e<0?e=0:e>1&&(e=1),n=Math.floor(255*e),s===n)return}else if(n=255,s===n)return;for(let e=0,t=this.meshes.length;e{this._viewPosDirty=!0,this._needUpdate()})),this._onCameraProjMatrix=this.scene.camera.on("projMatrix",(()=>{this._canvasPosDirty=!0,this._needUpdate()})),this._onEntityDestroyed=null,this._onEntityModelDestroyed=null,this._renderer.addMarker(this),this.entity=t.entity,this.worldPos=t.worldPos,this.occludable=t.occludable}_update(){if(this._viewPosDirty&&(h.transformPoint3(this.scene.camera.viewMatrix,this._worldPos,this._viewPos),this._viewPosDirty=!1,this._canvasPosDirty=!0,this.fire("viewPos",this._viewPos)),this._canvasPosDirty){ie.set(this._viewPos),ie[3]=1,h.transformPoint4(this.scene.camera.projMatrix,ie,re);const e=this.scene.canvas.boundary;this._canvasPos[0]=Math.floor((1+re[0]/re[3])*e[2]/2),this._canvasPos[1]=Math.floor((1-re[1]/re[3])*e[3]/2),this._canvasPosDirty=!1,this.fire("canvasPos",this._canvasPos)}}_setVisible(e){this._visible,this._visible=e,this.fire("visible",this._visible)}set entity(e){if(this._entity){if(this._entity===e)return;null!==this._onEntityDestroyed&&(this._entity.off(this._onEntityDestroyed),this._onEntityDestroyed=null),null!==this._onEntityModelDestroyed&&(this._entity.model.off(this._onEntityModelDestroyed),this._onEntityModelDestroyed=null)}this._entity=e,this._entity&&(this._entity instanceof ne?this._onEntityModelDestroyed=this._entity.model.on("destroyed",(()=>{this._entity=null,this._onEntityModelDestroyed=null})):this._onEntityDestroyed=this._entity.on("destroyed",(()=>{this._entity=null,this._onEntityDestroyed=null}))),this.fire("entity",this._entity,!0)}get entity(){return this._entity}set occludable(e){(e=!!e)!==this._occludable&&(this._occludable=e)}get occludable(){return this._occludable}set worldPos(e){this._worldPos.set(e||[0,0,0]),k(this._worldPos,this._origin,this._rtcPos),this._occludable&&this._renderer.markerWorldPosUpdated(this),this._viewPosDirty=!0,this.fire("worldPos",this._worldPos),this._needUpdate()}get worldPos(){return this._worldPos}get origin(){return this._origin}get rtcPos(){return this._rtcPos}get viewPos(){return this._update(),this._viewPos}get canvasPos(){return this._update(),this._canvasPos}get visible(){return!!this._visible}destroy(){this.fire("destroyed",!0),this.scene.camera.off(this._onCameraViewMatrix),this.scene.camera.off(this._onCameraProjMatrix),this._entity&&(null!==this._onEntityDestroyed&&this._entity.off(this._onEntityDestroyed),null!==this._onEntityModelDestroyed&&this._entity.model.off(this._onEntityModelDestroyed)),this._renderer.removeMarker(this),super.destroy()}}class oe{constructor(e,t={}){this._color=t.color||"black",this._highlightClass="viewer-ruler-wire-highlighted",this._wire=document.createElement("div"),this._wire.className+=this._wire.className?" viewer-ruler-wire":"viewer-ruler-wire",this._wireClickable=document.createElement("div"),this._wireClickable.className+=this._wireClickable.className?" viewer-ruler-wire-clickable":"viewer-ruler-wire-clickable",this._thickness=t.thickness||1,this._thicknessClickable=t.thicknessClickable||6,this._visible=!0,this._culled=!1;var s=this._wire,n=s.style;n.border="solid "+this._thickness+"px "+this._color,n.position="absolute",n["z-index"]=void 0===t.zIndex?"2000001":t.zIndex,n.width="0px",n.height="0px",n.visibility="visible",n.top="0px",n.left="0px",n["-webkit-transform-origin"]="0 0",n["-moz-transform-origin"]="0 0",n["-ms-transform-origin"]="0 0",n["-o-transform-origin"]="0 0",n["transform-origin"]="0 0",n["-webkit-transform"]="rotate(0deg)",n["-moz-transform"]="rotate(0deg)",n["-ms-transform"]="rotate(0deg)",n["-o-transform"]="rotate(0deg)",n.transform="rotate(0deg)",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._wireClickable,r=i.style;r.border="solid "+this._thicknessClickable+"px "+this._color,r.position="absolute",r["z-index"]=void 0===t.zIndex?"2000002":t.zIndex+1,r.width="0px",r.height="0px",r.visibility="visible",r.top="0px",r.left="0px",r["-webkit-transform-origin"]="0 0",r["-moz-transform-origin"]="0 0",r["-ms-transform-origin"]="0 0",r["-o-transform-origin"]="0 0",r["transform-origin"]="0 0",r["-webkit-transform"]="rotate(0deg)",r["-moz-transform"]="rotate(0deg)",r["-ms-transform"]="rotate(0deg)",r["-o-transform"]="rotate(0deg)",r.transform="rotate(0deg)",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),t.onMouseOver&&i.addEventListener("mouseover",(e=>{t.onMouseOver(e,this)})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this._x1=0,this._y1=0,this._x2=0,this._y2=0,this._update()}get visible(){return"visible"===this._wire.style.visibility}_update(){var e=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2))),t=180*Math.atan2(this._y2-this._y1,this._x2-this._x1)/Math.PI,s=this._wire.style;s.width=Math.round(e)+"px",s.left=Math.round(this._x1)+"px",s.top=Math.round(this._y1)+"px",s["-webkit-transform"]="rotate("+t+"deg)",s["-moz-transform"]="rotate("+t+"deg)",s["-ms-transform"]="rotate("+t+"deg)",s["-o-transform"]="rotate("+t+"deg)",s.transform="rotate("+t+"deg)";var n=this._wireClickable.style;n.width=Math.round(e)+"px",n.left=Math.round(this._x1)+"px",n.top=Math.round(this._y1)+"px",n["-webkit-transform"]="rotate("+t+"deg)",n["-moz-transform"]="rotate("+t+"deg)",n["-ms-transform"]="rotate("+t+"deg)",n["-o-transform"]="rotate("+t+"deg)",n.transform="rotate("+t+"deg)"}setStartAndEnd(e,t,s,n){this._x1=e,this._y1=t,this._x2=s,this._y2=n,this._update()}setColor(e){this._color=e||"black",this._wire.style.border="solid "+this._thickness+"px "+this._color}setOpacity(e){this._wire.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._wireClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._wire.classList.add(this._highlightClass):this._wire.classList.remove(this._highlightClass))}destroy(e){this._wire.parentElement&&this._wire.parentElement.removeChild(this._wire),this._wireClickable.parentElement&&this._wireClickable.parentElement.removeChild(this._wireClickable)}}class le{constructor(e,t={}){this._highlightClass="viewer-ruler-dot-highlighted",this._x=0,this._y=0,this._visible=!0,this._dot=document.createElement("div"),this._dot.className+=this._dot.className?" viewer-ruler-dot":"viewer-ruler-dot",this._dotClickable=document.createElement("div"),this._dotClickable.className+=this._dotClickable.className?" viewer-ruler-dot-clickable":"viewer-ruler-dot-clickable",this._visible=!0,this._culled=!1;var s=this._dot,n=s.style;n["border-radius"]="25px",n.border="solid 2px white",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"40000005":t.zIndex,n.width="8px",n.height="8px",n.visibility=!1!==t.visible?"visible":"hidden",n.top="0px",n.left="0px",n["box-shadow"]="0 2px 5px 0 #182A3D;",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._dotClickable,r=i.style;r["border-radius"]="35px",r.border="solid 10px white",r.position="absolute",r["z-index"]=void 0===t.zIndex?"40000007":t.zIndex+1,r.width="8px",r.height="8px",r.visibility="visible",r.top="0px",r.left="0px",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),i.addEventListener("click",(t=>{e.dispatchEvent(new MouseEvent("mouseover",t))})),t.onMouseOver&&i.addEventListener("mouseover",(s=>{t.onMouseOver(s,this),e.dispatchEvent(new MouseEvent("mouseover",s))})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.borderColor)}setPos(e,t){this._x=e,this._y=t;var s=this._dot.style;s.left=Math.round(e)-4+"px",s.top=Math.round(t)-4+"px";var n=this._dotClickable.style;n.left=Math.round(e)-9+"px",n.top=Math.round(t)-9+"px"}setFillColor(e){this._dot.style.background=e||"lightgreen"}setBorderColor(e){this._dot.style.border="solid 2px"+(e||"black")}setOpacity(e){this._dot.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._dotClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._dot.classList.add(this._highlightClass):this._dot.classList.remove(this._highlightClass))}destroy(){this.setVisible(!1),this._dot.parentElement&&this._dot.parentElement.removeChild(this._dot),this._dotClickable.parentElement&&this._dotClickable.parentElement.removeChild(this._dotClickable)}}class ce{constructor(e,t={}){this._highlightClass="viewer-ruler-label-highlighted",this._prefix=t.prefix||"",this._x=0,this._y=0,this._visible=!0,this._culled=!1,this._label=document.createElement("div"),this._label.className+=this._label.className?" viewer-ruler-label":"viewer-ruler-label";var s=this._label,n=s.style;n["border-radius"]="5px",n.color="white",n.padding="4px",n.border="solid 1px",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"5000005":t.zIndex,n.width="auto",n.height="auto",n.visibility="visible",n.top="0px",n.left="0px",n["pointer-events"]="all",n.opacity=1,t.onContextMenu,s.innerText="",e.appendChild(s),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.fillColor),this.setText(t.text),t.onMouseOver&&s.addEventListener("mouseover",(e=>{t.onMouseOver(e,this),e.preventDefault()})),t.onMouseLeave&&s.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this),e.preventDefault()})),t.onMouseWheel&&s.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&s.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&s.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&s.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&s.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()}))}setPos(e,t){this._x=e,this._y=t;var s=this._label.style;s.left=Math.round(e)-20+"px",s.top=Math.round(t)-12+"px"}setPosOnWire(e,t,s,n){var i=e+.5*(s-e),r=t+.5*(n-t),a=this._label.style;a.left=Math.round(i)-20+"px",a.top=Math.round(r)-12+"px"}setPosBetweenWires(e,t,s,n,i,r){var a=(e+s+i)/3,o=(t+n+r)/3,l=this._label.style;l.left=Math.round(a)-20+"px",l.top=Math.round(o)-12+"px"}setText(e){this._label.innerHTML=this._prefix+(e||"")}setFillColor(e){this._fillColor=e||"lightgreen",this._label.style.background=this._fillColor}setBorderColor(e){this._borderColor=e||"black",this._label.style.border="solid 1px "+this._borderColor}setOpacity(e){this._label.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._label.classList.add(this._highlightClass):this._label.classList.remove(this._highlightClass))}setClickable(e){this._label.style["pointer-events"]=e?"all":"none"}destroy(){this._label.parentElement&&this._label.parentElement.removeChild(this._label)}}var ue=h.vec3(),he=h.vec3();class pe extends O{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._color=t.color||e.defaultColor;var s=this.plugin.viewer.scene;this._originMarker=new ae(s,t.origin),this._cornerMarker=new ae(s,t.corner),this._targetMarker=new ae(s,t.target),this._originWorld=h.vec3(),this._cornerWorld=h.vec3(),this._targetWorld=h.vec3(),this._wp=new Float64Array(12),this._vp=new Float64Array(12),this._pp=new Float64Array(12),this._cp=new Int16Array(6);const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},l=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))};this._originDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._cornerDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._originWire=new oe(this._container,{color:this._color||"blue",thickness:1,zIndex:e.zIndex,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetWire=new oe(this._container,{color:this._color||"red",thickness:1,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._angleLabel=new ce(this._container,{fillColor:this._color||"#00BBFF",prefix:"",text:"",zIndex:e.zIndex+2,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._visible=!1,this._originVisible=!1,this._cornerVisible=!1,this._targetVisible=!1,this._originWireVisible=!1,this._targetWireVisible=!1,this._angleVisible=!1,this._labelsVisible=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._cornerMarker.on("worldPos",(e=>{this._cornerWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.cornerVisible=t.cornerVisible,this.targetVisible=t.targetVisible,this.originWireVisible=t.originWireVisible,this.targetWireVisible=t.targetWireVisible,this.angleVisible=t.angleVisible,this.labelsVisible=t.labelsVisible}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._cornerWorld[0],this._wp[5]=this._cornerWorld[1],this._wp[6]=this._cornerWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._targetWorld[2],this._wp[11]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(h.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._angleLabel.setCulled(!0),this._originWire.setCulled(!0),this._targetWire.setCulled(!0),this._originDot.setCulled(!0),this._cornerDot.setCulled(!0),void this._targetDot.setCulled(!0);this._angleLabel.setCulled(!1),this._originWire.setCulled(!1),this._targetWire.setCulled(!1),this._originDot.setCulled(!1),this._cornerDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}if(this._cpDirty){const d=-.3,A=this._originMarker.viewPos[2],f=this._cornerMarker.viewPos[2],I=this._targetMarker.viewPos[2];if(A>d||f>d||I>d)return this._originDot.setVisible(!1),this._cornerDot.setVisible(!1),this._targetDot.setVisible(!1),this._originWire.setVisible(!1),this._targetWire.setVisible(!1),void this._angleLabel.setCulled(!0);h.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var t=this._pp,s=this._cp,n=e.canvas.canvas.getBoundingClientRect();const m=this._container.getBoundingClientRect();for(var i=n.top-m.top,r=n.left-m.left,a=e.canvas.boundary,o=a[2],l=a[3],c=0,u=0,p=t.length;u{e.snappedToVertex||e.snappedToEdge?(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!0),this.markerDiv.style.background="greenyellow",this.markerDiv.style.border="2px solid green"):(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.canvasPos,n.snapped=!1),this.markerDiv.style.background="pink",this.markerDiv.style.border="2px solid red");const s=e.snappedCanvasPos||e.canvasPos;switch(i=!0,r=e.entity,l.set(e.worldPos),c.set(s),this._mouseState){case 0:const n=t.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=n.left+i,o=n.top+r;this.markerDiv.style.marginLeft=a+s[0]-5+"px",this.markerDiv.style.marginTop=o+s[1]-5+"px";break;case 1:this._currentAngleMeasurement&&(this._currentAngleMeasurement.originWireVisible=!0,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.cornerVisible=!0,this._currentAngleMeasurement.angleVisible=!1,this._currentAngleMeasurement.corner.worldPos=e.worldPos,this._currentAngleMeasurement.corner.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer";break;case 2:this._currentAngleMeasurement&&(this._currentAngleMeasurement.targetWireVisible=!0,this._currentAngleMeasurement.targetVisible=!0,this._currentAngleMeasurement.angleVisible=!0,this._currentAngleMeasurement.target.worldPos=e.worldPos,this._currentAngleMeasurement.target.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer"}})),t.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(a=e.clientX,o=e.clientY)}),t.addEventListener("mouseup",this._onMouseUp=e=>{if(1===e.which&&!(e.clientX>a+20||e.clientXo+20||e.clientY{if(i=!1,n&&(n.visible=!0,n.pointerPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!1),this.markerDiv.style.marginLeft="-100px",this.markerDiv.style.marginTop="-100px",this._currentAngleMeasurement){switch(this._mouseState){case 0:this._currentAngleMeasurement.originVisible=!1;break;case 1:this._currentAngleMeasurement.cornerVisible=!1,this._currentAngleMeasurement.originWireVisible=!1,this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1;break;case 2:this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1}t.style.cursor="default"}})),this._active=!0}deactivate(){if(!this._active)return;this.pointerLens&&(this.pointerLens.visible=!1),this.markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.angleMeasurementsPlugin.viewer.cameraControl;t.off(this._onMouseHoverSurface),t.off(this._onPickedSurface),t.off(this._onHoverNothing),t.off(this._onPickedNothing),this._currentAngleMeasurement=null,this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentAngleMeasurement&&(this._currentAngleMeasurement.destroy(),this._currentAngleMeasurement=null),this._mouseState=0)}destroy(){this.deactivate(),super.destroy()}}class fe extends ae{constructor(e,t){if(super(e,t),this.plugin=t.plugin,this._container=t.container,!this._container)throw"config missing: container";if(!t.markerElement&&!t.markerHTML)throw"config missing: need either markerElement or markerHTML";if(!t.labelElement&&!t.labelHTML)throw"config missing: need either labelElement or labelHTML";this._htmlDirty=!1,t.markerElement?(this._marker=t.markerElement,this._marker.addEventListener("click",this._onMouseClickedExternalMarker=()=>{this.plugin.fire("markerClicked",this)}),this._marker.addEventListener("mouseenter",this._onMouseEnterExternalMarker=()=>{this.plugin.fire("markerMouseEnter",this)}),this._marker.addEventListener("mouseleave",this._onMouseLeaveExternalMarker=()=>{this.plugin.fire("markerMouseLeave",this)}),this._markerExternal=!0):(this._markerHTML=t.markerHTML,this._htmlDirty=!0,this._markerExternal=!1),t.labelElement?(this._label=t.labelElement,this._labelExternal=!0):(this._labelHTML=t.labelHTML,this._htmlDirty=!0,this._labelExternal=!1),this._markerShown=!!t.markerShown,this._labelShown=!!t.labelShown,this._values=t.values||{},this._layoutDirty=!0,this._visibilityDirty=!0,this._buildHTML(),this._onTick=this.scene.on("tick",(()=>{this._htmlDirty&&(this._buildHTML(),this._htmlDirty=!1,this._layoutDirty=!0,this._visibilityDirty=!0),(this._layoutDirty||this._visibilityDirty)&&(this._markerShown||this._labelShown)&&(this._updatePosition(),this._layoutDirty=!1),this._visibilityDirty&&(this._marker.style.visibility=this.visible&&this._markerShown?"visible":"hidden",this._label.style.visibility=this.visible&&this._markerShown&&this._labelShown?"visible":"hidden",this._visibilityDirty=!1)})),this.on("canvasPos",(()=>{this._layoutDirty=!0})),this.on("visible",(()=>{this._visibilityDirty=!0})),this.setMarkerShown(!1!==t.markerShown),this.setLabelShown(t.labelShown),this.eye=t.eye?t.eye.slice():null,this.look=t.look?t.look.slice():null,this.up=t.up?t.up.slice():null,this.projection=t.projection}_buildHTML(){if(!this._markerExternal){this._marker&&(this._container.removeChild(this._marker),this._marker=null);let e=this._markerHTML||"

";y.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._marker=t.firstChild,this._container.appendChild(this._marker),this._marker.style.visibility=this._markerShown?"visible":"hidden",this._marker.addEventListener("click",(()=>{this.plugin.fire("markerClicked",this)})),this._marker.addEventListener("mouseenter",(()=>{this.plugin.fire("markerMouseEnter",this)})),this._marker.addEventListener("mouseleave",(()=>{this.plugin.fire("markerMouseLeave",this)})),this._marker.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}if(!this._labelExternal){this._label&&(this._container.removeChild(this._label),this._label=null);let e=this._labelHTML||"

";y.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._label=t.firstChild,this._container.appendChild(this._label),this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden",this._label.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}}_updatePosition(){const e=this.scene.canvas.boundary,t=e[0],s=e[1],n=this.canvasPos;this._marker.style.left=Math.floor(t+n[0])-12+"px",this._marker.style.top=Math.floor(s+n[1])-12+"px",this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;this._label.style.left=20+Math.floor(t+n[0]+20)+"px",this._label.style.top=Math.floor(s+n[1]+-17)+"px",this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1}_renderTemplate(e){for(var t in this._values)if(this._values.hasOwnProperty(t)){const s=this._values[t];e=e.replace(new RegExp("{{"+t+"}}","g"),s)}return e}setMarkerShown(e){e=!!e,this._markerShown!==e&&(this._markerShown=e,this._visibilityDirty=!0)}getMarkerShown(){return this._markerShown}setLabelShown(e){e=!!e,this._labelShown!==e&&(this._labelShown=e,this._visibilityDirty=!0)}getLabelShown(){return this._labelShown}setField(e,t){this._values[e]=t||"",this._htmlDirty=!0}getField(e){return this._values[e]}setValues(e){for(var t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setField(t,s)}}getValues(){return this._values}destroy(){this._marker&&(this._markerExternal?(this._marker.removeEventListener("click",this._onMouseClickedExternalMarker),this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker),this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker),this._marker=null):this._marker.parentNode.removeChild(this._marker)),this._label&&(this._labelExternal||this._label.parentNode.removeChild(this._label),this._label=null),this.scene.off(this._onTick),super.destroy()}}const Ie=h.vec3(),me=h.vec3(),ye=h.vec3();class ve extends O{get type(){return"Spinner"}constructor(e,t={}){super(e,t),this._canvas=t.canvas,this._element=null,this._isCustom=!1,t.elementId&&(this._element=document.getElementById(t.elementId),this._element?this._adjustPosition():this.error("Can't find given Spinner HTML element: '"+t.elementId+"' - will automatically create default element")),this._element||this._createDefaultSpinner(),this.processes=0}_createDefaultSpinner(){this._injectDefaultCSS();const e=document.createElement("div"),t=e.style;t["z-index"]="9000",t.position="absolute",e.innerHTML='
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const we=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class ge extends O{constructor(e,t={}){super(e,t),this._backgroundColor=h.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let n=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(n=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{n&&(n=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new ve(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+h.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),n=s.style;n.height="100%",n.width="100%",n.padding="0",n.margin="0",n.background="rgba(0,0,0,0);",n.float="left",n.left="0",n.top="0",n.position="absolute",n.opacity="1.0",n["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0?Te.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?Te.FS_MAX_FLOAT_PRECISION="mediump":Te.FS_MAX_FLOAT_PRECISION="lowp":Te.FS_MAX_FLOAT_PRECISION="mediump",Te.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),Te.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),Te.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),Te.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),Te.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Te.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Te.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),Te.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),Te.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),Te.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){Te.SUPPORTED_EXTENSIONS[e]=!0})))}class De{constructor(){this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._canvasPos=new Int16Array([0,0]),this._snappedCanvasPos=new Int16Array([0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}get canvasPos(){return this._gotCanvasPos?this._canvasPos:null}set canvasPos(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}get origin(){return this._gotOrigin?this._origin:null}set origin(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}get direction(){return this._gotDirection?this._direction:null}set direction(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}get indices(){return this.entity&&this._gotIndices?this._indices:null}set indices(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}get localPos(){return this.entity&&this._gotLocalPos?this._localPos:null}set localPos(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}get snappedCanvasPos(){return this._gotSnappedCanvasPos?this._snappedCanvasPos:null}set snappedCanvasPos(e){e?(this._snappedCanvasPos[0]=e[0],this._snappedCanvasPos[1]=e[1],this._gotSnappedCanvasPos=!0):this._gotSnappedCanvasPos=!1}get worldPos(){return this._gotWorldPos?this._worldPos:null}set worldPos(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}get viewPos(){return this.entity&&this._gotViewPos?this._viewPos:null}set viewPos(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}get bary(){return this.entity&&this._gotBary?this._bary:null}set bary(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}get worldNormal(){return this.entity&&this._gotWorldNormal?this._worldNormal:null}set worldNormal(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}get uv(){return this.entity&&this._gotUV?this._uv:null}set uv(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}reset(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotSnappedCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}class Pe{constructor(e,t,s){if(this.allocated=!1,this.compiled=!1,this.handle=e.createShader(t),this.handle){if(this.allocated=!0,e.shaderSource(this.handle,s),e.compileShader(this.handle),this.compiled=e.getShaderParameter(this.handle,e.COMPILE_STATUS),!this.compiled&&!e.isContextLost()){const t=s.split("\n"),n=[];for(let e=0;e0&&"/"===s.charAt(n+1)&&(s=s.substring(0,n)),t.push(s);return t.join("\n")}function Oe(e){console.error(e.join("\n"))}class Se{constructor(e,t){this.id=Re.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new Pe(e,e.VERTEX_SHADER,Be(this.source.vertex)),this._fragmentShader=new Pe(e,e.FRAGMENT_SHADER,Be(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void Oe(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void Oe(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void Oe(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void Oe(this.errors);let t,s,n,i,r;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void Oe(this.errors);const a=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class xe{constructor(e,t){this.scene=e,this.aabb=h.AABB3(),this.origin=h.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const a=s.canvasPos,o=a[0],l=a[1];o+10<0||l+10<0||o-10>n||l-10>i?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[r++]=o,this.pixels[r++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new xe(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let n=this._occlusionLayers[s];n||(n=new xe(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),n.addMarker(e),this._markersToOcclusionLayersMap[e.id]=n}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// OcclusionTester fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),n.push("}"),n}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new Se(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=n.sectionPlanes;for(let n=0;n{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=h.mat4();return()=>(e&&h.inverseMat4(n.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,n=this._scene,i=n.sao,r=t.drawingBufferWidth,a=t.drawingBufferHeight,o=n.camera.project._state,l=o.near,c=o.far,u=o.matrix,p=this._getInverseProjectMat(),d=Math.random(),A="perspective"===n.camera.projection;He[0]=r,He[1]=a,t.viewport(0,0,r,a),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,c),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,u),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,p),t.uniform1i(this._uPerspective,A),t.uniform1f(this._uScale,i.scale*(c/5)),t.uniform1f(this._uIntensity,i.intensity),t.uniform1f(this._uBias,i.bias),t.uniform1f(this._uKernelRadius,i.kernelRadius),t.uniform1f(this._uMinResolution,i.minResolution),t.uniform2fv(this._uViewport,He),t.uniform1f(this._uRandomSeed,d);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new Se(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const n=new Float32Array([1,1,0,1,0,0,1,0]),i=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),r=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ne(s,s.ARRAY_BUFFER,i,i.length,3,s.STATIC_DRAW),this._uvBuf=new Ne(s,s.ARRAY_BUFFER,n,n.length,2,s.STATIC_DRAW),this._indicesBuf=new Ne(s,s.ELEMENT_ARRAY_BUFFER,r,r.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const Ge=new Float32Array(ze(17,[0,1])),je=new Float32Array(ze(17,[1,0])),Ve=new Float32Array(function(e,t){const s=[];for(let n=0;n<=e;n++)s.push(We(n,t));return s}(17,4)),ke=new Float32Array(2);class Qe{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new Se(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),n=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ne(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new Ne(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new Ne(e,e.ELEMENT_ARRAY_BUFFER,n,n.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=h.mat4();return()=>(e&&h.inverseMat4(r.camera.projMatrix,t),t)})());const n=this._scene.canvas.gl,i=this._program,r=this._scene,a=n.drawingBufferWidth,o=n.drawingBufferHeight,l=r.camera.project._state,c=l.near,u=l.far;n.viewport(0,0,a,o),n.clearColor(0,0,0,1),n.enable(n.DEPTH_TEST),n.disable(n.BLEND),n.frontFace(n.CCW),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),i.bind(),ke[0]=a,ke[1]=o,n.uniform2fv(this._uViewport,ke),n.uniform1f(this._uCameraNear,c),n.uniform1f(this._uCameraFar,u),n.uniform1f(this._uDepthCutoff,.01),0===s?n.uniform2fv(this._uSampleOffsets,je):n.uniform2fv(this._uSampleOffsets,Ge),n.uniform1fv(this._uSampleWeights,Ve);const p=e.getDepthTexture(),d=t.getTexture();i.bindTexture(this._uDepthTexture,p,0),i.bindTexture(this._uOcclusionTexture,d,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),n.drawElements(n.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function We(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function ze(e,t){const s=[];for(let n=0;n<=e;n++)s.push(t[0]*n),s.push(t[1]*n);return s}class Ke{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(...e){if(this._touch(...e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}createTexture(e,t,s=null){const n=this.gl,i=n.createTexture();return n.bindTexture(n.TEXTURE_2D,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),s?n.texStorage2D(n.TEXTURE_2D,1,s,e,t):n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e,t,0,n.RGBA,n.UNSIGNED_BYTE,null),i}_touch(...e){let t,s;const n=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=n.drawingBufferWidth,s=n.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;this.buffer.textures.forEach((e=>n.deleteTexture(e))),n.deleteFramebuffer(this.buffer.framebuf),n.deleteRenderbuffer(this.buffer.renderbuf)}const i=[];let r;e.length>0?i.push(...e.map((e=>this.createTexture(t,s,e)))):i.push(this.createTexture(t,s)),this._hasDepthTexture&&(r=n.createTexture(),n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texImage2D(n.TEXTURE_2D,0,n.DEPTH_COMPONENT32F,t,s,0,n.DEPTH_COMPONENT,n.FLOAT,null));const a=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,a),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT32F,t,s);const o=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,o);for(let e=0;e0&&n.drawBuffers(i.map(((e,t)=>n.COLOR_ATTACHMENT0+t))),this._hasDepthTexture?n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,r,0):n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,a),n.bindTexture(n.TEXTURE_2D,null),n.bindRenderbuffer(n.RENDERBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,o),!n.isFramebuffer(o))throw"Invalid framebuffer";n.bindFramebuffer(n.FRAMEBUFFER,null);const l=n.checkFramebufferStatus(n.FRAMEBUFFER);switch(l){case n.FRAMEBUFFER_COMPLETE:break;case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:o,renderbuf:a,texture:i[0],textures:i,depthTexture:r,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,n=null,i=Uint8Array,r=4,a=0){const o=e,l=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,c=new i(r),u=this.gl;return u.readBuffer(u.COLOR_ATTACHMENT0+a),u.readPixels(o,l,1,1,s||u.RGBA,n||u.UNSIGNED_BYTE,c,0),c}readArray(e=null,t=null,s=Uint8Array,n=4,i=0){const r=new s(this.buffer.width*this.buffer.height*n),a=this.gl;return a.readBuffer(a.COLOR_ATTACHMENT0+i),a.readPixels(0,0,this.buffer.width,this.buffer.height,e||a.RGBA,t||a.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,n=t.canvas,i=t.imageData,r=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const a=this.buffer.width,o=this.buffer.height,l=o/2|0,c=4*a,u=new Uint8Array(4*a);for(let e=0;ee.deleteTexture(t))),e.deleteTexture(this.buffer.depthTexture),e.deleteFramebuffer(this.buffer.framebuf),e.deleteRenderbuffer(this.buffer.renderbuf),this.allocated=!1,this.buffer=null,this.bound=!1}this._imageDataCache=null,this._texture=null,this._depthTexture=null}}class Ye{constructor(e){this.scene=e,this._renderBuffersBasic={},this._renderBuffersScaled={}}getRenderBuffer(e,t){const s=1===this.scene.canvas.resolutionScale?this._renderBuffersBasic:this._renderBuffersScaled;let n=s[e];return n||(n=new Ke(this.scene.canvas.canvas,this.scene.canvas.gl,t),s[e]=n),n}destroy(){for(let e in this._renderBuffersBasic)this._renderBuffersBasic[e].destroy();for(let e in this._renderBuffersScaled)this._renderBuffersScaled[e].destroy()}}function Xe(e,t){if(void 0===e._cachedExtensions&&(e._cachedExtensions={}),void 0!==e._cachedExtensions[t])return e._cachedExtensions[t];let s;switch(t){case"WEBGL_depth_texture":s=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":s=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":s=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":s=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:s=e.getExtension(t)}return e._cachedExtensions[t]=s,s}const qe=function(t,s){s=s||{};const n=new Ee(t),i=t.canvas.canvas,r=t.canvas.gl,a=!!s.transparent,o=s.alphaDepthMask,l=new e({});let c={},u={},p=!0,d=!0,f=!0,I=!0,m=!0,y=!0,v=!0,w=!0;const g=new Ye(t);let E=!1;const T=new Ue(t),b=new Qe(t);function D(){p&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableMap,n=t.drawableListPreCull;let i=0;for(let e in s)s.hasOwnProperty(e)&&(n[i++]=s[e]);n.length=i}}(),p=!1,d=!0),d&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e];t.isStateSortable&&t.drawableListPreCull.sort(t.stateSortCompare)}}(),d=!1,f=!0),f&&function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableListPreCull,n=t.drawableList;let i=0;for(let e=0,t=s.length;e0)for(n.withSAO=!0,S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||k>0||H>0||U>0){if(r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):(r.blendEquation(r.FUNC_ADD),r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA)),n.backfaces=!1,o||r.depthMask(!1),(H>0||U>0)&&r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),U>0)for(S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||W>0){if(n.lastProgramId=null,t.highlightMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),W>0)for(S=0;S0)for(S=0;S0||K>0||Q>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),r.enable(r.CULL_FACE),K>0)for(S=0;S0)for(S=0;S0||X>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),X>0)for(S=0;S0)for(S=0;S0||J>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),J>0)for(S=0;S0)for(S=0;S0){const t=Math.floor(e/4),s=d.size[0],n=t%s-Math.floor(s/2),i=Math.floor(t/s)-Math.floor(s/2),r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));C.push({x:n,y:i,dist:r,isVertex:a&&o?y[e+3]>m.length/2:a,result:[y[e+0],y[e+1],y[e+2],y[e+3]],normal:[v[e+0],v[e+1],v[e+2],v[e+3]],id:[w[e+0],w[e+1],w[e+2],w[e+3]]})}let O=null,S=null,N=null,x=null;if(C.length>0){C.sort(((e,t)=>e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist)),x=C[0].isVertex?"vertex":"edge";const e=C[0].result,t=C[0].normal,s=C[0].id,n=m[e[3]],i=n.origin,r=n.coordinateScale;S=h.normalizeVec3([t[0]/h.MAX_INT,t[1]/h.MAX_INT,t[2]/h.MAX_INT]),O=[e[0]*r[0]+i[0],e[1]*r[1]+i[1],e[2]*r[2]+i[2]],N=l.items[s[0]+(s[1]<<8)+(s[2]<<16)+(s[3]<<24)]}if(null===E&&null==O)return null;let L=null;null!==O&&(L=t.camera.projectWorldPos(O));const M=N&&N.delegatePickedEntity?N.delegatePickedEntity():N;return u.reset(),u.snappedToEdge="edge"===x,u.snappedToVertex="vertex"===x,u.worldPos=O,u.worldNormal=S,u.entity=M,u.canvasPos=s,u.snappedCanvasPos=L||s,u}}(),this.addMarker=function(e){this._occlusionTester=this._occlusionTester||new Fe(t,g),this._occlusionTester.addMarker(e),t.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){D(),this._occlusionTester.bindRenderBuf(),n.reset(),n.backfaces=!0,n.frontface=!0,r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.clearColor(0,0,0,0),r.enable(r.DEPTH_TEST),r.disable(r.CULL_FACE),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT);for(let e in c)if(c.hasOwnProperty(e)){const t=c[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}});const e=this.scene.tickify((()=>this.fire("mousemove",this.mouseCanvasPos,!0)));this.element.addEventListener("mousemove",this._mouseMoveListener=t=>{this.enabled&&(this._getMouseCanvasPos(t),e(),this.mouseover&&t.preventDefault())});const t=this.scene.tickify((e=>{this.fire("mousewheel",e,!0)}));this.element.addEventListener("wheel",this._mouseWheelListener=(e,s)=>{if(!this.enabled)return;const n=Math.max(-1,Math.min(1,40*-e.deltaY));t(n)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(n=>{e>=n[0]-s&&e<=n[0]+s&&t>=n[1]-s&&t<=n[1]+s&&this.fire("mouseclicked",n,!0)}))}this._eventsBound=!0}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,n=0;for(;t.offsetParent;)s+=t.offsetLeft,n+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-n}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const Ze=new e({});class $e{constructor(e){this.id=Ze.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){Ze.removeItem(this.id)}}class et extends O{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new $e({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class tt extends O{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4(),near:.1,far:1e4}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let n=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(n/=t),n=Math.min(n,120),h.perspectiveMat4(n*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:1e4;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class st extends O{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4(),near:.1,far:1e4}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,n=s[2],i=s[3],r=n/i;let a,o,l,c;n>i?(a=-t,o=t,l=t/r,c=-t/r):(a=-t*r,o=t*r,l=t,c=-t),h.orthoMat4c(a,o,c,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:1e4;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class nt extends O{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){h.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class it extends O{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new $e({matrix:h.mat4(),inverseMatrix:h.mat4(),transposedMatrix:h.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(h.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(h.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,h.mulMat4v4(this.inverseMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,h.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy()}}const rt=h.vec3(),at=h.vec3(),ot=h.vec3(),lt=h.vec3(),ct=h.vec3(),ut=h.vec3(),ht=h.vec4(),pt=h.vec4(),dt=h.vec4(),At=h.mat4(),ft=h.mat4(),It=h.vec3(),mt=h.vec3(),yt=h.vec3(),vt=h.vec3();class wt extends O{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new $e({deviceMatrix:h.mat4(),hasDeviceMatrix:!1,matrix:h.mat4(),normalMatrix:h.mat4(),inverseMatrix:h.mat4()}),this._perspective=new tt(this),this._ortho=new st(this),this._frustum=new nt(this),this._customProjection=new it(this),this._project=this._perspective,this._eye=h.vec3([0,0,10]),this._look=h.vec3([0,0,0]),this._up=h.vec3([0,1,0]),this._worldUp=h.vec3([0,1,0]),this._worldRight=h.vec3([1,0,0]),this._worldForward=h.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(h.subVec3(this._eye,this._look,It),h.normalizeVec3(It,mt),h.mulVec3Scalar(mt,1e3,yt),h.addVec3(this._look,yt,vt),t=vt):t=this._eye,e.hasDeviceMatrix?(h.lookAtMat4v(t,this._look,this._up,ft),h.mulMat4(e.deviceMatrix,ft,e.matrix)):h.lookAtMat4v(t,this._look,this._up,e.matrix),h.inverseMat4(this._state.matrix,this._state.inverseMatrix),h.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=h.subVec3(this._eye,this._look,rt);h.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,At),t=h.transformPoint3(At,t,at),this.eye=h.addVec3(this._look,t,ot),this.up=h.transformPoint3(At,this._up,lt)}orbitPitch(e){if(this._constrainPitch&&(e=h.dotVec3(this._up,this._worldUp)/h.DEGTORAD)<1)return;let t=h.subVec3(this._eye,this._look,rt);const s=h.cross3Vec3(h.normalizeVec3(t,at),h.normalizeVec3(this._up,ot));h.rotationMat4v(.0174532925*e,s,At),t=h.transformPoint3(At,t,lt),this.up=h.transformPoint3(At,this._up,ct),this.eye=h.addVec3(t,this._look,ut)}yaw(e){let t=h.subVec3(this._look,this._eye,rt);h.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,At),t=h.transformPoint3(At,t,at),this.look=h.addVec3(t,this._eye,ot),this._gimbalLock&&(this.up=h.transformPoint3(At,this._up,lt))}pitch(e){if(this._constrainPitch&&(e=h.dotVec3(this._up,this._worldUp)/h.DEGTORAD)<1)return;let t=h.subVec3(this._look,this._eye,rt);const s=h.cross3Vec3(h.normalizeVec3(t,at),h.normalizeVec3(this._up,ot));h.rotationMat4v(.0174532925*e,s,At),this.up=h.transformPoint3(At,this._up,ut),t=h.transformPoint3(At,t,lt),this.look=h.addVec3(t,this._eye,ct)}pan(e){const t=h.subVec3(this._eye,this._look,rt),s=[0,0,0];let n;if(0!==e[0]){const i=h.cross3Vec3(h.normalizeVec3(t,[]),h.normalizeVec3(this._up,at));n=h.mulVec3Scalar(i,e[0]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]}0!==e[1]&&(n=h.mulVec3Scalar(h.normalizeVec3(this._up,ot),e[1]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),0!==e[2]&&(n=h.mulVec3Scalar(h.normalizeVec3(t,lt),e[2]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),this.eye=h.addVec3(this._eye,s,ct),this.look=h.addVec3(this._look,s,ut)}zoom(e){const t=h.subVec3(this._eye,this._look,rt),s=Math.abs(h.lenVec3(t,at)),n=Math.abs(s+e);if(n<.5)return;const i=h.normalizeVec3(t,ot);this.eye=h.addVec3(this._look,h.mulVec3Scalar(i,n),lt)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=h.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return h.lenVec3(h.subVec3(this._look,this._eye,rt))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=ht,s=pt,n=dt;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,h.mulMat4v4(this.viewMatrix,t,s),h.mulMat4v4(this.projMatrix,s,n),h.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1;const i=this.scene.canvas.canvas,r=i.offsetWidth/2,a=i.offsetHeight/2;return[n[0]*r+r,n[1]*a+a]}destroy(){super.destroy(),this._state.destroy()}}class gt extends O{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class Et extends gt{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,n=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=n.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new $e({type:"dir",dir:h.vec3([1,1,1]),color:h.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=h.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,n=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],i=[0,1,0];h.lookAtMat4v(n,s,i,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=h.identityMat4()),h.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new Ke(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class Tt extends gt{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:h.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class bt extends O{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),A.memory.meshes++}destroy(){super.destroy(),A.memory.meshes--}}var Dt=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=h.vec3(),u=h.vec3(),p=h.vec3(),d=h.vec3(),A=h.vec3(),f=h.vec3(),I=h.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}();const Pt=function(){const e=h.mat4(),t=h.mat4();return function(s,n){n=n||h.mat4();const i=s[0],r=s[1],a=s[2],o=s[3]-i,l=s[4]-r,c=s[5]-a,u=65535;return h.identityMat4(e),h.translationMat4v(s,e),h.identityMat4(t),h.scalingMat4v([o/u,l/u,c/u],t),h.mulMat4(e,t,n),n}}();var Ct=function(){const e=h.mat4(),t=h.mat4();return function(s,n,i){const r=new Uint16Array(s.length),a=new Float32Array([i[0]!==n[0]?65535/(i[0]-n[0]):0,i[1]!==n[1]?65535/(i[1]-n[1]):0,i[2]!==n[2]?65535/(i[2]-n[2]):0]);let o;for(o=0;o=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1);i=e,r=t}return new Int8Array([Math[s](127.5*i+(i<0?-1:0)),Math[n](127.5*r+(r<0?-1:0))])}function Bt(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}function Ot(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const St={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let n,i;for(n=0;n<3;n++)t[n]=Number.MAX_VALUE,s[n]=-Number.MAX_VALUE;for(n=0;na&&(i=s,a=r),s=Rt(e,o,"floor","ceil"),n=Bt(s),r=Ot(e,o,n),r>a&&(i=s,a=r),s=Rt(e,o,"ceil","ceil"),n=Bt(s),r=Ot(e,o,n),r>a&&(i=s,a=r),t[o]=i[0],t[o+1]=i[1];return t},decompressNormals:function(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t},decompressNormal:function(e,t){let s=e[0],n=e[1];s=(2*s+1)/255,n=(2*n+1)/255;const i=1-Math.abs(s)-Math.abs(n);i<0&&(s=(1-Math.abs(n))*(s>=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t}},Nt=A.memory,xt=h.AABB3();class Lt extends bt{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new $e({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=St.getPositionsBounds(t.positions),n=St.compressPositions(t.positions,e.min,e.max);s.positions=n.quantized,s.positionsDecodeMatrix=n.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=St.getUVBounds(t.uv),n=St.compressUVs(t.uv,e.min,e.max);s.uv=n.quantized,s.uvDecodeMatrix=n.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=St.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),Nt.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),Nt.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),Nt.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new Ne(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),Nt.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),Nt.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new Ne(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),Nt.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=Dt(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),Nt.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=h.buildPickTriangles(e.positions,e.indices,e.compressGeometry),n=s.positions,i=s.colors;this._pickTrianglePositionsBuf=new Ne(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,4,t.STATIC_DRAW,!0),Nt.positions+=this._pickTrianglePositionsBuf.numItems,Nt.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),St.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=St.getPositionsBounds(e),n=St.compressPositions(e,s.min,s.max);e=n.quantized,t.positionsDecodeMatrix=n.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),St.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),St.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=h.AABB3()),h.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=h.OBB3()),h.positions3ToAABB3(this._state.positions,xt,this._state.positionsDecodeMatrix),h.AABB3ToOBB3(xt,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),Nt.meshes--}}function Mt(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return y.apply(e,{positions:[h,p,d,l,p,d,l,c,d,h,c,d,h,p,d,h,c,d,h,c,u,h,p,u,h,p,d,h,p,u,l,p,u,l,p,d,l,p,d,l,p,u,l,c,u,l,c,d,l,c,u,h,c,u,h,c,d,l,c,d,h,c,u,l,c,u,l,p,u,h,p,u],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class Ft extends O{get type(){return"Material"}constructor(e,t={}){super(e,t),A.memory.materials++}destroy(){super.destroy(),A.memory.materials--}}const Ht={opaque:0,mask:1,blend:2},Ut=["opaque","mask","blend"];class Gt extends Ft{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new $e({type:"PhongMaterial",ambient:h.vec3([1,1,1]),diffuse:h.vec3([1,1,1]),specular:h.vec3([1,1,1]),emissive:h.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=Ht[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return Ut[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const jt={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class Vt extends Ft{get type(){return"EmphasisMaterial"}get presets(){return jt}constructor(e,t={}){super(e,t),this._state=new $e({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=jt[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(jt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const kt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class Qt extends Ft{get type(){return"EdgeMaterial"}get presets(){return kt}constructor(e,t={}){super(e,t),this._state=new $e({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=kt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(kt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const Wt={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class zt extends O{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=h.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return Wt}set units(e){e||(e="meters");Wt[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=h.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=h.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class Kt extends O{constructor(e,t={}){super(e,t),this._supported=Te.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const Yt={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class Xt extends Ft{get type(){return"PointsMaterial"}get presets(){return Yt}constructor(e,t={}){super(e,t),this._state=new $e({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=Yt[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Yt).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const qt={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class Jt extends Ft{get type(){return"LinesMaterial"}get presets(){return qt}constructor(e,t={}){super(e,t),this._state=new $e({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=qt[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(qt).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}function Zt(e,t){const s={};let n,i;for(let r=0,a=t.length;r{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new qe(this,{transparent:n,alphaDepthMask:i}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1,this._numCachedSectionPlanes=0;let e=null;this.getHash=function(){if(e)return e;const t=this.getNumAllocatedSectionPlanes();if(this.sectionPlanes,0===t)return this.hash=";";const s=[];for(let e=0,n=t;ethis._numCachedSectionPlanes?e:this._numCachedSectionPlanes}},this._sectionPlanesState.setNumCachedSectionPlanes(t.numCachedSectionPlanes||0),this._lightsState=new function(){const e=h.vec4([0,0,0,0]),t=h.vec4();this.lights=[],this.reflectionMaps=[],this.lightMaps=[];let s=null,n=null;this.getHash=function(){if(s)return s;const e=[],t=this.lights;let n;for(let s=0,i=t.length;s0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),n=null,s=null},this.removeLight=function(e){for(let t=0,i=this.lights.length;t{this._renderer.imageDirty()}))}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+y.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=h.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const n=this.types[s];n&&(delete n[t],y.isEmptyObject(n)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_deRegisterVisibleObject(e){delete this.visibleObjects[e.id],this._numVisibleObjects--,this._visibleObjectIds=null}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_deRegisterXRayedObject(e){delete this.xrayedObjects[e.id],this._numXRayedObjects--,this._xrayedObjectIds=null}_objectHighlightedUpdated(e){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null}_deRegisterHighlightedObject(e){delete this.highlightedObjects[e.id],this._numHighlightedObjects--,this._highlightedObjectIds=null}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_deRegisterSelectedObject(e){delete this.selectedObjects[e.id],this._numSelectedObjects--,this._selectedObjectIds=null}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_deRegisterColorizedObject(e){delete this.colorizedObjects[e.id],this._numColorizedObjects--,this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_deRegisterOpacityObject(e){delete this.opacityObjects[e.id],this._numOpacityObjects--,this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_deRegisterOffsetObject(e){delete this.offsetObjects[e.id],this._numOffsetObjects--,this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set numCachedSectionPlanes(e){e=e||0,this._sectionPlanesState.getNumCachedSectionPlanes()!==e&&(this._sectionPlanesState.setNumCachedSectionPlanes(e),this._needRecompile=!0,this.glRedraw())}get numCachedSectionPlanes(){return this._sectionPlanesState.getNumCachedSectionPlanes()}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&C.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,n=this._clearEachPass;let i,r;for(i=0;ii&&(i=e[3]),e[4]>r&&(r=e[4]),e[5]>a&&(a=e[5]),c=!0}c||(t=-100,s=-100,n=-100,i=100,r=100,a=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=n,this._aabb[3]=i,this._aabb[4]=r,this._aabb[5]=a,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=Zt(this,s));const n=e.excludeEntities||e.exclude;return n&&(e.excludeEntityIds=Zt(this,n)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=e.snapToEdge||e.snapToVertex?this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge,t):this._renderer.pick(e,t))&&t.entity&&t.entity.fire&&t.entity.fire("picked",t),t}snapPick(e){return void 0===this._warnSnapPickDeprecated&&(this._warnSnapPickDeprecated=!0,this.warn("Scene.snapPick() is deprecated since v2.4.2 - use Scene.pick() instead")),this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]r&&(r=l[3]),l[4]>a&&(a=l[4]),l[5]>o&&(o=l[5]),t=!0}})),t){const e=h.AABB3();return e[0]=s,e[1]=n,e[2]=i,e[3]=r,e[4]=a,e[5]=o,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){y.isString(e)&&(e=[e]);let s=!1;for(let n=0,i=e.length;n{i>n&&(n=i,e(...s))}));return this._tickifiedFunctions[t]={tickSubId:a,wrapperFunc:r},r}destroy(){super.destroy();for(const e in this.components)this.components.hasOwnProperty(e)&&this.components[e].destroy();this.canvas.gl=null,this.components=null,this.models=null,this.objects=null,this.visibleObjects=null,this.xrayedObjects=null,this.highlightedObjects=null,this.selectedObjects=null,this.colorizedObjects=null,this.opacityObjects=null,this.sectionPlanes=null,this.lights=null,this.lightMaps=null,this.reflectionMaps=null,this._objectIds=null,this._visibleObjectIds=null,this._xrayedObjectIds=null,this._highlightedObjectIds=null,this._selectedObjectIds=null,this._colorizedObjectIds=null,this.types=null,this.components=null,this.canvas=null,this._renderer=null,this.input=null,this._viewport=null,this._camera=null}}const es=function(e){"LambertMaterial"===e._material._state.type?(this.vertex=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene._lightsState,i=e._geometry._state,r=e._state.billboard,a=e._state.stationary,o=s.getNumAllocatedSectionPlanes()>0,l=!!i.compressGeometry,c=[];c.push("#version 300 es"),c.push("// Lambertian drawing vertex shader"),c.push("in vec3 position;"),c.push("uniform mat4 modelMatrix;"),c.push("uniform mat4 viewMatrix;"),c.push("uniform mat4 projMatrix;"),c.push("uniform vec4 colorize;"),c.push("uniform vec3 offset;"),l&&c.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(c.push("uniform float logDepthBufFC;"),c.push("out float vFragDepth;"),c.push("bool isPerspectiveMatrix(mat4 m) {"),c.push(" return (m[2][3] == - 1.0);"),c.push("}"),c.push("out float isPerspective;"));o&&c.push("out vec4 vWorldPosition;");if(c.push("uniform vec4 lightAmbient;"),c.push("uniform vec4 materialColor;"),c.push("uniform vec3 materialEmissive;"),i.normalsBuf){c.push("in vec3 normal;"),c.push("uniform mat4 modelNormalMatrix;"),c.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=n.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),c.push(" }"),c.push(" return normalize(v);"),c.push("}"))}c.push("out vec4 vColor;"),"points"===i.primitiveName&&c.push("uniform float pointSize;");"spherical"!==r&&"cylindrical"!==r||(c.push("void billboard(inout mat4 mat) {"),c.push(" mat[0][0] = 1.0;"),c.push(" mat[0][1] = 0.0;"),c.push(" mat[0][2] = 0.0;"),"spherical"===r&&(c.push(" mat[1][0] = 0.0;"),c.push(" mat[1][1] = 1.0;"),c.push(" mat[1][2] = 0.0;")),c.push(" mat[2][0] = 0.0;"),c.push(" mat[2][1] = 0.0;"),c.push(" mat[2][2] =1.0;"),c.push("}"));c.push("void main(void) {"),c.push("vec4 localPosition = vec4(position, 1.0); "),c.push("vec4 worldPosition;"),l&&c.push("localPosition = positionsDecodeMatrix * localPosition;");i.normalsBuf&&(l?c.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):c.push("vec4 localNormal = vec4(normal, 0.0); "),c.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),c.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));c.push("mat4 viewMatrix2 = viewMatrix;"),c.push("mat4 modelMatrix2 = modelMatrix;"),a&&c.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(c.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),c.push("billboard(modelMatrix2);"),c.push("billboard(viewMatrix2);"),c.push("billboard(modelViewMatrix);"),i.normalsBuf&&(c.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),c.push("billboard(modelNormalMatrix2);"),c.push("billboard(viewNormalMatrix2);"),c.push("billboard(modelViewNormalMatrix);")),c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i.normalsBuf&&c.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(c.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),c.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),c.push("float lambertian = 1.0;"),i.normalsBuf)for(let e=0,t=n.lights.length;e0,r=t.gammaOutput,a=[];a.push("#version 300 es"),a.push("// Lambertian drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}"points"===n.primitiveName&&(a.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),a.push("float r = dot(cxy, cxy);"),a.push("if (r > 1.0) {"),a.push(" discard;"),a.push("}"));t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,n=t._sectionPlanesState,i=e._geometry._state,r=t._lightsState;let a;const o=s.billboard,l=s.background,c=s.stationary,u=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),h=ns(e),p=n.getNumAllocatedSectionPlanes()>0,d=ss(e),A=!!i.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),A&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),p&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));r.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(h){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=r.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}u&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),A&&f.push("uniform mat3 uvDecodeMatrix;"));i.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===i.primitiveName&&f.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===o&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(d){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=r.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=r.lights.length;e0,l=ns(e),c=n.uvBuf,u="PhongMaterial"===a.type,h="MetallicMaterial"===a.type,p="SpecularMaterial"===a.type,d=ss(e);t.gammaInput;const A=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));d&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),A&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(o){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var I=0;I0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),r.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),u&&((r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = "+ts[r.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(h||p)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),r.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+ts[r.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),n.colors&&f.push("in vec4 vColor;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(r.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));a.ambient&&f.push("uniform vec3 materialAmbient;");a.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==a.alpha&&null!==a.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");a.emissive&&f.push("uniform vec3 materialEmissive;");a.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==a.glossiness&&null!==a.glossiness&&f.push("uniform float materialGlossiness;");void 0!==a.shininess&&null!==a.shininess&&f.push("uniform float materialShininess;");a.specular&&f.push("uniform vec3 materialSpecular;");void 0!==a.metallic&&null!==a.metallic&&f.push("uniform float materialMetallic;");void 0!==a.roughness&&null!==a.roughness&&f.push("uniform float materialRoughness;");void 0!==a.specularF0&&null!==a.specularF0&&f.push("uniform float materialSpecularF0;");c&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));c&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));c&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));c&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&c&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&c&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&c&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));c&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));c&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&c&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&c&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&c&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=r.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===n.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),a.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");a.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):a.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");n.colors&&f.push("diffuseColor *= vColor.rgb;");a.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");a.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==a.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");n.colors&&f.push("alpha *= vColor.a;");void 0!==a.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==a.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==a.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==a.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));c&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+ts[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));c&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+ts[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));c&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+ts[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));c&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+ts[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));c&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));c&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(r.lights.length>0||r.lightMaps.length>0||r.reflectionMaps.length>0)){c&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),c&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),c&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),c&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),c&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),c&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),c&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),u&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),p&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),h&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),r.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),u&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(p||h)&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=r.lights.length;e0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),i.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(u=0,h=r.sectionPlanes.length;u0&&i.lightMaps[0].texture&&this._uLightMap&&(o.bindTexture(this._uLightMap,i.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),i.reflectionMaps.length>0&&i.reflectionMaps[0].texture&&this._uReflectionMap&&(o.bindTexture(this._uReflectionMap,i.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&n.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class ls{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,n=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),i=t._sectionPlanesState.getNumAllocatedSectionPlanes()>0,r=!!e._geometry._state.compressGeometry,a=e._state.billboard,o=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),r&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));i&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),n){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===a||"cylindrical"===a)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===a&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),r&&l.push("localPosition = positionsDecodeMatrix * localPosition;");n&&(r?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),o&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===a||"cylindrical"===a?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),n&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),n)for(let e=0,t=s.lights.length;e0,r=[];r.push("#version 300 es"),r.push("// Lambertian drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}"points"===e._geometry._state.primitiveName&&(r.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),r.push("float r = dot(cxy, cxy);"),r.push("if (r > 1.0) {"),r.push(" discard;"),r.push("}"));t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const cs=new e({}),us=h.vec3(),hs=function(e,t){this.id=cs.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new ls(t),this._allocate(t)},ps={};hs.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=ps[t];return s||(s=new hs(t,e),ps[t]=s,A.memory.programs++),s._useCount++,s},hs.prototype.put=function(){0==--this._useCount&&(cs.removeItem(this.id),this._program&&this._program.destroy(),delete ps[this._hash],A.memory.programs--)},hs.prototype.webglContextRestored=function(){this._program=null},hs.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl,a=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,o=t._state,l=t._geometry._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(o.originHash,c):i.viewMatrix),r.uniformMatrix4fv(this._uViewNormalMatrix,!1,i.viewNormalMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Edges drawing vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec4 edgeColor;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));s&&a.push("out vec4 vWorldPosition;");a.push("out vec4 vColor;"),("spherical"===i||"cylindrical"===i)&&(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));a.push("vColor = edgeColor;"),s&&a.push("vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene.gammaOutput,i=s.getNumAllocatedSectionPlanes()>0,r=[];r.push("#version 300 es"),r.push("// Edges drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const As=new e({}),fs=h.vec3(),Is=function(e,t){this.id=As.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new ds(t),this._allocate(t)},ms={};Is.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=ms[t];return s||(s=new Is(t,e),ms[t]=s,A.memory.programs++),s._useCount++,s},Is.prototype.put=function(){0==--this._useCount&&(As.removeItem(this.id),this._program&&this._program.destroy(),delete ms[this._hash],A.memory.programs--)},Is.prototype.webglContextRestored=function(){this._program=null},Is.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl;let a;const o=t._state,l=t._geometry,c=l._state,u=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,u?e.getRTCViewMatrix(o.originHash,u):i.viewMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh picking vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("out vec4 vViewPosition;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("uniform vec2 pickClipPos;"),a.push("vec4 remapClipPos(vec4 clipPos) {"),a.push(" clipPos.xy /= clipPos.w;"),a.push(" clipPos.xy -= pickClipPos;"),a.push(" clipPos.xy *= clipPos.w;"),a.push(" return clipPos;"),a.push("}"),a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==i&&"cylindrical"!==i||(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"));a.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),a.push(" worldPosition.xyz = worldPosition.xyz + offset;"),a.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = remapClipPos(clipPos);"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(i.push("uniform vec4 pickColor;"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = pickColor; "),i.push("}"),i}(e)}}const vs=h.vec3(),ws=function(e,t){this._hash=e,this._shaderSource=new ys(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},gs={};ws.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=gs[t];if(!s){if(s=new ws(t,e),s.errors)return console.log(s.errors.join("\n")),null;gs[t]=s,A.memory.programs++}return s._useCount++,s},ws.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete gs[this._hash],A.memory.programs--)},ws.prototype.webglContextRestored=function(){this._program=null},ws.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCPickViewMatrix(i.originHash,o):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t>24&255,u=l>>16&255,h=l>>8&255,p=255&l;n.uniform4f(this._uPickColor,p/255,h/255,u/255,c/255),n.uniform2fv(this._uPickClipPos,e.pickClipPos),a.indicesBuf?(n.drawElements(a.primitive,a.indicesBuf.numItems,a.indicesBuf.itemType,0),e.drawElements++):a.positions&&n.drawArrays(n.TRIANGLES,0,a.positions.numItems)},ws.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Se(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,n=!!e._geometry._state.compressGeometry,i=[];i.push("#version 300 es"),i.push("// Surface picking vertex shader"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform vec3 offset;"),s&&(i.push("uniform bool clippable;"),i.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out float isPerspective;"));i.push("uniform vec2 pickClipPos;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy -= pickClipPos;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("out vec4 vColor;"),n&&i.push("uniform mat4 positionsDecodeMatrix;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),n&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push(" vec4 worldPosition = modelMatrix * localPosition; "),i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&i.push(" vWorldPosition = worldPosition;");i.push(" vColor = color;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Surface picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = vColor;"),i.push("}"),i}(e)}}const Ts=h.vec3(),bs=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Es(t),this._allocate(t)},Ds={};bs.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Ds[t];if(!s){if(s=new bs(t,e),s.errors)return console.log(s.errors.join("\n")),null;Ds[t]=s,A.memory.programs++}return s._useCount++,s},bs.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ds[this._hash],A.memory.programs--)},bs.prototype.webglContextRestored=function(){this._program=null},bs.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry,o=t._geometry._state,l=t.origin,c=r.backfaces,u=r.frontface,h=s.camera.project,p=a._getPickTrianglePositions(),d=a._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(h.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}if(n.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(i.originHash,l):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh occlusion vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push("}"),i}(e)}}const Cs=h.vec3(),_s=function(e,t){this._hash=e,this._shaderSource=new Ps(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Rs={};_s.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=Rs[t];if(!s){if(s=new _s(t,e),s.errors)return console.log(s.errors.join("\n")),null;Rs[t]=s,A.memory.programs++}return s._useCount++,s},_s.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Rs[this._hash],A.memory.programs--)},_s.prototype.webglContextRestored=function(){this._program=null},_s.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._material._state,r=t._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?n.disable(n.CULL_FACE):n.enable(n.CULL_FACE),e.backfaces=t);const s=i.frontface;e.frontface!==s&&(s?n.frontFace(n.CCW):n.frontFace(n.CW),e.frontface=s),this._lastMaterialId=i.id}const l=s.camera;if(n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCViewMatrix(r.originHash,o):l.viewMatrix),r.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,n=[];n.push("// Mesh shadow vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),n.push("uniform vec3 offset;"),s&&n.push("uniform mat4 positionsDecodeMatrix;");t&&n.push("out vec4 vWorldPosition;");n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),s&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("worldPosition = modelMatrix * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&n.push("vWorldPosition = worldPosition;");return n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("// Mesh shadow fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return i.push("outColor = encodeFloat(gl_FragCoord.z);"),i.push("}"),i}(e)}}const Os=function(e,t){this._hash=e,this._shaderSource=new Bs(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ss={};Os.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let n=Ss[s];if(!n){if(n=new Os(s,e),n.errors)return console.log(n.errors.join("\n")),null;Ss[s]=n,A.memory.programs++}return n._useCount++,n},Os.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ss[this._hash],A.memory.programs--)},Os.prototype.webglContextRestored=function(){this._program=null},Os.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,n=t._material._state,i=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.id!==this._lastMaterialId){const t=n.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const i=n.frontface;e.frontface!==i&&(i?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=i),e.lineWidth!==n.lineWidth&&(s.lineWidth(n.lineWidth),e.lineWidth=n.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,n.pointSize),this._lastMaterialId=n.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),i.combineGeometry){const n=t.vertexBufs;n.id!==this._lastVertexBufsId&&(n.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(n.positionsBuf,n.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=n.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),i.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,i.positionsDecodeMatrix),i.combineGeometry?i.indicesBufCombined&&(i.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),i.indicesBuf&&(i.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=i.id),i.combineGeometry?i.indicesBufCombined&&(s.drawElements(i.primitive,i.indicesBufCombined.numItems,i.indicesBufCombined.itemType,0),e.drawElements++):i.indicesBuf?(s.drawElements(i.primitive,i.indicesBuf.numItems,i.indicesBuf.itemType,0),e.drawElements++):i.positions&&(s.drawArrays(s.TRIANGLES,0,i.positions.numItems),e.drawArrays++)},Os.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Se(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uShadowViewMatrix=n.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=n.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,i,r,a;for(let o=0,l=this._uSectionPlanes.length;o0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const Ws=function(){const e=h.vec3(),t=h.vec3(),s=h.vec3(),n=h.vec3(),i=h.vec3(),r=h.vec3(),a=h.vec4(),o=h.vec3(),l=h.vec3(),c=h.vec3(),u=h.vec3(),p=h.vec3(),d=h.vec3(),A=h.vec3(),f=h.vec3(),I=h.vec3(),m=h.vec4(),y=h.vec4(),v=h.vec4(),w=h.vec3(),g=h.vec3(),E=h.vec3(),T=h.vec3(),b=h.vec3(),D=h.vec3(),P=h.vec3(),C=h.vec3(),_=h.vec3(),R=h.vec3(),B=h.vec3();return function(O,S,N,x){var L=x.primIndex;if(null!=L&&L>-1){const U=O.geometry._state,G=O.scene,j=G.camera,k=G.canvas;if("triangles"===U.primitiveName){x.primitive="triangle";const G=L,Q=U.indices,W=U.positions;let z,K,Y;if(Q){var M=Q[G+0],F=Q[G+1],H=Q[G+2];r[0]=M,r[1]=F,r[2]=H,x.indices=r,z=3*M,K=3*F,Y=3*H}else z=3*G,K=z+3,Y=K+3;if(s[0]=W[z+0],s[1]=W[z+1],s[2]=W[z+2],n[0]=W[K+0],n[1]=W[K+1],n[2]=W[K+2],i[0]=W[Y+0],i[1]=W[Y+1],i[2]=W[Y+2],U.compressGeometry){const e=U.positionsDecodeMatrix;e&&(St.decompressPosition(s,e,s),St.decompressPosition(n,e,n),St.decompressPosition(i,e,i))}x.canvasPos?h.canvasPosToLocalRay(k.canvas,O.origin?V(S,O.origin):S,N,O.worldMatrix,x.canvasPos,e,t):x.origin&&x.direction&&h.worldRayToLocalRay(O.worldMatrix,x.origin,x.direction,e,t),h.normalizeVec3(t),h.rayPlaneIntersect(e,t,s,n,i,a),x.localPos=a,x.position=a,m[0]=a[0],m[1]=a[1],m[2]=a[2],m[3]=1,h.transformVec4(O.worldMatrix,m,y),o[0]=y[0],o[1]=y[1],o[2]=y[2],x.canvasPos&&O.origin&&(o[0]+=O.origin[0],o[1]+=O.origin[1],o[2]+=O.origin[2]),x.worldPos=o,h.transformVec4(j.matrix,y,v),l[0]=v[0],l[1]=v[1],l[2]=v[2],x.viewPos=l,h.cartesianToBarycentric(a,s,n,i,c),x.bary=c;const X=U.normals;if(X){if(U.compressGeometry){const e=3*M,t=3*F,s=3*H;St.decompressNormal(X.subarray(e,e+2),u),St.decompressNormal(X.subarray(t,t+2),p),St.decompressNormal(X.subarray(s,s+2),d)}else u[0]=X[z],u[1]=X[z+1],u[2]=X[z+2],p[0]=X[K],p[1]=X[K+1],p[2]=X[K+2],d[0]=X[Y],d[1]=X[Y+1],d[2]=X[Y+2];const e=h.addVec3(h.addVec3(h.mulVec3Scalar(u,c[0],w),h.mulVec3Scalar(p,c[1],g),E),h.mulVec3Scalar(d,c[2],T),b);x.worldNormal=h.normalizeVec3(h.transformVec3(O.worldNormalMatrix,e,D))}const q=U.uv;if(q){if(A[0]=q[2*M],A[1]=q[2*M+1],f[0]=q[2*F],f[1]=q[2*F+1],I[0]=q[2*H],I[1]=q[2*H+1],U.compressGeometry){const e=U.uvDecodeMatrix;e&&(St.decompressUV(A,e,A),St.decompressUV(f,e,f),St.decompressUV(I,e,I))}x.uv=h.addVec3(h.addVec3(h.mulVec2Scalar(A,c[0],P),h.mulVec2Scalar(f,c[1],C),_),h.mulVec2Scalar(I,c[2],R),B)}}}}}();function zs(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let n=e.height||1;n<0&&(console.error("negative height not allowed - will invert"),n*=-1);let i=e.radialSegments||32;i<0&&(console.error("negative radialSegments not allowed - will invert"),i*=-1),i<3&&(i=3);let r=e.heightSegments||1;r<0&&(console.error("negative heightSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const a=!!e.openEnded;let o=e.center;const l=o?o[0]:0,c=o?o[1]:0,u=o?o[2]:0,h=n/2,p=n/r,d=2*Math.PI/i,A=1/i,f=(t-s)/r,I=[],m=[],v=[],w=[];let g,E,T,b,D,P,C,_,R,B,O;const S=(90-180*Math.atan(n/(s-t))/Math.PI)/90;for(g=0;g<=r;g++)for(D=t-g*f,P=h-g*p,E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),m.push(D*T),m.push(S),m.push(D*b),v.push(E*A),v.push(1*g/r),I.push(D*T+l),I.push(P+c),I.push(D*b+u);for(g=0;g0){for(R=I.length/3,m.push(0),m.push(1),m.push(0),v.push(.5),v.push(.5),I.push(0+l),I.push(h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(t*T),m.push(1),m.push(t*b),v.push(B),v.push(O),I.push(t*T+l),I.push(h+c),I.push(t*b+u);for(E=0;E0){for(R=I.length/3,m.push(0),m.push(-1),m.push(0),v.push(.5),v.push(.5),I.push(0+l),I.push(0-h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(s*T),m.push(-1),m.push(s*b),v.push(B),v.push(O),I.push(s*T+l),I.push(0-h+c),I.push(s*b+u);for(E=0;E":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function Xs(e={}){var t=e.origin||[0,0,0],s=t[0],n=t[1],i=t[2],r=e.size||1,a=[],o=[],l=e.text;y.isNumeric(l)&&(l=""+l);for(var c,u,h,p,d,A,f,I,m,v=(l||"").split("\n"),w=0,g=0,E=.04,T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,n=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const r=fn(s,this.wrapS);r&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,r);const a=fn(s,this.wrapT);if(a&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,a),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=fn(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}i?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,vn(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,vn(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,fn(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,fn(s,this.magFilter)));const o=fn(s,this.format,this.encoding),l=fn(s,this.type),c=yn(s,this.internalFormat,o,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,n,c,e[0].width,e[0].height);for(let t=0,n=e.length;t>t;return e+1}class Tn extends O{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new $e({texture:new mn({gl:this.scene.canvas.gl}),matrix:h.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=h.vec2([0,0]),this._scale=h.vec2([1,1]),this._rotate=h.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),A.memory.textures++}_checkMinFilter(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}_checkMagFilter(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}_checkWrapS(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkWrapT(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this._state.texture=new mn({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=h.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=h.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?h.mulMat4(t,s):s),0!==this._rotate&&(s=h.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?h.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=wn(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=wn(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),A.memory.textures--}}const bn=A.memory,Dn=h.AABB3();class Pn extends bt{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new $e({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=h.OBB3();const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var i;if(t.positionsDecodeMatrix);else{const e=St.getPositionsBounds(t.positions),r=St.compressPositions(t.positions,e.min,e.max);i=r.quantized,s.positionsDecodeMatrix=r.decodeMatrix,s.positionsBuf=new Ne(n,n.ARRAY_BUFFER,i,i.length,3,n.STATIC_DRAW),bn.positions+=s.positionsBuf.numItems,h.positions3ToAABB3(t.positions,this._aabb),h.positions3ToAABB3(i,Dn,s.positionsDecodeMatrix),h.AABB3ToOBB3(Dn,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new Ne(n,n.ARRAY_BUFFER,e,e.length,4,n.STATIC_DRAW),bn.colors+=s.colorsBuf.numItems}if(t.uv){const e=St.getUVBounds(t.uv),i=St.compressUVs(t.uv,e.min,e.max),r=i.quantized;s.uvDecodeMatrix=i.decodeMatrix,s.uvBuf=new Ne(n,n.ARRAY_BUFFER,r,r.length,2,n.STATIC_DRAW),bn.uvs+=s.uvBuf.numItems}if(t.normals){const e=St.compressNormals(t.normals);let i=s.compressGeometry;s.normalsBuf=new Ne(n,n.ARRAY_BUFFER,e,e.length,3,n.STATIC_DRAW,i),bn.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,e,e.length,1,n.STATIC_DRAW),bn.indices+=s.indicesBuf.numItems;const r=Dt(i,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,r,r.length,1,n.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),bn.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),bn.meshes--}}var Cn={};function _n(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return y.apply(e,{primitive:"lines",positions:[l,c,u,l,c,d,l,p,u,l,p,d,h,c,u,h,c,d,h,p,u,h,p,d],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]})}function Rn(e={}){let t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);let s=e.divisions||1;s<0&&(console.error("negative divisions not allowed - will invert"),s*=-1),s<1&&(s=1),t=t||10,s=s||10;const n=t/s,i=t/2,r=[],a=[];let o=0;for(let e=0,t=-i;e<=s;e++,t+=n)r.push(-i),r.push(0),r.push(t),r.push(i),r.push(0),r.push(t),r.push(t),r.push(0),r.push(-i),r.push(t),r.push(0),r.push(i),a.push(o++),a.push(o++),a.push(o++),a.push(o++);return y.apply(e,{primitive:"lines",positions:r,indices:a})}function Bn(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let n=e.xSegments||1;n<0&&(console.error("negative xSegments not allowed - will invert"),n*=-1),n<1&&(n=1);let i=e.xSegments||1;i<0&&(console.error("negative zSegments not allowed - will invert"),i*=-1),i<1&&(i=1);const r=e.center,a=r?r[0]:0,o=r?r[1]:0,l=r?r[2]:0,c=t/2,u=s/2,h=Math.floor(n)||1,p=Math.floor(i)||1,d=h+1,A=p+1,f=t/h,I=s/p,m=new Float32Array(d*A*3),v=new Float32Array(d*A*3),w=new Float32Array(d*A*2);let g,E,T,b,D,P,C,_=0,R=0;for(g=0;g65535?Uint32Array:Uint16Array)(h*p*6);for(g=0;g360&&(r=360);const a=e.center;let o=a?a[0]:0,l=a?a[1]:0;const c=a?a[2]:0,u=[],p=[],d=[],A=[];let f,I,m,v,w,g,E,T,b,D,P,C;for(T=0;T<=i;T++)for(E=0;E<=n;E++)f=E/n*r,I=.785398+T/i*Math.PI*2,o=t*Math.cos(f),l=t*Math.sin(f),m=(t+s*Math.cos(I))*Math.cos(f),v=(t+s*Math.cos(I))*Math.sin(f),w=s*Math.sin(I),u.push(m+o),u.push(v+l),u.push(w+c),d.push(1-E/n),d.push(T/i),g=h.normalizeVec3(h.subVec3([m,v,w],[o,l,c],[]),[]),p.push(g[0]),p.push(g[1]),p.push(g[2]);for(T=1;T<=i;T++)for(E=1;E<=n;E++)b=(n+1)*T+E-1,D=(n+1)*(T-1)+E-1,P=(n+1)*(T-1)+E,C=(n+1)*T+E,A.push(b),A.push(D),A.push(P),A.push(P),A.push(C),A.push(b);return y.apply(e,{positions:u,normals:p,uv:d,indices:A})}function Sn(e={}){if(e.points.length%3!=0)throw"Size of points array for given polyline should be divisible by 3";let t=e.points.length/3;if(t<2)throw"There should be at least 2 points to create a polyline";let s=[];for(let e=0;e>8},Cn.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},Cn.parse={},Cn.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",n=0;ni&&(i=l),cr&&(r=c),ua&&(a=u)}return{min:{x:t,y:s,z:n},max:{x:i,y:r,z:a}}};class Nn extends O{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=h.vec3(t.pos||[0,0,0]),this._up=h.vec3(t.up||[0,1,0]),this._normal=h.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=h.vec3(),this._rtcPos=h.vec3(),this._imageSize=h.vec2(),this._texture=new Tn(this,{flipY:!0}),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new on(this,{matrix:h.inverseMat4(h.lookAtMat4v(this._pos,h.subVec3(this._pos,this._normal,h.mat4()),this._up,h.mat4())),children:[this._bitmapMesh=new Qs(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new Lt(this,Bn({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new Gt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height/e,1,this._height]}}const xn=h.OBB3(),Ln=h.OBB3(),Mn=h.OBB3();class Fn{constructor(e,t,s,n,i,r,a=null,o=0){this.model=e,this.object=null,this.parent=null,this.transform=i,this.textureSet=r,this._matrixDirty=!1,this._matrixUpdateScheduled=!1,this.id=t,this.obb=null,this._aabbLocal=null,this._aabbWorld=h.AABB3(),this._aabbWorldDirty=!1,this.layer=a,this.portionId=o,this._color=new Uint8Array([s[0],s[1],s[2],n]),this._colorize=new Uint8Array([s[0],s[1],s[2],n]),this._colorizing=!1,this._transparent=n<255,this.numTriangles=0,this.origin=null,this.entity=null,i&&i._addMesh(this)}_sceneModelDirty(){this._aabbWorldDirty=!0,this.layer.aabbDirty=!0}_transformDirty(){this._matrixDirty||this._matrixUpdateScheduled||(this.model._meshMatrixDirty(this),this._matrixDirty=!0,this._matrixUpdateScheduled=!0),this._aabbWorldDirty=!0,this.layer.aabbDirty=!0,this.entity&&this.entity._transformDirty()}_updateMatrix(){this.transform&&this._matrixDirty&&this.layer.setMatrix(this.portionId,this.transform.worldMatrix),this._matrixDirty=!1,this._matrixUpdateScheduled=!1}_finalize(e){this.layer.initFlags(this.portionId,e,this._transparent)}_finalize2(){this.layer.flushInitFlags&&this.layer.flushInitFlags()}_setVisible(e){this.layer.setVisible(this.portionId,e,this._transparent)}_setColor(e){this._color[0]=e[0],this._color[1]=e[1],this._color[2]=e[2],this._colorizing||this.layer.setColor(this.portionId,this._color,!1)}_setColorize(e){e?(this._colorize[0]=e[0],this._colorize[1]=e[1],this._colorize[2]=e[2],this.layer.setColor(this.portionId,this._colorize,false),this._colorizing=!0):(this.layer.setColor(this.portionId,this._color,false),this._colorizing=!1)}_setOpacity(e,t){const s=e<255,n=this._transparent!==s;this._color[3]=e,this._colorize[3]=e,this._transparent=s,this._colorizing?this.layer.setColor(this.portionId,this._colorize):this.layer.setColor(this.portionId,this._color),n&&this.layer.setTransparent(this.portionId,t,s)}_setOffset(e){this.layer.setOffset(this.portionId,e)}_setHighlighted(e){this.layer.setHighlighted(this.portionId,e,this._transparent)}_setXRayed(e){this.layer.setXRayed(this.portionId,e,this._transparent)}_setSelected(e){this.layer.setSelected(this.portionId,e,this._transparent)}_setEdges(e){this.layer.setEdges(this.portionId,e,this._transparent)}_setClippable(e){this.layer.setClippable(this.portionId,e,this._transparent)}_setCollidable(e){this.layer.setCollidable(this.portionId,e)}_setPickable(e){this.layer.setPickable(this.portionId,e,this._transparent)}_setCulled(e){this.layer.setCulled(this.portionId,e,this._transparent)}canPickTriangle(){return!1}drawPickTriangles(e,t){}pickTriangleSurface(e){}precisionRayPickSurface(e,t,s,n){return!!this.layer.precisionRayPickSurface&&this.layer.precisionRayPickSurface(this.portionId,e,t,s,n)}canPickWorldPos(){return!0}drawPickDepths(e){this.model.drawPickDepths(e)}drawPickNormals(e){this.model.drawPickNormals(e)}delegatePickedEntity(){return this.parent}getEachVertex(e){this.layer.getEachVertex(this.portionId,e)}set aabb(e){this._aabbLocal=e}get aabb(){if(this._aabbWorldDirty){if(h.AABB3ToOBB3(this._aabbLocal,xn),this.transform?(h.transformOBB3(this.transform.worldMatrix,xn,Ln),h.transformOBB3(this.model.worldMatrix,Ln,Mn),h.OBB3ToAABB3(Mn,this._aabbWorld)):(h.transformOBB3(this.model.worldMatrix,xn,Ln),h.OBB3ToAABB3(Ln,this._aabbWorld)),this.origin){const e=this.origin;this._aabbWorld[0]+=e[0],this._aabbWorld[1]+=e[1],this._aabbWorld[2]+=e[2],this._aabbWorld[3]+=e[0],this._aabbWorld[4]+=e[1],this._aabbWorld[5]+=e[2]}this._aabbWorldDirty=!1}return this._aabbWorld}_destroy(){this.model.scene._renderer.putPickID(this.pickId)}}const Hn=new class{constructor(){this._uint8Arrays={},this._float32Arrays={}}_clear(){this._uint8Arrays={},this._float32Arrays={}}getUInt8Array(e){let t=this._uint8Arrays[e];return t||(t=new Uint8Array(e),this._uint8Arrays[e]=t),t}getFloat32Array(e){let t=this._float32Arrays[e];return t||(t=new Float32Array(e),this._float32Arrays[e]=t),t}};let Un=0;const Gn={NOT_RENDERED:0,COLOR_OPAQUE:1,COLOR_TRANSPARENT:2,SILHOUETTE_HIGHLIGHTED:3,SILHOUETTE_SELECTED:4,SILHOUETTE_XRAYED:5,EDGES_COLOR_OPAQUE:6,EDGES_COLOR_TRANSPARENT:7,EDGES_HIGHLIGHTED:8,EDGES_SELECTED:9,EDGES_XRAYED:10,PICK:11},jn=new Float32Array([1,1,1,1]),Vn=new Float32Array([0,0,0,1]),kn=h.vec4(),Qn=h.vec3(),Wn=h.vec3(),zn=h.mat4();class Kn{constructor(e,t=!1,{instancing:s=!1,edges:n=!1}={}){this._scene=e,this._withSAO=t,this._instancing=s,this._edges=n,this._hash=this._getHash(),this._matricesUniformBlockBufferBindingPoint=0,this._matricesUniformBlockBuffer=this._scene.canvas.gl.createBuffer(),this._matricesUniformBlockBufferData=new Float32Array(96),this._vaoCache=new WeakMap,this._allocate()}_getHash(){return this._scene._sectionPlanesState.getHash()}_buildShader(){return{vertex:this._buildVertexShader(),fragment:this._buildFragmentShader()}}_buildVertexShader(){return[""]}_buildFragmentShader(){return[""]}_addMatricesUniformBlockLines(e,t=!1){return e.push("uniform Matrices {"),e.push(" mat4 worldMatrix;"),e.push(" mat4 viewMatrix;"),e.push(" mat4 projMatrix;"),e.push(" mat4 positionsDecodeMatrix;"),t&&(e.push(" mat4 worldNormalMatrix;"),e.push(" mat4 viewNormalMatrix;")),e.push("};"),e}_addRemapClipPosLines(e,t=1){return e.push("uniform vec2 drawingBufferSize;"),e.push("uniform vec2 pickClipPos;"),e.push("vec4 remapClipPos(vec4 clipPos) {"),e.push(" clipPos.xy /= clipPos.w;"),1===t?e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"):e.push(` clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(${t}));`),e.push(" clipPos.xy *= clipPos.w;"),e.push(" return clipPos;"),e.push("}"),e}getValid(){return this._hash===this._getHash()}setSectionPlanesStateUniforms(e){const t=this._scene,{gl:s}=t.canvas,{model:n,layerIndex:i}=e,r=t._sectionPlanesState.getNumAllocatedSectionPlanes(),a=t._sectionPlanesState.sectionPlanes.length;if(r>0){const o=t._sectionPlanesState.sectionPlanes,l=i*a,c=n.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0&&A.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,A.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),A.lightMaps.length>0&&A.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,A.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),this._withSAO){const t=a.sao;if(t.possible){const s=o.drawingBufferWidth,n=o.drawingBufferHeight;kn[0]=s,kn[1]=n,kn[2]=t.blendCutoff,kn[3]=t.blendFactor,o.uniform4fv(this._uSAOParams,kn),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++}}if(n){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===Gn[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=a.xrayMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===Gn[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=a.highlightMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===Gn[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=a.selectedMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else o.uniform4fv(this._uColor,this._edges?Vn:jn)}this._draw({state:l,frameCtx:e,incrementDrawState:i}),o.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,A.memory.programs--}}class Yn extends Kn{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!1,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=n.pickElementsCount||s.indicesBuf.numItems,r=n.pickElementsOffset?n.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,r),i&&n.drawElements++}}}class Xn extends Yn{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i;const r=[];r.push("#version 300 es"),r.push("// Triangles batching draw vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class qn extends Yn{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching flat-shading draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),n){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}i.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),i.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),i.push("float lambertian = 1.0;"),i.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),i.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),i.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, color.a ));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}class Zn extends Yn{constructor(e){super(e,!1,{instancing:!1,edges:!0})}}class $n extends Zn{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class ei extends Zn{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry edges drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class ti extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class si extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class ni extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class ii extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class ri extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching depth fragment shader"),n.push("precision highp float;"),n.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),n.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),n.push("}"),n}}class ai extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class oi extends Yn{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class li extends Yn{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Triangles batching quality draw vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),r.push("vFragDepth = 1.0 + clipPos.w;")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Triangles batching quality draw fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),a.push("uniform sampler2D uAOMap;"),a.push("in vec4 vViewPosition;"),a.push("in vec3 vViewNormal;"),a.push("in vec4 vColor;"),a.push("in vec2 vUV;"),a.push("in vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick flat normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class ui extends Yn{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,n=e._sectionPlanesState,i=n.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching color texture fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform sampler2D uColorMap;"),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),r.push("uniform float gammaFactor;"),r.push("vec4 linearToLinear( in vec4 value ) {"),r.push(" return value;"),r.push("}"),r.push("vec4 sRGBToLinear( in vec4 value ) {"),r.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),r.push("}"),r.push("vec4 gammaToLinear( in vec4 value) {"),r.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),r.push("}"),t&&(r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const mi=h.vec3(),yi=h.vec3(),vi=h.vec3(),wi=h.vec3(),gi=h.mat4();class Ei extends Kn{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=mi;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=yi;if(l){const e=vi;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,gi),m=wi,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElements(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0),o.edgeIndicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Ti{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new Jn(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new ti(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new si(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Ii(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Ei(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Xn(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Xn(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new qn(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new qn(this._scene,!0)),this._flatColorRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new ui(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new ui(this._scene,!0)),this._colorTextureRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new li(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new li(this._scene,!0)),this._pbrRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Jn(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ri(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new ai(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new $n(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new ei(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new ti(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new ni(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new ci(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new si(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new ii(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new oi(this._scene)),this._shadowRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Ei(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ii(this._scene)),this._snapInitRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const bi={};let Di=65536,Pi=5e6;class Ci{constructor(){}set doublePrecisionEnabled(e){h.setDoublePrecisionEnabled(e)}get doublePrecisionEnabled(){return h.getDoublePrecisionEnabled()}set maxDataTextureHeight(e){(e=1024*Math.ceil(e/1024))>4096?e=4096:e<1024&&(e=1024),Di=e}get maxDataTextureHeight(){return Di}set maxGeometryBatchSize(e){e<1e5?e=1e5:e>5e6&&(e=5e6),Pi=e}get maxGeometryBatchSize(){return Pi}}const _i=new Ci;class Ri{constructor(){this.maxVerts=_i.maxGeometryBatchSize,this.maxIndices=3*_i.maxGeometryBatchSize,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const Bi=h.mat4(),Oi=h.mat4();function Si(e,t,s){const n=e.length,i=new Uint16Array(n),r=t[0],a=t[1],o=t[2],l=t[3]-r,c=t[4]-a,u=t[5]-o,p=65525,d=p/l,A=p/c,f=p/u,I=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(n))*(i>=0?1:-1),n=e,i=t}return new Int8Array([Math[t](127.5*n+(n<0?-1:0)),Math[s](127.5*i+(i<0?-1:0))])}function Li(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}const Mi=h.mat4(),Fi=h.mat4(),Hi=h.vec4([0,0,0,1]),Ui=h.vec3(),Gi=h.vec3(),ji=h.vec3(),Vi=h.vec3(),ki=h.vec3(),Qi=h.vec3(),Wi=h.vec3();class zi{constructor(e){console.info("Creating VBOBatchingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=bi[t];return s||(s=new Ti(e),bi[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete bi[t],s._destroy()}))),s}(e.model.scene),this._buffer=new Ri(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new $e({origin:h.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=h.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=h.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=h.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.solid=!!e.solid}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)for(let e=0,t=r.length;e0){const e=Mi;m?h.inverseMat4(h.transposeMat4(m,Fi),e):h.identityMat4(e,e),function(e,t,s,n,i){function r(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let a,o,l,c,u,p,d=new Float32Array([0,0,0,0]),A=new Float32Array([0,0,0,0]);for(p=0;pu&&(l=a,u=c),a=xi(A,"floor","ceil"),o=Li(a),c=r(A,o),c>u&&(l=a,u=c),a=xi(A,"ceil","ceil"),o=Li(a),c=r(A,o),c>u&&(l=a,u=c),n[i+p+0]=l[0],n[i+p+1]=l[1],n[i+p+2]=0}(e,i,i.length,w.normals,w.normals.length)}if(l)for(let e=0,t=l.length;e0)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0){const n=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):Si(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=h.mat4());if(e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const n=new Int8Array(s.normals);let i=!0;e.normalsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.normals.length,3,t.STATIC_DRAW,i)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.uv.length>0)if(e.uvDecodeMatrix){let n=!1;e.uvBuf=new Ne(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,n)}else{const n=St.getUVBounds(s.uv),i=St.compressUVs(s.uv,n.min,n.max),r=i.quantized;let a=!1;e.uvDecodeMatrix=h.mat3(i.decodeMatrix),e.uvBuf=new Ne(t,t.ARRAY_BUFFER,r,r.length,2,t.STATIC_DRAW,a)}if(s.metallicRoughness.length>0){const n=new Uint8Array(s.metallicRoughness);let i=!1;e.metallicRoughnessBuf=new Ne(t,t.ARRAY_BUFFER,n,s.metallicRoughness.length,2,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n),r=!1;e.flagsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const n=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,n,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,n=this._portions[s],i=4*n.vertsBaseIndex,r=4*n.numVerts,a=this._scratchMemory.getUInt8Array(r),o=t[0],l=t[1],c=t[2],u=t[3];for(let e=0;ey)&&(y=e,n.set(v),i&&h.triangleNormal(A,f,I,i),m=!0)}}return m&&i&&(h.transformVec3(this.model.worldNormalMatrix,i,i),h.normalizeVec3(i)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class Ki extends Kn{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),i&&n.drawElements++)}}class Yi extends Ki{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i,r,a;const o=[];for(o.push("#version 300 es"),o.push("// Instancing geometry drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec2 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;"),i=0,r=s.lights.length;i= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),n&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),o.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),i=0,r=s.lights.length;i0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class Xi extends Ki{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let n,i;const r=t.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry flat-shading drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),r){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),n=0,i=s.lights.length;n0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing fill fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Ji extends Ki{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class Zi extends Ji{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class $i extends Ji{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesColorRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class er extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class tr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class sr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class nr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class ir extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("precision highp float;"),r.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),r.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),r.push("}"),r}}class rr extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class ar extends Ki{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const or={3e3:"linearToLinear",3001:"sRGBToLinear"};class lr extends Ki{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Instancing geometry quality drawing vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("in vec4 modelNormalMatrixCol0;"),r.push("in vec4 modelNormalMatrixCol1;"),r.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),r.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Instancing geometry quality drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),a.push("#define PI 3.14159265359"),a.push("#define RECIPROCAL_PI 0.31830988618"),a.push("#define RECIPROCAL_PI2 0.15915494"),a.push("#define EPSILON 1e-6"),a.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),a.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),a.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),a.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),a.push(" return normalize(surf_norm );"),a.push(" }"),a.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),a.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),a.push(" vec2 st0 = dFdx( uv.st );"),a.push(" vec2 st1 = dFdy( uv.st );"),a.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),a.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),a.push(" vec3 N = normalize( surf_norm );"),a.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),a.push(" mat3 tsn = mat3( S, T, N );"),a.push(" return normalize( tsn * mapN );"),a.push("}"),a.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),a.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),a.push("}"),a.push("struct IncidentLight {"),a.push(" vec3 color;"),a.push(" vec3 direction;"),a.push("};"),a.push("struct ReflectedLight {"),a.push(" vec3 diffuse;"),a.push(" vec3 specular;"),a.push("};"),a.push("struct Geometry {"),a.push(" vec3 position;"),a.push(" vec3 viewNormal;"),a.push(" vec3 worldNormal;"),a.push(" vec3 viewEyeDir;"),a.push("};"),a.push("struct Material {"),a.push(" vec3 diffuseColor;"),a.push(" float specularRoughness;"),a.push(" vec3 specularColor;"),a.push(" float shine;"),a.push("};"),a.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),a.push(" float r = ggxRoughness + 0.0001;"),a.push(" return (2.0 / (r * r) - 2.0);"),a.push("}"),a.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),a.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),a.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),a.push("}"),n.reflectionMaps.length>0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = "+or[n.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = "+or[n.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),n.push("}"),n}}class ur extends Ki{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState;let i,r;const a=s.getNumAllocatedSectionPlanes()>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),a){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}for(o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=n.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const mr=h.vec3(),yr=h.vec3(),vr=h.vec3(),wr=h.vec3(),gr=h.mat4();class Er extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=mr;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=yr;if(l){const e=h.transformPoint3(u,l,vr);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,gr),m=wr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0,o.numInstances),o.edgeIndicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Tr{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new qi(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new er(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new tr(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Ir(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Er(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Yi(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Yi(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new Xi(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new Xi(this._scene,!0)),this._flatColorRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new lr(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new lr(this._scene,!0)),this._pbrRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new ur(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new ur(this._scene,!0)),this._colorTextureRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new qi(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ir(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new rr(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Zi(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new $i(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new er(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new sr(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new cr(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new tr(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new nr(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new ar(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ir(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Er(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const br={};const Dr=new Uint8Array(4),Pr=new Float32Array(1),Cr=h.vec4([0,0,0,1]),_r=new Float32Array(3),Rr=h.vec3(),Br=h.vec3(),Or=h.vec3(),Sr=h.vec3(),Nr=h.vec3(),xr=h.vec3(),Lr=h.vec3(),Mr=new Float32Array(4);class Fr{constructor(e){console.info("Creating VBOInstancingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=br[t];return s||(s=new Tr(e),br[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete br[t],s._destroy()}))),s}(e.model.scene),this._aabb=h.collapseAABB3(),this._state=new $e({numInstances:0,obb:h.OBB3(),origin:h.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrix=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;e.colorsBuf=new Ne(n,n.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,n.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new Ne(n,n.ARRAY_BUFFER,t,this._metallicRoughness.length,2,n.STATIC_DRAW,s)}if(r>0){let t=!1;e.flagsBuf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(r),r,1,n.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,n.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new Ne(n,n.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,n.STATIC_DRAW,s),e.positionsDecodeMatrix=h.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),i=!1;e.colorsBuf=new Ne(n,n.ARRAY_BUFFER,s,s.length,4,n.STATIC_DRAW,i)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new Ne(n,n.ARRAY_BUFFER,s,s.length,2,n.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,n.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new Ne(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,n.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelMatrixCol1Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelMatrixCol2Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new Ne(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new Ne(n,n.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,n.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Dr[0]=t[0],Dr[1]=t[1],Dr[2]=t[2],Dr[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Dr,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&z),i=!!(t&J),r=!!(t&Z),a=!!(t&$),o=!!(t&ee),l=!!(t&Y),c=!!(t&K);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?Gn.NOT_RENDERED:s?Gn.COLOR_TRANSPARENT:Gn.COLOR_OPAQUE,h=!n||c?Gn.NOT_RENDERED:a?Gn.SILHOUETTE_SELECTED:r?Gn.SILHOUETTE_HIGHLIGHTED:i?Gn.SILHOUETTE_XRAYED:Gn.NOT_RENDERED;let p=0;p=!n||c?Gn.NOT_RENDERED:a?Gn.EDGES_SELECTED:r?Gn.EDGES_HIGHLIGHTED:i?Gn.EDGES_XRAYED:o?s?Gn.EDGES_COLOR_TRANSPARENT:Gn.EDGES_COLOR_OPAQUE:Gn.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?Gn.PICK:Gn.NOT_RENDERED)<<12,d|=(t&X?1:0)<<16,Pr[0]=d,this._state.flagsBuf&&this._state.flagsBuf.setData(Pr,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(_r[0]=t[0],_r[1]=t[1],_r[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(_r,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,n=s.geometry,i=this._portions[e];if(!i)return void this.model.error("portion not found: "+e);const r=n.quantizedPositions,a=s.origin,o=i.offset,l=a[0]+o[0],c=a[1]+o[1],u=a[2]+o[2],p=Cr,d=i.matrix,A=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=r.length;ev)&&(v=e,n.set(w),i&&h.triangleNormal(f,I,m,i),y=!0)}}return y&&i&&(h.transformVec3(o.normalMatrix,i,i),h.transformVec3(this.model.worldNormalMatrix,i,i),h.normalizeVec3(i)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class Hr extends Kn{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),i&&n.drawElements++}}class Ur extends Hr{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Gr extends Hr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const jr=h.vec3(),Vr=h.vec3(),kr=h.vec3(),Qr=h.vec3(),Wr=h.mat4();class zr extends Kn{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=jr;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Vr;if(l){const e=kr;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Wr),m=Qr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Kr=h.vec3(),Yr=h.vec3(),Xr=h.vec3(),qr=h.vec3(),Jr=h.mat4();class Zr extends Kn{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Kr;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Yr;if(l){const e=Xr;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Jr),m=qr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class $r{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Ur(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Gr(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new zr(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Zr(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const ea={};class ta{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}class sa{constructor(e){console.info("Creating VBOBatchingLinesLayer"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=ea[t];return s||(s=new $r(e),ea[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete ea[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new ta(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new $e({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:h.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=h.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=h.vec3(e.origin))}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=Si(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.colors.length>0){const n=s.colors.length/4,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ne(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2],c=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines instancing color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class ra extends na{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const aa=h.vec3(),oa=h.vec3(),la=h.vec3();h.vec3();const ca=h.mat4();class ua extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=aa;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=oa;if(l){const e=h.transformPoint3(u,l,la);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,ca),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),o.indicesBuf.bind(),r.drawElementsInstanced(r.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind(),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ha=h.vec3(),pa=h.vec3(),da=h.vec3();h.vec3();const Aa=h.mat4();class fa extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=ha;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=pa;if(l){const e=h.transformPoint3(u,l,da);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Aa),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Ia{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._snapInitRenderer||(this._snapInitRenderer=new ua(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new fa(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new ia(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new ra(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new ua(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new fa(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const ma={};const ya=new Uint8Array(4),va=new Float32Array(1),wa=new Float32Array(3),ga=new Float32Array(4);class Ea{constructor(e){console.info("VBOInstancingLinesLayer"),this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=ma[t];return s||(s=new Ia(e),ma[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete ma[t],s._destroy()}))),s}(e.model.scene),this._aabb=h.collapseAABB3(),this._state=new $e({obb:h.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,e.origin&&(this._state.origin=h.vec3(e.origin)),this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;this._state.colorsBuf=new Ne(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(i>0){let t=!1;this._state.flagsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(i),i,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(s.colorsCompressed&&s.colorsCompressed.length>0){const n=new Uint8Array(s.colorsCompressed),i=!1;t.colorsBuf=new Ne(e,e.ARRAY_BUFFER,n,n.length,4,e.STATIC_DRAW,i)}if(s.positionsCompressed&&s.positionsCompressed.length>0){const n=!1;t.positionsBuf=new Ne(e,e.ARRAY_BUFFER,s.positionsCompressed,s.positionsCompressed.length,3,e.STATIC_DRAW,n),t.positionsDecodeMatrix=h.mat4(s.positionsDecodeMatrix)}if(s.indices&&s.indices.length>0&&(t.indicesBuf=new Ne(e,e.ELEMENT_ARRAY_BUFFER,new Uint32Array(s.indices),s.indices.length,1,e.STATIC_DRAW),t.numIndices=s.indices.length),this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";ya[0]=t[0],ya[1]=t[1],ya[2]=t[2],ya[3]=t[3],this._state.colorsBuf.setData(ya,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&z),i=!!(t&J),r=!!(t&Z),a=!!(t&$),o=!!(t&ee),l=!!(t&Y),c=!!(t&K);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?Gn.NOT_RENDERED:s?Gn.COLOR_TRANSPARENT:Gn.COLOR_OPAQUE,h=!n||c?Gn.NOT_RENDERED:a?Gn.SILHOUETTE_SELECTED:r?Gn.SILHOUETTE_HIGHLIGHTED:i?Gn.SILHOUETTE_XRAYED:Gn.NOT_RENDERED;let p=0;p=!n||c?Gn.NOT_RENDERED:a?Gn.EDGES_SELECTED:r?Gn.EDGES_HIGHLIGHTED:i?Gn.EDGES_XRAYED:o?s?Gn.EDGES_COLOR_TRANSPARENT:Gn.EDGES_COLOR_OPAQUE:Gn.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?Gn.PICK:Gn.NOT_RENDERED)<<12,d|=(t&X?255:0)<<16,va[0]=d,this._state.flagsBuf.setData(va,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(wa[0]=t[0],wa[1]=t[1],wa[2]=t[2],this._state.offsetsBuf.setData(wa,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;ga[0]=t[0],ga[1]=t[4],ga[2]=t[8],ga[3]=t[12],this._state.modelMatrixCol0Buf.setData(ga,s),ga[0]=t[1],ga[1]=t[5],ga[2]=t[9],ga[3]=t[13],this._state.modelMatrixCol1Buf.setData(ga,s),ga[0]=t[2],ga[1]=t[6],ga[2]=t[10],ga[3]=t[14],this._state.modelMatrixCol2Buf.setData(ga,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,Gn.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,Gn.PICK)}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class Ta extends Kn{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),i&&n.drawArrays++}}class ba extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial,n=[];return n.push("#version 300 es"),n.push("// Points batching color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Da extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 color;"),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching silhouette vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}class Pa extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class Ca extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batched pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batched pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class _a extends Ta{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push(" gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching occlusion fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}const Ra=h.vec3(),Ba=h.vec3(),Oa=h.vec3(),Sa=h.vec3(),Na=h.mat4();class xa extends Kn{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Ra;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Ba;if(l){const e=Oa;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Na),m=Sa,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const La=h.vec3(),Ma=h.vec3(),Fa=h.vec3(),Ha=h.vec3(),Ua=h.mat4();class Ga extends Kn{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=La;let I,m;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Ma;if(l){const e=Fa;h.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,Ua),m=Ha,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class ja{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new ba(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Da(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Pa(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Ca(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new _a(this._scene)),this._occlusionRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new xa(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Ga(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Va={};class ka{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}class Qa{constructor(e){console.info("Creating VBOBatchingPointsLayer"),this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Va[t];return s||(s=new ja(e),Va[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Va[t],s._destroy()}))),s}(e.model.scene),this._buffer=new ka(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new $e({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:h.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=h.collapseAABB3(),this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=h.vec3(e.origin))}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=Si(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ne(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ne(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Ka extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 silhouetteColor;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Ya extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick mesh fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class Xa extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class qa extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Ja extends Wa{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing depth vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class Za extends Wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }"),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const $a=h.vec3(),eo=h.vec3(),to=h.vec3();h.vec3();const so=h.mat4();class no extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=$a;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=eo;if(l){const e=h.transformPoint3(u,l,to);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,so),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),r.drawArraysInstanced(r.POINTS,0,o.positionsBuf.numItems,o.numInstances),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const io=h.vec3(),ro=h.vec3(),ao=h.vec3();h.vec3();const oo=h.mat4();class lo extends Kn{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=io;let I;if(f[0]=h.safeInv(d[3]-d[0])*h.MAX_INT,f[1]=h.safeInv(d[4]-d[1])*h.MAX_INT,f[2]=h.safeInv(d[5]-d[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(f[0]),e.snapPickCoordinateScale[1]=h.safeInv(f[1]),e.snapPickCoordinateScale[2]=h.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=ro;if(l){const e=h.transformPoint3(u,l,ao);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=V(A,t,oo),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(p,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class co{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new za(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ka(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Ja(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Ya(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Xa(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new qa(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new Za(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new no(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new lo(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const uo={};const ho=new Uint8Array(4),po=new Float32Array(1),Ao=new Float32Array(3),fo=new Float32Array(4);class Io{constructor(e){console.info("VBOInstancingPointsLayer"),this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=uo[t];return s||(s=new co(e),uo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete uo[t],s._destroy()}))),s}(e.model.scene),this._aabb=h.collapseAABB3(),this._state=new $e({obb:h.OBB3(),numInstances:0,origin:e.origin?h.vec3(e.origin):null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let n=!1;s.flagsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,n)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;s.offsetsBuf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(n.positionsCompressed&&n.positionsCompressed.length>0){const t=!1;s.positionsBuf=new Ne(e,e.ARRAY_BUFFER,n.positionsCompressed,n.positionsCompressed.length,3,e.STATIC_DRAW,t),s.positionsDecodeMatrix=h.mat4(n.positionsDecodeMatrix)}if(n.colorsCompressed&&n.colorsCompressed.length>0){const t=new Uint8Array(n.colorsCompressed),i=!1;s.colorsBuf=new Ne(e,e.ARRAY_BUFFER,t,t.length,4,e.STATIC_DRAW,i)}if(this._modelMatrixCol0.length>0){const t=!1;s.modelMatrixCol0Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),s.modelMatrixCol1Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),s.modelMatrixCol2Buf=new Ne(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;s.pickColorsBuf=new Ne(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}s.geometry=null,this._finalized=!0}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";ho[0]=t[0],ho[1]=t[1],ho[2]=t[2],this._state.colorsBuf.setData(ho,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&z),i=!!(t&J),r=!!(t&Z),a=!!(t&$),o=!!(t&ee),l=!!(t&Y),c=!!(t&K);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?Gn.NOT_RENDERED:s?Gn.COLOR_TRANSPARENT:Gn.COLOR_OPAQUE,h=!n||c?Gn.NOT_RENDERED:a?Gn.SILHOUETTE_SELECTED:r?Gn.SILHOUETTE_HIGHLIGHTED:i?Gn.SILHOUETTE_XRAYED:Gn.NOT_RENDERED;let p=0;p=!n||c?Gn.NOT_RENDERED:a?Gn.EDGES_SELECTED:r?Gn.EDGES_HIGHLIGHTED:i?Gn.EDGES_XRAYED:o?s?Gn.EDGES_COLOR_TRANSPARENT:Gn.EDGES_COLOR_OPAQUE:Gn.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?Gn.PICK:Gn.NOT_RENDERED)<<12,d|=(t&X?255:0)<<16,po[0]=d,this._state.flagsBuf.setData(po,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Ao[0]=t[0],Ao[1]=t[1],Ao[2]=t[2],this._state.offsetsBuf.setData(Ao,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;fo[0]=t[0],fo[1]=t[4],fo[2]=t[8],fo[3]=t[12],this._state.modelMatrixCol0Buf.setData(fo,s),fo[0]=t[1],fo[1]=t[5],fo[2]=t[9],fo[3]=t[13],this._state.modelMatrixCol1Buf.setData(fo,s),fo[0]=t[2],fo[1]=t[6],fo[2]=t[10],fo[3]=t[14],this._state.modelMatrixCol2Buf.setData(fo,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,Gn.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,Gn.PICK)}drawPickNormals(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,Gn.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,Gn.PICK)}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}const mo=h.vec3(),yo=h.vec3(),vo=h.mat4();class wo{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uPerObjectDecodeMatrix,this._uPerVertexPosition,this.uPerObjectColorAndFlags,this._uPerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=mo;if(I){const t=h.transformPoint3(p,c,yo);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,vo)}else f=A;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,8),a.drawArrays(a.LINES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,16),a.drawArrays(a.LINES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,32),a.drawArrays(a.LINES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// LinesDataTextureColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uPerObjectDecodeMatrix;"),s.push("uniform highp sampler2D uPerObjectMatrix;"),s.push("uniform lowp usampler2D uPerObjectColorAndFlags;"),s.push("uniform mediump usampler2D uPerVertexPosition;"),s.push("uniform highp usampler2D uPerLineIndices;"),s.push("uniform mediump usampler2D uPerLineObject;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push(" int lineIndex = gl_VertexID / 2;"),s.push(" int h_packed_object_id_index = (lineIndex >> 3) & 4095;"),s.push(" int v_packed_object_id_index = (lineIndex >> 3) >> 12;"),s.push(" int objectIndex = int(texelFetch(uPerLineObject, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push(" ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" } else {"),s.push(" ivec4 packedVertexBase = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push(" ivec4 packedLineIndexBaseOffset = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push(" int lineIndexBaseOffset = (packedLineIndexBaseOffset.r << 24) + (packedLineIndexBaseOffset.g << 16) + (packedLineIndexBaseOffset.b << 8) + packedLineIndexBaseOffset.a;"),s.push(" int h_index = (lineIndex - lineIndexBaseOffset) & 4095;"),s.push(" int v_index = (lineIndex - lineIndexBaseOffset) >> 12;"),s.push(" ivec3 vertexIndices = ivec3(texelFetch(uPerLineIndices, ivec2(h_index, v_index), 0));"),s.push(" ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push(" int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push(" int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push(" mat4 objectInstanceMatrix = mat4 (texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" vec3 position = vec3(texelFetch(uPerVertexPosition, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" uvec4 color = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push(" if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" };"),s.push(" vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push(" vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push(" vFragDepth = 1.0 + clipPos.w;"),s.push(" isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push(" gl_Position = clipPos;"),s.push(" vec4 rgb = vec4(color.rgba);"),s.push(" vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// LinesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class go{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null)}eagerCreateRenders(){}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new wo(this._scene,!1)),this._colorRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy()}}const Eo={};class To{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perLineNumberPortionId8Bits=[],this.perLineNumberPortionId16Bits=[],this.perLineNumberPortionId32Bits=[]}}class bo{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerLineIdPortionIds8Bits=null,this.texturePerLineIdPortionIds16Bits=null,this.texturePerLineIdPortionIds32Bits=null,this.texturePerLineIdIndices8Bits=null,this.texturePerLineIdIndices16Bits=null,this.texturePerLineIdIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerLineIdIndices8Bits,16:this.texturePerLineIdIndices16Bits,32:this.texturePerLineIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerLineIdPortionIds8Bits,16:this.texturePerLineIdPortionIds16Bits,32:this.texturePerLineIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindLineIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}}class Do{constructor(e,t,s,n,i=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=n,this._textureData=i}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const Po={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalLines:0,totalLines8Bits:0,totalLines16Bits:0,totalLines32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Po,null,4));let e=0;Object.keys(Po).forEach((t=>{t.startsWith("size")&&(e+=Po[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/Po.totalLines).toFixed(2)}`);let t={};Object.keys(Po).forEach((s=>{s.startsWith("size")&&(t[s]=`${(Po[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class Co{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateTextureForColorsAndFlags(e,t,s,n,i){const r=t.length;this.numPortions=r;const a=4096,o=Math.ceil(r/512);if(0===o)throw"texture height===0";const l=new Uint8Array(16384*o);Po.sizeDataColorsAndFlags+=l.byteLength,Po.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),l.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20);const c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,a,o),e.texSubImage2D(e.TEXTURE_2D,0,0,0,a,o,e.RGBA_INTEGER,e.UNSIGNED_BYTE,l,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,c,a,o,l)}generateTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);Po.sizeDataTextureOffsets+=i.byteLength,Po.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,r,s,n,i)}generateTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);Po.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Eo[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new To,this._dataTextureState=new bo,this._dataTextureGenerator=new Co,this._state=new $e({origin:h.vec3(t.origin),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&Po.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/2})),(this._state.numVertices+n>4096*Ro||t+i>4096*Ro)&&Po.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*Ro&&t+i<=4096*Ro}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/2/8)*2;Po.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}const s=t.positionsCompressed,n=t.indices,i=this._buffer;i.positionsCompressed.push(s);const r=i.lenPositionsCompressed/3,a=s.length/3;let o;i.lenPositionsCompressed+=s.length;let l=0;if(n){let e;l=n.length/2,a<=256?(e=i.indices8Bits,o=i.lenIndices8Bits/2,i.lenIndices8Bits+=n.length):a<=65536?(e=i.indices16Bits,o=i.lenIndices16Bits/2,i.lenIndices16Bits+=n.length):(e=i.indices32Bits,o=i.lenIndices32Bits/2,i.lenIndices32Bits+=n.length),e.push(n)}this._state.numVertices+=a,Po.numberOfGeometries++;return{vertexBase:r,numVertices:a,numLines:l,indicesBase:o}}_createSubPortion(e,t){const s=e.color,n=e.colors,i=e.opacity,r=e.meshMatrix,a=e.pickColor,o=this._buffer,l=this._state;o.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),o.perObjectInstancePositioningMatrices.push(r||xo),o.perObjectSolid.push(!!e.solid),n?o.perObjectColors.push([255*n[0],255*n[1],255*n[2],255]):s&&o.perObjectColors.push([s[0],s[1],s[2],i]),o.perObjectPickColors.push(a),o.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?l.numIndices8Bits:t.numVertices<=65536?l.numIndices16Bits:l.numIndices32Bits,o.perObjectIndexBaseOffsets.push(e/2-t.indicesBase)}const c=this._subPortions.length;if(t.numLines>0){let e,s=2*t.numLines;t.numVertices<=256?(e=o.perLineNumberPortionId8Bits,l.numIndices8Bits+=s,Po.totalLines8Bits+=t.numLines):t.numVertices<=65536?(e=o.perLineNumberPortionId16Bits,l.numIndices16Bits+=s,Po.totalLines16Bits+=t.numLines):(e=o.perLineNumberPortionId32Bits,l.numIndices32Bits+=s,Po.totalLines32Bits+=t.numLines),Po.totalLines+=t.numLines;for(let s=0;s0&&(t.texturePerLineIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerLineIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerLineIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,Oo))}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),h.bindTexture(h.TEXTURE_2D,u.texturePerObjectColorsAndFlags._texture),h.texSubImage2D(h.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,h.RGBA_INTEGER,h.UNSIGNED_BYTE,Oo))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,Oo))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,So))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,Bo))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){}drawSilhouetteHighlighted(e,t){}drawSilhouetteSelected(e,t){}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}setPickMatrices(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawSnapInit(e,t){}drawSnap(e,t){}drawPickNormals(e,t){}destroy(){if(this._destroyed)return;const e=this._state;this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const Mo=h.vec3(),Fo=h.vec3(),Ho=h.vec3();h.vec3();const Uo=h.vec4(),Go=h.mat4();class jo{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Mo;if(I){const t=h.transformPoint3(p,c,Fo);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(i.viewMatrix,e,Go),f=Ho,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new Se(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uLightAmbient=n.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const i=s.lights;let r;for(let e=0,t=i.length;e0;let i;const r=[];r.push("#version 300 es"),r.push("// TrianglesDataTextureColorRenderer vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("uniform mat4 sceneModelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),r.push("uniform highp sampler2D uTexturePerObjectMatrix;"),r.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),r.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),r.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),r.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),r.push("uniform vec3 uCameraEyeRtc;"),r.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("out float isPerspective;")),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),r.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),r.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),r.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),r.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),r.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),r.push("if (int(flags.x) != renderPass) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("} else {"),r.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),r.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),r.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),r.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),r.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),r.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),r.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),r.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),r.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),r.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),r.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),r.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),r.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),r.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),r.push("if (color.a == 0u) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("};"),r.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),r.push("vec3 position;"),r.push("position = positions[gl_VertexID % 3];"),r.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),r.push("if (solid != 1u) {"),r.push("if (isPerspectiveMatrix(projMatrix)) {"),r.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),r.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("} else {"),r.push("if (viewNormal.z < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("}"),r.push("}"),r.push("vec4 worldPosition = sceneModelMatrix * ((objectDecodeAndInstanceMatrix * vec4(position, 1.0))); "),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Vo=new Float32Array([1,1,1]),ko=h.vec3(),Qo=h.vec3(),Wo=h.vec3();h.vec3();const zo=h.mat4();class Ko{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=ko;if(c){const t=Qo;h.transformPoint3(p,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,zo),I=Wo,I[0]=i.eye[0]-e[0],I[1]=i.eye[1]-e[1],I[2]=i.eye[2]-e[2]}else f=A,I=i.eye;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s===Gn.SILHOUETTE_XRAYED){const e=n.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.SILHOUETTE_HIGHLIGHTED){const e=n.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.SILHOUETTE_SELECTED){const e=n.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,Vo);if(n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=n._sectionPlanesState.getNumAllocatedSectionPlanes(),y=n._sectionPlanesState.sectionPlanes.length;if(m>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = color;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Yo=new Float32Array([0,0,0,1]),Xo=h.vec3(),qo=h.vec3();h.vec3();const Jo=h.mat4();class Zo{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Xo;if(I){const t=h.transformPoint3(p,c,qo);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,Jo)}else f=A;if(a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===Gn.EDGES_XRAYED){const e=i.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.EDGES_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===Gn.EDGES_SELECTED){const e=i.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,Yo);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("mat4 matrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer fragment shader"),e.logarithmicDepthBufferEnabled&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const $o=h.vec3(),el=h.vec3(),tl=h.mat4();class sl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=$o;if(I){const t=h.transformPoint3(p,c,el);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,tl)}else f=A;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uObjectPerObjectOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const nl=h.vec3(),il=h.vec3(),rl=h.vec3(),al=h.mat4();class ol{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n;let A,f;l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=nl;if(I){const t=h.transformPoint3(p,c,il);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(r.viewMatrix,e,al),f=rl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=r.viewMatrix,f=r.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const e=2/(Math.log(r.project.far+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,e)}const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry picking fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uvec4 vFlags2;");for(var n=0;n 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outPickColor = vPickColor; "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const ll=h.vec3(),cl=h.vec3(),ul=h.vec3();h.vec3();const hl=h.mat4();class pl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=e.pickViewMatrix||r.viewMatrix;let f,I;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const t=ll;if(c){const e=cl;h.transformPoint3(p,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],f=V(A,t,hl),I=ul,I[0]=r.eye[0]-t[0],I[1]=r.eye[1]-t[1],I[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=A,I=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniform1f(this._uPickZNear,e.pickZNear),a.uniform1f(this._uPickZFar,e.pickZFar),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform float pickZNear;"),s.push("uniform float pickZFar;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(var n=0;n 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),s.push(" outPackedDepth = packDepth(zNormalizedDepth); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const dl=h.vec3(),Al=h.vec3(),fl=h.vec3(),Il=h.vec3();h.vec3();const ml=h.mat4();class yl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=dl;let m,y;I[0]=h.safeInv(A[3]-A[0])*h.MAX_INT,I[1]=h.safeInv(A[4]-A[1])*h.MAX_INT,I[2]=h.safeInv(A[5]-A[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(I[0]),e.snapPickCoordinateScale[1]=h.safeInv(I[1]),e.snapPickCoordinateScale[2]=h.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=Al;if(v){const e=h.transformPoint3(p,c,fl);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=V(f,t,ml),y=Il,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(T,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(T,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(T,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const vl=h.vec3(),wl=h.vec3(),gl=h.vec3(),El=h.vec3();h.vec3();const Tl=h.mat4();class bl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=vl;let m,y;I[0]=h.safeInv(A[3]-A[0])*h.MAX_INT,I[1]=h.safeInv(A[4]-A[1])*h.MAX_INT,I[2]=h.safeInv(A[5]-A[2])*h.MAX_INT,e.snapPickCoordinateScale[0]=h.safeInv(I[0]),e.snapPickCoordinateScale[1]=h.safeInv(I[1]),e.snapPickCoordinateScale[2]=h.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=wl;if(v){const e=gl;h.transformPoint3(p,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=V(f,t,Tl),y=El,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this._uVectorA,e.snapVectorA),a.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Dl=h.vec3(),Pl=h.vec3(),Cl=h.vec3();h.vec3();const _l=h.mat4();class Rl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=n,A=e.pickViewMatrix||r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=Dl;if(c){const t=Pl;h.transformPoint3(p,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=V(A,e,_l),I=Cl,I[0]=r.eye[0]-e[0],I[1]=r.eye[1]-e[1],I[2]=r.eye[2]-e[2]}else f=A,I=r.eye;a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureOcclusionRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Bl=h.vec3(),Ol=h.vec3(),Sl=h.vec3();h.vec3();const Nl=h.mat4();class xl{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Bl;if(I){const t=h.transformPoint3(p,c,Ol);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(i.viewMatrix,e,Nl),f=Sl,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("objectDecodeAndInstanceMatrix"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture draw vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out highp vec2 vHighPrecisionZW;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in highp vec2 vHighPrecisionZW;"),s.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),s.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Ll=h.vec3(),Ml=h.vec3(),Fl=h.vec3();h.vec3();const Hl=h.mat4();class Ul{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:p}=n,d=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const I=0!==l[0]||0!==l[1]||0!==l[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(I||m){const e=Ll;if(I){const t=Ml;h.transformPoint3(u,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],A=V(d,e,Hl),f=Fl,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=d,f=r.eye;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.uniformMatrix4fv(this._uWorldNormalMatrix,!1,n.worldNormalMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 objectDecodeAndInstanceMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(Te.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&Te.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Gl=h.vec3(),jl=h.vec3(),Vl=h.vec3();h.vec3(),h.vec4();const kl=h.mat4();class Ql{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:p,rotationMatrixConjugate:d}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Gl;if(I){const t=h.transformPoint3(p,c,jl);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=V(i.viewMatrix,e,kl),f=Vl,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Se(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// trianglesDatatextureNormalsRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("in vec4 vWorldPosition;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(` outNormal = ivec4(worldNormal * float(${h.MAX_INT}), 1.0);`),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Wl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new Ko(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new ol(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new pl(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new Ql(this._scene)),this._snapRenderer||(this._snapRenderer=new yl(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new bl(this._scene)),this._snapRenderer||(this._snapRenderer=new yl(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new jo(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new jo(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ko(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new xl(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Ul(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Zo(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new sl(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new ol(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Ql(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Ql(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new pl(this._scene)),this._pickDepthRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new yl(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new bl(this._scene)),this._snapInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Rl(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const zl={};class Kl{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.metallicRoughness=[],this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.edgeIndices8Bits=[],this.lenEdgeIndices8Bits=0,this.edgeIndices16Bits=[],this.lenEdgeIndices16Bits=0,this.edgeIndices32Bits=[],this.lenEdgeIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class Yl{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindTriangleIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}bindEdgeIndicesTextures(e,t,s,n){this.edgeIndicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[n].bindTexture(e,s,6)}}const Xl={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Xl,null,4));let e=0;Object.keys(Xl).forEach((t=>{t.startsWith("size")&&(e+=Xl[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/Xl.totalPolygons).toFixed(2)}`);let t={};Object.keys(Xl).forEach((s=>{s.startsWith("size")&&(t[s]=`${(Xl[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class ql{constructor(){}disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}createTextureForColorsAndFlags(e,t,s,n,i,r,a){const o=t.length;this.numPortions=o;const l=4096,c=Math.ceil(o/512);if(0===c)throw"texture height===0";const u=new Uint8Array(16384*c);Xl.sizeDataColorsAndFlags+=u.byteLength,Xl.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),u.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20),u.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+24),u.set([a[e]?1:0,0,0,0],32*e+28);const h=e.createTexture();return e.bindTexture(e.TEXTURE_2D,h),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,c),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,c,e.RGBA_INTEGER,e.UNSIGNED_BYTE,u,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,h,l,c,u)}createTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);Xl.sizeDataTextureOffsets+=i.byteLength,Xl.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Do(e,r,s,n,i)}createTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);Xl.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete zl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new Kl,this._dtxState=new Yl,this._dtxTextureFactory=new ql,this._state=new $e({origin:h.vec3(t.origin),metallicRoughnessBuf:null,textureState:this._dtxState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=h.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){h.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&Xl.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/3})),(this._state.numVertices+n>4096*Zl||t+i>4096*Zl)&&Xl.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*Zl&&t+i<=4096*Zl}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;Xl.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;Xl.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,n=t.indices,i=t.edgeIndices,r=this._buffer;r.positionsCompressed.push(s);const a=r.lenPositionsCompressed/3,o=s.length/3;let l;r.lenPositionsCompressed+=s.length;let c,u=0;if(n){let e;u=n.length/3,o<=256?(e=r.indices8Bits,l=r.lenIndices8Bits/3,r.lenIndices8Bits+=n.length):o<=65536?(e=r.indices16Bits,l=r.lenIndices16Bits/3,r.lenIndices16Bits+=n.length):(e=r.indices32Bits,l=r.lenIndices32Bits/3,r.lenIndices32Bits+=n.length),e.push(n)}let h=0;if(i){let e;h=i.length/2,o<=256?(e=r.edgeIndices8Bits,c=r.lenEdgeIndices8Bits/2,r.lenEdgeIndices8Bits+=i.length):o<=65536?(e=r.edgeIndices16Bits,c=r.lenEdgeIndices16Bits/2,r.lenEdgeIndices16Bits+=i.length):(e=r.edgeIndices32Bits,c=r.lenEdgeIndices32Bits/2,r.lenEdgeIndices32Bits+=i.length),e.push(i)}this._state.numVertices+=o,Xl.numberOfGeometries++;return{vertexBase:a,numVertices:o,numTriangles:u,numEdges:h,indicesBase:l,edgeIndicesBase:c}}_createSubPortion(e,t,s,n){const i=e.color;e.metallic,e.roughness;const r=e.colors,a=e.opacity,o=e.meshMatrix,l=e.pickColor,c=this._buffer,u=this._state;c.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),c.perObjectInstancePositioningMatrices.push(o||nc),c.perObjectSolid.push(!!e.solid),r?c.perObjectColors.push([255*r[0],255*r[1],255*r[2],255]):i&&c.perObjectColors.push([i[0],i[1],i[2],a]),c.perObjectPickColors.push(l),c.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?u.numIndices8Bits:t.numVertices<=65536?u.numIndices16Bits:u.numIndices32Bits,c.perObjectIndexBaseOffsets.push(e/3-t.indicesBase)}{let e;e=t.numVertices<=256?u.numEdgeIndices8Bits:t.numVertices<=65536?u.numEdgeIndices16Bits:u.numEdgeIndices32Bits,c.perObjectEdgeIndexBaseOffsets.push(e/2-t.edgeIndicesBase)}const h=this._subPortions.length;if(t.numTriangles>0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=c.perTriangleNumberPortionId8Bits,u.numIndices8Bits+=s,Xl.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=c.perTriangleNumberPortionId16Bits,u.numIndices16Bits+=s,Xl.totalPolygons16Bits+=t.numTriangles):(e=c.perTriangleNumberPortionId32Bits,u.numIndices32Bits+=s,Xl.totalPolygons32Bits+=t.numTriangles),Xl.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=c.perEdgeNumberPortionId8Bits,u.numEdgeIndices8Bits+=s,Xl.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=c.perEdgeNumberPortionId16Bits,u.numEdgeIndices16Bits+=s,Xl.totalEdges16Bits+=t.numEdges):(e=c.perEdgeNumberPortionId32Bits,u.numEdgeIndices32Bits+=s,Xl.totalEdges32Bits+=t.numEdges),Xl.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId8Bits)),n.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId16Bits)),n.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId32Bits)),n.lenIndices8Bits>0&&(t.texturePerPolygonIdIndices8Bits=this._dtxTextureFactory.createTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerPolygonIdIndices16Bits=this._dtxTextureFactory.createTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerPolygonIdIndices32Bits=this._dtxTextureFactory.createTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),n.lenEdgeIndices8Bits>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dtxTextureFactory.createTextureFor8BitsEdgeIndices(s,n.edgeIndices8Bits,n.lenEdgeIndices8Bits)),n.lenEdgeIndices16Bits>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dtxTextureFactory.createTextureFor16BitsEdgeIndices(s,n.edgeIndices16Bits,n.lenEdgeIndices16Bits)),n.lenEdgeIndices32Bits>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dtxTextureFactory.createTextureFor32BitsEdgeIndices(s,n.edgeIndices32Bits,n.lenEdgeIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&z&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&Z&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&J&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&$&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&X&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&ee&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&Y&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&K&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&z?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&ee?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&X?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dtxState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&K?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&Y?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,ec)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),A.bindTexture(A.TEXTURE_2D,d.texturePerObjectColorsAndFlags._texture),A.texSubImage2D(A.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,A.RGBA_INTEGER,A.UNSIGNED_BYTE,ec))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,ec))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,tc))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,$l))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._renderers.colorRendererWithSAO&&this._renderers.colorRendererWithSAO.drawLayer(t,this,Gn.COLOR_OPAQUE):this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,Gn.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.depthRenderer&&this._renderers.depthRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.normalsRenderer&&this._renderers.normalsRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,Gn.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,Gn.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,Gn.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,Gn.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,Gn.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,Gn.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.shadowRenderer&&this._renderers.shadowRenderer.drawLayer(t,this,Gn.COLOR_OPAQUE))}setPickMatrices(e,t){}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,Gn.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,Gn.PICK))}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,Gn.PICK))}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,Gn.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickNormalsRenderer&&this._renderers.pickNormalsRenderer.drawLayer(t,this,Gn.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}class rc{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class ac{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const oc={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class lc{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==hc[e])return void hc[e].push({onLoad:t,onProgress:s,onError:n});hc[e]=[],hc[e].push({onLoad:t,onProgress:s,onError:n});const r=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(r).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=hc[e],n=t.body.getReader(),i=t.headers.get("Content-Length"),r=i?parseInt(i):0,a=0!==r;let o=0;const l=new ReadableStream({start(e){!function t(){n.read().then((({done:n,value:i})=>{if(n)e.close();else{o+=i.byteLength;const n=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:r});for(let e=0,t=s.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),s=t&&t[1]?t[1].toLowerCase():void 0,n=new TextDecoder(s);return e.arrayBuffer().then((e=>n.decode(e)))}}})).then((t=>{oc.add(e,t);const s=hc[e];delete hc[e];for(let e=0,n=s.length;e{const s=hc[e];if(void 0===s)throw this.manager.itemError(e),t;delete hc[e];for(let e=0,n=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class dc{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const n=this._getIdleWorker();-1!==n?(this._initWorker(n),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let Ac=0;class fc{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new dc,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const n=e.capabilities;this._workerConfig={astcSupported:n.astcSupported,etc1Supported:n.etc1Supported,etc2Supported:n.etc2Supported,dxtSupported:n.dxtSupported,bptcSupported:n.bptcSupported,pvrtcSupported:n.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new pc;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new pc;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const n=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,n]).then((([e,t])=>{const s=fc.BasisWorker.toString(),n=["/* constants */","let _EngineFormat = "+JSON.stringify(fc.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(fc.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(fc.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([n])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),Ac>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),Ac++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((n,i)=>{const r=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:r},e))).then((e=>{const s=e.data,{mipmaps:r,width:a,height:o,format:l,type:c,error:u,dfdTransferFn:h,dfdFlags:p}=s;if("error"===c)return i(u);t.setCompressedData({mipmaps:r,props:{format:l,minFilter:1===r.length?1006:1008,magFilter:1===r.length?1006:1008,encoding:2===h?3001:3e3,premultiplyAlpha:!!(1&p)}}),n()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),Ac--}}fc.BasisFormat={ETC1S:0,UASTC_4x4:1},fc.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},fc.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},fc.BasisWorker=function(){let e,t,s;const n=_EngineFormat,i=_TranscoderFormat,r=_BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":e=u.config,h=u.transcoderBinary,t=new Promise((e=>{s={wasmBinary:h,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:a,hasAlpha:h,mipmaps:p,format:d,dfdTransferFn:A,dfdFlags:f}=function(t){const a=new s.KTX2File(new Uint8Array(t));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const h=a.isUASTC()?r.UASTC_4x4:r.ETC1S,p=a.getWidth(),d=a.getHeight(),A=a.getLevels(),f=a.getHasAlpha(),I=a.getDFDTransferFunc(),m=a.getDFDFlags(),{transcoderFormat:y,engineFormat:v}=function(t,s,a,u){let h,p;const d=t===r.ETC1S?o:l;for(let n=0;n{delete Ic[t],s.destroy()}))),s} /** * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT @@ -14,7 +14,7 @@ /** * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT - **/let Ec=null;function Tc(e,t){const s=3*e,n=3*t;let i,r,a,o,l,c;const u=Math.min(i=Ec[s],r=Ec[s+1],a=Ec[s+2]),h=Math.min(o=Ec[n],l=Ec[n+1],c=Ec[n+2]);if(u!==h)return u-h;const p=Math.max(i,r,a),d=Math.max(o,l,c);return p!==d?p-d:0}let bc=null;function Dc(e,t){let s=bc[2*e]-bc[2*t];return 0!==s?s:bc[2*e+1]-bc[2*t+1]}function Pc(e,t,s=!1){const n=e.positionsCompressed||[],i=function(e,t){const s=new Int32Array(e.length/3);for(let e=0,t=s.length;e>t;s.sort(Tc);const n=new Int32Array(e.length);for(let t=0,i=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}bc=new Int32Array(e),t.sort(Dc);const s=new Int32Array(e.length);for(let n=0,i=t.length;nt){let s=e;e=t,t=s}function s(s,n){return s!==e?e-s:n!==t?t-n:0}let n=0,i=(r.length>>1)-1;for(;n<=i;){const e=i+n>>1,t=s(r[2*e],r[2*e+1]);if(t>0)n=e+1;else{if(!(t<0))return e;i=e-1}}return-n-1}const o=new Int32Array(r.length/2);o.fill(0);const l=n.length/3;if(l>8*(1<p.maxNumPositions&&(p=h()),p.bucketNumber>8)return[e];let A;-1===c[l]&&(c[l]=p.numPositions++,p.positionsCompressed.push(n[3*l]),p.positionsCompressed.push(n[3*l+1]),p.positionsCompressed.push(n[3*l+2])),-1===c[u]&&(c[u]=p.numPositions++,p.positionsCompressed.push(n[3*u]),p.positionsCompressed.push(n[3*u+1]),p.positionsCompressed.push(n[3*u+2])),-1===c[d]&&(c[d]=p.numPositions++,p.positionsCompressed.push(n[3*d]),p.positionsCompressed.push(n[3*d+1]),p.positionsCompressed.push(n[3*d+2])),p.indices.push(c[l]),p.indices.push(c[u]),p.indices.push(c[d]),(A=a(l,u))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(l,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(u,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]]))}const d=t/8*2,A=t/8,f=2*n.length+(i.length+r.length)*d;let I=0,m=-n.length/3;return u.forEach((e=>{I+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*A,m+=e.positionsCompressed.length/3})),I>f?[e]:(s&&function(e,t){const s={},n={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,a=e.positionsCompressed;for(let e=0,n=t.length;e0){const e=t._meshes;for(let t=0,s=e.length;t0){const e=this._meshes;for(let t=0,s=e.length;t{this._viewMatrixDirty=!0})),this._meshesWithDirtyMatrices=[],this._numMeshesWithDirtyMatrices=0,this._onTick=this.scene.on("tick",(()=>{for(;this._numMeshesWithDirtyMatrices>0;)this._meshesWithDirtyMatrices[--this._numMeshesWithDirtyMatrices]._updateMatrix()})),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_meshMatrixDirty(e){this._meshesWithDirtyMatrices[this._numMeshesWithDirtyMatrices++]=e}_createDefaultTextureSet(){const e=new ac({id:"defaultColorTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new ac({id:"defaultMetalRoughTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new ac({id:"defaultNormalsTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),n=new ac({id:"defaultEmissiveTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),i=new ac({id:"defaultOcclusionTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=n,this._textures.defaultOcclusionTexture=i,this._textureSets.defaultTextureSet=new rc({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:n,occlusionTexture:i})}get isPerformanceModel(){return!0}get transforms(){return this._transforms}get textures(){return this._textures}get textureSets(){return this._textureSets}get meshes(){return this._meshes}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),h.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),h.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||jc),h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),h.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),h.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),h.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),h.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0,this._aabbDirty=!0}_transformDirty(){this._matrixDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0}_sceneModelDirty(){this.scene._aabbDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0,this._matrixDirty=!0;for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,n=t.length;e{l.setImage(c,{minFilter:s,magFilter:n,wrapS:i,wrapT:r,wrapR:a,flipY:e.flipY,encoding:o}),this.glRedraw()},c.src=e.src;break;default:this._textureTranscoder?y.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new ac({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,n,i,r,a;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(n=this._textures[e.metallicRoughnessTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(i=this._textures[e.normalsTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(r=this._textures[e.emissiveTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(a=this._textures[e.occlusionTextureId],!a)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else a=this._textures.defaultOcclusionTexture;const o=new rc({id:t,model:this,colorTexture:s,metallicRoughnessTexture:n,normalsTexture:i,emissiveTexture:r,occlusionTexture:a});return this._textureSets[t]=o,o}createTransform(e){if(void 0===e.id||null===e.id)return void this.error("[createTransform] SceneModel.createTransform() config missing: id");if(this._transforms[e.id])return void this.error(`[createTransform] SceneModel already has a transform with this ID: ${e.id}`);let t;if(this.parentTransformId&&(t=this._transforms[e.parentTransformId],!t))return void this.error("[createTransform] SceneModel.createTransform() config missing: id");const s=new xc({id:e.id,model:this,parentTransform:t,matrix:e.matrix,position:e.position,scale:e.scale,rotation:e.rotation,quaternion:e.quaternion});return this._transforms[s.id]=s,s}createMesh(e){if(void 0===e.id||null===e.id)return this.error("[createMesh] SceneModel.createMesh() config missing: id"),!1;if(this._scheduledMeshes[e.id])return this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`),!1;if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`),!1;if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),!1;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),!1;if(!e.buckets&&!e.indices&&"points"!==e.primitive)return this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),!1;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),!1;const t=!(!this._dtxEnabled||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||e.textureSetId);if(e.origin=e.origin?h.addVec3(this._origin,e.origin,h.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||Fc,s=e.position||Hc,n=e.rotation||Uc;h.eulerToQuaternion(n,"XYZ",Gc),e.meshMatrix=h.composeMat4(s,Gc,t,h.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=Ni(e.positionsDecodeBoundary,h.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Vc,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=h.vec3(),s=[];Q(e.positions,s,t)&&(e.positions=s,e.origin=h.addVec3(e.origin,t,t))}if(e.positions){const t=h.collapseAABB3();e.positionsDecodeMatrix=h.mat4(),h.expandAABB3Points3(t,e.positions),e.positionsCompressed=Si(e.positions,t,e.positionsDecodeMatrix),e.aabb=t}else if(e.positionsCompressed){const t=h.collapseAABB3();h.expandAABB3Points3(t,e.positionsCompressed),St.decompressAABB(t,e.positionsDecodeMatrix),e.aabb=t}if(e.buckets){const t=h.collapseAABB3();for(let s=0,n=e.buckets.length;s>24&255,i=s>>16&255,r=s>>8&255,a=255&s;switch(e.pickColor=new Uint8Array([a,r,i,n]),e.solid="solid"===e.primitive,t.origin=h.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e),t.aabb=e.aabb;break;case 1:t.layer=this._getVBOBatchingLayer(e),t.aabb=e.aabb;break;case 0:t.layer=this._getVBOInstancingLayer(e),t.aabb=e.aabb}return e.transform&&(e.meshMatrix=e.transform.worldMatrix),t.portionId=t.layer.createPortion(t,e),t}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,n=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,n=e.textureSetId||"-",i=e.geometryId,r=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${n}.${i}`;let a=this._vboInstancingLayers[r];if(a)return a;let o=e.textureSet;const l=e.geometry;for(;!a;)switch(l.primitive){case"triangles":case"surface":a=new Fr({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":a=new Fr({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":a=new Ea({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0});break;case"points":a=new Io({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[r]=a,this.layerList.push(a),a}createEntity(e){if(void 0===e.id?e.id=h.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=h.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;this._visible&&!1!==e.visible&&(t|=z),this._pickable&&!1!==e.pickable&&(t|=Y),this._culled&&!1!==e.culled&&(t|=K),this._clippable&&!1!==e.clippable&&(t|=X),this._collidable&&!1!==e.collidable&&(t|=q),this._edges&&!1!==e.edges&&(t|=ee),this._xrayed&&!1!==e.xrayed&&(t|=J),this._highlighted&&!1!==e.highlighted&&(t|=Z),this._selected&&!1!==e.selected&&(t|=$),e.flags=t,this._createEntity(e)}_createEntity(e){let t=[];for(let s=0,n=e.meshIds.length;se.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,n=t.visibleLayers.length;s65536?16:8)}else a=[{positionsCompressed:n,indices:i,edgeIndices:r}];return a}class Wc extends O{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;e{var i=e-s,r=t-n;return Math.sqrt(i*i+r*r)};class su extends O{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._eventSubs={};var s=this.plugin.viewer.scene;this._originMarker=new ae(s,t.origin),this._targetMarker=new ae(s,t.target),this._originWorld=h.vec3(),this._targetWorld=h.vec3(),this._wp=new Float64Array(24),this._vp=new Float64Array(24),this._pp=new Float64Array(24),this._cp=new Float64Array(8),this._xAxisLabelCulled=!1,this._yAxisLabelCulled=!1,this._zAxisLabelCulled=!1,this._color=t.color||this.plugin.defaultColor;const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))},l=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))};this._originDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._targetDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthWire=new oe(this._container,{color:this._color,thickness:2,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisWire=new oe(this._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisWire=new oe(this._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisWire=new oe(this._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthLabel=new ce(this._container,{fillColor:this._color,prefix:"",text:"",zIndex:void 0!==e.zIndex?e.zIndex+4:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisLabel=new ce(this._container,{fillColor:"red",prefix:"X",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisLabel=new ce(this._container,{fillColor:"green",prefix:"Y",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisLabel=new ce(this._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._sectionPlanesDirty=!0,this._visible=!1,this._originVisible=!1,this._targetVisible=!1,this._wireVisible=!1,this._axisVisible=!1,this._xAxisVisible=!1,this._yAxisVisible=!1,this._zAxisVisible=!1,this._axisEnabled=!0,this._labelsVisible=!1,this._labelsOnWires=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onMetricsUnits=s.metrics.on("units",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsScale=s.metrics.on("scale",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsOrigin=s.metrics.on("origin",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.targetVisible=t.targetVisible,this.wireVisible=t.wireVisible,this.axisVisible=t.axisVisible,this.xAxisVisible=t.xAxisVisible,this.yAxisVisible=t.yAxisVisible,this.zAxisVisible=t.zAxisVisible,this.labelsVisible=t.labelsVisible,this.labelsOnWires=t.labelsOnWires}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._targetWorld[0],this._wp[5]=this._originWorld[1],this._wp[6]=this._originWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._originWorld[2],this._wp[11]=1,this._wp[12]=this._targetWorld[0],this._wp[13]=this._targetWorld[1],this._wp[14]=this._targetWorld[2],this._wp[15]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(h.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vp[15]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setCulled(!0),this._yAxisWire.setCulled(!0),this._zAxisWire.setCulled(!0),this._lengthWire.setCulled(!0),this._originDot.setCulled(!0),void this._targetDot.setCulled(!0);this._xAxisLabel.setCulled(!1),this._yAxisLabel.setCulled(!1),this._zAxisLabel.setCulled(!1),this._lengthLabel.setCulled(!1),this._xAxisWire.setCulled(!1),this._yAxisWire.setCulled(!1),this._zAxisWire.setCulled(!1),this._lengthWire.setCulled(!1),this._originDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}const t=this._originMarker.viewPos[2],s=this._targetMarker.viewPos[2];if(t>-.3||s>-.3)return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setVisible(!1),this._yAxisWire.setVisible(!1),this._zAxisWire.setVisible(!1),this._lengthWire.setVisible(!1),this._originDot.setVisible(!1),void this._targetDot.setVisible(!1);if(this._cpDirty){h.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var n=this._pp,i=this._cp,r=e.canvas.canvas.getBoundingClientRect();const t=this._container.getBoundingClientRect();var a=r.top-t.top,o=r.left-t.left,l=e.canvas.boundary,c=l[2],u=l[3],p=0;const s=this.plugin.viewer.scene.metrics,f=s.scale,I=s.units,m=s.unitsInfo[I].abbrev;for(var d=0,A=n.length;d{const t=e.snappedCanvasPos||e.canvasPos;if(i=!0,r.set(e.worldPos),a.set(e.canvasPos),0===this._mouseState){const s=n.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=s.left+i,o=s.top+r;this._markerDiv.style.marginLeft=a+t[0]-5+"px",this._markerDiv.style.marginTop=o+t[1]-5+"px",this._markerDiv.style.background="pink",e.snappedToVertex||e.snappedToEdge?(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,this.pointerLens.snapped=!0),this._markerDiv.style.background="greenyellow",this._markerDiv.style.border="2px solid green"):(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.canvasPos,this.pointerLens.snapped=!1),this._markerDiv.style.background="pink",this._markerDiv.style.border="2px solid red"),c=e.entity}else this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px";n.style.cursor="pointer",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=this._currentDistanceMeasurementInitState.wireVisible,this._currentDistanceMeasurement.axisVisible=this._currentDistanceMeasurementInitState.axisVisible&&this.distanceMeasurementsPlugin.defaultAxisVisible,this._currentDistanceMeasurement.xAxisVisible=this._currentDistanceMeasurementInitState.xAxisVisible&&this.distanceMeasurementsPlugin.defaultXAxisVisible,this._currentDistanceMeasurement.yAxisVisible=this._currentDistanceMeasurementInitState.yAxisVisible&&this.distanceMeasurementsPlugin.defaultYAxisVisible,this._currentDistanceMeasurement.zAxisVisible=this._currentDistanceMeasurementInitState.zAxisVisible&&this.distanceMeasurementsPlugin.defaultZAxisVisible,this._currentDistanceMeasurement.targetVisible=this._currentDistanceMeasurementInitState.targetVisible,this._currentDistanceMeasurement.target.worldPos=r.slice(),this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px")})),n.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(o=e.clientX,l=e.clientY)}),n.addEventListener("mouseup",this._onMouseUp=t=>{1===t.which&&(t.clientX>o+20||t.clientXl+20||t.clientY{this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos),i=!1,this._markerDiv.style.marginLeft="-100px",this._markerDiv.style.marginTop="-100px",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=!1,this._currentDistanceMeasurement.targetVisible=!1,this._currentDistanceMeasurement.axisVisible=!1),n.style.cursor="default"})),this._active=!0}deactivate(){if(!this._active)return;this.fire("activated",!1),this.pointerLens&&(this.pointerLens.visible=!1),this._markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.distanceMeasurementsPlugin.viewer.cameraControl;t.off(this._onCameraControlHoverSnapOrSurface),t.off(this._onCameraControlHoverSnapOrSurfaceOff),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null),this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null))}destroy(){this.deactivate(),super.destroy()}}class ru{constructor(){}getMetaModel(e,t,s){y.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getGLTF(e,t,s){y.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getGLB(e,t,s){y.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getArrayBuffer(e,t,s,n){!function(e,t,s,n){var i=()=>{};s=s||i,n=n||i;const r=/^data:(.*?)(;base64)?,(.*)$/,a=t.match(r);if(a){const e=!!a[2];var o=a[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),t=new Uint8Array(e);for(var l=0;l{s(e)}),(function(e){n(e)}))}}class au{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const n=ou(e,s);return n?t?lu(n,t):n:null}translatePlurals(e,t,s){const n=this._messages[this._locale];if(!n)return null;let i=ou(e,n);return i=0===(t=parseInt(""+t,10))?i.zero:t>1?i.other:i.one,i?(i=lu(i,[t]),s&&(i=lu(i,s)),i):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];if(n)for(const e in n)if(n.hasOwnProperty(e)){n[e].callback(t)}}on(t,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new e),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let n=this._eventSubs[t];n||(n={},this._eventSubs[t]=n);const i=this._eventSubIDMap.addItem();n[i]={callback:s},this._eventSubEvents[i]=t;const r=this._events[t];return void 0!==r&&s(r),i}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function ou(e,t){if(t[e])return t[e];const s=e.split(".");let n=t;for(let e=0,t=s.length;n&&e1?1:e}get t(){return this._t}get tangent(){return this.getTangent(this._t)}get length(){var e=this._getLengths();return e[e.length-1]}getTangent(e){var t=1e-4;void 0===e&&(e=this._t);var s=e-t,n=e+t;s<0&&(s=0),n>1&&(n=1);var i=this.getPoint(s),r=this.getPoint(n),a=h.subVec3(r,i,[]);return h.normalizeVec3(a,[])}getPointAt(e){var t=this.getUToTMapping(e);return this.getPoint(t)}getPoints(e){e||(e=5);var t,s=[];for(t=0;t<=e;t++)s.push(this.getPoint(t/e));return s}_getLengths(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,s,n=[],i=this.getPoint(0),r=0;for(n.push(0),s=1;s<=e;s++)t=this.getPoint(s/e),r+=h.lenVec3(h.subVec3(t,i,[])),n.push(r),i=t;return this.cacheArcLengths=n,n}_updateArcLengths(){this.needsUpdate=!0,this._getLengths()}getUToTMapping(e,t){var s,n=this._getLengths(),i=0,r=n.length;s=t||e*n[r-1];for(var a,o=0,l=r-1;o<=l;)if((a=n[i=Math.floor(o+(l-o)/2)]-s)<0)o=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(n[i=l]===s)return i/(r-1);var c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}}class uu extends cu{constructor(e,t={}){super(e,t),this.points=t.points,this.t=t.t}set points(e){this._points=e||[]}get points(){return this._points}set t(e){e=e||0,this._t=e<0?0:e>1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=this.points;if(!(t.length<3)){var s=(t.length-1)*e,n=Math.floor(s),i=s-n,r=t[0===n?n:n-1],a=t[n],o=t[n>t.length-2?t.length-1:n+1],l=t[n>t.length-3?t.length-1:n+2],c=h.vec3();return c[0]=h.catmullRomInterpolate(r[0],a[0],o[0],l[0],i),c[1]=h.catmullRomInterpolate(r[1],a[1],o[1],l[1],i),c[2]=h.catmullRomInterpolate(r[2],a[2],o[2],l[2],i),c}this.error("Can't sample point from SplineCurve - not enough points on curve - returning [0,0,0].")}getJSON(){return{points:points,t:this._t}}}const hu=h.vec3();const pu=h.vec3(),du=h.vec3(),Au=h.vec3(),fu=h.vec3(),Iu=h.vec3();class mu extends O{get type(){return"CameraFlightAnimation"}constructor(e,t={}){super(e,t),this._look1=h.vec3(),this._eye1=h.vec3(),this._up1=h.vec3(),this._look2=h.vec3(),this._eye2=h.vec3(),this._up2=h.vec3(),this._orthoScale1=1,this._orthoScale2=1,this._flying=!1,this._flyEyeLookUp=!1,this._flyingEye=!1,this._flyingLook=!1,this._callback=null,this._callbackScope=null,this._time1=null,this._time2=null,this.easing=!1!==t.easing,this.duration=t.duration,this.fit=t.fit,this.fitFOV=t.fitFOV,this.trail=t.trail}flyTo(e,t,s){e=e||this.scene,this._flying&&this.stop(),this._flying=!1,this._flyingEye=!1,this._flyingLook=!1,this._flyingEyeLookUp=!1,this._callback=t,this._callbackScope=s;const n=this.scene.camera,i=!!e.projection&&e.projection!==n.projection;let r,a,o,l,c;if(this._eye1[0]=n.eye[0],this._eye1[1]=n.eye[1],this._eye1[2]=n.eye[2],this._look1[0]=n.look[0],this._look1[1]=n.look[1],this._look1[2]=n.look[2],this._up1[0]=n.up[0],this._up1[1]=n.up[1],this._up1[2]=n.up[2],this._orthoScale1=n.ortho.scale,this._orthoScale2=e.orthoScale||this._orthoScale1,e.aabb)r=e.aabb;else if(6===e.length)r=e;else if(e.eye&&e.look||e.up)a=e.eye,o=e.look,l=e.up;else if(e.eye)a=e.eye;else if(e.look)o=e.look;else{let n=e;if((y.isNumeric(n)||y.isString(n))&&(c=n,n=this.scene.components[c],!n))return this.error("Component not found: "+y.inQuotes(c)),void(t&&(s?t.call(s):t()));i||(r=n.aabb||this.scene.aabb)}const u=e.poi;if(r){if(r[3]=1;e>1&&(e=1);const s=this.easing?mu._ease(e,0,1,1):e,n=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(h.subVec3(n.eye,n.look,Iu),n.eye=h.lerpVec3(s,0,1,this._eye1,this._eye2,Au),n.look=h.subVec3(Au,Iu,du)):this._flyingLook&&(n.look=h.lerpVec3(s,0,1,this._look1,this._look2,du),n.up=h.lerpVec3(s,0,1,this._up1,this._up2,fu)):this._flyingEyeLookUp&&(n.eye=h.lerpVec3(s,0,1,this._eye1,this._eye2,Au),n.look=h.lerpVec3(s,0,1,this._look1,this._look2,du),n.up=h.lerpVec3(s,0,1,this._up1,this._up2,fu)),this._projection2){const t="ortho"===this._projection2?mu._easeOutExpo(e,0,1,1):mu._easeInCubic(e,0,1,1);n.customProjection.matrix=h.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else n.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return n.ortho.scale=this._orthoScale2,void this.stop();C.scheduleTask(this._update,this)}static _ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}static _easeInCubic(e,t,s,n){return s*(e/=n)*e*e+t}static _easeOutExpo(e,t,s,n){return s*(1-Math.pow(2,-10*e/n))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class yu extends O{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new mu(this),this._t=0,this.state=yu.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const n=performance.now(),i=this._lastTime?.001*(n-this._lastTime):0;if(this._lastTime=n,0!==i)switch(this.state){case yu.SCRUBBING:return;case yu.PLAYING:if(this._t+=this._playingRate*i,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=yu.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case yu.PLAYING_TO:s=this._t+this._playingRate*i*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=yu.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=yu.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=yu.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const n=s.frames[e];n?(this.state=yu.SCRUBBING,this._cameraFlightAnimation.flyTo(n,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=yu.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=yu.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=yu.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}yu.STOPPED=0,yu.SCRUBBING=1,yu.PLAYING=2,yu.PLAYING_TO=3;const vu=h.vec3(),wu=h.vec3();h.vec3();const gu=h.vec3([0,-1,0]),Eu=h.vec4([0,0,0,1]);function Tu(e){if(!bu(e.width)||!bu(e.height)){const t=document.createElement("canvas");t.width=Du(e.width),t.height=Du(e.height);t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}function bu(e){return 0==(e&e-1)}function Du(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}class Pu extends O{get type(){return"CubeTexture"}constructor(e,t={}){super(e,t);const s=this.scene.canvas.gl;this._state=new $e({texture:new mn({gl:s,target:s.TEXTURE_CUBE_MAP}),flipY:this._checkFlipY(t.minFilter),encoding:this._checkEncoding(t.encoding),minFilter:1008,magFilter:1006,wrapS:1001,wrapT:1001,mipmaps:!0}),this._src=t.src,this._images=[],this._loadSrc(t.src),A.memory.textures++}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this.scene.canvas.gl,this._state.texture=null,this._src&&this._loadSrc(this._src)}_loadSrc(e){const t=this,s=this.scene.canvas.gl;this._images=[];let n=!1,i=0;for(let r=0;r{i(),t()})):(s.eye=this._eye,s.look=this._look,s.up=this._up,i(),s.projection=n.projection)}}const _u=h.vec3();const Ru=h.vec3();class Bu{constructor(){this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsHasColorize=[],this.objectsOpacity=[],this.numObjects=0}saveObjects(e,t){this.numObjects=0,this._mask=t?y.apply(t,{}):null;const s=e.objects,n=!t||t.visible,i=!t||t.edges,r=!t||t.xrayed,a=!t||t.highlighted,o=!t||t.selected,l=!t||t.clippable,c=!t||t.pickable,u=!t||t.colorize,h=!t||t.opacity;for(let e in s)if(s.hasOwnProperty(e)){const t=s[e],p=this.numObjects;if(n&&(this.objectsVisible[p]=t.visible),i&&(this.objectsEdges[p]=t.edges),r&&(this.objectsXrayed[p]=t.xrayed),a&&(this.objectsHighlighted[p]=t.highlighted),o&&(this.objectsSelected[p]=t.selected),l&&(this.objectsClippable[p]=t.clippable),c&&(this.objectsPickable[p]=t.pickable),u){const e=t.colorize;e?(this.objectsColorize[3*p+0]=e[0],this.objectsColorize[3*p+1]=e[1],this.objectsColorize[3*p+2]=e[2],this.objectsHasColorize[p]=!0):this.objectsHasColorize[p]=!1}h&&(this.objectsOpacity[p]=t.opacity),this.numObjects++}}restoreObjects(e){const t=this._mask,s=!t||t.visible,n=!t||t.edges,i=!t||t.xrayed,r=!t||t.highlighted,a=!t||t.selected,o=!t||t.clippable,l=!t||t.pickable,c=!t||t.colorize,u=!t||t.opacity;var h=0;const p=e.objects;for(let e in p)if(p.hasOwnProperty(e)){const t=p[e];s&&(t.visible=this.objectsVisible[h]),n&&(t.edges=this.objectsEdges[h]),i&&(t.xrayed=this.objectsXrayed[h]),r&&(t.highlighted=this.objectsHighlighted[h]),a&&(t.selected=this.objectsSelected[h]),o&&(t.clippable=this.objectsClippable[h]),l&&(t.pickable=this.objectsPickable[h]),c&&(this.objectsHasColorize[h]?(Ru[0]=this.objectsColorize[3*h+0],Ru[1]=this.objectsColorize[3*h+1],Ru[2]=this.objectsColorize[3*h+2],t.colorize=Ru):t.colorize=null),u&&(t.opacity=this.objectsOpacity[h]),h++}}}class Ou extends O{constructor(e,t={}){super(e,t),this._skyboxMesh=new Qs(this,{geometry:new Lt(this,{primitive:"triangles",positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),background:!0,scale:[2e3,2e3,2e3],rotation:[0,-90,0],material:new Gt(this,{ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],emissive:[1,1,1],emissiveMap:new Tn(this,{src:t.src,flipY:!0,wrapS:"clampToEdge",wrapT:"clampToEdge",encoding:t.encoding||"sRGB"}),backfaces:!0}),visible:!1,pickable:!1,clippable:!1,collidable:!1}),this.size=t.size,this.active=t.active}set size(e){this._size=e||1e3,this._skyboxMesh.scale=[this._size,this._size,this._size]}get size(){return this._size}set active(e){this._skyboxMesh.visible=e}get active(){return this._skyboxMesh.visible}}const Su=h.vec4(),Nu=h.vec4(),xu=h.vec3(),Lu=h.vec3(),Mu=h.vec3(),Fu=h.vec4(),Hu=h.vec4(),Uu=h.vec4();class Gu{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let n=!1;const i=this._scene.camera;if(e){const t=h.subVec3(e,i.eye,xu);n=h.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=h.vec3();h.decomposeMat4(h.inverseMat4(this._scene.viewer.camera.viewMatrix,h.mat4()),t,h.vec4(),h.vec3());const s=h.distVec3(t,e);let n=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(n/=this._scene.camera.ortho.scale/2),k(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new Pn(this._scene,Ks({radius:n})),this._pivotSphere=new Qs(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){h.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,h.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,n=s[2],i=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*n/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*i/2);let r=t._lastBoundingClientRect;if(!r||t._canvasSizeChanged){const e=t.canvas;r=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(r.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(r.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(k(this.getPivotPos(),this._rtcCenter,this._rtcPos),h.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new Gt(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=h.lookAtMat4v(e.eye,e.look,e.worldUp);h.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=h.distVec3(e.eye,s),t=h.inverseMat4(t);const n=h.transformVec3(t,this._cameraOffset),i=h.vec3();if(h.subVec3(e.eye,s,i),h.addVec3(i,n),e.zUp){const e=i[1];i[1]=i[2],i[2]=e}this._radius=h.lenVec3(i),this._polar=Math.acos(i[1]/this._radius),this._azimuth=Math.atan2(i[0],i[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=h.normalizeVec3(h.subVec3(e.look,e.eye,ju)),s=h.cross3Vec3(t,e.worldUp,Vu);return h.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(h.distVec3(this._scene.center,t.eye)),n=t.project.transposedMatrix,i=n.subarray(8,12),r=n.subarray(12),a=[0,0,-1,1],o=h.dotVec4(a,i)/h.dotVec4(a,r),l=Qu;t.project.unproject(e,o,Wu,zu,l);const c=h.normalizeVec3(h.subVec3(l,t.eye,ju)),u=h.addVec3(t.eye,h.mulVec3Scalar(c,s,Vu),ku);this.setPivotPos(u)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var n=-e;const i=-t;1===s.worldUp[2]&&(n=-n),this._azimuth+=.01*-n,this._polar+=.01*i,this._polar=h.clamp(this._polar,.001,Math.PI-.001);const r=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=r[1];r[1]=r[2],r[2]=e}const a=h.lenVec3(h.subVec3(s.look,s.eye,h.vec3())),o=this.getPivotPos();h.addVec3(r,o);let l=h.lookAtMat4v(r,o,s.worldUp);l=h.inverseMat4(l);const c=h.transformVec3(l,this._cameraOffset);l[12]-=c[0],l[13]-=c[1],l[14]-=c[2];const u=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],h.subVec3(s.eye,h.mulVec3Scalar(u,a),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class Yu{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=h.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._lastHash=null,this._needFireEvents=0}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;const e=`${~~this.pickCursorPos[0]}-${~~this.pickCursorPos[1]}-${this.scheduleSnapOrPick}-${this.schedulePickSurface}-${this.schedulePickEntity}`;if(this._lastHash===e)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1;const t=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.pick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});e&&(e.snappedToEdge||e.snappedToVertex)?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents++):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const e=this.pickResult.canvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents+=t?1:0,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents++):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents++)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents++)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(0!==this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,pointerPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new De;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.worldPos,e.canvasPos=this.pickCursorPos,e.snappedCanvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=0}}}const Xu=h.vec2();class qu{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController;let a,o,l,c=0,u=0,p=0,d=0,A=!1;const f=h.vec3();let I=!0;const m=this._scene.canvas.canvas,y=[];function v(e=!0){m.style.cursor="move",c=n.pointerCanvasPos[0],u=n.pointerCanvasPos[1],p=n.pointerCanvasPos[0],d=n.pointerCanvasPos[1],e&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(A=!0,f.set(r.pickResult.worldPos)):A=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(a=!0,v()):(a=!0,v(!1));break;case 2:o=!0,v();break;case 3:l=!0,s.panRightClick&&v()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!a&&!o&&!l)return;const t=e.canvas.boundary,r=t[2],p=t[3],d=n.pointerCanvasPos[0],I=n.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&o||s.panRightClick&&l){const t=d-c,s=I-u,n=e.camera;if("perspective"===n.projection){const r=Math.abs(A?h.lenVec3(h.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=1.5*t*r/p,i.panDeltaY+=1.5*s*r/p}else i.panDeltaX+=.5*n.ortho.scale*(t/p),i.panDeltaY+=.5*n.ortho.scale*(s/p)}else!a||o||l||s.planView||(s.firstPerson?(i.rotateDeltaY-=(d-c)/r*s.dragRotationRate/2,i.rotateDeltaX+=(I-u)/p*(s.dragRotationRate/4)):(i.rotateDeltaY-=(d-c)/r*(1.5*s.dragRotationRate),i.rotateDeltaX+=(I-u)/p*(1.5*s.dragRotationRate)));c=d,u=I}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&n.mouseover&&(I=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:a=!1,o=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,n=0,i=0,r=0,a=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,r+=s.scrollLeft,a+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+r-n,t[1]=e.pageY+a-i}else e=window.event,t[0]=e.x,t[1]=e.y}(e,Xu);const s=Xu[0],n=Xu[1];Math.abs(s-p)<3&&Math.abs(n-d)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:Xu,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const w=1/60;let g=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var r=null!==g?t-g:0;g=t,r>.05&&(r=.05),r{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const a=i._isKeyDownForAction(i.AXIS_VIEW_RIGHT),o=i._isKeyDownForAction(i.AXIS_VIEW_BACK),l=i._isKeyDownForAction(i.AXIS_VIEW_LEFT),c=i._isKeyDownForAction(i.AXIS_VIEW_FRONT),u=i._isKeyDownForAction(i.AXIS_VIEW_TOP),p=i._isKeyDownForAction(i.AXIS_VIEW_BOTTOM);if(!(a||o||l||c||u||p))return;const d=e.aabb,A=h.getAABB3Diag(d);h.getAABB3Center(d,Ju);const f=Math.abs(A/Math.tan(t.cameraFlight.fitFOV*h.DEGTORAD)),I=1.1*A;sh.orthoScale=I,a?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldRight,f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):o?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldForward,f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):l?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldRight,-f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):c?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldForward,-f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):u?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldUp,f,Zu),th)),sh.look.set(Ju),sh.up.set(h.normalizeVec3(h.mulVec3Scalar(r.worldForward,1,$u),eh))):p&&(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldUp,-f,Zu),th)),sh.look.set(Ju),sh.up.set(h.normalizeVec3(h.mulVec3Scalar(r.worldForward,-1,$u)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(Ju),t.cameraFlight.duration>0?t.cameraFlight.flyTo(sh,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(sh),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class ih{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,c=!1;const u=this._scene.canvas.canvas,p=s=>{let n;s&&s.worldPos&&(n=s.worldPos);const i=s&&s.entity?s.entity.aabb:e.aabb;if(n){const s=e.camera;h.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})},d=e.tickify(this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||c)return;const i=o.hasSubs("hover"),a=o.hasSubs("hoverEnter"),u=o.hasSubs("hoverOut"),h=o.hasSubs("hoverOff"),p=o.hasSubs("hoverSurface"),d=o.hasSubs("hoverSnapOrSurface");if(i||a||u||h||p||d)if(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=p,r.scheduleSnapOrPick=d,r.update(),r.pickResult){if(r.pickResult.entity){const t=r.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),o.fire("hoverEnter",r.pickResult,!0),this._lastPickedEntityId=t)}o.fire("hover",r.pickResult,!0),(r.pickResult.worldPos||r.pickResult.snappedWorldPos)&&o.fire("hoverSurface",r.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),o.fire("hoverOff",{canvasPos:r.pickCursorPos},!0)});u.addEventListener("mousemove",d),u.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(c=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(n.mouseDownClientX=t.clientX,n.mouseDownClientY=t.clientY,n.mouseDownCursorX=n.pointerCanvasPos[0],n.mouseDownCursorY=n.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),1===t.which))){const t=r.pickResult;t&&t.worldPos?(a.setPivotPos(t.worldPos),a.startPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),a.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(c=!1),a.getPivoting()&&a.endPivot()}),u.addEventListener("mouseup",this._canvasMouseUpHandler=i=>{if(!s.active||!s.pointerEnabled)return;if(!(1===i.which))return;if(a.hidePivot(),Math.abs(i.clientX-n.mouseDownClientX)>3||Math.abs(i.clientY-n.mouseDownClientY)>3)return;const l=o.hasSubs("picked"),c=o.hasSubs("pickedNothing"),u=o.hasSubs("pickedSurface"),d=o.hasSubs("doublePicked"),A=o.hasSubs("doublePickedSurface"),f=o.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||d||A||f))return(l||c||u)&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=u,r.update(),r.pickResult?(o.fire("picked",r.pickResult,!0),r.pickedSurface&&o.fire("pickedSurface",r.pickResult,!0)):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo,r.schedulePickSurface=u,r.update();const e=r.pickResult,i=r.pickedSurface;this._timeout=setTimeout((()=>{e?(o.fire("picked",e,!0),i&&(o.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo||d||A,r.schedulePickSurface=r.schedulePickEntity&&A,r.update(),r.pickResult){if(o.fire("doublePicked",r.pickResult,!0),r.pickedSurface&&o.fire("doublePickedSurface",r.pickResult,!0),s.doublePickFlyTo&&(p(r.pickResult),!s.firstPerson&&s.followPointer)){const e=r.pickResult.entity.aabb,s=h.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(o.fire("doublePickedNothing",{canvasPos:n.pointerCanvasPos},!0),s.doublePickFlyTo&&(p(),!s.firstPerson&&s.followPointer)){const s=e.aabb,n=h.getAABB3Center(s);t.pivotController.setPivotPos(n),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class rh{constructor(e,t,s,n,i){this._scene=e;const r=e.input,a=[],o=e.canvas.canvas;let l=!0;this._onSceneMouseMove=r.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=r.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&n.mouseover&&(a[t]=!0,t===r.KEY_SHIFT&&(o.style.cursor="move"))})),this._onSceneKeyUp=r.on("keyup",(n=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(a[n]=!1,n===r.KEY_SHIFT&&(o.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(o=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const c=t.cameraControl,u=o.deltaTime/1e3;if(!s.planView){const e=c._isKeyDownForAction(c.ROTATE_Y_POS,a),n=c._isKeyDownForAction(c.ROTATE_Y_NEG,a),r=c._isKeyDownForAction(c.ROTATE_X_POS,a),o=c._isKeyDownForAction(c.ROTATE_X_NEG,a),l=u*s.keyboardRotationRate;(e||n||r||o)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?i.rotateDeltaY+=l:n&&(i.rotateDeltaY-=l),r?i.rotateDeltaX+=l:o&&(i.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!a[r.KEY_CTRL]&&!a[r.KEY_ALT]){const e=c._isKeyDownForAction(c.DOLLY_BACKWARDS,a),r=c._isKeyDownForAction(c.DOLLY_FORWARDS,a);if(e||r){const a=u*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),r?i.dollyDelta-=a:e&&(i.dollyDelta+=a),l&&(n.followPointerDirty=!0,l=!1)}}const h=c._isKeyDownForAction(c.PAN_FORWARDS,a),p=c._isKeyDownForAction(c.PAN_BACKWARDS,a),d=c._isKeyDownForAction(c.PAN_LEFT,a),A=c._isKeyDownForAction(c.PAN_RIGHT,a),f=c._isKeyDownForAction(c.PAN_UP,a),I=c._isKeyDownForAction(c.PAN_DOWN,a),m=(a[r.KEY_ALT]?.3:1)*u*s.keyboardPanRate;(h||p||d||A||f||I)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),I?i.panDeltaY+=m:f&&(i.panDeltaY+=-m),A?i.panDeltaX+=-m:d&&(i.panDeltaX+=m),p?i.panDeltaZ+=m:h&&(i.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const ah=h.vec3();class oh{constructor(e,t,s,n,i){this._scene=e;const r=e.camera,a=t.pickController,o=t.pivotController,l=t.panController;let c=1,u=1,p=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(i.dollyDelta)<.001&&(i.dollyDelta=0),Math.abs(i.rotateDeltaX)<.001&&(i.rotateDeltaX=0),Math.abs(i.rotateDeltaY)<.001&&(i.rotateDeltaY=0),0===i.rotateDeltaX&&0===i.rotateDeltaY||(i.dollyDelta=0),s.followPointer&&--c<=0&&(c=1,0!==i.dollyDelta)){if(0===i.rotateDeltaY&&0===i.rotateDeltaX&&s.followPointer&&n.followPointerDirty&&(a.pickCursorPos=n.pointerCanvasPos,a.schedulePickSurface=!0,a.update(),a.pickResult&&a.pickResult.worldPos?p=a.pickResult.worldPos:(u=1,p=null),n.followPointerDirty=!1),p){const t=Math.abs(h.lenVec3(h.subVec3(p,e.camera.eye,ah)));u=t/s.dollyProximityThreshold}u{n.mouseover=!0}),r.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{n.mouseover=!1,r.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{ch(e,r,n.pointerCanvasPos)}),r.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(ch(e,r,n.pointerCanvasPos),n.mouseover=!0)}),r.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function ch(e,t,s){if(e){const{x:n,y:i}=t.getBoundingClientRect();s[0]=e.clientX-n,s[1]=e.clientY-i}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const uh=function(e,t){if(e){let s=e.target,n=0,i=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-n,t[1]=e.pageY-i}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class hh{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=h.vec2(),l=h.vec2(),c=h.vec2(),u=h.vec2(),p=[],d=this._scene.canvas.canvas;let A=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),d.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const i=t.touches,l=t.changedTouches;for(n.touchStartTime=Date.now(),1===i.length&&1===l.length&&(uh(i[0],o),s.followPointer&&(r.pickCursorPos=o,r.schedulePickSurface=!0,r.update(),s.planView||(r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(a.setPivotPos(r.pickResult.worldPos),!s.firstPerson&&a.startPivot()&&a.showPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),!s.firstPerson&&a.startPivot()&&a.showPivot()))));p.length{a.getPivoting()&&a.endPivot()}),d.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const a=e.canvas.boundary,o=a[2],d=a[3],I=t.touches;if(t.touches.length===A){if(1===A){uh(I[0],l),h.subVec2(l,p[0],u);const t=u[0],r=u[1];if(null!==n.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(r)>s.longTapRadius)&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),s.planView){const n=e.camera;if("perspective"===n.projection){const a=Math.abs(e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=t*a/d*s.touchPanRate,i.panDeltaY+=r*a/d*s.touchPanRate}else i.panDeltaX+=.5*n.ortho.scale*(t/d)*s.touchPanRate,i.panDeltaY+=.5*n.ortho.scale*(r/d)*s.touchPanRate}else i.rotateDeltaY-=t/o*(1*s.dragRotationRate),i.rotateDeltaX+=r/d*(1.5*s.dragRotationRate)}else if(2===A){const t=I[0],a=I[1];uh(t,l),uh(a,c);const o=h.geometricMeanVec2(p[0],p[1]),u=h.geometricMeanVec2(l,c),A=h.vec2();h.subVec2(o,u,A);const f=A[0],m=A[1],y=e.camera,v=h.distVec2([t.pageX,t.pageY],[a.pageX,a.pageY]),w=(h.distVec2(p[0],p[1])-v)*s.touchDollyRate;if(i.dollyDelta=w,Math.abs(w)<1)if("perspective"===y.projection){const t=r.pickResult?r.pickResult.worldPos:e.center,n=Math.abs(h.lenVec3(h.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);i.panDeltaX-=f*n/d*s.touchPanRate,i.panDeltaY-=m*n/d*s.touchPanRate}else i.panDeltaX-=.5*y.ortho.scale*(f/d)*s.touchPanRate,i.panDeltaY-=.5*y.ortho.scale*(m/d)*s.touchPanRate;n.pointerCanvasPos=u}for(let e=0;e{let n;s&&s.worldPos&&(n=s.worldPos);const i=s?s.entity.aabb:e.aabb;if(n){const s=e.camera;h.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})};d.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null);const i=e.touches,r=e.changedTouches;if(o=Date.now(),1===i.length&&1===r.length){u=o,ph(i[0],c);const r=c[0],a=c[1],l=i[0].pageX,h=i[0].pageY;n.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(h)],canvasPos:[Math.round(r),Math.round(a)],event:e},!0),n.longTouchTimeout=null}),s.longTapTimeout)}else u=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),i=e.touches,o=e.changedTouches,d=a.hasSubs("pickedSurface");null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),0===i.length&&1===o.length&&u>-1&&t-u<150&&(p>-1&&u-p<325?(ph(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=d,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("doublePicked",r.pickResult),r.pickedSurface&&a.fire("doublePickedSurface",r.pickResult),s.doublePickFlyTo&&A(r.pickResult)):(a.fire("doublePickedNothing"),s.doublePickFlyTo&&A()),p=-1):h.distVec2(l[0],c)<4&&(ph(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=d,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("picked",r.pickResult),r.pickedSurface&&a.fire("pickedSurface",r.pickResult)):a.fire("pickedNothing"),p=t),u=-1),l.length=i.length;for(let e=0,t=i.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:h.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:h.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new Yu(this,this._configs),pivotController:new Ku(s,this._configs),panController:new Gu(s),cameraFlight:new mu(this,{duration:.5})},this._handlers=[new lh(this.scene,this._controllers,this._configs,this._states,this._updates),new hh(this.scene,this._controllers,this._configs,this._states,this._updates),new qu(this.scene,this._controllers,this._configs,this._states,this._updates),new nh(this.scene,this._controllers,this._configs,this._states,this._updates),new ih(this.scene,this._controllers,this._configs,this._states,this._updates),new dh(this.scene,this._controllers,this._configs,this._states,this._updates),new rh(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new oh(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",y.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,n=s.length;e0?wh(t):null,a=s&&s.length>0?wh(s):null,o=e=>{if(!e)return;var t=!0;(a&&a[e.type]||r&&!r[e.type])&&(t=!1),t&&n.push(e.id);const s=e.children;if(s)for(var i=0,l=s.length;i>t;s.sort(Tc);const n=new Int32Array(e.length);for(let t=0,i=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}bc=new Int32Array(e),t.sort(Dc);const s=new Int32Array(e.length);for(let n=0,i=t.length;nt){let s=e;e=t,t=s}function s(s,n){return s!==e?e-s:n!==t?t-n:0}let n=0,i=(r.length>>1)-1;for(;n<=i;){const e=i+n>>1,t=s(r[2*e],r[2*e+1]);if(t>0)n=e+1;else{if(!(t<0))return e;i=e-1}}return-n-1}const o=new Int32Array(r.length/2);o.fill(0);const l=n.length/3;if(l>8*(1<p.maxNumPositions&&(p=h()),p.bucketNumber>8)return[e];let A;-1===c[l]&&(c[l]=p.numPositions++,p.positionsCompressed.push(n[3*l]),p.positionsCompressed.push(n[3*l+1]),p.positionsCompressed.push(n[3*l+2])),-1===c[u]&&(c[u]=p.numPositions++,p.positionsCompressed.push(n[3*u]),p.positionsCompressed.push(n[3*u+1]),p.positionsCompressed.push(n[3*u+2])),-1===c[d]&&(c[d]=p.numPositions++,p.positionsCompressed.push(n[3*d]),p.positionsCompressed.push(n[3*d+1]),p.positionsCompressed.push(n[3*d+2])),p.indices.push(c[l]),p.indices.push(c[u]),p.indices.push(c[d]),(A=a(l,u))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(l,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(u,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]]))}const d=t/8*2,A=t/8,f=2*n.length+(i.length+r.length)*d;let I=0,m=-n.length/3;return u.forEach((e=>{I+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*A,m+=e.positionsCompressed.length/3})),I>f?[e]:(s&&function(e,t){const s={},n={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,a=e.positionsCompressed;for(let e=0,n=t.length;e0){const e=t._meshes;for(let t=0,s=e.length;t0){const e=this._meshes;for(let t=0,s=e.length;t{this._viewMatrixDirty=!0})),this._meshesWithDirtyMatrices=[],this._numMeshesWithDirtyMatrices=0,this._onTick=this.scene.on("tick",(()=>{for(;this._numMeshesWithDirtyMatrices>0;)this._meshesWithDirtyMatrices[--this._numMeshesWithDirtyMatrices]._updateMatrix()})),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_meshMatrixDirty(e){this._meshesWithDirtyMatrices[this._numMeshesWithDirtyMatrices++]=e}_createDefaultTextureSet(){const e=new ac({id:"defaultColorTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new ac({id:"defaultMetalRoughTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new ac({id:"defaultNormalsTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),n=new ac({id:"defaultEmissiveTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),i=new ac({id:"defaultOcclusionTexture",texture:new mn({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=n,this._textures.defaultOcclusionTexture=i,this._textureSets.defaultTextureSet=new rc({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:n,occlusionTexture:i})}get isPerformanceModel(){return!0}get transforms(){return this._transforms}get textures(){return this._textures}get textureSets(){return this._textureSets}get meshes(){return this._meshes}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),h.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),h.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||jc),h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),h.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),h.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),h.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),h.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),h.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0,this._aabbDirty=!0}_transformDirty(){this._matrixDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0}_sceneModelDirty(){this.scene._aabbDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0,this._matrixDirty=!0;for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,n=t.length;e{l.setImage(c,{minFilter:s,magFilter:n,wrapS:i,wrapT:r,wrapR:a,flipY:e.flipY,encoding:o}),this.glRedraw()},c.src=e.src;break;default:this._textureTranscoder?y.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new ac({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,n,i,r,a;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(n=this._textures[e.metallicRoughnessTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(i=this._textures[e.normalsTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(r=this._textures[e.emissiveTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(a=this._textures[e.occlusionTextureId],!a)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else a=this._textures.defaultOcclusionTexture;const o=new rc({id:t,model:this,colorTexture:s,metallicRoughnessTexture:n,normalsTexture:i,emissiveTexture:r,occlusionTexture:a});return this._textureSets[t]=o,o}createTransform(e){if(void 0===e.id||null===e.id)return void this.error("[createTransform] SceneModel.createTransform() config missing: id");if(this._transforms[e.id])return void this.error(`[createTransform] SceneModel already has a transform with this ID: ${e.id}`);let t;if(this.parentTransformId&&(t=this._transforms[e.parentTransformId],!t))return void this.error("[createTransform] SceneModel.createTransform() config missing: id");const s=new xc({id:e.id,model:this,parentTransform:t,matrix:e.matrix,position:e.position,scale:e.scale,rotation:e.rotation,quaternion:e.quaternion});return this._transforms[s.id]=s,s}createMesh(e){if(void 0===e.id||null===e.id)return this.error("[createMesh] SceneModel.createMesh() config missing: id"),!1;if(this._scheduledMeshes[e.id])return this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`),!1;if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`),!1;if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),!1;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),!1;if(!(e.buckets||e.indices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)){const t=(e.positions||e.positionsCompressed).length/3;e.indices=this._createDefaultIndices(t)}if(!e.buckets&&!e.indices&&"points"!==e.primitive)return e.indices=this._createDefaultIndices(numIndices),this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),!1;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),!1;const t=!(!this._dtxEnabled||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||e.textureSetId);if(e.origin=e.origin?h.addVec3(this._origin,e.origin,h.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||Fc,s=e.position||Hc,n=e.rotation||Uc;h.eulerToQuaternion(n,"XYZ",Gc),e.meshMatrix=h.composeMat4(s,Gc,t,h.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=Ni(e.positionsDecodeBoundary,h.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):Vc,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=h.vec3(),s=[];Q(e.positions,s,t)&&(e.positions=s,e.origin=h.addVec3(e.origin,t,t))}if(e.positions){const t=h.collapseAABB3();e.positionsDecodeMatrix=h.mat4(),h.expandAABB3Points3(t,e.positions),e.positionsCompressed=Si(e.positions,t,e.positionsDecodeMatrix),e.aabb=t}else if(e.positionsCompressed){const t=h.collapseAABB3();h.expandAABB3Points3(t,e.positionsCompressed),St.decompressAABB(t,e.positionsDecodeMatrix),e.aabb=t}if(e.buckets){const t=h.collapseAABB3();for(let s=0,n=e.buckets.length;s>24&255,i=s>>16&255,r=s>>8&255,a=255&s;switch(e.pickColor=new Uint8Array([a,r,i,n]),e.solid="solid"===e.primitive,t.origin=h.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e),t.aabb=e.aabb;break;case 1:t.layer=this._getVBOBatchingLayer(e),t.aabb=e.aabb;break;case 0:t.layer=this._getVBOInstancingLayer(e),t.aabb=e.aabb}return e.transform&&(e.meshMatrix=e.transform.worldMatrix),t.portionId=t.layer.createPortion(t,e),t}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,n=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,n=e.textureSetId||"-",i=e.geometryId,r=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${n}.${i}`;let a=this._vboInstancingLayers[r];if(a)return a;let o=e.textureSet;const l=e.geometry;for(;!a;)switch(l.primitive){case"triangles":case"surface":a=new Fr({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":a=new Fr({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":a=new Ea({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0});break;case"points":a=new Io({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[r]=a,this.layerList.push(a),a}createEntity(e){if(void 0===e.id?e.id=h.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=h.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;this._visible&&!1!==e.visible&&(t|=z),this._pickable&&!1!==e.pickable&&(t|=Y),this._culled&&!1!==e.culled&&(t|=K),this._clippable&&!1!==e.clippable&&(t|=X),this._collidable&&!1!==e.collidable&&(t|=q),this._edges&&!1!==e.edges&&(t|=ee),this._xrayed&&!1!==e.xrayed&&(t|=J),this._highlighted&&!1!==e.highlighted&&(t|=Z),this._selected&&!1!==e.selected&&(t|=$),e.flags=t,this._createEntity(e)}_createEntity(e){let t=[];for(let s=0,n=e.meshIds.length;se.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,n=t.visibleLayers.length;s65536?16:8)}else a=[{positionsCompressed:n,indices:i,edgeIndices:r}];return a}class Wc extends O{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;e{var i=e-s,r=t-n;return Math.sqrt(i*i+r*r)};class su extends O{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._eventSubs={};var s=this.plugin.viewer.scene;this._originMarker=new ae(s,t.origin),this._targetMarker=new ae(s,t.target),this._originWorld=h.vec3(),this._targetWorld=h.vec3(),this._wp=new Float64Array(24),this._vp=new Float64Array(24),this._pp=new Float64Array(24),this._cp=new Float64Array(8),this._xAxisLabelCulled=!1,this._yAxisLabelCulled=!1,this._zAxisLabelCulled=!1,this._color=t.color||this.plugin.defaultColor;const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))},l=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))};this._originDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._targetDot=new le(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthWire=new oe(this._container,{color:this._color,thickness:2,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisWire=new oe(this._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisWire=new oe(this._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisWire=new oe(this._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthLabel=new ce(this._container,{fillColor:this._color,prefix:"",text:"",zIndex:void 0!==e.zIndex?e.zIndex+4:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisLabel=new ce(this._container,{fillColor:"red",prefix:"X",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisLabel=new ce(this._container,{fillColor:"green",prefix:"Y",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisLabel=new ce(this._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._sectionPlanesDirty=!0,this._visible=!1,this._originVisible=!1,this._targetVisible=!1,this._wireVisible=!1,this._axisVisible=!1,this._xAxisVisible=!1,this._yAxisVisible=!1,this._zAxisVisible=!1,this._axisEnabled=!0,this._labelsVisible=!1,this._labelsOnWires=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onMetricsUnits=s.metrics.on("units",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsScale=s.metrics.on("scale",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsOrigin=s.metrics.on("origin",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.targetVisible=t.targetVisible,this.wireVisible=t.wireVisible,this.axisVisible=t.axisVisible,this.xAxisVisible=t.xAxisVisible,this.yAxisVisible=t.yAxisVisible,this.zAxisVisible=t.zAxisVisible,this.labelsVisible=t.labelsVisible,this.labelsOnWires=t.labelsOnWires}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._targetWorld[0],this._wp[5]=this._originWorld[1],this._wp[6]=this._originWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._originWorld[2],this._wp[11]=1,this._wp[12]=this._targetWorld[0],this._wp[13]=this._targetWorld[1],this._wp[14]=this._targetWorld[2],this._wp[15]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(h.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vp[15]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setCulled(!0),this._yAxisWire.setCulled(!0),this._zAxisWire.setCulled(!0),this._lengthWire.setCulled(!0),this._originDot.setCulled(!0),void this._targetDot.setCulled(!0);this._xAxisLabel.setCulled(!1),this._yAxisLabel.setCulled(!1),this._zAxisLabel.setCulled(!1),this._lengthLabel.setCulled(!1),this._xAxisWire.setCulled(!1),this._yAxisWire.setCulled(!1),this._zAxisWire.setCulled(!1),this._lengthWire.setCulled(!1),this._originDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}const t=this._originMarker.viewPos[2],s=this._targetMarker.viewPos[2];if(t>-.3||s>-.3)return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setVisible(!1),this._yAxisWire.setVisible(!1),this._zAxisWire.setVisible(!1),this._lengthWire.setVisible(!1),this._originDot.setVisible(!1),void this._targetDot.setVisible(!1);if(this._cpDirty){h.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var n=this._pp,i=this._cp,r=e.canvas.canvas.getBoundingClientRect();const t=this._container.getBoundingClientRect();var a=r.top-t.top,o=r.left-t.left,l=e.canvas.boundary,c=l[2],u=l[3],p=0;const s=this.plugin.viewer.scene.metrics,f=s.scale,I=s.units,m=s.unitsInfo[I].abbrev;for(var d=0,A=n.length;d{const t=e.snappedCanvasPos||e.canvasPos;if(i=!0,r.set(e.worldPos),a.set(e.canvasPos),0===this._mouseState){const s=n.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=s.left+i,o=s.top+r;this._markerDiv.style.marginLeft=a+t[0]-5+"px",this._markerDiv.style.marginTop=o+t[1]-5+"px",this._markerDiv.style.background="pink",e.snappedToVertex||e.snappedToEdge?(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,this.pointerLens.snapped=!0),this._markerDiv.style.background="greenyellow",this._markerDiv.style.border="2px solid green"):(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.canvasPos,this.pointerLens.snapped=!1),this._markerDiv.style.background="pink",this._markerDiv.style.border="2px solid red"),c=e.entity}else this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px";n.style.cursor="pointer",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=this._currentDistanceMeasurementInitState.wireVisible,this._currentDistanceMeasurement.axisVisible=this._currentDistanceMeasurementInitState.axisVisible&&this.distanceMeasurementsPlugin.defaultAxisVisible,this._currentDistanceMeasurement.xAxisVisible=this._currentDistanceMeasurementInitState.xAxisVisible&&this.distanceMeasurementsPlugin.defaultXAxisVisible,this._currentDistanceMeasurement.yAxisVisible=this._currentDistanceMeasurementInitState.yAxisVisible&&this.distanceMeasurementsPlugin.defaultYAxisVisible,this._currentDistanceMeasurement.zAxisVisible=this._currentDistanceMeasurementInitState.zAxisVisible&&this.distanceMeasurementsPlugin.defaultZAxisVisible,this._currentDistanceMeasurement.targetVisible=this._currentDistanceMeasurementInitState.targetVisible,this._currentDistanceMeasurement.target.worldPos=r.slice(),this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px")})),n.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(o=e.clientX,l=e.clientY)}),n.addEventListener("mouseup",this._onMouseUp=t=>{1===t.which&&(t.clientX>o+20||t.clientXl+20||t.clientY{this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos),i=!1,this._markerDiv.style.marginLeft="-100px",this._markerDiv.style.marginTop="-100px",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=!1,this._currentDistanceMeasurement.targetVisible=!1,this._currentDistanceMeasurement.axisVisible=!1),n.style.cursor="default"})),this._active=!0}deactivate(){if(!this._active)return;this.fire("activated",!1),this.pointerLens&&(this.pointerLens.visible=!1),this._markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.distanceMeasurementsPlugin.viewer.cameraControl;t.off(this._onCameraControlHoverSnapOrSurface),t.off(this._onCameraControlHoverSnapOrSurfaceOff),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null),this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null))}destroy(){this.deactivate(),super.destroy()}}class ru{constructor(){}getMetaModel(e,t,s){y.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getGLTF(e,t,s){y.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getGLB(e,t,s){y.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getArrayBuffer(e,t,s,n){!function(e,t,s,n){var i=()=>{};s=s||i,n=n||i;const r=/^data:(.*?)(;base64)?,(.*)$/,a=t.match(r);if(a){const e=!!a[2];var o=a[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),t=new Uint8Array(e);for(var l=0;l{s(e)}),(function(e){n(e)}))}}class au{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const n=ou(e,s);return n?t?lu(n,t):n:null}translatePlurals(e,t,s){const n=this._messages[this._locale];if(!n)return null;let i=ou(e,n);return i=0===(t=parseInt(""+t,10))?i.zero:t>1?i.other:i.one,i?(i=lu(i,[t]),s&&(i=lu(i,s)),i):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];if(n)for(const e in n)if(n.hasOwnProperty(e)){n[e].callback(t)}}on(t,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new e),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let n=this._eventSubs[t];n||(n={},this._eventSubs[t]=n);const i=this._eventSubIDMap.addItem();n[i]={callback:s},this._eventSubEvents[i]=t;const r=this._events[t];return void 0!==r&&s(r),i}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function ou(e,t){if(t[e])return t[e];const s=e.split(".");let n=t;for(let e=0,t=s.length;n&&e1?1:e}get t(){return this._t}get tangent(){return this.getTangent(this._t)}get length(){var e=this._getLengths();return e[e.length-1]}getTangent(e){var t=1e-4;void 0===e&&(e=this._t);var s=e-t,n=e+t;s<0&&(s=0),n>1&&(n=1);var i=this.getPoint(s),r=this.getPoint(n),a=h.subVec3(r,i,[]);return h.normalizeVec3(a,[])}getPointAt(e){var t=this.getUToTMapping(e);return this.getPoint(t)}getPoints(e){e||(e=5);var t,s=[];for(t=0;t<=e;t++)s.push(this.getPoint(t/e));return s}_getLengths(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,s,n=[],i=this.getPoint(0),r=0;for(n.push(0),s=1;s<=e;s++)t=this.getPoint(s/e),r+=h.lenVec3(h.subVec3(t,i,[])),n.push(r),i=t;return this.cacheArcLengths=n,n}_updateArcLengths(){this.needsUpdate=!0,this._getLengths()}getUToTMapping(e,t){var s,n=this._getLengths(),i=0,r=n.length;s=t||e*n[r-1];for(var a,o=0,l=r-1;o<=l;)if((a=n[i=Math.floor(o+(l-o)/2)]-s)<0)o=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(n[i=l]===s)return i/(r-1);var c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}}class uu extends cu{constructor(e,t={}){super(e,t),this.points=t.points,this.t=t.t}set points(e){this._points=e||[]}get points(){return this._points}set t(e){e=e||0,this._t=e<0?0:e>1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=this.points;if(!(t.length<3)){var s=(t.length-1)*e,n=Math.floor(s),i=s-n,r=t[0===n?n:n-1],a=t[n],o=t[n>t.length-2?t.length-1:n+1],l=t[n>t.length-3?t.length-1:n+2],c=h.vec3();return c[0]=h.catmullRomInterpolate(r[0],a[0],o[0],l[0],i),c[1]=h.catmullRomInterpolate(r[1],a[1],o[1],l[1],i),c[2]=h.catmullRomInterpolate(r[2],a[2],o[2],l[2],i),c}this.error("Can't sample point from SplineCurve - not enough points on curve - returning [0,0,0].")}getJSON(){return{points:points,t:this._t}}}const hu=h.vec3();const pu=h.vec3(),du=h.vec3(),Au=h.vec3(),fu=h.vec3(),Iu=h.vec3();class mu extends O{get type(){return"CameraFlightAnimation"}constructor(e,t={}){super(e,t),this._look1=h.vec3(),this._eye1=h.vec3(),this._up1=h.vec3(),this._look2=h.vec3(),this._eye2=h.vec3(),this._up2=h.vec3(),this._orthoScale1=1,this._orthoScale2=1,this._flying=!1,this._flyEyeLookUp=!1,this._flyingEye=!1,this._flyingLook=!1,this._callback=null,this._callbackScope=null,this._time1=null,this._time2=null,this.easing=!1!==t.easing,this.duration=t.duration,this.fit=t.fit,this.fitFOV=t.fitFOV,this.trail=t.trail}flyTo(e,t,s){e=e||this.scene,this._flying&&this.stop(),this._flying=!1,this._flyingEye=!1,this._flyingLook=!1,this._flyingEyeLookUp=!1,this._callback=t,this._callbackScope=s;const n=this.scene.camera,i=!!e.projection&&e.projection!==n.projection;let r,a,o,l,c;if(this._eye1[0]=n.eye[0],this._eye1[1]=n.eye[1],this._eye1[2]=n.eye[2],this._look1[0]=n.look[0],this._look1[1]=n.look[1],this._look1[2]=n.look[2],this._up1[0]=n.up[0],this._up1[1]=n.up[1],this._up1[2]=n.up[2],this._orthoScale1=n.ortho.scale,this._orthoScale2=e.orthoScale||this._orthoScale1,e.aabb)r=e.aabb;else if(6===e.length)r=e;else if(e.eye&&e.look||e.up)a=e.eye,o=e.look,l=e.up;else if(e.eye)a=e.eye;else if(e.look)o=e.look;else{let n=e;if((y.isNumeric(n)||y.isString(n))&&(c=n,n=this.scene.components[c],!n))return this.error("Component not found: "+y.inQuotes(c)),void(t&&(s?t.call(s):t()));i||(r=n.aabb||this.scene.aabb)}const u=e.poi;if(r){if(r[3]=1;e>1&&(e=1);const s=this.easing?mu._ease(e,0,1,1):e,n=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(h.subVec3(n.eye,n.look,Iu),n.eye=h.lerpVec3(s,0,1,this._eye1,this._eye2,Au),n.look=h.subVec3(Au,Iu,du)):this._flyingLook&&(n.look=h.lerpVec3(s,0,1,this._look1,this._look2,du),n.up=h.lerpVec3(s,0,1,this._up1,this._up2,fu)):this._flyingEyeLookUp&&(n.eye=h.lerpVec3(s,0,1,this._eye1,this._eye2,Au),n.look=h.lerpVec3(s,0,1,this._look1,this._look2,du),n.up=h.lerpVec3(s,0,1,this._up1,this._up2,fu)),this._projection2){const t="ortho"===this._projection2?mu._easeOutExpo(e,0,1,1):mu._easeInCubic(e,0,1,1);n.customProjection.matrix=h.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else n.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return n.ortho.scale=this._orthoScale2,void this.stop();C.scheduleTask(this._update,this)}static _ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}static _easeInCubic(e,t,s,n){return s*(e/=n)*e*e+t}static _easeOutExpo(e,t,s,n){return s*(1-Math.pow(2,-10*e/n))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class yu extends O{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new mu(this),this._t=0,this.state=yu.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const n=performance.now(),i=this._lastTime?.001*(n-this._lastTime):0;if(this._lastTime=n,0!==i)switch(this.state){case yu.SCRUBBING:return;case yu.PLAYING:if(this._t+=this._playingRate*i,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=yu.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case yu.PLAYING_TO:s=this._t+this._playingRate*i*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=yu.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=yu.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=yu.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const n=s.frames[e];n?(this.state=yu.SCRUBBING,this._cameraFlightAnimation.flyTo(n,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=yu.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=yu.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=yu.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}yu.STOPPED=0,yu.SCRUBBING=1,yu.PLAYING=2,yu.PLAYING_TO=3;const vu=h.vec3(),wu=h.vec3();h.vec3();const gu=h.vec3([0,-1,0]),Eu=h.vec4([0,0,0,1]);function Tu(e){if(!bu(e.width)||!bu(e.height)){const t=document.createElement("canvas");t.width=Du(e.width),t.height=Du(e.height);t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}function bu(e){return 0==(e&e-1)}function Du(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}class Pu extends O{get type(){return"CubeTexture"}constructor(e,t={}){super(e,t);const s=this.scene.canvas.gl;this._state=new $e({texture:new mn({gl:s,target:s.TEXTURE_CUBE_MAP}),flipY:this._checkFlipY(t.minFilter),encoding:this._checkEncoding(t.encoding),minFilter:1008,magFilter:1006,wrapS:1001,wrapT:1001,mipmaps:!0}),this._src=t.src,this._images=[],this._loadSrc(t.src),A.memory.textures++}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this.scene.canvas.gl,this._state.texture=null,this._src&&this._loadSrc(this._src)}_loadSrc(e){const t=this,s=this.scene.canvas.gl;this._images=[];let n=!1,i=0;for(let r=0;r{i(),t()})):(s.eye=this._eye,s.look=this._look,s.up=this._up,i(),s.projection=n.projection)}}const _u=h.vec3();const Ru=h.vec3();class Bu{constructor(){this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsHasColorize=[],this.objectsOpacity=[],this.numObjects=0}saveObjects(e,t){this.numObjects=0,this._mask=t?y.apply(t,{}):null;const s=e.objects,n=!t||t.visible,i=!t||t.edges,r=!t||t.xrayed,a=!t||t.highlighted,o=!t||t.selected,l=!t||t.clippable,c=!t||t.pickable,u=!t||t.colorize,h=!t||t.opacity;for(let e in s)if(s.hasOwnProperty(e)){const t=s[e],p=this.numObjects;if(n&&(this.objectsVisible[p]=t.visible),i&&(this.objectsEdges[p]=t.edges),r&&(this.objectsXrayed[p]=t.xrayed),a&&(this.objectsHighlighted[p]=t.highlighted),o&&(this.objectsSelected[p]=t.selected),l&&(this.objectsClippable[p]=t.clippable),c&&(this.objectsPickable[p]=t.pickable),u){const e=t.colorize;e?(this.objectsColorize[3*p+0]=e[0],this.objectsColorize[3*p+1]=e[1],this.objectsColorize[3*p+2]=e[2],this.objectsHasColorize[p]=!0):this.objectsHasColorize[p]=!1}h&&(this.objectsOpacity[p]=t.opacity),this.numObjects++}}restoreObjects(e){const t=this._mask,s=!t||t.visible,n=!t||t.edges,i=!t||t.xrayed,r=!t||t.highlighted,a=!t||t.selected,o=!t||t.clippable,l=!t||t.pickable,c=!t||t.colorize,u=!t||t.opacity;var h=0;const p=e.objects;for(let e in p)if(p.hasOwnProperty(e)){const t=p[e];s&&(t.visible=this.objectsVisible[h]),n&&(t.edges=this.objectsEdges[h]),i&&(t.xrayed=this.objectsXrayed[h]),r&&(t.highlighted=this.objectsHighlighted[h]),a&&(t.selected=this.objectsSelected[h]),o&&(t.clippable=this.objectsClippable[h]),l&&(t.pickable=this.objectsPickable[h]),c&&(this.objectsHasColorize[h]?(Ru[0]=this.objectsColorize[3*h+0],Ru[1]=this.objectsColorize[3*h+1],Ru[2]=this.objectsColorize[3*h+2],t.colorize=Ru):t.colorize=null),u&&(t.opacity=this.objectsOpacity[h]),h++}}}class Ou extends O{constructor(e,t={}){super(e,t),this._skyboxMesh=new Qs(this,{geometry:new Lt(this,{primitive:"triangles",positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),background:!0,scale:[2e3,2e3,2e3],rotation:[0,-90,0],material:new Gt(this,{ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],emissive:[1,1,1],emissiveMap:new Tn(this,{src:t.src,flipY:!0,wrapS:"clampToEdge",wrapT:"clampToEdge",encoding:t.encoding||"sRGB"}),backfaces:!0}),visible:!1,pickable:!1,clippable:!1,collidable:!1}),this.size=t.size,this.active=t.active}set size(e){this._size=e||1e3,this._skyboxMesh.scale=[this._size,this._size,this._size]}get size(){return this._size}set active(e){this._skyboxMesh.visible=e}get active(){return this._skyboxMesh.visible}}const Su=h.vec4(),Nu=h.vec4(),xu=h.vec3(),Lu=h.vec3(),Mu=h.vec3(),Fu=h.vec4(),Hu=h.vec4(),Uu=h.vec4();class Gu{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let n=!1;const i=this._scene.camera;if(e){const t=h.subVec3(e,i.eye,xu);n=h.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=h.vec3();h.decomposeMat4(h.inverseMat4(this._scene.viewer.camera.viewMatrix,h.mat4()),t,h.vec4(),h.vec3());const s=h.distVec3(t,e);let n=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(n/=this._scene.camera.ortho.scale/2),k(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new Pn(this._scene,Ks({radius:n})),this._pivotSphere=new Qs(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){h.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,h.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,n=s[2],i=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*n/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*i/2);let r=t._lastBoundingClientRect;if(!r||t._canvasSizeChanged){const e=t.canvas;r=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(r.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(r.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(k(this.getPivotPos(),this._rtcCenter,this._rtcPos),h.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new Gt(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=h.lookAtMat4v(e.eye,e.look,e.worldUp);h.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=h.distVec3(e.eye,s),t=h.inverseMat4(t);const n=h.transformVec3(t,this._cameraOffset),i=h.vec3();if(h.subVec3(e.eye,s,i),h.addVec3(i,n),e.zUp){const e=i[1];i[1]=i[2],i[2]=e}this._radius=h.lenVec3(i),this._polar=Math.acos(i[1]/this._radius),this._azimuth=Math.atan2(i[0],i[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=h.normalizeVec3(h.subVec3(e.look,e.eye,ju)),s=h.cross3Vec3(t,e.worldUp,Vu);return h.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(h.distVec3(this._scene.center,t.eye)),n=t.project.transposedMatrix,i=n.subarray(8,12),r=n.subarray(12),a=[0,0,-1,1],o=h.dotVec4(a,i)/h.dotVec4(a,r),l=Qu;t.project.unproject(e,o,Wu,zu,l);const c=h.normalizeVec3(h.subVec3(l,t.eye,ju)),u=h.addVec3(t.eye,h.mulVec3Scalar(c,s,Vu),ku);this.setPivotPos(u)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var n=-e;const i=-t;1===s.worldUp[2]&&(n=-n),this._azimuth+=.01*-n,this._polar+=.01*i,this._polar=h.clamp(this._polar,.001,Math.PI-.001);const r=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=r[1];r[1]=r[2],r[2]=e}const a=h.lenVec3(h.subVec3(s.look,s.eye,h.vec3())),o=this.getPivotPos();h.addVec3(r,o);let l=h.lookAtMat4v(r,o,s.worldUp);l=h.inverseMat4(l);const c=h.transformVec3(l,this._cameraOffset);l[12]-=c[0],l[13]-=c[1],l[14]-=c[2];const u=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],h.subVec3(s.eye,h.mulVec3Scalar(u,a),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class Yu{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=h.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._lastHash=null,this._needFireEvents=0}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;const e=`${~~this.pickCursorPos[0]}-${~~this.pickCursorPos[1]}-${this.scheduleSnapOrPick}-${this.schedulePickSurface}-${this.schedulePickEntity}`;if(this._lastHash===e)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1;const t=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.pick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});e&&(e.snappedToEdge||e.snappedToVertex)?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents++):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const e=this.pickResult.canvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents+=t?1:0,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents++):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents++)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents++)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(0!==this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,pointerPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new De;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.worldPos,e.canvasPos=this.pickCursorPos,e.snappedCanvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=0}}}const Xu=h.vec2();class qu{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController;let a,o,l,c=0,u=0,p=0,d=0,A=!1;const f=h.vec3();let I=!0;const m=this._scene.canvas.canvas,y=[];function v(e=!0){m.style.cursor="move",c=n.pointerCanvasPos[0],u=n.pointerCanvasPos[1],p=n.pointerCanvasPos[0],d=n.pointerCanvasPos[1],e&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(A=!0,f.set(r.pickResult.worldPos)):A=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(a=!0,v()):(a=!0,v(!1));break;case 2:o=!0,v();break;case 3:l=!0,s.panRightClick&&v()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!a&&!o&&!l)return;const t=e.canvas.boundary,r=t[2],p=t[3],d=n.pointerCanvasPos[0],I=n.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&o||s.panRightClick&&l){const t=d-c,s=I-u,n=e.camera;if("perspective"===n.projection){const r=Math.abs(A?h.lenVec3(h.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=1.5*t*r/p,i.panDeltaY+=1.5*s*r/p}else i.panDeltaX+=.5*n.ortho.scale*(t/p),i.panDeltaY+=.5*n.ortho.scale*(s/p)}else!a||o||l||s.planView||(s.firstPerson?(i.rotateDeltaY-=(d-c)/r*s.dragRotationRate/2,i.rotateDeltaX+=(I-u)/p*(s.dragRotationRate/4)):(i.rotateDeltaY-=(d-c)/r*(1.5*s.dragRotationRate),i.rotateDeltaX+=(I-u)/p*(1.5*s.dragRotationRate)));c=d,u=I}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&n.mouseover&&(I=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:a=!1,o=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,n=0,i=0,r=0,a=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,r+=s.scrollLeft,a+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+r-n,t[1]=e.pageY+a-i}else e=window.event,t[0]=e.x,t[1]=e.y}(e,Xu);const s=Xu[0],n=Xu[1];Math.abs(s-p)<3&&Math.abs(n-d)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:Xu,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const w=1/60;let g=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var r=null!==g?t-g:0;g=t,r>.05&&(r=.05),r{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const a=i._isKeyDownForAction(i.AXIS_VIEW_RIGHT),o=i._isKeyDownForAction(i.AXIS_VIEW_BACK),l=i._isKeyDownForAction(i.AXIS_VIEW_LEFT),c=i._isKeyDownForAction(i.AXIS_VIEW_FRONT),u=i._isKeyDownForAction(i.AXIS_VIEW_TOP),p=i._isKeyDownForAction(i.AXIS_VIEW_BOTTOM);if(!(a||o||l||c||u||p))return;const d=e.aabb,A=h.getAABB3Diag(d);h.getAABB3Center(d,Ju);const f=Math.abs(A/Math.tan(t.cameraFlight.fitFOV*h.DEGTORAD)),I=1.1*A;sh.orthoScale=I,a?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldRight,f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):o?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldForward,f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):l?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldRight,-f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):c?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldForward,-f,Zu),th)),sh.look.set(Ju),sh.up.set(r.worldUp)):u?(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldUp,f,Zu),th)),sh.look.set(Ju),sh.up.set(h.normalizeVec3(h.mulVec3Scalar(r.worldForward,1,$u),eh))):p&&(sh.eye.set(h.addVec3(Ju,h.mulVec3Scalar(r.worldUp,-f,Zu),th)),sh.look.set(Ju),sh.up.set(h.normalizeVec3(h.mulVec3Scalar(r.worldForward,-1,$u)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(Ju),t.cameraFlight.duration>0?t.cameraFlight.flyTo(sh,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(sh),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class ih{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,c=!1;const u=this._scene.canvas.canvas,p=s=>{let n;s&&s.worldPos&&(n=s.worldPos);const i=s&&s.entity?s.entity.aabb:e.aabb;if(n){const s=e.camera;h.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})},d=e.tickify(this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||c)return;const i=o.hasSubs("hover"),a=o.hasSubs("hoverEnter"),u=o.hasSubs("hoverOut"),h=o.hasSubs("hoverOff"),p=o.hasSubs("hoverSurface"),d=o.hasSubs("hoverSnapOrSurface");if(i||a||u||h||p||d)if(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=p,r.scheduleSnapOrPick=d,r.update(),r.pickResult){if(r.pickResult.entity){const t=r.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),o.fire("hoverEnter",r.pickResult,!0),this._lastPickedEntityId=t)}o.fire("hover",r.pickResult,!0),(r.pickResult.worldPos||r.pickResult.snappedWorldPos)&&o.fire("hoverSurface",r.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),o.fire("hoverOff",{canvasPos:r.pickCursorPos},!0)});u.addEventListener("mousemove",d),u.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(c=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(n.mouseDownClientX=t.clientX,n.mouseDownClientY=t.clientY,n.mouseDownCursorX=n.pointerCanvasPos[0],n.mouseDownCursorY=n.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),1===t.which))){const t=r.pickResult;t&&t.worldPos?(a.setPivotPos(t.worldPos),a.startPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),a.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(c=!1),a.getPivoting()&&a.endPivot()}),u.addEventListener("mouseup",this._canvasMouseUpHandler=i=>{if(!s.active||!s.pointerEnabled)return;if(!(1===i.which))return;if(a.hidePivot(),Math.abs(i.clientX-n.mouseDownClientX)>3||Math.abs(i.clientY-n.mouseDownClientY)>3)return;const l=o.hasSubs("picked"),c=o.hasSubs("pickedNothing"),u=o.hasSubs("pickedSurface"),d=o.hasSubs("doublePicked"),A=o.hasSubs("doublePickedSurface"),f=o.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||d||A||f))return(l||c||u)&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=u,r.update(),r.pickResult?(o.fire("picked",r.pickResult,!0),r.pickedSurface&&o.fire("pickedSurface",r.pickResult,!0)):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo,r.schedulePickSurface=u,r.update();const e=r.pickResult,i=r.pickedSurface;this._timeout=setTimeout((()=>{e?(o.fire("picked",e,!0),i&&(o.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo||d||A,r.schedulePickSurface=r.schedulePickEntity&&A,r.update(),r.pickResult){if(o.fire("doublePicked",r.pickResult,!0),r.pickedSurface&&o.fire("doublePickedSurface",r.pickResult,!0),s.doublePickFlyTo&&(p(r.pickResult),!s.firstPerson&&s.followPointer)){const e=r.pickResult.entity.aabb,s=h.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(o.fire("doublePickedNothing",{canvasPos:n.pointerCanvasPos},!0),s.doublePickFlyTo&&(p(),!s.firstPerson&&s.followPointer)){const s=e.aabb,n=h.getAABB3Center(s);t.pivotController.setPivotPos(n),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class rh{constructor(e,t,s,n,i){this._scene=e;const r=e.input,a=[],o=e.canvas.canvas;let l=!0;this._onSceneMouseMove=r.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=r.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&n.mouseover&&(a[t]=!0,t===r.KEY_SHIFT&&(o.style.cursor="move"))})),this._onSceneKeyUp=r.on("keyup",(n=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(a[n]=!1,n===r.KEY_SHIFT&&(o.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(o=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const c=t.cameraControl,u=o.deltaTime/1e3;if(!s.planView){const e=c._isKeyDownForAction(c.ROTATE_Y_POS,a),n=c._isKeyDownForAction(c.ROTATE_Y_NEG,a),r=c._isKeyDownForAction(c.ROTATE_X_POS,a),o=c._isKeyDownForAction(c.ROTATE_X_NEG,a),l=u*s.keyboardRotationRate;(e||n||r||o)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?i.rotateDeltaY+=l:n&&(i.rotateDeltaY-=l),r?i.rotateDeltaX+=l:o&&(i.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!a[r.KEY_CTRL]&&!a[r.KEY_ALT]){const e=c._isKeyDownForAction(c.DOLLY_BACKWARDS,a),r=c._isKeyDownForAction(c.DOLLY_FORWARDS,a);if(e||r){const a=u*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),r?i.dollyDelta-=a:e&&(i.dollyDelta+=a),l&&(n.followPointerDirty=!0,l=!1)}}const h=c._isKeyDownForAction(c.PAN_FORWARDS,a),p=c._isKeyDownForAction(c.PAN_BACKWARDS,a),d=c._isKeyDownForAction(c.PAN_LEFT,a),A=c._isKeyDownForAction(c.PAN_RIGHT,a),f=c._isKeyDownForAction(c.PAN_UP,a),I=c._isKeyDownForAction(c.PAN_DOWN,a),m=(a[r.KEY_ALT]?.3:1)*u*s.keyboardPanRate;(h||p||d||A||f||I)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),I?i.panDeltaY+=m:f&&(i.panDeltaY+=-m),A?i.panDeltaX+=-m:d&&(i.panDeltaX+=m),p?i.panDeltaZ+=m:h&&(i.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const ah=h.vec3();class oh{constructor(e,t,s,n,i){this._scene=e;const r=e.camera,a=t.pickController,o=t.pivotController,l=t.panController;let c=1,u=1,p=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(i.dollyDelta)<.001&&(i.dollyDelta=0),Math.abs(i.rotateDeltaX)<.001&&(i.rotateDeltaX=0),Math.abs(i.rotateDeltaY)<.001&&(i.rotateDeltaY=0),0===i.rotateDeltaX&&0===i.rotateDeltaY||(i.dollyDelta=0),s.followPointer&&--c<=0&&(c=1,0!==i.dollyDelta)){if(0===i.rotateDeltaY&&0===i.rotateDeltaX&&s.followPointer&&n.followPointerDirty&&(a.pickCursorPos=n.pointerCanvasPos,a.schedulePickSurface=!0,a.update(),a.pickResult&&a.pickResult.worldPos?p=a.pickResult.worldPos:(u=1,p=null),n.followPointerDirty=!1),p){const t=Math.abs(h.lenVec3(h.subVec3(p,e.camera.eye,ah)));u=t/s.dollyProximityThreshold}u{n.mouseover=!0}),r.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{n.mouseover=!1,r.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{ch(e,r,n.pointerCanvasPos)}),r.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(ch(e,r,n.pointerCanvasPos),n.mouseover=!0)}),r.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function ch(e,t,s){if(e){const{x:n,y:i}=t.getBoundingClientRect();s[0]=e.clientX-n,s[1]=e.clientY-i}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const uh=function(e,t){if(e){let s=e.target,n=0,i=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-n,t[1]=e.pageY-i}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class hh{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=h.vec2(),l=h.vec2(),c=h.vec2(),u=h.vec2(),p=[],d=this._scene.canvas.canvas;let A=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),d.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const i=t.touches,l=t.changedTouches;for(n.touchStartTime=Date.now(),1===i.length&&1===l.length&&(uh(i[0],o),s.followPointer&&(r.pickCursorPos=o,r.schedulePickSurface=!0,r.update(),s.planView||(r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(a.setPivotPos(r.pickResult.worldPos),!s.firstPerson&&a.startPivot()&&a.showPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),!s.firstPerson&&a.startPivot()&&a.showPivot()))));p.length{a.getPivoting()&&a.endPivot()}),d.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const a=e.canvas.boundary,o=a[2],d=a[3],I=t.touches;if(t.touches.length===A){if(1===A){uh(I[0],l),h.subVec2(l,p[0],u);const t=u[0],r=u[1];if(null!==n.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(r)>s.longTapRadius)&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),s.planView){const n=e.camera;if("perspective"===n.projection){const a=Math.abs(e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=t*a/d*s.touchPanRate,i.panDeltaY+=r*a/d*s.touchPanRate}else i.panDeltaX+=.5*n.ortho.scale*(t/d)*s.touchPanRate,i.panDeltaY+=.5*n.ortho.scale*(r/d)*s.touchPanRate}else i.rotateDeltaY-=t/o*(1*s.dragRotationRate),i.rotateDeltaX+=r/d*(1.5*s.dragRotationRate)}else if(2===A){const t=I[0],a=I[1];uh(t,l),uh(a,c);const o=h.geometricMeanVec2(p[0],p[1]),u=h.geometricMeanVec2(l,c),A=h.vec2();h.subVec2(o,u,A);const f=A[0],m=A[1],y=e.camera,v=h.distVec2([t.pageX,t.pageY],[a.pageX,a.pageY]),w=(h.distVec2(p[0],p[1])-v)*s.touchDollyRate;if(i.dollyDelta=w,Math.abs(w)<1)if("perspective"===y.projection){const t=r.pickResult?r.pickResult.worldPos:e.center,n=Math.abs(h.lenVec3(h.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);i.panDeltaX-=f*n/d*s.touchPanRate,i.panDeltaY-=m*n/d*s.touchPanRate}else i.panDeltaX-=.5*y.ortho.scale*(f/d)*s.touchPanRate,i.panDeltaY-=.5*y.ortho.scale*(m/d)*s.touchPanRate;n.pointerCanvasPos=u}for(let e=0;e{let n;s&&s.worldPos&&(n=s.worldPos);const i=s?s.entity.aabb:e.aabb;if(n){const s=e.camera;h.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})};d.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null);const i=e.touches,r=e.changedTouches;if(o=Date.now(),1===i.length&&1===r.length){u=o,ph(i[0],c);const r=c[0],a=c[1],l=i[0].pageX,h=i[0].pageY;n.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(h)],canvasPos:[Math.round(r),Math.round(a)],event:e},!0),n.longTouchTimeout=null}),s.longTapTimeout)}else u=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),i=e.touches,o=e.changedTouches,d=a.hasSubs("pickedSurface");null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),0===i.length&&1===o.length&&u>-1&&t-u<150&&(p>-1&&u-p<325?(ph(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=d,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("doublePicked",r.pickResult),r.pickedSurface&&a.fire("doublePickedSurface",r.pickResult),s.doublePickFlyTo&&A(r.pickResult)):(a.fire("doublePickedNothing"),s.doublePickFlyTo&&A()),p=-1):h.distVec2(l[0],c)<4&&(ph(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=d,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("picked",r.pickResult),r.pickedSurface&&a.fire("pickedSurface",r.pickResult)):a.fire("pickedNothing"),p=t),u=-1),l.length=i.length;for(let e=0,t=i.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:h.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:h.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new Yu(this,this._configs),pivotController:new Ku(s,this._configs),panController:new Gu(s),cameraFlight:new mu(this,{duration:.5})},this._handlers=[new lh(this.scene,this._controllers,this._configs,this._states,this._updates),new hh(this.scene,this._controllers,this._configs,this._states,this._updates),new qu(this.scene,this._controllers,this._configs,this._states,this._updates),new nh(this.scene,this._controllers,this._configs,this._states,this._updates),new ih(this.scene,this._controllers,this._configs,this._states,this._updates),new dh(this.scene,this._controllers,this._configs,this._states,this._updates),new rh(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new oh(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",y.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,n=s.length;e0?wh(t):null,a=s&&s.length>0?wh(s):null,o=e=>{if(!e)return;var t=!0;(a&&a[e.type]||r&&!r[e.type])&&(t=!1),t&&n.push(e.id);const s=e.children;if(s)for(var i=0,l=s.length;i * Copyright (c) 2022 Niklas von Hertzen diff --git a/dist/xeokit-sdk.min.es.js b/dist/xeokit-sdk.min.es.js index da460b3f3c..bfb4efeabd 100644 --- a/dist/xeokit-sdk.min.es.js +++ b/dist/xeokit-sdk.min.es.js @@ -1,4 +1,4 @@ -class e{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}const t=new e;class s{constructor(e){this.id=e,this.parentItem=null,this.groups=[],this.menuElement=null,this.shown=!1,this.mouseOver=0}}class n{constructor(){this.items=[]}}class i{constructor(e,t,s,n,i){this.id=e,this.getTitle=t,this.doAction=s,this.getEnabled=n,this.getShown=i,this.itemElement=null,this.subMenu=null,this.enabled=!0}}class r{constructor(e={}){this._id=t.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==e.hideOnMouseDown&&(document.addEventListener("mousedown",(e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),e.items&&(this.items=e.items),this._hideOnAction=!1!==e.hideOnAction,this.context=e.context,this.enabled=!1!==e.enabled,this.hide()}on(e,t){let s=this._eventSubs[e];s||(s=[],this._eventSubs[e]=s),s.push(t)}fire(e,t){const s=this._eventSubs[e];if(s)for(let e=0,n=s.length;e{const r=this._getNextId(),a=new s(r);for(let s=0,r=e.length;s0,c=this._getNextId(),u=s.getTitle||(()=>s.title||""),h=s.doAction||s.callback||(()=>{}),p=s.getEnabled||(()=>!0),d=s.getShown||(()=>!0),A=new i(c,u,h,p,d);if(A.parentMenu=a,o.items.push(A),l){const e=t(n);A.subMenu=e,e.parentItem=A}this._itemList.push(A),this._itemMap[A.id]=A}}return this._menuList.push(a),this._menuMap[a.id]=a,a};this._rootMenu=t(e)}_getNextId(){return"ContextMenu_"+this._id+"_"+this._nextId++}_createUI(){const e=t=>{this._createMenuUI(t);const s=t.groups;for(let t=0,n=s.length;t'),s.push("
    "),t)for(let e=0,n=t.length;e'+l+" [MORE]"):s.push('
  • '+l+"
  • ")}}s.push("
"),s.push("");const n=s.join("");document.body.insertAdjacentHTML("beforeend",n);const i=document.querySelector("."+e.id);e.menuElement=i,i.style["border-radius"]="4px",i.style.display="none",i.style["z-index"]=3e5,i.style.background="white",i.style.border="1px solid black",i.style["box-shadow"]="0 4px 5px 0 gray",i.oncontextmenu=e=>{e.preventDefault()};const r=this;let a=null;if(t)for(let e=0,s=t.length;e{e.preventDefault();const s=t.subMenu;if(!s)return void(a&&(r._hideMenu(a.id),a=null));if(a&&a.id!==s.id&&(r._hideMenu(a.id),a=null),!1===t.enabled)return;const n=t.itemElement,i=s.menuElement,o=n.getBoundingClientRect();i.getBoundingClientRect();o.right+200>window.innerWidth?r._showMenu(s.id,o.left-200,o.top-1):r._showMenu(s.id,o.right-5,o.top-1),a=s})),n||(t.itemElement.addEventListener("click",(e=>{e.preventDefault(),r._context&&!1!==t.enabled&&(t.doAction&&t.doAction(r._context),this._hideOnAction?r.hide():(r._updateItemsTitles(),r._updateItemsEnabledStatus()))})),t.itemElement.addEventListener("mouseenter",(e=>{e.preventDefault(),!1!==t.enabled&&t.doHover&&t.doHover(r._context)})))):console.error("ContextMenu item element not found: "+t.id)}}}_updateItemsTitles(){if(this._context)for(let e=0,t=this._itemList.length;ewindow.innerHeight&&(s=window.innerHeight-n),t+i>window.innerWidth&&(t=window.innerWidth-i),e.style.left=t+"px",e.style.top=s+"px"}_hideMenuElement(e){e.style.display="none"}}class a{constructor(e,t={}){this.viewer=e,this.scene=this.viewer.scene,this._lensCursorDiv=document.createElement("div"),this.viewer.scene.canvas.canvas.parentNode.insertBefore(this._lensCursorDiv,this.viewer.scene.canvas.canvas),this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red",this._lensCursorDiv.style.borderRadius="20px",this._lensCursorDiv.style.width="10px",this._lensCursorDiv.style.height="10px",this._lensCursorDiv.style.margin="-200px -200px",this._lensCursorDiv.style.zIndex="100000",this._lensCursorDiv.style.position="absolute",this._lensCursorDiv.style.pointerEvents="none",this._lensContainer=document.createElement("div"),this._lensContainer.style.border="1px solid black",this._lensContainer.style.background="white",this._lensContainer.style.borderRadius="50%",this._lensContainer.style.width="300px",this._lensContainer.style.height="300px",this._lensContainer.style.marginTop="85px",this._lensContainer.style.marginLeft="25px",this._lensContainer.style.zIndex="15000",this._lensContainer.style.position="absolute",this._lensContainer.style.pointerEvents="none",this._lensContainer.style.visibility="hidden",this._lensCanvas=document.createElement("canvas"),this._lensCanvas.style.borderRadius="50%",this._lensCanvas.style.width="300px",this._lensCanvas.style.height="300px",this._lensCanvas.style.zIndex="15000",this._lensCanvas.style.pointerEvents="none",document.body.appendChild(this._lensContainer),this._lensContainer.appendChild(this._lensCanvas),this._lensCanvasContext=this._lensCanvas.getContext("2d"),this._canvasElement=this.viewer.scene.canvas.canvas,this._canvasPos=null,this._snappedCanvasPos=null,this._lensPosToggle=!0,this._zoomLevel=t.zoomLevel||2,this._active=!1!==t.active,this._visible=!1,this._snapped=!1,this._onViewerRendering=this.viewer.scene.on("rendering",(()=>{this._active&&this._visible&&this.update()}))}update(){if(!this._active||!this._visible)return;if(!this._canvasPos)return;const e=this._lensContainer.getBoundingClientRect(),t=this._canvasElement.getBoundingClientRect(),s=this._canvasPos[0]e.left&&this._canvasPos[1]e.top;this._lensContainer.style.marginLeft="25px",s&&(this._lensPosToggle?this._lensContainer.style.marginTop=t.bottom-t.top-this._lensCanvas.height-85+"px":this._lensContainer.style.marginTop="85px",this._lensPosToggle=!this._lensPosToggle),this._lensCanvasContext.clearRect(0,0,this._lensCanvas.width,this._lensCanvas.height);const n=Math.max(this._lensCanvas.width,this._lensCanvas.height)/this._zoomLevel;this._lensCanvasContext.drawImage(this._canvasElement,this._canvasPos[0]-n/2,this._canvasPos[1]-n/2,n,n,0,0,this._lensCanvas.width,this._lensCanvas.height);const i=[(e.left+e.right)/2,(e.top+e.bottom)/2];if(this._snappedCanvasPos){const e=this._snappedCanvasPos[0]-this._canvasPos[0],t=this._snappedCanvasPos[1]-this._canvasPos[1];this._lensCursorDiv.style.marginLeft=i[0]+e*this._zoomLevel-10+"px",this._lensCursorDiv.style.marginTop=i[1]+t*this._zoomLevel-10+"px"}else this._lensCursorDiv.style.marginLeft=i[0]-10+"px",this._lensCursorDiv.style.marginTop=i[1]-10+"px"}set zoomFactor(e){this._zoomFactor=e,this.update()}get zoomFactor(){return this._zoomFactor}set canvasPos(e){this._canvasPos=e,this.update()}get canvasPos(){return this._canvasPos}set snappedCanvasPos(e){this._snappedCanvasPos=e,this.update()}get snappedCanvasPos(){return this._snappedCanvasPos}set snapped(e){this._snapped=e,e?(this._lensCursorDiv.style.background="greenyellow",this._lensCursorDiv.style.border="2px solid green"):(this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red")}get snapped(){return this._snapped}set active(e){this._active=e,this._lensContainer.style.visibility=e&&this._visible?"visible":"hidden",e&&this._visible||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}get active(){return this._active}set visible(e){this._visible=e,this._lensContainer.style.visibility=e&&this._active?"visible":"hidden",e&&this._active||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}get visible(){return this._visible}destroy(){this._destroyed||(this.viewer.scene.off(this._onViewerRendering),this._lensContainer.removeChild(this._lensCanvas),document.body.removeChild(this._lensContainer),this._destroyed=!0)}}let o=!0,l=o?Float64Array:Float32Array;const c=new l(3),u=new l(16),h=new l(16),p=new l(4),d={setDoublePrecisionEnabled(e){o=e,l=o?Float64Array:Float32Array},getDoublePrecisionEnabled:()=>o,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new l(e||2),vec3:e=>new l(e||3),vec4:e=>new l(e||4),mat3:e=>new l(e||9),mat3ToMat4:(e,t=new l(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new l(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const n=new l(2);for(let i=0,r=e.length;i{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&n|128]}${e[n>>8&255]}-${e[n>>16&255]}${e[n>>24&255]}${e[255&i]}${e[i>>8&255]}${e[i>>16&255]}${e[i>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new l(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],n=e[1],i=e[2],r=t[0],a=t[1],o=t[2];return[n*o-i*a,i*r-s*o,s*a-n*r,0]},cross3Vec3(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=t[0],o=t[1],l=t[2];return s[0]=i*l-r*o,s[1]=r*a-n*l,s[2]=n*o-i*a,s},sqLenVec4:e=>d.dotVec4(e,e),lenVec4:e=>Math.sqrt(d.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>d.dotVec3(e,e),sqLenVec2:e=>d.dotVec2(e,e),lenVec3:e=>Math.sqrt(d.sqLenVec3(e)),distVec3:(()=>{const e=new l(3);return(t,s)=>d.lenVec3(d.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(d.sqLenVec2(e)),distVec2:(()=>{const e=new l(2);return(t,s)=>d.lenVec2(d.subVec2(t,s,e))})(),rcpVec3:(e,t)=>d.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/d.lenVec4(e);return d.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/d.lenVec3(e);return d.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/d.lenVec2(e);return d.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=d.dotVec3(e,t)/Math.sqrt(d.sqLenVec3(e)*d.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new l(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=d.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=d.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=d.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,n=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||d.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>d.m4s(0),setMat4ToOnes:()=>d.m4s(1),diagonalMat4v:e=>new l([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,n)=>d.diagonalMat4v([e,t,s,n]),diagonalMat4s:e=>d.diagonalMat4c(e,e,e,e),identityMat4:(e=new l(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new l(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>d.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=e[9],d=e[10],A=e[11],f=e[12],I=e[13],m=e[14],y=e[15],v=t[0],w=t[1],g=t[2],E=t[3],T=t[4],b=t[5],D=t[6],P=t[7],C=t[8],_=t[9],R=t[10],B=t[11],O=t[12],S=t[13],N=t[14],x=t[15];return s[0]=v*n+w*o+g*h+E*f,s[1]=v*i+w*l+g*p+E*I,s[2]=v*r+w*c+g*d+E*m,s[3]=v*a+w*u+g*A+E*y,s[4]=T*n+b*o+D*h+P*f,s[5]=T*i+b*l+D*p+P*I,s[6]=T*r+b*c+D*d+P*m,s[7]=T*a+b*u+D*A+P*y,s[8]=C*n+_*o+R*h+B*f,s[9]=C*i+_*l+R*p+B*I,s[10]=C*r+_*c+R*d+B*m,s[11]=C*a+_*u+R*A+B*y,s[12]=O*n+S*o+N*h+x*f,s[13]=O*i+S*l+N*p+x*I,s[14]=O*r+S*c+N*d+x*m,s[15]=O*a+S*u+N*A+x*y,s},mulMat3(e,t,s){s||(s=new l(9));const n=e[0],i=e[3],r=e[6],a=e[1],o=e[4],c=e[7],u=e[2],h=e[5],p=e[8],d=t[0],A=t[3],f=t[6],I=t[1],m=t[4],y=t[7],v=t[2],w=t[5],g=t[8];return s[0]=n*d+i*I+r*v,s[3]=n*A+i*m+r*w,s[6]=n*f+i*y+r*g,s[1]=a*d+o*I+c*v,s[4]=a*A+o*m+c*w,s[7]=a*f+o*y+c*g,s[2]=u*d+h*I+p*v,s[5]=u*A+h*m+p*w,s[8]=u*f+h*y+p*g,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=d.vec4()){const n=t[0],i=t[1],r=t[2],a=t[3];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12]*a,s[1]=e[1]*n+e[5]*i+e[9]*r+e[13]*a,s[2]=e[2]*n+e[6]*i+e[10]*r+e[14]*a,s[3]=e[3]*n+e[7]*i+e[11]*r+e[15]*a,s},transposeMat4(e,t){const s=e[4],n=e[14],i=e[8],r=e[13],a=e[12],o=e[9];if(!t||e===t){const t=e[1],l=e[2],c=e[3],u=e[6],h=e[7],p=e[11];return e[1]=s,e[2]=i,e[3]=a,e[4]=t,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[11]=n,e[12]=c,e[13]=h,e[14]=p,e}return t[0]=e[0],t[1]=s,t[2]=i,t[3]=a,t[4]=e[1],t[5]=e[5],t[6]=o,t[7]=r,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=n,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],n=e[2],i=e[3],r=e[4],a=e[5],o=e[6],l=e[7],c=e[8],u=e[9],h=e[10],p=e[11],d=e[12],A=e[13],f=e[14],I=e[15];return d*u*o*i-c*A*o*i-d*a*h*i+r*A*h*i+c*a*f*i-r*u*f*i-d*u*n*l+c*A*n*l+d*s*h*l-t*A*h*l-c*s*f*l+t*u*f*l+d*a*n*p-r*A*n*p-d*s*o*p+t*A*o*p+r*s*f*p-t*a*f*p-c*a*n*I+r*u*n*I+c*s*o*I-t*u*o*I-r*s*h*I+t*a*h*I},inverseMat4(e,t){t||(t=e);const s=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=e[9],p=e[10],d=e[11],A=e[12],f=e[13],I=e[14],m=e[15],y=s*o-n*a,v=s*l-i*a,w=s*c-r*a,g=n*l-i*o,E=n*c-r*o,T=i*c-r*l,b=u*f-h*A,D=u*I-p*A,P=u*m-d*A,C=h*I-p*f,_=h*m-d*f,R=p*m-d*I,B=1/(y*R-v*_+w*C+g*P-E*D+T*b);return t[0]=(o*R-l*_+c*C)*B,t[1]=(-n*R+i*_-r*C)*B,t[2]=(f*T-I*E+m*g)*B,t[3]=(-h*T+p*E-d*g)*B,t[4]=(-a*R+l*P-c*D)*B,t[5]=(s*R-i*P+r*D)*B,t[6]=(-A*T+I*w-m*v)*B,t[7]=(u*T-p*w+d*v)*B,t[8]=(a*_-o*P+c*b)*B,t[9]=(-s*_+n*P-r*b)*B,t[10]=(A*E-f*w+m*y)*B,t[11]=(-u*E+h*w-d*y)*B,t[12]=(-a*C+o*D-l*b)*B,t[13]=(s*C-n*D+i*b)*B,t[14]=(-A*g+f*v-I*y)*B,t[15]=(u*g-h*v+p*y)*B,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||d.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||d.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new l(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,d.translationMat4v(e,i))})(),translationMat4s:(e,t)=>d.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>d.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,n){const i=n[3];n[0]+=i*e,n[1]+=i*t,n[2]+=i*s;const r=n[7];n[4]+=r*e,n[5]+=r*t,n[6]+=r*s;const a=n[11];n[8]+=a*e,n[9]+=a*t,n[10]+=a*s;const o=n[15];return n[12]+=o*e,n[13]+=o*t,n[14]+=o*s,n},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const n=d.normalizeVec4([t[0],t[1],t[2],0],[]),i=Math.sin(e),r=Math.cos(e),a=1-r,o=n[0],l=n[1],c=n[2];let u,h,p,A,f,I;return u=o*l,h=l*c,p=c*o,A=o*i,f=l*i,I=c*i,(s=s||d.mat4())[0]=a*o*o+r,s[1]=a*u+I,s[2]=a*p-f,s[3]=0,s[4]=a*u-I,s[5]=a*l*l+r,s[6]=a*h+A,s[7]=0,s[8]=a*p+f,s[9]=a*h-A,s[10]=a*c*c+r,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,n,i)=>d.rotationMat4v(e,[t,s,n],i),scalingMat4v:(e,t=d.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=d.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new l(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,d.scalingMat4v(e,i))})(),scaleMat4c:(e,t,s,n)=>(n[0]*=e,n[4]*=t,n[8]*=s,n[1]*=e,n[5]*=t,n[9]*=s,n[2]*=e,n[6]*=t,n[10]*=s,n[3]*=e,n[7]*=t,n[11]*=s,n),scaleMat4v(e,t){const s=e[0],n=e[1],i=e[2];return t[0]*=s,t[4]*=n,t[8]*=i,t[1]*=s,t[5]*=n,t[9]*=i,t[2]*=s,t[6]*=n,t[10]*=i,t[3]*=s,t[7]*=n,t[11]*=i,t},scalingMat4s:e=>d.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=d.mat4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=n+n,l=i+i,c=r+r,u=n*o,h=n*l,p=n*c,A=i*l,f=i*c,I=r*c,m=a*o,y=a*l,v=a*c;return s[0]=1-(A+I),s[1]=h+v,s[2]=p-y,s[3]=0,s[4]=h-v,s[5]=1-(u+I),s[6]=f+m,s[7]=0,s[8]=p+y,s[9]=f-m,s[10]=1-(u+A),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=d.vec4()){const n=d.clamp,i=e[0],r=e[4],a=e[8],o=e[1],l=e[5],c=e[9],u=e[2],h=e[6],p=e[10];return"XYZ"===t?(s[1]=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-c,p),s[2]=Math.atan2(-r,i)):(s[0]=Math.atan2(h,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(s[1]=Math.atan2(a,p),s[2]=Math.atan2(o,l)):(s[1]=Math.atan2(-u,i),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(s[1]=Math.atan2(-u,p),s[2]=Math.atan2(-r,l)):(s[1]=0,s[2]=Math.atan2(o,i))):"ZYX"===t?(s[1]=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(s[0]=Math.atan2(h,p),s[2]=Math.atan2(o,i)):(s[0]=0,s[2]=Math.atan2(-r,l))):"YZX"===t?(s[2]=Math.asin(n(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(-c,l),s[1]=Math.atan2(-u,i)):(s[0]=0,s[1]=Math.atan2(a,p))):"XZY"===t&&(s[2]=Math.asin(-n(r,-1,1)),Math.abs(r)<.99999?(s[0]=Math.atan2(h,l),s[1]=Math.atan2(a,i)):(s[0]=Math.atan2(-c,p),s[1]=0)),s},composeMat4:(e,t,s,n=d.mat4())=>(d.quaternionToRotationMat4(t,n),d.scaleMat4v(s,n),d.translateMat4v(e,n),n),decomposeMat4:(()=>{const e=new l(3),t=new l(16);return function(s,n,i,r){e[0]=s[0],e[1]=s[1],e[2]=s[2];let a=d.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const o=d.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=d.lenVec3(e);d.determinantMat4(s)<0&&(a=-a),n[0]=s[12],n[1]=s[13],n[2]=s[14],t.set(s);const c=1/a,u=1/o,h=1/l;return t[0]*=c,t[1]*=c,t[2]*=c,t[4]*=u,t[5]*=u,t[6]*=u,t[8]*=h,t[9]*=h,t[10]*=h,d.mat4ToQuaternion(t,i),r[0]=a,r[1]=o,r[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,n){n||(n=d.mat4());const i=e[0],r=e[1],a=e[2],o=s[0],l=s[1],c=s[2],u=t[0],h=t[1],p=t[2];if(i===u&&r===h&&a===p)return d.identityMat4();let A,f,I,m,y,v,w,g,E,T;return A=i-u,f=r-h,I=a-p,T=1/Math.sqrt(A*A+f*f+I*I),A*=T,f*=T,I*=T,m=l*I-c*f,y=c*A-o*I,v=o*f-l*A,T=Math.sqrt(m*m+y*y+v*v),T?(T=1/T,m*=T,y*=T,v*=T):(m=0,y=0,v=0),w=f*v-I*y,g=I*m-A*v,E=A*y-f*m,T=Math.sqrt(w*w+g*g+E*E),T?(T=1/T,w*=T,g*=T,E*=T):(w=0,g=0,E=0),n[0]=m,n[1]=w,n[2]=A,n[3]=0,n[4]=y,n[5]=g,n[6]=f,n[7]=0,n[8]=v,n[9]=E,n[10]=I,n[11]=0,n[12]=-(m*i+y*r+v*a),n[13]=-(w*i+g*r+E*a),n[14]=-(A*i+f*r+I*a),n[15]=1,n},lookAtMat4c:(e,t,s,n,i,r,a,o,l)=>d.lookAtMat4v([e,t,s],[n,i,r],[a,o,l],[]),orthoMat4c(e,t,s,n,i,r,a){a||(a=d.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=-2/c,a[11]=0,a[12]=-(e+t)/o,a[13]=-(n+s)/l,a[14]=-(r+i)/c,a[15]=1,a},frustumMat4v(e,t,s){s||(s=d.mat4());const n=[e[0],e[1],e[2],0],i=[t[0],t[1],t[2],0];d.addVec4(i,n,u),d.subVec4(i,n,h);const r=2*n[2],a=h[0],o=h[1],l=h[2];return s[0]=r/a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r/o,s[6]=0,s[7]=0,s[8]=u[0]/a,s[9]=u[1]/o,s[10]=-u[2]/l,s[11]=-1,s[12]=0,s[13]=0,s[14]=-r*i[2]/l,s[15]=0,s},frustumMat4(e,t,s,n,i,r,a){a||(a=d.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2*i/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*i/l,a[6]=0,a[7]=0,a[8]=(t+e)/o,a[9]=(n+s)/l,a[10]=-(r+i)/c,a[11]=-1,a[12]=0,a[13]=0,a[14]=-r*i*2/c,a[15]=0,a},perspectiveMat4(e,t,s,n,i){const r=[],a=[];return r[2]=s,a[2]=n,a[1]=r[2]*Math.tan(e/2),r[1]=-a[1],a[0]=a[1]*t,r[0]=-a[0],d.frustumMat4v(r,a,i)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=d.vec3()){const n=t[0],i=t[1],r=t[2];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12],s[1]=e[1]*n+e[5]*i+e[9]*r+e[13],s[2]=e[2]*n+e[6]*i+e[10]*r+e[14],s},transformPoint4:(e,t,s=d.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const n=s||[],i=t.length;let r,a,o,l;const c=e[0],u=e[1],h=e[2],p=e[3],d=e[4],A=e[5],f=e[6],I=e[7],m=e[8],y=e[9],v=e[10],w=e[11],g=e[12],E=e[13],T=e[14],b=e[15];let D;for(let e=0;e{const e=new l(16),t=new l(16),s=new l(16);return function(n,i,r,a){return this.transformVec3(this.mulMat4(this.inverseMat4(i,e),this.inverseMat4(r,t),s),n,a)}})(),lerpVec3(e,t,s,n,i,r){const a=r||d.vec3(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a},lerpMat4(e,t,s,n,i,r){const a=r||d.mat4(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a[3]=n[3]+o*(i[3]-n[3]),a[4]=n[4]+o*(i[4]-n[4]),a[5]=n[5]+o*(i[5]-n[5]),a[6]=n[6]+o*(i[6]-n[6]),a[7]=n[7]+o*(i[7]-n[7]),a[8]=n[8]+o*(i[8]-n[8]),a[9]=n[9]+o*(i[9]-n[9]),a[10]=n[10]+o*(i[10]-n[10]),a[11]=n[11]+o*(i[11]-n[11]),a[12]=n[12]+o*(i[12]-n[12]),a[13]=n[13]+o*(i[13]-n[13]),a[14]=n[14]+o*(i[14]-n[14]),a[15]=n[15]+o*(i[15]-n[15]),a},flatten(e){const t=[];let s,n,i,r,a;for(s=0,n=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=d.vec4()){const n=e[0]*d.DEGTORAD/2,i=e[1]*d.DEGTORAD/2,r=e[2]*d.DEGTORAD/2,a=Math.cos(n),o=Math.cos(i),l=Math.cos(r),c=Math.sin(n),u=Math.sin(i),h=Math.sin(r);return"XYZ"===t?(s[0]=c*o*l+a*u*h,s[1]=a*u*l-c*o*h,s[2]=a*o*h+c*u*l,s[3]=a*o*l-c*u*h):"YXZ"===t?(s[0]=c*o*l+a*u*h,s[1]=a*u*l-c*o*h,s[2]=a*o*h-c*u*l,s[3]=a*o*l+c*u*h):"ZXY"===t?(s[0]=c*o*l-a*u*h,s[1]=a*u*l+c*o*h,s[2]=a*o*h+c*u*l,s[3]=a*o*l-c*u*h):"ZYX"===t?(s[0]=c*o*l-a*u*h,s[1]=a*u*l+c*o*h,s[2]=a*o*h-c*u*l,s[3]=a*o*l+c*u*h):"YZX"===t?(s[0]=c*o*l+a*u*h,s[1]=a*u*l+c*o*h,s[2]=a*o*h-c*u*l,s[3]=a*o*l-c*u*h):"XZY"===t&&(s[0]=c*o*l-a*u*h,s[1]=a*u*l-c*o*h,s[2]=a*o*h+c*u*l,s[3]=a*o*l+c*u*h),s},mat4ToQuaternion(e,t=d.vec4()){const s=e[0],n=e[4],i=e[8],r=e[1],a=e[5],o=e[9],l=e[2],c=e[6],u=e[10];let h;const p=s+a+u;return p>0?(h=.5/Math.sqrt(p+1),t[3]=.25/h,t[0]=(c-o)*h,t[1]=(i-l)*h,t[2]=(r-n)*h):s>a&&s>u?(h=2*Math.sqrt(1+s-a-u),t[3]=(c-o)/h,t[0]=.25*h,t[1]=(n+r)/h,t[2]=(i+l)/h):a>u?(h=2*Math.sqrt(1+a-s-u),t[3]=(i-l)/h,t[0]=(n+r)/h,t[1]=.25*h,t[2]=(o+c)/h):(h=2*Math.sqrt(1+u-s-a),t[3]=(r-n)/h,t[0]=(i+l)/h,t[1]=(o+c)/h,t[2]=.25*h),t},vec3PairToQuaternion(e,t,s=d.vec4()){const n=Math.sqrt(d.dotVec3(e,e)*d.dotVec3(t,t));let i=n+d.dotVec3(e,t);return i<1e-8*n?(i=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):d.cross3Vec3(e,t,s),s[3]=i,d.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=d.vec4()){const s=e[3]/2,n=Math.sin(s);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new l(16);return(t,s,n)=>(n=n||d.vec3(),d.quaternionToRotationMat4(t,e),d.mat4ToEuler(e,s,n),n)})(),mulQuaternions(e,t,s=d.vec4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=t[0],l=t[1],c=t[2],u=t[3];return s[0]=a*o+n*u+i*c-r*l,s[1]=a*l+i*u+r*o-n*c,s[2]=a*c+r*u+n*l-i*o,s[3]=a*u-n*o-i*l-r*c,s},vec3ApplyQuaternion(e,t,s=d.vec3()){const n=t[0],i=t[1],r=t[2],a=e[0],o=e[1],l=e[2],c=e[3],u=c*n+o*r-l*i,h=c*i+l*n-a*r,p=c*r+a*i-o*n,A=-a*n-o*i-l*r;return s[0]=u*c+A*-a+h*-l-p*-o,s[1]=h*c+A*-o+p*-a-u*-l,s[2]=p*c+A*-l+u*-o-h*-a,s},quaternionToMat4(e,t){t=d.identityMat4(t);const s=e[0],n=e[1],i=e[2],r=e[3],a=2*s,o=2*n,l=2*i,c=a*r,u=o*r,h=l*r,p=a*s,A=o*s,f=l*s,I=o*n,m=l*n,y=l*i;return t[0]=1-(I+y),t[1]=A+h,t[2]=f-u,t[4]=A-h,t[5]=1-(p+y),t[6]=m+c,t[8]=f+u,t[9]=m-c,t[10]=1-(p+I),t},quaternionToRotationMat4(e,t){const s=e[0],n=e[1],i=e[2],r=e[3],a=s+s,o=n+n,l=i+i,c=s*a,u=s*o,h=s*l,p=n*o,d=n*l,A=i*l,f=r*a,I=r*o,m=r*l;return t[0]=1-(p+A),t[4]=u-m,t[8]=h+I,t[1]=u+m,t[5]=1-(c+A),t[9]=d-f,t[2]=h-I,t[6]=d+f,t[10]=1-(c+p),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=d.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>d.normalizeQuaternion(d.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=d.vec4()){const s=(e=d.normalizeQuaternion(e,p))[3],n=2*Math.acos(s),i=Math.sqrt(1-s*s);return i<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i),t[3]=n,t},AABB3:e=>new l(e||6),AABB2:e=>new l(e||4),OBB3:e=>new l(e||32),OBB2:e=>new l(e||16),Sphere3:(e,t,s,n)=>new l([e,t,s,n]),transformOBB3(e,t,s=t){let n;const i=t.length;let r,a,o;const l=e[0],c=e[1],u=e[2],h=e[3],p=e[4],d=e[5],A=e[6],f=e[7],I=e[8],m=e[9],y=e[10],v=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;n{const e=new l(3),t=new l(3),s=new l(3);return n=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5],d.subVec3(t,e,s),Math.abs(d.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(n,i)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5];const r=d.subVec3(t,e,s),a=i[0]-n[0],o=n[3]-i[0],l=i[1]-n[1],c=n[4]-i[1],u=i[2]-n[2],h=n[5]-i[2];return r[0]+=a>o?a:o,r[1]+=l>c?l:c,r[2]+=u>h?u:h,Math.abs(d.lenVec3(r))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||d.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||d.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=d.AABB3())=>(e[0]=d.MAX_DOUBLE,e[1]=d.MAX_DOUBLE,e[2]=d.MAX_DOUBLE,e[3]=d.MIN_DOUBLE,e[4]=d.MIN_DOUBLE,e[5]=d.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=d.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new l(3);return(t,s,n)=>{s=s||d.AABB3();let i,r,a,o=d.MAX_DOUBLE,l=d.MAX_DOUBLE,c=d.MAX_DOUBLE,u=d.MIN_DOUBLE,h=d.MIN_DOUBLE,p=d.MIN_DOUBLE;for(let s=0,A=t.length;su&&(u=i),r>h&&(h=r),a>p&&(p=a);return s[0]=o,s[1]=l,s[2]=c,s[3]=u,s[4]=h,s[5]=p,s}})(),OBB3ToAABB3(e,t=d.AABB3()){let s,n,i,r=d.MAX_DOUBLE,a=d.MAX_DOUBLE,o=d.MAX_DOUBLE,l=d.MIN_DOUBLE,c=d.MIN_DOUBLE,u=d.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToAABB3(e,t=d.AABB3()){let s,n,i,r=d.MAX_DOUBLE,a=d.MAX_DOUBLE,o=d.MAX_DOUBLE,l=d.MIN_DOUBLE,c=d.MIN_DOUBLE,u=d.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToSphere3:(()=>{const e=new l(3);return(t,s)=>{s=s||d.vec4();let n,i=0,r=0,a=0;const o=t.length;for(n=0;nc&&(c=l);return s[3]=c,s}})(),positions3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,n)=>{n=n||d.vec4();let i,r=0,a=0,o=0;const l=s.length;let c=0;for(i=0;ic&&(c=h);return n[3]=c,n}})(),OBB3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,n)=>{n=n||d.vec4();let i,r=0,a=0,o=0;const l=s.length,c=l/4;for(i=0;ih&&(h=u);return n[3]=h,n}})(),getSphere3Center:(e,t=d.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=d.vec3()){let s=0,n=0,i=0;for(var r=0,a=e.length;r(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>n&&(e[1]=n),e[2]>i&&(e[2]=i),e[3](e[0]=d.MAX_DOUBLE,e[1]=d.MAX_DOUBLE,e[2]=d.MIN_DOUBLE,e[3]=d.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(n=e[0]*s[0],i=e[0]*s[3]):(n=e[0]*s[3],i=e[0]*s[0]),e[1]>0?(n+=e[1]*s[1],i+=e[1]*s[4]):(n+=e[1]*s[4],i+=e[1]*s[1]),e[2]>0?(n+=e[2]*s[2],i+=e[2]*s[5]):(n+=e[2]*s[5],i+=e[2]*s[2]);if(n<=-t&&i<=-t)return-1;return n>=-t&&i>=-t?1:0},OBB3ToAABB2(e,t=d.AABB2()){let s,n,i,r,a=d.MAX_DOUBLE,o=d.MAX_DOUBLE,l=d.MIN_DOUBLE,c=d.MIN_DOUBLE;for(let t=0,u=e.length;tl&&(l=s),n>c&&(c=n);return t[0]=a,t[1]=o,t[2]=l,t[3]=c,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(n-s),tangentQuadraticBezier3:(e,t,s,n,i)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*n*(1-e)-3*e*e*n+3*e*e*i,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,n,i){const r=.5*(s-e),a=.5*(n-t),o=i*i;return(2*t-2*s+r+a)*(i*o)+(-3*t+3*s-2*r-a)*o+r*i+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,n){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,n)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,n,i){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,n)+this.b3p3(e,i)},triangleNormal(e,t,s,n=d.vec3()){const i=t[0]-e[0],r=t[1]-e[1],a=t[2]-e[2],o=s[0]-e[0],l=s[1]-e[1],c=s[2]-e[2],u=r*c-a*l,h=a*o-i*c,p=i*l-r*o,A=Math.sqrt(u*u+h*h+p*p);return 0===A?(n[0]=0,n[1]=0,n[2]=0):(n[0]=u/A,n[1]=h/A,n[2]=p/A),n},rayTriangleIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),n=new l(3),i=new l(3);return(r,a,o,l,c,u)=>{u=u||d.vec3();const h=d.subVec3(l,o,e),p=d.subVec3(c,o,t),A=d.cross3Vec3(a,p,s),f=d.dotVec3(h,A);if(f<1e-6)return null;const I=d.subVec3(r,o,n),m=d.dotVec3(I,A);if(m<0||m>f)return null;const y=d.cross3Vec3(I,h,i),v=d.dotVec3(a,y);if(v<0||m+v>f)return null;const w=d.dotVec3(p,y)/f;return u[0]=r[0]+w*a[0],u[1]=r[1]+w*a[1],u[2]=r[2]+w*a[2],u}})(),rayPlaneIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),n=new l(3);return(i,r,a,o,l,c)=>{c=c||d.vec3(),r=d.normalizeVec3(r,e);const u=d.subVec3(o,a,t),h=d.subVec3(l,a,s),p=d.cross3Vec3(u,h,n);d.normalizeVec3(p,p);const A=-d.dotVec3(a,p),f=-(d.dotVec3(i,p)+A)/d.dotVec3(r,p);return c[0]=i[0]+f*r[0],c[1]=i[1]+f*r[1],c[2]=i[2]+f*r[2],c}})(),cartesianToBarycentric:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(n,i,r,a,o)=>{const l=d.subVec3(a,i,e),c=d.subVec3(r,i,t),u=d.subVec3(n,i,s),h=d.dotVec3(l,l),p=d.dotVec3(l,c),A=d.dotVec3(l,u),f=d.dotVec3(c,c),I=d.dotVec3(c,u),m=h*f-p*p;if(0===m)return null;const y=1/m,v=(f*A-p*I)*y,w=(h*I-p*A)*y;return o[0]=1-v-w,o[1]=w,o[2]=v,o}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,n,i=d.vec3()){const r=e[0],a=e[1],o=e[2];return i[0]=t[0]*r+s[0]*a+n[0]*o,i[1]=t[1]*r+s[1]*a+n[1]*o,i[2]=t[2]*r+s[2]*a+n[2]*o,i},mergeVertices(e,t,s,n){const i={},r=[],a=[],o=t?[]:null,l=s?[]:null,c=[];let u,h,p,d;const A=1e4;let f,I,m=0;for(f=0,I=e.length;f{const e=new l(3),t=new l(3),s=new l(3),n=new l(3),i=new l(3),r=new l(3);return(a,o,l)=>{let c,u;const h=new Array(a.length/3);let p,A,f,I,m,y,v;for(c=0,u=o.length;c{const e=new l(3),t=new l(3),s=new l(3),n=new l(3),i=new l(3),r=new l(3),a=new l(3);return(o,l,c)=>{const u=new Float32Array(o.length);for(let h=0;h>24&255,u=p>>16&255,c=p>>8&255,l=255&p,o=t[s],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+1],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+2],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,p++;return{positions:i,colors:r}},faceToVertexNormals(e,t,s={}){const n=s.smoothNormalsAngleThreshold||20,i={},r=[],a={};let o,l,c,u,h;const p=1e4;let A,f,I,m,y,v;for(f=0,m=e.length;f{const e=new l(4),t=new l(4);return(s,n,i,r,a)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=1,d.transformVec4(s,e,t),r[0]=t[0],r[1]=t[1],r[2]=t[2],e[0]=i[0],e[1]=i[1],e[2]=i[2],d.transformVec3(s,e,t),d.normalizeVec3(t),a[0]=t[0],a[1]=t[1],a[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new l(16),t=new l(16),s=new l(4),n=new l(4),i=new l(4),r=new l(4);return(a,o,l,c,u,h)=>{const p=d.mulMat4(l,o,e),A=d.inverseMat4(p,t),f=a.width,I=a.height,m=(c[0]-f/2)/(f/2),y=-(c[1]-I/2)/(I/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,d.transformVec4(A,s,n),d.mulVec4Scalar(n,1/n[3]),i[0]=m,i[1]=y,i[2]=1,i[3]=1,d.transformVec4(A,i,r),d.mulVec4Scalar(r,1/r[3]),u[0]=r[0],u[1]=r[1],u[2]=r[2],d.subVec3(r,n,h),d.normalizeVec3(h)}})(),canvasPosToLocalRay:(()=>{const e=new l(3),t=new l(3);return(s,n,i,r,a,o,l)=>{d.canvasPosToWorldRay(s,n,i,a,e,t),d.worldRayToLocalRay(r,e,t,o,l)}})(),worldRayToLocalRay:(()=>{const e=new l(16),t=new l(4),s=new l(4);return(n,i,r,a,o)=>{const l=d.inverseMat4(n,e);t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,d.transformVec4(l,t,s),a[0]=s[0],a[1]=s[1],a[2]=s[2],d.transformVec3(l,r,o)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,n,i,r){const a=new l(6),o={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:a};let c,u;for(a[0]=a[1]=a[2]=Number.POSITIVE_INFINITY,a[3]=a[4]=a[5]=Number.NEGATIVE_INFINITY,c=0,u=s.length;ca[3]&&(a[3]=i[t]),i[t+1]a[4]&&(a[4]=i[t+1]),i[t+2]a[5]&&(a[5]=i[t+2])}}if(s.length<20||r>10)return o.triangles=s,o.leaf=!0,o;e[0]=a[3]-a[0],e[1]=a[4]-a[1],e[2]=a[5]-a[2];let p=0;e[1]>e[p]&&(p=1),e[2]>e[p]&&(p=2),o.splitDim=p;const d=(a[p]+a[p+3])/2,A=new Array(s.length);let f=0;const I=new Array(s.length);let m=0;for(c=0,u=s.length;c{const n=e.length/3,i=new Array(n);for(let e=0;e=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t},octDecodeVec2s(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t}};d.buildEdgeIndices=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=d.vec3(),u=d.vec3(),h=d.vec3(),p=d.vec3(),A=d.vec3(),f=d.vec3(),I=d.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}(),d.planeClipsPositions3=function(e,t,s,n=3){for(let i=0,r=s.length;i{this._needsRebuild=!0})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this._needsRebuild=!0}))}get root(){return this._needsRebuild&&this._rebuild(),this._root}_rebuild(){const e=this.viewer.scene;this._root={aabb:e.getAABB()};for(let t in e.objects){const s=e.objects[t];this._insertEntity(this._root,s,1)}this._needsRebuild=!1}_insertEntity(e,t,s){const n=t.aabb;if(s>=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&d.containsAABB3(e.left.aabb,n))return void this._insertEntity(e.left,t,s+1);if(e.right&&d.containsAABB3(e.right.aabb,n))return void this._insertEntity(e.right,t,s+1);const i=e.aabb;A[0]=i[3]-i[0],A[1]=i[4]-i[1],A[2]=i[5]-i[2];let r=0;if(A[1]>A[r]&&(r=1),A[2]>A[r]&&(r=2),!e.left){const a=i.slice();if(a[r+3]=(i[r]+i[r+3])/2,e.left={aabb:a},d.containsAABB3(a,n))return void this._insertEntity(e.left,t,s+1)}if(!e.right){const a=i.slice();if(a[r]=(i[r]+i[r+3])/2,e.right={aabb:a},d.containsAABB3(a,n))return void this._insertEntity(e.right,t,s+1)}e.entities=e.entities||[],e.entities.push(t)}destroy(){const e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}class I{constructor(){this._head=[],this._headLength=0,this._tail=[],this._index=0,this._length=0}get length(){return this._length}shift(){if(this._index>=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}}const m={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var y=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),n=s+e[1],i=s;i{};t=t||n,s=s||n;var i=new XMLHttpRequest;i.overrideMimeType("application/json"),i.open("GET",e,!0),i.addEventListener("load",(function(e){var n=e.target.response;if(200===this.status){var i;try{i=JSON.parse(n)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(i)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(n))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),i.addEventListener("error",(function(e){s(e)}),!1),i.send(null)},loadArraybuffer:function(e,t,s){var n=e=>{};t=t||n,s=s||n;const i=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(i){const e=!!i[2];var r=i[3];r=window.decodeURIComponent(r),e&&(r=window.atob(r));try{const e=new ArrayBuffer(r.length),s=new Uint8Array(e);for(var a=0;a{t(e)}))}catch(e){B.scheduleTask((()=>{s(e)}))}}else{const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t(n.response):s("loadArrayBuffer error : "+n.response))},n.send(null)}},queryString:w,isArray:function(e){return e&&!e.propertyIsEnumerable("length")&&"object"==typeof e&&"number"==typeof e.length},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isID:function(e){return g.isString(e)||g.isNumeric(e)},isSameComponent:function(e,t){return!(!e||!t)&&(g.isNumeric(e)||g.isString(e)?`${e}`:e.id)===(g.isNumeric(t)||g.isString(t)?`${t}`:t.id)},isFunction:function(e){return"function"==typeof e},isObject:function(e){const t={}.constructor;return!!e&&e.constructor===t},copy:function(e){return g.apply(e,{})},apply:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t},apply2:function(e,t){for(const s in e)e.hasOwnProperty(s)&&void 0!==e[s]&&null!==e[s]&&(t[s]=e[s]);return t},applyIf:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(void 0!==t[s]&&null!==t[s]||(t[s]=e[s]));return t},isEmptyObject:function(e){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0},inQuotes:function(e){return g.isNumeric(e)?`${e}`:`'${e}'`},concat:function(e,t){const s=new e.constructor(e.length+t.length);return s.set(e),s.set(t,e.length),s},flattenParentChildHierarchy:function(e){var t=[];return function e(s){s.id=s.uuid,delete s.oid,t.push(s);var n=s.children;if(n)for(var i=0,r=n.length;i{T.removeItem(e.id),delete B.scenes[e.id],delete E[e.id],m.components.scenes--}))},this.clear=function(){let e;for(const t in B.scenes)B.scenes.hasOwnProperty(t)&&(e=B.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete B.scenes[e.id]))},this.scheduleTask=function(e,t=null){b.push(e),b.push(t)},this.runTasks=function(e=-1){let t,s,n=(new Date).getTime(),i=0;for(;b.length>0&&(e<0||n0&&C>0){var t=1e3/C;R+=t,P.push(t),P.length>=30&&(R-=P.shift()),m.frame.fps=Math.round(R/P.length)}for(let e in B.scenes)B.scenes[e].compile();N(e),_=e};new class{worker=null;constructor(e,t){const s=new Blob([`setInterval(() => postMessage(0), ${t});`]),n=URL.createObjectURL(s);this.worker=new Worker(n),this.worker.onmessage=e}stop(){this.worker.terminate()}}(O,100);const S=function(){let e=Date.now();if(C=e-_,_>0&&C>0){var t=1e3/C;R+=t,P.push(t),P.length>=30&&(R-=P.shift()),m.frame.fps=Math.round(R/P.length)}N(e),function(e){for(var t in D.time=e,B.scenes)if(B.scenes.hasOwnProperty(t)){var s=B.scenes[t];D.sceneId=t,D.startTime=s.startTime,D.deltaTime=null!=D.prevTime?D.time-D.prevTime:0,s.fire("tick",D,!0)}D.prevTime=e}(e),function(){const e=B.scenes,t=!1;let s,n,i,r,a;for(a in e)e.hasOwnProperty(a)&&(s=e[a],n=E[a],n||(n=E[a]={}),i=s.ticksPerOcclusionTest,n.ticksPerOcclusionTest!==i&&(n.ticksPerOcclusionTest=i,n.renderCountdown=i),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=i),r=s.ticksPerRender,n.ticksPerRender!==r&&(n.ticksPerRender=r,n.renderCountdown=r),0==--n.renderCountdown&&(s.render(t),n.renderCountdown=r))}(),void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(O):requestAnimationFrame(S)};function N(e){const t=B.runTasks(e+10),s=B.getNumTasks();m.frame.tasksRun=t,m.frame.tasksScheduled=s,m.frame.tasksBudget=10}S();class x{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof x))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];let i;if(n)for(const s in n)n.hasOwnProperty(s)&&(i=n[s],this._eventCallDepth++,this._eventCallDepth<300?i.callback.call(i.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let i=this._eventSubs[t];i?this._eventSubsNum[t]++:(i={},this._eventSubs[t]=i,this._eventSubsNum[t]=1);const r=this._subIdMap.addItem();i[r]={callback:s,scope:n||this},this._subIdEvents[r]=t;const a=this._events[t];return void 0!==a&&s.call(n||this,a),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const n=this,i=this.on(e,(function(e){n.off(i),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+g.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const n=e.sceneDefault,i=e.sceneSingleton,r=e.type,a=e.on,o=!1!==e.recompiles;if(s&&(g.isNumeric(s)||g.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+g.inQuotes(e))}if(!s)if(!0===i){const e=this.scene.types[r];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===n&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+g.inQuotes(s.id));if(r&&!s.isType(r))return void this.error("Expected a "+r+" type or subtype: "+s.type+" "+g.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let c,u,h;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(c=e.subs,u=0,h=c.length;u{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():B.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}scheduleTask(e){B.scheduleTask(e,null)}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,n,i,r;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,n=t.subs,i=0,r=n.length;i=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class U{constructor(){this.planes=[new H,new H,new H,new H,new H,new H]}}function G(e,t,s){const n=d.mulMat4(s,t,F),i=n[0],r=n[1],a=n[2],o=n[3],l=n[4],c=n[5],u=n[6],h=n[7],p=n[8],A=n[9],f=n[10],I=n[11],m=n[12],y=n[13],v=n[14],w=n[15];e.planes[0].set(o-i,h-l,I-p,w-m),e.planes[1].set(o+i,h+l,I+p,w+m),e.planes[2].set(o-r,h-c,I-A,w-y),e.planes[3].set(o+r,h+c,I+A,w+y),e.planes[4].set(o-a,h-u,I-f,w-v),e.planes[5].set(o+a,h+u,I+f,w+v)}function j(e,t){let s=U.INSIDE;const n=L,i=M;n[0]=t[0],n[1]=t[1],n[2]=t[2],i[0]=t[3],i[1]=t[4],i[2]=t[5];const r=[n,i];for(let t=0;t<6;++t){const n=e.planes[t];if(n.normal[0]*r[n.testVertex[0]][0]+n.normal[1]*r[n.testVertex[1]][1]+n.normal[2]*r[n.testVertex[2]][2]+n.offset<0)return U.OUTSIDE;n.normal[0]*r[1-n.testVertex[0]][0]+n.normal[1]*r[1-n.testVertex[1]][1]+n.normal[2]*r[1-n.testVertex[2]][2]+n.offset<0&&(s=U.INTERSECT)}return s}U.INSIDE=0,U.INTERSECT=1,U.OUTSIDE=2;class V extends x{constructor(e={}){if(!e.viewer)throw"[MarqueePicker] Missing config: viewer";if(!e.objectsKdTree3)throw"[MarqueePicker] Missing config: objectsKdTree3";super(e.viewer.scene,e),this.viewer=e.viewer,this._objectsKdTree3=e.objectsKdTree3,this._canvasMarqueeCorner1=d.vec2(),this._canvasMarqueeCorner2=d.vec2(),this._canvasMarquee=d.AABB2(),this._marqueeFrustum=new U,this._marqueeFrustumProjMat=d.mat4(),this._pickMode=!1,this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement),this._marqueeElement.style.position="absolute",this._marqueeElement.style["z-index"]="40000005",this._marqueeElement.style.width="8px",this._marqueeElement.style.height="8px",this._marqueeElement.style.visibility="hidden",this._marqueeElement.style.top="0px",this._marqueeElement.style.left="0px",this._marqueeElement.style["box-shadow"]="0 2px 5px 0 #182A3D;",this._marqueeElement.style.opacity=1,this._marqueeElement.style["pointer-events"]="none"}setMarqueeCorner1(e){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarqueeCorner2(e){this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarquee(e,t){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(t),this._updateMarquee()}setMarqueeVisible(e){this._marqueVisible=e,this._marqueeElement.style.visibility=e?"visible":"hidden"}getMarqueeVisible(){return this._marqueVisible}setPickMode(e){if(e!==V.PICK_MODE_INSIDE&&e!==V.PICK_MODE_INTERSECTS)throw"Illegal MarqueePicker pickMode: must be MarqueePicker.PICK_MODE_INSIDE or MarqueePicker.PICK_MODE_INTERSECTS";e!==this._pickMode&&(this._marqueeElement.style["background-image"]=e===V.PICK_MODE_INSIDE?"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4'/%3e%3c/svg%3e\")":"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e\")",this._pickMode=e)}getPickMode(){return this._pickMode}clear(){this.fire("clear",{})}pick(){this._updateMarquee(),this._buildMarqueeFrustum();const e=[],t=(s,n=U.INTERSECT)=>{if(n===U.INTERSECT&&(n=j(this._marqueeFrustum,s.aabb)),n!==U.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,n=t.length;s3||this._canvasMarquee[3]-this._canvasMarquee[1]>3)&&t(this._objectsKdTree3.root),this.fire("picked",e),e}_updateMarquee(){this._canvasMarquee[0]=Math.min(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[1]=Math.min(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._canvasMarquee[2]=Math.max(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[3]=Math.max(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._marqueeElement.style.width=this._canvasMarquee[2]-this._canvasMarquee[0]+"px",this._marqueeElement.style.height=this._canvasMarquee[3]-this._canvasMarquee[1]+"px",this._marqueeElement.style.left=`${this._canvasMarquee[0]}px`,this._marqueeElement.style.top=`${this._canvasMarquee[1]}px`}_buildMarqueeFrustum(){const e=this.viewer.scene.canvas.canvas,t=e.clientWidth,s=e.clientHeight,n=e.clientLeft,i=e.clientTop,r=2/t,a=2/s,o=e.clientHeight/e.clientWidth,l=(this._canvasMarquee[0]-n)*r-1,c=(this._canvasMarquee[2]-n)*r-1,u=-(this._canvasMarquee[3]-i)*a+1,h=-(this._canvasMarquee[1]-i)*a+1,p=this.viewer.scene.camera.frustum.near*(17*o);d.frustumMat4(l,c,u*o,h*o,p,1e4,this._marqueeFrustumProjMat),G(this._marqueeFrustum,this.viewer.scene.camera.viewMatrix,this._marqueeFrustumProjMat)}destroy(){super.destroy(),this._marqueeElement.parentElement&&(this._marqueeElement.parentElement.removeChild(this._marqueeElement),this._marqueeElement=null,this._objectsKdTree3=null)}}V.PICK_MODE_INTERSECTS=0,V.PICK_MODE_INSIDE=1;class k extends x{constructor(e){super(e.marqueePicker,e);const t=e.marqueePicker,s=t.viewer.scene.canvas.canvas;let n,i,r,a,o,l,c,u=!1,h=!1,p=!1;s.addEventListener("mousedown",(e=>{this.getActive()&&0===e.button&&(c=setTimeout((function(){const r=t.viewer.scene.input;r.keyDown[r.KEY_CTRL]||t.clear(),n=e.pageX,i=e.pageY,o=e.offsetX,t.setMarqueeCorner1([n,i]),u=!0,t.viewer.cameraControl.pointerEnabled=!1,t.setMarqueeVisible(!0),s.style.cursor="crosshair"}),400),h=!0)})),s.addEventListener("mouseup",(e=>{if(!this.getActive())return;if(!u&&!p)return;if(0!==e.button)return;clearTimeout(c),r=e.pageX,a=e.pageY;const s=Math.abs(r-n),o=Math.abs(a-i);u=!1,t.viewer.cameraControl.pointerEnabled=!0,p&&(p=!1),(s>3||o>3)&&t.pick()})),document.addEventListener("mouseup",(e=>{this.getActive()&&0===e.button&&(clearTimeout(c),u&&(t.setMarqueeVisible(!1),u=!1,h=!1,p=!0,t.viewer.cameraControl.pointerEnabled=!0))}),!0),s.addEventListener("mousemove",(e=>{this.getActive()&&0===e.button&&h&&(clearTimeout(c),u&&(r=e.pageX,a=e.pageY,l=e.offsetX,t.setMarqueeVisible(!0),t.setMarqueeCorner2([r,a]),t.setPickMode(o0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}const W=d.vec3(),z=function(){const e=new Float64Array(16),t=new Float64Array(4),s=new Float64Array(4);return function(n,i,r){return r=r||e,t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,d.transformVec4(n,t,s),d.setMat4Translation(n,s,r),r.slice()}}();function K(e,t,s){const n=Float32Array.from([e[0]])[0],i=e[0]-n,r=Float32Array.from([e[1]])[0],a=e[1]-r,o=Float32Array.from([e[2]])[0],l=e[2]-o;t[0]=n,t[1]=r,t[2]=o,s[0]=i,s[1]=a,s[2]=l}function Y(e,t,s,n=1e3){const i=d.getPositionsCenter(e,W),r=Math.round(i[0]/n)*n,a=Math.round(i[1]/n)*n,o=Math.round(i[2]/n)*n;s[0]=r,s[1]=a,s[2]=o;const l=0!==s[0]||0!==s[1]||0!==s[2];if(l)for(let s=0,n=e.length;s0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let n=255;if(t){if(e<0?e=0:e>1&&(e=1),n=Math.floor(255*e),s===n)return}else if(n=255,s===n)return;for(let e=0,t=this.meshes.length;e{this._viewPosDirty=!0,this._needUpdate()})),this._onCameraProjMatrix=this.scene.camera.on("projMatrix",(()=>{this._canvasPosDirty=!0,this._needUpdate()})),this._onEntityDestroyed=null,this._onEntityModelDestroyed=null,this._renderer.addMarker(this),this.entity=t.entity,this.worldPos=t.worldPos,this.occludable=t.occludable}_update(){if(this._viewPosDirty&&(d.transformPoint3(this.scene.camera.viewMatrix,this._worldPos,this._viewPos),this._viewPosDirty=!1,this._canvasPosDirty=!0,this.fire("viewPos",this._viewPos)),this._canvasPosDirty){ce.set(this._viewPos),ce[3]=1,d.transformPoint4(this.scene.camera.projMatrix,ce,ue);const e=this.scene.canvas.boundary;this._canvasPos[0]=Math.floor((1+ue[0]/ue[3])*e[2]/2),this._canvasPos[1]=Math.floor((1-ue[1]/ue[3])*e[3]/2),this._canvasPosDirty=!1,this.fire("canvasPos",this._canvasPos)}}_setVisible(e){this._visible,this._visible=e,this.fire("visible",this._visible)}set entity(e){if(this._entity){if(this._entity===e)return;null!==this._onEntityDestroyed&&(this._entity.off(this._onEntityDestroyed),this._onEntityDestroyed=null),null!==this._onEntityModelDestroyed&&(this._entity.model.off(this._onEntityModelDestroyed),this._onEntityModelDestroyed=null)}this._entity=e,this._entity&&(this._entity instanceof le?this._onEntityModelDestroyed=this._entity.model.on("destroyed",(()=>{this._entity=null,this._onEntityModelDestroyed=null})):this._onEntityDestroyed=this._entity.on("destroyed",(()=>{this._entity=null,this._onEntityDestroyed=null}))),this.fire("entity",this._entity,!0)}get entity(){return this._entity}set occludable(e){(e=!!e)!==this._occludable&&(this._occludable=e)}get occludable(){return this._occludable}set worldPos(e){this._worldPos.set(e||[0,0,0]),K(this._worldPos,this._origin,this._rtcPos),this._occludable&&this._renderer.markerWorldPosUpdated(this),this._viewPosDirty=!0,this.fire("worldPos",this._worldPos),this._needUpdate()}get worldPos(){return this._worldPos}get origin(){return this._origin}get rtcPos(){return this._rtcPos}get viewPos(){return this._update(),this._viewPos}get canvasPos(){return this._update(),this._canvasPos}get visible(){return!!this._visible}destroy(){this.fire("destroyed",!0),this.scene.camera.off(this._onCameraViewMatrix),this.scene.camera.off(this._onCameraProjMatrix),this._entity&&(null!==this._onEntityDestroyed&&this._entity.off(this._onEntityDestroyed),null!==this._onEntityModelDestroyed&&this._entity.model.off(this._onEntityModelDestroyed)),this._renderer.removeMarker(this),super.destroy()}}class pe{constructor(e,t={}){this._color=t.color||"black",this._highlightClass="viewer-ruler-wire-highlighted",this._wire=document.createElement("div"),this._wire.className+=this._wire.className?" viewer-ruler-wire":"viewer-ruler-wire",this._wireClickable=document.createElement("div"),this._wireClickable.className+=this._wireClickable.className?" viewer-ruler-wire-clickable":"viewer-ruler-wire-clickable",this._thickness=t.thickness||1,this._thicknessClickable=t.thicknessClickable||6,this._visible=!0,this._culled=!1;var s=this._wire,n=s.style;n.border="solid "+this._thickness+"px "+this._color,n.position="absolute",n["z-index"]=void 0===t.zIndex?"2000001":t.zIndex,n.width="0px",n.height="0px",n.visibility="visible",n.top="0px",n.left="0px",n["-webkit-transform-origin"]="0 0",n["-moz-transform-origin"]="0 0",n["-ms-transform-origin"]="0 0",n["-o-transform-origin"]="0 0",n["transform-origin"]="0 0",n["-webkit-transform"]="rotate(0deg)",n["-moz-transform"]="rotate(0deg)",n["-ms-transform"]="rotate(0deg)",n["-o-transform"]="rotate(0deg)",n.transform="rotate(0deg)",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._wireClickable,r=i.style;r.border="solid "+this._thicknessClickable+"px "+this._color,r.position="absolute",r["z-index"]=void 0===t.zIndex?"2000002":t.zIndex+1,r.width="0px",r.height="0px",r.visibility="visible",r.top="0px",r.left="0px",r["-webkit-transform-origin"]="0 0",r["-moz-transform-origin"]="0 0",r["-ms-transform-origin"]="0 0",r["-o-transform-origin"]="0 0",r["transform-origin"]="0 0",r["-webkit-transform"]="rotate(0deg)",r["-moz-transform"]="rotate(0deg)",r["-ms-transform"]="rotate(0deg)",r["-o-transform"]="rotate(0deg)",r.transform="rotate(0deg)",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),t.onMouseOver&&i.addEventListener("mouseover",(e=>{t.onMouseOver(e,this)})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this._x1=0,this._y1=0,this._x2=0,this._y2=0,this._update()}get visible(){return"visible"===this._wire.style.visibility}_update(){var e=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2))),t=180*Math.atan2(this._y2-this._y1,this._x2-this._x1)/Math.PI,s=this._wire.style;s.width=Math.round(e)+"px",s.left=Math.round(this._x1)+"px",s.top=Math.round(this._y1)+"px",s["-webkit-transform"]="rotate("+t+"deg)",s["-moz-transform"]="rotate("+t+"deg)",s["-ms-transform"]="rotate("+t+"deg)",s["-o-transform"]="rotate("+t+"deg)",s.transform="rotate("+t+"deg)";var n=this._wireClickable.style;n.width=Math.round(e)+"px",n.left=Math.round(this._x1)+"px",n.top=Math.round(this._y1)+"px",n["-webkit-transform"]="rotate("+t+"deg)",n["-moz-transform"]="rotate("+t+"deg)",n["-ms-transform"]="rotate("+t+"deg)",n["-o-transform"]="rotate("+t+"deg)",n.transform="rotate("+t+"deg)"}setStartAndEnd(e,t,s,n){this._x1=e,this._y1=t,this._x2=s,this._y2=n,this._update()}setColor(e){this._color=e||"black",this._wire.style.border="solid "+this._thickness+"px "+this._color}setOpacity(e){this._wire.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._wireClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._wire.classList.add(this._highlightClass):this._wire.classList.remove(this._highlightClass))}destroy(e){this._wire.parentElement&&this._wire.parentElement.removeChild(this._wire),this._wireClickable.parentElement&&this._wireClickable.parentElement.removeChild(this._wireClickable)}}class de{constructor(e,t={}){this._highlightClass="viewer-ruler-dot-highlighted",this._x=0,this._y=0,this._visible=!0,this._dot=document.createElement("div"),this._dot.className+=this._dot.className?" viewer-ruler-dot":"viewer-ruler-dot",this._dotClickable=document.createElement("div"),this._dotClickable.className+=this._dotClickable.className?" viewer-ruler-dot-clickable":"viewer-ruler-dot-clickable",this._visible=!0,this._culled=!1;var s=this._dot,n=s.style;n["border-radius"]="25px",n.border="solid 2px white",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"40000005":t.zIndex,n.width="8px",n.height="8px",n.visibility=!1!==t.visible?"visible":"hidden",n.top="0px",n.left="0px",n["box-shadow"]="0 2px 5px 0 #182A3D;",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._dotClickable,r=i.style;r["border-radius"]="35px",r.border="solid 10px white",r.position="absolute",r["z-index"]=void 0===t.zIndex?"40000007":t.zIndex+1,r.width="8px",r.height="8px",r.visibility="visible",r.top="0px",r.left="0px",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),i.addEventListener("click",(t=>{e.dispatchEvent(new MouseEvent("mouseover",t))})),t.onMouseOver&&i.addEventListener("mouseover",(s=>{t.onMouseOver(s,this),e.dispatchEvent(new MouseEvent("mouseover",s))})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.borderColor)}setPos(e,t){this._x=e,this._y=t;var s=this._dot.style;s.left=Math.round(e)-4+"px",s.top=Math.round(t)-4+"px";var n=this._dotClickable.style;n.left=Math.round(e)-9+"px",n.top=Math.round(t)-9+"px"}setFillColor(e){this._dot.style.background=e||"lightgreen"}setBorderColor(e){this._dot.style.border="solid 2px"+(e||"black")}setOpacity(e){this._dot.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._dotClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._dot.classList.add(this._highlightClass):this._dot.classList.remove(this._highlightClass))}destroy(){this.setVisible(!1),this._dot.parentElement&&this._dot.parentElement.removeChild(this._dot),this._dotClickable.parentElement&&this._dotClickable.parentElement.removeChild(this._dotClickable)}}class Ae{constructor(e,t={}){this._highlightClass="viewer-ruler-label-highlighted",this._prefix=t.prefix||"",this._x=0,this._y=0,this._visible=!0,this._culled=!1,this._label=document.createElement("div"),this._label.className+=this._label.className?" viewer-ruler-label":"viewer-ruler-label";var s=this._label,n=s.style;n["border-radius"]="5px",n.color="white",n.padding="4px",n.border="solid 1px",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"5000005":t.zIndex,n.width="auto",n.height="auto",n.visibility="visible",n.top="0px",n.left="0px",n["pointer-events"]="all",n.opacity=1,t.onContextMenu,s.innerText="",e.appendChild(s),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.fillColor),this.setText(t.text),t.onMouseOver&&s.addEventListener("mouseover",(e=>{t.onMouseOver(e,this),e.preventDefault()})),t.onMouseLeave&&s.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this),e.preventDefault()})),t.onMouseWheel&&s.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&s.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&s.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&s.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&s.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()}))}setPos(e,t){this._x=e,this._y=t;var s=this._label.style;s.left=Math.round(e)-20+"px",s.top=Math.round(t)-12+"px"}setPosOnWire(e,t,s,n){var i=e+.5*(s-e),r=t+.5*(n-t),a=this._label.style;a.left=Math.round(i)-20+"px",a.top=Math.round(r)-12+"px"}setPosBetweenWires(e,t,s,n,i,r){var a=(e+s+i)/3,o=(t+n+r)/3,l=this._label.style;l.left=Math.round(a)-20+"px",l.top=Math.round(o)-12+"px"}setText(e){this._label.innerHTML=this._prefix+(e||"")}setFillColor(e){this._fillColor=e||"lightgreen",this._label.style.background=this._fillColor}setBorderColor(e){this._borderColor=e||"black",this._label.style.border="solid 1px "+this._borderColor}setOpacity(e){this._label.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._label.classList.add(this._highlightClass):this._label.classList.remove(this._highlightClass))}setClickable(e){this._label.style["pointer-events"]=e?"all":"none"}destroy(){this._label.parentElement&&this._label.parentElement.removeChild(this._label)}}var fe=d.vec3(),Ie=d.vec3();class me extends x{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._color=t.color||e.defaultColor;var s=this.plugin.viewer.scene;this._originMarker=new he(s,t.origin),this._cornerMarker=new he(s,t.corner),this._targetMarker=new he(s,t.target),this._originWorld=d.vec3(),this._cornerWorld=d.vec3(),this._targetWorld=d.vec3(),this._wp=new Float64Array(12),this._vp=new Float64Array(12),this._pp=new Float64Array(12),this._cp=new Int16Array(6);const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},l=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))};this._originDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._cornerDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._originWire=new pe(this._container,{color:this._color||"blue",thickness:1,zIndex:e.zIndex,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetWire=new pe(this._container,{color:this._color||"red",thickness:1,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._angleLabel=new Ae(this._container,{fillColor:this._color||"#00BBFF",prefix:"",text:"",zIndex:e.zIndex+2,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._visible=!1,this._originVisible=!1,this._cornerVisible=!1,this._targetVisible=!1,this._originWireVisible=!1,this._targetWireVisible=!1,this._angleVisible=!1,this._labelsVisible=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._cornerMarker.on("worldPos",(e=>{this._cornerWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.cornerVisible=t.cornerVisible,this.targetVisible=t.targetVisible,this.originWireVisible=t.originWireVisible,this.targetWireVisible=t.targetWireVisible,this.angleVisible=t.angleVisible,this.labelsVisible=t.labelsVisible}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._cornerWorld[0],this._wp[5]=this._cornerWorld[1],this._wp[6]=this._cornerWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._targetWorld[2],this._wp[11]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(d.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._angleLabel.setCulled(!0),this._originWire.setCulled(!0),this._targetWire.setCulled(!0),this._originDot.setCulled(!0),this._cornerDot.setCulled(!0),void this._targetDot.setCulled(!0);this._angleLabel.setCulled(!1),this._originWire.setCulled(!1),this._targetWire.setCulled(!1),this._originDot.setCulled(!1),this._cornerDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}if(this._cpDirty){const p=-.3,A=this._originMarker.viewPos[2],f=this._cornerMarker.viewPos[2],I=this._targetMarker.viewPos[2];if(A>p||f>p||I>p)return this._originDot.setVisible(!1),this._cornerDot.setVisible(!1),this._targetDot.setVisible(!1),this._originWire.setVisible(!1),this._targetWire.setVisible(!1),void this._angleLabel.setCulled(!0);d.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var t=this._pp,s=this._cp,n=e.canvas.canvas.getBoundingClientRect();const m=this._container.getBoundingClientRect();for(var i=n.top-m.top,r=n.left-m.left,a=e.canvas.boundary,o=a[2],l=a[3],c=0,u=0,h=t.length;u{e.snappedToVertex||e.snappedToEdge?(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!0),this.markerDiv.style.background="greenyellow",this.markerDiv.style.border="2px solid green"):(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.canvasPos,n.snapped=!1),this.markerDiv.style.background="pink",this.markerDiv.style.border="2px solid red");const s=e.snappedCanvasPos||e.canvasPos;switch(i=!0,r=e.entity,l.set(e.worldPos),c.set(s),this._mouseState){case 0:const n=t.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=n.left+i,o=n.top+r;this.markerDiv.style.marginLeft=a+s[0]-5+"px",this.markerDiv.style.marginTop=o+s[1]-5+"px";break;case 1:this._currentAngleMeasurement&&(this._currentAngleMeasurement.originWireVisible=!0,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.cornerVisible=!0,this._currentAngleMeasurement.angleVisible=!1,this._currentAngleMeasurement.corner.worldPos=e.worldPos,this._currentAngleMeasurement.corner.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer";break;case 2:this._currentAngleMeasurement&&(this._currentAngleMeasurement.targetWireVisible=!0,this._currentAngleMeasurement.targetVisible=!0,this._currentAngleMeasurement.angleVisible=!0,this._currentAngleMeasurement.target.worldPos=e.worldPos,this._currentAngleMeasurement.target.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer"}})),t.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(a=e.clientX,o=e.clientY)}),t.addEventListener("mouseup",this._onMouseUp=e=>{if(1===e.which&&!(e.clientX>a+20||e.clientXo+20||e.clientY{if(i=!1,n&&(n.visible=!0,n.pointerPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!1),this.markerDiv.style.marginLeft="-100px",this.markerDiv.style.marginTop="-100px",this._currentAngleMeasurement){switch(this._mouseState){case 0:this._currentAngleMeasurement.originVisible=!1;break;case 1:this._currentAngleMeasurement.cornerVisible=!1,this._currentAngleMeasurement.originWireVisible=!1,this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1;break;case 2:this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1}t.style.cursor="default"}})),this._active=!0}deactivate(){if(!this._active)return;this.pointerLens&&(this.pointerLens.visible=!1),this.markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.angleMeasurementsPlugin.viewer.cameraControl;t.off(this._onMouseHoverSurface),t.off(this._onPickedSurface),t.off(this._onHoverNothing),t.off(this._onPickedNothing),this._currentAngleMeasurement=null,this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentAngleMeasurement&&(this._currentAngleMeasurement.destroy(),this._currentAngleMeasurement=null),this._mouseState=0)}destroy(){this.deactivate(),super.destroy()}}class we extends Q{constructor(e,t={}){super("AngleMeasurements",e),this._container=t.container||document.body,this._defaultControl=null,this._measurements={},this.defaultColor=void 0!==t.defaultColor?t.defaultColor:"#00BBFF",this.defaultLabelsVisible=!1!==t.defaultLabelsVisible,this.zIndex=t.zIndex||1e4,this._onMouseOver=(e,t)=>{this.fire("mouseOver",{plugin:this,angleMeasurement:t,measurement:t,event:e})},this._onMouseLeave=(e,t)=>{this.fire("mouseLeave",{plugin:this,angleMeasurement:t,measurement:t,event:e})},this._onContextMenu=(e,t)=>{this.fire("contextMenu",{plugin:this,angleMeasurement:t,measurement:t,event:e})}}getContainerElement(){return this._container}send(e,t){}get control(){return this._defaultControl||(this._defaultControl=new ve(this,{})),this._defaultControl}get measurements(){return this._measurements}createMeasurement(e={}){this.viewer.scene.components[e.id]&&(this.error("Viewer scene component with this ID already exists: "+e.id),delete e.id);const t=e.origin,s=e.corner,n=e.target,i=new me(this,{id:e.id,plugin:this,container:this._container,origin:{entity:t.entity,worldPos:t.worldPos},corner:{entity:s.entity,worldPos:s.worldPos},target:{entity:n.entity,worldPos:n.worldPos},visible:e.visible,originVisible:!0,originWireVisible:!0,cornerVisible:!0,targetWireVisible:!0,targetVisible:!0,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[i.id]=i,i.on("destroyed",(()=>{delete this._measurements[i.id]})),i.clickable=!0,this.fire("measurementCreated",i),i}destroyMeasurement(e){const t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("AngleMeasurement not found: "+e)}setLabelsShown(e){for(const[t,s]of Object.entries(this.measurements))s.labelShown=e}clear(){const e=Object.keys(this._measurements);for(var t=0,s=e.length;t{this.plugin.fire("markerClicked",this)}),this._marker.addEventListener("mouseenter",this._onMouseEnterExternalMarker=()=>{this.plugin.fire("markerMouseEnter",this)}),this._marker.addEventListener("mouseleave",this._onMouseLeaveExternalMarker=()=>{this.plugin.fire("markerMouseLeave",this)}),this._markerExternal=!0):(this._markerHTML=t.markerHTML,this._htmlDirty=!0,this._markerExternal=!1),t.labelElement?(this._label=t.labelElement,this._labelExternal=!0):(this._labelHTML=t.labelHTML,this._htmlDirty=!0,this._labelExternal=!1),this._markerShown=!!t.markerShown,this._labelShown=!!t.labelShown,this._values=t.values||{},this._layoutDirty=!0,this._visibilityDirty=!0,this._buildHTML(),this._onTick=this.scene.on("tick",(()=>{this._htmlDirty&&(this._buildHTML(),this._htmlDirty=!1,this._layoutDirty=!0,this._visibilityDirty=!0),(this._layoutDirty||this._visibilityDirty)&&(this._markerShown||this._labelShown)&&(this._updatePosition(),this._layoutDirty=!1),this._visibilityDirty&&(this._marker.style.visibility=this.visible&&this._markerShown?"visible":"hidden",this._label.style.visibility=this.visible&&this._markerShown&&this._labelShown?"visible":"hidden",this._visibilityDirty=!1)})),this.on("canvasPos",(()=>{this._layoutDirty=!0})),this.on("visible",(()=>{this._visibilityDirty=!0})),this.setMarkerShown(!1!==t.markerShown),this.setLabelShown(t.labelShown),this.eye=t.eye?t.eye.slice():null,this.look=t.look?t.look.slice():null,this.up=t.up?t.up.slice():null,this.projection=t.projection}_buildHTML(){if(!this._markerExternal){this._marker&&(this._container.removeChild(this._marker),this._marker=null);let e=this._markerHTML||"

";g.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._marker=t.firstChild,this._container.appendChild(this._marker),this._marker.style.visibility=this._markerShown?"visible":"hidden",this._marker.addEventListener("click",(()=>{this.plugin.fire("markerClicked",this)})),this._marker.addEventListener("mouseenter",(()=>{this.plugin.fire("markerMouseEnter",this)})),this._marker.addEventListener("mouseleave",(()=>{this.plugin.fire("markerMouseLeave",this)})),this._marker.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}if(!this._labelExternal){this._label&&(this._container.removeChild(this._label),this._label=null);let e=this._labelHTML||"

";g.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._label=t.firstChild,this._container.appendChild(this._label),this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden",this._label.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}}_updatePosition(){const e=this.scene.canvas.boundary,t=e[0],s=e[1],n=this.canvasPos;this._marker.style.left=Math.floor(t+n[0])-12+"px",this._marker.style.top=Math.floor(s+n[1])-12+"px",this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;this._label.style.left=20+Math.floor(t+n[0]+20)+"px",this._label.style.top=Math.floor(s+n[1]+-17)+"px",this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1}_renderTemplate(e){for(var t in this._values)if(this._values.hasOwnProperty(t)){const s=this._values[t];e=e.replace(new RegExp("{{"+t+"}}","g"),s)}return e}setMarkerShown(e){e=!!e,this._markerShown!==e&&(this._markerShown=e,this._visibilityDirty=!0)}getMarkerShown(){return this._markerShown}setLabelShown(e){e=!!e,this._labelShown!==e&&(this._labelShown=e,this._visibilityDirty=!0)}getLabelShown(){return this._labelShown}setField(e,t){this._values[e]=t||"",this._htmlDirty=!0}getField(e){return this._values[e]}setValues(e){for(var t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setField(t,s)}}getValues(){return this._values}destroy(){this._marker&&(this._markerExternal?(this._marker.removeEventListener("click",this._onMouseClickedExternalMarker),this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker),this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker),this._marker=null):this._marker.parentNode.removeChild(this._marker)),this._label&&(this._labelExternal||this._label.parentNode.removeChild(this._label),this._label=null),this.scene.off(this._onTick),super.destroy()}}const Ee=d.vec3(),Te=d.vec3(),be=d.vec3();class De extends Q{constructor(e,t){super("Annotations",e),this._labelHTML=t.labelHTML||"
",this._markerHTML=t.markerHTML||"
",this._container=t.container||document.body,this._values=t.values||{},this.annotations={},this.surfaceOffset=t.surfaceOffset}getContainerElement(){return this._container}send(e,t){if("clearAnnotations"===e)this.clear()}set surfaceOffset(e){null==e&&(e=.3),this._surfaceOffset=e}get surfaceOffset(){return this._surfaceOffset}createAnnotation(e){var t,s;if(this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),e.pickResult=e.pickResult||e.pickRecord,e.pickResult){const n=e.pickResult;if(n.worldPos&&n.worldNormal){const e=d.normalizeVec3(n.worldNormal,Ee),i=d.mulVec3Scalar(e,this._surfaceOffset,Te);t=d.addVec3(n.worldPos,i,be),s=n.entity}else this.error("Param 'pickResult' does not have both worldPos and worldNormal")}else t=e.worldPos,s=e.entity;var n=null;e.markerElementId&&((n=document.getElementById(e.markerElementId))||this.error("Can't find DOM element for 'markerElementId' value '"+e.markerElementId+"' - defaulting to internally-generated empty DIV"));var i=null;e.labelElementId&&((i=document.getElementById(e.labelElementId))||this.error("Can't find DOM element for 'labelElementId' value '"+e.labelElementId+"' - defaulting to internally-generated empty DIV"));const r=new ge(this.viewer.scene,{id:e.id,plugin:this,entity:s,worldPos:t,container:this._container,markerElement:n,labelElement:i,markerHTML:e.markerHTML||this._markerHTML,labelHTML:e.labelHTML||this._labelHTML,occludable:e.occludable,values:g.apply(e.values,g.apply(this._values,{})),markerShown:e.markerShown,labelShown:e.labelShown,eye:e.eye,look:e.look,up:e.up,projection:e.projection,visible:!1!==e.visible});return this.annotations[r.id]=r,r.on("destroyed",(()=>{delete this.annotations[r.id],this.fire("annotationDestroyed",r.id)})),this.fire("annotationCreated",r.id),r}destroyAnnotation(e){var t=this.annotations[e];t?t.destroy():this.log("Annotation not found: "+e)}clear(){const e=Object.keys(this.annotations);for(var t=0,s=e.length;t
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const Ce=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class _e extends x{constructor(e,t={}){super(e,t),this._backgroundColor=d.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let n=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(n=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{n&&(n=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new Pe(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+d.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),n=s.style;n.height="100%",n.width="100%",n.padding="0",n.margin="0",n.background="rgba(0,0,0,0);",n.float="left",n.left="0",n.top="0",n.position="absolute",n.opacity="1.0",n["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0?Be.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?Be.FS_MAX_FLOAT_PRECISION="mediump":Be.FS_MAX_FLOAT_PRECISION="lowp":Be.FS_MAX_FLOAT_PRECISION="mediump",Be.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),Be.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),Be.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),Be.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),Be.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Be.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Be.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),Be.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),Be.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),Be.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){Be.SUPPORTED_EXTENSIONS[e]=!0})))}class Se{constructor(){this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._canvasPos=new Int16Array([0,0]),this._snappedCanvasPos=new Int16Array([0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}get canvasPos(){return this._gotCanvasPos?this._canvasPos:null}set canvasPos(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}get origin(){return this._gotOrigin?this._origin:null}set origin(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}get direction(){return this._gotDirection?this._direction:null}set direction(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}get indices(){return this.entity&&this._gotIndices?this._indices:null}set indices(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}get localPos(){return this.entity&&this._gotLocalPos?this._localPos:null}set localPos(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}get snappedCanvasPos(){return this._gotSnappedCanvasPos?this._snappedCanvasPos:null}set snappedCanvasPos(e){e?(this._snappedCanvasPos[0]=e[0],this._snappedCanvasPos[1]=e[1],this._gotSnappedCanvasPos=!0):this._gotSnappedCanvasPos=!1}get worldPos(){return this._gotWorldPos?this._worldPos:null}set worldPos(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}get viewPos(){return this.entity&&this._gotViewPos?this._viewPos:null}set viewPos(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}get bary(){return this.entity&&this._gotBary?this._bary:null}set bary(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}get worldNormal(){return this.entity&&this._gotWorldNormal?this._worldNormal:null}set worldNormal(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}get uv(){return this.entity&&this._gotUV?this._uv:null}set uv(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}reset(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotSnappedCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}class Ne{constructor(e,t,s){if(this.allocated=!1,this.compiled=!1,this.handle=e.createShader(t),this.handle){if(this.allocated=!0,e.shaderSource(this.handle,s),e.compileShader(this.handle),this.compiled=e.getShaderParameter(this.handle,e.COMPILE_STATUS),!this.compiled&&!e.isContextLost()){const t=s.split("\n"),n=[];for(let e=0;e0&&"/"===s.charAt(n+1)&&(s=s.substring(0,n)),t.push(s);return t.join("\n")}function He(e){console.error(e.join("\n"))}class Ue{constructor(e,t){this.id=Me.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new Ne(e,e.VERTEX_SHADER,Fe(this.source.vertex)),this._fragmentShader=new Ne(e,e.FRAGMENT_SHADER,Fe(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void He(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void He(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void He(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void He(this.errors);let t,s,n,i,r;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void He(this.errors);const a=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class je{constructor(e,t){this.scene=e,this.aabb=d.AABB3(),this.origin=d.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const a=s.canvasPos,o=a[0],l=a[1];o+10<0||l+10<0||o-10>n||l-10>i?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[r++]=o,this.pixels[r++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new je(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let n=this._occlusionLayers[s];n||(n=new je(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),n.addMarker(e),this._markersToOcclusionLayersMap[e.id]=n}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// OcclusionTester fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),n.push("}"),n}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new Ue(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=n.sectionPlanes;for(let n=0;n{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=d.mat4();return()=>(e&&d.inverseMat4(n.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,n=this._scene,i=n.sao,r=t.drawingBufferWidth,a=t.drawingBufferHeight,o=n.camera.project._state,l=o.near,c=o.far,u=o.matrix,h=this._getInverseProjectMat(),p=Math.random(),A="perspective"===n.camera.projection;We[0]=r,We[1]=a,t.viewport(0,0,r,a),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,c),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,u),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,h),t.uniform1i(this._uPerspective,A),t.uniform1f(this._uScale,i.scale*(c/5)),t.uniform1f(this._uIntensity,i.intensity),t.uniform1f(this._uBias,i.bias),t.uniform1f(this._uKernelRadius,i.kernelRadius),t.uniform1f(this._uMinResolution,i.minResolution),t.uniform2fv(this._uViewport,We),t.uniform1f(this._uRandomSeed,p);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new Ue(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const n=new Float32Array([1,1,0,1,0,0,1,0]),i=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),r=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ge(s,s.ARRAY_BUFFER,i,i.length,3,s.STATIC_DRAW),this._uvBuf=new Ge(s,s.ARRAY_BUFFER,n,n.length,2,s.STATIC_DRAW),this._indicesBuf=new Ge(s,s.ELEMENT_ARRAY_BUFFER,r,r.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const Ke=new Float32Array($e(17,[0,1])),Ye=new Float32Array($e(17,[1,0])),Xe=new Float32Array(function(e,t){const s=[];for(let n=0;n<=e;n++)s.push(Ze(n,t));return s}(17,4)),qe=new Float32Array(2);class Je{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new Ue(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),n=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ge(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new Ge(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new Ge(e,e.ELEMENT_ARRAY_BUFFER,n,n.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=d.mat4();return()=>(e&&d.inverseMat4(r.camera.projMatrix,t),t)})());const n=this._scene.canvas.gl,i=this._program,r=this._scene,a=n.drawingBufferWidth,o=n.drawingBufferHeight,l=r.camera.project._state,c=l.near,u=l.far;n.viewport(0,0,a,o),n.clearColor(0,0,0,1),n.enable(n.DEPTH_TEST),n.disable(n.BLEND),n.frontFace(n.CCW),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),i.bind(),qe[0]=a,qe[1]=o,n.uniform2fv(this._uViewport,qe),n.uniform1f(this._uCameraNear,c),n.uniform1f(this._uCameraFar,u),n.uniform1f(this._uDepthCutoff,.01),0===s?n.uniform2fv(this._uSampleOffsets,Ye):n.uniform2fv(this._uSampleOffsets,Ke),n.uniform1fv(this._uSampleWeights,Xe);const h=e.getDepthTexture(),p=t.getTexture();i.bindTexture(this._uDepthTexture,h,0),i.bindTexture(this._uOcclusionTexture,p,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),n.drawElements(n.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function Ze(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function $e(e,t){const s=[];for(let n=0;n<=e;n++)s.push(t[0]*n),s.push(t[1]*n);return s}class et{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(...e){if(this._touch(...e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}createTexture(e,t,s=null){const n=this.gl,i=n.createTexture();return n.bindTexture(n.TEXTURE_2D,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),s?n.texStorage2D(n.TEXTURE_2D,1,s,e,t):n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e,t,0,n.RGBA,n.UNSIGNED_BYTE,null),i}_touch(...e){let t,s;const n=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=n.drawingBufferWidth,s=n.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;this.buffer.textures.forEach((e=>n.deleteTexture(e))),n.deleteFramebuffer(this.buffer.framebuf),n.deleteRenderbuffer(this.buffer.renderbuf)}const i=[];let r;e.length>0?i.push(...e.map((e=>this.createTexture(t,s,e)))):i.push(this.createTexture(t,s)),this._hasDepthTexture&&(r=n.createTexture(),n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texImage2D(n.TEXTURE_2D,0,n.DEPTH_COMPONENT32F,t,s,0,n.DEPTH_COMPONENT,n.FLOAT,null));const a=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,a),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT32F,t,s);const o=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,o);for(let e=0;e0&&n.drawBuffers(i.map(((e,t)=>n.COLOR_ATTACHMENT0+t))),this._hasDepthTexture?n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,r,0):n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,a),n.bindTexture(n.TEXTURE_2D,null),n.bindRenderbuffer(n.RENDERBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,o),!n.isFramebuffer(o))throw"Invalid framebuffer";n.bindFramebuffer(n.FRAMEBUFFER,null);const l=n.checkFramebufferStatus(n.FRAMEBUFFER);switch(l){case n.FRAMEBUFFER_COMPLETE:break;case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:o,renderbuf:a,texture:i[0],textures:i,depthTexture:r,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,n=null,i=Uint8Array,r=4,a=0){const o=e,l=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,c=new i(r),u=this.gl;return u.readBuffer(u.COLOR_ATTACHMENT0+a),u.readPixels(o,l,1,1,s||u.RGBA,n||u.UNSIGNED_BYTE,c,0),c}readArray(e=null,t=null,s=Uint8Array,n=4,i=0){const r=new s(this.buffer.width*this.buffer.height*n),a=this.gl;return a.readBuffer(a.COLOR_ATTACHMENT0+i),a.readPixels(0,0,this.buffer.width,this.buffer.height,e||a.RGBA,t||a.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,n=t.canvas,i=t.imageData,r=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const a=this.buffer.width,o=this.buffer.height,l=o/2|0,c=4*a,u=new Uint8Array(4*a);for(let e=0;ee.deleteTexture(t))),e.deleteTexture(this.buffer.depthTexture),e.deleteFramebuffer(this.buffer.framebuf),e.deleteRenderbuffer(this.buffer.renderbuf),this.allocated=!1,this.buffer=null,this.bound=!1}this._imageDataCache=null,this._texture=null,this._depthTexture=null}}class tt{constructor(e){this.scene=e,this._renderBuffersBasic={},this._renderBuffersScaled={}}getRenderBuffer(e,t){const s=1===this.scene.canvas.resolutionScale?this._renderBuffersBasic:this._renderBuffersScaled;let n=s[e];return n||(n=new et(this.scene.canvas.canvas,this.scene.canvas.gl,t),s[e]=n),n}destroy(){for(let e in this._renderBuffersBasic)this._renderBuffersBasic[e].destroy();for(let e in this._renderBuffersScaled)this._renderBuffersScaled[e].destroy()}}function st(e,t){if(void 0===e._cachedExtensions&&(e._cachedExtensions={}),void 0!==e._cachedExtensions[t])return e._cachedExtensions[t];let s;switch(t){case"WEBGL_depth_texture":s=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":s=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":s=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":s=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:s=e.getExtension(t)}return e._cachedExtensions[t]=s,s}const nt=function(t,s){s=s||{};const n=new Re(t),i=t.canvas.canvas,r=t.canvas.gl,a=!!s.transparent,o=s.alphaDepthMask,l=new e({});let c={},u={},h=!0,p=!0,A=!0,f=!0,I=!0,y=!0,v=!0,w=!0;const g=new tt(t);let E=!1;const T=new ze(t),b=new Je(t);function D(){h&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableMap,n=t.drawableListPreCull;let i=0;for(let e in s)s.hasOwnProperty(e)&&(n[i++]=s[e]);n.length=i}}(),h=!1,p=!0),p&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e];t.isStateSortable&&t.drawableListPreCull.sort(t.stateSortCompare)}}(),p=!1,A=!0),A&&function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableListPreCull,n=t.drawableList;let i=0;for(let e=0,t=s.length;e0)for(n.withSAO=!0,S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||k>0||H>0||U>0){if(r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):(r.blendEquation(r.FUNC_ADD),r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA)),n.backfaces=!1,o||r.depthMask(!1),(H>0||U>0)&&r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),U>0)for(S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||W>0){if(n.lastProgramId=null,t.highlightMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),W>0)for(S=0;S0)for(S=0;S0||K>0||Q>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),r.enable(r.CULL_FACE),K>0)for(S=0;S0)for(S=0;S0||X>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),X>0)for(S=0;S0)for(S=0;S0||J>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),J>0)for(S=0;S0)for(S=0;S0){const t=Math.floor(e/4),s=p.size[0],n=t%s-Math.floor(s/2),i=Math.floor(t/s)-Math.floor(s/2),r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));C.push({x:n,y:i,dist:r,isVertex:a&&o?y[e+3]>m.length/2:a,result:[y[e+0],y[e+1],y[e+2],y[e+3]],normal:[v[e+0],v[e+1],v[e+2],v[e+3]],id:[w[e+0],w[e+1],w[e+2],w[e+3]]})}let O=null,S=null,N=null,x=null;if(C.length>0){C.sort(((e,t)=>e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist)),x=C[0].isVertex?"vertex":"edge";const e=C[0].result,t=C[0].normal,s=C[0].id,n=m[e[3]],i=n.origin,r=n.coordinateScale;S=d.normalizeVec3([t[0]/d.MAX_INT,t[1]/d.MAX_INT,t[2]/d.MAX_INT]),O=[e[0]*r[0]+i[0],e[1]*r[1]+i[1],e[2]*r[2]+i[2]],N=l.items[s[0]+(s[1]<<8)+(s[2]<<16)+(s[3]<<24)]}if(null===E&&null==O)return null;let L=null;null!==O&&(L=t.camera.projectWorldPos(O));const M=N&&N.delegatePickedEntity?N.delegatePickedEntity():N;return u.reset(),u.snappedToEdge="edge"===x,u.snappedToVertex="vertex"===x,u.worldPos=O,u.worldNormal=S,u.entity=M,u.canvasPos=s,u.snappedCanvasPos=L||s,u}}(),this.addMarker=function(e){this._occlusionTester=this._occlusionTester||new Qe(t,g),this._occlusionTester.addMarker(e),t.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){D(),this._occlusionTester.bindRenderBuf(),n.reset(),n.backfaces=!0,n.frontface=!0,r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.clearColor(0,0,0,0),r.enable(r.DEPTH_TEST),r.disable(r.CULL_FACE),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT);for(let e in c)if(c.hasOwnProperty(e)){const t=c[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}});const e=this.scene.tickify((()=>this.fire("mousemove",this.mouseCanvasPos,!0)));this.element.addEventListener("mousemove",this._mouseMoveListener=t=>{this.enabled&&(this._getMouseCanvasPos(t),e(),this.mouseover&&t.preventDefault())});const t=this.scene.tickify((e=>{this.fire("mousewheel",e,!0)}));this.element.addEventListener("wheel",this._mouseWheelListener=(e,s)=>{if(!this.enabled)return;const n=Math.max(-1,Math.min(1,40*-e.deltaY));t(n)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(n=>{e>=n[0]-s&&e<=n[0]+s&&t>=n[1]-s&&t<=n[1]+s&&this.fire("mouseclicked",n,!0)}))}this._eventsBound=!0}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,n=0;for(;t.offsetParent;)s+=t.offsetLeft,n+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-n}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const rt=new e({});class at{constructor(e){this.id=rt.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){rt.removeItem(this.id)}}class ot extends x{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new at({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class lt extends x{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let n=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(n/=t),n=Math.min(n,120),d.perspectiveMat4(n*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class ct extends x{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4(),near:.1,far:2e3}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,n=s[2],i=s[3],r=n/i;let a,o,l,c;n>i?(a=-t,o=t,l=t/r,c=-t/r):(a=-t*r,o=t*r,l=t,c=-t),d.orthoMat4c(a,o,c,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class ut extends x{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){d.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class ht extends x{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy()}}const pt=d.vec3(),dt=d.vec3(),At=d.vec3(),ft=d.vec3(),It=d.vec3(),mt=d.vec3(),yt=d.vec4(),vt=d.vec4(),wt=d.vec4(),gt=d.mat4(),Et=d.mat4(),Tt=d.vec3(),bt=d.vec3(),Dt=d.vec3(),Pt=d.vec3();class Ct extends x{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new at({deviceMatrix:d.mat4(),hasDeviceMatrix:!1,matrix:d.mat4(),normalMatrix:d.mat4(),inverseMatrix:d.mat4()}),this._perspective=new lt(this),this._ortho=new ct(this),this._frustum=new ut(this),this._customProjection=new ht(this),this._project=this._perspective,this._eye=d.vec3([0,0,10]),this._look=d.vec3([0,0,0]),this._up=d.vec3([0,1,0]),this._worldUp=d.vec3([0,1,0]),this._worldRight=d.vec3([1,0,0]),this._worldForward=d.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(d.subVec3(this._eye,this._look,Tt),d.normalizeVec3(Tt,bt),d.mulVec3Scalar(bt,1e3,Dt),d.addVec3(this._look,Dt,Pt),t=Pt):t=this._eye,e.hasDeviceMatrix?(d.lookAtMat4v(t,this._look,this._up,Et),d.mulMat4(e.deviceMatrix,Et,e.matrix)):d.lookAtMat4v(t,this._look,this._up,e.matrix),d.inverseMat4(this._state.matrix,this._state.inverseMatrix),d.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=d.subVec3(this._eye,this._look,pt);d.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,gt),t=d.transformPoint3(gt,t,dt),this.eye=d.addVec3(this._look,t,At),this.up=d.transformPoint3(gt,this._up,ft)}orbitPitch(e){if(this._constrainPitch&&(e=d.dotVec3(this._up,this._worldUp)/d.DEGTORAD)<1)return;let t=d.subVec3(this._eye,this._look,pt);const s=d.cross3Vec3(d.normalizeVec3(t,dt),d.normalizeVec3(this._up,At));d.rotationMat4v(.0174532925*e,s,gt),t=d.transformPoint3(gt,t,ft),this.up=d.transformPoint3(gt,this._up,It),this.eye=d.addVec3(t,this._look,mt)}yaw(e){let t=d.subVec3(this._look,this._eye,pt);d.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,gt),t=d.transformPoint3(gt,t,dt),this.look=d.addVec3(t,this._eye,At),this._gimbalLock&&(this.up=d.transformPoint3(gt,this._up,ft))}pitch(e){if(this._constrainPitch&&(e=d.dotVec3(this._up,this._worldUp)/d.DEGTORAD)<1)return;let t=d.subVec3(this._look,this._eye,pt);const s=d.cross3Vec3(d.normalizeVec3(t,dt),d.normalizeVec3(this._up,At));d.rotationMat4v(.0174532925*e,s,gt),this.up=d.transformPoint3(gt,this._up,mt),t=d.transformPoint3(gt,t,ft),this.look=d.addVec3(t,this._eye,It)}pan(e){const t=d.subVec3(this._eye,this._look,pt),s=[0,0,0];let n;if(0!==e[0]){const i=d.cross3Vec3(d.normalizeVec3(t,[]),d.normalizeVec3(this._up,dt));n=d.mulVec3Scalar(i,e[0]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]}0!==e[1]&&(n=d.mulVec3Scalar(d.normalizeVec3(this._up,At),e[1]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),0!==e[2]&&(n=d.mulVec3Scalar(d.normalizeVec3(t,ft),e[2]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),this.eye=d.addVec3(this._eye,s,It),this.look=d.addVec3(this._look,s,mt)}zoom(e){const t=d.subVec3(this._eye,this._look,pt),s=Math.abs(d.lenVec3(t,dt)),n=Math.abs(s+e);if(n<.5)return;const i=d.normalizeVec3(t,At);this.eye=d.addVec3(this._look,d.mulVec3Scalar(i,n),ft)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=d.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return d.lenVec3(d.subVec3(this._look,this._eye,pt))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=yt,s=vt,n=wt;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,d.mulMat4v4(this.viewMatrix,t,s),d.mulMat4v4(this.projMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1;const i=this.scene.canvas.canvas,r=i.offsetWidth/2,a=i.offsetHeight/2;return[n[0]*r+r,n[1]*a+a]}destroy(){super.destroy(),this._state.destroy()}}class _t extends x{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class Rt extends _t{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,n=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=n.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new at({type:"dir",dir:d.vec3([1,1,1]),color:d.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=d.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,n=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],i=[0,1,0];d.lookAtMat4v(n,s,i,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=d.identityMat4()),d.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new et(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class Bt extends _t{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:d.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class Ot extends x{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),m.memory.meshes++}destroy(){super.destroy(),m.memory.meshes--}}var St=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=d.vec3(),u=d.vec3(),h=d.vec3(),p=d.vec3(),A=d.vec3(),f=d.vec3(),I=d.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}();const Nt=function(){const e=d.mat4(),t=d.mat4();return function(s,n){n=n||d.mat4();const i=s[0],r=s[1],a=s[2],o=s[3]-i,l=s[4]-r,c=s[5]-a,u=65535;return d.identityMat4(e),d.translationMat4v(s,e),d.identityMat4(t),d.scalingMat4v([o/u,l/u,c/u],t),d.mulMat4(e,t,n),n}}();var xt=function(){const e=d.mat4(),t=d.mat4();return function(s,n,i){const r=new Uint16Array(s.length),a=new Float32Array([i[0]!==n[0]?65535/(i[0]-n[0]):0,i[1]!==n[1]?65535/(i[1]-n[1]):0,i[2]!==n[2]?65535/(i[2]-n[2]):0]);let o;for(o=0;o=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1);i=e,r=t}return new Int8Array([Math[s](127.5*i+(i<0?-1:0)),Math[n](127.5*r+(r<0?-1:0))])}function Ft(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}function Ht(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const Ut={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let n,i;for(n=0;n<3;n++)t[n]=Number.MAX_VALUE,s[n]=-Number.MAX_VALUE;for(n=0;na&&(i=s,a=r),s=Mt(e,o,"floor","ceil"),n=Ft(s),r=Ht(e,o,n),r>a&&(i=s,a=r),s=Mt(e,o,"ceil","ceil"),n=Ft(s),r=Ht(e,o,n),r>a&&(i=s,a=r),t[o]=i[0],t[o+1]=i[1];return t},decompressNormals:function(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t},decompressNormal:function(e,t){let s=e[0],n=e[1];s=(2*s+1)/255,n=(2*n+1)/255;const i=1-Math.abs(s)-Math.abs(n);i<0&&(s=(1-Math.abs(n))*(s>=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t}},Gt=m.memory,jt=d.AABB3();class Vt extends Ot{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new at({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=Ut.getPositionsBounds(t.positions),n=Ut.compressPositions(t.positions,e.min,e.max);s.positions=n.quantized,s.positionsDecodeMatrix=n.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=Ut.getUVBounds(t.uv),n=Ut.compressUVs(t.uv,e.min,e.max);s.uv=n.quantized,s.uvDecodeMatrix=n.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=Ut.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),Gt.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),Gt.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),Gt.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new Ge(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),Gt.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),Gt.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new Ge(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),Gt.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=St(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),Gt.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=d.buildPickTriangles(e.positions,e.indices,e.compressGeometry),n=s.positions,i=s.colors;this._pickTrianglePositionsBuf=new Ge(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,4,t.STATIC_DRAW,!0),Gt.positions+=this._pickTrianglePositionsBuf.numItems,Gt.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),Ut.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=Ut.getPositionsBounds(e),n=Ut.compressPositions(e,s.min,s.max);e=n.quantized,t.positionsDecodeMatrix=n.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),Ut.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),Ut.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=d.AABB3()),d.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=d.OBB3()),d.positions3ToAABB3(this._state.positions,jt,this._state.positionsDecodeMatrix),d.AABB3ToOBB3(jt,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),Gt.meshes--}}function kt(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return g.apply(e,{positions:[h,p,d,l,p,d,l,c,d,h,c,d,h,p,d,h,c,d,h,c,u,h,p,u,h,p,d,h,p,u,l,p,u,l,p,d,l,p,d,l,p,u,l,c,u,l,c,d,l,c,u,h,c,u,h,c,d,l,c,d,h,c,u,l,c,u,l,p,u,h,p,u],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class Qt extends x{get type(){return"Material"}constructor(e,t={}){super(e,t),m.memory.materials++}destroy(){super.destroy(),m.memory.materials--}}const Wt={opaque:0,mask:1,blend:2},zt=["opaque","mask","blend"];class Kt extends Qt{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new at({type:"PhongMaterial",ambient:d.vec3([1,1,1]),diffuse:d.vec3([1,1,1]),specular:d.vec3([1,1,1]),emissive:d.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=Wt[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return zt[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const Yt={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class Xt extends Qt{get type(){return"EmphasisMaterial"}get presets(){return Yt}constructor(e,t={}){super(e,t),this._state=new at({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=Yt[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Yt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const qt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class Jt extends Qt{get type(){return"EdgeMaterial"}get presets(){return qt}constructor(e,t={}){super(e,t),this._state=new at({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=qt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(qt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const Zt={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class $t extends x{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=d.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return Zt}set units(e){e||(e="meters");Zt[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=d.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=d.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class es extends x{constructor(e,t={}){super(e,t),this._supported=Be.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const ts={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class ss extends Qt{get type(){return"PointsMaterial"}get presets(){return ts}constructor(e,t={}){super(e,t),this._state=new at({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=ts[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(ts).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const ns={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class is extends Qt{get type(){return"LinesMaterial"}get presets(){return ns}constructor(e,t={}){super(e,t),this._state=new at({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=ns[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(ns).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}function rs(e,t){const s={};let n,i;for(let r=0,a=t.length;r{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new nt(this,{transparent:n,alphaDepthMask:i}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1,this._numCachedSectionPlanes=0;let e=null;this.getHash=function(){if(e)return e;const t=this.getNumAllocatedSectionPlanes();if(this.sectionPlanes,0===t)return this.hash=";";const s=[];for(let e=0,n=t;ethis._numCachedSectionPlanes?e:this._numCachedSectionPlanes}},this._sectionPlanesState.setNumCachedSectionPlanes(t.numCachedSectionPlanes||0),this._lightsState=new function(){const e=d.vec4([0,0,0,0]),t=d.vec4();this.lights=[],this.reflectionMaps=[],this.lightMaps=[];let s=null,n=null;this.getHash=function(){if(s)return s;const e=[],t=this.lights;let n;for(let s=0,i=t.length;s0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),n=null,s=null},this.removeLight=function(e){for(let t=0,i=this.lights.length;t{this._renderer.imageDirty()}))}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+g.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=d.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const n=this.types[s];n&&(delete n[t],g.isEmptyObject(n)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_deRegisterVisibleObject(e){delete this.visibleObjects[e.id],this._numVisibleObjects--,this._visibleObjectIds=null}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_deRegisterXRayedObject(e){delete this.xrayedObjects[e.id],this._numXRayedObjects--,this._xrayedObjectIds=null}_objectHighlightedUpdated(e){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null}_deRegisterHighlightedObject(e){delete this.highlightedObjects[e.id],this._numHighlightedObjects--,this._highlightedObjectIds=null}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_deRegisterSelectedObject(e){delete this.selectedObjects[e.id],this._numSelectedObjects--,this._selectedObjectIds=null}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_deRegisterColorizedObject(e){delete this.colorizedObjects[e.id],this._numColorizedObjects--,this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_deRegisterOpacityObject(e){delete this.opacityObjects[e.id],this._numOpacityObjects--,this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_deRegisterOffsetObject(e){delete this.offsetObjects[e.id],this._numOffsetObjects--,this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set numCachedSectionPlanes(e){e=e||0,this._sectionPlanesState.getNumCachedSectionPlanes()!==e&&(this._sectionPlanesState.setNumCachedSectionPlanes(e),this._needRecompile=!0,this.glRedraw())}get numCachedSectionPlanes(){return this._sectionPlanesState.getNumCachedSectionPlanes()}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&B.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,n=this._clearEachPass;let i,r;for(i=0;ii&&(i=e[3]),e[4]>r&&(r=e[4]),e[5]>a&&(a=e[5]),c=!0}c||(t=-100,s=-100,n=-100,i=100,r=100,a=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=n,this._aabb[3]=i,this._aabb[4]=r,this._aabb[5]=a,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=rs(this,s));const n=e.excludeEntities||e.exclude;return n&&(e.excludeEntityIds=rs(this,n)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=e.snapToEdge||e.snapToVertex?this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge,t):this._renderer.pick(e,t))&&t.entity&&t.entity.fire&&t.entity.fire("picked",t),t}snapPick(e){return void 0===this._warnSnapPickDeprecated&&(this._warnSnapPickDeprecated=!0,this.warn("Scene.snapPick() is deprecated since v2.4.2 - use Scene.pick() instead")),this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]r&&(r=l[3]),l[4]>a&&(a=l[4]),l[5]>o&&(o=l[5]),t=!0}})),t){const e=d.AABB3();return e[0]=s,e[1]=n,e[2]=i,e[3]=r,e[4]=a,e[5]=o,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){g.isString(e)&&(e=[e]);let s=!1;for(let n=0,i=e.length;n{i>n&&(n=i,e(...s))}));return this._tickifiedFunctions[t]={tickSubId:a,wrapperFunc:r},r}destroy(){super.destroy();for(const e in this.components)this.components.hasOwnProperty(e)&&this.components[e].destroy();this.canvas.gl=null,this.components=null,this.models=null,this.objects=null,this.visibleObjects=null,this.xrayedObjects=null,this.highlightedObjects=null,this.selectedObjects=null,this.colorizedObjects=null,this.opacityObjects=null,this.sectionPlanes=null,this.lights=null,this.lightMaps=null,this.reflectionMaps=null,this._objectIds=null,this._visibleObjectIds=null,this._xrayedObjectIds=null,this._highlightedObjectIds=null,this._selectedObjectIds=null,this._colorizedObjectIds=null,this.types=null,this.components=null,this.canvas=null,this._renderer=null,this.input=null,this._viewport=null,this._camera=null}}const os=1e3,ls=1001,cs=1002,us=1003,hs=1004,ps=1004,ds=1005,As=1005,fs=1006,Is=1007,ms=1007,ys=1008,vs=1008,ws=1009,gs=1010,Es=1011,Ts=1012,bs=1013,Ds=1014,Ps=1015,Cs=1016,_s=1017,Rs=1018,Bs=1020,Os=1021,Ss=1022,Ns=1023,xs=1024,Ls=1025,Ms=1026,Fs=1027,Hs=1028,Us=1029,Gs=1030,js=1031,Vs=1033,ks=33776,Qs=33777,Ws=33778,zs=33779,Ks=35840,Ys=35841,Xs=35842,qs=35843,Js=36196,Zs=37492,$s=37496,en=37808,tn=37809,sn=37810,nn=37811,rn=37812,an=37813,on=37814,ln=37815,cn=37816,un=37817,hn=37818,pn=37819,dn=37820,An=37821,fn=36492,In=3e3,mn=3001,yn=1e4,vn=10001,wn=10002,gn=10003,En=function(e){"LambertMaterial"===e._material._state.type?(this.vertex=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene._lightsState,i=e._geometry._state,r=e._state.billboard,a=e._state.stationary,o=s.getNumAllocatedSectionPlanes()>0,l=!!i.compressGeometry,c=[];c.push("#version 300 es"),c.push("// Lambertian drawing vertex shader"),c.push("in vec3 position;"),c.push("uniform mat4 modelMatrix;"),c.push("uniform mat4 viewMatrix;"),c.push("uniform mat4 projMatrix;"),c.push("uniform vec4 colorize;"),c.push("uniform vec3 offset;"),l&&c.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(c.push("uniform float logDepthBufFC;"),c.push("out float vFragDepth;"),c.push("bool isPerspectiveMatrix(mat4 m) {"),c.push(" return (m[2][3] == - 1.0);"),c.push("}"),c.push("out float isPerspective;"));o&&c.push("out vec4 vWorldPosition;");if(c.push("uniform vec4 lightAmbient;"),c.push("uniform vec4 materialColor;"),c.push("uniform vec3 materialEmissive;"),i.normalsBuf){c.push("in vec3 normal;"),c.push("uniform mat4 modelNormalMatrix;"),c.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=n.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),c.push(" }"),c.push(" return normalize(v);"),c.push("}"))}c.push("out vec4 vColor;"),"points"===i.primitiveName&&c.push("uniform float pointSize;");"spherical"!==r&&"cylindrical"!==r||(c.push("void billboard(inout mat4 mat) {"),c.push(" mat[0][0] = 1.0;"),c.push(" mat[0][1] = 0.0;"),c.push(" mat[0][2] = 0.0;"),"spherical"===r&&(c.push(" mat[1][0] = 0.0;"),c.push(" mat[1][1] = 1.0;"),c.push(" mat[1][2] = 0.0;")),c.push(" mat[2][0] = 0.0;"),c.push(" mat[2][1] = 0.0;"),c.push(" mat[2][2] =1.0;"),c.push("}"));c.push("void main(void) {"),c.push("vec4 localPosition = vec4(position, 1.0); "),c.push("vec4 worldPosition;"),l&&c.push("localPosition = positionsDecodeMatrix * localPosition;");i.normalsBuf&&(l?c.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):c.push("vec4 localNormal = vec4(normal, 0.0); "),c.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),c.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));c.push("mat4 viewMatrix2 = viewMatrix;"),c.push("mat4 modelMatrix2 = modelMatrix;"),a&&c.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(c.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),c.push("billboard(modelMatrix2);"),c.push("billboard(viewMatrix2);"),c.push("billboard(modelViewMatrix);"),i.normalsBuf&&(c.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),c.push("billboard(modelNormalMatrix2);"),c.push("billboard(viewNormalMatrix2);"),c.push("billboard(modelViewNormalMatrix);")),c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i.normalsBuf&&c.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(c.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),c.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),c.push("float lambertian = 1.0;"),i.normalsBuf)for(let e=0,t=n.lights.length;e0,r=t.gammaOutput,a=[];a.push("#version 300 es"),a.push("// Lambertian drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}"points"===n.primitiveName&&(a.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),a.push("float r = dot(cxy, cxy);"),a.push("if (r > 1.0) {"),a.push(" discard;"),a.push("}"));t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,n=t._sectionPlanesState,i=e._geometry._state,r=t._lightsState;let a;const o=s.billboard,l=s.background,c=s.stationary,u=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),h=Dn(e),p=n.getNumAllocatedSectionPlanes()>0,d=bn(e),A=!!i.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),A&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),p&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));r.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(h){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=r.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}u&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),A&&f.push("uniform mat3 uvDecodeMatrix;"));i.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===i.primitiveName&&f.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===o&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(d){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=r.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=r.lights.length;e0,l=Dn(e),c=n.uvBuf,u="PhongMaterial"===a.type,h="MetallicMaterial"===a.type,p="SpecularMaterial"===a.type,d=bn(e);t.gammaInput;const A=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));d&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),A&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(o){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var I=0;I0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),r.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),u&&((r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = "+Tn[r.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(h||p)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),r.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+Tn[r.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),n.colors&&f.push("in vec4 vColor;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(r.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));a.ambient&&f.push("uniform vec3 materialAmbient;");a.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==a.alpha&&null!==a.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");a.emissive&&f.push("uniform vec3 materialEmissive;");a.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==a.glossiness&&null!==a.glossiness&&f.push("uniform float materialGlossiness;");void 0!==a.shininess&&null!==a.shininess&&f.push("uniform float materialShininess;");a.specular&&f.push("uniform vec3 materialSpecular;");void 0!==a.metallic&&null!==a.metallic&&f.push("uniform float materialMetallic;");void 0!==a.roughness&&null!==a.roughness&&f.push("uniform float materialRoughness;");void 0!==a.specularF0&&null!==a.specularF0&&f.push("uniform float materialSpecularF0;");c&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));c&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));c&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));c&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&c&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&c&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&c&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));c&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));c&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&c&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&c&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&c&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=r.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===n.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),a.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");a.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):a.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");n.colors&&f.push("diffuseColor *= vColor.rgb;");a.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");a.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==a.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");n.colors&&f.push("alpha *= vColor.a;");void 0!==a.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==a.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==a.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==a.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));c&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+Tn[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));c&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+Tn[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));c&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+Tn[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));c&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+Tn[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));c&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));c&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(r.lights.length>0||r.lightMaps.length>0||r.reflectionMaps.length>0)){c&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),c&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),c&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),c&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),c&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),c&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),c&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),u&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),p&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),h&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),r.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),u&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(p||h)&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=r.lights.length;e0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),i.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(u=0,h=r.sectionPlanes.length;u0&&i.lightMaps[0].texture&&this._uLightMap&&(o.bindTexture(this._uLightMap,i.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),i.reflectionMaps.length>0&&i.reflectionMaps[0].texture&&this._uReflectionMap&&(o.bindTexture(this._uReflectionMap,i.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&n.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class Bn{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,n=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),i=t._sectionPlanesState.getNumAllocatedSectionPlanes()>0,r=!!e._geometry._state.compressGeometry,a=e._state.billboard,o=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),r&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));i&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),n){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===a||"cylindrical"===a)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===a&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),r&&l.push("localPosition = positionsDecodeMatrix * localPosition;");n&&(r?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),o&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===a||"cylindrical"===a?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),n&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),n)for(let e=0,t=s.lights.length;e0,r=[];r.push("#version 300 es"),r.push("// Lambertian drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}"points"===e._geometry._state.primitiveName&&(r.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),r.push("float r = dot(cxy, cxy);"),r.push("if (r > 1.0) {"),r.push(" discard;"),r.push("}"));t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const On=new e({}),Sn=d.vec3(),Nn=function(e,t){this.id=On.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Bn(t),this._allocate(t)},xn={};Nn.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=xn[t];return s||(s=new Nn(t,e),xn[t]=s,m.memory.programs++),s._useCount++,s},Nn.prototype.put=function(){0==--this._useCount&&(On.removeItem(this.id),this._program&&this._program.destroy(),delete xn[this._hash],m.memory.programs--)},Nn.prototype.webglContextRestored=function(){this._program=null},Nn.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl,a=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,o=t._state,l=t._geometry._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(o.originHash,c):i.viewMatrix),r.uniformMatrix4fv(this._uViewNormalMatrix,!1,i.viewNormalMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Edges drawing vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec4 edgeColor;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));s&&a.push("out vec4 vWorldPosition;");a.push("out vec4 vColor;"),("spherical"===i||"cylindrical"===i)&&(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));a.push("vColor = edgeColor;"),s&&a.push("vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene.gammaOutput,i=s.getNumAllocatedSectionPlanes()>0,r=[];r.push("#version 300 es"),r.push("// Edges drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const Mn=new e({}),Fn=d.vec3(),Hn=function(e,t){this.id=Mn.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Ln(t),this._allocate(t)},Un={};Hn.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Un[t];return s||(s=new Hn(t,e),Un[t]=s,m.memory.programs++),s._useCount++,s},Hn.prototype.put=function(){0==--this._useCount&&(Mn.removeItem(this.id),this._program&&this._program.destroy(),delete Un[this._hash],m.memory.programs--)},Hn.prototype.webglContextRestored=function(){this._program=null},Hn.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl;let a;const o=t._state,l=t._geometry,c=l._state,u=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,u?e.getRTCViewMatrix(o.originHash,u):i.viewMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh picking vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("out vec4 vViewPosition;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("uniform vec2 pickClipPos;"),a.push("vec4 remapClipPos(vec4 clipPos) {"),a.push(" clipPos.xy /= clipPos.w;"),a.push(" clipPos.xy -= pickClipPos;"),a.push(" clipPos.xy *= clipPos.w;"),a.push(" return clipPos;"),a.push("}"),a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==i&&"cylindrical"!==i||(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"));a.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),a.push(" worldPosition.xyz = worldPosition.xyz + offset;"),a.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = remapClipPos(clipPos);"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(i.push("uniform vec4 pickColor;"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = pickColor; "),i.push("}"),i}(e)}}const jn=d.vec3(),Vn=function(e,t){this._hash=e,this._shaderSource=new Gn(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},kn={};Vn.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=kn[t];if(!s){if(s=new Vn(t,e),s.errors)return console.log(s.errors.join("\n")),null;kn[t]=s,m.memory.programs++}return s._useCount++,s},Vn.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete kn[this._hash],m.memory.programs--)},Vn.prototype.webglContextRestored=function(){this._program=null},Vn.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCPickViewMatrix(i.originHash,o):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t>24&255,u=l>>16&255,h=l>>8&255,p=255&l;n.uniform4f(this._uPickColor,p/255,h/255,u/255,c/255),n.uniform2fv(this._uPickClipPos,e.pickClipPos),a.indicesBuf?(n.drawElements(a.primitive,a.indicesBuf.numItems,a.indicesBuf.itemType,0),e.drawElements++):a.positions&&n.drawArrays(n.TRIANGLES,0,a.positions.numItems)},Vn.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Ue(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,n=!!e._geometry._state.compressGeometry,i=[];i.push("#version 300 es"),i.push("// Surface picking vertex shader"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform vec3 offset;"),s&&(i.push("uniform bool clippable;"),i.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out float isPerspective;"));i.push("uniform vec2 pickClipPos;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy -= pickClipPos;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("out vec4 vColor;"),n&&i.push("uniform mat4 positionsDecodeMatrix;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),n&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push(" vec4 worldPosition = modelMatrix * localPosition; "),i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&i.push(" vWorldPosition = worldPosition;");i.push(" vColor = color;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Surface picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = vColor;"),i.push("}"),i}(e)}}const Wn=d.vec3(),zn=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Qn(t),this._allocate(t)},Kn={};zn.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Kn[t];if(!s){if(s=new zn(t,e),s.errors)return console.log(s.errors.join("\n")),null;Kn[t]=s,m.memory.programs++}return s._useCount++,s},zn.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Kn[this._hash],m.memory.programs--)},zn.prototype.webglContextRestored=function(){this._program=null},zn.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry,o=t._geometry._state,l=t.origin,c=r.backfaces,u=r.frontface,h=s.camera.project,p=a._getPickTrianglePositions(),d=a._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(h.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}if(n.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(i.originHash,l):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh occlusion vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push("}"),i}(e)}}const Xn=d.vec3(),qn=function(e,t){this._hash=e,this._shaderSource=new Yn(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Jn={};qn.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=Jn[t];if(!s){if(s=new qn(t,e),s.errors)return console.log(s.errors.join("\n")),null;Jn[t]=s,m.memory.programs++}return s._useCount++,s},qn.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Jn[this._hash],m.memory.programs--)},qn.prototype.webglContextRestored=function(){this._program=null},qn.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._material._state,r=t._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?n.disable(n.CULL_FACE):n.enable(n.CULL_FACE),e.backfaces=t);const s=i.frontface;e.frontface!==s&&(s?n.frontFace(n.CCW):n.frontFace(n.CW),e.frontface=s),this._lastMaterialId=i.id}const l=s.camera;if(n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCViewMatrix(r.originHash,o):l.viewMatrix),r.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,n=[];n.push("// Mesh shadow vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),n.push("uniform vec3 offset;"),s&&n.push("uniform mat4 positionsDecodeMatrix;");t&&n.push("out vec4 vWorldPosition;");n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),s&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("worldPosition = modelMatrix * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&n.push("vWorldPosition = worldPosition;");return n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("// Mesh shadow fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return i.push("outColor = encodeFloat(gl_FragCoord.z);"),i.push("}"),i}(e)}}const $n=function(e,t){this._hash=e,this._shaderSource=new Zn(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},ei={};$n.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let n=ei[s];if(!n){if(n=new $n(s,e),n.errors)return console.log(n.errors.join("\n")),null;ei[s]=n,m.memory.programs++}return n._useCount++,n},$n.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete ei[this._hash],m.memory.programs--)},$n.prototype.webglContextRestored=function(){this._program=null},$n.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,n=t._material._state,i=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.id!==this._lastMaterialId){const t=n.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const i=n.frontface;e.frontface!==i&&(i?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=i),e.lineWidth!==n.lineWidth&&(s.lineWidth(n.lineWidth),e.lineWidth=n.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,n.pointSize),this._lastMaterialId=n.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),i.combineGeometry){const n=t.vertexBufs;n.id!==this._lastVertexBufsId&&(n.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(n.positionsBuf,n.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=n.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),i.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,i.positionsDecodeMatrix),i.combineGeometry?i.indicesBufCombined&&(i.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),i.indicesBuf&&(i.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=i.id),i.combineGeometry?i.indicesBufCombined&&(s.drawElements(i.primitive,i.indicesBufCombined.numItems,i.indicesBufCombined.itemType,0),e.drawElements++):i.indicesBuf?(s.drawElements(i.primitive,i.indicesBuf.numItems,i.indicesBuf.itemType,0),e.drawElements++):i.positions&&(s.drawArrays(s.TRIANGLES,0,i.positions.numItems),e.drawArrays++)},$n.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Ue(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uShadowViewMatrix=n.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=n.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,i,r,a;for(let o=0,l=this._uSectionPlanes.length;o0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const di=function(){const e=d.vec3(),t=d.vec3(),s=d.vec3(),n=d.vec3(),i=d.vec3(),r=d.vec3(),a=d.vec4(),o=d.vec3(),l=d.vec3(),c=d.vec3(),u=d.vec3(),h=d.vec3(),p=d.vec3(),A=d.vec3(),f=d.vec3(),I=d.vec3(),m=d.vec4(),y=d.vec4(),v=d.vec4(),w=d.vec3(),g=d.vec3(),E=d.vec3(),T=d.vec3(),b=d.vec3(),D=d.vec3(),P=d.vec3(),C=d.vec3(),_=d.vec3(),R=d.vec3(),B=d.vec3();return function(O,S,N,x){var L=x.primIndex;if(null!=L&&L>-1){const U=O.geometry._state,G=O.scene,j=G.camera,V=G.canvas;if("triangles"===U.primitiveName){x.primitive="triangle";const G=L,k=U.indices,Q=U.positions;let W,K,Y;if(k){var M=k[G+0],F=k[G+1],H=k[G+2];r[0]=M,r[1]=F,r[2]=H,x.indices=r,W=3*M,K=3*F,Y=3*H}else W=3*G,K=W+3,Y=K+3;if(s[0]=Q[W+0],s[1]=Q[W+1],s[2]=Q[W+2],n[0]=Q[K+0],n[1]=Q[K+1],n[2]=Q[K+2],i[0]=Q[Y+0],i[1]=Q[Y+1],i[2]=Q[Y+2],U.compressGeometry){const e=U.positionsDecodeMatrix;e&&(Ut.decompressPosition(s,e,s),Ut.decompressPosition(n,e,n),Ut.decompressPosition(i,e,i))}x.canvasPos?d.canvasPosToLocalRay(V.canvas,O.origin?z(S,O.origin):S,N,O.worldMatrix,x.canvasPos,e,t):x.origin&&x.direction&&d.worldRayToLocalRay(O.worldMatrix,x.origin,x.direction,e,t),d.normalizeVec3(t),d.rayPlaneIntersect(e,t,s,n,i,a),x.localPos=a,x.position=a,m[0]=a[0],m[1]=a[1],m[2]=a[2],m[3]=1,d.transformVec4(O.worldMatrix,m,y),o[0]=y[0],o[1]=y[1],o[2]=y[2],x.canvasPos&&O.origin&&(o[0]+=O.origin[0],o[1]+=O.origin[1],o[2]+=O.origin[2]),x.worldPos=o,d.transformVec4(j.matrix,y,v),l[0]=v[0],l[1]=v[1],l[2]=v[2],x.viewPos=l,d.cartesianToBarycentric(a,s,n,i,c),x.bary=c;const X=U.normals;if(X){if(U.compressGeometry){const e=3*M,t=3*F,s=3*H;Ut.decompressNormal(X.subarray(e,e+2),u),Ut.decompressNormal(X.subarray(t,t+2),h),Ut.decompressNormal(X.subarray(s,s+2),p)}else u[0]=X[W],u[1]=X[W+1],u[2]=X[W+2],h[0]=X[K],h[1]=X[K+1],h[2]=X[K+2],p[0]=X[Y],p[1]=X[Y+1],p[2]=X[Y+2];const e=d.addVec3(d.addVec3(d.mulVec3Scalar(u,c[0],w),d.mulVec3Scalar(h,c[1],g),E),d.mulVec3Scalar(p,c[2],T),b);x.worldNormal=d.normalizeVec3(d.transformVec3(O.worldNormalMatrix,e,D))}const q=U.uv;if(q){if(A[0]=q[2*M],A[1]=q[2*M+1],f[0]=q[2*F],f[1]=q[2*F+1],I[0]=q[2*H],I[1]=q[2*H+1],U.compressGeometry){const e=U.uvDecodeMatrix;e&&(Ut.decompressUV(A,e,A),Ut.decompressUV(f,e,f),Ut.decompressUV(I,e,I))}x.uv=d.addVec3(d.addVec3(d.mulVec2Scalar(A,c[0],P),d.mulVec2Scalar(f,c[1],C),_),d.mulVec2Scalar(I,c[2],R),B)}}}}}();function Ai(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let n=e.height||1;n<0&&(console.error("negative height not allowed - will invert"),n*=-1);let i=e.radialSegments||32;i<0&&(console.error("negative radialSegments not allowed - will invert"),i*=-1),i<3&&(i=3);let r=e.heightSegments||1;r<0&&(console.error("negative heightSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const a=!!e.openEnded;let o=e.center;const l=o?o[0]:0,c=o?o[1]:0,u=o?o[2]:0,h=n/2,p=n/r,d=2*Math.PI/i,A=1/i,f=(t-s)/r,I=[],m=[],y=[],v=[];let w,E,T,b,D,P,C,_,R,B,O;const S=(90-180*Math.atan(n/(s-t))/Math.PI)/90;for(w=0;w<=r;w++)for(D=t-w*f,P=h-w*p,E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),m.push(D*T),m.push(S),m.push(D*b),y.push(E*A),y.push(1*w/r),I.push(D*T+l),I.push(P+c),I.push(D*b+u);for(w=0;w0){for(R=I.length/3,m.push(0),m.push(1),m.push(0),y.push(.5),y.push(.5),I.push(0+l),I.push(h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(t*T),m.push(1),m.push(t*b),y.push(B),y.push(O),I.push(t*T+l),I.push(h+c),I.push(t*b+u);for(E=0;E0){for(R=I.length/3,m.push(0),m.push(-1),m.push(0),y.push(.5),y.push(.5),I.push(0+l),I.push(0-h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(s*T),m.push(-1),m.push(s*b),y.push(B),y.push(O),I.push(s*T+l),I.push(0-h+c),I.push(s*b+u);for(E=0;E":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function mi(e={}){var t=e.origin||[0,0,0],s=t[0],n=t[1],i=t[2],r=e.size||1,a=[],o=[],l=e.text;g.isNumeric(l)&&(l=""+l);for(var c,u,h,p,d,A,f,I,m,y=(l||"").split("\n"),v=0,w=0,E=.04,T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,n=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const r=Fi(s,this.wrapS);r&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,r);const a=Fi(s,this.wrapT);if(a&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,a),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=Fi(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}i?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,ji(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,ji(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,Fi(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,Fi(s,this.magFilter)));const o=Fi(s,this.format,this.encoding),l=Fi(s,this.type),c=Gi(s,this.internalFormat,o,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,n,c,e[0].width,e[0].height);for(let t=0,n=e.length;t>t;return e+1}class Wi extends x{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new at({texture:new Ui({gl:this.scene.canvas.gl}),matrix:d.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=d.vec2([0,0]),this._scale=d.vec2([1,1]),this._rotate=d.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),m.memory.textures++}_checkMinFilter(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}_checkMagFilter(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}_checkWrapS(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkWrapT(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this._state.texture=new Ui({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=d.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=d.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?d.mulMat4(t,s):s),0!==this._rotate&&(s=d.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?d.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=Vi(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=Vi(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),m.memory.textures--}}class zi extends x{get type(){return"Fresnel"}constructor(e,t={}){super(e,t),this._state=new at({edgeColor:d.vec3([0,0,0]),centerColor:d.vec3([1,1,1]),edgeBias:0,centerBias:1,power:1}),this.edgeColor=t.edgeColor,this.centerColor=t.centerColor,this.edgeBias=t.edgeBias,this.centerBias=t.centerBias,this.power=t.power}set edgeColor(e){this._state.edgeColor.set(e||[0,0,0]),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set centerColor(e){this._state.centerColor.set(e||[1,1,1]),this.glRedraw()}get centerColor(){return this._state.centerColor}set edgeBias(e){this._state.edgeBias=e||0,this.glRedraw()}get edgeBias(){return this._state.edgeBias}set centerBias(e){this._state.centerBias=null!=e?e:1,this.glRedraw()}get centerBias(){return this._state.centerBias}set power(e){this._state.power=null!=e?e:1,this.glRedraw()}get power(){return this._state.power}destroy(){super.destroy(),this._state.destroy()}}const Ki=m.memory,Yi=d.AABB3();class Xi extends Ot{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new at({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=d.OBB3();const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var i;if(t.positionsDecodeMatrix);else{const e=Ut.getPositionsBounds(t.positions),r=Ut.compressPositions(t.positions,e.min,e.max);i=r.quantized,s.positionsDecodeMatrix=r.decodeMatrix,s.positionsBuf=new Ge(n,n.ARRAY_BUFFER,i,i.length,3,n.STATIC_DRAW),Ki.positions+=s.positionsBuf.numItems,d.positions3ToAABB3(t.positions,this._aabb),d.positions3ToAABB3(i,Yi,s.positionsDecodeMatrix),d.AABB3ToOBB3(Yi,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new Ge(n,n.ARRAY_BUFFER,e,e.length,4,n.STATIC_DRAW),Ki.colors+=s.colorsBuf.numItems}if(t.uv){const e=Ut.getUVBounds(t.uv),i=Ut.compressUVs(t.uv,e.min,e.max),r=i.quantized;s.uvDecodeMatrix=i.decodeMatrix,s.uvBuf=new Ge(n,n.ARRAY_BUFFER,r,r.length,2,n.STATIC_DRAW),Ki.uvs+=s.uvBuf.numItems}if(t.normals){const e=Ut.compressNormals(t.normals);let i=s.compressGeometry;s.normalsBuf=new Ge(n,n.ARRAY_BUFFER,e,e.length,3,n.STATIC_DRAW,i),Ki.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,e,e.length,1,n.STATIC_DRAW),Ki.indices+=s.indicesBuf.numItems;const r=St(i,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,r,r.length,1,n.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),Ki.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),Ki.meshes--}}var qi={};function Ji(e,t={}){return new Promise((function(s,n){t.src||(console.error("load3DSGeometry: Parameter expected: src"),n());var i=e.canvas.spinner;i.processes++,g.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("load3DSGeometry: no data loaded"),i.processes--,n());var r=qi.parse.from3DS(e).edit.objects[0].mesh,a=r.vertices,o=r.uvt,l=r.indices;i.processes--,s(g.apply(t,{primitive:"triangles",positions:a,normals:null,uv:o,indices:l}))}),(function(e){console.error("load3DSGeometry: "+e),i.processes--,n()}))}))}function Zi(e,t={}){return new Promise((function(s,n){t.src||(console.error("loadOBJGeometry: Parameter expected: src"),n());var i=e.canvas.spinner;i.processes++,g.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("loadOBJGeometry: no data loaded"),i.processes--,n());for(var r=qi.parse.fromOBJ(e),a=qi.edit.unwrap(r.i_verts,r.c_verts,3),o=qi.edit.unwrap(r.i_norms,r.c_norms,3),l=qi.edit.unwrap(r.i_uvt,r.c_uvt,2),c=new Int32Array(r.i_verts.length),u=0;u0?o:null,autoNormals:0===o.length,uv:l,indices:c}))}),(function(e){console.error("loadOBJGeometry: "+e),i.processes--,n()}))}))}function $i(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return g.apply(e,{primitive:"lines",positions:[l,c,u,l,c,d,l,p,u,l,p,d,h,c,u,h,c,d,h,p,u,h,p,d],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]})}function er(e={}){return $i({id:e.id,center:[(e.aabb[0]+e.aabb[3])/2,(e.aabb[1]+e.aabb[4])/2,(e.aabb[2]+e.aabb[5])/2],xSize:Math.abs(e.aabb[3]-e.aabb[0])/2,ySize:Math.abs(e.aabb[4]-e.aabb[1])/2,zSize:Math.abs(e.aabb[5]-e.aabb[2])/2})}function tr(e={}){let t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);let s=e.divisions||1;s<0&&(console.error("negative divisions not allowed - will invert"),s*=-1),s<1&&(s=1),t=t||10,s=s||10;const n=t/s,i=t/2,r=[],a=[];let o=0;for(let e=0,t=-i;e<=s;e++,t+=n)r.push(-i),r.push(0),r.push(t),r.push(i),r.push(0),r.push(t),r.push(t),r.push(0),r.push(-i),r.push(t),r.push(0),r.push(i),a.push(o++),a.push(o++),a.push(o++),a.push(o++);return g.apply(e,{primitive:"lines",positions:r,indices:a})}function sr(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let n=e.xSegments||1;n<0&&(console.error("negative xSegments not allowed - will invert"),n*=-1),n<1&&(n=1);let i=e.xSegments||1;i<0&&(console.error("negative zSegments not allowed - will invert"),i*=-1),i<1&&(i=1);const r=e.center,a=r?r[0]:0,o=r?r[1]:0,l=r?r[2]:0,c=t/2,u=s/2,h=Math.floor(n)||1,p=Math.floor(i)||1,d=h+1,A=p+1,f=t/h,I=s/p,m=new Float32Array(d*A*3),y=new Float32Array(d*A*3),v=new Float32Array(d*A*2);let w,E,T,b,D,P,C,_=0,R=0;for(w=0;w65535?Uint32Array:Uint16Array)(h*p*6);for(w=0;w360&&(r=360);const a=e.center;let o=a?a[0]:0,l=a?a[1]:0;const c=a?a[2]:0,u=[],h=[],p=[],A=[];let f,I,m,y,v,w,E,T,b,D,P,C;for(T=0;T<=i;T++)for(E=0;E<=n;E++)f=E/n*r,I=.785398+T/i*Math.PI*2,o=t*Math.cos(f),l=t*Math.sin(f),m=(t+s*Math.cos(I))*Math.cos(f),y=(t+s*Math.cos(I))*Math.sin(f),v=s*Math.sin(I),u.push(m+o),u.push(y+l),u.push(v+c),p.push(1-E/n),p.push(T/i),w=d.normalizeVec3(d.subVec3([m,y,v],[o,l,c],[]),[]),h.push(w[0]),h.push(w[1]),h.push(w[2]);for(T=1;T<=i;T++)for(E=1;E<=n;E++)b=(n+1)*T+E-1,D=(n+1)*(T-1)+E-1,P=(n+1)*(T-1)+E,C=(n+1)*T+E,A.push(b),A.push(D),A.push(P),A.push(P),A.push(C),A.push(b);return g.apply(e,{positions:u,normals:h,uv:p,indices:A})}function ir(e={}){if(e.points.length%3!=0)throw"Size of points array for given polyline should be divisible by 3";let t=e.points.length/3;if(t<2)throw"There should be at least 2 points to create a polyline";let s=[];for(let e=0;e[...e])).flat();return ir({id:e.id,points:t})}qi.load=function(e,t){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(e){t(e.target.response)},s.send()},qi.save=function(e,t){var s="data:application/octet-stream;base64,"+btoa(qi.parse._buffToStr(e));window.location.href=s},qi.clone=function(e){return JSON.parse(JSON.stringify(e))},qi.bin={},qi.bin.f=new Float32Array(1),qi.bin.fb=new Uint8Array(qi.bin.f.buffer),qi.bin.rf=function(e,t){for(var s=qi.bin.f,n=qi.bin.fb,i=0;i<4;i++)n[i]=e[t+i];return s[0]},qi.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},qi.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},qi.bin.rASCII0=function(e,t){for(var s="";0!=e[t];)s+=String.fromCharCode(e[t++]);return s},qi.bin.wf=function(e,t,s){new Float32Array(e.buffer,t,1)[0]=s},qi.bin.wsl=function(e,t,s){e[t]=s,e[t+1]=s>>8},qi.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},qi.parse={},qi.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",n=0;ni&&(i=l),cr&&(r=c),ua&&(a=u)}return{min:{x:t,y:s,z:n},max:{x:i,y:r,z:a}}};class ar extends x{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=d.vec3(t.pos||[0,0,0]),this._up=d.vec3(t.up||[0,1,0]),this._normal=d.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=d.vec3(),this._rtcPos=d.vec3(),this._imageSize=d.vec2(),this._texture=new Wi(this,{flipY:!0}),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new Ri(this,{matrix:d.inverseMat4(d.lookAtMat4v(this._pos,d.subVec3(this._pos,this._normal,d.mat4()),this._up,d.mat4())),children:[this._bitmapMesh=new pi(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new Vt(this,sr({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new Kt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height/e,1,this._height]}}const or=d.OBB3(),lr=d.OBB3(),cr=d.OBB3();class ur{constructor(e,t,s,n,i,r,a=null,o=0){this.model=e,this.object=null,this.parent=null,this.transform=i,this.textureSet=r,this._matrixDirty=!1,this._matrixUpdateScheduled=!1,this.id=t,this.obb=null,this._aabbLocal=null,this._aabbWorld=d.AABB3(),this._aabbWorldDirty=!1,this.layer=a,this.portionId=o,this._color=new Uint8Array([s[0],s[1],s[2],n]),this._colorize=new Uint8Array([s[0],s[1],s[2],n]),this._colorizing=!1,this._transparent=n<255,this.numTriangles=0,this.origin=null,this.entity=null,i&&i._addMesh(this)}_sceneModelDirty(){this._aabbWorldDirty=!0,this.layer.aabbDirty=!0}_transformDirty(){this._matrixDirty||this._matrixUpdateScheduled||(this.model._meshMatrixDirty(this),this._matrixDirty=!0,this._matrixUpdateScheduled=!0),this._aabbWorldDirty=!0,this.layer.aabbDirty=!0,this.entity&&this.entity._transformDirty()}_updateMatrix(){this.transform&&this._matrixDirty&&this.layer.setMatrix(this.portionId,this.transform.worldMatrix),this._matrixDirty=!1,this._matrixUpdateScheduled=!1}_finalize(e){this.layer.initFlags(this.portionId,e,this._transparent)}_finalize2(){this.layer.flushInitFlags&&this.layer.flushInitFlags()}_setVisible(e){this.layer.setVisible(this.portionId,e,this._transparent)}_setColor(e){this._color[0]=e[0],this._color[1]=e[1],this._color[2]=e[2],this._colorizing||this.layer.setColor(this.portionId,this._color,!1)}_setColorize(e){e?(this._colorize[0]=e[0],this._colorize[1]=e[1],this._colorize[2]=e[2],this.layer.setColor(this.portionId,this._colorize,false),this._colorizing=!0):(this.layer.setColor(this.portionId,this._color,false),this._colorizing=!1)}_setOpacity(e,t){const s=e<255,n=this._transparent!==s;this._color[3]=e,this._colorize[3]=e,this._transparent=s,this._colorizing?this.layer.setColor(this.portionId,this._colorize):this.layer.setColor(this.portionId,this._color),n&&this.layer.setTransparent(this.portionId,t,s)}_setOffset(e){this.layer.setOffset(this.portionId,e)}_setHighlighted(e){this.layer.setHighlighted(this.portionId,e,this._transparent)}_setXRayed(e){this.layer.setXRayed(this.portionId,e,this._transparent)}_setSelected(e){this.layer.setSelected(this.portionId,e,this._transparent)}_setEdges(e){this.layer.setEdges(this.portionId,e,this._transparent)}_setClippable(e){this.layer.setClippable(this.portionId,e,this._transparent)}_setCollidable(e){this.layer.setCollidable(this.portionId,e)}_setPickable(e){this.layer.setPickable(this.portionId,e,this._transparent)}_setCulled(e){this.layer.setCulled(this.portionId,e,this._transparent)}canPickTriangle(){return!1}drawPickTriangles(e,t){}pickTriangleSurface(e){}precisionRayPickSurface(e,t,s,n){return!!this.layer.precisionRayPickSurface&&this.layer.precisionRayPickSurface(this.portionId,e,t,s,n)}canPickWorldPos(){return!0}drawPickDepths(e){this.model.drawPickDepths(e)}drawPickNormals(e){this.model.drawPickNormals(e)}delegatePickedEntity(){return this.parent}getEachVertex(e){this.layer.getEachVertex(this.portionId,e)}set aabb(e){this._aabbLocal=e}get aabb(){if(this._aabbWorldDirty){if(d.AABB3ToOBB3(this._aabbLocal,or),this.transform?(d.transformOBB3(this.transform.worldMatrix,or,lr),d.transformOBB3(this.model.worldMatrix,lr,cr),d.OBB3ToAABB3(cr,this._aabbWorld)):(d.transformOBB3(this.model.worldMatrix,or,lr),d.OBB3ToAABB3(lr,this._aabbWorld)),this.origin){const e=this.origin;this._aabbWorld[0]+=e[0],this._aabbWorld[1]+=e[1],this._aabbWorld[2]+=e[2],this._aabbWorld[3]+=e[0],this._aabbWorld[4]+=e[1],this._aabbWorld[5]+=e[2]}this._aabbWorldDirty=!1}return this._aabbWorld}_destroy(){this.model.scene._renderer.putPickID(this.pickId)}}const hr=new class{constructor(){this._uint8Arrays={},this._float32Arrays={}}_clear(){this._uint8Arrays={},this._float32Arrays={}}getUInt8Array(e){let t=this._uint8Arrays[e];return t||(t=new Uint8Array(e),this._uint8Arrays[e]=t),t}getFloat32Array(e){let t=this._float32Arrays[e];return t||(t=new Float32Array(e),this._float32Arrays[e]=t),t}};let pr=0;const dr={NOT_RENDERED:0,COLOR_OPAQUE:1,COLOR_TRANSPARENT:2,SILHOUETTE_HIGHLIGHTED:3,SILHOUETTE_SELECTED:4,SILHOUETTE_XRAYED:5,EDGES_COLOR_OPAQUE:6,EDGES_COLOR_TRANSPARENT:7,EDGES_HIGHLIGHTED:8,EDGES_SELECTED:9,EDGES_XRAYED:10,PICK:11},Ar=new Float32Array([1,1,1,1]),fr=new Float32Array([0,0,0,1]),Ir=d.vec4(),mr=d.vec3(),yr=d.vec3(),vr=d.mat4();class wr{constructor(e,t=!1,{instancing:s=!1,edges:n=!1}={}){this._scene=e,this._withSAO=t,this._instancing=s,this._edges=n,this._hash=this._getHash(),this._matricesUniformBlockBufferBindingPoint=0,this._matricesUniformBlockBuffer=this._scene.canvas.gl.createBuffer(),this._matricesUniformBlockBufferData=new Float32Array(96),this._vaoCache=new WeakMap,this._allocate()}_getHash(){return this._scene._sectionPlanesState.getHash()}_buildShader(){return{vertex:this._buildVertexShader(),fragment:this._buildFragmentShader()}}_buildVertexShader(){return[""]}_buildFragmentShader(){return[""]}_addMatricesUniformBlockLines(e,t=!1){return e.push("uniform Matrices {"),e.push(" mat4 worldMatrix;"),e.push(" mat4 viewMatrix;"),e.push(" mat4 projMatrix;"),e.push(" mat4 positionsDecodeMatrix;"),t&&(e.push(" mat4 worldNormalMatrix;"),e.push(" mat4 viewNormalMatrix;")),e.push("};"),e}_addRemapClipPosLines(e,t=1){return e.push("uniform vec2 drawingBufferSize;"),e.push("uniform vec2 pickClipPos;"),e.push("vec4 remapClipPos(vec4 clipPos) {"),e.push(" clipPos.xy /= clipPos.w;"),1===t?e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"):e.push(` clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(${t}));`),e.push(" clipPos.xy *= clipPos.w;"),e.push(" return clipPos;"),e.push("}"),e}getValid(){return this._hash===this._getHash()}setSectionPlanesStateUniforms(e){const t=this._scene,{gl:s}=t.canvas,{model:n,layerIndex:i}=e,r=t._sectionPlanesState.getNumAllocatedSectionPlanes(),a=t._sectionPlanesState.sectionPlanes.length;if(r>0){const o=t._sectionPlanesState.sectionPlanes,l=i*a,c=n.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0&&A.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,A.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),A.lightMaps.length>0&&A.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,A.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),this._withSAO){const t=a.sao;if(t.possible){const s=o.drawingBufferWidth,n=o.drawingBufferHeight;Ir[0]=s,Ir[1]=n,Ir[2]=t.blendCutoff,Ir[3]=t.blendFactor,o.uniform4fv(this._uSAOParams,Ir),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++}}if(n){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===dr[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=a.xrayMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===dr[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=a.highlightMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===dr[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=a.selectedMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else o.uniform4fv(this._uColor,this._edges?fr:Ar)}this._draw({state:l,frameCtx:e,incrementDrawState:i}),o.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,m.memory.programs--}}class gr extends wr{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!1,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=n.pickElementsCount||s.indicesBuf.numItems,r=n.pickElementsOffset?n.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,r),i&&n.drawElements++}}}class Er extends gr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i;const r=[];r.push("#version 300 es"),r.push("// Triangles batching draw vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class Tr extends gr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching flat-shading draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),n){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}i.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),i.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),i.push("float lambertian = 1.0;"),i.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),i.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),i.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, color.a ));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}class Dr extends gr{constructor(e){super(e,!1,{instancing:!1,edges:!0})}}class Pr extends Dr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Cr extends Dr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry edges drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class _r extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class Rr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class Br extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Or extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Sr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching depth fragment shader"),n.push("precision highp float;"),n.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),n.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),n.push("}"),n}}class Nr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class xr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class Lr extends gr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Triangles batching quality draw vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),r.push("vFragDepth = 1.0 + clipPos.w;")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Triangles batching quality draw fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),a.push("uniform sampler2D uAOMap;"),a.push("in vec4 vViewPosition;"),a.push("in vec3 vViewNormal;"),a.push("in vec4 vColor;"),a.push("in vec2 vUV;"),a.push("in vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick flat normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Fr extends gr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,n=e._sectionPlanesState,i=n.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching color texture fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform sampler2D uColorMap;"),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),r.push("uniform float gammaFactor;"),r.push("vec4 linearToLinear( in vec4 value ) {"),r.push(" return value;"),r.push("}"),r.push("vec4 sRGBToLinear( in vec4 value ) {"),r.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),r.push("}"),r.push("vec4 gammaToLinear( in vec4 value) {"),r.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),r.push("}"),t&&(r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Qr=d.vec3(),Wr=d.vec3(),zr=d.vec3(),Kr=d.vec3(),Yr=d.mat4();class Xr extends wr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Qr;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Wr;if(l){const e=zr;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Yr),m=Kr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElements(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0),o.edgeIndicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class qr{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new br(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new _r(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new Rr(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new kr(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Xr(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Er(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Er(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new Tr(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new Tr(this._scene,!0)),this._flatColorRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new Fr(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new Fr(this._scene,!0)),this._colorTextureRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new Lr(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new Lr(this._scene,!0)),this._pbrRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new br(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Sr(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Nr(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Pr(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Cr(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new _r(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Br(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Mr(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Rr(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Or(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new xr(this._scene)),this._shadowRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Xr(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new kr(this._scene)),this._snapInitRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Jr={};let Zr=65536,$r=5e6;class ea{constructor(){}set doublePrecisionEnabled(e){d.setDoublePrecisionEnabled(e)}get doublePrecisionEnabled(){return d.getDoublePrecisionEnabled()}set maxDataTextureHeight(e){(e=1024*Math.ceil(e/1024))>4096?e=4096:e<1024&&(e=1024),Zr=e}get maxDataTextureHeight(){return Zr}set maxGeometryBatchSize(e){e<1e5?e=1e5:e>5e6&&(e=5e6),$r=e}get maxGeometryBatchSize(){return $r}}const ta=new ea;class sa{constructor(){this.maxVerts=ta.maxGeometryBatchSize,this.maxIndices=3*ta.maxGeometryBatchSize,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const na=d.mat4(),ia=d.mat4();function ra(e,t,s){const n=e.length,i=new Uint16Array(n),r=t[0],a=t[1],o=t[2],l=t[3]-r,c=t[4]-a,u=t[5]-o,h=65525,p=h/l,A=h/c,f=h/u,I=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(n))*(i>=0?1:-1),n=e,i=t}return new Int8Array([Math[t](127.5*n+(n<0?-1:0)),Math[s](127.5*i+(i<0?-1:0))])}function la(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}const ca=d.mat4(),ua=d.mat4(),ha=d.vec4([0,0,0,1]),pa=d.vec3(),da=d.vec3(),Aa=d.vec3(),fa=d.vec3(),Ia=d.vec3(),ma=d.vec3(),ya=d.vec3();class va{constructor(e){console.info("Creating VBOBatchingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Jr[t];return s||(s=new qr(e),Jr[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Jr[t],s._destroy()}))),s}(e.model.scene),this._buffer=new sa(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new at({origin:d.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=d.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=d.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=d.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.solid=!!e.solid}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)for(let e=0,t=r.length;e0){const e=ca;m?d.inverseMat4(d.transposeMat4(m,ua),e):d.identityMat4(e,e),function(e,t,s,n,i){function r(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let a,o,l,c,u,h,p=new Float32Array([0,0,0,0]),A=new Float32Array([0,0,0,0]);for(h=0;hu&&(l=a,u=c),a=oa(A,"floor","ceil"),o=la(a),c=r(A,o),c>u&&(l=a,u=c),a=oa(A,"ceil","ceil"),o=la(a),c=r(A,o),c>u&&(l=a,u=c),n[i+h+0]=l[0],n[i+h+1]=l[1],n[i+h+2]=0}(e,i,i.length,w.normals,w.normals.length)}if(l)for(let e=0,t=l.length;e0)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0){const n=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):ra(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=d.mat4());if(e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const n=new Int8Array(s.normals);let i=!0;e.normalsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.normals.length,3,t.STATIC_DRAW,i)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.uv.length>0)if(e.uvDecodeMatrix){let n=!1;e.uvBuf=new Ge(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,n)}else{const n=Ut.getUVBounds(s.uv),i=Ut.compressUVs(s.uv,n.min,n.max),r=i.quantized;let a=!1;e.uvDecodeMatrix=d.mat3(i.decodeMatrix),e.uvBuf=new Ge(t,t.ARRAY_BUFFER,r,r.length,2,t.STATIC_DRAW,a)}if(s.metallicRoughness.length>0){const n=new Uint8Array(s.metallicRoughness);let i=!1;e.metallicRoughnessBuf=new Ge(t,t.ARRAY_BUFFER,n,s.metallicRoughness.length,2,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n),r=!1;e.flagsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const n=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,n,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,n=this._portions[s],i=4*n.vertsBaseIndex,r=4*n.numVerts,a=this._scratchMemory.getUInt8Array(r),o=t[0],l=t[1],c=t[2],u=t[3];for(let e=0;ey)&&(y=e,n.set(v),i&&d.triangleNormal(A,f,I,i),m=!0)}}return m&&i&&(d.transformVec3(this.model.worldNormalMatrix,i,i),d.normalizeVec3(i)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class wa extends wr{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),i&&n.drawElements++)}}class ga extends wa{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i,r,a;const o=[];for(o.push("#version 300 es"),o.push("// Instancing geometry drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec2 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;"),i=0,r=s.lights.length;i= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),n&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),o.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),i=0,r=s.lights.length;i0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class Ea extends wa{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let n,i;const r=t.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry flat-shading drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),r){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),n=0,i=s.lights.length;n0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing fill fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class ba extends wa{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class Da extends ba{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Pa extends ba{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesColorRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Ca extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class _a extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class Ra extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Ba extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Oa extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("precision highp float;"),r.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),r.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),r.push("}"),r}}class Sa extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class Na extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const xa={3e3:"linearToLinear",3001:"sRGBToLinear"};class La extends wa{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Instancing geometry quality drawing vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("in vec4 modelNormalMatrixCol0;"),r.push("in vec4 modelNormalMatrixCol1;"),r.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),r.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Instancing geometry quality drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),a.push("#define PI 3.14159265359"),a.push("#define RECIPROCAL_PI 0.31830988618"),a.push("#define RECIPROCAL_PI2 0.15915494"),a.push("#define EPSILON 1e-6"),a.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),a.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),a.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),a.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),a.push(" return normalize(surf_norm );"),a.push(" }"),a.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),a.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),a.push(" vec2 st0 = dFdx( uv.st );"),a.push(" vec2 st1 = dFdy( uv.st );"),a.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),a.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),a.push(" vec3 N = normalize( surf_norm );"),a.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),a.push(" mat3 tsn = mat3( S, T, N );"),a.push(" return normalize( tsn * mapN );"),a.push("}"),a.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),a.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),a.push("}"),a.push("struct IncidentLight {"),a.push(" vec3 color;"),a.push(" vec3 direction;"),a.push("};"),a.push("struct ReflectedLight {"),a.push(" vec3 diffuse;"),a.push(" vec3 specular;"),a.push("};"),a.push("struct Geometry {"),a.push(" vec3 position;"),a.push(" vec3 viewNormal;"),a.push(" vec3 worldNormal;"),a.push(" vec3 viewEyeDir;"),a.push("};"),a.push("struct Material {"),a.push(" vec3 diffuseColor;"),a.push(" float specularRoughness;"),a.push(" vec3 specularColor;"),a.push(" float shine;"),a.push("};"),a.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),a.push(" float r = ggxRoughness + 0.0001;"),a.push(" return (2.0 / (r * r) - 2.0);"),a.push("}"),a.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),a.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),a.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),a.push("}"),n.reflectionMaps.length>0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = "+xa[n.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = "+xa[n.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Fa extends wa{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState;let i,r;const a=s.getNumAllocatedSectionPlanes()>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),a){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}for(o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=n.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Qa=d.vec3(),Wa=d.vec3(),za=d.vec3(),Ka=d.vec3(),Ya=d.mat4();class Xa extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Qa;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Wa;if(l){const e=d.transformPoint3(u,l,za);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Ya),m=Ka,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0,o.numInstances),o.edgeIndicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class qa{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new Ta(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new Ca(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new _a(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new ka(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Xa(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new ga(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new ga(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new Ea(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new Ea(this._scene,!0)),this._flatColorRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new La(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new La(this._scene,!0)),this._pbrRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new Fa(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new Fa(this._scene,!0)),this._colorTextureRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ta(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Oa(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Sa(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Da(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Pa(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Ca(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Ra(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Ma(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new _a(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Ba(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new Na(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new ka(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Xa(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Ja={};const Za=new Uint8Array(4),$a=new Float32Array(1),eo=d.vec4([0,0,0,1]),to=new Float32Array(3),so=d.vec3(),no=d.vec3(),io=d.vec3(),ro=d.vec3(),ao=d.vec3(),oo=d.vec3(),lo=d.vec3(),co=new Float32Array(4);class uo{constructor(e){console.info("Creating VBOInstancingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Ja[t];return s||(s=new qa(e),Ja[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Ja[t],s._destroy()}))),s}(e.model.scene),this._aabb=d.collapseAABB3(),this._state=new at({numInstances:0,obb:d.OBB3(),origin:d.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrix=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;e.colorsBuf=new Ge(n,n.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,n.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new Ge(n,n.ARRAY_BUFFER,t,this._metallicRoughness.length,2,n.STATIC_DRAW,s)}if(r>0){let t=!1;e.flagsBuf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(r),r,1,n.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,n.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new Ge(n,n.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,n.STATIC_DRAW,s),e.positionsDecodeMatrix=d.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),i=!1;e.colorsBuf=new Ge(n,n.ARRAY_BUFFER,s,s.length,4,n.STATIC_DRAW,i)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new Ge(n,n.ARRAY_BUFFER,s,s.length,2,n.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,n.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,n.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelMatrixCol1Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelMatrixCol2Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new Ge(n,n.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,n.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Za[0]=t[0],Za[1]=t[1],Za[2]=t[2],Za[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Za,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&J),i=!!(t&se),r=!!(t&ne),a=!!(t&ie),o=!!(t&re),l=!!(t&$),c=!!(t&Z);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?dr.NOT_RENDERED:s?dr.COLOR_TRANSPARENT:dr.COLOR_OPAQUE,h=!n||c?dr.NOT_RENDERED:a?dr.SILHOUETTE_SELECTED:r?dr.SILHOUETTE_HIGHLIGHTED:i?dr.SILHOUETTE_XRAYED:dr.NOT_RENDERED;let p=0;p=!n||c?dr.NOT_RENDERED:a?dr.EDGES_SELECTED:r?dr.EDGES_HIGHLIGHTED:i?dr.EDGES_XRAYED:o?s?dr.EDGES_COLOR_TRANSPARENT:dr.EDGES_COLOR_OPAQUE:dr.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?dr.PICK:dr.NOT_RENDERED)<<12,d|=(t&ee?1:0)<<16,$a[0]=d,this._state.flagsBuf&&this._state.flagsBuf.setData($a,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(to[0]=t[0],to[1]=t[1],to[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(to,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,n=s.geometry,i=this._portions[e];if(!i)return void this.model.error("portion not found: "+e);const r=n.quantizedPositions,a=s.origin,o=i.offset,l=a[0]+o[0],c=a[1]+o[1],u=a[2]+o[2],h=eo,p=i.matrix,A=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=r.length;ev)&&(v=e,n.set(w),i&&d.triangleNormal(f,I,m,i),y=!0)}}return y&&i&&(d.transformVec3(o.normalMatrix,i,i),d.transformVec3(this.model.worldNormalMatrix,i,i),d.normalizeVec3(i)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class ho extends wr{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),i&&n.drawElements++}}class po extends ho{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Ao extends ho{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const fo=d.vec3(),Io=d.vec3(),mo=d.vec3(),yo=d.vec3(),vo=d.mat4();class wo extends wr{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=fo;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Io;if(l){const e=mo;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,vo),m=yo,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const go=d.vec3(),Eo=d.vec3(),To=d.vec3(),bo=d.vec3(),Do=d.mat4();class Po extends wr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=go;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Eo;if(l){const e=To;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Do),m=bo,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Co{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new po(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ao(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new wo(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Po(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const _o={};class Ro{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}class Bo{constructor(e){console.info("Creating VBOBatchingLinesLayer"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=_o[t];return s||(s=new Co(e),_o[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete _o[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new Ro(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new at({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:d.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=d.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=d.vec3(e.origin))}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=ra(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.colors.length>0){const n=s.colors.length/4,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2],c=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines instancing color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class No extends Oo{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const xo=d.vec3(),Lo=d.vec3(),Mo=d.vec3();d.vec3();const Fo=d.mat4();class Ho extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=xo;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Lo;if(l){const e=d.transformPoint3(u,l,Mo);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Fo),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),o.indicesBuf.bind(),r.drawElementsInstanced(r.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind(),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Uo=d.vec3(),Go=d.vec3(),jo=d.vec3();d.vec3();const Vo=d.mat4();class ko extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Uo;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Go;if(l){const e=d.transformPoint3(u,l,jo);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Vo),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Qo{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._snapInitRenderer||(this._snapInitRenderer=new Ho(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new ko(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new So(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new No(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ho(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new ko(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Wo={};const zo=new Uint8Array(4),Ko=new Float32Array(1),Yo=new Float32Array(3),Xo=new Float32Array(4);class qo{constructor(e){console.info("VBOInstancingLinesLayer"),this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Wo[t];return s||(s=new Qo(e),Wo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Wo[t],s._destroy()}))),s}(e.model.scene),this._aabb=d.collapseAABB3(),this._state=new at({obb:d.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,e.origin&&(this._state.origin=d.vec3(e.origin)),this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;this._state.colorsBuf=new Ge(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(i>0){let t=!1;this._state.flagsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(i),i,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(s.colorsCompressed&&s.colorsCompressed.length>0){const n=new Uint8Array(s.colorsCompressed),i=!1;t.colorsBuf=new Ge(e,e.ARRAY_BUFFER,n,n.length,4,e.STATIC_DRAW,i)}if(s.positionsCompressed&&s.positionsCompressed.length>0){const n=!1;t.positionsBuf=new Ge(e,e.ARRAY_BUFFER,s.positionsCompressed,s.positionsCompressed.length,3,e.STATIC_DRAW,n),t.positionsDecodeMatrix=d.mat4(s.positionsDecodeMatrix)}if(s.indices&&s.indices.length>0&&(t.indicesBuf=new Ge(e,e.ELEMENT_ARRAY_BUFFER,new Uint32Array(s.indices),s.indices.length,1,e.STATIC_DRAW),t.numIndices=s.indices.length),this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";zo[0]=t[0],zo[1]=t[1],zo[2]=t[2],zo[3]=t[3],this._state.colorsBuf.setData(zo,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&J),i=!!(t&se),r=!!(t&ne),a=!!(t&ie),o=!!(t&re),l=!!(t&$),c=!!(t&Z);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?dr.NOT_RENDERED:s?dr.COLOR_TRANSPARENT:dr.COLOR_OPAQUE,h=!n||c?dr.NOT_RENDERED:a?dr.SILHOUETTE_SELECTED:r?dr.SILHOUETTE_HIGHLIGHTED:i?dr.SILHOUETTE_XRAYED:dr.NOT_RENDERED;let p=0;p=!n||c?dr.NOT_RENDERED:a?dr.EDGES_SELECTED:r?dr.EDGES_HIGHLIGHTED:i?dr.EDGES_XRAYED:o?s?dr.EDGES_COLOR_TRANSPARENT:dr.EDGES_COLOR_OPAQUE:dr.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?dr.PICK:dr.NOT_RENDERED)<<12,d|=(t&ee?255:0)<<16,Ko[0]=d,this._state.flagsBuf.setData(Ko,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Yo[0]=t[0],Yo[1]=t[1],Yo[2]=t[2],this._state.offsetsBuf.setData(Yo,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;Xo[0]=t[0],Xo[1]=t[4],Xo[2]=t[8],Xo[3]=t[12],this._state.modelMatrixCol0Buf.setData(Xo,s),Xo[0]=t[1],Xo[1]=t[5],Xo[2]=t[9],Xo[3]=t[13],this._state.modelMatrixCol1Buf.setData(Xo,s),Xo[0]=t[2],Xo[1]=t[6],Xo[2]=t[10],Xo[3]=t[14],this._state.modelMatrixCol2Buf.setData(Xo,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,dr.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,dr.PICK)}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class Jo extends wr{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),i&&n.drawArrays++}}class Zo extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial,n=[];return n.push("#version 300 es"),n.push("// Points batching color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class $o extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 color;"),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching silhouette vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}class el extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class tl extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batched pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batched pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class sl extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push(" gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching occlusion fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}const nl=d.vec3(),il=d.vec3(),rl=d.vec3(),al=d.vec3(),ol=d.mat4();class ll extends wr{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=nl;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=il;if(l){const e=rl;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,ol),m=al,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const cl=d.vec3(),ul=d.vec3(),hl=d.vec3(),pl=d.vec3(),dl=d.mat4();class Al extends wr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=cl;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=ul;if(l){const e=hl;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,dl),m=pl,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class fl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Zo(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new $o(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new el(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new tl(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new sl(this._scene)),this._occlusionRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new ll(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Al(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Il={};class ml{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}class yl{constructor(e){console.info("Creating VBOBatchingPointsLayer"),this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Il[t];return s||(s=new fl(e),Il[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Il[t],s._destroy()}))),s}(e.model.scene),this._buffer=new ml(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new at({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:d.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=d.collapseAABB3(),this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=d.vec3(e.origin))}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=ra(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class gl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 silhouetteColor;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class El extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick mesh fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class Tl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class bl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Dl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing depth vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class Pl extends vl{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }"),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const Cl=d.vec3(),_l=d.vec3(),Rl=d.vec3();d.vec3();const Bl=d.mat4();class Ol extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Cl;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=_l;if(l){const e=d.transformPoint3(u,l,Rl);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Bl),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),r.drawArraysInstanced(r.POINTS,0,o.positionsBuf.numItems,o.numInstances),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Sl=d.vec3(),Nl=d.vec3(),xl=d.vec3();d.vec3();const Ll=d.mat4();class Ml extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Sl;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Nl;if(l){const e=d.transformPoint3(u,l,xl);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Ll),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Fl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new wl(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new gl(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Dl(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new El(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Tl(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new bl(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new Pl(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ol(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Ml(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Hl={};const Ul=new Uint8Array(4),Gl=new Float32Array(1),jl=new Float32Array(3),Vl=new Float32Array(4);class kl{constructor(e){console.info("VBOInstancingPointsLayer"),this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Hl[t];return s||(s=new Fl(e),Hl[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Hl[t],s._destroy()}))),s}(e.model.scene),this._aabb=d.collapseAABB3(),this._state=new at({obb:d.OBB3(),numInstances:0,origin:e.origin?d.vec3(e.origin):null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let n=!1;s.flagsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,n)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;s.offsetsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(n.positionsCompressed&&n.positionsCompressed.length>0){const t=!1;s.positionsBuf=new Ge(e,e.ARRAY_BUFFER,n.positionsCompressed,n.positionsCompressed.length,3,e.STATIC_DRAW,t),s.positionsDecodeMatrix=d.mat4(n.positionsDecodeMatrix)}if(n.colorsCompressed&&n.colorsCompressed.length>0){const t=new Uint8Array(n.colorsCompressed),i=!1;s.colorsBuf=new Ge(e,e.ARRAY_BUFFER,t,t.length,4,e.STATIC_DRAW,i)}if(this._modelMatrixCol0.length>0){const t=!1;s.modelMatrixCol0Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),s.modelMatrixCol1Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),s.modelMatrixCol2Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;s.pickColorsBuf=new Ge(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}s.geometry=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Ul[0]=t[0],Ul[1]=t[1],Ul[2]=t[2],this._state.colorsBuf.setData(Ul,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&J),i=!!(t&se),r=!!(t&ne),a=!!(t&ie),o=!!(t&re),l=!!(t&$),c=!!(t&Z);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?dr.NOT_RENDERED:s?dr.COLOR_TRANSPARENT:dr.COLOR_OPAQUE,h=!n||c?dr.NOT_RENDERED:a?dr.SILHOUETTE_SELECTED:r?dr.SILHOUETTE_HIGHLIGHTED:i?dr.SILHOUETTE_XRAYED:dr.NOT_RENDERED;let p=0;p=!n||c?dr.NOT_RENDERED:a?dr.EDGES_SELECTED:r?dr.EDGES_HIGHLIGHTED:i?dr.EDGES_XRAYED:o?s?dr.EDGES_COLOR_TRANSPARENT:dr.EDGES_COLOR_OPAQUE:dr.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?dr.PICK:dr.NOT_RENDERED)<<12,d|=(t&ee?255:0)<<16,Gl[0]=d,this._state.flagsBuf.setData(Gl,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(jl[0]=t[0],jl[1]=t[1],jl[2]=t[2],this._state.offsetsBuf.setData(jl,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;Vl[0]=t[0],Vl[1]=t[4],Vl[2]=t[8],Vl[3]=t[12],this._state.modelMatrixCol0Buf.setData(Vl,s),Vl[0]=t[1],Vl[1]=t[5],Vl[2]=t[9],Vl[3]=t[13],this._state.modelMatrixCol1Buf.setData(Vl,s),Vl[0]=t[2],Vl[1]=t[6],Vl[2]=t[10],Vl[3]=t[14],this._state.modelMatrixCol2Buf.setData(Vl,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,dr.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,dr.PICK)}drawPickNormals(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,dr.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,dr.PICK)}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}const Ql=d.vec3(),Wl=d.vec3(),zl=d.mat4();class Kl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uPerObjectDecodeMatrix,this._uPerVertexPosition,this.uPerObjectColorAndFlags,this._uPerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Ql;if(I){const t=d.transformPoint3(h,c,Wl);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,zl)}else f=A;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,8),a.drawArrays(a.LINES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,16),a.drawArrays(a.LINES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,32),a.drawArrays(a.LINES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// LinesDataTextureColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uPerObjectDecodeMatrix;"),s.push("uniform highp sampler2D uPerObjectMatrix;"),s.push("uniform lowp usampler2D uPerObjectColorAndFlags;"),s.push("uniform mediump usampler2D uPerVertexPosition;"),s.push("uniform highp usampler2D uPerLineIndices;"),s.push("uniform mediump usampler2D uPerLineObject;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push(" int lineIndex = gl_VertexID / 2;"),s.push(" int h_packed_object_id_index = (lineIndex >> 3) & 4095;"),s.push(" int v_packed_object_id_index = (lineIndex >> 3) >> 12;"),s.push(" int objectIndex = int(texelFetch(uPerLineObject, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push(" ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" } else {"),s.push(" ivec4 packedVertexBase = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push(" ivec4 packedLineIndexBaseOffset = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push(" int lineIndexBaseOffset = (packedLineIndexBaseOffset.r << 24) + (packedLineIndexBaseOffset.g << 16) + (packedLineIndexBaseOffset.b << 8) + packedLineIndexBaseOffset.a;"),s.push(" int h_index = (lineIndex - lineIndexBaseOffset) & 4095;"),s.push(" int v_index = (lineIndex - lineIndexBaseOffset) >> 12;"),s.push(" ivec3 vertexIndices = ivec3(texelFetch(uPerLineIndices, ivec2(h_index, v_index), 0));"),s.push(" ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push(" int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push(" int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push(" mat4 objectInstanceMatrix = mat4 (texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" vec3 position = vec3(texelFetch(uPerVertexPosition, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" uvec4 color = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push(" if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" };"),s.push(" vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push(" vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push(" vFragDepth = 1.0 + clipPos.w;"),s.push(" isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push(" gl_Position = clipPos;"),s.push(" vec4 rgb = vec4(color.rgba);"),s.push(" vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// LinesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Yl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null)}eagerCreateRenders(){}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Kl(this._scene,!1)),this._colorRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy()}}const Xl={};class ql{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perLineNumberPortionId8Bits=[],this.perLineNumberPortionId16Bits=[],this.perLineNumberPortionId32Bits=[]}}class Jl{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerLineIdPortionIds8Bits=null,this.texturePerLineIdPortionIds16Bits=null,this.texturePerLineIdPortionIds32Bits=null,this.texturePerLineIdIndices8Bits=null,this.texturePerLineIdIndices16Bits=null,this.texturePerLineIdIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerLineIdIndices8Bits,16:this.texturePerLineIdIndices16Bits,32:this.texturePerLineIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerLineIdPortionIds8Bits,16:this.texturePerLineIdPortionIds16Bits,32:this.texturePerLineIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindLineIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}}class Zl{constructor(e,t,s,n,i=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=n,this._textureData=i}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const $l={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalLines:0,totalLines8Bits:0,totalLines16Bits:0,totalLines32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify($l,null,4));let e=0;Object.keys($l).forEach((t=>{t.startsWith("size")&&(e+=$l[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/$l.totalLines).toFixed(2)}`);let t={};Object.keys($l).forEach((s=>{s.startsWith("size")&&(t[s]=`${($l[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class ec{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateTextureForColorsAndFlags(e,t,s,n,i){const r=t.length;this.numPortions=r;const a=4096,o=Math.ceil(r/512);if(0===o)throw"texture height===0";const l=new Uint8Array(16384*o);$l.sizeDataColorsAndFlags+=l.byteLength,$l.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),l.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20);const c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,a,o),e.texSubImage2D(e.TEXTURE_2D,0,0,0,a,o,e.RGBA_INTEGER,e.UNSIGNED_BYTE,l,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,c,a,o,l)}generateTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);$l.sizeDataTextureOffsets+=i.byteLength,$l.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,r,s,n,i)}generateTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);$l.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Xl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new ql,this._dataTextureState=new Jl,this._dataTextureGenerator=new ec,this._state=new at({origin:d.vec3(t.origin),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&$l.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/2})),(this._state.numVertices+n>4096*sc||t+i>4096*sc)&&$l.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*sc&&t+i<=4096*sc}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/2/8)*2;$l.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}const s=t.positionsCompressed,n=t.indices,i=this._buffer;i.positionsCompressed.push(s);const r=i.lenPositionsCompressed/3,a=s.length/3;let o;i.lenPositionsCompressed+=s.length;let l=0;if(n){let e;l=n.length/2,a<=256?(e=i.indices8Bits,o=i.lenIndices8Bits/2,i.lenIndices8Bits+=n.length):a<=65536?(e=i.indices16Bits,o=i.lenIndices16Bits/2,i.lenIndices16Bits+=n.length):(e=i.indices32Bits,o=i.lenIndices32Bits/2,i.lenIndices32Bits+=n.length),e.push(n)}this._state.numVertices+=a,$l.numberOfGeometries++;return{vertexBase:r,numVertices:a,numLines:l,indicesBase:o}}_createSubPortion(e,t){const s=e.color,n=e.colors,i=e.opacity,r=e.meshMatrix,a=e.pickColor,o=this._buffer,l=this._state;o.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),o.perObjectInstancePositioningMatrices.push(r||oc),o.perObjectSolid.push(!!e.solid),n?o.perObjectColors.push([255*n[0],255*n[1],255*n[2],255]):s&&o.perObjectColors.push([s[0],s[1],s[2],i]),o.perObjectPickColors.push(a),o.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?l.numIndices8Bits:t.numVertices<=65536?l.numIndices16Bits:l.numIndices32Bits,o.perObjectIndexBaseOffsets.push(e/2-t.indicesBase)}const c=this._subPortions.length;if(t.numLines>0){let e,s=2*t.numLines;t.numVertices<=256?(e=o.perLineNumberPortionId8Bits,l.numIndices8Bits+=s,$l.totalLines8Bits+=t.numLines):t.numVertices<=65536?(e=o.perLineNumberPortionId16Bits,l.numIndices16Bits+=s,$l.totalLines16Bits+=t.numLines):(e=o.perLineNumberPortionId32Bits,l.numIndices32Bits+=s,$l.totalLines32Bits+=t.numLines),$l.totalLines+=t.numLines;for(let s=0;s0&&(t.texturePerLineIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerLineIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerLineIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,ic))}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),h.bindTexture(h.TEXTURE_2D,u.texturePerObjectColorsAndFlags._texture),h.texSubImage2D(h.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,h.RGBA_INTEGER,h.UNSIGNED_BYTE,ic))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,ic))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,rc))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,nc))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){}drawSilhouetteHighlighted(e,t){}drawSilhouetteSelected(e,t){}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}setPickMatrices(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawSnapInit(e,t){}drawSnap(e,t){}drawPickNormals(e,t){}destroy(){if(this._destroyed)return;const e=this._state;this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const cc=d.vec3(),uc=d.vec3(),hc=d.vec3();d.vec3();const pc=d.vec4(),dc=d.mat4();class Ac{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=cc;if(I){const t=d.transformPoint3(h,c,uc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(i.viewMatrix,e,dc),f=hc,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uLightAmbient=n.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const i=s.lights;let r;for(let e=0,t=i.length;e0;let i;const r=[];r.push("#version 300 es"),r.push("// TrianglesDataTextureColorRenderer vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("uniform mat4 sceneModelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),r.push("uniform highp sampler2D uTexturePerObjectMatrix;"),r.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),r.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),r.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),r.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),r.push("uniform vec3 uCameraEyeRtc;"),r.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("out float isPerspective;")),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),r.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),r.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),r.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),r.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),r.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),r.push("if (int(flags.x) != renderPass) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("} else {"),r.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),r.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),r.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),r.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),r.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),r.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),r.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),r.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),r.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),r.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),r.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),r.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),r.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),r.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),r.push("if (color.a == 0u) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("};"),r.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),r.push("vec3 position;"),r.push("position = positions[gl_VertexID % 3];"),r.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),r.push("if (solid != 1u) {"),r.push("if (isPerspectiveMatrix(projMatrix)) {"),r.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),r.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("} else {"),r.push("if (viewNormal.z < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("}"),r.push("}"),r.push("vec4 worldPosition = sceneModelMatrix * ((objectDecodeAndInstanceMatrix * vec4(position, 1.0))); "),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const fc=new Float32Array([1,1,1]),Ic=d.vec3(),mc=d.vec3(),yc=d.vec3();d.vec3();const vc=d.mat4();class wc{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=Ic;if(c){const t=mc;d.transformPoint3(h,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,vc),I=yc,I[0]=i.eye[0]-e[0],I[1]=i.eye[1]-e[1],I[2]=i.eye[2]-e[2]}else f=A,I=i.eye;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s===dr.SILHOUETTE_XRAYED){const e=n.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.SILHOUETTE_HIGHLIGHTED){const e=n.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.SILHOUETTE_SELECTED){const e=n.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,fc);if(n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=n._sectionPlanesState.getNumAllocatedSectionPlanes(),y=n._sectionPlanesState.sectionPlanes.length;if(m>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = color;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const gc=new Float32Array([0,0,0,1]),Ec=d.vec3(),Tc=d.vec3();d.vec3();const bc=d.mat4();class Dc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Ec;if(I){const t=d.transformPoint3(h,c,Tc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,bc)}else f=A;if(a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===dr.EDGES_XRAYED){const e=i.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.EDGES_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.EDGES_SELECTED){const e=i.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,gc);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("mat4 matrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer fragment shader"),e.logarithmicDepthBufferEnabled&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Pc=d.vec3(),Cc=d.vec3(),_c=d.mat4();class Rc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Pc;if(I){const t=d.transformPoint3(h,c,Cc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,_c)}else f=A;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uObjectPerObjectOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Bc=d.vec3(),Oc=d.vec3(),Sc=d.vec3(),Nc=d.mat4();class xc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n;let A,f;l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Bc;if(I){const t=d.transformPoint3(h,c,Oc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(r.viewMatrix,e,Nc),f=Sc,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=r.viewMatrix,f=r.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const e=2/(Math.log(r.project.far+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,e)}const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry picking fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uvec4 vFlags2;");for(var n=0;n 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outPickColor = vPickColor; "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Lc=d.vec3(),Mc=d.vec3(),Fc=d.vec3();d.vec3();const Hc=d.mat4();class Uc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=e.pickViewMatrix||r.viewMatrix;let f,I;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const t=Lc;if(c){const e=Mc;d.transformPoint3(h,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],f=z(A,t,Hc),I=Fc,I[0]=r.eye[0]-t[0],I[1]=r.eye[1]-t[1],I[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=A,I=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniform1f(this._uPickZNear,e.pickZNear),a.uniform1f(this._uPickZFar,e.pickZFar),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform float pickZNear;"),s.push("uniform float pickZFar;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(var n=0;n 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),s.push(" outPackedDepth = packDepth(zNormalizedDepth); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Gc=d.vec3(),jc=d.vec3(),Vc=d.vec3(),kc=d.vec3();d.vec3();const Qc=d.mat4();class Wc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=Gc;let m,y;I[0]=d.safeInv(A[3]-A[0])*d.MAX_INT,I[1]=d.safeInv(A[4]-A[1])*d.MAX_INT,I[2]=d.safeInv(A[5]-A[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(I[0]),e.snapPickCoordinateScale[1]=d.safeInv(I[1]),e.snapPickCoordinateScale[2]=d.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=jc;if(v){const e=d.transformPoint3(h,c,Vc);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=z(f,t,Qc),y=kc,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(T,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(T,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(T,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const zc=d.vec3(),Kc=d.vec3(),Yc=d.vec3(),Xc=d.vec3();d.vec3();const qc=d.mat4();class Jc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=zc;let m,y;I[0]=d.safeInv(A[3]-A[0])*d.MAX_INT,I[1]=d.safeInv(A[4]-A[1])*d.MAX_INT,I[2]=d.safeInv(A[5]-A[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(I[0]),e.snapPickCoordinateScale[1]=d.safeInv(I[1]),e.snapPickCoordinateScale[2]=d.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=Kc;if(v){const e=Yc;d.transformPoint3(h,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=z(f,t,qc),y=Xc,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this._uVectorA,e.snapVectorA),a.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Zc=d.vec3(),$c=d.vec3(),eu=d.vec3();d.vec3();const tu=d.mat4();class su{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=e.pickViewMatrix||r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=Zc;if(c){const t=$c;d.transformPoint3(h,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,tu),I=eu,I[0]=r.eye[0]-e[0],I[1]=r.eye[1]-e[1],I[2]=r.eye[2]-e[2]}else f=A,I=r.eye;a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureOcclusionRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const nu=d.vec3(),iu=d.vec3(),ru=d.vec3();d.vec3();const au=d.mat4();class ou{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=nu;if(I){const t=d.transformPoint3(h,c,iu);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(i.viewMatrix,e,au),f=ru,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("objectDecodeAndInstanceMatrix"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture draw vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out highp vec2 vHighPrecisionZW;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in highp vec2 vHighPrecisionZW;"),s.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),s.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const lu=d.vec3(),cu=d.vec3(),uu=d.vec3();d.vec3();const hu=d.mat4();class pu{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const I=0!==l[0]||0!==l[1]||0!==l[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(I||m){const e=lu;if(I){const t=cu;d.transformPoint3(u,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],A=z(p,e,hu),f=uu,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=p,f=r.eye;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,h),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.uniformMatrix4fv(this._uWorldNormalMatrix,!1,n.worldNormalMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 objectDecodeAndInstanceMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(Be.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const du=d.vec3(),Au=d.vec3(),fu=d.vec3();d.vec3(),d.vec4();const Iu=d.mat4();class mu{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=du;if(I){const t=d.transformPoint3(h,c,Au);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(i.viewMatrix,e,Iu),f=fu,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// trianglesDatatextureNormalsRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("in vec4 vWorldPosition;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(` outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class yu{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new wc(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new xc(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new Uc(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new mu(this._scene)),this._snapRenderer||(this._snapRenderer=new Wc(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Jc(this._scene)),this._snapRenderer||(this._snapRenderer=new Wc(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Ac(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Ac(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new wc(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ou(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new pu(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Dc(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Rc(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new xc(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new mu(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new mu(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Uc(this._scene)),this._pickDepthRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Wc(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Jc(this._scene)),this._snapInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new su(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const vu={};class wu{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.metallicRoughness=[],this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.edgeIndices8Bits=[],this.lenEdgeIndices8Bits=0,this.edgeIndices16Bits=[],this.lenEdgeIndices16Bits=0,this.edgeIndices32Bits=[],this.lenEdgeIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class gu{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindTriangleIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}bindEdgeIndicesTextures(e,t,s,n){this.edgeIndicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[n].bindTexture(e,s,6)}}const Eu={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Eu,null,4));let e=0;Object.keys(Eu).forEach((t=>{t.startsWith("size")&&(e+=Eu[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/Eu.totalPolygons).toFixed(2)}`);let t={};Object.keys(Eu).forEach((s=>{s.startsWith("size")&&(t[s]=`${(Eu[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class Tu{constructor(){}disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}createTextureForColorsAndFlags(e,t,s,n,i,r,a){const o=t.length;this.numPortions=o;const l=4096,c=Math.ceil(o/512);if(0===c)throw"texture height===0";const u=new Uint8Array(16384*c);Eu.sizeDataColorsAndFlags+=u.byteLength,Eu.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),u.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20),u.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+24),u.set([a[e]?1:0,0,0,0],32*e+28);const h=e.createTexture();return e.bindTexture(e.TEXTURE_2D,h),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,c),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,c,e.RGBA_INTEGER,e.UNSIGNED_BYTE,u,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,h,l,c,u)}createTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);Eu.sizeDataTextureOffsets+=i.byteLength,Eu.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,r,s,n,i)}createTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);Eu.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete vu[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new wu,this._dtxState=new gu,this._dtxTextureFactory=new Tu,this._state=new at({origin:d.vec3(t.origin),metallicRoughnessBuf:null,textureState:this._dtxState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&Eu.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/3})),(this._state.numVertices+n>4096*Du||t+i>4096*Du)&&Eu.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*Du&&t+i<=4096*Du}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;Eu.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;Eu.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,n=t.indices,i=t.edgeIndices,r=this._buffer;r.positionsCompressed.push(s);const a=r.lenPositionsCompressed/3,o=s.length/3;let l;r.lenPositionsCompressed+=s.length;let c,u=0;if(n){let e;u=n.length/3,o<=256?(e=r.indices8Bits,l=r.lenIndices8Bits/3,r.lenIndices8Bits+=n.length):o<=65536?(e=r.indices16Bits,l=r.lenIndices16Bits/3,r.lenIndices16Bits+=n.length):(e=r.indices32Bits,l=r.lenIndices32Bits/3,r.lenIndices32Bits+=n.length),e.push(n)}let h=0;if(i){let e;h=i.length/2,o<=256?(e=r.edgeIndices8Bits,c=r.lenEdgeIndices8Bits/2,r.lenEdgeIndices8Bits+=i.length):o<=65536?(e=r.edgeIndices16Bits,c=r.lenEdgeIndices16Bits/2,r.lenEdgeIndices16Bits+=i.length):(e=r.edgeIndices32Bits,c=r.lenEdgeIndices32Bits/2,r.lenEdgeIndices32Bits+=i.length),e.push(i)}this._state.numVertices+=o,Eu.numberOfGeometries++;return{vertexBase:a,numVertices:o,numTriangles:u,numEdges:h,indicesBase:l,edgeIndicesBase:c}}_createSubPortion(e,t,s,n){const i=e.color;e.metallic,e.roughness;const r=e.colors,a=e.opacity,o=e.meshMatrix,l=e.pickColor,c=this._buffer,u=this._state;c.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),c.perObjectInstancePositioningMatrices.push(o||Bu),c.perObjectSolid.push(!!e.solid),r?c.perObjectColors.push([255*r[0],255*r[1],255*r[2],255]):i&&c.perObjectColors.push([i[0],i[1],i[2],a]),c.perObjectPickColors.push(l),c.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?u.numIndices8Bits:t.numVertices<=65536?u.numIndices16Bits:u.numIndices32Bits,c.perObjectIndexBaseOffsets.push(e/3-t.indicesBase)}{let e;e=t.numVertices<=256?u.numEdgeIndices8Bits:t.numVertices<=65536?u.numEdgeIndices16Bits:u.numEdgeIndices32Bits,c.perObjectEdgeIndexBaseOffsets.push(e/2-t.edgeIndicesBase)}const h=this._subPortions.length;if(t.numTriangles>0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=c.perTriangleNumberPortionId8Bits,u.numIndices8Bits+=s,Eu.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=c.perTriangleNumberPortionId16Bits,u.numIndices16Bits+=s,Eu.totalPolygons16Bits+=t.numTriangles):(e=c.perTriangleNumberPortionId32Bits,u.numIndices32Bits+=s,Eu.totalPolygons32Bits+=t.numTriangles),Eu.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=c.perEdgeNumberPortionId8Bits,u.numEdgeIndices8Bits+=s,Eu.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=c.perEdgeNumberPortionId16Bits,u.numEdgeIndices16Bits+=s,Eu.totalEdges16Bits+=t.numEdges):(e=c.perEdgeNumberPortionId32Bits,u.numEdgeIndices32Bits+=s,Eu.totalEdges32Bits+=t.numEdges),Eu.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId8Bits)),n.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId16Bits)),n.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId32Bits)),n.lenIndices8Bits>0&&(t.texturePerPolygonIdIndices8Bits=this._dtxTextureFactory.createTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerPolygonIdIndices16Bits=this._dtxTextureFactory.createTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerPolygonIdIndices32Bits=this._dtxTextureFactory.createTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),n.lenEdgeIndices8Bits>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dtxTextureFactory.createTextureFor8BitsEdgeIndices(s,n.edgeIndices8Bits,n.lenEdgeIndices8Bits)),n.lenEdgeIndices16Bits>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dtxTextureFactory.createTextureFor16BitsEdgeIndices(s,n.edgeIndices16Bits,n.lenEdgeIndices16Bits)),n.lenEdgeIndices32Bits>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dtxTextureFactory.createTextureFor32BitsEdgeIndices(s,n.edgeIndices32Bits,n.lenEdgeIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dtxState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,Cu)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),A.bindTexture(A.TEXTURE_2D,d.texturePerObjectColorsAndFlags._texture),A.texSubImage2D(A.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,A.RGBA_INTEGER,A.UNSIGNED_BYTE,Cu))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,Cu))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,_u))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,Pu))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._renderers.colorRendererWithSAO&&this._renderers.colorRendererWithSAO.drawLayer(t,this,dr.COLOR_OPAQUE):this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.depthRenderer&&this._renderers.depthRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.normalsRenderer&&this._renderers.normalsRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,dr.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,dr.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,dr.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,dr.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,dr.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.shadowRenderer&&this._renderers.shadowRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}setPickMatrices(e,t){}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,dr.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,dr.PICK))}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,dr.PICK))}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,dr.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickNormalsRenderer&&this._renderers.pickNormalsRenderer.drawLayer(t,this,dr.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}class Su{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class Nu{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const xu={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class Lu{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==Hu[e])return void Hu[e].push({onLoad:t,onProgress:s,onError:n});Hu[e]=[],Hu[e].push({onLoad:t,onProgress:s,onError:n});const r=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(r).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=Hu[e],n=t.body.getReader(),i=t.headers.get("Content-Length"),r=i?parseInt(i):0,a=0!==r;let o=0;const l=new ReadableStream({start(e){!function t(){n.read().then((({done:n,value:i})=>{if(n)e.close();else{o+=i.byteLength;const n=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:r});for(let e=0,t=s.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),s=t&&t[1]?t[1].toLowerCase():void 0,n=new TextDecoder(s);return e.arrayBuffer().then((e=>n.decode(e)))}}})).then((t=>{xu.add(e,t);const s=Hu[e];delete Hu[e];for(let e=0,n=s.length;e{const s=Hu[e];if(void 0===s)throw this.manager.itemError(e),t;delete Hu[e];for(let e=0,n=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Gu{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const n=this._getIdleWorker();-1!==n?(this._initWorker(n),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let ju=0;class Vu{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new Gu,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const n=e.capabilities;this._workerConfig={astcSupported:n.astcSupported,etc1Supported:n.etc1Supported,etc2Supported:n.etc2Supported,dxtSupported:n.dxtSupported,bptcSupported:n.bptcSupported,pvrtcSupported:n.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new Uu;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new Uu;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const n=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,n]).then((([e,t])=>{const s=Vu.BasisWorker.toString(),n=["/* constants */","let _EngineFormat = "+JSON.stringify(Vu.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Vu.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Vu.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([n])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),ju>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),ju++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((n,i)=>{const r=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:r},e))).then((e=>{const s=e.data,{mipmaps:r,width:a,height:o,format:l,type:c,error:u,dfdTransferFn:h,dfdFlags:p}=s;if("error"===c)return i(u);t.setCompressedData({mipmaps:r,props:{format:l,minFilter:1===r.length?1006:1008,magFilter:1===r.length?1006:1008,encoding:2===h?3001:3e3,premultiplyAlpha:!!(1&p)}}),n()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),ju--}}Vu.BasisFormat={ETC1S:0,UASTC_4x4:1},Vu.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Vu.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},Vu.BasisWorker=function(){let e,t,s;const n=_EngineFormat,i=_TranscoderFormat,r=_BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":e=u.config,h=u.transcoderBinary,t=new Promise((e=>{s={wasmBinary:h,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:a,hasAlpha:h,mipmaps:p,format:d,dfdTransferFn:A,dfdFlags:f}=function(t){const a=new s.KTX2File(new Uint8Array(t));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const h=a.isUASTC()?r.UASTC_4x4:r.ETC1S,p=a.getWidth(),d=a.getHeight(),A=a.getLevels(),f=a.getHasAlpha(),I=a.getDFDTransferFunc(),m=a.getDFDFlags(),{transcoderFormat:y,engineFormat:v}=function(t,s,a,u){let h,p;const d=t===r.ETC1S?o:l;for(let n=0;n{delete ku[t],s.destroy()}))),s} +class e{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){let e;if(2===arguments.length){const t=arguments[0];if(e=arguments[1],this.items[t])throw"ID clash: '"+t+"'";return this.items[t]=e,t}for(e=arguments[0]||{};;){const t=this._lastUniqueId++;if(!this.items[t])return this.items[t]=e,t}}removeItem(e){const t=this.items[e];return delete this.items[e],t}}const t=new e;class s{constructor(e){this.id=e,this.parentItem=null,this.groups=[],this.menuElement=null,this.shown=!1,this.mouseOver=0}}class n{constructor(){this.items=[]}}class i{constructor(e,t,s,n,i){this.id=e,this.getTitle=t,this.doAction=s,this.getEnabled=n,this.getShown=i,this.itemElement=null,this.subMenu=null,this.enabled=!0}}class r{constructor(e={}){this._id=t.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==e.hideOnMouseDown&&(document.addEventListener("mousedown",(e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{e.target.classList.contains("xeokit-context-menu-item")||this.hide()})),e.items&&(this.items=e.items),this._hideOnAction=!1!==e.hideOnAction,this.context=e.context,this.enabled=!1!==e.enabled,this.hide()}on(e,t){let s=this._eventSubs[e];s||(s=[],this._eventSubs[e]=s),s.push(t)}fire(e,t){const s=this._eventSubs[e];if(s)for(let e=0,n=s.length;e{const r=this._getNextId(),a=new s(r);for(let s=0,r=e.length;s0,c=this._getNextId(),u=s.getTitle||(()=>s.title||""),h=s.doAction||s.callback||(()=>{}),p=s.getEnabled||(()=>!0),d=s.getShown||(()=>!0),A=new i(c,u,h,p,d);if(A.parentMenu=a,o.items.push(A),l){const e=t(n);A.subMenu=e,e.parentItem=A}this._itemList.push(A),this._itemMap[A.id]=A}}return this._menuList.push(a),this._menuMap[a.id]=a,a};this._rootMenu=t(e)}_getNextId(){return"ContextMenu_"+this._id+"_"+this._nextId++}_createUI(){const e=t=>{this._createMenuUI(t);const s=t.groups;for(let t=0,n=s.length;t'),s.push("
    "),t)for(let e=0,n=t.length;e'+l+" [MORE]"):s.push('
  • '+l+"
  • ")}}s.push("
"),s.push("");const n=s.join("");document.body.insertAdjacentHTML("beforeend",n);const i=document.querySelector("."+e.id);e.menuElement=i,i.style["border-radius"]="4px",i.style.display="none",i.style["z-index"]=3e5,i.style.background="white",i.style.border="1px solid black",i.style["box-shadow"]="0 4px 5px 0 gray",i.oncontextmenu=e=>{e.preventDefault()};const r=this;let a=null;if(t)for(let e=0,s=t.length;e{e.preventDefault();const s=t.subMenu;if(!s)return void(a&&(r._hideMenu(a.id),a=null));if(a&&a.id!==s.id&&(r._hideMenu(a.id),a=null),!1===t.enabled)return;const n=t.itemElement,i=s.menuElement,o=n.getBoundingClientRect();i.getBoundingClientRect();o.right+200>window.innerWidth?r._showMenu(s.id,o.left-200,o.top-1):r._showMenu(s.id,o.right-5,o.top-1),a=s})),n||(t.itemElement.addEventListener("click",(e=>{e.preventDefault(),r._context&&!1!==t.enabled&&(t.doAction&&t.doAction(r._context),this._hideOnAction?r.hide():(r._updateItemsTitles(),r._updateItemsEnabledStatus()))})),t.itemElement.addEventListener("mouseenter",(e=>{e.preventDefault(),!1!==t.enabled&&t.doHover&&t.doHover(r._context)})))):console.error("ContextMenu item element not found: "+t.id)}}}_updateItemsTitles(){if(this._context)for(let e=0,t=this._itemList.length;ewindow.innerHeight&&(s=window.innerHeight-n),t+i>window.innerWidth&&(t=window.innerWidth-i),e.style.left=t+"px",e.style.top=s+"px"}_hideMenuElement(e){e.style.display="none"}}class a{constructor(e,t={}){this.viewer=e,this.scene=this.viewer.scene,this._lensCursorDiv=document.createElement("div"),this.viewer.scene.canvas.canvas.parentNode.insertBefore(this._lensCursorDiv,this.viewer.scene.canvas.canvas),this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red",this._lensCursorDiv.style.borderRadius="20px",this._lensCursorDiv.style.width="10px",this._lensCursorDiv.style.height="10px",this._lensCursorDiv.style.margin="-200px -200px",this._lensCursorDiv.style.zIndex="100000",this._lensCursorDiv.style.position="absolute",this._lensCursorDiv.style.pointerEvents="none",this._lensContainer=document.createElement("div"),this._lensContainer.style.border="1px solid black",this._lensContainer.style.background="white",this._lensContainer.style.borderRadius="50%",this._lensContainer.style.width="300px",this._lensContainer.style.height="300px",this._lensContainer.style.marginTop="85px",this._lensContainer.style.marginLeft="25px",this._lensContainer.style.zIndex="15000",this._lensContainer.style.position="absolute",this._lensContainer.style.pointerEvents="none",this._lensContainer.style.visibility="hidden",this._lensCanvas=document.createElement("canvas"),this._lensCanvas.style.borderRadius="50%",this._lensCanvas.style.width="300px",this._lensCanvas.style.height="300px",this._lensCanvas.style.zIndex="15000",this._lensCanvas.style.pointerEvents="none",document.body.appendChild(this._lensContainer),this._lensContainer.appendChild(this._lensCanvas),this._lensCanvasContext=this._lensCanvas.getContext("2d"),this._canvasElement=this.viewer.scene.canvas.canvas,this._canvasPos=null,this._snappedCanvasPos=null,this._lensPosToggle=!0,this._zoomLevel=t.zoomLevel||2,this._active=!1!==t.active,this._visible=!1,this._snapped=!1,this._onViewerRendering=this.viewer.scene.on("rendering",(()=>{this._active&&this._visible&&this.update()}))}update(){if(!this._active||!this._visible)return;if(!this._canvasPos)return;const e=this._lensContainer.getBoundingClientRect(),t=this._canvasElement.getBoundingClientRect(),s=this._canvasPos[0]e.left&&this._canvasPos[1]e.top;this._lensContainer.style.marginLeft="25px",s&&(this._lensPosToggle?this._lensContainer.style.marginTop=t.bottom-t.top-this._lensCanvas.height-85+"px":this._lensContainer.style.marginTop="85px",this._lensPosToggle=!this._lensPosToggle),this._lensCanvasContext.clearRect(0,0,this._lensCanvas.width,this._lensCanvas.height);const n=Math.max(this._lensCanvas.width,this._lensCanvas.height)/this._zoomLevel;this._lensCanvasContext.drawImage(this._canvasElement,this._canvasPos[0]-n/2,this._canvasPos[1]-n/2,n,n,0,0,this._lensCanvas.width,this._lensCanvas.height);const i=[(e.left+e.right)/2,(e.top+e.bottom)/2];if(this._snappedCanvasPos){const e=this._snappedCanvasPos[0]-this._canvasPos[0],t=this._snappedCanvasPos[1]-this._canvasPos[1];this._lensCursorDiv.style.marginLeft=i[0]+e*this._zoomLevel-10+"px",this._lensCursorDiv.style.marginTop=i[1]+t*this._zoomLevel-10+"px"}else this._lensCursorDiv.style.marginLeft=i[0]-10+"px",this._lensCursorDiv.style.marginTop=i[1]-10+"px"}set zoomFactor(e){this._zoomFactor=e,this.update()}get zoomFactor(){return this._zoomFactor}set canvasPos(e){this._canvasPos=e,this.update()}get canvasPos(){return this._canvasPos}set snappedCanvasPos(e){this._snappedCanvasPos=e,this.update()}get snappedCanvasPos(){return this._snappedCanvasPos}set snapped(e){this._snapped=e,e?(this._lensCursorDiv.style.background="greenyellow",this._lensCursorDiv.style.border="2px solid green"):(this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red")}get snapped(){return this._snapped}set active(e){this._active=e,this._lensContainer.style.visibility=e&&this._visible?"visible":"hidden",e&&this._visible||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}get active(){return this._active}set visible(e){this._visible=e,this._lensContainer.style.visibility=e&&this._active?"visible":"hidden",e&&this._active||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}get visible(){return this._visible}destroy(){this._destroyed||(this.viewer.scene.off(this._onViewerRendering),this._lensContainer.removeChild(this._lensCanvas),document.body.removeChild(this._lensContainer),this._destroyed=!0)}}let o=!0,l=o?Float64Array:Float32Array;const c=new l(3),u=new l(16),h=new l(16),p=new l(4),d={setDoublePrecisionEnabled(e){o=e,l=o?Float64Array:Float32Array},getDoublePrecisionEnabled:()=>o,MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId(e,t){const s=t.indexOf("#");return s===e.length&&t.startsWith(e)?t.substring(s+1):t},globalizeObjectId:(e,t)=>e+"#"+t,safeInv(e){const t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:e=>new l(e||2),vec3:e=>new l(e||3),vec4:e=>new l(e||4),mat3:e=>new l(e||9),mat3ToMat4:(e,t=new l(16))=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t),mat4:e=>new l(e||16),mat4ToMat3(e,t){},doublesToFloats(e,t,s){const n=new l(2);for(let i=0,r=e.length;i{const e=[];for(let t=0;t<256;t++)e[t]=(t<16?"0":"")+t.toString(16);return()=>{const t=4294967295*Math.random()|0,s=4294967295*Math.random()|0,n=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return`${e[255&t]+e[t>>8&255]+e[t>>16&255]+e[t>>24&255]}-${e[255&s]}${e[s>>8&255]}-${e[s>>16&15|64]}${e[s>>24&255]}-${e[63&n|128]}${e[n>>8&255]}-${e[n>>16&255]}${e[n>>24&255]}${e[255&i]}${e[i>>8&255]}${e[i>>16&255]}${e[i>>24&255]}`}})(),clamp:(e,t,s)=>Math.max(t,Math.min(s,e)),fmod(e,t){if(ee[0]===t[0]&&e[1]===t[1]&&e[2]===t[2],negateVec3:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t),negateVec4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t),addVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s),addVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s),addVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s),addVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s),subVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s),subVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s),subVec2:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s),geometricMeanVec2(...e){const t=new l(e[0]);for(let s=1;s(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s),subScalarVec4:(e,t,s)=>(s||(s=e),s[0]=t-e[0],s[1]=t-e[1],s[2]=t-e[2],s[3]=t-e[3],s),mulVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]*t[0],s[1]=e[1]*t[1],s[2]=e[2]*t[2],s[3]=e[3]*t[3],s),mulVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s),mulVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s),mulVec2Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s),divVec3:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s),divVec4:(e,t,s)=>(s||(s=e),s[0]=e[0]/t[0],s[1]=e[1]/t[1],s[2]=e[2]/t[2],s[3]=e[3]/t[3],s),divScalarVec3:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s),divVec3Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s),divVec4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]/t,s[1]=e[1]/t,s[2]=e[2]/t,s[3]=e[3]/t,s),divScalarVec4:(e,t,s)=>(s||(s=t),s[0]=e/t[0],s[1]=e/t[1],s[2]=e/t[2],s[3]=e/t[3],s),dotVec4:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3],cross3Vec4(e,t){const s=e[0],n=e[1],i=e[2],r=t[0],a=t[1],o=t[2];return[n*o-i*a,i*r-s*o,s*a-n*r,0]},cross3Vec3(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=t[0],o=t[1],l=t[2];return s[0]=i*l-r*o,s[1]=r*a-n*l,s[2]=n*o-i*a,s},sqLenVec4:e=>d.dotVec4(e,e),lenVec4:e=>Math.sqrt(d.sqLenVec4(e)),dotVec3:(e,t)=>e[0]*t[0]+e[1]*t[1]+e[2]*t[2],dotVec2:(e,t)=>e[0]*t[0]+e[1]*t[1],sqLenVec3:e=>d.dotVec3(e,e),sqLenVec2:e=>d.dotVec2(e,e),lenVec3:e=>Math.sqrt(d.sqLenVec3(e)),distVec3:(()=>{const e=new l(3);return(t,s)=>d.lenVec3(d.subVec3(t,s,e))})(),lenVec2:e=>Math.sqrt(d.sqLenVec2(e)),distVec2:(()=>{const e=new l(2);return(t,s)=>d.lenVec2(d.subVec2(t,s,e))})(),rcpVec3:(e,t)=>d.divScalarVec3(1,e,t),normalizeVec4(e,t){const s=1/d.lenVec4(e);return d.mulVec4Scalar(e,s,t)},normalizeVec3(e,t){const s=1/d.lenVec3(e);return d.mulVec3Scalar(e,s,t)},normalizeVec2(e,t){const s=1/d.lenVec2(e);return d.mulVec2Scalar(e,s,t)},angleVec3(e,t){let s=d.dotVec3(e,t)/Math.sqrt(d.sqLenVec3(e)*d.sqLenVec3(t));return s=s<-1?-1:s>1?1:s,Math.acos(s)},vec3FromMat4Scale:(()=>{const e=new l(3);return(t,s)=>(e[0]=t[0],e[1]=t[1],e[2]=t[2],s[0]=d.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],s[1]=d.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],s[2]=d.lenVec3(e),s)})(),vecToArray:(()=>{function e(e){return Math.round(1e5*e)/1e5}return t=>{for(let s=0,n=(t=Array.prototype.slice.call(t)).length;s({x:e[0],y:e[1],z:e[2]}),xyzObjectToArray:(e,t)=>((t=t||d.vec3())[0]=e.x,t[1]=e.y,t[2]=e.z,t),dupMat4:e=>e.slice(0,16),mat4To3:e=>[e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]],m4s:e=>[e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e],setMat4ToZeroes:()=>d.m4s(0),setMat4ToOnes:()=>d.m4s(1),diagonalMat4v:e=>new l([e[0],0,0,0,0,e[1],0,0,0,0,e[2],0,0,0,0,e[3]]),diagonalMat4c:(e,t,s,n)=>d.diagonalMat4v([e,t,s,n]),diagonalMat4s:e=>d.diagonalMat4c(e,e,e,e),identityMat4:(e=new l(16))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e),identityMat3:(e=new l(9))=>(e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e),isIdentityMat4:e=>1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15],negateMat4:(e,t)=>(t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t),addMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]+t[0],s[1]=e[1]+t[1],s[2]=e[2]+t[2],s[3]=e[3]+t[3],s[4]=e[4]+t[4],s[5]=e[5]+t[5],s[6]=e[6]+t[6],s[7]=e[7]+t[7],s[8]=e[8]+t[8],s[9]=e[9]+t[9],s[10]=e[10]+t[10],s[11]=e[11]+t[11],s[12]=e[12]+t[12],s[13]=e[13]+t[13],s[14]=e[14]+t[14],s[15]=e[15]+t[15],s),addMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]+t,s[1]=e[1]+t,s[2]=e[2]+t,s[3]=e[3]+t,s[4]=e[4]+t,s[5]=e[5]+t,s[6]=e[6]+t,s[7]=e[7]+t,s[8]=e[8]+t,s[9]=e[9]+t,s[10]=e[10]+t,s[11]=e[11]+t,s[12]=e[12]+t,s[13]=e[13]+t,s[14]=e[14]+t,s[15]=e[15]+t,s),addScalarMat4:(e,t,s)=>d.addMat4Scalar(t,e,s),subMat4:(e,t,s)=>(s||(s=e),s[0]=e[0]-t[0],s[1]=e[1]-t[1],s[2]=e[2]-t[2],s[3]=e[3]-t[3],s[4]=e[4]-t[4],s[5]=e[5]-t[5],s[6]=e[6]-t[6],s[7]=e[7]-t[7],s[8]=e[8]-t[8],s[9]=e[9]-t[9],s[10]=e[10]-t[10],s[11]=e[11]-t[11],s[12]=e[12]-t[12],s[13]=e[13]-t[13],s[14]=e[14]-t[14],s[15]=e[15]-t[15],s),subMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]-t,s[1]=e[1]-t,s[2]=e[2]-t,s[3]=e[3]-t,s[4]=e[4]-t,s[5]=e[5]-t,s[6]=e[6]-t,s[7]=e[7]-t,s[8]=e[8]-t,s[9]=e[9]-t,s[10]=e[10]-t,s[11]=e[11]-t,s[12]=e[12]-t,s[13]=e[13]-t,s[14]=e[14]-t,s[15]=e[15]-t,s),subScalarMat4:(e,t,s)=>(s||(s=t),s[0]=e-t[0],s[1]=e-t[1],s[2]=e-t[2],s[3]=e-t[3],s[4]=e-t[4],s[5]=e-t[5],s[6]=e-t[6],s[7]=e-t[7],s[8]=e-t[8],s[9]=e-t[9],s[10]=e-t[10],s[11]=e-t[11],s[12]=e-t[12],s[13]=e-t[13],s[14]=e-t[14],s[15]=e-t[15],s),mulMat4(e,t,s){s||(s=e);const n=e[0],i=e[1],r=e[2],a=e[3],o=e[4],l=e[5],c=e[6],u=e[7],h=e[8],p=e[9],d=e[10],A=e[11],f=e[12],I=e[13],m=e[14],y=e[15],v=t[0],w=t[1],g=t[2],E=t[3],T=t[4],b=t[5],D=t[6],P=t[7],C=t[8],_=t[9],R=t[10],B=t[11],O=t[12],S=t[13],N=t[14],x=t[15];return s[0]=v*n+w*o+g*h+E*f,s[1]=v*i+w*l+g*p+E*I,s[2]=v*r+w*c+g*d+E*m,s[3]=v*a+w*u+g*A+E*y,s[4]=T*n+b*o+D*h+P*f,s[5]=T*i+b*l+D*p+P*I,s[6]=T*r+b*c+D*d+P*m,s[7]=T*a+b*u+D*A+P*y,s[8]=C*n+_*o+R*h+B*f,s[9]=C*i+_*l+R*p+B*I,s[10]=C*r+_*c+R*d+B*m,s[11]=C*a+_*u+R*A+B*y,s[12]=O*n+S*o+N*h+x*f,s[13]=O*i+S*l+N*p+x*I,s[14]=O*r+S*c+N*d+x*m,s[15]=O*a+S*u+N*A+x*y,s},mulMat3(e,t,s){s||(s=new l(9));const n=e[0],i=e[3],r=e[6],a=e[1],o=e[4],c=e[7],u=e[2],h=e[5],p=e[8],d=t[0],A=t[3],f=t[6],I=t[1],m=t[4],y=t[7],v=t[2],w=t[5],g=t[8];return s[0]=n*d+i*I+r*v,s[3]=n*A+i*m+r*w,s[6]=n*f+i*y+r*g,s[1]=a*d+o*I+c*v,s[4]=a*A+o*m+c*w,s[7]=a*f+o*y+c*g,s[2]=u*d+h*I+p*v,s[5]=u*A+h*m+p*w,s[8]=u*f+h*y+p*g,s},mulMat4Scalar:(e,t,s)=>(s||(s=e),s[0]=e[0]*t,s[1]=e[1]*t,s[2]=e[2]*t,s[3]=e[3]*t,s[4]=e[4]*t,s[5]=e[5]*t,s[6]=e[6]*t,s[7]=e[7]*t,s[8]=e[8]*t,s[9]=e[9]*t,s[10]=e[10]*t,s[11]=e[11]*t,s[12]=e[12]*t,s[13]=e[13]*t,s[14]=e[14]*t,s[15]=e[15]*t,s),mulMat4v4(e,t,s=d.vec4()){const n=t[0],i=t[1],r=t[2],a=t[3];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12]*a,s[1]=e[1]*n+e[5]*i+e[9]*r+e[13]*a,s[2]=e[2]*n+e[6]*i+e[10]*r+e[14]*a,s[3]=e[3]*n+e[7]*i+e[11]*r+e[15]*a,s},transposeMat4(e,t){const s=e[4],n=e[14],i=e[8],r=e[13],a=e[12],o=e[9];if(!t||e===t){const t=e[1],l=e[2],c=e[3],u=e[6],h=e[7],p=e[11];return e[1]=s,e[2]=i,e[3]=a,e[4]=t,e[6]=o,e[7]=r,e[8]=l,e[9]=u,e[11]=n,e[12]=c,e[13]=h,e[14]=p,e}return t[0]=e[0],t[1]=s,t[2]=i,t[3]=a,t[4]=e[1],t[5]=e[5],t[6]=o,t[7]=r,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=n,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3(e,t){if(t===e){const s=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=s,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4(e){const t=e[0],s=e[1],n=e[2],i=e[3],r=e[4],a=e[5],o=e[6],l=e[7],c=e[8],u=e[9],h=e[10],p=e[11],d=e[12],A=e[13],f=e[14],I=e[15];return d*u*o*i-c*A*o*i-d*a*h*i+r*A*h*i+c*a*f*i-r*u*f*i-d*u*n*l+c*A*n*l+d*s*h*l-t*A*h*l-c*s*f*l+t*u*f*l+d*a*n*p-r*A*n*p-d*s*o*p+t*A*o*p+r*s*f*p-t*a*f*p-c*a*n*I+r*u*n*I+c*s*o*I-t*u*o*I-r*s*h*I+t*a*h*I},inverseMat4(e,t){t||(t=e);const s=e[0],n=e[1],i=e[2],r=e[3],a=e[4],o=e[5],l=e[6],c=e[7],u=e[8],h=e[9],p=e[10],d=e[11],A=e[12],f=e[13],I=e[14],m=e[15],y=s*o-n*a,v=s*l-i*a,w=s*c-r*a,g=n*l-i*o,E=n*c-r*o,T=i*c-r*l,b=u*f-h*A,D=u*I-p*A,P=u*m-d*A,C=h*I-p*f,_=h*m-d*f,R=p*m-d*I,B=1/(y*R-v*_+w*C+g*P-E*D+T*b);return t[0]=(o*R-l*_+c*C)*B,t[1]=(-n*R+i*_-r*C)*B,t[2]=(f*T-I*E+m*g)*B,t[3]=(-h*T+p*E-d*g)*B,t[4]=(-a*R+l*P-c*D)*B,t[5]=(s*R-i*P+r*D)*B,t[6]=(-A*T+I*w-m*v)*B,t[7]=(u*T-p*w+d*v)*B,t[8]=(a*_-o*P+c*b)*B,t[9]=(-s*_+n*P-r*b)*B,t[10]=(A*E-f*w+m*y)*B,t[11]=(-u*E+h*w-d*y)*B,t[12]=(-a*C+o*D-l*b)*B,t[13]=(s*C-n*D+i*b)*B,t[14]=(-A*g+f*v-I*y)*B,t[15]=(u*g-h*v+p*y)*B,t},traceMat4:e=>e[0]+e[5]+e[10]+e[15],translationMat4v(e,t){const s=t||d.identityMat4();return s[12]=e[0],s[13]=e[1],s[14]=e[2],s},translationMat3v(e,t){const s=t||d.identityMat3();return s[6]=e[0],s[7]=e[1],s},translationMat4c:(()=>{const e=new l(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,d.translationMat4v(e,i))})(),translationMat4s:(e,t)=>d.translationMat4c(e,e,e,t),translateMat4v:(e,t)=>d.translateMat4c(e[0],e[1],e[2],t),translateMat4c(e,t,s,n){const i=n[3];n[0]+=i*e,n[1]+=i*t,n[2]+=i*s;const r=n[7];n[4]+=r*e,n[5]+=r*t,n[6]+=r*s;const a=n[11];n[8]+=a*e,n[9]+=a*t,n[10]+=a*s;const o=n[15];return n[12]+=o*e,n[13]+=o*t,n[14]+=o*s,n},setMat4Translation:(e,t,s)=>(s[0]=e[0],s[1]=e[1],s[2]=e[2],s[3]=e[3],s[4]=e[4],s[5]=e[5],s[6]=e[6],s[7]=e[7],s[8]=e[8],s[9]=e[9],s[10]=e[10],s[11]=e[11],s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=e[15],s),rotationMat4v(e,t,s){const n=d.normalizeVec4([t[0],t[1],t[2],0],[]),i=Math.sin(e),r=Math.cos(e),a=1-r,o=n[0],l=n[1],c=n[2];let u,h,p,A,f,I;return u=o*l,h=l*c,p=c*o,A=o*i,f=l*i,I=c*i,(s=s||d.mat4())[0]=a*o*o+r,s[1]=a*u+I,s[2]=a*p-f,s[3]=0,s[4]=a*u-I,s[5]=a*l*l+r,s[6]=a*h+A,s[7]=0,s[8]=a*p+f,s[9]=a*h-A,s[10]=a*c*c+r,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s},rotationMat4c:(e,t,s,n,i)=>d.rotationMat4v(e,[t,s,n],i),scalingMat4v:(e,t=d.identityMat4())=>(t[0]=e[0],t[5]=e[1],t[10]=e[2],t),scalingMat3v:(e,t=d.identityMat3())=>(t[0]=e[0],t[4]=e[1],t),scalingMat4c:(()=>{const e=new l(3);return(t,s,n,i)=>(e[0]=t,e[1]=s,e[2]=n,d.scalingMat4v(e,i))})(),scaleMat4c:(e,t,s,n)=>(n[0]*=e,n[4]*=t,n[8]*=s,n[1]*=e,n[5]*=t,n[9]*=s,n[2]*=e,n[6]*=t,n[10]*=s,n[3]*=e,n[7]*=t,n[11]*=s,n),scaleMat4v(e,t){const s=e[0],n=e[1],i=e[2];return t[0]*=s,t[4]*=n,t[8]*=i,t[1]*=s,t[5]*=n,t[9]*=i,t[2]*=s,t[6]*=n,t[10]*=i,t[3]*=s,t[7]*=n,t[11]*=i,t},scalingMat4s:e=>d.scalingMat4c(e,e,e),rotationTranslationMat4(e,t,s=d.mat4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=n+n,l=i+i,c=r+r,u=n*o,h=n*l,p=n*c,A=i*l,f=i*c,I=r*c,m=a*o,y=a*l,v=a*c;return s[0]=1-(A+I),s[1]=h+v,s[2]=p-y,s[3]=0,s[4]=h-v,s[5]=1-(u+I),s[6]=f+m,s[7]=0,s[8]=p+y,s[9]=f-m,s[10]=1-(u+A),s[11]=0,s[12]=t[0],s[13]=t[1],s[14]=t[2],s[15]=1,s},mat4ToEuler(e,t,s=d.vec4()){const n=d.clamp,i=e[0],r=e[4],a=e[8],o=e[1],l=e[5],c=e[9],u=e[2],h=e[6],p=e[10];return"XYZ"===t?(s[1]=Math.asin(n(a,-1,1)),Math.abs(a)<.99999?(s[0]=Math.atan2(-c,p),s[2]=Math.atan2(-r,i)):(s[0]=Math.atan2(h,l),s[2]=0)):"YXZ"===t?(s[0]=Math.asin(-n(c,-1,1)),Math.abs(c)<.99999?(s[1]=Math.atan2(a,p),s[2]=Math.atan2(o,l)):(s[1]=Math.atan2(-u,i),s[2]=0)):"ZXY"===t?(s[0]=Math.asin(n(h,-1,1)),Math.abs(h)<.99999?(s[1]=Math.atan2(-u,p),s[2]=Math.atan2(-r,l)):(s[1]=0,s[2]=Math.atan2(o,i))):"ZYX"===t?(s[1]=Math.asin(-n(u,-1,1)),Math.abs(u)<.99999?(s[0]=Math.atan2(h,p),s[2]=Math.atan2(o,i)):(s[0]=0,s[2]=Math.atan2(-r,l))):"YZX"===t?(s[2]=Math.asin(n(o,-1,1)),Math.abs(o)<.99999?(s[0]=Math.atan2(-c,l),s[1]=Math.atan2(-u,i)):(s[0]=0,s[1]=Math.atan2(a,p))):"XZY"===t&&(s[2]=Math.asin(-n(r,-1,1)),Math.abs(r)<.99999?(s[0]=Math.atan2(h,l),s[1]=Math.atan2(a,i)):(s[0]=Math.atan2(-c,p),s[1]=0)),s},composeMat4:(e,t,s,n=d.mat4())=>(d.quaternionToRotationMat4(t,n),d.scaleMat4v(s,n),d.translateMat4v(e,n),n),decomposeMat4:(()=>{const e=new l(3),t=new l(16);return function(s,n,i,r){e[0]=s[0],e[1]=s[1],e[2]=s[2];let a=d.lenVec3(e);e[0]=s[4],e[1]=s[5],e[2]=s[6];const o=d.lenVec3(e);e[8]=s[8],e[9]=s[9],e[10]=s[10];const l=d.lenVec3(e);d.determinantMat4(s)<0&&(a=-a),n[0]=s[12],n[1]=s[13],n[2]=s[14],t.set(s);const c=1/a,u=1/o,h=1/l;return t[0]*=c,t[1]*=c,t[2]*=c,t[4]*=u,t[5]*=u,t[6]*=u,t[8]*=h,t[9]*=h,t[10]*=h,d.mat4ToQuaternion(t,i),r[0]=a,r[1]=o,r[2]=l,this}})(),getColMat4(e,t){const s=4*t;return[e[s],e[s+1],e[s+2],e[s+3]]},setRowMat4(e,t,s){e[t]=s[0],e[t+4]=s[1],e[t+8]=s[2],e[t+12]=s[3]},lookAtMat4v(e,t,s,n){n||(n=d.mat4());const i=e[0],r=e[1],a=e[2],o=s[0],l=s[1],c=s[2],u=t[0],h=t[1],p=t[2];if(i===u&&r===h&&a===p)return d.identityMat4();let A,f,I,m,y,v,w,g,E,T;return A=i-u,f=r-h,I=a-p,T=1/Math.sqrt(A*A+f*f+I*I),A*=T,f*=T,I*=T,m=l*I-c*f,y=c*A-o*I,v=o*f-l*A,T=Math.sqrt(m*m+y*y+v*v),T?(T=1/T,m*=T,y*=T,v*=T):(m=0,y=0,v=0),w=f*v-I*y,g=I*m-A*v,E=A*y-f*m,T=Math.sqrt(w*w+g*g+E*E),T?(T=1/T,w*=T,g*=T,E*=T):(w=0,g=0,E=0),n[0]=m,n[1]=w,n[2]=A,n[3]=0,n[4]=y,n[5]=g,n[6]=f,n[7]=0,n[8]=v,n[9]=E,n[10]=I,n[11]=0,n[12]=-(m*i+y*r+v*a),n[13]=-(w*i+g*r+E*a),n[14]=-(A*i+f*r+I*a),n[15]=1,n},lookAtMat4c:(e,t,s,n,i,r,a,o,l)=>d.lookAtMat4v([e,t,s],[n,i,r],[a,o,l],[]),orthoMat4c(e,t,s,n,i,r,a){a||(a=d.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2/l,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=-2/c,a[11]=0,a[12]=-(e+t)/o,a[13]=-(n+s)/l,a[14]=-(r+i)/c,a[15]=1,a},frustumMat4v(e,t,s){s||(s=d.mat4());const n=[e[0],e[1],e[2],0],i=[t[0],t[1],t[2],0];d.addVec4(i,n,u),d.subVec4(i,n,h);const r=2*n[2],a=h[0],o=h[1],l=h[2];return s[0]=r/a,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=r/o,s[6]=0,s[7]=0,s[8]=u[0]/a,s[9]=u[1]/o,s[10]=-u[2]/l,s[11]=-1,s[12]=0,s[13]=0,s[14]=-r*i[2]/l,s[15]=0,s},frustumMat4(e,t,s,n,i,r,a){a||(a=d.mat4());const o=t-e,l=n-s,c=r-i;return a[0]=2*i/o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*i/l,a[6]=0,a[7]=0,a[8]=(t+e)/o,a[9]=(n+s)/l,a[10]=-(r+i)/c,a[11]=-1,a[12]=0,a[13]=0,a[14]=-r*i*2/c,a[15]=0,a},perspectiveMat4(e,t,s,n,i){const r=[],a=[];return r[2]=s,a[2]=n,a[1]=r[2]*Math.tan(e/2),r[1]=-a[1],a[0]=a[1]*t,r[0]=-a[0],d.frustumMat4v(r,a,i)},compareMat4:(e,t)=>e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15],transformPoint3(e,t,s=d.vec3()){const n=t[0],i=t[1],r=t[2];return s[0]=e[0]*n+e[4]*i+e[8]*r+e[12],s[1]=e[1]*n+e[5]*i+e[9]*r+e[13],s[2]=e[2]*n+e[6]*i+e[10]*r+e[14],s},transformPoint4:(e,t,s=d.vec4())=>(s[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],s[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],s[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],s[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],s),transformPoints3(e,t,s){const n=s||[],i=t.length;let r,a,o,l;const c=e[0],u=e[1],h=e[2],p=e[3],d=e[4],A=e[5],f=e[6],I=e[7],m=e[8],y=e[9],v=e[10],w=e[11],g=e[12],E=e[13],T=e[14],b=e[15];let D;for(let e=0;e{const e=new l(16),t=new l(16),s=new l(16);return function(n,i,r,a){return this.transformVec3(this.mulMat4(this.inverseMat4(i,e),this.inverseMat4(r,t),s),n,a)}})(),lerpVec3(e,t,s,n,i,r){const a=r||d.vec3(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a},lerpMat4(e,t,s,n,i,r){const a=r||d.mat4(),o=(e-t)/(s-t);return a[0]=n[0]+o*(i[0]-n[0]),a[1]=n[1]+o*(i[1]-n[1]),a[2]=n[2]+o*(i[2]-n[2]),a[3]=n[3]+o*(i[3]-n[3]),a[4]=n[4]+o*(i[4]-n[4]),a[5]=n[5]+o*(i[5]-n[5]),a[6]=n[6]+o*(i[6]-n[6]),a[7]=n[7]+o*(i[7]-n[7]),a[8]=n[8]+o*(i[8]-n[8]),a[9]=n[9]+o*(i[9]-n[9]),a[10]=n[10]+o*(i[10]-n[10]),a[11]=n[11]+o*(i[11]-n[11]),a[12]=n[12]+o*(i[12]-n[12]),a[13]=n[13]+o*(i[13]-n[13]),a[14]=n[14]+o*(i[14]-n[14]),a[15]=n[15]+o*(i[15]-n[15]),a},flatten(e){const t=[];let s,n,i,r,a;for(s=0,n=e.length;s(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e),eulerToQuaternion(e,t,s=d.vec4()){const n=e[0]*d.DEGTORAD/2,i=e[1]*d.DEGTORAD/2,r=e[2]*d.DEGTORAD/2,a=Math.cos(n),o=Math.cos(i),l=Math.cos(r),c=Math.sin(n),u=Math.sin(i),h=Math.sin(r);return"XYZ"===t?(s[0]=c*o*l+a*u*h,s[1]=a*u*l-c*o*h,s[2]=a*o*h+c*u*l,s[3]=a*o*l-c*u*h):"YXZ"===t?(s[0]=c*o*l+a*u*h,s[1]=a*u*l-c*o*h,s[2]=a*o*h-c*u*l,s[3]=a*o*l+c*u*h):"ZXY"===t?(s[0]=c*o*l-a*u*h,s[1]=a*u*l+c*o*h,s[2]=a*o*h+c*u*l,s[3]=a*o*l-c*u*h):"ZYX"===t?(s[0]=c*o*l-a*u*h,s[1]=a*u*l+c*o*h,s[2]=a*o*h-c*u*l,s[3]=a*o*l+c*u*h):"YZX"===t?(s[0]=c*o*l+a*u*h,s[1]=a*u*l+c*o*h,s[2]=a*o*h-c*u*l,s[3]=a*o*l-c*u*h):"XZY"===t&&(s[0]=c*o*l-a*u*h,s[1]=a*u*l-c*o*h,s[2]=a*o*h+c*u*l,s[3]=a*o*l+c*u*h),s},mat4ToQuaternion(e,t=d.vec4()){const s=e[0],n=e[4],i=e[8],r=e[1],a=e[5],o=e[9],l=e[2],c=e[6],u=e[10];let h;const p=s+a+u;return p>0?(h=.5/Math.sqrt(p+1),t[3]=.25/h,t[0]=(c-o)*h,t[1]=(i-l)*h,t[2]=(r-n)*h):s>a&&s>u?(h=2*Math.sqrt(1+s-a-u),t[3]=(c-o)/h,t[0]=.25*h,t[1]=(n+r)/h,t[2]=(i+l)/h):a>u?(h=2*Math.sqrt(1+a-s-u),t[3]=(i-l)/h,t[0]=(n+r)/h,t[1]=.25*h,t[2]=(o+c)/h):(h=2*Math.sqrt(1+u-s-a),t[3]=(r-n)/h,t[0]=(i+l)/h,t[1]=(o+c)/h,t[2]=.25*h),t},vec3PairToQuaternion(e,t,s=d.vec4()){const n=Math.sqrt(d.dotVec3(e,e)*d.dotVec3(t,t));let i=n+d.dotVec3(e,t);return i<1e-8*n?(i=0,Math.abs(e[0])>Math.abs(e[2])?(s[0]=-e[1],s[1]=e[0],s[2]=0):(s[0]=0,s[1]=-e[2],s[2]=e[1])):d.cross3Vec3(e,t,s),s[3]=i,d.normalizeQuaternion(s)},angleAxisToQuaternion(e,t=d.vec4()){const s=e[3]/2,n=Math.sin(s);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(s),t},quaternionToEuler:(()=>{const e=new l(16);return(t,s,n)=>(n=n||d.vec3(),d.quaternionToRotationMat4(t,e),d.mat4ToEuler(e,s,n),n)})(),mulQuaternions(e,t,s=d.vec4()){const n=e[0],i=e[1],r=e[2],a=e[3],o=t[0],l=t[1],c=t[2],u=t[3];return s[0]=a*o+n*u+i*c-r*l,s[1]=a*l+i*u+r*o-n*c,s[2]=a*c+r*u+n*l-i*o,s[3]=a*u-n*o-i*l-r*c,s},vec3ApplyQuaternion(e,t,s=d.vec3()){const n=t[0],i=t[1],r=t[2],a=e[0],o=e[1],l=e[2],c=e[3],u=c*n+o*r-l*i,h=c*i+l*n-a*r,p=c*r+a*i-o*n,A=-a*n-o*i-l*r;return s[0]=u*c+A*-a+h*-l-p*-o,s[1]=h*c+A*-o+p*-a-u*-l,s[2]=p*c+A*-l+u*-o-h*-a,s},quaternionToMat4(e,t){t=d.identityMat4(t);const s=e[0],n=e[1],i=e[2],r=e[3],a=2*s,o=2*n,l=2*i,c=a*r,u=o*r,h=l*r,p=a*s,A=o*s,f=l*s,I=o*n,m=l*n,y=l*i;return t[0]=1-(I+y),t[1]=A+h,t[2]=f-u,t[4]=A-h,t[5]=1-(p+y),t[6]=m+c,t[8]=f+u,t[9]=m-c,t[10]=1-(p+I),t},quaternionToRotationMat4(e,t){const s=e[0],n=e[1],i=e[2],r=e[3],a=s+s,o=n+n,l=i+i,c=s*a,u=s*o,h=s*l,p=n*o,d=n*l,A=i*l,f=r*a,I=r*o,m=r*l;return t[0]=1-(p+A),t[4]=u-m,t[8]=h+I,t[1]=u+m,t[5]=1-(c+A),t[9]=d-f,t[2]=h-I,t[6]=d+f,t[10]=1-(c+p),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion(e,t=e){const s=d.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s,t[3]=e[3]/s,t},conjugateQuaternion:(e,t=e)=>(t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t),inverseQuaternion:(e,t)=>d.normalizeQuaternion(d.conjugateQuaternion(e,t)),quaternionToAngleAxis(e,t=d.vec4()){const s=(e=d.normalizeQuaternion(e,p))[3],n=2*Math.acos(s),i=Math.sqrt(1-s*s);return i<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i),t[3]=n,t},AABB3:e=>new l(e||6),AABB2:e=>new l(e||4),OBB3:e=>new l(e||32),OBB2:e=>new l(e||16),Sphere3:(e,t,s,n)=>new l([e,t,s,n]),transformOBB3(e,t,s=t){let n;const i=t.length;let r,a,o;const l=e[0],c=e[1],u=e[2],h=e[3],p=e[4],d=e[5],A=e[6],f=e[7],I=e[8],m=e[9],y=e[10],v=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;n{const e=new l(3),t=new l(3),s=new l(3);return n=>(e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5],d.subVec3(t,e,s),Math.abs(d.lenVec3(s)))})(),getAABB3DiagPoint:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(n,i)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],t[0]=n[3],t[1]=n[4],t[2]=n[5];const r=d.subVec3(t,e,s),a=i[0]-n[0],o=n[3]-i[0],l=i[1]-n[1],c=n[4]-i[1],u=i[2]-n[2],h=n[5]-i[2];return r[0]+=a>o?a:o,r[1]+=l>c?l:c,r[2]+=u>h?u:h,Math.abs(d.lenVec3(r))}})(),getAABB3Area:e=>(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2]),getAABB3Center(e,t){const s=t||d.vec3();return s[0]=(e[0]+e[3])/2,s[1]=(e[1]+e[4])/2,s[2]=(e[2]+e[5])/2,s},getAABB2Center(e,t){const s=t||d.vec2();return s[0]=(e[2]+e[0])/2,s[1]=(e[3]+e[1])/2,s},collapseAABB3:(e=d.AABB3())=>(e[0]=d.MAX_DOUBLE,e[1]=d.MAX_DOUBLE,e[2]=d.MAX_DOUBLE,e[3]=d.MIN_DOUBLE,e[4]=d.MIN_DOUBLE,e[5]=d.MIN_DOUBLE,e),AABB3ToOBB3:(e,t=d.OBB3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t),positions3ToAABB3:(()=>{const e=new l(3);return(t,s,n)=>{s=s||d.AABB3();let i,r,a,o=d.MAX_DOUBLE,l=d.MAX_DOUBLE,c=d.MAX_DOUBLE,u=d.MIN_DOUBLE,h=d.MIN_DOUBLE,p=d.MIN_DOUBLE;for(let s=0,A=t.length;su&&(u=i),r>h&&(h=r),a>p&&(p=a);return s[0]=o,s[1]=l,s[2]=c,s[3]=u,s[4]=h,s[5]=p,s}})(),OBB3ToAABB3(e,t=d.AABB3()){let s,n,i,r=d.MAX_DOUBLE,a=d.MAX_DOUBLE,o=d.MAX_DOUBLE,l=d.MIN_DOUBLE,c=d.MIN_DOUBLE,u=d.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToAABB3(e,t=d.AABB3()){let s,n,i,r=d.MAX_DOUBLE,a=d.MAX_DOUBLE,o=d.MAX_DOUBLE,l=d.MIN_DOUBLE,c=d.MIN_DOUBLE,u=d.MIN_DOUBLE;for(let t=0,h=e.length;tl&&(l=s),n>c&&(c=n),i>u&&(u=i);return t[0]=r,t[1]=a,t[2]=o,t[3]=l,t[4]=c,t[5]=u,t},points3ToSphere3:(()=>{const e=new l(3);return(t,s)=>{s=s||d.vec4();let n,i=0,r=0,a=0;const o=t.length;for(n=0;nc&&(c=l);return s[3]=c,s}})(),positions3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,n)=>{n=n||d.vec4();let i,r=0,a=0,o=0;const l=s.length;let c=0;for(i=0;ic&&(c=h);return n[3]=c,n}})(),OBB3ToSphere3:(()=>{const e=new l(3),t=new l(3);return(s,n)=>{n=n||d.vec4();let i,r=0,a=0,o=0;const l=s.length,c=l/4;for(i=0;ih&&(h=u);return n[3]=h,n}})(),getSphere3Center:(e,t=d.vec3())=>(t[0]=e[0],t[1]=e[1],t[2]=e[2],t),getPositionsCenter(e,t=d.vec3()){let s=0,n=0,i=0;for(var r=0,a=e.length;r(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]s&&(e[0]=s),e[1]>n&&(e[1]=n),e[2]>i&&(e[2]=i),e[3](e[0]=d.MAX_DOUBLE,e[1]=d.MAX_DOUBLE,e[2]=d.MIN_DOUBLE,e[3]=d.MIN_DOUBLE,e),point3AABB3Intersect:(e,t)=>e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(n=e[0]*s[0],i=e[0]*s[3]):(n=e[0]*s[3],i=e[0]*s[0]),e[1]>0?(n+=e[1]*s[1],i+=e[1]*s[4]):(n+=e[1]*s[4],i+=e[1]*s[1]),e[2]>0?(n+=e[2]*s[2],i+=e[2]*s[5]):(n+=e[2]*s[5],i+=e[2]*s[2]);if(n<=-t&&i<=-t)return-1;return n>=-t&&i>=-t?1:0},OBB3ToAABB2(e,t=d.AABB2()){let s,n,i,r,a=d.MAX_DOUBLE,o=d.MAX_DOUBLE,l=d.MIN_DOUBLE,c=d.MIN_DOUBLE;for(let t=0,u=e.length;tl&&(l=s),n>c&&(c=n);return t[0]=a,t[1]=o,t[2]=l,t[3]=c,t},expandAABB2:(e,t)=>(e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2](e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]2*(1-e)*(s-t)+2*e*(n-s),tangentQuadraticBezier3:(e,t,s,n,i)=>-3*t*(1-e)*(1-e)+3*s*(1-e)*(1-e)-6*e*s*(1-e)+6*e*n*(1-e)-3*e*e*n+3*e*e*i,tangentSpline:e=>6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e),catmullRomInterpolate(e,t,s,n,i){const r=.5*(s-e),a=.5*(n-t),o=i*i;return(2*t-2*s+r+a)*(i*o)+(-3*t+3*s-2*r-a)*o+r*i+t},b2p0(e,t){const s=1-e;return s*s*t},b2p1:(e,t)=>2*(1-e)*e*t,b2p2:(e,t)=>e*e*t,b2(e,t,s,n){return this.b2p0(e,t)+this.b2p1(e,s)+this.b2p2(e,n)},b3p0(e,t){const s=1-e;return s*s*s*t},b3p1(e,t){const s=1-e;return 3*s*s*e*t},b3p2:(e,t)=>3*(1-e)*e*e*t,b3p3:(e,t)=>e*e*e*t,b3(e,t,s,n,i){return this.b3p0(e,t)+this.b3p1(e,s)+this.b3p2(e,n)+this.b3p3(e,i)},triangleNormal(e,t,s,n=d.vec3()){const i=t[0]-e[0],r=t[1]-e[1],a=t[2]-e[2],o=s[0]-e[0],l=s[1]-e[1],c=s[2]-e[2],u=r*c-a*l,h=a*o-i*c,p=i*l-r*o,A=Math.sqrt(u*u+h*h+p*p);return 0===A?(n[0]=0,n[1]=0,n[2]=0):(n[0]=u/A,n[1]=h/A,n[2]=p/A),n},rayTriangleIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),n=new l(3),i=new l(3);return(r,a,o,l,c,u)=>{u=u||d.vec3();const h=d.subVec3(l,o,e),p=d.subVec3(c,o,t),A=d.cross3Vec3(a,p,s),f=d.dotVec3(h,A);if(f<1e-6)return null;const I=d.subVec3(r,o,n),m=d.dotVec3(I,A);if(m<0||m>f)return null;const y=d.cross3Vec3(I,h,i),v=d.dotVec3(a,y);if(v<0||m+v>f)return null;const w=d.dotVec3(p,y)/f;return u[0]=r[0]+w*a[0],u[1]=r[1]+w*a[1],u[2]=r[2]+w*a[2],u}})(),rayPlaneIntersect:(()=>{const e=new l(3),t=new l(3),s=new l(3),n=new l(3);return(i,r,a,o,l,c)=>{c=c||d.vec3(),r=d.normalizeVec3(r,e);const u=d.subVec3(o,a,t),h=d.subVec3(l,a,s),p=d.cross3Vec3(u,h,n);d.normalizeVec3(p,p);const A=-d.dotVec3(a,p),f=-(d.dotVec3(i,p)+A)/d.dotVec3(r,p);return c[0]=i[0]+f*r[0],c[1]=i[1]+f*r[1],c[2]=i[2]+f*r[2],c}})(),cartesianToBarycentric:(()=>{const e=new l(3),t=new l(3),s=new l(3);return(n,i,r,a,o)=>{const l=d.subVec3(a,i,e),c=d.subVec3(r,i,t),u=d.subVec3(n,i,s),h=d.dotVec3(l,l),p=d.dotVec3(l,c),A=d.dotVec3(l,u),f=d.dotVec3(c,c),I=d.dotVec3(c,u),m=h*f-p*p;if(0===m)return null;const y=1/m,v=(f*A-p*I)*y,w=(h*I-p*A)*y;return o[0]=1-v-w,o[1]=w,o[2]=v,o}})(),barycentricInsideTriangle(e){const t=e[1],s=e[2];return s>=0&&t>=0&&s+t<1},barycentricToCartesian(e,t,s,n,i=d.vec3()){const r=e[0],a=e[1],o=e[2];return i[0]=t[0]*r+s[0]*a+n[0]*o,i[1]=t[1]*r+s[1]*a+n[1]*o,i[2]=t[2]*r+s[2]*a+n[2]*o,i},mergeVertices(e,t,s,n){const i={},r=[],a=[],o=t?[]:null,l=s?[]:null,c=[];let u,h,p,d;const A=1e4;let f,I,m=0;for(f=0,I=e.length;f{const e=new l(3),t=new l(3),s=new l(3),n=new l(3),i=new l(3),r=new l(3);return(a,o,l)=>{let c,u;const h=new Array(a.length/3);let p,A,f,I,m,y,v;for(c=0,u=o.length;c{const e=new l(3),t=new l(3),s=new l(3),n=new l(3),i=new l(3),r=new l(3),a=new l(3);return(o,l,c)=>{const u=new Float32Array(o.length);for(let h=0;h>24&255,u=p>>16&255,c=p>>8&255,l=255&p,o=t[s],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+1],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,o=t[s+2],a=3*o,i[d++]=e[a],i[d++]=e[a+1],i[d++]=e[a+2],r[A++]=l,r[A++]=c,r[A++]=u,r[A++]=h,p++;return{positions:i,colors:r}},faceToVertexNormals(e,t,s={}){const n=s.smoothNormalsAngleThreshold||20,i={},r=[],a={};let o,l,c,u,h;const p=1e4;let A,f,I,m,y,v;for(f=0,m=e.length;f{const e=new l(4),t=new l(4);return(s,n,i,r,a)=>{e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=1,d.transformVec4(s,e,t),r[0]=t[0],r[1]=t[1],r[2]=t[2],e[0]=i[0],e[1]=i[1],e[2]=i[2],d.transformVec3(s,e,t),d.normalizeVec3(t),a[0]=t[0],a[1]=t[1],a[2]=t[2]}})(),canvasPosToWorldRay:(()=>{const e=new l(16),t=new l(16),s=new l(4),n=new l(4),i=new l(4),r=new l(4);return(a,o,l,c,u,h)=>{const p=d.mulMat4(l,o,e),A=d.inverseMat4(p,t),f=a.width,I=a.height,m=(c[0]-f/2)/(f/2),y=-(c[1]-I/2)/(I/2);s[0]=m,s[1]=y,s[2]=-1,s[3]=1,d.transformVec4(A,s,n),d.mulVec4Scalar(n,1/n[3]),i[0]=m,i[1]=y,i[2]=1,i[3]=1,d.transformVec4(A,i,r),d.mulVec4Scalar(r,1/r[3]),u[0]=r[0],u[1]=r[1],u[2]=r[2],d.subVec3(r,n,h),d.normalizeVec3(h)}})(),canvasPosToLocalRay:(()=>{const e=new l(3),t=new l(3);return(s,n,i,r,a,o,l)=>{d.canvasPosToWorldRay(s,n,i,a,e,t),d.worldRayToLocalRay(r,e,t,o,l)}})(),worldRayToLocalRay:(()=>{const e=new l(16),t=new l(4),s=new l(4);return(n,i,r,a,o)=>{const l=d.inverseMat4(n,e);t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,d.transformVec4(l,t,s),a[0]=s[0],a[1]=s[1],a[2]=s[2],d.transformVec3(l,r,o)}})(),buildKDTree:(()=>{const e=new Float32Array;function t(s,n,i,r){const a=new l(6),o={triangles:null,left:null,right:null,leaf:!1,splitDim:0,aabb:a};let c,u;for(a[0]=a[1]=a[2]=Number.POSITIVE_INFINITY,a[3]=a[4]=a[5]=Number.NEGATIVE_INFINITY,c=0,u=s.length;ca[3]&&(a[3]=i[t]),i[t+1]a[4]&&(a[4]=i[t+1]),i[t+2]a[5]&&(a[5]=i[t+2])}}if(s.length<20||r>10)return o.triangles=s,o.leaf=!0,o;e[0]=a[3]-a[0],e[1]=a[4]-a[1],e[2]=a[5]-a[2];let p=0;e[1]>e[p]&&(p=1),e[2]>e[p]&&(p=2),o.splitDim=p;const d=(a[p]+a[p+3])/2,A=new Array(s.length);let f=0;const I=new Array(s.length);let m=0;for(c=0,u=s.length;c{const n=e.length/3,i=new Array(n);for(let e=0;e=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t},octDecodeVec2s(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t}};d.buildEdgeIndices=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=d.vec3(),u=d.vec3(),h=d.vec3(),p=d.vec3(),A=d.vec3(),f=d.vec3(),I=d.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}(),d.planeClipsPositions3=function(e,t,s,n=3){for(let i=0,r=s.length;i{this._needsRebuild=!0})),this._onModelUnloaded=this.viewer.scene.on("modelUnloaded",(e=>{this._needsRebuild=!0}))}get root(){return this._needsRebuild&&this._rebuild(),this._root}_rebuild(){const e=this.viewer.scene;this._root={aabb:e.getAABB()};for(let t in e.objects){const s=e.objects[t];this._insertEntity(this._root,s,1)}this._needsRebuild=!1}_insertEntity(e,t,s){const n=t.aabb;if(s>=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&d.containsAABB3(e.left.aabb,n))return void this._insertEntity(e.left,t,s+1);if(e.right&&d.containsAABB3(e.right.aabb,n))return void this._insertEntity(e.right,t,s+1);const i=e.aabb;A[0]=i[3]-i[0],A[1]=i[4]-i[1],A[2]=i[5]-i[2];let r=0;if(A[1]>A[r]&&(r=1),A[2]>A[r]&&(r=2),!e.left){const a=i.slice();if(a[r+3]=(i[r]+i[r+3])/2,e.left={aabb:a},d.containsAABB3(a,n))return void this._insertEntity(e.left,t,s+1)}if(!e.right){const a=i.slice();if(a[r]=(i[r]+i[r+3])/2,e.right={aabb:a},d.containsAABB3(a,n))return void this._insertEntity(e.right,t,s+1)}e.entities=e.entities||[],e.entities.push(t)}destroy(){const e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}class I{constructor(){this._head=[],this._headLength=0,this._tail=[],this._index=0,this._length=0}get length(){return this._length}shift(){if(this._index>=this._headLength){const e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}const e=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,e}push(e){return this._length++,this._tail.push(e),this}unshift(e){return this._head[--this._index]=e,this._length++,this}}const m={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var y=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],s=e[0].charCodeAt(0),n=s+e[1],i=s;i{};t=t||n,s=s||n;var i=new XMLHttpRequest;i.overrideMimeType("application/json"),i.open("GET",e,!0),i.addEventListener("load",(function(e){var n=e.target.response;if(200===this.status){var i;try{i=JSON.parse(n)}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}t(i)}else if(0===this.status){console.warn("loadFile: HTTP Status 0 received.");try{t(JSON.parse(n))}catch(e){s(`utils.loadJSON(): Failed to parse JSON response - ${e}`)}}else s(e)}),!1),i.addEventListener("error",(function(e){s(e)}),!1),i.send(null)},loadArraybuffer:function(e,t,s){var n=e=>{};t=t||n,s=s||n;const i=e.match(/^data:(.*?)(;base64)?,(.*)$/);if(i){const e=!!i[2];var r=i[3];r=window.decodeURIComponent(r),e&&(r=window.atob(r));try{const e=new ArrayBuffer(r.length),s=new Uint8Array(e);for(var a=0;a{t(e)}))}catch(e){B.scheduleTask((()=>{s(e)}))}}else{const n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onreadystatechange=function(){4===n.readyState&&(200===n.status?t(n.response):s("loadArrayBuffer error : "+n.response))},n.send(null)}},queryString:w,isArray:function(e){return e&&!e.propertyIsEnumerable("length")&&"object"==typeof e&&"number"==typeof e.length},isString:function(e){return"string"==typeof e||e instanceof String},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},isID:function(e){return g.isString(e)||g.isNumeric(e)},isSameComponent:function(e,t){return!(!e||!t)&&(g.isNumeric(e)||g.isString(e)?`${e}`:e.id)===(g.isNumeric(t)||g.isString(t)?`${t}`:t.id)},isFunction:function(e){return"function"==typeof e},isObject:function(e){const t={}.constructor;return!!e&&e.constructor===t},copy:function(e){return g.apply(e,{})},apply:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);return t},apply2:function(e,t){for(const s in e)e.hasOwnProperty(s)&&void 0!==e[s]&&null!==e[s]&&(t[s]=e[s]);return t},applyIf:function(e,t){for(const s in e)e.hasOwnProperty(s)&&(void 0!==t[s]&&null!==t[s]||(t[s]=e[s]));return t},isEmptyObject:function(e){for(const t in e)if(e.hasOwnProperty(t))return!1;return!0},inQuotes:function(e){return g.isNumeric(e)?`${e}`:`'${e}'`},concat:function(e,t){const s=new e.constructor(e.length+t.length);return s.set(e),s.set(t,e.length),s},flattenParentChildHierarchy:function(e){var t=[];return function e(s){s.id=s.uuid,delete s.oid,t.push(s);var n=s.children;if(n)for(var i=0,r=n.length;i{T.removeItem(e.id),delete B.scenes[e.id],delete E[e.id],m.components.scenes--}))},this.clear=function(){let e;for(const t in B.scenes)B.scenes.hasOwnProperty(t)&&(e=B.scenes[t],"default.scene"===t?e.clear():(e.destroy(),delete B.scenes[e.id]))},this.scheduleTask=function(e,t=null){b.push(e),b.push(t)},this.runTasks=function(e=-1){let t,s,n=(new Date).getTime(),i=0;for(;b.length>0&&(e<0||n0&&C>0){var t=1e3/C;R+=t,P.push(t),P.length>=30&&(R-=P.shift()),m.frame.fps=Math.round(R/P.length)}for(let e in B.scenes)B.scenes[e].compile();N(e),_=e};new class{worker=null;constructor(e,t){const s=new Blob([`setInterval(() => postMessage(0), ${t});`]),n=URL.createObjectURL(s);this.worker=new Worker(n),this.worker.onmessage=e}stop(){this.worker.terminate()}}(O,100);const S=function(){let e=Date.now();if(C=e-_,_>0&&C>0){var t=1e3/C;R+=t,P.push(t),P.length>=30&&(R-=P.shift()),m.frame.fps=Math.round(R/P.length)}N(e),function(e){for(var t in D.time=e,B.scenes)if(B.scenes.hasOwnProperty(t)){var s=B.scenes[t];D.sceneId=t,D.startTime=s.startTime,D.deltaTime=null!=D.prevTime?D.time-D.prevTime:0,s.fire("tick",D,!0)}D.prevTime=e}(e),function(){const e=B.scenes,t=!1;let s,n,i,r,a;for(a in e)e.hasOwnProperty(a)&&(s=e[a],n=E[a],n||(n=E[a]={}),i=s.ticksPerOcclusionTest,n.ticksPerOcclusionTest!==i&&(n.ticksPerOcclusionTest=i,n.renderCountdown=i),--s.occlusionTestCountdown<=0&&(s.doOcclusionTest(),s.occlusionTestCountdown=i),r=s.ticksPerRender,n.ticksPerRender!==r&&(n.ticksPerRender=r,n.renderCountdown=r),0==--n.renderCountdown&&(s.render(t),n.renderCountdown=r))}(),void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(O):requestAnimationFrame(S)};function N(e){const t=B.runTasks(e+10),s=B.getNumTasks();m.frame.tasksRun=t,m.frame.tasksScheduled=s,m.frame.tasksBudget=10}S();class x{get type(){return"Component"}get isComponent(){return!0}constructor(e=null,t={}){if(this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=t.viewer;else{if("Scene"===e.type)this.scene=e;else{if(!(e instanceof x))throw"Invalid param: owner must be a Component";this.scene=e.scene}this._owner=e}this._dontClear=!!t.dontClear,this._renderer=this.scene._renderer,this.meta=t.meta||{},this.id=t.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,e&&e._own(this)}glRedraw(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}glResort(){this._renderer&&this._renderer.needStateSort()}get owner(){return this._owner}isType(e){return this.type===e}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];let i;if(n)for(const s in n)n.hasOwnProperty(s)&&(i=n[s],this._eventCallDepth++,this._eventCallDepth<300?i.callback.call(i.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}on(t,s,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new e),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});let i=this._eventSubs[t];i?this._eventSubsNum[t]++:(i={},this._eventSubs[t]=i,this._eventSubsNum[t]=1);const r=this._subIdMap.addItem();i[r]={callback:s,scope:n||this},this._subIdEvents[r]=t;const a=this._events[t];return void 0!==a&&s.call(n||this,a),r}off(e){if(null==e)return;if(!this._subIdEvents)return;const t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];const s=this._eventSubs[t];s&&(delete s[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}once(e,t,s){const n=this,i=this.on(e,(function(e){n.off(i),t.call(s||this,e)}),s)}hasSubs(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}log(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}_message(e){return" ["+this.type+" "+g.inQuotes(this.id)+"]: "+e}warn(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}error(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}_attach(e){const t=e.name;if(!t)return void this.error("Component 'name' expected");let s=e.component;const n=e.sceneDefault,i=e.sceneSingleton,r=e.type,a=e.on,o=!1!==e.recompiles;if(s&&(g.isNumeric(s)||g.isString(s))){const e=s;if(s=this.scene.components[e],!s)return void this.error("Component not found: "+g.inQuotes(e))}if(!s)if(!0===i){const e=this.scene.types[r];for(const t in e)if(e.hasOwnProperty){s=e[t];break}if(!s)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===n&&(s=this.scene[t],!s))return this.error("Scene has no default component for '"+t+"'"),null;if(s){if(s.scene.id!==this.scene.id)return void this.error("Not in same scene: "+s.type+" "+g.inQuotes(s.id));if(r&&!s.isType(r))return void this.error("Expected a "+r+" type or subtype: "+s.type+" "+g.inQuotes(s.id))}this._attachments||(this._attachments={});const l=this._attached[t];let c,u,h;if(l){if(s&&l.id===s.id)return;const e=this._attachments[l.id];for(c=e.subs,u=0,h=c.length;u{delete this._ownedComponents[e.id]}),this)}_needUpdate(e){this._updateScheduled||(this._updateScheduled=!0,0===e?this._doUpdate():B.scheduleTask(this._doUpdate,this))}_doUpdate(){this._updateScheduled&&(this._updateScheduled=!1,this._update&&this._update())}scheduleTask(e){B.scheduleTask(e,null)}_update(){}clear(){if(this._ownedComponents)for(var e in this._ownedComponents)if(this._ownedComponents.hasOwnProperty(e)){this._ownedComponents[e].destroy(),delete this._ownedComponents[e]}}destroy(){if(this.destroyed)return;let e,t,s,n,i,r;if(this.fire("destroyed",this.destroyed=!0),this._attachments)for(e in this._attachments)if(this._attachments.hasOwnProperty(e)){for(t=this._attachments[e],s=t.component,n=t.subs,i=0,r=n.length;i=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}class U{constructor(){this.planes=[new H,new H,new H,new H,new H,new H]}}function G(e,t,s){const n=d.mulMat4(s,t,F),i=n[0],r=n[1],a=n[2],o=n[3],l=n[4],c=n[5],u=n[6],h=n[7],p=n[8],A=n[9],f=n[10],I=n[11],m=n[12],y=n[13],v=n[14],w=n[15];e.planes[0].set(o-i,h-l,I-p,w-m),e.planes[1].set(o+i,h+l,I+p,w+m),e.planes[2].set(o-r,h-c,I-A,w-y),e.planes[3].set(o+r,h+c,I+A,w+y),e.planes[4].set(o-a,h-u,I-f,w-v),e.planes[5].set(o+a,h+u,I+f,w+v)}function j(e,t){let s=U.INSIDE;const n=L,i=M;n[0]=t[0],n[1]=t[1],n[2]=t[2],i[0]=t[3],i[1]=t[4],i[2]=t[5];const r=[n,i];for(let t=0;t<6;++t){const n=e.planes[t];if(n.normal[0]*r[n.testVertex[0]][0]+n.normal[1]*r[n.testVertex[1]][1]+n.normal[2]*r[n.testVertex[2]][2]+n.offset<0)return U.OUTSIDE;n.normal[0]*r[1-n.testVertex[0]][0]+n.normal[1]*r[1-n.testVertex[1]][1]+n.normal[2]*r[1-n.testVertex[2]][2]+n.offset<0&&(s=U.INTERSECT)}return s}U.INSIDE=0,U.INTERSECT=1,U.OUTSIDE=2;class V extends x{constructor(e={}){if(!e.viewer)throw"[MarqueePicker] Missing config: viewer";if(!e.objectsKdTree3)throw"[MarqueePicker] Missing config: objectsKdTree3";super(e.viewer.scene,e),this.viewer=e.viewer,this._objectsKdTree3=e.objectsKdTree3,this._canvasMarqueeCorner1=d.vec2(),this._canvasMarqueeCorner2=d.vec2(),this._canvasMarquee=d.AABB2(),this._marqueeFrustum=new U,this._marqueeFrustumProjMat=d.mat4(),this._pickMode=!1,this._marqueeElement=document.createElement("div"),document.body.appendChild(this._marqueeElement),this._marqueeElement.style.position="absolute",this._marqueeElement.style["z-index"]="40000005",this._marqueeElement.style.width="8px",this._marqueeElement.style.height="8px",this._marqueeElement.style.visibility="hidden",this._marqueeElement.style.top="0px",this._marqueeElement.style.left="0px",this._marqueeElement.style["box-shadow"]="0 2px 5px 0 #182A3D;",this._marqueeElement.style.opacity=1,this._marqueeElement.style["pointer-events"]="none"}setMarqueeCorner1(e){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarqueeCorner2(e){this._canvasMarqueeCorner2.set(e),this._updateMarquee()}setMarquee(e,t){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(t),this._updateMarquee()}setMarqueeVisible(e){this._marqueVisible=e,this._marqueeElement.style.visibility=e?"visible":"hidden"}getMarqueeVisible(){return this._marqueVisible}setPickMode(e){if(e!==V.PICK_MODE_INSIDE&&e!==V.PICK_MODE_INTERSECTS)throw"Illegal MarqueePicker pickMode: must be MarqueePicker.PICK_MODE_INSIDE or MarqueePicker.PICK_MODE_INTERSECTS";e!==this._pickMode&&(this._marqueeElement.style["background-image"]=e===V.PICK_MODE_INSIDE?"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4'/%3e%3c/svg%3e\")":"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e\")",this._pickMode=e)}getPickMode(){return this._pickMode}clear(){this.fire("clear",{})}pick(){this._updateMarquee(),this._buildMarqueeFrustum();const e=[],t=(s,n=U.INTERSECT)=>{if(n===U.INTERSECT&&(n=j(this._marqueeFrustum,s.aabb)),n!==U.OUTSIDE){if(s.entities){const t=s.entities;for(let s=0,n=t.length;s3||this._canvasMarquee[3]-this._canvasMarquee[1]>3)&&t(this._objectsKdTree3.root),this.fire("picked",e),e}_updateMarquee(){this._canvasMarquee[0]=Math.min(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[1]=Math.min(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._canvasMarquee[2]=Math.max(this._canvasMarqueeCorner1[0],this._canvasMarqueeCorner2[0]),this._canvasMarquee[3]=Math.max(this._canvasMarqueeCorner1[1],this._canvasMarqueeCorner2[1]),this._marqueeElement.style.width=this._canvasMarquee[2]-this._canvasMarquee[0]+"px",this._marqueeElement.style.height=this._canvasMarquee[3]-this._canvasMarquee[1]+"px",this._marqueeElement.style.left=`${this._canvasMarquee[0]}px`,this._marqueeElement.style.top=`${this._canvasMarquee[1]}px`}_buildMarqueeFrustum(){const e=this.viewer.scene.canvas.canvas,t=e.clientWidth,s=e.clientHeight,n=e.clientLeft,i=e.clientTop,r=2/t,a=2/s,o=e.clientHeight/e.clientWidth,l=(this._canvasMarquee[0]-n)*r-1,c=(this._canvasMarquee[2]-n)*r-1,u=-(this._canvasMarquee[3]-i)*a+1,h=-(this._canvasMarquee[1]-i)*a+1,p=this.viewer.scene.camera.frustum.near*(17*o);d.frustumMat4(l,c,u*o,h*o,p,1e4,this._marqueeFrustumProjMat),G(this._marqueeFrustum,this.viewer.scene.camera.viewMatrix,this._marqueeFrustumProjMat)}destroy(){super.destroy(),this._marqueeElement.parentElement&&(this._marqueeElement.parentElement.removeChild(this._marqueeElement),this._marqueeElement=null,this._objectsKdTree3=null)}}V.PICK_MODE_INTERSECTS=0,V.PICK_MODE_INSIDE=1;class k extends x{constructor(e){super(e.marqueePicker,e);const t=e.marqueePicker,s=t.viewer.scene.canvas.canvas;let n,i,r,a,o,l,c,u=!1,h=!1,p=!1;s.addEventListener("mousedown",(e=>{this.getActive()&&0===e.button&&(c=setTimeout((function(){const r=t.viewer.scene.input;r.keyDown[r.KEY_CTRL]||t.clear(),n=e.pageX,i=e.pageY,o=e.offsetX,t.setMarqueeCorner1([n,i]),u=!0,t.viewer.cameraControl.pointerEnabled=!1,t.setMarqueeVisible(!0),s.style.cursor="crosshair"}),400),h=!0)})),s.addEventListener("mouseup",(e=>{if(!this.getActive())return;if(!u&&!p)return;if(0!==e.button)return;clearTimeout(c),r=e.pageX,a=e.pageY;const s=Math.abs(r-n),o=Math.abs(a-i);u=!1,t.viewer.cameraControl.pointerEnabled=!0,p&&(p=!1),(s>3||o>3)&&t.pick()})),document.addEventListener("mouseup",(e=>{this.getActive()&&0===e.button&&(clearTimeout(c),u&&(t.setMarqueeVisible(!1),u=!1,h=!1,p=!0,t.viewer.cameraControl.pointerEnabled=!0))}),!0),s.addEventListener("mousemove",(e=>{this.getActive()&&0===e.button&&h&&(clearTimeout(c),u&&(r=e.pageX,a=e.pageY,l=e.offsetX,t.setMarqueeVisible(!0),t.setMarqueeCorner2([r,a]),t.setPickMode(o0}log(e){console.log(`[xeokit plugin ${this.id}]: ${e}`)}warn(e){console.warn(`[xeokit plugin ${this.id}]: ${e}`)}error(e){console.error(`[xeokit plugin ${this.id}]: ${e}`)}send(e,t){}destroy(){this.viewer.removePlugin(this)}}const W=d.vec3(),z=function(){const e=new Float64Array(16),t=new Float64Array(4),s=new Float64Array(4);return function(n,i,r){return r=r||e,t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,d.transformVec4(n,t,s),d.setMat4Translation(n,s,r),r.slice()}}();function K(e,t,s){const n=Float32Array.from([e[0]])[0],i=e[0]-n,r=Float32Array.from([e[1]])[0],a=e[1]-r,o=Float32Array.from([e[2]])[0],l=e[2]-o;t[0]=n,t[1]=r,t[2]=o,s[0]=i,s[1]=a,s[2]=l}function Y(e,t,s,n=1e3){const i=d.getPositionsCenter(e,W),r=Math.round(i[0]/n)*n,a=Math.round(i[1]/n)*n,o=Math.round(i[2]/n)*n;s[0]=r,s[1]=a,s[2]=o;const l=0!==s[0]||0!==s[1]||0!==s[2];if(l)for(let s=0,n=e.length;s0?this.meshes[0]._colorize[3]/255:1}set opacity(e){if(0===this.meshes.length)return;const t=null!=e,s=this.meshes[0]._colorize[3];let n=255;if(t){if(e<0?e=0:e>1&&(e=1),n=Math.floor(255*e),s===n)return}else if(n=255,s===n)return;for(let e=0,t=this.meshes.length;e{this._viewPosDirty=!0,this._needUpdate()})),this._onCameraProjMatrix=this.scene.camera.on("projMatrix",(()=>{this._canvasPosDirty=!0,this._needUpdate()})),this._onEntityDestroyed=null,this._onEntityModelDestroyed=null,this._renderer.addMarker(this),this.entity=t.entity,this.worldPos=t.worldPos,this.occludable=t.occludable}_update(){if(this._viewPosDirty&&(d.transformPoint3(this.scene.camera.viewMatrix,this._worldPos,this._viewPos),this._viewPosDirty=!1,this._canvasPosDirty=!0,this.fire("viewPos",this._viewPos)),this._canvasPosDirty){ce.set(this._viewPos),ce[3]=1,d.transformPoint4(this.scene.camera.projMatrix,ce,ue);const e=this.scene.canvas.boundary;this._canvasPos[0]=Math.floor((1+ue[0]/ue[3])*e[2]/2),this._canvasPos[1]=Math.floor((1-ue[1]/ue[3])*e[3]/2),this._canvasPosDirty=!1,this.fire("canvasPos",this._canvasPos)}}_setVisible(e){this._visible,this._visible=e,this.fire("visible",this._visible)}set entity(e){if(this._entity){if(this._entity===e)return;null!==this._onEntityDestroyed&&(this._entity.off(this._onEntityDestroyed),this._onEntityDestroyed=null),null!==this._onEntityModelDestroyed&&(this._entity.model.off(this._onEntityModelDestroyed),this._onEntityModelDestroyed=null)}this._entity=e,this._entity&&(this._entity instanceof le?this._onEntityModelDestroyed=this._entity.model.on("destroyed",(()=>{this._entity=null,this._onEntityModelDestroyed=null})):this._onEntityDestroyed=this._entity.on("destroyed",(()=>{this._entity=null,this._onEntityDestroyed=null}))),this.fire("entity",this._entity,!0)}get entity(){return this._entity}set occludable(e){(e=!!e)!==this._occludable&&(this._occludable=e)}get occludable(){return this._occludable}set worldPos(e){this._worldPos.set(e||[0,0,0]),K(this._worldPos,this._origin,this._rtcPos),this._occludable&&this._renderer.markerWorldPosUpdated(this),this._viewPosDirty=!0,this.fire("worldPos",this._worldPos),this._needUpdate()}get worldPos(){return this._worldPos}get origin(){return this._origin}get rtcPos(){return this._rtcPos}get viewPos(){return this._update(),this._viewPos}get canvasPos(){return this._update(),this._canvasPos}get visible(){return!!this._visible}destroy(){this.fire("destroyed",!0),this.scene.camera.off(this._onCameraViewMatrix),this.scene.camera.off(this._onCameraProjMatrix),this._entity&&(null!==this._onEntityDestroyed&&this._entity.off(this._onEntityDestroyed),null!==this._onEntityModelDestroyed&&this._entity.model.off(this._onEntityModelDestroyed)),this._renderer.removeMarker(this),super.destroy()}}class pe{constructor(e,t={}){this._color=t.color||"black",this._highlightClass="viewer-ruler-wire-highlighted",this._wire=document.createElement("div"),this._wire.className+=this._wire.className?" viewer-ruler-wire":"viewer-ruler-wire",this._wireClickable=document.createElement("div"),this._wireClickable.className+=this._wireClickable.className?" viewer-ruler-wire-clickable":"viewer-ruler-wire-clickable",this._thickness=t.thickness||1,this._thicknessClickable=t.thicknessClickable||6,this._visible=!0,this._culled=!1;var s=this._wire,n=s.style;n.border="solid "+this._thickness+"px "+this._color,n.position="absolute",n["z-index"]=void 0===t.zIndex?"2000001":t.zIndex,n.width="0px",n.height="0px",n.visibility="visible",n.top="0px",n.left="0px",n["-webkit-transform-origin"]="0 0",n["-moz-transform-origin"]="0 0",n["-ms-transform-origin"]="0 0",n["-o-transform-origin"]="0 0",n["transform-origin"]="0 0",n["-webkit-transform"]="rotate(0deg)",n["-moz-transform"]="rotate(0deg)",n["-ms-transform"]="rotate(0deg)",n["-o-transform"]="rotate(0deg)",n.transform="rotate(0deg)",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._wireClickable,r=i.style;r.border="solid "+this._thicknessClickable+"px "+this._color,r.position="absolute",r["z-index"]=void 0===t.zIndex?"2000002":t.zIndex+1,r.width="0px",r.height="0px",r.visibility="visible",r.top="0px",r.left="0px",r["-webkit-transform-origin"]="0 0",r["-moz-transform-origin"]="0 0",r["-ms-transform-origin"]="0 0",r["-o-transform-origin"]="0 0",r["transform-origin"]="0 0",r["-webkit-transform"]="rotate(0deg)",r["-moz-transform"]="rotate(0deg)",r["-ms-transform"]="rotate(0deg)",r["-o-transform"]="rotate(0deg)",r.transform="rotate(0deg)",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),t.onMouseOver&&i.addEventListener("mouseover",(e=>{t.onMouseOver(e,this)})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this._x1=0,this._y1=0,this._x2=0,this._y2=0,this._update()}get visible(){return"visible"===this._wire.style.visibility}_update(){var e=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2))),t=180*Math.atan2(this._y2-this._y1,this._x2-this._x1)/Math.PI,s=this._wire.style;s.width=Math.round(e)+"px",s.left=Math.round(this._x1)+"px",s.top=Math.round(this._y1)+"px",s["-webkit-transform"]="rotate("+t+"deg)",s["-moz-transform"]="rotate("+t+"deg)",s["-ms-transform"]="rotate("+t+"deg)",s["-o-transform"]="rotate("+t+"deg)",s.transform="rotate("+t+"deg)";var n=this._wireClickable.style;n.width=Math.round(e)+"px",n.left=Math.round(this._x1)+"px",n.top=Math.round(this._y1)+"px",n["-webkit-transform"]="rotate("+t+"deg)",n["-moz-transform"]="rotate("+t+"deg)",n["-ms-transform"]="rotate("+t+"deg)",n["-o-transform"]="rotate("+t+"deg)",n.transform="rotate("+t+"deg)"}setStartAndEnd(e,t,s,n){this._x1=e,this._y1=t,this._x2=s,this._y2=n,this._update()}setColor(e){this._color=e||"black",this._wire.style.border="solid "+this._thickness+"px "+this._color}setOpacity(e){this._wire.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._wireClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._wire.classList.add(this._highlightClass):this._wire.classList.remove(this._highlightClass))}destroy(e){this._wire.parentElement&&this._wire.parentElement.removeChild(this._wire),this._wireClickable.parentElement&&this._wireClickable.parentElement.removeChild(this._wireClickable)}}class de{constructor(e,t={}){this._highlightClass="viewer-ruler-dot-highlighted",this._x=0,this._y=0,this._visible=!0,this._dot=document.createElement("div"),this._dot.className+=this._dot.className?" viewer-ruler-dot":"viewer-ruler-dot",this._dotClickable=document.createElement("div"),this._dotClickable.className+=this._dotClickable.className?" viewer-ruler-dot-clickable":"viewer-ruler-dot-clickable",this._visible=!0,this._culled=!1;var s=this._dot,n=s.style;n["border-radius"]="25px",n.border="solid 2px white",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"40000005":t.zIndex,n.width="8px",n.height="8px",n.visibility=!1!==t.visible?"visible":"hidden",n.top="0px",n.left="0px",n["box-shadow"]="0 2px 5px 0 #182A3D;",n.opacity=1,n["pointer-events"]="none",t.onContextMenu,e.appendChild(s);var i=this._dotClickable,r=i.style;r["border-radius"]="35px",r.border="solid 10px white",r.position="absolute",r["z-index"]=void 0===t.zIndex?"40000007":t.zIndex+1,r.width="8px",r.height="8px",r.visibility="visible",r.top="0px",r.left="0px",r.opacity=0,r["pointer-events"]="none",t.onContextMenu,e.appendChild(i),i.addEventListener("click",(t=>{e.dispatchEvent(new MouseEvent("mouseover",t))})),t.onMouseOver&&i.addEventListener("mouseover",(s=>{t.onMouseOver(s,this),e.dispatchEvent(new MouseEvent("mouseover",s))})),t.onMouseLeave&&i.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this)})),t.onMouseWheel&&i.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&i.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&i.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&i.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&i.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()})),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.borderColor)}setPos(e,t){this._x=e,this._y=t;var s=this._dot.style;s.left=Math.round(e)-4+"px",s.top=Math.round(t)-4+"px";var n=this._dotClickable.style;n.left=Math.round(e)-9+"px",n.top=Math.round(t)-9+"px"}setFillColor(e){this._dot.style.background=e||"lightgreen"}setBorderColor(e){this._dot.style.border="solid 2px"+(e||"black")}setOpacity(e){this._dot.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setClickable(e){this._dotClickable.style["pointer-events"]=e?"all":"none"}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._dot.classList.add(this._highlightClass):this._dot.classList.remove(this._highlightClass))}destroy(){this.setVisible(!1),this._dot.parentElement&&this._dot.parentElement.removeChild(this._dot),this._dotClickable.parentElement&&this._dotClickable.parentElement.removeChild(this._dotClickable)}}class Ae{constructor(e,t={}){this._highlightClass="viewer-ruler-label-highlighted",this._prefix=t.prefix||"",this._x=0,this._y=0,this._visible=!0,this._culled=!1,this._label=document.createElement("div"),this._label.className+=this._label.className?" viewer-ruler-label":"viewer-ruler-label";var s=this._label,n=s.style;n["border-radius"]="5px",n.color="white",n.padding="4px",n.border="solid 1px",n.background="lightgreen",n.position="absolute",n["z-index"]=void 0===t.zIndex?"5000005":t.zIndex,n.width="auto",n.height="auto",n.visibility="visible",n.top="0px",n.left="0px",n["pointer-events"]="all",n.opacity=1,t.onContextMenu,s.innerText="",e.appendChild(s),this.setPos(t.x||0,t.y||0),this.setFillColor(t.fillColor),this.setBorderColor(t.fillColor),this.setText(t.text),t.onMouseOver&&s.addEventListener("mouseover",(e=>{t.onMouseOver(e,this),e.preventDefault()})),t.onMouseLeave&&s.addEventListener("mouseleave",(e=>{t.onMouseLeave(e,this),e.preventDefault()})),t.onMouseWheel&&s.addEventListener("wheel",(e=>{t.onMouseWheel(e,this)})),t.onMouseDown&&s.addEventListener("mousedown",(e=>{t.onMouseDown(e,this)})),t.onMouseUp&&s.addEventListener("mouseup",(e=>{t.onMouseUp(e,this)})),t.onMouseMove&&s.addEventListener("mousemove",(e=>{t.onMouseMove(e,this)})),t.onContextMenu&&s.addEventListener("contextmenu",(e=>{t.onContextMenu(e,this),e.preventDefault()}))}setPos(e,t){this._x=e,this._y=t;var s=this._label.style;s.left=Math.round(e)-20+"px",s.top=Math.round(t)-12+"px"}setPosOnWire(e,t,s,n){var i=e+.5*(s-e),r=t+.5*(n-t),a=this._label.style;a.left=Math.round(i)-20+"px",a.top=Math.round(r)-12+"px"}setPosBetweenWires(e,t,s,n,i,r){var a=(e+s+i)/3,o=(t+n+r)/3,l=this._label.style;l.left=Math.round(a)-20+"px",l.top=Math.round(o)-12+"px"}setText(e){this._label.innerHTML=this._prefix+(e||"")}setFillColor(e){this._fillColor=e||"lightgreen",this._label.style.background=this._fillColor}setBorderColor(e){this._borderColor=e||"black",this._label.style.border="solid 1px "+this._borderColor}setOpacity(e){this._label.style.opacity=e}setVisible(e){this._visible!==e&&(this._visible=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setCulled(e){this._culled!==e&&(this._culled=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}setHighlighted(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._label.classList.add(this._highlightClass):this._label.classList.remove(this._highlightClass))}setClickable(e){this._label.style["pointer-events"]=e?"all":"none"}destroy(){this._label.parentElement&&this._label.parentElement.removeChild(this._label)}}var fe=d.vec3(),Ie=d.vec3();class me extends x{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._color=t.color||e.defaultColor;var s=this.plugin.viewer.scene;this._originMarker=new he(s,t.origin),this._cornerMarker=new he(s,t.corner),this._targetMarker=new he(s,t.target),this._originWorld=d.vec3(),this._cornerWorld=d.vec3(),this._targetWorld=d.vec3(),this._wp=new Float64Array(12),this._vp=new Float64Array(12),this._pp=new Float64Array(12),this._cp=new Int16Array(6);const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},l=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))};this._originDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._cornerDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._originWire=new pe(this._container,{color:this._color||"blue",thickness:1,zIndex:e.zIndex,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._targetWire=new pe(this._container,{color:this._color||"red",thickness:1,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._angleLabel=new Ae(this._container,{fillColor:this._color||"#00BBFF",prefix:"",text:"",zIndex:e.zIndex+2,onMouseOver:n,onMouseLeave:i,onMouseWheel:a,onMouseDown:o,onMouseUp:l,onMouseMove:c,onContextMenu:r}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._visible=!1,this._originVisible=!1,this._cornerVisible=!1,this._targetVisible=!1,this._originWireVisible=!1,this._targetWireVisible=!1,this._angleVisible=!1,this._labelsVisible=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._cornerMarker.on("worldPos",(e=>{this._cornerWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.cornerVisible=t.cornerVisible,this.targetVisible=t.targetVisible,this.originWireVisible=t.originWireVisible,this.targetWireVisible=t.targetWireVisible,this.angleVisible=t.angleVisible,this.labelsVisible=t.labelsVisible}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._cornerWorld[0],this._wp[5]=this._cornerWorld[1],this._wp[6]=this._cornerWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._targetWorld[2],this._wp[11]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(d.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._angleLabel.setCulled(!0),this._originWire.setCulled(!0),this._targetWire.setCulled(!0),this._originDot.setCulled(!0),this._cornerDot.setCulled(!0),void this._targetDot.setCulled(!0);this._angleLabel.setCulled(!1),this._originWire.setCulled(!1),this._targetWire.setCulled(!1),this._originDot.setCulled(!1),this._cornerDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}if(this._cpDirty){const p=-.3,A=this._originMarker.viewPos[2],f=this._cornerMarker.viewPos[2],I=this._targetMarker.viewPos[2];if(A>p||f>p||I>p)return this._originDot.setVisible(!1),this._cornerDot.setVisible(!1),this._targetDot.setVisible(!1),this._originWire.setVisible(!1),this._targetWire.setVisible(!1),void this._angleLabel.setCulled(!0);d.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var t=this._pp,s=this._cp,n=e.canvas.canvas.getBoundingClientRect();const m=this._container.getBoundingClientRect();for(var i=n.top-m.top,r=n.left-m.left,a=e.canvas.boundary,o=a[2],l=a[3],c=0,u=0,h=t.length;u{e.snappedToVertex||e.snappedToEdge?(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!0),this.markerDiv.style.background="greenyellow",this.markerDiv.style.border="2px solid green"):(n&&(n.visible=!0,n.canvasPos=e.canvasPos,n.snappedCanvasPos=e.canvasPos,n.snapped=!1),this.markerDiv.style.background="pink",this.markerDiv.style.border="2px solid red");const s=e.snappedCanvasPos||e.canvasPos;switch(i=!0,r=e.entity,l.set(e.worldPos),c.set(s),this._mouseState){case 0:const n=t.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=n.left+i,o=n.top+r;this.markerDiv.style.marginLeft=a+s[0]-5+"px",this.markerDiv.style.marginTop=o+s[1]-5+"px";break;case 1:this._currentAngleMeasurement&&(this._currentAngleMeasurement.originWireVisible=!0,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.cornerVisible=!0,this._currentAngleMeasurement.angleVisible=!1,this._currentAngleMeasurement.corner.worldPos=e.worldPos,this._currentAngleMeasurement.corner.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer";break;case 2:this._currentAngleMeasurement&&(this._currentAngleMeasurement.targetWireVisible=!0,this._currentAngleMeasurement.targetVisible=!0,this._currentAngleMeasurement.angleVisible=!0,this._currentAngleMeasurement.target.worldPos=e.worldPos,this._currentAngleMeasurement.target.entity=e.entity),this.markerDiv.style.marginLeft="-10000px",this.markerDiv.style.marginTop="-10000px",t.style.cursor="pointer"}})),t.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(a=e.clientX,o=e.clientY)}),t.addEventListener("mouseup",this._onMouseUp=e=>{if(1===e.which&&!(e.clientX>a+20||e.clientXo+20||e.clientY{if(i=!1,n&&(n.visible=!0,n.pointerPos=e.canvasPos,n.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,n.snapped=!1),this.markerDiv.style.marginLeft="-100px",this.markerDiv.style.marginTop="-100px",this._currentAngleMeasurement){switch(this._mouseState){case 0:this._currentAngleMeasurement.originVisible=!1;break;case 1:this._currentAngleMeasurement.cornerVisible=!1,this._currentAngleMeasurement.originWireVisible=!1,this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1;break;case 2:this._currentAngleMeasurement.targetVisible=!1,this._currentAngleMeasurement.targetWireVisible=!1,this._currentAngleMeasurement.angleVisible=!1}t.style.cursor="default"}})),this._active=!0}deactivate(){if(!this._active)return;this.pointerLens&&(this.pointerLens.visible=!1),this.markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.angleMeasurementsPlugin.viewer.cameraControl;t.off(this._onMouseHoverSurface),t.off(this._onPickedSurface),t.off(this._onHoverNothing),t.off(this._onPickedNothing),this._currentAngleMeasurement=null,this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentAngleMeasurement&&(this._currentAngleMeasurement.destroy(),this._currentAngleMeasurement=null),this._mouseState=0)}destroy(){this.deactivate(),super.destroy()}}class we extends Q{constructor(e,t={}){super("AngleMeasurements",e),this._container=t.container||document.body,this._defaultControl=null,this._measurements={},this.defaultColor=void 0!==t.defaultColor?t.defaultColor:"#00BBFF",this.defaultLabelsVisible=!1!==t.defaultLabelsVisible,this.zIndex=t.zIndex||1e4,this._onMouseOver=(e,t)=>{this.fire("mouseOver",{plugin:this,angleMeasurement:t,measurement:t,event:e})},this._onMouseLeave=(e,t)=>{this.fire("mouseLeave",{plugin:this,angleMeasurement:t,measurement:t,event:e})},this._onContextMenu=(e,t)=>{this.fire("contextMenu",{plugin:this,angleMeasurement:t,measurement:t,event:e})}}getContainerElement(){return this._container}send(e,t){}get control(){return this._defaultControl||(this._defaultControl=new ve(this,{})),this._defaultControl}get measurements(){return this._measurements}createMeasurement(e={}){this.viewer.scene.components[e.id]&&(this.error("Viewer scene component with this ID already exists: "+e.id),delete e.id);const t=e.origin,s=e.corner,n=e.target,i=new me(this,{id:e.id,plugin:this,container:this._container,origin:{entity:t.entity,worldPos:t.worldPos},corner:{entity:s.entity,worldPos:s.worldPos},target:{entity:n.entity,worldPos:n.worldPos},visible:e.visible,originVisible:!0,originWireVisible:!0,cornerVisible:!0,targetWireVisible:!0,targetVisible:!0,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[i.id]=i,i.on("destroyed",(()=>{delete this._measurements[i.id]})),i.clickable=!0,this.fire("measurementCreated",i),i}destroyMeasurement(e){const t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("AngleMeasurement not found: "+e)}setLabelsShown(e){for(const[t,s]of Object.entries(this.measurements))s.labelShown=e}clear(){const e=Object.keys(this._measurements);for(var t=0,s=e.length;t{this.plugin.fire("markerClicked",this)}),this._marker.addEventListener("mouseenter",this._onMouseEnterExternalMarker=()=>{this.plugin.fire("markerMouseEnter",this)}),this._marker.addEventListener("mouseleave",this._onMouseLeaveExternalMarker=()=>{this.plugin.fire("markerMouseLeave",this)}),this._markerExternal=!0):(this._markerHTML=t.markerHTML,this._htmlDirty=!0,this._markerExternal=!1),t.labelElement?(this._label=t.labelElement,this._labelExternal=!0):(this._labelHTML=t.labelHTML,this._htmlDirty=!0,this._labelExternal=!1),this._markerShown=!!t.markerShown,this._labelShown=!!t.labelShown,this._values=t.values||{},this._layoutDirty=!0,this._visibilityDirty=!0,this._buildHTML(),this._onTick=this.scene.on("tick",(()=>{this._htmlDirty&&(this._buildHTML(),this._htmlDirty=!1,this._layoutDirty=!0,this._visibilityDirty=!0),(this._layoutDirty||this._visibilityDirty)&&(this._markerShown||this._labelShown)&&(this._updatePosition(),this._layoutDirty=!1),this._visibilityDirty&&(this._marker.style.visibility=this.visible&&this._markerShown?"visible":"hidden",this._label.style.visibility=this.visible&&this._markerShown&&this._labelShown?"visible":"hidden",this._visibilityDirty=!1)})),this.on("canvasPos",(()=>{this._layoutDirty=!0})),this.on("visible",(()=>{this._visibilityDirty=!0})),this.setMarkerShown(!1!==t.markerShown),this.setLabelShown(t.labelShown),this.eye=t.eye?t.eye.slice():null,this.look=t.look?t.look.slice():null,this.up=t.up?t.up.slice():null,this.projection=t.projection}_buildHTML(){if(!this._markerExternal){this._marker&&(this._container.removeChild(this._marker),this._marker=null);let e=this._markerHTML||"

";g.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._marker=t.firstChild,this._container.appendChild(this._marker),this._marker.style.visibility=this._markerShown?"visible":"hidden",this._marker.addEventListener("click",(()=>{this.plugin.fire("markerClicked",this)})),this._marker.addEventListener("mouseenter",(()=>{this.plugin.fire("markerMouseEnter",this)})),this._marker.addEventListener("mouseleave",(()=>{this.plugin.fire("markerMouseLeave",this)})),this._marker.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}if(!this._labelExternal){this._label&&(this._container.removeChild(this._label),this._label=null);let e=this._labelHTML||"

";g.isArray(e)&&(e=e.join("")),e=this._renderTemplate(e.trim());const t=document.createRange().createContextualFragment(e);this._label=t.firstChild,this._container.appendChild(this._label),this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden",this._label.addEventListener("wheel",(e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))}))}}_updatePosition(){const e=this.scene.canvas.boundary,t=e[0],s=e[1],n=this.canvasPos;this._marker.style.left=Math.floor(t+n[0])-12+"px",this._marker.style.top=Math.floor(s+n[1])-12+"px",this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;this._label.style.left=20+Math.floor(t+n[0]+20)+"px",this._label.style.top=Math.floor(s+n[1]+-17)+"px",this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1}_renderTemplate(e){for(var t in this._values)if(this._values.hasOwnProperty(t)){const s=this._values[t];e=e.replace(new RegExp("{{"+t+"}}","g"),s)}return e}setMarkerShown(e){e=!!e,this._markerShown!==e&&(this._markerShown=e,this._visibilityDirty=!0)}getMarkerShown(){return this._markerShown}setLabelShown(e){e=!!e,this._labelShown!==e&&(this._labelShown=e,this._visibilityDirty=!0)}getLabelShown(){return this._labelShown}setField(e,t){this._values[e]=t||"",this._htmlDirty=!0}getField(e){return this._values[e]}setValues(e){for(var t in e)if(e.hasOwnProperty(t)){const s=e[t];this.setField(t,s)}}getValues(){return this._values}destroy(){this._marker&&(this._markerExternal?(this._marker.removeEventListener("click",this._onMouseClickedExternalMarker),this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker),this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker),this._marker=null):this._marker.parentNode.removeChild(this._marker)),this._label&&(this._labelExternal||this._label.parentNode.removeChild(this._label),this._label=null),this.scene.off(this._onTick),super.destroy()}}const Ee=d.vec3(),Te=d.vec3(),be=d.vec3();class De extends Q{constructor(e,t){super("Annotations",e),this._labelHTML=t.labelHTML||"
",this._markerHTML=t.markerHTML||"
",this._container=t.container||document.body,this._values=t.values||{},this.annotations={},this.surfaceOffset=t.surfaceOffset}getContainerElement(){return this._container}send(e,t){if("clearAnnotations"===e)this.clear()}set surfaceOffset(e){null==e&&(e=.3),this._surfaceOffset=e}get surfaceOffset(){return this._surfaceOffset}createAnnotation(e){var t,s;if(this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),e.pickResult=e.pickResult||e.pickRecord,e.pickResult){const n=e.pickResult;if(n.worldPos&&n.worldNormal){const e=d.normalizeVec3(n.worldNormal,Ee),i=d.mulVec3Scalar(e,this._surfaceOffset,Te);t=d.addVec3(n.worldPos,i,be),s=n.entity}else this.error("Param 'pickResult' does not have both worldPos and worldNormal")}else t=e.worldPos,s=e.entity;var n=null;e.markerElementId&&((n=document.getElementById(e.markerElementId))||this.error("Can't find DOM element for 'markerElementId' value '"+e.markerElementId+"' - defaulting to internally-generated empty DIV"));var i=null;e.labelElementId&&((i=document.getElementById(e.labelElementId))||this.error("Can't find DOM element for 'labelElementId' value '"+e.labelElementId+"' - defaulting to internally-generated empty DIV"));const r=new ge(this.viewer.scene,{id:e.id,plugin:this,entity:s,worldPos:t,container:this._container,markerElement:n,labelElement:i,markerHTML:e.markerHTML||this._markerHTML,labelHTML:e.labelHTML||this._labelHTML,occludable:e.occludable,values:g.apply(e.values,g.apply(this._values,{})),markerShown:e.markerShown,labelShown:e.labelShown,eye:e.eye,look:e.look,up:e.up,projection:e.projection,visible:!1!==e.visible});return this.annotations[r.id]=r,r.on("destroyed",(()=>{delete this.annotations[r.id],this.fire("annotationDestroyed",r.id)})),this.fire("annotationCreated",r.id),r}destroyAnnotation(e){var t=this.annotations[e];t?t.destroy():this.log("Annotation not found: "+e)}clear(){const e=Object.keys(this.annotations);for(var t=0,s=e.length;t
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}_injectDefaultCSS(){const e="xeokit-spinner-css";if(document.getElementById(e))return;const t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}_adjustPosition(){if(this._isCustom)return;const e=this._canvas,t=this._element,s=t.style;s.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",s.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}set processes(e){if(e=e||0,this._processes===e)return;if(e<0)return;const t=this._processes;this._processes=e;const s=this._element;s&&(s.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}get processes(){return this._processes}_destroy(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);const e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}const Ce=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"];class _e extends x{constructor(e,t={}){super(e,t),this._backgroundColor=d.vec3([t.backgroundColor?t.backgroundColor[0]:1,t.backgroundColor?t.backgroundColor[1]:1,t.backgroundColor?t.backgroundColor[2]:1]),this._backgroundColorFromAmbientLight=!!t.backgroundColorFromAmbientLight,this.canvas=t.canvas,this.gl=null,this.webgl2=!1,this.transparent=!!t.transparent,this.contextAttr=t.contextAttr||{},this.contextAttr.alpha=this.transparent,this.contextAttr.preserveDrawingBuffer=!!this.contextAttr.preserveDrawingBuffer,this.contextAttr.stencil=!1,this.contextAttr.premultipliedAlpha=!!this.contextAttr.premultipliedAlpha,this.contextAttr.antialias=!1!==this.contextAttr.antialias,this.resolutionScale=t.resolutionScale,this.canvas.width=Math.round(this.canvas.clientWidth*this._resolutionScale),this.canvas.height=Math.round(this.canvas.clientHeight*this._resolutionScale),this.boundary=[this.canvas.offsetLeft,this.canvas.offsetTop,this.canvas.clientWidth,this.canvas.clientHeight],this._initWebGL(t);const s=this;this.canvas.addEventListener("webglcontextlost",this._webglcontextlostListener=function(e){console.time("webglcontextrestored"),s.scene._webglContextLost(),s.fire("webglcontextlost"),e.preventDefault()},!1),this.canvas.addEventListener("webglcontextrestored",this._webglcontextrestoredListener=function(e){s._initWebGL(),s.gl&&(s.scene._webglContextRestored(s.gl),s.fire("webglcontextrestored",s.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);let n=!0;new ResizeObserver((e=>{for(const t of e)t.contentBoxSize&&(n=!0)})).observe(this.canvas),this._tick=this.scene.on("tick",(()=>{n&&(n=!1,s.canvas.width=Math.round(s.canvas.clientWidth*s._resolutionScale),s.canvas.height=Math.round(s.canvas.clientHeight*s._resolutionScale),s.boundary[0]=s.canvas.offsetLeft,s.boundary[1]=s.canvas.offsetTop,s.boundary[2]=s.canvas.clientWidth,s.boundary[3]=s.canvas.clientHeight,s.fire("boundary",s.boundary))})),this._spinner=new Pe(this.scene,{canvas:this.canvas,elementId:t.spinnerElementId})}get type(){return"Canvas"}get backgroundColorFromAmbientLight(){return this._backgroundColorFromAmbientLight}set backgroundColorFromAmbientLight(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}get resolutionScale(){return this._resolutionScale}set resolutionScale(e){if((e=e||1)===this._resolutionScale)return;this._resolutionScale=e;const t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}get spinner(){return this._spinner}_createCanvas(){const e="xeokit-canvas-"+d.createUUID(),t=document.getElementsByTagName("body")[0],s=document.createElement("div"),n=s.style;n.height="100%",n.width="100%",n.padding="0",n.margin="0",n.background="rgba(0,0,0,0);",n.float="left",n.left="0",n.top="0",n.position="absolute",n.opacity="1.0",n["z-index"]="-10000",s.innerHTML+='',t.appendChild(s),this.canvas=document.getElementById(e)}_getElementXY(e){let t=0,s=0;for(;e;)t+=e.offsetLeft-e.scrollLeft,s+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:s}}_initWebGL(){if(!this.gl)for(let e=0;!this.gl&&e0?Be.FS_MAX_FLOAT_PRECISION="highp":e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?Be.FS_MAX_FLOAT_PRECISION="mediump":Be.FS_MAX_FLOAT_PRECISION="lowp":Be.FS_MAX_FLOAT_PRECISION="mediump",Be.DEPTH_BUFFER_BITS=e.getParameter(e.DEPTH_BITS),Be.MAX_TEXTURE_SIZE=e.getParameter(e.MAX_TEXTURE_SIZE),Be.MAX_CUBE_MAP_SIZE=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),Be.MAX_RENDERBUFFER_SIZE=e.getParameter(e.MAX_RENDERBUFFER_SIZE),Be.MAX_TEXTURE_UNITS=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),Be.MAX_TEXTURE_IMAGE_UNITS=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),Be.MAX_VERTEX_ATTRIBS=e.getParameter(e.MAX_VERTEX_ATTRIBS),Be.MAX_VERTEX_UNIFORM_VECTORS=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),Be.MAX_FRAGMENT_UNIFORM_VECTORS=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),Be.MAX_VARYING_VECTORS=e.getParameter(e.MAX_VARYING_VECTORS),e.getSupportedExtensions().forEach((function(e){Be.SUPPORTED_EXTENSIONS[e]=!0})))}class Se{constructor(){this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._canvasPos=new Int16Array([0,0]),this._snappedCanvasPos=new Int16Array([0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}get canvasPos(){return this._gotCanvasPos?this._canvasPos:null}set canvasPos(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}get origin(){return this._gotOrigin?this._origin:null}set origin(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}get direction(){return this._gotDirection?this._direction:null}set direction(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}get indices(){return this.entity&&this._gotIndices?this._indices:null}set indices(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}get localPos(){return this.entity&&this._gotLocalPos?this._localPos:null}set localPos(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}get snappedCanvasPos(){return this._gotSnappedCanvasPos?this._snappedCanvasPos:null}set snappedCanvasPos(e){e?(this._snappedCanvasPos[0]=e[0],this._snappedCanvasPos[1]=e[1],this._gotSnappedCanvasPos=!0):this._gotSnappedCanvasPos=!1}get worldPos(){return this._gotWorldPos?this._worldPos:null}set worldPos(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}get viewPos(){return this.entity&&this._gotViewPos?this._viewPos:null}set viewPos(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}get bary(){return this.entity&&this._gotBary?this._bary:null}set bary(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}get worldNormal(){return this.entity&&this._gotWorldNormal?this._worldNormal:null}set worldNormal(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}get uv(){return this.entity&&this._gotUV?this._uv:null}set uv(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}reset(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotSnappedCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}class Ne{constructor(e,t,s){if(this.allocated=!1,this.compiled=!1,this.handle=e.createShader(t),this.handle){if(this.allocated=!0,e.shaderSource(this.handle,s),e.compileShader(this.handle),this.compiled=e.getShaderParameter(this.handle,e.COMPILE_STATUS),!this.compiled&&!e.isContextLost()){const t=s.split("\n"),n=[];for(let e=0;e0&&"/"===s.charAt(n+1)&&(s=s.substring(0,n)),t.push(s);return t.join("\n")}function He(e){console.error(e.join("\n"))}class Ue{constructor(e,t){this.id=Me.addItem({}),this.source=t,this.init(e)}init(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new Ne(e,e.VERTEX_SHADER,Fe(this.source.vertex)),this._fragmentShader=new Ne(e,e.FRAGMENT_SHADER,Fe(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void He(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void He(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void He(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void He(this.errors);let t,s,n,i,r;if(this.compiled=!0,this.handle=e.createProgram(),!this.handle)return void(this.errors=["Failed to allocate program"]);if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void He(this.errors);const a=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(s=0;sthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}setData(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}bind(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}unbind(){this.allocated&&this._gl.bindBuffer(this.type,null)}destroy(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}class je{constructor(e,t){this.scene=e,this.aabb=d.AABB3(),this.origin=d.vec3(t),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}addMarker(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}markerWorldPosUpdated(e){if(!this.markers[e.id])return;const t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}removeMarker(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}update(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}_buildMarkerList(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}_buildPositions(){let e=0;for(let t=0;t-t){s._setVisible(!1);continue}const a=s.canvasPos,o=a[0],l=a[1];o+10<0||l+10<0||o-10>n||l-10>i?s._setVisible(!1):!s.entity||s.entity.visible?s.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=s,this.pixels[r++]=o,this.pixels[r++]=l):s._setVisible(!0):s._setVisible(!1)}}_updateActiveSectionPlanes(){const e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(let s=0;s{this._occlusionTestListDirty=!0})),this._onCameraProjMatrix=e.camera.on("projMatrix",(()=>{this._occlusionTestListDirty=!0})),this._onCanvasBoundary=e.canvas.on("boundary",(()=>{this._occlusionTestListDirty=!0}))}addMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s||(s=new je(this._scene,e.origin),this._occlusionLayers[s.originHash]=s,this._occlusionLayersListDirty=!0),s.addMarker(e),this._markersToOcclusionLayersMap[e.id]=s,this._occlusionTestListDirty=!0}markerWorldPosUpdated(e){const t=this._markersToOcclusionLayersMap[e.id];if(!t)return void e.error("Marker has not been added to OcclusionTester");const s=e.origin.join();if(s!==t.originHash){1===t.numMarkers?(t.destroy(),delete this._occlusionLayers[t.originHash],this._occlusionLayersListDirty=!0):t.removeMarker(e);let n=this._occlusionLayers[s];n||(n=new je(this._scene,e.origin),this._occlusionLayers[s]=t,this._occlusionLayersListDirty=!0),n.addMarker(e),this._markersToOcclusionLayersMap[e.id]=n}else t.markerWorldPosUpdated(e)}removeMarker(e){const t=e.origin.join();let s=this._occlusionLayers[t];s&&(1===s.numMarkers?(s.destroy(),delete this._occlusionLayers[s.originHash],this._occlusionLayersListDirty=!0):s.removeMarker(e),delete this._markersToOcclusionLayersMap[e.id])}get needOcclusionTest(){return this._occlusionTestListDirty}bindRenderBuf(){const e=[this._scene.canvas.canvas.id,this._scene._sectionPlanesState.getHash()].join(";");if(e!==this._shaderSourceHash&&(this._shaderSourceHash=e,this._shaderSourceDirty=!0),this._shaderSourceDirty&&(this._buildShaderSource(),this._shaderSourceDirty=!1,this._programDirty=!0),this._programDirty&&(this._buildProgram(),this._programDirty=!1,this._occlusionTestListDirty=!0),this._occlusionLayersListDirty&&(this._buildOcclusionLayersList(),this._occlusionLayersListDirty=!1),this._occlusionTestListDirty){for(let e=0,t=this._occlusionLayersList.length;e0,s=[];return s.push("#version 300 es"),s.push("// OcclusionTester vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("vec4 worldPosition = vec4(position, 1.0); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&s.push(" vWorldPosition = worldPosition;"),s.push(" vec4 clipPos = projMatrix * viewPosition;"),s.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?s.push("vFragDepth = 1.0 + clipPos.w;"):s.push("clipPos.z += -0.001;"),s.push(" gl_Position = clipPos;"),s.push("}"),s}_buildFragmentShaderSource(){const e=this._scene,t=e._sectionPlanesState,s=t.sectionPlanes.length>0,n=[];if(n.push("#version 300 es"),n.push("// OcclusionTester fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),n.push("}"),n}_buildProgram(){this._program&&this._program.destroy();const e=this._scene,t=e.canvas.gl,s=e._sectionPlanesState;if(this._program=new Ue(t,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,t=s.sectionPlanes.length;e0){const e=n.sectionPlanes;for(let n=0;n{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=d.mat4();return()=>(e&&d.inverseMat4(n.camera.projMatrix,t),t)})());const t=this._scene.canvas.gl,s=this._program,n=this._scene,i=n.sao,r=t.drawingBufferWidth,a=t.drawingBufferHeight,o=n.camera.project._state,l=o.near,c=o.far,u=o.matrix,h=this._getInverseProjectMat(),p=Math.random(),A="perspective"===n.camera.projection;We[0]=r,We[1]=a,t.viewport(0,0,r,a),t.clearColor(0,0,0,1),t.disable(t.DEPTH_TEST),t.disable(t.BLEND),t.frontFace(t.CCW),t.clear(t.COLOR_BUFFER_BIT),s.bind(),t.uniform1f(this._uCameraNear,l),t.uniform1f(this._uCameraFar,c),t.uniformMatrix4fv(this._uCameraProjectionMatrix,!1,u),t.uniformMatrix4fv(this._uCameraInverseProjectionMatrix,!1,h),t.uniform1i(this._uPerspective,A),t.uniform1f(this._uScale,i.scale*(c/5)),t.uniform1f(this._uIntensity,i.intensity),t.uniform1f(this._uBias,i.bias),t.uniform1f(this._uKernelRadius,i.kernelRadius),t.uniform1f(this._uMinResolution,i.minResolution),t.uniform2fv(this._uViewport,We),t.uniform1f(this._uRandomSeed,p);const f=e.getDepthTexture();s.bindTexture(this._uDepthTexture,f,0),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),t.drawElements(t.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}_build(){let e=!1;const t=this._scene.sao;if(t.numSamples!==this._numSamples&&(this._numSamples=Math.floor(t.numSamples),e=!0),!e)return;const s=this._scene.canvas.gl;if(this._program&&(this._program.destroy(),this._program=null),this._program=new Ue(s,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV; \n \n out vec2 vUV;\n \n void main () {\n gl_Position = vec4(aPosition, 1.0);\n vUV = aUV;\n }"],fragment:[`#version 300 es \n precision highp float;\n precision highp int; \n \n #define NORMAL_TEXTURE 0\n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n #define NUM_SAMPLES ${this._numSamples}\n #define NUM_RINGS 4 \n \n in vec2 vUV;\n \n uniform sampler2D uDepthTexture;\n \n uniform float uCameraNear;\n uniform float uCameraFar;\n uniform mat4 uProjectMatrix;\n uniform mat4 uInverseProjectMatrix;\n \n uniform bool uPerspective;\n\n uniform float uScale;\n uniform float uIntensity;\n uniform float uBias;\n uniform float uKernelRadius;\n uniform float uMinResolution;\n uniform vec2 uViewport;\n uniform float uRandomSeed;\n\n float pow2( const in float x ) { return x*x; }\n \n highp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n }\n\n vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n }\n\n vec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n }\n\n const float packUpscale = 256. / 255.;\n const float unpackDownScale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. ); \n\n const float shiftRights = 1. / 256.;\n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float unpackRGBAToFloat( const in vec4 v ) { \n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unPackFactors );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n }\n\n float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n }\n \n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n if (uPerspective) {\n return perspectiveDepthToViewZ( depth, uCameraNear, uCameraFar );\n } else {\n return orthographicDepthToViewZ( depth, uCameraNear, uCameraFar );\n }\n }\n\n vec3 getViewPos( const in vec2 screenPos, const in float depth, const in float viewZ ) {\n \tfloat clipW = uProjectMatrix[2][3] * viewZ + uProjectMatrix[3][3];\n \tvec4 clipPosition = vec4( ( vec3( screenPos, depth ) - 0.5 ) * 2.0, 1.0 );\n \tclipPosition *= clipW; \n \treturn ( uInverseProjectMatrix * clipPosition ).xyz;\n }\n\n vec3 getViewNormal( const in vec3 viewPosition, const in vec2 screenPos ) { \n return normalize( cross( dFdx( viewPosition ), dFdy( viewPosition ) ) );\n }\n\n float scaleDividedByCameraFar;\n float minResolutionMultipliedByCameraFar;\n\n float getOcclusion( const in vec3 centerViewPosition, const in vec3 centerViewNormal, const in vec3 sampleViewPosition ) {\n \tvec3 viewDelta = sampleViewPosition - centerViewPosition;\n \tfloat viewDistance = length( viewDelta );\n \tfloat scaledScreenDistance = scaleDividedByCameraFar * viewDistance;\n \treturn max(0.0, (dot(centerViewNormal, viewDelta) - minResolutionMultipliedByCameraFar) / scaledScreenDistance - uBias) / (1.0 + pow2( scaledScreenDistance ) );\n }\n\n const float ANGLE_STEP = PI2 * float( NUM_RINGS ) / float( NUM_SAMPLES );\n const float INV_NUM_SAMPLES = 1.0 / float( NUM_SAMPLES );\n\n float getAmbientOcclusion( const in vec3 centerViewPosition ) {\n \n \tscaleDividedByCameraFar = uScale / uCameraFar;\n \tminResolutionMultipliedByCameraFar = uMinResolution * uCameraFar;\n \tvec3 centerViewNormal = getViewNormal( centerViewPosition, vUV );\n\n \tfloat angle = rand( vUV + uRandomSeed ) * PI2;\n \tvec2 radius = vec2( uKernelRadius * INV_NUM_SAMPLES ) / uViewport;\n \tvec2 radiusStep = radius;\n\n \tfloat occlusionSum = 0.0;\n \tfloat weightSum = 0.0;\n\n \tfor( int i = 0; i < NUM_SAMPLES; i ++ ) {\n \t\tvec2 sampleUv = vUV + vec2( cos( angle ), sin( angle ) ) * radius;\n \t\tradius += radiusStep;\n \t\tangle += ANGLE_STEP;\n\n \t\tfloat sampleDepth = getDepth( sampleUv );\n \t\tif( sampleDepth >= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }`]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const n=new Float32Array([1,1,0,1,0,0,1,0]),i=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),r=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ge(s,s.ARRAY_BUFFER,i,i.length,3,s.STATIC_DRAW),this._uvBuf=new Ge(s,s.ARRAY_BUFFER,n,n.length,2,s.STATIC_DRAW),this._indicesBuf=new Ge(s,s.ELEMENT_ARRAY_BUFFER,r,r.length,1,s.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}destroy(){this._program&&(this._program.destroy(),this._program=null)}}const Ke=new Float32Array($e(17,[0,1])),Ye=new Float32Array($e(17,[1,0])),Xe=new Float32Array(function(e,t){const s=[];for(let n=0;n<=e;n++)s.push(Ze(n,t));return s}(17,4)),qe=new Float32Array(2);class Je{constructor(e){this._scene=e,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}init(){const e=this._scene.canvas.gl;if(this._program=new Ue(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS 16\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }"]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);const t=new Float32Array([1,1,0,1,0,0,1,0]),s=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),n=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Ge(e,e.ARRAY_BUFFER,s,s.length,3,e.STATIC_DRAW),this._uvBuf=new Ge(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new Ge(e,e.ELEMENT_ARRAY_BUFFER,n,n.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}render(e,t,s){if(this._programError)return;this._getInverseProjectMat||(this._getInverseProjectMat=(()=>{let e=!0;this._scene.camera.on("projMatrix",(function(){e=!0}));const t=d.mat4();return()=>(e&&d.inverseMat4(r.camera.projMatrix,t),t)})());const n=this._scene.canvas.gl,i=this._program,r=this._scene,a=n.drawingBufferWidth,o=n.drawingBufferHeight,l=r.camera.project._state,c=l.near,u=l.far;n.viewport(0,0,a,o),n.clearColor(0,0,0,1),n.enable(n.DEPTH_TEST),n.disable(n.BLEND),n.frontFace(n.CCW),n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT),i.bind(),qe[0]=a,qe[1]=o,n.uniform2fv(this._uViewport,qe),n.uniform1f(this._uCameraNear,c),n.uniform1f(this._uCameraFar,u),n.uniform1f(this._uDepthCutoff,.01),0===s?n.uniform2fv(this._uSampleOffsets,Ye):n.uniform2fv(this._uSampleOffsets,Ke),n.uniform1fv(this._uSampleWeights,Xe);const h=e.getDepthTexture(),p=t.getTexture();i.bindTexture(this._uDepthTexture,h,0),i.bindTexture(this._uOcclusionTexture,p,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),n.drawElements(n.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}destroy(){this._program.destroy()}}function Ze(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function $e(e,t){const s=[];for(let n=0;n<=e;n++)s.push(t[0]*n),s.push(t[1]*n);return s}class et{constructor(e,t,s){s=s||{},this.gl=t,this.allocated=!1,this.canvas=e,this.buffer=null,this.bound=!1,this.size=s.size,this._hasDepthTexture=!!s.depthTexture}setSize(e){this.size=e}webglContextRestored(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}bind(...e){if(this._touch(...e),this.bound)return;const t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}createTexture(e,t,s=null){const n=this.gl,i=n.createTexture();return n.bindTexture(n.TEXTURE_2D,i),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),s?n.texStorage2D(n.TEXTURE_2D,1,s,e,t):n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e,t,0,n.RGBA,n.UNSIGNED_BYTE,null),i}_touch(...e){let t,s;const n=this.gl;if(this.size?(t=this.size[0],s=this.size[1]):(t=n.drawingBufferWidth,s=n.drawingBufferHeight),this.buffer){if(this.buffer.width===t&&this.buffer.height===s)return;this.buffer.textures.forEach((e=>n.deleteTexture(e))),n.deleteFramebuffer(this.buffer.framebuf),n.deleteRenderbuffer(this.buffer.renderbuf)}const i=[];let r;e.length>0?i.push(...e.map((e=>this.createTexture(t,s,e)))):i.push(this.createTexture(t,s)),this._hasDepthTexture&&(r=n.createTexture(),n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texImage2D(n.TEXTURE_2D,0,n.DEPTH_COMPONENT32F,t,s,0,n.DEPTH_COMPONENT,n.FLOAT,null));const a=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,a),n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_COMPONENT32F,t,s);const o=n.createFramebuffer();n.bindFramebuffer(n.FRAMEBUFFER,o);for(let e=0;e0&&n.drawBuffers(i.map(((e,t)=>n.COLOR_ATTACHMENT0+t))),this._hasDepthTexture?n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,r,0):n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.RENDERBUFFER,a),n.bindTexture(n.TEXTURE_2D,null),n.bindRenderbuffer(n.RENDERBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.bindFramebuffer(n.FRAMEBUFFER,o),!n.isFramebuffer(o))throw"Invalid framebuffer";n.bindFramebuffer(n.FRAMEBUFFER,null);const l=n.checkFramebufferStatus(n.FRAMEBUFFER);switch(l){case n.FRAMEBUFFER_COMPLETE:break;case n.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case n.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case n.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+l}this.buffer={framebuf:o,renderbuf:a,texture:i[0],textures:i,depthTexture:r,width:t,height:s},this.bound=!1}clear(){if(!this.bound)throw"Render buffer not bound";const e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}read(e,t,s=null,n=null,i=Uint8Array,r=4,a=0){const o=e,l=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,c=new i(r),u=this.gl;return u.readBuffer(u.COLOR_ATTACHMENT0+a),u.readPixels(o,l,1,1,s||u.RGBA,n||u.UNSIGNED_BYTE,c,0),c}readArray(e=null,t=null,s=Uint8Array,n=4,i=0){const r=new s(this.buffer.width*this.buffer.height*n),a=this.gl;return a.readBuffer(a.COLOR_ATTACHMENT0+i),a.readPixels(0,0,this.buffer.width,this.buffer.height,e||a.RGBA,t||a.UNSIGNED_BYTE,r,0),r}readImageAsCanvas(){const e=this.gl,t=this._getImageDataCache(),s=t.pixelData,n=t.canvas,i=t.imageData,r=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,s);const a=this.buffer.width,o=this.buffer.height,l=o/2|0,c=4*a,u=new Uint8Array(4*a);for(let e=0;ee.deleteTexture(t))),e.deleteTexture(this.buffer.depthTexture),e.deleteFramebuffer(this.buffer.framebuf),e.deleteRenderbuffer(this.buffer.renderbuf),this.allocated=!1,this.buffer=null,this.bound=!1}this._imageDataCache=null,this._texture=null,this._depthTexture=null}}class tt{constructor(e){this.scene=e,this._renderBuffersBasic={},this._renderBuffersScaled={}}getRenderBuffer(e,t){const s=1===this.scene.canvas.resolutionScale?this._renderBuffersBasic:this._renderBuffersScaled;let n=s[e];return n||(n=new et(this.scene.canvas.canvas,this.scene.canvas.gl,t),s[e]=n),n}destroy(){for(let e in this._renderBuffersBasic)this._renderBuffersBasic[e].destroy();for(let e in this._renderBuffersScaled)this._renderBuffersScaled[e].destroy()}}function st(e,t){if(void 0===e._cachedExtensions&&(e._cachedExtensions={}),void 0!==e._cachedExtensions[t])return e._cachedExtensions[t];let s;switch(t){case"WEBGL_depth_texture":s=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":s=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":s=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":s=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:s=e.getExtension(t)}return e._cachedExtensions[t]=s,s}const nt=function(t,s){s=s||{};const n=new Re(t),i=t.canvas.canvas,r=t.canvas.gl,a=!!s.transparent,o=s.alphaDepthMask,l=new e({});let c={},u={},h=!0,p=!0,A=!0,f=!0,I=!0,y=!0,v=!0,w=!0;const g=new tt(t);let E=!1;const T=new ze(t),b=new Je(t);function D(){h&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableMap,n=t.drawableListPreCull;let i=0;for(let e in s)s.hasOwnProperty(e)&&(n[i++]=s[e]);n.length=i}}(),h=!1,p=!0),p&&(!function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e];t.isStateSortable&&t.drawableListPreCull.sort(t.stateSortCompare)}}(),p=!1,A=!0),A&&function(){for(let e in c)if(c.hasOwnProperty(e)){const t=c[e],s=t.drawableListPreCull,n=t.drawableList;let i=0;for(let e=0,t=s.length;e0)for(n.withSAO=!0,S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||k>0||H>0||U>0){if(r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):(r.blendEquation(r.FUNC_ADD),r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA)),n.backfaces=!1,o||r.depthMask(!1),(H>0||U>0)&&r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),U>0)for(S=0;S0)for(S=0;S0)for(S=0;S0)for(S=0;S0||W>0){if(n.lastProgramId=null,t.highlightMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),W>0)for(S=0;S0)for(S=0;S0||K>0||Q>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),r.enable(r.CULL_FACE),K>0)for(S=0;S0)for(S=0;S0||X>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),X>0)for(S=0;S0)for(S=0;S0||J>0){if(n.lastProgramId=null,t.selectedMaterial.glowThrough&&r.clear(r.DEPTH_BUFFER_BIT),r.enable(r.CULL_FACE),r.enable(r.BLEND),a?(r.blendEquation(r.FUNC_ADD),r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA)):r.blendFunc(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA),J>0)for(S=0;S0)for(S=0;S0){const t=Math.floor(e/4),s=p.size[0],n=t%s-Math.floor(s/2),i=Math.floor(t/s)-Math.floor(s/2),r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));C.push({x:n,y:i,dist:r,isVertex:a&&o?y[e+3]>m.length/2:a,result:[y[e+0],y[e+1],y[e+2],y[e+3]],normal:[v[e+0],v[e+1],v[e+2],v[e+3]],id:[w[e+0],w[e+1],w[e+2],w[e+3]]})}let O=null,S=null,N=null,x=null;if(C.length>0){C.sort(((e,t)=>e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist)),x=C[0].isVertex?"vertex":"edge";const e=C[0].result,t=C[0].normal,s=C[0].id,n=m[e[3]],i=n.origin,r=n.coordinateScale;S=d.normalizeVec3([t[0]/d.MAX_INT,t[1]/d.MAX_INT,t[2]/d.MAX_INT]),O=[e[0]*r[0]+i[0],e[1]*r[1]+i[1],e[2]*r[2]+i[2]],N=l.items[s[0]+(s[1]<<8)+(s[2]<<16)+(s[3]<<24)]}if(null===E&&null==O)return null;let L=null;null!==O&&(L=t.camera.projectWorldPos(O));const M=N&&N.delegatePickedEntity?N.delegatePickedEntity():N;return u.reset(),u.snappedToEdge="edge"===x,u.snappedToVertex="vertex"===x,u.worldPos=O,u.worldNormal=S,u.entity=M,u.canvasPos=s,u.snappedCanvasPos=L||s,u}}(),this.addMarker=function(e){this._occlusionTester=this._occlusionTester||new Qe(t,g),this._occlusionTester.addMarker(e),t.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){D(),this._occlusionTester.bindRenderBuf(),n.reset(),n.backfaces=!0,n.frontface=!0,r.viewport(0,0,r.drawingBufferWidth,r.drawingBufferHeight),r.clearColor(0,0,0,0),r.enable(r.DEPTH_TEST),r.disable(r.CULL_FACE),r.disable(r.BLEND),r.clear(r.COLOR_BUFFER_BIT|r.DEPTH_BUFFER_BIT);for(let e in c)if(c.hasOwnProperty(e)){const t=c[e].drawableList;for(let e=0,s=t.length;e{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!0:e.keyCode===this.KEY_ALT?this.altDown=!0:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!0),this.keyDown[e.keyCode]=!0,this.fire("keydown",e.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=e=>{this.enabled&&this.keyboardEnabled&&"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&(e.keyCode===this.KEY_CTRL?this.ctrlDown=!1:e.keyCode===this.KEY_ALT?this.altDown=!1:e.keyCode===this.KEY_SHIFT&&(this.shiftDown=!1),this.keyDown[e.keyCode]=!1,this.fire("keyup",e.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=e=>{this.enabled&&(this.mouseover=!0,this._getMouseCanvasPos(e),this.fire("mouseenter",this.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=e=>{this.enabled&&(this.mouseover=!1,this._getMouseCanvasPos(e),this.fire("mouseleave",this.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!0;break;case 2:this.mouseDownMiddle=!0;break;case 3:this.mouseDownRight=!0}this._getMouseCanvasPos(e),this.element.focus(),this.fire("mousedown",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=e=>{if(this.enabled){switch(e.which){case 1:this.mouseDownLeft=!1;break;case 2:this.mouseDownMiddle=!1;break;case 3:this.mouseDownRight=!1}this.fire("mouseup",this.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("click",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=e=>{if(this.enabled){switch(e.which){case 1:case 3:this.mouseDownLeft=!1,this.mouseDownRight=!1;break;case 2:this.mouseDownMiddle=!1}this._getMouseCanvasPos(e),this.fire("dblclick",this.mouseCanvasPos,!0),this.mouseover&&e.preventDefault()}});const e=this.scene.tickify((()=>this.fire("mousemove",this.mouseCanvasPos,!0)));this.element.addEventListener("mousemove",this._mouseMoveListener=t=>{this.enabled&&(this._getMouseCanvasPos(t),e(),this.mouseover&&t.preventDefault())});const t=this.scene.tickify((e=>{this.fire("mousewheel",e,!0)}));this.element.addEventListener("wheel",this._mouseWheelListener=(e,s)=>{if(!this.enabled)return;const n=Math.max(-1,Math.min(1,40*-e.deltaY));t(n)},{passive:!0});{let e,t;const s=2;this.on("mousedown",(s=>{e=s[0],t=s[1]})),this.on("mouseup",(n=>{e>=n[0]-s&&e<=n[0]+s&&t>=n[1]-s&&t<=n[1]+s&&this.fire("mouseclicked",n,!0)}))}this._eventsBound=!0}_unbindEvents(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}_getMouseCanvasPos(e){if(e){let t=e.target,s=0,n=0;for(;t.offsetParent;)s+=t.offsetLeft,n+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-s,this.mouseCanvasPos[1]=e.pageY-n}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}setEnabled(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}getEnabled(){return this.enabled}setKeyboardEnabled(e){this.keyboardEnabled=e}getKeyboardEnabled(){return this.keyboardEnabled}destroy(){super.destroy(),this._unbindEvents()}}const rt=new e({});class at{constructor(e){this.id=rt.addItem({});for(const t in e)e.hasOwnProperty(t)&&(this[t]=e[t])}destroy(){rt.removeItem(this.id)}}class ot extends x{get type(){return"Viewport"}constructor(e,t={}){super(e,t),this._state=new at({boundary:[0,0,100,100]}),this.boundary=t.boundary,this.autoBoundary=t.autoBoundary}set boundary(e){if(!this._autoBoundary){if(!e){const t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}get boundary(){return this._state.boundary}set autoBoundary(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){const t=e[2],s=e[3];this._state.boundary=[0,0,t,s],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}get autoBoundary(){return this._autoBoundary}_getState(){return this._state}destroy(){super.destroy(),this._state.destroy()}}class lt extends x{get type(){return"Perspective"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4(),near:.1,far:1e4}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this._fov=60,this._canvasResized=this.scene.canvas.on("boundary",this._needUpdate,this),this.fov=t.fov,this.fovAxis=t.fovAxis,this.near=t.near,this.far=t.far}_update(){const e=this.scene.canvas.boundary,t=e[2]/e[3],s=this._fovAxis;let n=this._fov;("x"===s||"min"===s&&t<1||"max"===s&&t>1)&&(n/=t),n=Math.min(n,120),d.perspectiveMat4(n*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}set fov(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}get fov(){return this._fov}set fovAxis(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}get fovAxis(){return this._fovAxis}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:1e4;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}class ct extends x{get type(){return"Ortho"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4(),near:.1,far:1e4}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.scale=t.scale,this.near=t.near,this.far=t.far,this._onCanvasBoundary=this.scene.canvas.on("boundary",this._needUpdate,this)}_update(){const e=this.scene,t=.5*this._scale,s=e.canvas.boundary,n=s[2],i=s[3],r=n/i;let a,o,l,c;n>i?(a=-t,o=t,l=t/r,c=-t/r):(a=-t*r,o=t*r,l=t,c=-t),d.orthoMat4c(a,o,c,l,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set scale(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}get scale(){return this._scale}set near(e){const t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}get near(){return this._state.near}set far(e){const t=null!=e?e:1e4;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}class ut extends x{get type(){return"Frustum"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4(),near:.1,far:1e4}),this._left=-1,this._right=1,this._bottom=-1,this._top=1,this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.left=t.left,this.right=t.right,this.bottom=t.bottom,this.top=t.top,this.near=t.near,this.far=t.far}_update(){d.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}set left(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}get left(){return this._left}set right(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}get right(){return this._right}set top(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}get top(){return this._top}set bottom(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}get bottom(){return this._bottom}set near(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}get near(){return this._state.near}set far(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}get far(){return this._state.far}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy(),super.destroy()}}class ht extends x{get type(){return"CustomProjection"}constructor(e,t={}){super(e,t),this.camera=e,this._state=new at({matrix:d.mat4(),inverseMatrix:d.mat4(),transposedMatrix:d.mat4()}),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!1,this.matrix=t.matrix}set matrix(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}get matrix(){return this._state.matrix}get inverseMatrix(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&(d.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}get transposedMatrix(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&(d.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}unproject(e,t,s,n,i){const r=this.scene.canvas.canvas,a=r.offsetWidth/2,o=r.offsetHeight/2;return s[0]=(e[0]-a)/a,s[1]=(e[1]-o)/o,s[2]=t,s[3]=1,d.mulMat4v4(this.inverseMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1,d.mulMat4v4(this.camera.inverseViewMatrix,n,i),i}destroy(){super.destroy(),this._state.destroy()}}const pt=d.vec3(),dt=d.vec3(),At=d.vec3(),ft=d.vec3(),It=d.vec3(),mt=d.vec3(),yt=d.vec4(),vt=d.vec4(),wt=d.vec4(),gt=d.mat4(),Et=d.mat4(),Tt=d.vec3(),bt=d.vec3(),Dt=d.vec3(),Pt=d.vec3();class Ct extends x{get type(){return"Camera"}constructor(e,t={}){super(e,t),this._state=new at({deviceMatrix:d.mat4(),hasDeviceMatrix:!1,matrix:d.mat4(),normalMatrix:d.mat4(),inverseMatrix:d.mat4()}),this._perspective=new lt(this),this._ortho=new ct(this),this._frustum=new ut(this),this._customProjection=new ht(this),this._project=this._perspective,this._eye=d.vec3([0,0,10]),this._look=d.vec3([0,0,0]),this._up=d.vec3([0,1,0]),this._worldUp=d.vec3([0,1,0]),this._worldRight=d.vec3([1,0,0]),this._worldForward=d.vec3([0,0,-1]),this.deviceMatrix=t.deviceMatrix,this.eye=t.eye,this.look=t.look,this.up=t.up,this.worldAxis=t.worldAxis,this.gimbalLock=t.gimbalLock,this.constrainPitch=t.constrainPitch,this.projection=t.projection,this._perspective.on("matrix",(()=>{"perspective"===this._projectionType&&this.fire("projMatrix",this._perspective.matrix)})),this._ortho.on("matrix",(()=>{"ortho"===this._projectionType&&this.fire("projMatrix",this._ortho.matrix)})),this._frustum.on("matrix",(()=>{"frustum"===this._projectionType&&this.fire("projMatrix",this._frustum.matrix)})),this._customProjection.on("matrix",(()=>{"customProjection"===this._projectionType&&this.fire("projMatrix",this._customProjection.matrix)}))}_update(){const e=this._state;let t;"ortho"===this.projection?(d.subVec3(this._eye,this._look,Tt),d.normalizeVec3(Tt,bt),d.mulVec3Scalar(bt,1e3,Dt),d.addVec3(this._look,Dt,Pt),t=Pt):t=this._eye,e.hasDeviceMatrix?(d.lookAtMat4v(t,this._look,this._up,Et),d.mulMat4(e.deviceMatrix,Et,e.matrix)):d.lookAtMat4v(t,this._look,this._up,e.matrix),d.inverseMat4(this._state.matrix,this._state.inverseMatrix),d.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}orbitYaw(e){let t=d.subVec3(this._eye,this._look,pt);d.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,gt),t=d.transformPoint3(gt,t,dt),this.eye=d.addVec3(this._look,t,At),this.up=d.transformPoint3(gt,this._up,ft)}orbitPitch(e){if(this._constrainPitch&&(e=d.dotVec3(this._up,this._worldUp)/d.DEGTORAD)<1)return;let t=d.subVec3(this._eye,this._look,pt);const s=d.cross3Vec3(d.normalizeVec3(t,dt),d.normalizeVec3(this._up,At));d.rotationMat4v(.0174532925*e,s,gt),t=d.transformPoint3(gt,t,ft),this.up=d.transformPoint3(gt,this._up,It),this.eye=d.addVec3(t,this._look,mt)}yaw(e){let t=d.subVec3(this._look,this._eye,pt);d.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,gt),t=d.transformPoint3(gt,t,dt),this.look=d.addVec3(t,this._eye,At),this._gimbalLock&&(this.up=d.transformPoint3(gt,this._up,ft))}pitch(e){if(this._constrainPitch&&(e=d.dotVec3(this._up,this._worldUp)/d.DEGTORAD)<1)return;let t=d.subVec3(this._look,this._eye,pt);const s=d.cross3Vec3(d.normalizeVec3(t,dt),d.normalizeVec3(this._up,At));d.rotationMat4v(.0174532925*e,s,gt),this.up=d.transformPoint3(gt,this._up,mt),t=d.transformPoint3(gt,t,ft),this.look=d.addVec3(t,this._eye,It)}pan(e){const t=d.subVec3(this._eye,this._look,pt),s=[0,0,0];let n;if(0!==e[0]){const i=d.cross3Vec3(d.normalizeVec3(t,[]),d.normalizeVec3(this._up,dt));n=d.mulVec3Scalar(i,e[0]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]}0!==e[1]&&(n=d.mulVec3Scalar(d.normalizeVec3(this._up,At),e[1]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),0!==e[2]&&(n=d.mulVec3Scalar(d.normalizeVec3(t,ft),e[2]),s[0]+=n[0],s[1]+=n[1],s[2]+=n[2]),this.eye=d.addVec3(this._eye,s,It),this.look=d.addVec3(this._look,s,mt)}zoom(e){const t=d.subVec3(this._eye,this._look,pt),s=Math.abs(d.lenVec3(t,dt)),n=Math.abs(s+e);if(n<.5)return;const i=d.normalizeVec3(t,At);this.eye=d.addVec3(this._look,d.mulVec3Scalar(i,n),ft)}set eye(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}get eye(){return this._eye}set look(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}get look(){return this._look}set up(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}get up(){return this._up}set deviceMatrix(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}get deviceMatrix(){return this._state.deviceMatrix}set worldAxis(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=d.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}get worldAxis(){return this._worldAxis}get worldUp(){return this._worldUp}get xUp(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}get yUp(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}get zUp(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}get worldRight(){return this._worldRight}get worldForward(){return this._worldForward}set gimbalLock(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}get gimbalLock(){return this._gimbalLock}set constrainPitch(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}get eyeLookDist(){return d.lenVec3(d.subVec3(this._look,this._eye,pt))}get matrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get viewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}get normalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get viewNormalMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}get inverseViewMatrix(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}get projMatrix(){return this[this.projection].matrix}get perspective(){return this._perspective}get ortho(){return this._ortho}get frustum(){return this._frustum}get customProjection(){return this._customProjection}set projection(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}get projection(){return this._projectionType}get project(){return this._project}projectWorldPos(e){const t=yt,s=vt,n=wt;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,d.mulMat4v4(this.viewMatrix,t,s),d.mulMat4v4(this.projMatrix,s,n),d.mulVec3Scalar(n,1/n[3]),n[3]=1,n[1]*=-1;const i=this.scene.canvas.canvas,r=i.offsetWidth/2,a=i.offsetHeight/2;return[n[0]*r+r,n[1]*a+a]}destroy(){super.destroy(),this._state.destroy()}}class _t extends x{get type(){return"Light"}get isLight(){return!0}constructor(e,t={}){super(e,t)}}class Rt extends _t{get type(){return"DirLight"}constructor(e,t={}){super(e,t),this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const s=this.scene.camera,n=this.scene.canvas;this._onCameraViewMatrix=s.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=s.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=n.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new at({type:"dir",dir:d.vec3([1,1,1]),color:d.vec3([.7,.7,.8]),intensity:1,space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(this._shadowViewMatrixDirty){this._shadowViewMatrix||(this._shadowViewMatrix=d.identityMat4());const e=this.scene.camera,t=this._state.dir,s=e.look,n=[s[0]-t[0],s[1]-t[1],s[2]-t[2]],i=[0,1,0];d.lookAtMat4v(n,s,i,this._shadowViewMatrix),this._shadowViewMatrixDirty=!1}return this._shadowViewMatrix},getShadowProjMatrix:()=>(this._shadowProjMatrixDirty&&(this._shadowProjMatrix||(this._shadowProjMatrix=d.identityMat4()),d.orthoMat4c(-40,40,-40,40,-40,80,this._shadowProjMatrix),this._shadowProjMatrixDirty=!1),this._shadowProjMatrix),getShadowRenderBuf:()=>(this._shadowRenderBuf||(this._shadowRenderBuf=new et(this.scene.canvas.canvas,this.scene.canvas.gl,{size:[1024,1024]})),this._shadowRenderBuf)}),this.dir=t.dir,this.color=t.color,this.intensity=t.intensity,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set dir(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get dir(){return this._state.dir}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}class Bt extends _t{get type(){return"AmbientLight"}constructor(e,t={}){super(e,t),this._state={type:"ambient",color:d.vec3([.7,.7,.7]),intensity:1},this.color=t.color,this.intensity=t.intensity,this.scene._lightCreated(this)}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}get intensity(){return this._state.intensity}destroy(){super.destroy(),this.scene._lightDestroyed(this)}}class Ot extends x{get type(){return"Geometry"}get isGeometry(){return!0}constructor(e,t={}){super(e,t),m.memory.meshes++}destroy(){super.destroy(),m.memory.meshes--}}var St=function(){const e=[],t=[],s=[],n=[],i=[];let r=0;const a=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),c=d.vec3(),u=d.vec3(),h=d.vec3(),p=d.vec3(),A=d.vec3(),f=d.vec3(),I=d.vec3();return function(m,y,v,w){!function(i,r){const a={};let o,l,c,u;const h=Math.pow(10,4);let p,d,A=0;for(p=0,d=i.length;pE)||(N=s[R.index1],x=s[R.index2],(!L&&N>65535||x>65535)&&(L=!0),g.push(N),g.push(x));return L?new Uint32Array(g):new Uint16Array(g)}}();const Nt=function(){const e=d.mat4(),t=d.mat4();return function(s,n){n=n||d.mat4();const i=s[0],r=s[1],a=s[2],o=s[3]-i,l=s[4]-r,c=s[5]-a,u=65535;return d.identityMat4(e),d.translationMat4v(s,e),d.identityMat4(t),d.scalingMat4v([o/u,l/u,c/u],t),d.mulMat4(e,t,n),n}}();var xt=function(){const e=d.mat4(),t=d.mat4();return function(s,n,i){const r=new Uint16Array(s.length),a=new Float32Array([i[0]!==n[0]?65535/(i[0]-n[0]):0,i[1]!==n[1]?65535/(i[1]-n[1]):0,i[2]!==n[2]?65535/(i[2]-n[2]):0]);let o;for(o=0;o=0?1:-1),t=(1-Math.abs(i))*(r>=0?1:-1);i=e,r=t}return new Int8Array([Math[s](127.5*i+(i<0?-1:0)),Math[n](127.5*r+(r<0?-1:0))])}function Ft(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}function Ht(e,t,s){return e[t]*s[0]+e[t+1]*s[1]+e[t+2]*s[2]}const Ut={getPositionsBounds:function(e){const t=new Float32Array(3),s=new Float32Array(3);let n,i;for(n=0;n<3;n++)t[n]=Number.MAX_VALUE,s[n]=-Number.MAX_VALUE;for(n=0;na&&(i=s,a=r),s=Mt(e,o,"floor","ceil"),n=Ft(s),r=Ht(e,o,n),r>a&&(i=s,a=r),s=Mt(e,o,"ceil","ceil"),n=Ft(s),r=Ht(e,o,n),r>a&&(i=s,a=r),t[o]=i[0],t[o+1]=i[1];return t},decompressNormals:function(e,t){for(let s=0,n=0,i=e.length;s=0?1:-1),r=(1-Math.abs(i))*(r>=0?1:-1));const o=Math.sqrt(i*i+r*r+a*a);t[n+0]=i/o,t[n+1]=r/o,t[n+2]=a/o,n+=3}return t},decompressNormal:function(e,t){let s=e[0],n=e[1];s=(2*s+1)/255,n=(2*n+1)/255;const i=1-Math.abs(s)-Math.abs(n);i<0&&(s=(1-Math.abs(n))*(s>=0?1:-1),n=(1-Math.abs(s))*(n>=0?1:-1));const r=Math.sqrt(s*s+n*n+i*i);return t[0]=s/r,t[1]=n/r,t[2]=i/r,t}},Gt=m.memory,jt=d.AABB3();class Vt extends Ot{get type(){return"ReadableGeometry"}get isReadableGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new at({compressGeometry:!!t.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._edgeIndicesBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._aabbDirty=!0,this._boundingSphere=!0,this._aabb=null,this._aabbDirty=!0,this._obb=null,this._obbDirty=!0;const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(this._state.compressGeometry){const e=Ut.getPositionsBounds(t.positions),n=Ut.compressPositions(t.positions,e.min,e.max);s.positions=n.quantized,s.positionsDecodeMatrix=n.decodeMatrix}else s.positions=t.positions.constructor===Float32Array?t.positions:new Float32Array(t.positions);if(t.colors&&(s.colors=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors)),t.uv)if(this._state.compressGeometry){const e=Ut.getUVBounds(t.uv),n=Ut.compressUVs(t.uv,e.min,e.max);s.uv=n.quantized,s.uvDecodeMatrix=n.decodeMatrix}else s.uv=t.uv.constructor===Float32Array?t.uv:new Float32Array(t.uv);t.normals&&(this._state.compressGeometry?s.normals=Ut.compressNormals(t.normals):s.normals=t.normals.constructor===Float32Array?t.normals:new Float32Array(t.normals)),t.indices&&(s.indices=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)),this._buildHash(),Gt.meshes++,this._buildVBOs()}_buildVBOs(){const e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),Gt.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),Gt.positions+=e.positionsBuf.numItems),e.normals){let s=e.compressGeometry;e.normalsBuf=new Ge(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,s),Gt.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),Gt.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new Ge(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),Gt.uvs+=e.uvBuf.numItems)}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}_getPickTrianglePositions(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}_getPickTriangleColors(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}_buildEdgeIndices(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=St(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,s,s.length,1,t.STATIC_DRAW),Gt.indices+=this._edgeIndicesBuf.numItems}_buildPickTriangleVBOs(){const e=this._state;if(!e.positions||!e.indices)return;const t=this.scene.canvas.gl,s=d.buildPickTriangles(e.positions,e.indices,e.compressGeometry),n=s.positions,i=s.colors;this._pickTrianglePositionsBuf=new Ge(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,4,t.STATIC_DRAW,!0),Gt.positions+=this._pickTrianglePositionsBuf.numItems,Gt.colors+=this._pickTriangleColorsBuf.numItems}_buildPickVertexVBOs(){}_webglContextLost(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}_webglContextRestored(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}get primitive(){return this._state.primitiveName}get compressGeometry(){return this._state.compressGeometry}get positions(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),Ut.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null}set positions(e){const t=this._state,s=t.positions;if(s)if(s.length===e.length){if(this._state.compressGeometry){const s=Ut.getPositionsBounds(e),n=Ut.compressPositions(e,s.min,s.max);e=n.quantized,t.positionsDecodeMatrix=n.decodeMatrix}s.set(e),t.positionsBuf&&t.positionsBuf.setData(s),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}get normals(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){const e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),Ut.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}}set normals(e){if(this._state.compressGeometry)return void this.error("can't update geometry normals - quantized geometry is immutable");const t=this._state,s=t.normals;s?s.length===e.length?(s.set(e),t.normalsBuf&&t.normalsBuf.setData(s),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}get uv(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),Ut.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null}set uv(e){if(this._state.compressGeometry)return void this.error("can't update geometry UVs - quantized geometry is immutable");const t=this._state,s=t.uv;s?s.length===e.length?(s.set(e),t.uvBuf&&t.uvBuf.setData(s),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}get colors(){return this._state.colors}set colors(e){if(this._state.compressGeometry)return void this.error("can't update geometry colors - quantized geometry is immutable");const t=this._state,s=t.colors;s?s.length===e.length?(s.set(e),t.colorsBuf&&t.colorsBuf.setData(s),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}get indices(){return this._state.indices}get aabb(){return this._aabbDirty&&(this._aabb||(this._aabb=d.AABB3()),d.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}get obb(){return this._obbDirty&&(this._obb||(this._obb=d.OBB3()),d.positions3ToAABB3(this._state.positions,jt,this._state.positionsDecodeMatrix),d.AABB3ToOBB3(jt,this._obb),this._obbDirty=!1),this._obb}get numTriangles(){return this._numTriangles}_setAABBDirty(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),Gt.meshes--}}function kt(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return g.apply(e,{positions:[h,p,d,l,p,d,l,c,d,h,c,d,h,p,d,h,c,d,h,c,u,h,p,u,h,p,d,h,p,u,l,p,u,l,p,d,l,p,d,l,p,u,l,c,u,l,c,d,l,c,u,h,c,u,h,c,d,l,c,d,h,c,u,l,c,u,l,p,u,h,p,u],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}class Qt extends x{get type(){return"Material"}constructor(e,t={}){super(e,t),m.memory.materials++}destroy(){super.destroy(),m.memory.materials--}}const Wt={opaque:0,mask:1,blend:2},zt=["opaque","mask","blend"];class Kt extends Qt{get type(){return"PhongMaterial"}constructor(e,t={}){super(e,t),this._state=new at({type:"PhongMaterial",ambient:d.vec3([1,1,1]),diffuse:d.vec3([1,1,1]),specular:d.vec3([1,1,1]),emissive:d.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),this.ambient=t.ambient,this.diffuse=t.diffuse,this.specular=t.specular,this.emissive=t.emissive,this.alpha=t.alpha,this.shininess=t.shininess,this.reflectivity=t.reflectivity,this.lineWidth=t.lineWidth,this.pointSize=t.pointSize,t.ambientMap&&(this._ambientMap=this._checkComponent("Texture",t.ambientMap)),t.diffuseMap&&(this._diffuseMap=this._checkComponent("Texture",t.diffuseMap)),t.specularMap&&(this._specularMap=this._checkComponent("Texture",t.specularMap)),t.emissiveMap&&(this._emissiveMap=this._checkComponent("Texture",t.emissiveMap)),t.alphaMap&&(this._alphaMap=this._checkComponent("Texture",t.alphaMap)),t.reflectivityMap&&(this._reflectivityMap=this._checkComponent("Texture",t.reflectivityMap)),t.normalMap&&(this._normalMap=this._checkComponent("Texture",t.normalMap)),t.occlusionMap&&(this._occlusionMap=this._checkComponent("Texture",t.occlusionMap)),t.diffuseFresnel&&(this._diffuseFresnel=this._checkComponent("Fresnel",t.diffuseFresnel)),t.specularFresnel&&(this._specularFresnel=this._checkComponent("Fresnel",t.specularFresnel)),t.emissiveFresnel&&(this._emissiveFresnel=this._checkComponent("Fresnel",t.emissiveFresnel)),t.alphaFresnel&&(this._alphaFresnel=this._checkComponent("Fresnel",t.alphaFresnel)),t.reflectivityFresnel&&(this._reflectivityFresnel=this._checkComponent("Fresnel",t.reflectivityFresnel)),this.alphaMode=t.alphaMode,this.alphaCutoff=t.alphaCutoff,this.backfaces=t.backfaces,this.frontface=t.frontface,this._makeHash()}_makeHash(){const e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}set ambient(e){let t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get ambient(){return this._state.ambient}set diffuse(e){let t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get diffuse(){return this._state.diffuse}set specular(e){let t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}get specular(){return this._state.specular}set emissive(e){let t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}get emissive(){return this._state.emissive}set alpha(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}get alpha(){return this._state.alpha}set shininess(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}get shininess(){return this._state.shininess}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set pointSize(e){this._state.pointSize=e||1,this.glRedraw()}get pointSize(){return this._state.pointSize}set reflectivity(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}get reflectivity(){return this._state.reflectivity}get normalMap(){return this._normalMap}get ambientMap(){return this._ambientMap}get diffuseMap(){return this._diffuseMap}get specularMap(){return this._specularMap}get emissiveMap(){return this._emissiveMap}get alphaMap(){return this._alphaMap}get reflectivityMap(){return this._reflectivityMap}get occlusionMap(){return this._occlusionMap}get diffuseFresnel(){return this._diffuseFresnel}get specularFresnel(){return this._specularFresnel}get emissiveFresnel(){return this._emissiveFresnel}get alphaFresnel(){return this._alphaFresnel}get reflectivityFresnel(){return this._reflectivityFresnel}set alphaMode(e){let t=Wt[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}get alphaMode(){return zt[this._state.alphaMode]}set alphaCutoff(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}get alphaCutoff(){return this._state.alphaCutoff}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set frontface(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}get frontface(){return this._state.frontface?"ccw":"cw"}destroy(){super.destroy(),this._state.destroy()}}const Yt={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}};class Xt extends Qt{get type(){return"EmphasisMaterial"}get presets(){return Yt}constructor(e,t={}){super(e,t),this._state=new at({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),this._preset="default",t.preset?(this.preset=t.preset,void 0!==t.fill&&(this.fill=t.fill),t.fillColor&&(this.fillColor=t.fillColor),void 0!==t.fillAlpha&&(this.fillAlpha=t.fillAlpha),void 0!==t.edges&&(this.edges=t.edges),t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth),void 0!==t.backfaces&&(this.backfaces=t.backfaces),void 0!==t.glowThrough&&(this.glowThrough=t.glowThrough)):(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.backfaces=t.backfaces,this.glowThrough=t.glowThrough)}set fill(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}get fill(){return this._state.fill}set fillColor(e){let t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}get fillColor(){return this._state.fillColor}set fillAlpha(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}get fillAlpha(){return this._state.fillAlpha}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set backfaces(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}get backfaces(){return this._state.backfaces}set glowThrough(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}get glowThrough(){return this._state.glowThrough}set preset(e){if(e=e||"default",this._preset===e)return;const t=Yt[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Yt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const qt={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}};class Jt extends Qt{get type(){return"EdgeMaterial"}get presets(){return qt}constructor(e,t={}){super(e,t),this._state=new at({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),this._preset="default",t.preset?(this.preset=t.preset,t.edgeColor&&(this.edgeColor=t.edgeColor),void 0!==t.edgeAlpha&&(this.edgeAlpha=t.edgeAlpha),void 0!==t.edgeWidth&&(this.edgeWidth=t.edgeWidth)):(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth),this.edges=!1!==t.edges}set edges(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}get edges(){return this._state.edges}set edgeColor(e){let t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set edgeAlpha(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}get edgeAlpha(){return this._state.edgeAlpha}set edgeWidth(e){this._state.edgeWidth=e||1,this.glRedraw()}get edgeWidth(){return this._state.edgeWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=qt[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(qt).join(", "))}get preset(){return this._preset}destroy(){super.destroy(),this._state.destroy()}}const Zt={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}};class $t extends x{constructor(e,t={}){super(e,t),this._units="meters",this._scale=1,this._origin=d.vec3([0,0,0]),this.units=t.units,this.scale=t.scale,this.origin=t.origin}get unitsInfo(){return Zt}set units(e){e||(e="meters");Zt[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}get units(){return this._units}set scale(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}get scale(){return this._scale}set origin(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}get origin(){return this._origin}worldToRealPos(e,t=d.vec3(3)){t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}realToWorldPos(e,t=d.vec3(3)){return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}class es extends x{constructor(e,t={}){super(e,t),this._supported=Be.SUPPORTED_EXTENSIONS.OES_standard_derivatives,this.enabled=t.enabled,this.kernelRadius=t.kernelRadius,this.intensity=t.intensity,this.bias=t.bias,this.scale=t.scale,this.minResolution=t.minResolution,this.numSamples=t.numSamples,this.blur=t.blur,this.blendCutoff=t.blendCutoff,this.blendFactor=t.blendFactor}get supported(){return this._supported}set enabled(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}get enabled(){return this._enabled}get possible(){if(!this._supported)return!1;if(!this._enabled)return!1;const e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}get active(){return this._active}set kernelRadius(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}get kernelRadius(){return this._kernelRadius}set intensity(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}get intensity(){return this._intensity}set bias(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}get bias(){return this._bias}set scale(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}get scale(){return this._scale}set minResolution(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}get minResolution(){return this._minResolution}set numSamples(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}get numSamples(){return this._numSamples}set blur(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}get blur(){return this._blur}set blendCutoff(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}get blendCutoff(){return this._blendCutoff}set blendFactor(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}get blendFactor(){return this._blendFactor}destroy(){super.destroy()}}const ts={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}};class ss extends Qt{get type(){return"PointsMaterial"}get presets(){return ts}constructor(e,t={}){super(e,t),this._state=new at({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),t.preset?(this.preset=t.preset,void 0!==t.pointSize&&(this.pointSize=t.pointSize),void 0!==t.roundPoints&&(this.roundPoints=t.roundPoints),void 0!==t.perspectivePoints&&(this.perspectivePoints=t.perspectivePoints),void 0!==t.minPerspectivePointSize&&(this.minPerspectivePointSize=t.minPerspectivePointSize),void 0!==t.maxPerspectivePointSize&&(this.maxPerspectivePointSize=t.minPerspectivePointSize)):(this._preset="default",this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize),this.filterIntensity=t.filterIntensity,this.minIntensity=t.minIntensity,this.maxIntensity=t.maxIntensity}set pointSize(e){this._state.pointSize=e||2,this.glRedraw()}get pointSize(){return this._state.pointSize}set roundPoints(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}get roundPoints(){return this._state.roundPoints}set perspectivePoints(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}get perspectivePoints(){return this._state.perspectivePoints}set minPerspectivePointSize(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}get minPerspectivePointSize(){return this._state.minPerspectivePointSize}set maxPerspectivePointSize(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}get maxPerspectivePointSize(){return this._state.maxPerspectivePointSize}set filterIntensity(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}get filterIntensity(){return this._state.filterIntensity}set minIntensity(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}get minIntensity(){return this._state.minIntensity}set maxIntensity(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}get maxIntensity(){return this._state.maxIntensity}set preset(e){if(e=e||"default",this._preset===e)return;const t=ts[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(ts).join(", "))}get preset(){return this._preset}get hash(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}destroy(){super.destroy(),this._state.destroy()}}const ns={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}};class is extends Qt{get type(){return"LinesMaterial"}get presets(){return ns}constructor(e,t={}){super(e,t),this._state=new at({type:"LinesMaterial",lineWidth:null}),t.preset?(this.preset=t.preset,void 0!==t.lineWidth&&(this.lineWidth=t.lineWidth)):(this._preset="default",this.lineWidth=t.lineWidth)}set lineWidth(e){this._state.lineWidth=e||1,this.glRedraw()}get lineWidth(){return this._state.lineWidth}set preset(e){if(e=e||"default",this._preset===e)return;const t=ns[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(ns).join(", "))}get preset(){return this._preset}get hash(){return[""+this.lineWidth].join(";")}destroy(){super.destroy(),this._state.destroy()}}function rs(e,t){const s={};let n,i;for(let r=0,a=t.length;r{this.glRedraw()})),this.canvas.on("webglContextFailed",(()=>{alert("xeokit failed to find WebGL!")})),this._renderer=new nt(this,{transparent:n,alphaDepthMask:i}),this._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1,this._numCachedSectionPlanes=0;let e=null;this.getHash=function(){if(e)return e;const t=this.getNumAllocatedSectionPlanes();if(this.sectionPlanes,0===t)return this.hash=";";const s=[];for(let e=0,n=t;ethis._numCachedSectionPlanes?e:this._numCachedSectionPlanes}},this._sectionPlanesState.setNumCachedSectionPlanes(t.numCachedSectionPlanes||0),this._lightsState=new function(){const e=d.vec4([0,0,0,0]),t=d.vec4();this.lights=[],this.reflectionMaps=[],this.lightMaps=[];let s=null,n=null;this.getHash=function(){if(s)return s;const e=[],t=this.lights;let n;for(let s=0,i=t.length;s0&&e.push("/lm"),this.reflectionMaps.length>0&&e.push("/rm"),e.push(";"),s=e.join(""),s},this.addLight=function(e){this.lights.push(e),n=null,s=null},this.removeLight=function(e){for(let t=0,i=this.lights.length;t{this._renderer.imageDirty()}))}_initDefaults(){}_addComponent(e){if(e.id&&this.components[e.id]&&(this.error("Component "+g.inQuotes(e.id)+" already exists in Scene - ignoring ID, will randomly-generate instead"),e.id=null),!e.id)for(void 0===window.nextID&&(window.nextID=0),e.id="__"+window.nextID++;this.components[e.id];)e.id=d.createUUID();this.components[e.id]=e;const t=e.type;let s=this.types[e.type];s||(s=this.types[t]={}),s[e.id]=e,e.compile&&(this._compilables[e.id]=e),e.isDrawable&&(this._renderer.addDrawable(e.id,e),this._collidables[e.id]=e)}_removeComponent(e){var t=e.id,s=e.type;delete this.components[t];const n=this.types[s];n&&(delete n[t],g.isEmptyObject(n)&&delete this.types[s]),e.compile&&delete this._compilables[e.id],e.isDrawable&&(this._renderer.removeDrawable(e.id),delete this._collidables[e.id])}_sectionPlaneCreated(e){this.sectionPlanes[e.id]=e,this.scene._sectionPlanesState.addSectionPlane(e._state),this.scene.fire("sectionPlaneCreated",e,!0),this._needRecompile=!0}_bitmapCreated(e){this.bitmaps[e.id]=e,this.scene.fire("bitmapCreated",e,!0)}_lineSetCreated(e){this.lineSets[e.id]=e,this.scene.fire("lineSetCreated",e,!0)}_lightCreated(e){this.lights[e.id]=e,this.scene._lightsState.addLight(e._state),this._needRecompile=!0}_lightMapCreated(e){this.lightMaps[e.id]=e,this.scene._lightsState.addLightMap(e._state),this._needRecompile=!0}_reflectionMapCreated(e){this.reflectionMaps[e.id]=e,this.scene._lightsState.addReflectionMap(e._state),this._needRecompile=!0}_sectionPlaneDestroyed(e){delete this.sectionPlanes[e.id],this.scene._sectionPlanesState.removeSectionPlane(e._state),this.scene.fire("sectionPlaneDestroyed",e,!0),this._needRecompile=!0}_bitmapDestroyed(e){delete this.bitmaps[e.id],this.scene.fire("bitmapDestroyed",e,!0)}_lineSetDestroyed(e){delete this.lineSets[e.id],this.scene.fire("lineSetDestroyed",e,!0)}_lightDestroyed(e){delete this.lights[e.id],this.scene._lightsState.removeLight(e._state),this._needRecompile=!0}_lightMapDestroyed(e){delete this.lightMaps[e.id],this.scene._lightsState.removeLightMap(e._state),this._needRecompile=!0}_reflectionMapDestroyed(e){delete this.reflectionMaps[e.id],this.scene._lightsState.removeReflectionMap(e._state),this._needRecompile=!0}_registerModel(e){this.models[e.id]=e,this._modelIds=null}_deregisterModel(e){const t=e.id;delete this.models[t],this._modelIds=null,this.fire("modelUnloaded",t)}_registerObject(e){this.objects[e.id]=e,this._numObjects++,this._objectIds=null}_deregisterObject(e){delete this.objects[e.id],this._numObjects--,this._objectIds=null}_objectVisibilityUpdated(e,t=!0){e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}_deRegisterVisibleObject(e){delete this.visibleObjects[e.id],this._numVisibleObjects--,this._visibleObjectIds=null}_objectXRayedUpdated(e,t=!0){e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}_deRegisterXRayedObject(e){delete this.xrayedObjects[e.id],this._numXRayedObjects--,this._xrayedObjectIds=null}_objectHighlightedUpdated(e){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null}_deRegisterHighlightedObject(e){delete this.highlightedObjects[e.id],this._numHighlightedObjects--,this._highlightedObjectIds=null}_objectSelectedUpdated(e,t=!0){e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}_deRegisterSelectedObject(e){delete this.selectedObjects[e.id],this._numSelectedObjects--,this._selectedObjectIds=null}_objectColorizeUpdated(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}_deRegisterColorizedObject(e){delete this.colorizedObjects[e.id],this._numColorizedObjects--,this._colorizedObjectIds=null}_objectOpacityUpdated(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}_deRegisterOpacityObject(e){delete this.opacityObjects[e.id],this._numOpacityObjects--,this._opacityObjectIds=null}_objectOffsetUpdated(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}_deRegisterOffsetObject(e){delete this.offsetObjects[e.id],this._numOffsetObjects--,this._offsetObjectIds=null}_webglContextLost(){this.canvas.spinner.processes++;for(const e in this.components)if(this.components.hasOwnProperty(e)){const t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}_webglContextRestored(){const e=this.canvas.gl;for(const t in this.components)if(this.components.hasOwnProperty(t)){const s=this.components[t];s._webglContextRestored&&s._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}get capabilities(){return this._renderer.capabilities}get entityOffsetsEnabled(){return this._entityOffsetsEnabled}get pickSurfacePrecisionEnabled(){return!1}get logarithmicDepthBufferEnabled(){return this._logarithmicDepthBufferEnabled}set numCachedSectionPlanes(e){e=e||0,this._sectionPlanesState.getNumCachedSectionPlanes()!==e&&(this._sectionPlanesState.setNumCachedSectionPlanes(e),this._needRecompile=!0,this.glRedraw())}get numCachedSectionPlanes(){return this._sectionPlanesState.getNumCachedSectionPlanes()}set pbrEnabled(e){this._pbrEnabled=!!e,this.glRedraw()}get pbrEnabled(){return this._pbrEnabled}set dtxEnabled(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}get dtxEnabled(){return this._dtxEnabled}set colorTextureEnabled(e){this._colorTextureEnabled=!!e,this.glRedraw()}get colorTextureEnabled(){return this._colorTextureEnabled}doOcclusionTest(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}render(e){e&&B.runTasks();const t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),!e&&!this._renderer.needsRender())return;t.sceneId=this.id;const s=this._passes,n=this._clearEachPass;let i,r;for(i=0;ii&&(i=e[3]),e[4]>r&&(r=e[4]),e[5]>a&&(a=e[5]),c=!0}c||(t=-100,s=-100,n=-100,i=100,r=100,a=100),this._aabb[0]=t,this._aabb[1]=s,this._aabb[2]=n,this._aabb[3]=i,this._aabb[4]=r,this._aabb[5]=a,this._aabbDirty=!1}return this._aabb}_setAABBDirty(){this._aabbDirty=!0,this.fire("boundary")}pick(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");const s=e.includeEntities||e.include;s&&(e.includeEntityIds=rs(this,s));const n=e.excludeEntities||e.exclude;return n&&(e.excludeEntityIds=rs(this,n)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=e.snapToEdge||e.snapToVertex?this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge,t):this._renderer.pick(e,t))&&t.entity&&t.entity.fire&&t.entity.fire("picked",t),t}snapPick(e){return void 0===this._warnSnapPickDeprecated&&(this._warnSnapPickDeprecated=!0,this.warn("Scene.snapPick() is deprecated since v2.4.2 - use Scene.pick() instead")),this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}clear(){var e;for(const t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}clearLights(){const e=Object.keys(this.lights);for(let t=0,s=e.length;t{if(e.collidable){const l=e.aabb;l[0]r&&(r=l[3]),l[4]>a&&(a=l[4]),l[5]>o&&(o=l[5]),t=!0}})),t){const e=d.AABB3();return e[0]=s,e[1]=n,e[2]=i,e[3]=r,e[4]=a,e[5]=o,e}return this.aabb}setObjectsVisible(e,t){return this.withObjects(e,(e=>{const s=e.visible!==t;return e.visible=t,s}))}setObjectsCollidable(e,t){return this.withObjects(e,(e=>{const s=e.collidable!==t;return e.collidable=t,s}))}setObjectsCulled(e,t){return this.withObjects(e,(e=>{const s=e.culled!==t;return e.culled=t,s}))}setObjectsSelected(e,t){return this.withObjects(e,(e=>{const s=e.selected!==t;return e.selected=t,s}))}setObjectsHighlighted(e,t){return this.withObjects(e,(e=>{const s=e.highlighted!==t;return e.highlighted=t,s}))}setObjectsXRayed(e,t){return this.withObjects(e,(e=>{const s=e.xrayed!==t;return e.xrayed=t,s}))}setObjectsEdges(e,t){return this.withObjects(e,(e=>{const s=e.edges!==t;return e.edges=t,s}))}setObjectsColorized(e,t){return this.withObjects(e,(e=>{e.colorize=t}))}setObjectsOpacity(e,t){return this.withObjects(e,(e=>{const s=e.opacity!==t;return e.opacity=t,s}))}setObjectsPickable(e,t){return this.withObjects(e,(e=>{const s=e.pickable!==t;return e.pickable=t,s}))}setObjectsOffset(e,t){this.withObjects(e,(e=>{e.offset=t}))}withObjects(e,t){g.isString(e)&&(e=[e]);let s=!1;for(let n=0,i=e.length;n{i>n&&(n=i,e(...s))}));return this._tickifiedFunctions[t]={tickSubId:a,wrapperFunc:r},r}destroy(){super.destroy();for(const e in this.components)this.components.hasOwnProperty(e)&&this.components[e].destroy();this.canvas.gl=null,this.components=null,this.models=null,this.objects=null,this.visibleObjects=null,this.xrayedObjects=null,this.highlightedObjects=null,this.selectedObjects=null,this.colorizedObjects=null,this.opacityObjects=null,this.sectionPlanes=null,this.lights=null,this.lightMaps=null,this.reflectionMaps=null,this._objectIds=null,this._visibleObjectIds=null,this._xrayedObjectIds=null,this._highlightedObjectIds=null,this._selectedObjectIds=null,this._colorizedObjectIds=null,this.types=null,this.components=null,this.canvas=null,this._renderer=null,this.input=null,this._viewport=null,this._camera=null}}const os=1e3,ls=1001,cs=1002,us=1003,hs=1004,ps=1004,ds=1005,As=1005,fs=1006,Is=1007,ms=1007,ys=1008,vs=1008,ws=1009,gs=1010,Es=1011,Ts=1012,bs=1013,Ds=1014,Ps=1015,Cs=1016,_s=1017,Rs=1018,Bs=1020,Os=1021,Ss=1022,Ns=1023,xs=1024,Ls=1025,Ms=1026,Fs=1027,Hs=1028,Us=1029,Gs=1030,js=1031,Vs=1033,ks=33776,Qs=33777,Ws=33778,zs=33779,Ks=35840,Ys=35841,Xs=35842,qs=35843,Js=36196,Zs=37492,$s=37496,en=37808,tn=37809,sn=37810,nn=37811,rn=37812,an=37813,on=37814,ln=37815,cn=37816,un=37817,hn=37818,pn=37819,dn=37820,An=37821,fn=36492,In=3e3,mn=3001,yn=1e4,vn=10001,wn=10002,gn=10003,En=function(e){"LambertMaterial"===e._material._state.type?(this.vertex=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene._lightsState,i=e._geometry._state,r=e._state.billboard,a=e._state.stationary,o=s.getNumAllocatedSectionPlanes()>0,l=!!i.compressGeometry,c=[];c.push("#version 300 es"),c.push("// Lambertian drawing vertex shader"),c.push("in vec3 position;"),c.push("uniform mat4 modelMatrix;"),c.push("uniform mat4 viewMatrix;"),c.push("uniform mat4 projMatrix;"),c.push("uniform vec4 colorize;"),c.push("uniform vec3 offset;"),l&&c.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(c.push("uniform float logDepthBufFC;"),c.push("out float vFragDepth;"),c.push("bool isPerspectiveMatrix(mat4 m) {"),c.push(" return (m[2][3] == - 1.0);"),c.push("}"),c.push("out float isPerspective;"));o&&c.push("out vec4 vWorldPosition;");if(c.push("uniform vec4 lightAmbient;"),c.push("uniform vec4 materialColor;"),c.push("uniform vec3 materialEmissive;"),i.normalsBuf){c.push("in vec3 normal;"),c.push("uniform mat4 modelNormalMatrix;"),c.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=n.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),c.push(" }"),c.push(" return normalize(v);"),c.push("}"))}c.push("out vec4 vColor;"),"points"===i.primitiveName&&c.push("uniform float pointSize;");"spherical"!==r&&"cylindrical"!==r||(c.push("void billboard(inout mat4 mat) {"),c.push(" mat[0][0] = 1.0;"),c.push(" mat[0][1] = 0.0;"),c.push(" mat[0][2] = 0.0;"),"spherical"===r&&(c.push(" mat[1][0] = 0.0;"),c.push(" mat[1][1] = 1.0;"),c.push(" mat[1][2] = 0.0;")),c.push(" mat[2][0] = 0.0;"),c.push(" mat[2][1] = 0.0;"),c.push(" mat[2][2] =1.0;"),c.push("}"));c.push("void main(void) {"),c.push("vec4 localPosition = vec4(position, 1.0); "),c.push("vec4 worldPosition;"),l&&c.push("localPosition = positionsDecodeMatrix * localPosition;");i.normalsBuf&&(l?c.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):c.push("vec4 localNormal = vec4(normal, 0.0); "),c.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),c.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));c.push("mat4 viewMatrix2 = viewMatrix;"),c.push("mat4 modelMatrix2 = modelMatrix;"),a&&c.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===r||"cylindrical"===r?(c.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),c.push("billboard(modelMatrix2);"),c.push("billboard(viewMatrix2);"),c.push("billboard(modelViewMatrix);"),i.normalsBuf&&(c.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),c.push("billboard(modelNormalMatrix2);"),c.push("billboard(viewNormalMatrix2);"),c.push("billboard(modelViewNormalMatrix);")),c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(c.push("worldPosition = modelMatrix2 * localPosition;"),c.push("worldPosition.xyz = worldPosition.xyz + offset;"),c.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i.normalsBuf&&c.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(c.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),c.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),c.push("float lambertian = 1.0;"),i.normalsBuf)for(let e=0,t=n.lights.length;e0,r=t.gammaOutput,a=[];a.push("#version 300 es"),a.push("// Lambertian drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}"points"===n.primitiveName&&(a.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),a.push("float r = dot(cxy, cxy);"),a.push("if (r > 1.0) {"),a.push(" discard;"),a.push("}"));t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(e)):(this.vertex=function(e){const t=e.scene;e._material;const s=e._state,n=t._sectionPlanesState,i=e._geometry._state,r=t._lightsState;let a;const o=s.billboard,l=s.background,c=s.stationary,u=function(e){if(!e._geometry._state.uvBuf)return!1;const t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),h=Dn(e),p=n.getNumAllocatedSectionPlanes()>0,d=bn(e),A=!!i.compressGeometry,f=[];f.push("#version 300 es"),f.push("// Drawing vertex shader"),f.push("in vec3 position;"),A&&f.push("uniform mat4 positionsDecodeMatrix;");f.push("uniform mat4 modelMatrix;"),f.push("uniform mat4 viewMatrix;"),f.push("uniform mat4 projMatrix;"),f.push("out vec3 vViewPosition;"),f.push("uniform vec3 offset;"),p&&f.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(f.push("uniform float logDepthBufFC;"),f.push("out float vFragDepth;"),f.push("bool isPerspectiveMatrix(mat4 m) {"),f.push(" return (m[2][3] == - 1.0);"),f.push("}"),f.push("out float isPerspective;"));r.lightMaps.length>0&&f.push("out vec3 vWorldNormal;");if(h){f.push("in vec3 normal;"),f.push("uniform mat4 modelNormalMatrix;"),f.push("uniform mat4 viewNormalMatrix;"),f.push("out vec3 vViewNormal;");for(let e=0,t=r.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),f.push(" }"),f.push(" return normalize(v);"),f.push("}"))}u&&(f.push("in vec2 uv;"),f.push("out vec2 vUV;"),A&&f.push("uniform mat3 uvDecodeMatrix;"));i.colors&&(f.push("in vec4 color;"),f.push("out vec4 vColor;"));"points"===i.primitiveName&&f.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(f.push("void billboard(inout mat4 mat) {"),f.push(" mat[0][0] = 1.0;"),f.push(" mat[0][1] = 0.0;"),f.push(" mat[0][2] = 0.0;"),"spherical"===o&&(f.push(" mat[1][0] = 0.0;"),f.push(" mat[1][1] = 1.0;"),f.push(" mat[1][2] = 0.0;")),f.push(" mat[2][0] = 0.0;"),f.push(" mat[2][1] = 0.0;"),f.push(" mat[2][2] =1.0;"),f.push("}"));if(d){f.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(let e=0,t=r.lights.length;e0&&f.push("vWorldNormal = worldNormal;"),f.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),f.push("vec3 tmpVec3;"),f.push("float lightDist;");for(let e=0,t=r.lights.length;e0,l=Dn(e),c=n.uvBuf,u="PhongMaterial"===a.type,h="MetallicMaterial"===a.type,p="SpecularMaterial"===a.type,d=bn(e);t.gammaInput;const A=t.gammaOutput,f=[];f.push("#version 300 es"),f.push("// Drawing fragment shader"),f.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),f.push("precision highp float;"),f.push("precision highp int;"),f.push("#else"),f.push("precision mediump float;"),f.push("precision mediump int;"),f.push("#endif"),t.logarithmicDepthBufferEnabled&&(f.push("in float isPerspective;"),f.push("uniform float logDepthBufFC;"),f.push("in float vFragDepth;"));d&&(f.push("float unpackDepth (vec4 color) {"),f.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),f.push(" return dot(color, bitShift);"),f.push("}"));f.push("uniform float gammaFactor;"),f.push("vec4 linearToLinear( in vec4 value ) {"),f.push(" return value;"),f.push("}"),f.push("vec4 sRGBToLinear( in vec4 value ) {"),f.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),f.push("}"),f.push("vec4 gammaToLinear( in vec4 value) {"),f.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),f.push("}"),A&&(f.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),f.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),f.push("}"));if(o){f.push("in vec4 vWorldPosition;"),f.push("uniform bool clippable;");for(var I=0;I0&&(f.push("uniform samplerCube lightMap;"),f.push("uniform mat4 viewNormalMatrix;")),r.reflectionMaps.length>0&&f.push("uniform samplerCube reflectionMap;"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("uniform mat4 viewMatrix;"),f.push("#define PI 3.14159265359"),f.push("#define RECIPROCAL_PI 0.31830988618"),f.push("#define RECIPROCAL_PI2 0.15915494"),f.push("#define EPSILON 1e-6"),f.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),f.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),f.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),f.push("}"),f.push("struct IncidentLight {"),f.push(" vec3 color;"),f.push(" vec3 direction;"),f.push("};"),f.push("struct ReflectedLight {"),f.push(" vec3 diffuse;"),f.push(" vec3 specular;"),f.push("};"),f.push("struct Geometry {"),f.push(" vec3 position;"),f.push(" vec3 viewNormal;"),f.push(" vec3 worldNormal;"),f.push(" vec3 viewEyeDir;"),f.push("};"),f.push("struct Material {"),f.push(" vec3 diffuseColor;"),f.push(" float specularRoughness;"),f.push(" vec3 specularColor;"),f.push(" float shine;"),f.push("};"),u&&((r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = "+Tn[r.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),f.push(" radiance *= PI;"),f.push(" reflectedLight.specular += radiance;")),f.push("}")),f.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),f.push(" vec3 irradiance = dotNL * directLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),f.push("}")),(h||p)&&(f.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),f.push(" float r = ggxRoughness + 0.0001;"),f.push(" return (2.0 / (r * r) - 2.0);"),f.push("}"),f.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),f.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),f.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),f.push("}"),r.reflectionMaps.length>0&&(f.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),f.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),f.push(" vec3 envMapColor = "+Tn[r.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),f.push(" return envMapColor;"),f.push("}")),f.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),f.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),f.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),f.push("}"),f.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" return 1.0 / ( gl * gv );"),f.push("}"),f.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),f.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),f.push(" return 0.5 / max( gv + gl, EPSILON );"),f.push("}"),f.push("float D_GGX(const in float alpha, const in float dotNH) {"),f.push(" float a2 = ( alpha * alpha );"),f.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),f.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float alpha = ( roughness * roughness );"),f.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),f.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),f.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),f.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),f.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),f.push(" vec3 F = F_Schlick( specularColor, dotLH );"),f.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),f.push(" float D = D_GGX( alpha, dotNH );"),f.push(" return F * (G * D);"),f.push("}"),f.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),f.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),f.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),f.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),f.push(" vec4 r = roughness * c0 + c1;"),f.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),f.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),f.push(" return specularColor * AB.x + AB.y;"),f.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(f.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(f.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),f.push(" irradiance *= PI;"),f.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(f.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),f.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),f.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),f.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),f.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),f.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),f.push("}")),f.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),f.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),f.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),f.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),f.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),f.push("}")));f.push("in vec3 vViewPosition;"),n.colors&&f.push("in vec4 vColor;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._occlusionMap||s._alphaMap)&&f.push("in vec2 vUV;");l&&(r.lightMaps.length>0&&f.push("in vec3 vWorldNormal;"),f.push("in vec3 vViewNormal;"));a.ambient&&f.push("uniform vec3 materialAmbient;");a.baseColor&&f.push("uniform vec3 materialBaseColor;");void 0!==a.alpha&&null!==a.alpha&&f.push("uniform vec4 materialAlphaModeCutoff;");a.emissive&&f.push("uniform vec3 materialEmissive;");a.diffuse&&f.push("uniform vec3 materialDiffuse;");void 0!==a.glossiness&&null!==a.glossiness&&f.push("uniform float materialGlossiness;");void 0!==a.shininess&&null!==a.shininess&&f.push("uniform float materialShininess;");a.specular&&f.push("uniform vec3 materialSpecular;");void 0!==a.metallic&&null!==a.metallic&&f.push("uniform float materialMetallic;");void 0!==a.roughness&&null!==a.roughness&&f.push("uniform float materialRoughness;");void 0!==a.specularF0&&null!==a.specularF0&&f.push("uniform float materialSpecularF0;");c&&s._ambientMap&&(f.push("uniform sampler2D ambientMap;"),s._ambientMap._state.matrix&&f.push("uniform mat4 ambientMapMatrix;"));c&&s._baseColorMap&&(f.push("uniform sampler2D baseColorMap;"),s._baseColorMap._state.matrix&&f.push("uniform mat4 baseColorMapMatrix;"));c&&s._diffuseMap&&(f.push("uniform sampler2D diffuseMap;"),s._diffuseMap._state.matrix&&f.push("uniform mat4 diffuseMapMatrix;"));c&&s._emissiveMap&&(f.push("uniform sampler2D emissiveMap;"),s._emissiveMap._state.matrix&&f.push("uniform mat4 emissiveMapMatrix;"));l&&c&&s._metallicMap&&(f.push("uniform sampler2D metallicMap;"),s._metallicMap._state.matrix&&f.push("uniform mat4 metallicMapMatrix;"));l&&c&&s._roughnessMap&&(f.push("uniform sampler2D roughnessMap;"),s._roughnessMap._state.matrix&&f.push("uniform mat4 roughnessMapMatrix;"));l&&c&&s._metallicRoughnessMap&&(f.push("uniform sampler2D metallicRoughnessMap;"),s._metallicRoughnessMap._state.matrix&&f.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&s._normalMap&&(f.push("uniform sampler2D normalMap;"),s._normalMap._state.matrix&&f.push("uniform mat4 normalMapMatrix;"),f.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),f.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),f.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),f.push(" vec2 st0 = dFdx( uv.st );"),f.push(" vec2 st1 = dFdy( uv.st );"),f.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),f.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),f.push(" vec3 N = normalize( surf_norm );"),f.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),f.push(" mat3 tsn = mat3( S, T, N );"),f.push(" return normalize( tsn * mapN );"),f.push("}"));c&&s._occlusionMap&&(f.push("uniform sampler2D occlusionMap;"),s._occlusionMap._state.matrix&&f.push("uniform mat4 occlusionMapMatrix;"));c&&s._alphaMap&&(f.push("uniform sampler2D alphaMap;"),s._alphaMap._state.matrix&&f.push("uniform mat4 alphaMapMatrix;"));l&&c&&s._specularMap&&(f.push("uniform sampler2D specularMap;"),s._specularMap._state.matrix&&f.push("uniform mat4 specularMapMatrix;"));l&&c&&s._glossinessMap&&(f.push("uniform sampler2D glossinessMap;"),s._glossinessMap._state.matrix&&f.push("uniform mat4 glossinessMapMatrix;"));l&&c&&s._specularGlossinessMap&&(f.push("uniform sampler2D materialSpecularGlossinessMap;"),s._specularGlossinessMap._state.matrix&&f.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(s._diffuseFresnel||s._specularFresnel||s._alphaFresnel||s._emissiveFresnel||s._reflectivityFresnel)&&(f.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),f.push(" float fr = abs(dot(eyeDir, normal));"),f.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),f.push(" return pow(finalFr, power);"),f.push("}"),s._diffuseFresnel&&(f.push("uniform float diffuseFresnelCenterBias;"),f.push("uniform float diffuseFresnelEdgeBias;"),f.push("uniform float diffuseFresnelPower;"),f.push("uniform vec3 diffuseFresnelCenterColor;"),f.push("uniform vec3 diffuseFresnelEdgeColor;")),s._specularFresnel&&(f.push("uniform float specularFresnelCenterBias;"),f.push("uniform float specularFresnelEdgeBias;"),f.push("uniform float specularFresnelPower;"),f.push("uniform vec3 specularFresnelCenterColor;"),f.push("uniform vec3 specularFresnelEdgeColor;")),s._alphaFresnel&&(f.push("uniform float alphaFresnelCenterBias;"),f.push("uniform float alphaFresnelEdgeBias;"),f.push("uniform float alphaFresnelPower;"),f.push("uniform vec3 alphaFresnelCenterColor;"),f.push("uniform vec3 alphaFresnelEdgeColor;")),s._reflectivityFresnel&&(f.push("uniform float materialSpecularF0FresnelCenterBias;"),f.push("uniform float materialSpecularF0FresnelEdgeBias;"),f.push("uniform float materialSpecularF0FresnelPower;"),f.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),f.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),s._emissiveFresnel&&(f.push("uniform float emissiveFresnelCenterBias;"),f.push("uniform float emissiveFresnelEdgeBias;"),f.push("uniform float emissiveFresnelPower;"),f.push("uniform vec3 emissiveFresnelCenterColor;"),f.push("uniform vec3 emissiveFresnelEdgeColor;")));if(f.push("uniform vec4 lightAmbient;"),l)for(let e=0,t=r.lights.length;e 0.0) { discard; }"),f.push("}")}"points"===n.primitiveName&&(f.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),f.push("float r = dot(cxy, cxy);"),f.push("if (r > 1.0) {"),f.push(" discard;"),f.push("}"));f.push("float occlusion = 1.0;"),a.ambient?f.push("vec3 ambientColor = materialAmbient;"):f.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");a.diffuse?f.push("vec3 diffuseColor = materialDiffuse;"):a.baseColor?f.push("vec3 diffuseColor = materialBaseColor;"):f.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");n.colors&&f.push("diffuseColor *= vColor.rgb;");a.emissive?f.push("vec3 emissiveColor = materialEmissive;"):f.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");a.specular?f.push("vec3 specular = materialSpecular;"):f.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==a.alpha?f.push("float alpha = materialAlphaModeCutoff[0];"):f.push("float alpha = 1.0;");n.colors&&f.push("alpha *= vColor.a;");void 0!==a.glossiness?f.push("float glossiness = materialGlossiness;"):f.push("float glossiness = 1.0;");void 0!==a.metallic?f.push("float metallic = materialMetallic;"):f.push("float metallic = 1.0;");void 0!==a.roughness?f.push("float roughness = materialRoughness;"):f.push("float roughness = 1.0;");void 0!==a.specularF0?f.push("float specularF0 = materialSpecularF0;"):f.push("float specularF0 = 1.0;");c&&(l&&s._normalMap||s._ambientMap||s._baseColorMap||s._diffuseMap||s._occlusionMap||s._emissiveMap||s._metallicMap||s._roughnessMap||s._metallicRoughnessMap||s._specularMap||s._glossinessMap||s._specularGlossinessMap||s._alphaMap)&&(f.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),f.push("vec2 textureCoord;"));c&&s._ambientMap&&(s._ambientMap._state.matrix?f.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),f.push("ambientTexel = "+Tn[s._ambientMap._state.encoding]+"(ambientTexel);"),f.push("ambientColor *= ambientTexel.rgb;"));c&&s._diffuseMap&&(s._diffuseMap._state.matrix?f.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),f.push("diffuseTexel = "+Tn[s._diffuseMap._state.encoding]+"(diffuseTexel);"),f.push("diffuseColor *= diffuseTexel.rgb;"),f.push("alpha *= diffuseTexel.a;"));c&&s._baseColorMap&&(s._baseColorMap._state.matrix?f.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),f.push("baseColorTexel = "+Tn[s._baseColorMap._state.encoding]+"(baseColorTexel);"),f.push("diffuseColor *= baseColorTexel.rgb;"),f.push("alpha *= baseColorTexel.a;"));c&&s._emissiveMap&&(s._emissiveMap._state.matrix?f.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),f.push("emissiveTexel = "+Tn[s._emissiveMap._state.encoding]+"(emissiveTexel);"),f.push("emissiveColor = emissiveTexel.rgb;"));c&&s._alphaMap&&(s._alphaMap._state.matrix?f.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("alpha *= texture(alphaMap, textureCoord).r;"));c&&s._occlusionMap&&(s._occlusionMap._state.matrix?f.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(r.lights.length>0||r.lightMaps.length>0||r.reflectionMaps.length>0)){c&&s._normalMap?(s._normalMap._state.matrix?f.push("textureCoord = (normalMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):f.push("vec3 viewNormal = normalize(vViewNormal);"),c&&s._specularMap&&(s._specularMap._state.matrix?f.push("textureCoord = (specularMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("specular *= texture(specularMap, textureCoord).rgb;")),c&&s._glossinessMap&&(s._glossinessMap._state.matrix?f.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("glossiness *= texture(glossinessMap, textureCoord).r;")),c&&s._specularGlossinessMap&&(s._specularGlossinessMap._state.matrix?f.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),f.push("specular *= specGlossRGB.rgb;"),f.push("glossiness *= specGlossRGB.a;")),c&&s._metallicMap&&(s._metallicMap._state.matrix?f.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("metallic *= texture(metallicMap, textureCoord).r;")),c&&s._roughnessMap&&(s._roughnessMap._state.matrix?f.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("roughness *= texture(roughnessMap, textureCoord).r;")),c&&s._metallicRoughnessMap&&(s._metallicRoughnessMap._state.matrix?f.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):f.push("textureCoord = texturePos.xy;"),f.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),f.push("metallic *= metalRoughRGB.b;"),f.push("roughness *= metalRoughRGB.g;")),f.push("vec3 viewEyeDir = normalize(-vViewPosition);"),s._diffuseFresnel&&(f.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),f.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),s._specularFresnel&&(f.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),f.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),s._alphaFresnel&&(f.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),f.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),s._emissiveFresnel&&(f.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),f.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),f.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),f.push(" discard;"),f.push("}"),f.push("IncidentLight light;"),f.push("Material material;"),f.push("Geometry geometry;"),f.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),f.push("vec3 viewLightDir;"),u&&(f.push("material.diffuseColor = diffuseColor;"),f.push("material.specularColor = specular;"),f.push("material.shine = materialShininess;")),p&&(f.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),f.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),f.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),f.push("material.specularColor = specular;")),h&&(f.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),f.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),f.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),f.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),f.push("geometry.position = vViewPosition;"),r.lightMaps.length>0&&f.push("geometry.worldNormal = normalize(vWorldNormal);"),f.push("geometry.viewNormal = viewNormal;"),f.push("geometry.viewEyeDir = viewEyeDir;"),u&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePhongLightMapping(geometry, material, reflectedLight);"),(p||h)&&(r.lightMaps.length>0||r.reflectionMaps.length>0)&&f.push("computePBRLightMapping(geometry, material, reflectedLight);"),f.push("float shadow = 1.0;"),f.push("float shadowAcneRemover = 0.007;"),f.push("vec3 fragmentDepth;"),f.push("float texelSize = 1.0 / 1024.0;"),f.push("float amountInLight = 0.0;"),f.push("vec3 shadowCoord;"),f.push("vec4 rgbaDepth;"),f.push("float depth;");for(let e=0,t=r.lights.length;e0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0&&(this._uLightMap="lightMap"),i.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(u=0,h=r.sectionPlanes.length;u0&&i.lightMaps[0].texture&&this._uLightMap&&(o.bindTexture(this._uLightMap,i.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),i.reflectionMaps.length>0&&i.reflectionMaps[0].texture&&this._uReflectionMap&&(o.bindTexture(this._uReflectionMap,i.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%t,e.bindTexture++),this._uGammaFactor&&n.uniform1f(this._uGammaFactor,s.gammaFactor),this._baseTextureUnit=e.textureUnit};class Bn{constructor(e){this.vertex=function(e){const t=e.scene,s=t._lightsState,n=function(e){const t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),i=t._sectionPlanesState.getNumAllocatedSectionPlanes()>0,r=!!e._geometry._state.compressGeometry,a=e._state.billboard,o=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),r&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));i&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),n){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===a||"cylindrical"===a)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===a&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),r&&l.push("localPosition = positionsDecodeMatrix * localPosition;");n&&(r?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),o&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===a||"cylindrical"===a?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),n&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),n)for(let e=0,t=s.lights.length;e0,r=[];r.push("#version 300 es"),r.push("// Lambertian drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}"points"===e._geometry._state.primitiveName&&(r.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),r.push("float r = dot(cxy, cxy);"),r.push("if (r > 1.0) {"),r.push(" discard;"),r.push("}"));t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const On=new e({}),Sn=d.vec3(),Nn=function(e,t){this.id=On.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Bn(t),this._allocate(t)},xn={};Nn.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=xn[t];return s||(s=new Nn(t,e),xn[t]=s,m.memory.programs++),s._useCount++,s},Nn.prototype.put=function(){0==--this._useCount&&(On.removeItem(this.id),this._program&&this._program.destroy(),delete xn[this._hash],m.memory.programs--)},Nn.prototype.webglContextRestored=function(){this._program=null},Nn.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl,a=0===s?t._xrayMaterial._state:1===s?t._highlightMaterial._state:t._selectedMaterial._state,o=t._state,l=t._geometry._state,c=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,c?e.getRTCViewMatrix(o.originHash,c):i.viewMatrix),r.uniformMatrix4fv(this._uViewNormalMatrix,!1,i.viewNormalMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Edges drawing vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec4 edgeColor;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));s&&a.push("out vec4 vWorldPosition;");a.push("out vec4 vColor;"),("spherical"===i||"cylindrical"===i)&&(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));a.push("vColor = edgeColor;"),s&&a.push("vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=e.scene._sectionPlanesState,n=e.scene.gammaOutput,i=s.getNumAllocatedSectionPlanes()>0,r=[];r.push("#version 300 es"),r.push("// Edges drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),t.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;"));n&&(r.push("uniform float gammaFactor;"),r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}"));if(i){r.push("in vec4 vWorldPosition;"),r.push("uniform bool clippable;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),r.push("}")}t.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");n?r.push("outColor = linearToGamma(vColor, gammaFactor);"):r.push("outColor = vColor;");return r.push("}"),r}(e)}}const Mn=new e({}),Fn=d.vec3(),Hn=function(e,t){this.id=Mn.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Ln(t),this._allocate(t)},Un={};Hn.get=function(e){const t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Un[t];return s||(s=new Hn(t,e),Un[t]=s,m.memory.programs++),s._useCount++,s},Hn.prototype.put=function(){0==--this._useCount&&(Mn.removeItem(this.id),this._program&&this._program.destroy(),delete Un[this._hash],m.memory.programs--)},Hn.prototype.webglContextRestored=function(){this._program=null},Hn.prototype.drawMesh=function(e,t,s){this._program||this._allocate(t);const n=this._scene,i=n.camera,r=n.canvas.gl;let a;const o=t._state,l=t._geometry,c=l._state,u=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,u?e.getRTCViewMatrix(o.originHash,u):i.viewMatrix),o.clippable){const e=n._sectionPlanesState.getNumAllocatedSectionPlanes(),s=n._sectionPlanesState.sectionPlanes.length;if(e>0){const i=n._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh picking vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("out vec4 vViewPosition;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("uniform vec2 pickClipPos;"),a.push("vec4 remapClipPos(vec4 clipPos) {"),a.push(" clipPos.xy /= clipPos.w;"),a.push(" clipPos.xy -= pickClipPos;"),a.push(" clipPos.xy *= clipPos.w;"),a.push(" return clipPos;"),a.push("}"),a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==i&&"cylindrical"!==i||(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"));a.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),a.push(" worldPosition.xyz = worldPosition.xyz + offset;"),a.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = remapClipPos(clipPos);"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(i.push("uniform vec4 pickColor;"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = pickColor; "),i.push("}"),i}(e)}}const jn=d.vec3(),Vn=function(e,t){this._hash=e,this._shaderSource=new Gn(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},kn={};Vn.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let s=kn[t];if(!s){if(s=new Vn(t,e),s.errors)return console.log(s.errors.join("\n")),null;kn[t]=s,m.memory.programs++}return s._useCount++,s},Vn.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete kn[this._hash],m.memory.programs--)},Vn.prototype.webglContextRestored=function(){this._program=null},Vn.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCPickViewMatrix(i.originHash,o):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t>24&255,u=l>>16&255,h=l>>8&255,p=255&l;n.uniform4f(this._uPickColor,p/255,h/255,u/255,c/255),n.uniform2fv(this._uPickClipPos,e.pickClipPos),a.indicesBuf?(n.drawElements(a.primitive,a.indicesBuf.numItems,a.indicesBuf.itemType,0),e.drawElements++):a.positions&&n.drawArrays(n.TRIANGLES,0,a.positions.numItems)},Vn.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Ue(s,this._shaderSource),this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0,n=!!e._geometry._state.compressGeometry,i=[];i.push("#version 300 es"),i.push("// Surface picking vertex shader"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform vec3 offset;"),s&&(i.push("uniform bool clippable;"),i.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out float isPerspective;"));i.push("uniform vec2 pickClipPos;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy -= pickClipPos;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("out vec4 vColor;"),n&&i.push("uniform mat4 positionsDecodeMatrix;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),n&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push(" vec4 worldPosition = modelMatrix * localPosition; "),i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition;"),s&&i.push(" vWorldPosition = worldPosition;");i.push(" vColor = color;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Surface picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(let e=0;e 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = vColor;"),i.push("}"),i}(e)}}const Wn=d.vec3(),zn=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Qn(t),this._allocate(t)},Kn={};zn.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";");let s=Kn[t];if(!s){if(s=new zn(t,e),s.errors)return console.log(s.errors.join("\n")),null;Kn[t]=s,m.memory.programs++}return s._useCount++,s},zn.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Kn[this._hash],m.memory.programs--)},zn.prototype.webglContextRestored=function(){this._program=null},zn.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._state,r=t._material._state,a=t._geometry,o=t._geometry._state,l=t.origin,c=r.backfaces,u=r.frontface,h=s.camera.project,p=a._getPickTrianglePositions(),d=a._getPickTriangleColors();if(this._program.bind(),e.useProgram++,s.logarithmicDepthBufferEnabled){const e=2/(Math.log(h.far+1)/Math.LN2);n.uniform1f(this._uLogDepthBufFC,e)}if(n.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(i.originHash,l):e.pickViewMatrix),i.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,n=!!e._geometry._state.compressGeometry,i=e._state.billboard,r=e._state.stationary,a=[];a.push("#version 300 es"),a.push("// Mesh occlusion vertex shader"),a.push("in vec3 position;"),a.push("uniform mat4 modelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform vec3 offset;"),n&&a.push("uniform mat4 positionsDecodeMatrix;");s&&a.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(a.push("void billboard(inout mat4 mat) {"),a.push(" mat[0][0] = 1.0;"),a.push(" mat[0][1] = 0.0;"),a.push(" mat[0][2] = 0.0;"),"spherical"===i&&(a.push(" mat[1][0] = 0.0;"),a.push(" mat[1][1] = 1.0;"),a.push(" mat[1][2] = 0.0;")),a.push(" mat[2][0] = 0.0;"),a.push(" mat[2][1] = 0.0;"),a.push(" mat[2][2] =1.0;"),a.push("}"));a.push("void main(void) {"),a.push("vec4 localPosition = vec4(position, 1.0); "),a.push("vec4 worldPosition;"),n&&a.push("localPosition = positionsDecodeMatrix * localPosition;");a.push("mat4 viewMatrix2 = viewMatrix;"),a.push("mat4 modelMatrix2 = modelMatrix;"),r&&a.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(a.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),a.push("billboard(modelMatrix2);"),a.push("billboard(viewMatrix2);"),a.push("billboard(modelViewMatrix);"),a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(a.push("worldPosition = modelMatrix2 * localPosition;"),a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s&&a.push(" vWorldPosition = worldPosition;");a.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return a.push("gl_Position = clipPos;"),a.push("}"),a}(e),this.fragment=function(e){const t=e.scene,s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push("}"),i}(e)}}const Xn=d.vec3(),qn=function(e,t){this._hash=e,this._shaderSource=new Yn(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Jn={};qn.get=function(e){const t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";");let s=Jn[t];if(!s){if(s=new qn(t,e),s.errors)return console.log(s.errors.join("\n")),null;Jn[t]=s,m.memory.programs++}return s._useCount++,s},qn.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Jn[this._hash],m.memory.programs--)},qn.prototype.webglContextRestored=function(){this._program=null},qn.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene,n=s.canvas.gl,i=t._material._state,r=t._state,a=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){const t=i.backfaces;e.backfaces!==t&&(t?n.disable(n.CULL_FACE):n.enable(n.CULL_FACE),e.backfaces=t);const s=i.frontface;e.frontface!==s&&(s?n.frontFace(n.CCW):n.frontFace(n.CW),e.frontface=s),this._lastMaterialId=i.id}const l=s.camera;if(n.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCViewMatrix(r.originHash,o):l.viewMatrix),r.clippable){const e=s._sectionPlanesState.getNumAllocatedSectionPlanes(),i=s._sectionPlanesState.sectionPlanes.length;if(e>0){const r=s._sectionPlanesState.sectionPlanes,a=t.renderFlags;for(let t=0;t0,s=!!e._geometry._state.compressGeometry,n=[];n.push("// Mesh shadow vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),n.push("uniform vec3 offset;"),s&&n.push("uniform mat4 positionsDecodeMatrix;");t&&n.push("out vec4 vWorldPosition;");n.push("void main(void) {"),n.push("vec4 localPosition = vec4(position, 1.0); "),n.push("vec4 worldPosition;"),s&&n.push("localPosition = positionsDecodeMatrix * localPosition;");n.push("worldPosition = modelMatrix * localPosition;"),n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&n.push("vWorldPosition = worldPosition;");return n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n}(e),this.fragment=function(e){const t=e.scene;t.canvas.gl;const s=t._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("// Mesh shadow fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),n){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var r=0;r 0.0) { discard; }"),i.push("}")}return i.push("outColor = encodeFloat(gl_FragCoord.z);"),i.push("}"),i}(e)}}const $n=function(e,t){this._hash=e,this._shaderSource=new Zn(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},ei={};$n.get=function(e){const t=e.scene,s=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";");let n=ei[s];if(!n){if(n=new $n(s,e),n.errors)return console.log(n.errors.join("\n")),null;ei[s]=n,m.memory.programs++}return n._useCount++,n},$n.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete ei[this._hash],m.memory.programs--)},$n.prototype.webglContextRestored=function(){this._program=null},$n.prototype.drawMesh=function(e,t){this._program||this._allocate(t);const s=this._scene.canvas.gl,n=t._material._state,i=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),n.id!==this._lastMaterialId){const t=n.backfaces;e.backfaces!==t&&(t?s.disable(s.CULL_FACE):s.enable(s.CULL_FACE),e.backfaces=t);const i=n.frontface;e.frontface!==i&&(i?s.frontFace(s.CCW):s.frontFace(s.CW),e.frontface=i),e.lineWidth!==n.lineWidth&&(s.lineWidth(n.lineWidth),e.lineWidth=n.lineWidth),this._uPointSize&&s.uniform1i(this._uPointSize,n.pointSize),this._lastMaterialId=n.id}if(s.uniformMatrix4fv(this._uModelMatrix,s.FALSE,t.worldMatrix),i.combineGeometry){const n=t.vertexBufs;n.id!==this._lastVertexBufsId&&(n.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(n.positionsBuf,n.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),this._lastVertexBufsId=n.id)}this._uClippable&&s.uniform1i(this._uClippable,t._state.clippable),s.uniform3fv(this._uOffset,t._state.offset),i.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&s.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,i.positionsDecodeMatrix),i.combineGeometry?i.indicesBufCombined&&(i.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?s.UNSIGNED_SHORT:s.FLOAT),e.bindArray++),i.indicesBuf&&(i.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=i.id),i.combineGeometry?i.indicesBufCombined&&(s.drawElements(i.primitive,i.indicesBufCombined.numItems,i.indicesBufCombined.itemType,0),e.drawElements++):i.indicesBuf?(s.drawElements(i.primitive,i.indicesBuf.numItems,i.indicesBuf.itemType,0),e.drawElements++):i.positions&&(s.drawArrays(s.TRIANGLES,0,i.positions.numItems),e.drawArrays++)},$n.prototype._allocate=function(e){const t=e.scene,s=t.canvas.gl;if(this._program=new Ue(s,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)return void(this.errors=this._program.errors);const n=this._program;this._uPositionsDecodeMatrix=n.getLocation("positionsDecodeMatrix"),this._uModelMatrix=n.getLocation("modelMatrix"),this._uShadowViewMatrix=n.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=n.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(let e=0,s=t._sectionPlanesState.sectionPlanes.length;e0){let e,t,i,r,a;for(let o=0,l=this._uSectionPlanes.length;o0)for(let s=0;s0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this.glRedraw()}}const di=function(){const e=d.vec3(),t=d.vec3(),s=d.vec3(),n=d.vec3(),i=d.vec3(),r=d.vec3(),a=d.vec4(),o=d.vec3(),l=d.vec3(),c=d.vec3(),u=d.vec3(),h=d.vec3(),p=d.vec3(),A=d.vec3(),f=d.vec3(),I=d.vec3(),m=d.vec4(),y=d.vec4(),v=d.vec4(),w=d.vec3(),g=d.vec3(),E=d.vec3(),T=d.vec3(),b=d.vec3(),D=d.vec3(),P=d.vec3(),C=d.vec3(),_=d.vec3(),R=d.vec3(),B=d.vec3();return function(O,S,N,x){var L=x.primIndex;if(null!=L&&L>-1){const U=O.geometry._state,G=O.scene,j=G.camera,V=G.canvas;if("triangles"===U.primitiveName){x.primitive="triangle";const G=L,k=U.indices,Q=U.positions;let W,K,Y;if(k){var M=k[G+0],F=k[G+1],H=k[G+2];r[0]=M,r[1]=F,r[2]=H,x.indices=r,W=3*M,K=3*F,Y=3*H}else W=3*G,K=W+3,Y=K+3;if(s[0]=Q[W+0],s[1]=Q[W+1],s[2]=Q[W+2],n[0]=Q[K+0],n[1]=Q[K+1],n[2]=Q[K+2],i[0]=Q[Y+0],i[1]=Q[Y+1],i[2]=Q[Y+2],U.compressGeometry){const e=U.positionsDecodeMatrix;e&&(Ut.decompressPosition(s,e,s),Ut.decompressPosition(n,e,n),Ut.decompressPosition(i,e,i))}x.canvasPos?d.canvasPosToLocalRay(V.canvas,O.origin?z(S,O.origin):S,N,O.worldMatrix,x.canvasPos,e,t):x.origin&&x.direction&&d.worldRayToLocalRay(O.worldMatrix,x.origin,x.direction,e,t),d.normalizeVec3(t),d.rayPlaneIntersect(e,t,s,n,i,a),x.localPos=a,x.position=a,m[0]=a[0],m[1]=a[1],m[2]=a[2],m[3]=1,d.transformVec4(O.worldMatrix,m,y),o[0]=y[0],o[1]=y[1],o[2]=y[2],x.canvasPos&&O.origin&&(o[0]+=O.origin[0],o[1]+=O.origin[1],o[2]+=O.origin[2]),x.worldPos=o,d.transformVec4(j.matrix,y,v),l[0]=v[0],l[1]=v[1],l[2]=v[2],x.viewPos=l,d.cartesianToBarycentric(a,s,n,i,c),x.bary=c;const X=U.normals;if(X){if(U.compressGeometry){const e=3*M,t=3*F,s=3*H;Ut.decompressNormal(X.subarray(e,e+2),u),Ut.decompressNormal(X.subarray(t,t+2),h),Ut.decompressNormal(X.subarray(s,s+2),p)}else u[0]=X[W],u[1]=X[W+1],u[2]=X[W+2],h[0]=X[K],h[1]=X[K+1],h[2]=X[K+2],p[0]=X[Y],p[1]=X[Y+1],p[2]=X[Y+2];const e=d.addVec3(d.addVec3(d.mulVec3Scalar(u,c[0],w),d.mulVec3Scalar(h,c[1],g),E),d.mulVec3Scalar(p,c[2],T),b);x.worldNormal=d.normalizeVec3(d.transformVec3(O.worldNormalMatrix,e,D))}const q=U.uv;if(q){if(A[0]=q[2*M],A[1]=q[2*M+1],f[0]=q[2*F],f[1]=q[2*F+1],I[0]=q[2*H],I[1]=q[2*H+1],U.compressGeometry){const e=U.uvDecodeMatrix;e&&(Ut.decompressUV(A,e,A),Ut.decompressUV(f,e,f),Ut.decompressUV(I,e,I))}x.uv=d.addVec3(d.addVec3(d.mulVec2Scalar(A,c[0],P),d.mulVec2Scalar(f,c[1],C),_),d.mulVec2Scalar(I,c[2],R),B)}}}}}();function Ai(e={}){let t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);let s=e.radiusBottom||1;s<0&&(console.error("negative radiusBottom not allowed - will invert"),s*=-1);let n=e.height||1;n<0&&(console.error("negative height not allowed - will invert"),n*=-1);let i=e.radialSegments||32;i<0&&(console.error("negative radialSegments not allowed - will invert"),i*=-1),i<3&&(i=3);let r=e.heightSegments||1;r<0&&(console.error("negative heightSegments not allowed - will invert"),r*=-1),r<1&&(r=1);const a=!!e.openEnded;let o=e.center;const l=o?o[0]:0,c=o?o[1]:0,u=o?o[2]:0,h=n/2,p=n/r,d=2*Math.PI/i,A=1/i,f=(t-s)/r,I=[],m=[],y=[],v=[];let w,E,T,b,D,P,C,_,R,B,O;const S=(90-180*Math.atan(n/(s-t))/Math.PI)/90;for(w=0;w<=r;w++)for(D=t-w*f,P=h-w*p,E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),m.push(D*T),m.push(S),m.push(D*b),y.push(E*A),y.push(1*w/r),I.push(D*T+l),I.push(P+c),I.push(D*b+u);for(w=0;w0){for(R=I.length/3,m.push(0),m.push(1),m.push(0),y.push(.5),y.push(.5),I.push(0+l),I.push(h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(t*T),m.push(1),m.push(t*b),y.push(B),y.push(O),I.push(t*T+l),I.push(h+c),I.push(t*b+u);for(E=0;E0){for(R=I.length/3,m.push(0),m.push(-1),m.push(0),y.push(.5),y.push(.5),I.push(0+l),I.push(0-h+c),I.push(0+u),E=0;E<=i;E++)T=Math.sin(E*d),b=Math.cos(E*d),B=.5*Math.sin(E*d)+.5,O=.5*Math.cos(E*d)+.5,m.push(s*T),m.push(-1),m.push(s*b),y.push(B),y.push(O),I.push(s*T+l),I.push(0-h+c),I.push(s*b+u);for(E=0;E":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function mi(e={}){var t=e.origin||[0,0,0],s=t[0],n=t[1],i=t[2],r=e.size||1,a=[],o=[],l=e.text;g.isNumeric(l)&&(l=""+l);for(var c,u,h,p,d,A,f,I,m,y=(l||"").split("\n"),v=0,w=0,E=.04,T=0;T0!==e))&&this.scene._objectOffsetUpdated(this,!1)),this._isModel&&this.scene._deregisterModel(this),this._children.length){const e=this._children.splice();let t;for(let s=0,n=e.length;s1;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,this.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,this.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,s.NONE);const r=Fi(s,this.wrapS);r&&s.texParameteri(this.target,s.TEXTURE_WRAP_S,r);const a=Fi(s,this.wrapT);if(a&&s.texParameteri(this.target,s.TEXTURE_WRAP_T,a),this.type===s.TEXTURE_3D||this.type===s.TEXTURE_2D_ARRAY){const e=Fi(s,this.wrapR);e&&s.texParameteri(this.target,s.TEXTURE_WRAP_R,e),s.texParameteri(this.type,s.TEXTURE_WRAP_R,e)}i?(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,ji(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,ji(s,this.magFilter))):(s.texParameteri(this.target,s.TEXTURE_MIN_FILTER,Fi(s,this.minFilter)),s.texParameteri(this.target,s.TEXTURE_MAG_FILTER,Fi(s,this.magFilter)));const o=Fi(s,this.format,this.encoding),l=Fi(s,this.type),c=Gi(s,this.internalFormat,o,l,this.encoding,!1);s.texStorage2D(s.TEXTURE_2D,n,c,e[0].width,e[0].height);for(let t=0,n=e.length;t>t;return e+1}class Wi extends x{get type(){return"Texture"}constructor(e,t={}){super(e,t),this._state=new at({texture:new Ui({gl:this.scene.canvas.gl}),matrix:d.identityMat4(),hasMatrix:t.translate&&(0!==t.translate[0]||0!==t.translate[1])||!!t.rotate||t.scale&&(0!==t.scale[0]||0!==t.scale[1]),minFilter:this._checkMinFilter(t.minFilter),magFilter:this._checkMagFilter(t.magFilter),wrapS:this._checkWrapS(t.wrapS),wrapT:this._checkWrapT(t.wrapT),flipY:this._checkFlipY(t.flipY),encoding:this._checkEncoding(t.encoding)}),this._src=null,this._image=null,this._translate=d.vec2([0,0]),this._scale=d.vec2([1,1]),this._rotate=d.vec2([0,0]),this._matrixDirty=!1,this.translate=t.translate,this.scale=t.scale,this.rotate=t.rotate,t.src?this.src=t.src:t.image&&(this.image=t.image),m.memory.textures++}_checkMinFilter(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}_checkMagFilter(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}_checkWrapS(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkWrapT(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this._state.texture=new Ui({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}_update(){const e=this._state;if(this._matrixDirty){let t,s;0===this._translate[0]&&0===this._translate[1]||(t=d.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(s=d.scalingMat4v([this._scale[0],this._scale[1],1]),t=t?d.mulMat4(t,s):s),0!==this._rotate&&(s=d.rotationMat4v(.0174532925*this._rotate,[0,0,1]),t=t?d.mulMat4(t,s):s),t&&(e.matrix=t),this._matrixDirty=!1}this.glRedraw()}set image(e){this._image=Vi(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}get image(){return this._image}set src(e){this.scene.loading++,this.scene.canvas.spinner.processes++;const t=this;let s=new Image;s.onload=function(){s=Vi(s),t._state.texture.setImage(s,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},s.src=e,this._src=e,this._image=null}get src(){return this._src}set translate(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}get translate(){return this._translate}set scale(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}get scale(){return this._scale}set rotate(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}get rotate(){return this._rotate}get minFilter(){return this._state.minFilter}get magFilter(){return this._state.magFilter}get wrapS(){return this._state.wrapS}get wrapT(){return this._state.wrapT}get flipY(){return this._state.flipY}get encoding(){return this._state.encoding}destroy(){super.destroy(),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),m.memory.textures--}}class zi extends x{get type(){return"Fresnel"}constructor(e,t={}){super(e,t),this._state=new at({edgeColor:d.vec3([0,0,0]),centerColor:d.vec3([1,1,1]),edgeBias:0,centerBias:1,power:1}),this.edgeColor=t.edgeColor,this.centerColor=t.centerColor,this.edgeBias=t.edgeBias,this.centerBias=t.centerBias,this.power=t.power}set edgeColor(e){this._state.edgeColor.set(e||[0,0,0]),this.glRedraw()}get edgeColor(){return this._state.edgeColor}set centerColor(e){this._state.centerColor.set(e||[1,1,1]),this.glRedraw()}get centerColor(){return this._state.centerColor}set edgeBias(e){this._state.edgeBias=e||0,this.glRedraw()}get edgeBias(){return this._state.edgeBias}set centerBias(e){this._state.centerBias=null!=e?e:1,this.glRedraw()}get centerBias(){return this._state.centerBias}set power(e){this._state.power=null!=e?e:1,this.glRedraw()}get power(){return this._state.power}destroy(){super.destroy(),this._state.destroy()}}const Ki=m.memory,Yi=d.AABB3();class Xi extends Ot{get type(){return"VBOGeometry"}get isVBOGeometry(){return!0}constructor(e,t={}){super(e,t),this._state=new at({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),this._numTriangles=0,this._edgeThreshold=t.edgeThreshold||10,this._aabb=null,this._obb=d.OBB3();const s=this._state,n=this.scene.canvas.gl;switch(t.primitive=t.primitive||"triangles",t.primitive){case"points":s.primitive=n.POINTS,s.primitiveName=t.primitive;break;case"lines":s.primitive=n.LINES,s.primitiveName=t.primitive;break;case"line-loop":s.primitive=n.LINE_LOOP,s.primitiveName=t.primitive;break;case"line-strip":s.primitive=n.LINE_STRIP,s.primitiveName=t.primitive;break;case"triangles":s.primitive=n.TRIANGLES,s.primitiveName=t.primitive;break;case"triangle-strip":s.primitive=n.TRIANGLE_STRIP,s.primitiveName=t.primitive;break;case"triangle-fan":s.primitive=n.TRIANGLE_FAN,s.primitiveName=t.primitive;break;default:this.error("Unsupported value for 'primitive': '"+t.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=n.TRIANGLES,s.primitiveName=t.primitive}if(t.positions)if(t.indices){var i;if(t.positionsDecodeMatrix);else{const e=Ut.getPositionsBounds(t.positions),r=Ut.compressPositions(t.positions,e.min,e.max);i=r.quantized,s.positionsDecodeMatrix=r.decodeMatrix,s.positionsBuf=new Ge(n,n.ARRAY_BUFFER,i,i.length,3,n.STATIC_DRAW),Ki.positions+=s.positionsBuf.numItems,d.positions3ToAABB3(t.positions,this._aabb),d.positions3ToAABB3(i,Yi,s.positionsDecodeMatrix),d.AABB3ToOBB3(Yi,this._obb)}if(t.colors){const e=t.colors.constructor===Float32Array?t.colors:new Float32Array(t.colors);s.colorsBuf=new Ge(n,n.ARRAY_BUFFER,e,e.length,4,n.STATIC_DRAW),Ki.colors+=s.colorsBuf.numItems}if(t.uv){const e=Ut.getUVBounds(t.uv),i=Ut.compressUVs(t.uv,e.min,e.max),r=i.quantized;s.uvDecodeMatrix=i.decodeMatrix,s.uvBuf=new Ge(n,n.ARRAY_BUFFER,r,r.length,2,n.STATIC_DRAW),Ki.uvs+=s.uvBuf.numItems}if(t.normals){const e=Ut.compressNormals(t.normals);let i=s.compressGeometry;s.normalsBuf=new Ge(n,n.ARRAY_BUFFER,e,e.length,3,n.STATIC_DRAW,i),Ki.normals+=s.normalsBuf.numItems}{const e=t.indices.constructor===Uint32Array||t.indices.constructor===Uint16Array?t.indices:new Uint32Array(t.indices);s.indicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,e,e.length,1,n.STATIC_DRAW),Ki.indices+=s.indicesBuf.numItems;const r=St(i,e,s.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,r,r.length,1,n.STATIC_DRAW),"triangles"===this._state.primitiveName&&(this._numTriangles=t.indices.length/3)}this._buildHash(),Ki.meshes++}else this.error("Config expected: indices");else this.error("Config expected: positions")}_buildHash(){const e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}_getEdgeIndices(){return this._edgeIndicesBuf}get primitive(){return this._state.primitiveName}get aabb(){return this._aabb}get obb(){return this._obb}get numTriangles(){return this._numTriangles}_getState(){return this._state}destroy(){super.destroy();const e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),Ki.meshes--}}var qi={};function Ji(e,t={}){return new Promise((function(s,n){t.src||(console.error("load3DSGeometry: Parameter expected: src"),n());var i=e.canvas.spinner;i.processes++,g.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("load3DSGeometry: no data loaded"),i.processes--,n());var r=qi.parse.from3DS(e).edit.objects[0].mesh,a=r.vertices,o=r.uvt,l=r.indices;i.processes--,s(g.apply(t,{primitive:"triangles",positions:a,normals:null,uv:o,indices:l}))}),(function(e){console.error("load3DSGeometry: "+e),i.processes--,n()}))}))}function Zi(e,t={}){return new Promise((function(s,n){t.src||(console.error("loadOBJGeometry: Parameter expected: src"),n());var i=e.canvas.spinner;i.processes++,g.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("loadOBJGeometry: no data loaded"),i.processes--,n());for(var r=qi.parse.fromOBJ(e),a=qi.edit.unwrap(r.i_verts,r.c_verts,3),o=qi.edit.unwrap(r.i_norms,r.c_norms,3),l=qi.edit.unwrap(r.i_uvt,r.c_uvt,2),c=new Int32Array(r.i_verts.length),u=0;u0?o:null,autoNormals:0===o.length,uv:l,indices:c}))}),(function(e){console.error("loadOBJGeometry: "+e),i.processes--,n()}))}))}function $i(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.ySize||1;s<0&&(console.error("negative ySize not allowed - will invert"),s*=-1);let n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);const i=e.center,r=i?i[0]:0,a=i?i[1]:0,o=i?i[2]:0,l=-t+r,c=-s+a,u=-n+o,h=t+r,p=s+a,d=n+o;return g.apply(e,{primitive:"lines",positions:[l,c,u,l,c,d,l,p,u,l,p,d,h,c,u,h,c,d,h,p,u,h,p,d],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]})}function er(e={}){return $i({id:e.id,center:[(e.aabb[0]+e.aabb[3])/2,(e.aabb[1]+e.aabb[4])/2,(e.aabb[2]+e.aabb[5])/2],xSize:Math.abs(e.aabb[3]-e.aabb[0])/2,ySize:Math.abs(e.aabb[4]-e.aabb[1])/2,zSize:Math.abs(e.aabb[5]-e.aabb[2])/2})}function tr(e={}){let t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);let s=e.divisions||1;s<0&&(console.error("negative divisions not allowed - will invert"),s*=-1),s<1&&(s=1),t=t||10,s=s||10;const n=t/s,i=t/2,r=[],a=[];let o=0;for(let e=0,t=-i;e<=s;e++,t+=n)r.push(-i),r.push(0),r.push(t),r.push(i),r.push(0),r.push(t),r.push(t),r.push(0),r.push(-i),r.push(t),r.push(0),r.push(i),a.push(o++),a.push(o++),a.push(o++),a.push(o++);return g.apply(e,{primitive:"lines",positions:r,indices:a})}function sr(e={}){let t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);let s=e.zSize||1;s<0&&(console.error("negative zSize not allowed - will invert"),s*=-1);let n=e.xSegments||1;n<0&&(console.error("negative xSegments not allowed - will invert"),n*=-1),n<1&&(n=1);let i=e.xSegments||1;i<0&&(console.error("negative zSegments not allowed - will invert"),i*=-1),i<1&&(i=1);const r=e.center,a=r?r[0]:0,o=r?r[1]:0,l=r?r[2]:0,c=t/2,u=s/2,h=Math.floor(n)||1,p=Math.floor(i)||1,d=h+1,A=p+1,f=t/h,I=s/p,m=new Float32Array(d*A*3),y=new Float32Array(d*A*3),v=new Float32Array(d*A*2);let w,E,T,b,D,P,C,_=0,R=0;for(w=0;w65535?Uint32Array:Uint16Array)(h*p*6);for(w=0;w360&&(r=360);const a=e.center;let o=a?a[0]:0,l=a?a[1]:0;const c=a?a[2]:0,u=[],h=[],p=[],A=[];let f,I,m,y,v,w,E,T,b,D,P,C;for(T=0;T<=i;T++)for(E=0;E<=n;E++)f=E/n*r,I=.785398+T/i*Math.PI*2,o=t*Math.cos(f),l=t*Math.sin(f),m=(t+s*Math.cos(I))*Math.cos(f),y=(t+s*Math.cos(I))*Math.sin(f),v=s*Math.sin(I),u.push(m+o),u.push(y+l),u.push(v+c),p.push(1-E/n),p.push(T/i),w=d.normalizeVec3(d.subVec3([m,y,v],[o,l,c],[]),[]),h.push(w[0]),h.push(w[1]),h.push(w[2]);for(T=1;T<=i;T++)for(E=1;E<=n;E++)b=(n+1)*T+E-1,D=(n+1)*(T-1)+E-1,P=(n+1)*(T-1)+E,C=(n+1)*T+E,A.push(b),A.push(D),A.push(P),A.push(P),A.push(C),A.push(b);return g.apply(e,{positions:u,normals:h,uv:p,indices:A})}function ir(e={}){if(e.points.length%3!=0)throw"Size of points array for given polyline should be divisible by 3";let t=e.points.length/3;if(t<2)throw"There should be at least 2 points to create a polyline";let s=[];for(let e=0;e[...e])).flat();return ir({id:e.id,points:t})}qi.load=function(e,t){var s=new XMLHttpRequest;s.open("GET",e,!0),s.responseType="arraybuffer",s.onload=function(e){t(e.target.response)},s.send()},qi.save=function(e,t){var s="data:application/octet-stream;base64,"+btoa(qi.parse._buffToStr(e));window.location.href=s},qi.clone=function(e){return JSON.parse(JSON.stringify(e))},qi.bin={},qi.bin.f=new Float32Array(1),qi.bin.fb=new Uint8Array(qi.bin.f.buffer),qi.bin.rf=function(e,t){for(var s=qi.bin.f,n=qi.bin.fb,i=0;i<4;i++)n[i]=e[t+i];return s[0]},qi.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},qi.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},qi.bin.rASCII0=function(e,t){for(var s="";0!=e[t];)s+=String.fromCharCode(e[t++]);return s},qi.bin.wf=function(e,t,s){new Float32Array(e.buffer,t,1)[0]=s},qi.bin.wsl=function(e,t,s){e[t]=s,e[t+1]=s>>8},qi.bin.wil=function(e,t,s){e[t]=s,e[t+1]=s>>8,e[t+2]=s>>16,e[t+3]},qi.parse={},qi.parse._buffToStr=function(e){for(var t=new Uint8Array(e),s="",n=0;ni&&(i=l),cr&&(r=c),ua&&(a=u)}return{min:{x:t,y:s,z:n},max:{x:i,y:r,z:a}}};class ar extends x{constructor(e,t={}){super(e,t),this._type=t.type||(t.src?t.src.split(".").pop():null)||"jpg",this._pos=d.vec3(t.pos||[0,0,0]),this._up=d.vec3(t.up||[0,1,0]),this._normal=d.vec3(t.normal||[0,0,1]),this._height=t.height||1,this._origin=d.vec3(),this._rtcPos=d.vec3(),this._imageSize=d.vec2(),this._texture=new Wi(this,{flipY:!0}),this._image=new Image,"jpg"!==this._type&&"png"!==this._type&&(this.error('Unsupported type - defaulting to "jpg"'),this._type="jpg"),this._node=new Ri(this,{matrix:d.inverseMat4(d.lookAtMat4v(this._pos,d.subVec3(this._pos,this._normal,d.mat4()),this._up,d.mat4())),children:[this._bitmapMesh=new pi(this,{scale:[1,1,1],rotation:[-90,0,0],collidable:t.collidable,pickable:t.pickable,opacity:t.opacity,clippable:t.clippable,geometry:new Vt(this,sr({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new Kt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0})})]}),t.image?this.image=t.image:t.src?this.src=t.src:t.imageData&&(this.imageData=t.imageData),this.scene._bitmapCreated(this)}set visible(e){this._bitmapMesh.visible=e}get visible(){return this._bitmapMesh.visible}set image(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}get image(){return this._image}set src(e){if(e){this._image.onload=()=>{this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale()},this._image.src=e;switch(e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}}get src(){return this._image.src}set imageData(e){this._image.onload=()=>{this._texture.image=image,this._imageSize[0]=image.width,this._imageSize[1]=image.height,this._updateBitmapMeshScale()},this._image.src=e}get imageData(){const e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")}set type(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}get type(){return this._type}get pos(){return this._pos}get normal(){return this._normal}get up(){return this._up}set height(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}get height(){return this._height}set collidable(e){this._bitmapMesh.collidable=!1!==e}get collidable(){return this._bitmapMesh.collidable}set clippable(e){this._bitmapMesh.clippable=!1!==e}get clippable(){return this._bitmapMesh.clippable}set pickable(e){this._bitmapMesh.pickable=!1!==e}get pickable(){return this._bitmapMesh.pickable}set opacity(e){this._bitmapMesh.opacity=e}get opacity(){return this._bitmapMesh.opacity}destroy(){super.destroy(),this.scene._bitmapDestroyed(this)}_updateBitmapMeshScale(){const e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height/e,1,this._height]}}const or=d.OBB3(),lr=d.OBB3(),cr=d.OBB3();class ur{constructor(e,t,s,n,i,r,a=null,o=0){this.model=e,this.object=null,this.parent=null,this.transform=i,this.textureSet=r,this._matrixDirty=!1,this._matrixUpdateScheduled=!1,this.id=t,this.obb=null,this._aabbLocal=null,this._aabbWorld=d.AABB3(),this._aabbWorldDirty=!1,this.layer=a,this.portionId=o,this._color=new Uint8Array([s[0],s[1],s[2],n]),this._colorize=new Uint8Array([s[0],s[1],s[2],n]),this._colorizing=!1,this._transparent=n<255,this.numTriangles=0,this.origin=null,this.entity=null,i&&i._addMesh(this)}_sceneModelDirty(){this._aabbWorldDirty=!0,this.layer.aabbDirty=!0}_transformDirty(){this._matrixDirty||this._matrixUpdateScheduled||(this.model._meshMatrixDirty(this),this._matrixDirty=!0,this._matrixUpdateScheduled=!0),this._aabbWorldDirty=!0,this.layer.aabbDirty=!0,this.entity&&this.entity._transformDirty()}_updateMatrix(){this.transform&&this._matrixDirty&&this.layer.setMatrix(this.portionId,this.transform.worldMatrix),this._matrixDirty=!1,this._matrixUpdateScheduled=!1}_finalize(e){this.layer.initFlags(this.portionId,e,this._transparent)}_finalize2(){this.layer.flushInitFlags&&this.layer.flushInitFlags()}_setVisible(e){this.layer.setVisible(this.portionId,e,this._transparent)}_setColor(e){this._color[0]=e[0],this._color[1]=e[1],this._color[2]=e[2],this._colorizing||this.layer.setColor(this.portionId,this._color,!1)}_setColorize(e){e?(this._colorize[0]=e[0],this._colorize[1]=e[1],this._colorize[2]=e[2],this.layer.setColor(this.portionId,this._colorize,false),this._colorizing=!0):(this.layer.setColor(this.portionId,this._color,false),this._colorizing=!1)}_setOpacity(e,t){const s=e<255,n=this._transparent!==s;this._color[3]=e,this._colorize[3]=e,this._transparent=s,this._colorizing?this.layer.setColor(this.portionId,this._colorize):this.layer.setColor(this.portionId,this._color),n&&this.layer.setTransparent(this.portionId,t,s)}_setOffset(e){this.layer.setOffset(this.portionId,e)}_setHighlighted(e){this.layer.setHighlighted(this.portionId,e,this._transparent)}_setXRayed(e){this.layer.setXRayed(this.portionId,e,this._transparent)}_setSelected(e){this.layer.setSelected(this.portionId,e,this._transparent)}_setEdges(e){this.layer.setEdges(this.portionId,e,this._transparent)}_setClippable(e){this.layer.setClippable(this.portionId,e,this._transparent)}_setCollidable(e){this.layer.setCollidable(this.portionId,e)}_setPickable(e){this.layer.setPickable(this.portionId,e,this._transparent)}_setCulled(e){this.layer.setCulled(this.portionId,e,this._transparent)}canPickTriangle(){return!1}drawPickTriangles(e,t){}pickTriangleSurface(e){}precisionRayPickSurface(e,t,s,n){return!!this.layer.precisionRayPickSurface&&this.layer.precisionRayPickSurface(this.portionId,e,t,s,n)}canPickWorldPos(){return!0}drawPickDepths(e){this.model.drawPickDepths(e)}drawPickNormals(e){this.model.drawPickNormals(e)}delegatePickedEntity(){return this.parent}getEachVertex(e){this.layer.getEachVertex(this.portionId,e)}set aabb(e){this._aabbLocal=e}get aabb(){if(this._aabbWorldDirty){if(d.AABB3ToOBB3(this._aabbLocal,or),this.transform?(d.transformOBB3(this.transform.worldMatrix,or,lr),d.transformOBB3(this.model.worldMatrix,lr,cr),d.OBB3ToAABB3(cr,this._aabbWorld)):(d.transformOBB3(this.model.worldMatrix,or,lr),d.OBB3ToAABB3(lr,this._aabbWorld)),this.origin){const e=this.origin;this._aabbWorld[0]+=e[0],this._aabbWorld[1]+=e[1],this._aabbWorld[2]+=e[2],this._aabbWorld[3]+=e[0],this._aabbWorld[4]+=e[1],this._aabbWorld[5]+=e[2]}this._aabbWorldDirty=!1}return this._aabbWorld}_destroy(){this.model.scene._renderer.putPickID(this.pickId)}}const hr=new class{constructor(){this._uint8Arrays={},this._float32Arrays={}}_clear(){this._uint8Arrays={},this._float32Arrays={}}getUInt8Array(e){let t=this._uint8Arrays[e];return t||(t=new Uint8Array(e),this._uint8Arrays[e]=t),t}getFloat32Array(e){let t=this._float32Arrays[e];return t||(t=new Float32Array(e),this._float32Arrays[e]=t),t}};let pr=0;const dr={NOT_RENDERED:0,COLOR_OPAQUE:1,COLOR_TRANSPARENT:2,SILHOUETTE_HIGHLIGHTED:3,SILHOUETTE_SELECTED:4,SILHOUETTE_XRAYED:5,EDGES_COLOR_OPAQUE:6,EDGES_COLOR_TRANSPARENT:7,EDGES_HIGHLIGHTED:8,EDGES_SELECTED:9,EDGES_XRAYED:10,PICK:11},Ar=new Float32Array([1,1,1,1]),fr=new Float32Array([0,0,0,1]),Ir=d.vec4(),mr=d.vec3(),yr=d.vec3(),vr=d.mat4();class wr{constructor(e,t=!1,{instancing:s=!1,edges:n=!1}={}){this._scene=e,this._withSAO=t,this._instancing=s,this._edges=n,this._hash=this._getHash(),this._matricesUniformBlockBufferBindingPoint=0,this._matricesUniformBlockBuffer=this._scene.canvas.gl.createBuffer(),this._matricesUniformBlockBufferData=new Float32Array(96),this._vaoCache=new WeakMap,this._allocate()}_getHash(){return this._scene._sectionPlanesState.getHash()}_buildShader(){return{vertex:this._buildVertexShader(),fragment:this._buildFragmentShader()}}_buildVertexShader(){return[""]}_buildFragmentShader(){return[""]}_addMatricesUniformBlockLines(e,t=!1){return e.push("uniform Matrices {"),e.push(" mat4 worldMatrix;"),e.push(" mat4 viewMatrix;"),e.push(" mat4 projMatrix;"),e.push(" mat4 positionsDecodeMatrix;"),t&&(e.push(" mat4 worldNormalMatrix;"),e.push(" mat4 viewNormalMatrix;")),e.push("};"),e}_addRemapClipPosLines(e,t=1){return e.push("uniform vec2 drawingBufferSize;"),e.push("uniform vec2 pickClipPos;"),e.push("vec4 remapClipPos(vec4 clipPos) {"),e.push(" clipPos.xy /= clipPos.w;"),1===t?e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"):e.push(` clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(${t}));`),e.push(" clipPos.xy *= clipPos.w;"),e.push(" return clipPos;"),e.push("}"),e}getValid(){return this._hash===this._getHash()}setSectionPlanesStateUniforms(e){const t=this._scene,{gl:s}=t.canvas,{model:n,layerIndex:i}=e,r=t._sectionPlanesState.getNumAllocatedSectionPlanes(),a=t._sectionPlanesState.sectionPlanes.length;if(r>0){const o=t._sectionPlanesState.sectionPlanes,l=i*a,c=n.renderFlags;for(let t=0;t0&&(this._uReflectionMap="reflectionMap"),s.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(let t=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0&&A.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,A.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),A.lightMaps.length>0&&A.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,A.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++),this._withSAO){const t=a.sao;if(t.possible){const s=o.drawingBufferWidth,n=o.drawingBufferHeight;Ir[0]=s,Ir[1]=n,Ir[2]=t.blendCutoff,Ir[3]=t.blendFactor,o.uniform4fv(this._uSAOParams,Ir),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%r,e.bindTexture++}}if(n){const e=this._edges?"edgeColor":"fillColor",t=this._edges?"edgeAlpha":"fillAlpha";if(s===dr[(this._edges?"EDGES":"SILHOUETTE")+"_XRAYED"]){const s=a.xrayMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===dr[(this._edges?"EDGES":"SILHOUETTE")+"_HIGHLIGHTED"]){const s=a.highlightMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else if(s===dr[(this._edges?"EDGES":"SILHOUETTE")+"_SELECTED"]){const s=a.selectedMaterial._state,n=s[e],i=s[t];o.uniform4f(this._uColor,n[0],n[1],n[2],i)}else o.uniform4fv(this._uColor,this._edges?fr:Ar)}this._draw({state:l,frameCtx:e,incrementDrawState:i}),o.bindVertexArray(null)}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null,m.memory.programs--}}class gr extends wr{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!1,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;if(this._edges)t.drawElements(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0);else{const e=n.pickElementsCount||s.indicesBuf.numItems,r=n.pickElementsOffset?n.pickElementsOffset*s.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,e,s.indicesBuf.itemType,r),i&&n.drawElements++}}}class Er extends gr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i;const r=[];r.push("#version 300 es"),r.push("// Triangles batching draw vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class Tr extends gr{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching flat-shading draw vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._lightsState,s=e._sectionPlanesState,n=s.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching flat-shading draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),n){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}i.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),i.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),i.push("float lambertian = 1.0;"),i.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),i.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),i.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,s=t.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, color.a ));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}class Dr extends gr{constructor(e){super(e,!1,{instancing:!1,edges:!0})}}class Pr extends Dr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Cr extends Dr{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry edges drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class _r extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class Rr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),this._addRemapClipPosLines(s),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class Br extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec3 worldNormal = octDecode(normal.xy); "),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Or extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching occlusion vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles batching occlusion fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Sr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching depth fragment shader"),n.push("precision highp float;"),n.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),n.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),n.push("}"),n}}class Nr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class xr extends gr{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry shadow vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 outColor;"),s.push("void main(void) {"),s.push(" int colorFlag = int(flags) & 0xF;"),s.push(" bool visible = (colorFlag > 0);"),s.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push(" if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry shadow fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = encodeFloat( gl_FragCoord.z); "),s.push("}"),s}}class Lr extends gr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Triangles batching quality draw vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),r.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),r.push("vFragDepth = 1.0 + clipPos.w;")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Triangles batching quality draw fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),a.push("uniform sampler2D uAOMap;"),a.push("in vec4 vViewPosition;"),a.push("in vec3 vViewNormal;"),a.push("in vec4 vColor;"),a.push("in vec2 vUV;"),a.push("in vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching pick flat normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching pick flat normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Fr extends gr{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Triangles batching color texture vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._lightsState,n=e._sectionPlanesState,i=n.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching color texture fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform sampler2D uColorMap;"),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),r.push("uniform float gammaFactor;"),r.push("vec4 linearToLinear( in vec4 value ) {"),r.push(" return value;"),r.push("}"),r.push("vec4 sRGBToLinear( in vec4 value ) {"),r.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),r.push("}"),r.push("vec4 gammaToLinear( in vec4 value) {"),r.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),r.push("}"),t&&(r.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),r.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),r.push("}")),i){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(let e=0,t=n.getNumAllocatedSectionPlanes();e 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;"),r.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),r.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),r.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(let e=0,t=s.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Qr=d.vec3(),Wr=d.vec3(),zr=d.vec3(),Kr=d.vec3(),Yr=d.mat4();class Xr extends wr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Qr;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Wr;if(l){const e=zr;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Yr),m=Kr,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElements(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0),o.edgeIndicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class qr{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new br(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new _r(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new Rr(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new kr(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Xr(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Er(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Er(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new Tr(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new Tr(this._scene,!0)),this._flatColorRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new Fr(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new Fr(this._scene,!0)),this._colorTextureRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new Lr(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new Lr(this._scene,!0)),this._pbrRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new br(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Sr(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Nr(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Pr(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Cr(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new _r(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Br(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Mr(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Rr(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Or(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new xr(this._scene)),this._shadowRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Xr(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new kr(this._scene)),this._snapInitRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Jr={};let Zr=65536,$r=5e6;class ea{constructor(){}set doublePrecisionEnabled(e){d.setDoublePrecisionEnabled(e)}get doublePrecisionEnabled(){return d.getDoublePrecisionEnabled()}set maxDataTextureHeight(e){(e=1024*Math.ceil(e/1024))>4096?e=4096:e<1024&&(e=1024),Zr=e}get maxDataTextureHeight(){return Zr}set maxGeometryBatchSize(e){e<1e5?e=1e5:e>5e6&&(e=5e6),$r=e}get maxGeometryBatchSize(){return $r}}const ta=new ea;class sa{constructor(){this.maxVerts=ta.maxGeometryBatchSize,this.maxIndices=3*ta.maxGeometryBatchSize,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]}}const na=d.mat4(),ia=d.mat4();function ra(e,t,s){const n=e.length,i=new Uint16Array(n),r=t[0],a=t[1],o=t[2],l=t[3]-r,c=t[4]-a,u=t[5]-o,h=65525,p=h/l,A=h/c,f=h/u,I=e=>e>=0?e:0;for(let t=0;t=0?1:-1),t=(1-Math.abs(n))*(i>=0?1:-1),n=e,i=t}return new Int8Array([Math[t](127.5*n+(n<0?-1:0)),Math[s](127.5*i+(i<0?-1:0))])}function la(e){let t=e[0],s=e[1];t/=t<0?127:128,s/=s<0?127:128;const n=1-Math.abs(t)-Math.abs(s);n<0&&(t=(1-Math.abs(s))*(t>=0?1:-1),s=(1-Math.abs(t))*(s>=0?1:-1));const i=Math.sqrt(t*t+s*s+n*n);return[t/i,s/i,n/i]}const ca=d.mat4(),ua=d.mat4(),ha=d.vec4([0,0,0,1]),pa=d.vec3(),da=d.vec3(),Aa=d.vec3(),fa=d.vec3(),Ia=d.vec3(),ma=d.vec3(),ya=d.vec3();class va{constructor(e){console.info("Creating VBOBatchingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesBatchingLayer"+(e.solid?"-solid":"-surface")+(e.autoNormals?"-autonormals":"-normals")+(e.textureSet&&e.textureSet.colorTexture?"-colorTexture":"")+(e.textureSet&&e.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Jr[t];return s||(s=new qr(e),Jr[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Jr[t],s._destroy()}))),s}(e.model.scene),this._buffer=new sa(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new at({origin:d.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:e.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=d.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=d.mat4(e.positionsDecodeMatrix)),e.uvDecodeMatrix?(this._state.uvDecodeMatrix=d.mat3(e.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,e.origin&&this._state.origin.set(e.origin),this.solid=!!e.solid}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)for(let e=0,t=r.length;e0){const e=ca;m?d.inverseMat4(d.transposeMat4(m,ua),e):d.identityMat4(e,e),function(e,t,s,n,i){function r(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}let a,o,l,c,u,h,p=new Float32Array([0,0,0,0]),A=new Float32Array([0,0,0,0]);for(h=0;hu&&(l=a,u=c),a=oa(A,"floor","ceil"),o=la(a),c=r(A,o),c>u&&(l=a,u=c),a=oa(A,"ceil","ceil"),o=la(a),c=r(A,o),c>u&&(l=a,u=c),n[i+h+0]=l[0],n[i+h+1]=l[1],n[i+h+2]=0}(e,i,i.length,w.normals,w.normals.length)}if(l)for(let e=0,t=l.length;e0)for(let e=0,t=a.length;e0)for(let e=0,t=o.length;e0){const n=this._state.positionsDecodeMatrix?new Uint16Array(s.positions):ra(s.positions,this._modelAABB,this._state.positionsDecodeMatrix=d.mat4());if(e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,n.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(let e=0,t=this._portions.length;e0){const n=new Int8Array(s.normals);let i=!0;e.normalsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.normals.length,3,t.STATIC_DRAW,i)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.uv.length>0)if(e.uvDecodeMatrix){let n=!1;e.uvBuf=new Ge(t,t.ARRAY_BUFFER,s.uv,s.uv.length,2,t.STATIC_DRAW,n)}else{const n=Ut.getUVBounds(s.uv),i=Ut.compressUVs(s.uv,n.min,n.max),r=i.quantized;let a=!1;e.uvDecodeMatrix=d.mat3(i.decodeMatrix),e.uvBuf=new Ge(t,t.ARRAY_BUFFER,r,r.length,2,t.STATIC_DRAW,a)}if(s.metallicRoughness.length>0){const n=new Uint8Array(s.metallicRoughness);let i=!1;e.metallicRoughnessBuf=new Ge(t,t.ARRAY_BUFFER,n,s.metallicRoughness.length,2,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n),r=!1;e.flagsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}if(s.edgeIndices.length>0){const n=new Uint32Array(s.edgeIndices);e.edgeIndicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,n,s.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}isEmpty(){return!this._state.indicesBuf}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=e,n=this._portions[s],i=4*n.vertsBaseIndex,r=4*n.numVerts,a=this._scratchMemory.getUInt8Array(r),o=t[0],l=t[1],c=t[2],u=t[3];for(let e=0;ey)&&(y=e,n.set(v),i&&d.triangleNormal(A,f,I,i),m=!0)}}return m&&i&&(d.transformVec3(this.model.worldNormalMatrix,i,i),d.normalizeVec3(i)),m}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}class wa extends wr{constructor(e,t,{edges:s=!1}={}){super(e,t,{instancing:!0,edges:s})}_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;this._edges?t.drawElementsInstanced(t.LINES,s.edgeIndicesBuf.numItems,s.edgeIndicesBuf.itemType,0,s.numInstances):(t.drawElementsInstanced(t.TRIANGLES,s.indicesBuf.numItems,s.indicesBuf.itemType,0,s.numInstances),i&&n.drawElements++)}}class ga extends wa{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0;let i,r,a;const o=[];for(o.push("#version 300 es"),o.push("// Instancing geometry drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec2 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),e.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),e.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;"),i=0,r=s.lights.length;i= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),n&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),o.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),i=0,r=s.lights.length;i0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}}class Ea extends wa{_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState;let n,i;const r=t.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry flat-shading drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),r){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}for(a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),n=0,i=s.lights.length;n0,s=[];return s.push("#version 300 es"),s.push("// Instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 color;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing fill fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class ba extends wa{constructor(e,t){super(e,t,{instancing:!0,edges:!0})}}class Da extends ba{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesEmphasisRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("uniform vec4 color;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Pa extends ba{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!1})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// EdgesColorRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeFlag = int(flags) >> 8 & 0xF;"),s.push("if (edgeFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// EdgesColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class Ca extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry picking vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 pickColor;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class _a extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push(" vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class Ra extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec2 normal;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("in vec4 modelNormalMatrixCol0;"),s.push("in vec4 modelNormalMatrixCol1;"),s.push("in vec4 modelNormalMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vWorldNormal;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),s.push(" vWorldNormal = worldNormal;"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(` outNormal = ivec4(vWorldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Ba extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesInstancingOcclusionRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}}class Oa extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry depth drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec2 vHighPrecisionZW;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("precision highp float;"),r.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),r.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),r.push("}"),r}}class Sa extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec3 normal;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s,!0),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}class Na extends wa{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const xa={3e3:"linearToLinear",3001:"sRGBToLinear"};class La extends wa{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState,s=e._lightsState,n=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,r=[];return r.push("#version 300 es"),r.push("// Instancing geometry quality drawing vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec3 normal;"),r.push("in vec4 color;"),r.push("in vec2 uv;"),r.push("in vec2 metallicRoughness;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("in vec4 modelNormalMatrixCol0;"),r.push("in vec4 modelNormalMatrixCol1;"),r.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(r,!0),r.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("out float isPerspective;")),r.push("vec3 octDecode(vec2 oct) {"),r.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),r.push(" if (v.z < 0.0) {"),r.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),r.push(" }"),r.push(" return normalize(v);"),r.push("}"),r.push("out vec4 vViewPosition;"),r.push("out vec3 vViewNormal;"),r.push("out vec4 vColor;"),r.push("out vec2 vUV;"),r.push("out vec2 vMetallicRoughness;"),s.lightMaps.length>0&&r.push("out vec3 vWorldNormal;"),n&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;"),i&&r.push("out vec4 vClipPosition;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),r.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),r.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;"),i&&r.push("vClipPosition = clipPos;")),r.push("vViewPosition = viewPosition;"),r.push("vViewNormal = viewNormal;"),r.push("vColor = color;"),r.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),r.push("vMetallicRoughness = metallicRoughness;"),s.lightMaps.length>0&&r.push("vWorldNormal = worldNormal.xyz;"),r.push("gl_Position = clipPos;"),r.push("}"),r.push("}"),r}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState,i=s.getNumAllocatedSectionPlanes()>0,r=s.clippingCaps,a=[];a.push("#version 300 es"),a.push("// Instancing geometry quality drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),a.push("uniform sampler2D uMetallicRoughMap;"),a.push("uniform sampler2D uEmissiveMap;"),a.push("uniform sampler2D uNormalMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),n.reflectionMaps.length>0&&a.push("uniform samplerCube reflectionMap;"),n.lightMaps.length>0&&a.push("uniform samplerCube lightMap;"),a.push("uniform vec4 lightAmbient;");for(let e=0,t=n.lights.length;e0&&a.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(a,!0),a.push("#define PI 3.14159265359"),a.push("#define RECIPROCAL_PI 0.31830988618"),a.push("#define RECIPROCAL_PI2 0.15915494"),a.push("#define EPSILON 1e-6"),a.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),a.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),a.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),a.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),a.push(" return normalize(surf_norm );"),a.push(" }"),a.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),a.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),a.push(" vec2 st0 = dFdx( uv.st );"),a.push(" vec2 st1 = dFdy( uv.st );"),a.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),a.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),a.push(" vec3 N = normalize( surf_norm );"),a.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),a.push(" mat3 tsn = mat3( S, T, N );"),a.push(" return normalize( tsn * mapN );"),a.push("}"),a.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),a.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),a.push("}"),a.push("struct IncidentLight {"),a.push(" vec3 color;"),a.push(" vec3 direction;"),a.push("};"),a.push("struct ReflectedLight {"),a.push(" vec3 diffuse;"),a.push(" vec3 specular;"),a.push("};"),a.push("struct Geometry {"),a.push(" vec3 position;"),a.push(" vec3 viewNormal;"),a.push(" vec3 worldNormal;"),a.push(" vec3 viewEyeDir;"),a.push("};"),a.push("struct Material {"),a.push(" vec3 diffuseColor;"),a.push(" float specularRoughness;"),a.push(" vec3 specularColor;"),a.push(" float shine;"),a.push("};"),a.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),a.push(" float r = ggxRoughness + 0.0001;"),a.push(" return (2.0 / (r * r) - 2.0);"),a.push("}"),a.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),a.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),a.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),a.push("}"),n.reflectionMaps.length>0&&(a.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),a.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),a.push(" vec3 envMapColor = "+xa[n.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),a.push(" return envMapColor;"),a.push("}")),a.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),a.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),a.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),a.push("}"),a.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" return 1.0 / ( gl * gv );"),a.push("}"),a.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),a.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),a.push(" return 0.5 / max( gv + gl, EPSILON );"),a.push("}"),a.push("float D_GGX(const in float alpha, const in float dotNH) {"),a.push(" float a2 = ( alpha * alpha );"),a.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),a.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float alpha = ( roughness * roughness );"),a.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),a.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),a.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),a.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),a.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),a.push(" vec3 F = F_Schlick( specularColor, dotLH );"),a.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),a.push(" float D = D_GGX( alpha, dotNH );"),a.push(" return F * (G * D);"),a.push("}"),a.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),a.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),a.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),a.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),a.push(" vec4 r = roughness * c0 + c1;"),a.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),a.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),a.push(" return specularColor * AB.x + AB.y;"),a.push("}"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&(a.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),n.lightMaps.length>0&&(a.push(" vec3 irradiance = "+xa[n.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),a.push(" irradiance *= PI;"),a.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),n.reflectionMaps.length>0&&(a.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),a.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),a.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),a.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),a.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),a.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),a.push("}")),a.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),a.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),a.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),a.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),a.push("}"),a.push("out vec4 outColor;"),a.push("void main(void) {"),i){a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e (0.002 * vClipPosition.w)) {"),a.push(" discard;"),a.push(" }"),a.push(" if (dist > 0.0) { "),a.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push(" return;"),a.push("}")):(a.push(" if (dist > 0.0) { "),a.push(" discard;"),a.push(" }")),a.push("}")}a.push("IncidentLight light;"),a.push("Material material;"),a.push("Geometry geometry;"),a.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),a.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),a.push("float opacity = float(vColor.a) / 255.0;"),a.push("vec3 baseColor = rgb;"),a.push("float specularF0 = 1.0;"),a.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),a.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),a.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),a.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),a.push("baseColor *= colorTexel.rgb;"),a.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),a.push("metallic *= metalRoughTexel.b;"),a.push("roughness *= metalRoughTexel.g;"),a.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),a.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),a.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),a.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),a.push("geometry.position = vViewPosition.xyz;"),a.push("geometry.viewNormal = -normalize(viewNormal);"),a.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),n.lightMaps.length>0&&a.push("geometry.worldNormal = normalize(vWorldNormal);"),(n.lightMaps.length>0||n.reflectionMaps.length>0)&&a.push("computePBRLightMapping(geometry, material, reflectedLight);");for(let e=0,t=n.lights.length;e0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry normals vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),this._addRemapClipPosLines(s,3),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&s.push("out float vFlags;"),s.push("out vec4 vWorldPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&s.push("vFlags = flags;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),s){n.push("in float vFlags;");for(let e=0;e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(` outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),n.push("}"),n}}class Fa extends wa{_getHash(){const e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry drawing vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in vec2 uv;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),s.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vViewPosition;"),s.push("out vec4 vColor;"),s.push("out vec2 vUV;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vViewPosition = viewPosition;"),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),s.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e.gammaOutput,s=e._sectionPlanesState,n=e._lightsState;let i,r;const a=s.getNumAllocatedSectionPlanes()>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),e.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),t&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),a){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(let e=0,t=s.getNumAllocatedSectionPlanes();e 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}for(o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),i=0,r=n.lights.length;i0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Qa=d.vec3(),Wa=d.vec3(),za=d.vec3(),Ka=d.vec3(),Ya=d.mat4();class Xa extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Qa;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Wa;if(l){const e=d.transformPoint3(u,l,za);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Ya),m=Ka,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0,o.numInstances),o.edgeIndicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class qa{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new Ta(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new Ca(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new _a(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new ka(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Xa(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new ga(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new ga(this._scene,!0)),this._colorRendererWithSAO}get flatColorRenderer(){return this._flatColorRenderer||(this._flatColorRenderer=new Ea(this._scene,!1)),this._flatColorRenderer}get flatColorRendererWithSAO(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new Ea(this._scene,!0)),this._flatColorRendererWithSAO}get pbrRenderer(){return this._pbrRenderer||(this._pbrRenderer=new La(this._scene,!1)),this._pbrRenderer}get pbrRendererWithSAO(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new La(this._scene,!0)),this._pbrRendererWithSAO}get colorTextureRenderer(){return this._colorTextureRenderer||(this._colorTextureRenderer=new Fa(this._scene,!1)),this._colorTextureRenderer}get colorTextureRendererWithSAO(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new Fa(this._scene,!0)),this._colorTextureRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ta(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Oa(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new Sa(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Da(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Pa(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new Ca(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Ra(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Ma(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new _a(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new Ba(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new Na(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new ka(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Xa(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Ja={};const Za=new Uint8Array(4),$a=new Float32Array(1),eo=d.vec4([0,0,0,1]),to=new Float32Array(3),so=d.vec3(),no=d.vec3(),io=d.vec3(),ro=d.vec3(),ao=d.vec3(),oo=d.vec3(),lo=d.vec3(),co=new Float32Array(4);class uo{constructor(e){console.info("Creating VBOInstancingTrianglesLayer"),this.model=e.model,this.sortId="TrianglesInstancingLayer"+(e.solid?"-solid":"-surface")+(e.normals?"-normals":"-autoNormals"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Ja[t];return s||(s=new qa(e),Ja[t]=s,s._compile(),s.eagerCreateRenders(),e.on("compile",(()=>{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Ja[t],s._destroy()}))),s}(e.model.scene),this._aabb=d.collapseAABB3(),this._state=new at({numInstances:0,obb:d.OBB3(),origin:d.vec3(),geometry:e.geometry,textureSet:e.textureSet,pbrSupported:!1,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrix=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,e.origin&&this._state.origin.set(e.origin),this._finalized=!1,this.solid=!!e.solid,this.numIndices=e.geometry.numIndices}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;e.colorsBuf=new Ge(n,n.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,n.DYNAMIC_DRAW,t),this._colors=[]}if(this._metallicRoughness.length>0){const t=new Uint8Array(this._metallicRoughness);let s=!1;e.metallicRoughnessBuf=new Ge(n,n.ARRAY_BUFFER,t,this._metallicRoughness.length,2,n.STATIC_DRAW,s)}if(r>0){let t=!1;e.flagsBuf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(r),r,1,n.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;e.offsetsBuf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,n.DYNAMIC_DRAW,t),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){const s=!1;e.positionsBuf=new Ge(n,n.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,n.STATIC_DRAW,s),e.positionsDecodeMatrix=d.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){const s=new Uint8Array(t.colorsCompressed),i=!1;e.colorsBuf=new Ge(n,n.ARRAY_BUFFER,s,s.length,4,n.STATIC_DRAW,i)}if(t.uvCompressed&&t.uvCompressed.length>0){const s=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new Ge(n,n.ARRAY_BUFFER,s,s.length,2,n.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,n.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new Ge(n,n.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,n.STATIC_DRAW)),this._modelMatrixCol0.length>0){const t=!1;e.modelMatrixCol0Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelMatrixCol1Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelMatrixCol2Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol1Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,n.STATIC_DRAW,t),e.modelNormalMatrixCol2Buf=new Ge(n,n.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,n.STATIC_DRAW,t),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){const t=!1;e.pickColorsBuf=new Ge(n,n.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,n.STATIC_DRAW,t),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&s&&s.colorTexture&&s.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!s&&!!s.colorTexture,this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Za[0]=t[0],Za[1]=t[1],Za[2]=t[2],Za[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Za,4*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&J),i=!!(t&se),r=!!(t&ne),a=!!(t&ie),o=!!(t&re),l=!!(t&$),c=!!(t&Z);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?dr.NOT_RENDERED:s?dr.COLOR_TRANSPARENT:dr.COLOR_OPAQUE,h=!n||c?dr.NOT_RENDERED:a?dr.SILHOUETTE_SELECTED:r?dr.SILHOUETTE_HIGHLIGHTED:i?dr.SILHOUETTE_XRAYED:dr.NOT_RENDERED;let p=0;p=!n||c?dr.NOT_RENDERED:a?dr.EDGES_SELECTED:r?dr.EDGES_HIGHLIGHTED:i?dr.EDGES_XRAYED:o?s?dr.EDGES_COLOR_TRANSPARENT:dr.EDGES_COLOR_OPAQUE:dr.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?dr.PICK:dr.NOT_RENDERED)<<12,d|=(t&ee?1:0)<<16,$a[0]=d,this._state.flagsBuf&&this._state.flagsBuf.setData($a,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(to[0]=t[0],to[1]=t[1],to[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(to,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}getEachVertex(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;const s=this._state,n=s.geometry,i=this._portions[e];if(!i)return void this.model.error("portion not found: "+e);const r=n.quantizedPositions,a=s.origin,o=i.offset,l=a[0]+o[0],c=a[1]+o[1],u=a[2]+o[2],h=eo,p=i.matrix,A=this.model.sceneModelMatrix,f=s.positionsDecodeMatrix;for(let e=0,s=r.length;ev)&&(v=e,n.set(w),i&&d.triangleNormal(f,I,m,i),y=!0)}}return y&&i&&(d.transformVec3(o.normalMatrix,i,i),d.transformVec3(this.model.worldNormalMatrix,i,i),d.normalizeVec3(i)),y}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}class ho extends wr{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawElements(t.LINES,s.indicesBuf.numItems,s.indicesBuf.itemType,0),i&&n.drawElements++}}class po extends ho{drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Ao extends ho{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines batching silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines batching silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const fo=d.vec3(),Io=d.vec3(),mo=d.vec3(),yo=d.vec3(),vo=d.mat4();class wo extends wr{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=fo;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Io;if(l){const e=mo;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,vo),m=yo,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const go=d.vec3(),Eo=d.vec3(),To=d.vec3(),bo=d.vec3(),Do=d.mat4();class Po extends wr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=go;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Eo;if(l){const e=To;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Do),m=bo,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElements(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()):a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapBatchingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Co{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new po(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Ao(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new wo(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Po(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const _o={};class Ro{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]}}class Bo{constructor(e){console.info("Creating VBOBatchingLinesLayer"),this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=_o[t];return s||(s=new Co(e),_o[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete _o[t],s._destroy()}))),s}(e.model.scene),this.model=e.model,this._buffer=new Ro(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new at({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:d.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=d.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=d.vec3(e.origin))}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=ra(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.DYNAMIC_DRAW,i)}if(s.colors.length>0){const n=s.colors.length/4,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}if(s.indices.length>0){const n=new Uint32Array(s.indices);e.indicesBuf=new Ge(t,t.ELEMENT_ARRAY_BUFFER,n,s.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,!0)}flushInitFlags(){this._setDeferredFlags()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2],c=t[3];for(let e=0;e0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing color vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),s.push("in vec4 color;"),s.push("in float flags;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 lightAmbient;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("if (colorFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines instancing color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class No extends Oo{drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Lines instancing silhouette vertex shader"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(s),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;")),s.push("uniform vec4 color;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),s.push("if (silhouetteFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Lines instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = color;"),n.push("}"),n}}const xo=d.vec3(),Lo=d.vec3(),Mo=d.vec3();d.vec3();const Fo=d.mat4();class Ho extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=xo;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Lo;if(l){const e=d.transformPoint3(u,l,Mo);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Fo),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),o.indicesBuf.bind(),r.drawElementsInstanced(r.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind(),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Uo=d.vec3(),Go=d.vec3(),jo=d.vec3();d.vec3();const Vo=d.mat4();class ko extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Uo;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Go;if(l){const e=d.transformPoint3(u,l,jo);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Vo),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.indicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind()):a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Qo{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}eagerCreateRenders(){this._snapInitRenderer||(this._snapInitRenderer=new Ho(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new ko(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new So(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new No(this._scene)),this._silhouetteRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ho(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new ko(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Wo={};const zo=new Uint8Array(4),Ko=new Float32Array(1),Yo=new Float32Array(3),Xo=new Float32Array(4);class qo{constructor(e){console.info("VBOInstancingLinesLayer"),this.model=e.model,this.material=e.material,this.sortId="LinesInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Wo[t];return s||(s=new Qo(e),Wo[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Wo[t],s._destroy()}))),s}(e.model.scene),this._aabb=d.collapseAABB3(),this._state=new at({obb:d.OBB3(),numInstances:0,origin:null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,e.origin&&(this._state.origin=d.vec3(e.origin)),this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let t=!1;this._state.colorsBuf=new Ge(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,t),this._colors=[]}if(i>0){let t=!1;this._state.flagsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(i),i,1,e.DYNAMIC_DRAW,t)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;this._state.offsetsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(s.colorsCompressed&&s.colorsCompressed.length>0){const n=new Uint8Array(s.colorsCompressed),i=!1;t.colorsBuf=new Ge(e,e.ARRAY_BUFFER,n,n.length,4,e.STATIC_DRAW,i)}if(s.positionsCompressed&&s.positionsCompressed.length>0){const n=!1;t.positionsBuf=new Ge(e,e.ARRAY_BUFFER,s.positionsCompressed,s.positionsCompressed.length,3,e.STATIC_DRAW,n),t.positionsDecodeMatrix=d.mat4(s.positionsDecodeMatrix)}if(s.indices&&s.indices.length>0&&(t.indicesBuf=new Ge(e,e.ELEMENT_ARRAY_BUFFER,new Uint32Array(s.indices),s.indices.length,1,e.STATIC_DRAW),t.numIndices=s.indices.length),this._modelMatrixCol0.length>0){const t=!1;this._state.modelMatrixCol0Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol1Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),this._state.modelMatrixCol2Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";zo[0]=t[0],zo[1]=t[1],zo[2]=t[2],zo[3]=t[3],this._state.colorsBuf.setData(zo,4*e,4)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&J),i=!!(t&se),r=!!(t&ne),a=!!(t&ie),o=!!(t&re),l=!!(t&$),c=!!(t&Z);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?dr.NOT_RENDERED:s?dr.COLOR_TRANSPARENT:dr.COLOR_OPAQUE,h=!n||c?dr.NOT_RENDERED:a?dr.SILHOUETTE_SELECTED:r?dr.SILHOUETTE_HIGHLIGHTED:i?dr.SILHOUETTE_XRAYED:dr.NOT_RENDERED;let p=0;p=!n||c?dr.NOT_RENDERED:a?dr.EDGES_SELECTED:r?dr.EDGES_HIGHLIGHTED:i?dr.EDGES_XRAYED:o?s?dr.EDGES_COLOR_TRANSPARENT:dr.EDGES_COLOR_OPAQUE:dr.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?dr.PICK:dr.NOT_RENDERED)<<12,d|=(t&ee?255:0)<<16,Ko[0]=d,this._state.flagsBuf.setData(Ko,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Yo[0]=t[0],Yo[1]=t[1],Yo[2]=t[2],this._state.offsetsBuf.setData(Yo,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;Xo[0]=t[0],Xo[1]=t[4],Xo[2]=t[8],Xo[3]=t[12],this._state.modelMatrixCol0Buf.setData(Xo,s),Xo[0]=t[1],Xo[1]=t[5],Xo[2]=t[9],Xo[3]=t[13],this._state.modelMatrixCol1Buf.setData(Xo,s),Xo[0]=t[2],Xo[1]=t[6],Xo[2]=t[10],Xo[3]=t[14],this._state.modelMatrixCol2Buf.setData(Xo,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesXRayed(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,dr.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,dr.PICK)}drawOcclusion(e,t){}drawShadow(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawPickNormals(e,t){}destroy(){const e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}class Jo extends wr{_draw(e){const{gl:t}=this._scene.canvas,{state:s,frameCtx:n,incrementDrawState:i}=e;t.drawArrays(t.POINTS,0,s.positionsBuf.numItems),i&&n.drawArrays++}}class Zo extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{incrementDrawState:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial,n=[];return n.push("#version 300 es"),n.push("// Points batching color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class $o extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 color;"),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching silhouette vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}class el extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching pick mesh vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var i=0;i 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vPickColor; "),n.push("}"),n}}class tl extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batched pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("gl_PointSize += 10.0;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batched pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class sl extends Jo{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points batching occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push(" gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push(" }"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points batching occlusion fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}const nl=d.vec3(),il=d.vec3(),rl=d.vec3(),al=d.vec3(),ol=d.mat4();class ll extends wr{drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=nl;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=il;if(l){const e=rl;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,ol),m=al,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const cl=d.vec3(),ul=d.vec3(),hl=d.vec3(),pl=d.vec3(),dl=d.mat4();class Al extends wr{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=cl;let I,m;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=ul;if(l){const e=hl;d.transformPoint3(u,l,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,dl),m=pl,m[0]=r.eye[0]-t[0],m[1]=r.eye[1]-t[1],m[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,m=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,m),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let y=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,y+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),a.drawArrays(a.POINTS,0,o.positionsBuf.numItems)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;const s=[];return s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// VBOBatchingPointsSnapRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class fl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Zo(this._scene)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new $o(this._scene)),this._silhouetteRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new el(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new tl(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new sl(this._scene)),this._occlusionRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new ll(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Al(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Il={};class ml{constructor(e=5e6){e>5e6&&(e=5e6),this.maxVerts=e,this.maxIndices=3*e,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]}}class yl{constructor(e){console.info("Creating VBOBatchingPointsLayer"),this.model=e.model,this.sortId="PointsBatchingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Il[t];return s||(s=new fl(e),Il[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Il[t],s._destroy()}))),s}(e.model.scene),this._buffer=new ml(e.maxGeometryBatchSize),this._scratchMemory=e.scratchMemory,this._state=new at({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:d.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=d.collapseAABB3(),this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,e.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(e.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,e.origin&&(this._state.origin=d.vec3(e.origin))}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){const n=new Uint16Array(s.positions);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}else{const n=ra(new Float32Array(s.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.positions.length,3,t.STATIC_DRAW)}if(s.colors.length>0){const n=new Uint8Array(s.colors);let i=!1;e.colorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.colors.length,4,t.STATIC_DRAW,i)}if(s.positions.length>0){const n=s.positions.length/3,i=new Float32Array(n);let r=!1;e.flagsBuf=new Ge(t,t.ARRAY_BUFFER,i,i.length,1,t.DYNAMIC_DRAW,r)}if(s.pickColors.length>0){const n=new Uint8Array(s.pickColors);let i=!1;e.pickColorsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.pickColors.length,4,t.STATIC_DRAW,i)}if(this.model.scene.entityOffsetsEnabled&&s.offsets.length>0){const n=new Float32Array(s.offsets);e.offsetsBuf=new Ge(t,t.ARRAY_BUFFER,n,s.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized"}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";const s=2*e,n=4*this._portions[s],i=4*this._portions[s+1],r=this._scratchMemory.getUInt8Array(i),a=t[0],o=t[1],l=t[2];for(let e=0;e0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),s.filterIntensity&&n.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),s.filterIntensity&&(n.push("float intensity = float(color.a) / 255.0;"),n.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {")),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),s.filterIntensity&&n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing color fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class gl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}drawLayer(e,t,s){super.drawLayer(e,t,s,{colorUniform:!0})}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 silhouetteColor;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing silhouette fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vColor;"),n.push("}"),n}}class El extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick mesh vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick mesh fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outColor = vPickColor; "),n.push("}"),n}}class Tl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = remapClipPos(clipPos);"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outColor = packDepth(zNormalizedDepth); "),n.push("}"),n}}class bl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing occlusion vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0;e 1.0) {"),n.push(" discard;"),n.push(" }")),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0;e 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("}"),n}}class Dl extends vl{_getHash(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=e.pointsMaterial._state,n=[];return n.push("#version 300 es"),n.push("// Points instancing depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),s.perspectivePoints&&n.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),s.perspectivePoints?(n.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),n.push("gl_PointSize = max(gl_PointSize, "+Math.floor(s.minPerspectivePointSize)+".0);"),n.push("gl_PointSize = min(gl_PointSize, "+Math.floor(s.maxPerspectivePointSize)+".0);")):n.push("gl_PointSize = pointSize;"),n.push("}"),n.push("}"),n}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState;let s,n;const i=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing depth vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),i)for(r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;"),s=0,n=t.getNumAllocatedSectionPlanes();s 1.0) {"),r.push(" discard;"),r.push(" }")),i){for(r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;"),s=0,n=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}class Pl extends vl{_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// Instancing geometry shadow drawing vertex shader"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in vec4 color;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform mat4 shadowViewMatrix;"),s.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(s),s.push("uniform float pointSize;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("void main(void) {"),s.push("int colorFlag = int(flags) & 0xF;"),s.push("bool visible = (colorFlag > 0);"),s.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),s.push("if (!visible || transparent) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags = flags;")),s.push(" gl_Position = shadowProjMatrix * viewPosition;"),s.push("}"),s.push("gl_PointSize = pointSize;"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Instancing geometry depth drawing fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 1.0) {"),n.push(" discard;"),n.push(" }"),s){n.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}}const Cl=d.vec3(),_l=d.vec3(),Rl=d.vec3();d.vec3();const Bl=d.mat4();class Ol extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.canvas.gl,a=i.camera,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?r.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Cl;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=_l;if(l){const e=d.transformPoint3(u,l,Rl);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Bl),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;r.uniform2fv(this.uVectorA,e.snapVectorA),r.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),r.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),r.uniform3fv(this._uCoordinateScaler,f),r.uniform1i(this._uRenderPass,s),r.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),r.bindBuffer(r.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),r.bufferData(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,r.DYNAMIC_DRAW),r.bindBufferBase(r.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),r.vertexAttribDivisor(this._aModelMatrixCol0.location,1),r.vertexAttribDivisor(this._aModelMatrixCol1.location,1),r.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),r.vertexAttribDivisor(this._aFlags.location,1)),r.drawArraysInstanced(r.POINTS,0,o.positionsBuf.numItems,o.numInstances),r.vertexAttribDivisor(this._aModelMatrixCol0.location,0),r.vertexAttribDivisor(this._aModelMatrixCol1.location,0),r.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&r.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&r.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthBufInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec4 pickColor;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("out float vFlags;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vWorldPosition = worldPosition;"),t&&s.push(" vFlags = flags;"),s.push("vPickColor = pickColor;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Points instancing pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),s.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Sl=d.vec3(),Nl=d.vec3(),xl=d.vec3();d.vec3();const Ll=d.mat4();class Ml extends wr{constructor(e){super(e,!1,{instancing:!0})}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=t.aabb,A=e.pickViewMatrix||r.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));const f=Sl;let I;if(f[0]=d.safeInv(p[3]-p[0])*d.MAX_INT,f[1]=d.safeInv(p[4]-p[1])*d.MAX_INT,f[2]=d.safeInv(p[5]-p[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(f[0]),e.snapPickCoordinateScale[1]=d.safeInv(f[1]),e.snapPickCoordinateScale[2]=d.safeInv(f[2]),l||0!==c[0]||0!==c[1]||0!==c[2]){const t=Nl;if(l){const e=d.transformPoint3(u,l,xl);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=c[0],t[1]+=c[1],t[2]+=c[2],I=z(A,t,Ll),e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else I=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,f),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible);let m=0;this._matricesUniformBlockBufferData.set(h,0),this._matricesUniformBlockBufferData.set(I,m+=16),this._matricesUniformBlockBufferData.set(r.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1),a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}_allocate(){super._allocate();const e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}_bindProgram(){this._program.bind()}_buildVertexShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];return s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("in vec3 position;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("in float flags;"),s.push("in vec4 modelMatrixCol0;"),s.push("in vec4 modelMatrixCol1;"),s.push("in vec4 modelMatrixCol2;"),s.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(s),s.push("uniform vec2 snapVectorA;"),s.push("uniform vec2 snapInvVectorAB;"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),s.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out float vFlags;")),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int pickFlag = int(flags) >> 12 & 0xF;"),s.push("if (pickFlag != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push("} else {"),s.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),s.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags = flags;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// SnapInstancingDepthRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int layerNumber;"),s.push("uniform vec3 coordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(let t=0;t> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push("}")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Fl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new wl(this._scene,!1)),this._colorRenderer}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new gl(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new Dl(this._scene)),this._depthRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new El(this._scene)),this._pickMeshRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Tl(this._scene)),this._pickDepthRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new bl(this._scene)),this._occlusionRenderer}get shadowRenderer(){return this._shadowRenderer||(this._shadowRenderer=new Pl(this._scene)),this._shadowRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Ol(this._scene,!1)),this._snapInitRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Ml(this._scene)),this._snapRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}const Hl={};const Ul=new Uint8Array(4),Gl=new Float32Array(1),jl=new Float32Array(3),Vl=new Float32Array(4);class kl{constructor(e){console.info("VBOInstancingPointsLayer"),this.model=e.model,this.material=e.material,this.sortId="PointsInstancingLayer",this.layerIndex=e.layerIndex,this._renderers=function(e){const t=e.id;let s=Hl[t];return s||(s=new Fl(e),Hl[t]=s,s._compile(),e.on("compile",(()=>{s._compile()})),e.on("destroyed",(()=>{delete Hl[t],s._destroy()}))),s}(e.model.scene),this._aabb=d.collapseAABB3(),this._state=new at({obb:d.OBB3(),numInstances:0,origin:e.origin?d.vec3(e.origin):null,geometry:e.geometry,positionsDecodeMatrix:e.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=e.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e0){let n=!1;s.flagsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,n)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){const t=!1;s.offsetsBuf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,t),this._offsets=[]}if(n.positionsCompressed&&n.positionsCompressed.length>0){const t=!1;s.positionsBuf=new Ge(e,e.ARRAY_BUFFER,n.positionsCompressed,n.positionsCompressed.length,3,e.STATIC_DRAW,t),s.positionsDecodeMatrix=d.mat4(n.positionsDecodeMatrix)}if(n.colorsCompressed&&n.colorsCompressed.length>0){const t=new Uint8Array(n.colorsCompressed),i=!1;s.colorsBuf=new Ge(e,e.ARRAY_BUFFER,t,t.length,4,e.STATIC_DRAW,i)}if(this._modelMatrixCol0.length>0){const t=!1;s.modelMatrixCol0Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,t),s.modelMatrixCol1Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,t),s.modelMatrixCol2Buf=new Ge(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,t),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){const t=!1;s.pickColorsBuf=new Ge(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,t),this._pickColors=[]}s.geometry=null,this._finalized=!0}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,s)}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){if(!this._finalized)throw"Not finalized";Ul[0]=t[0],Ul[1]=t[1],Ul[2]=t[2],this._state.colorsBuf.setData(Ul,3*e)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s){if(!this._finalized)throw"Not finalized";const n=!!(t&J),i=!!(t&se),r=!!(t&ne),a=!!(t&ie),o=!!(t&re),l=!!(t&$),c=!!(t&Z);let u,h;u=!n||c||i||r&&!this.model.scene.highlightMaterial.glowThrough||a&&!this.model.scene.selectedMaterial.glowThrough?dr.NOT_RENDERED:s?dr.COLOR_TRANSPARENT:dr.COLOR_OPAQUE,h=!n||c?dr.NOT_RENDERED:a?dr.SILHOUETTE_SELECTED:r?dr.SILHOUETTE_HIGHLIGHTED:i?dr.SILHOUETTE_XRAYED:dr.NOT_RENDERED;let p=0;p=!n||c?dr.NOT_RENDERED:a?dr.EDGES_SELECTED:r?dr.EDGES_HIGHLIGHTED:i?dr.EDGES_XRAYED:o?s?dr.EDGES_COLOR_TRANSPARENT:dr.EDGES_COLOR_OPAQUE:dr.NOT_RENDERED;let d=0;d|=u,d|=h<<4,d|=p<<8,d|=(n&&!c&&l?dr.PICK:dr.NOT_RENDERED)<<12,d|=(t&ee?255:0)<<16,Gl[0]=d,this._state.flagsBuf.setData(Gl,e)}setOffset(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(jl[0]=t[0],jl[1]=t[1],jl[2]=t[2],this._state.offsetsBuf.setData(jl,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}setMatrix(e,t){if(!this._finalized)throw"Not finalized";const s=4*e;Vl[0]=t[0],Vl[1]=t[4],Vl[2]=t[8],Vl[3]=t[12],this._state.modelMatrixCol0Buf.setData(Vl,s),Vl[0]=t[1],Vl[1]=t[5],Vl[2]=t[9],Vl[3]=t[13],this._state.modelMatrixCol1Buf.setData(Vl,s),Vl[0]=t[2],Vl[1]=t[6],Vl[2]=t[10],Vl[3]=t[14],this._state.modelMatrixCol2Buf.setData(Vl,s)}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_XRAYED)}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_HIGHLIGHTED)}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_SELECTED)}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawShadow(e,t){}drawPickMesh(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,dr.PICK)}drawPickDepths(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,dr.PICK)}drawPickNormals(e,t){}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,dr.PICK)}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,dr.PICK)}destroy(){const e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}const Ql=d.vec3(),Wl=d.vec3(),zl=d.mat4();class Kl{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uPerObjectDecodeMatrix,this._uPerVertexPosition,this.uPerObjectColorAndFlags,this._uPerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Ql;if(I){const t=d.transformPoint3(h,c,Wl);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,zl)}else f=A;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,8),a.drawArrays(a.LINES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,16),a.drawArrays(a.LINES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,32),a.drawArrays(a.LINES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// LinesDataTextureColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uPerObjectDecodeMatrix;"),s.push("uniform highp sampler2D uPerObjectMatrix;"),s.push("uniform lowp usampler2D uPerObjectColorAndFlags;"),s.push("uniform mediump usampler2D uPerVertexPosition;"),s.push("uniform highp usampler2D uPerLineIndices;"),s.push("uniform mediump usampler2D uPerLineObject;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push(" int lineIndex = gl_VertexID / 2;"),s.push(" int h_packed_object_id_index = (lineIndex >> 3) & 4095;"),s.push(" int v_packed_object_id_index = (lineIndex >> 3) >> 12;"),s.push(" int objectIndex = int(texelFetch(uPerLineObject, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push(" ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" } else {"),s.push(" ivec4 packedVertexBase = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push(" ivec4 packedLineIndexBaseOffset = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push(" int lineIndexBaseOffset = (packedLineIndexBaseOffset.r << 24) + (packedLineIndexBaseOffset.g << 16) + (packedLineIndexBaseOffset.b << 8) + packedLineIndexBaseOffset.a;"),s.push(" int h_index = (lineIndex - lineIndexBaseOffset) & 4095;"),s.push(" int v_index = (lineIndex - lineIndexBaseOffset) >> 12;"),s.push(" ivec3 vertexIndices = ivec3(texelFetch(uPerLineIndices, ivec2(h_index, v_index), 0));"),s.push(" ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push(" int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push(" int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push(" mat4 objectInstanceMatrix = mat4 (texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push(" vec3 position = vec3(texelFetch(uPerVertexPosition, ivec2(indexPositionH, indexPositionV), 0));"),s.push(" uvec4 color = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push(" if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push(" };"),s.push(" vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push(" vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push(" vFragDepth = 1.0 + clipPos.w;"),s.push(" isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push(" gl_Position = clipPos;"),s.push(" vec4 rgb = vec4(color.rgba);"),s.push(" vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState,s=t.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// LinesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class Yl{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null)}eagerCreateRenders(){}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Kl(this._scene,!1)),this._colorRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy()}}const Xl={};class ql{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perLineNumberPortionId8Bits=[],this.perLineNumberPortionId16Bits=[],this.perLineNumberPortionId32Bits=[]}}class Jl{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerLineIdPortionIds8Bits=null,this.texturePerLineIdPortionIds16Bits=null,this.texturePerLineIdPortionIds32Bits=null,this.texturePerLineIdIndices8Bits=null,this.texturePerLineIdIndices16Bits=null,this.texturePerLineIdIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerLineIdIndices8Bits,16:this.texturePerLineIdIndices16Bits,32:this.texturePerLineIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerLineIdPortionIds8Bits,16:this.texturePerLineIdPortionIds16Bits,32:this.texturePerLineIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindLineIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}}class Zl{constructor(e,t,s,n,i=null){this._gl=e,this._texture=t,this._textureWidth=s,this._textureHeight=n,this._textureData=i}bindTexture(e,t,s){return e.bindTexture(t,this,s)}bind(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}unbind(e){}}const $l={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalLines:0,totalLines8Bits:0,totalLines16Bits:0,totalLines32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify($l,null,4));let e=0;Object.keys($l).forEach((t=>{t.startsWith("size")&&(e+=$l[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/$l.totalLines).toFixed(2)}`);let t={};Object.keys($l).forEach((s=>{s.startsWith("size")&&(t[s]=`${($l[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class ec{disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}generateTextureForColorsAndFlags(e,t,s,n,i){const r=t.length;this.numPortions=r;const a=4096,o=Math.ceil(r/512);if(0===o)throw"texture height===0";const l=new Uint8Array(16384*o);$l.sizeDataColorsAndFlags+=l.byteLength,$l.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),l.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20);const c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,a,o),e.texSubImage2D(e.TEXTURE_2D,0,0,0,a,o,e.RGBA_INTEGER,e.UNSIGNED_BYTE,l,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,c,a,o,l)}generateTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);$l.sizeDataTextureOffsets+=i.byteLength,$l.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,r,s,n,i)}generateTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);$l.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete Xl[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new ql,this._dataTextureState=new Jl,this._dataTextureGenerator=new ec,this._state=new at({origin:d.vec3(t.origin),textureState:this._dataTextureState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&$l.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/2})),(this._state.numVertices+n>4096*sc||t+i>4096*sc)&&$l.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*sc&&t+i<=4096*sc}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/2/8)*2;$l.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}const s=t.positionsCompressed,n=t.indices,i=this._buffer;i.positionsCompressed.push(s);const r=i.lenPositionsCompressed/3,a=s.length/3;let o;i.lenPositionsCompressed+=s.length;let l=0;if(n){let e;l=n.length/2,a<=256?(e=i.indices8Bits,o=i.lenIndices8Bits/2,i.lenIndices8Bits+=n.length):a<=65536?(e=i.indices16Bits,o=i.lenIndices16Bits/2,i.lenIndices16Bits+=n.length):(e=i.indices32Bits,o=i.lenIndices32Bits/2,i.lenIndices32Bits+=n.length),e.push(n)}this._state.numVertices+=a,$l.numberOfGeometries++;return{vertexBase:r,numVertices:a,numLines:l,indicesBase:o}}_createSubPortion(e,t){const s=e.color,n=e.colors,i=e.opacity,r=e.meshMatrix,a=e.pickColor,o=this._buffer,l=this._state;o.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),o.perObjectInstancePositioningMatrices.push(r||oc),o.perObjectSolid.push(!!e.solid),n?o.perObjectColors.push([255*n[0],255*n[1],255*n[2],255]):s&&o.perObjectColors.push([s[0],s[1],s[2],i]),o.perObjectPickColors.push(a),o.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?l.numIndices8Bits:t.numVertices<=65536?l.numIndices16Bits:l.numIndices32Bits,o.perObjectIndexBaseOffsets.push(e/2-t.indicesBase)}const c=this._subPortions.length;if(t.numLines>0){let e,s=2*t.numLines;t.numVertices<=256?(e=o.perLineNumberPortionId8Bits,l.numIndices8Bits+=s,$l.totalLines8Bits+=t.numLines):t.numVertices<=65536?(e=o.perLineNumberPortionId16Bits,l.numIndices16Bits+=s,$l.totalLines16Bits+=t.numLines):(e=o.perLineNumberPortionId32Bits,l.numIndices32Bits+=s,$l.totalLines32Bits+=t.numLines),$l.totalLines+=t.numLines;for(let s=0;s0&&(t.texturePerLineIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerLineIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerLineIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,ic))}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),h.bindTexture(h.TEXTURE_2D,u.texturePerObjectColorsAndFlags._texture),h.texSubImage2D(h.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,h.RGBA_INTEGER,h.UNSIGNED_BYTE,ic))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,ic))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,rc))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,nc))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE)}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT)}drawDepth(e,t){}drawNormals(e,t){}drawSilhouetteXRayed(e,t){}drawSilhouetteHighlighted(e,t){}drawSilhouetteSelected(e,t){}drawEdgesColorOpaque(e,t){}drawEdgesColorTransparent(e,t){}drawEdgesHighlighted(e,t){}drawEdgesSelected(e,t){}drawEdgesXRayed(e,t){}drawOcclusion(e,t){}drawShadow(e,t){}setPickMatrices(e,t){}drawPickMesh(e,t){}drawPickDepths(e,t){}drawSnapInit(e,t){}drawSnap(e,t){}drawPickNormals(e,t){}destroy(){if(this._destroyed)return;const e=this._state;this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}const cc=d.vec3(),uc=d.vec3(),hc=d.vec3();d.vec3();const pc=d.vec4(),dc=d.mat4();class Ac{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=cc;if(I){const t=d.transformPoint3(h,c,uc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(i.viewMatrix,e,dc),f=hc,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl,s=e._lightsState;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);const n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uLightAmbient=n.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];const i=s.lights;let r;for(let e=0,t=i.length;e0;let i;const r=[];r.push("#version 300 es"),r.push("// TrianglesDataTextureColorRenderer vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("precision highp usampler2D;"),r.push("precision highp isampler2D;"),r.push("precision highp sampler2D;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("precision mediump usampler2D;"),r.push("precision mediump isampler2D;"),r.push("precision mediump sampler2D;"),r.push("#endif"),r.push("uniform int renderPass;"),r.push("uniform mat4 sceneModelMatrix;"),r.push("uniform mat4 viewMatrix;"),r.push("uniform mat4 projMatrix;"),r.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),r.push("uniform highp sampler2D uTexturePerObjectMatrix;"),r.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),r.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),r.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),r.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),r.push("uniform vec3 uCameraEyeRtc;"),r.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;"),r.push("out float isPerspective;")),r.push("bool isPerspectiveMatrix(mat4 m) {"),r.push(" return (m[2][3] == - 1.0);"),r.push("}"),r.push("uniform vec4 lightAmbient;");for(let e=0,t=s.lights.length;e> 3) & 4095;"),r.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),r.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),r.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),r.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),r.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),r.push("if (int(flags.x) != renderPass) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("} else {"),r.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),r.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),r.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),r.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),r.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),r.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),r.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),r.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),r.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),r.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),r.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),r.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),r.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),r.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),r.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),r.push("if (color.a == 0u) {"),r.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),r.push(" return;"),r.push("};"),r.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),r.push("vec3 position;"),r.push("position = positions[gl_VertexID % 3];"),r.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),r.push("if (solid != 1u) {"),r.push("if (isPerspectiveMatrix(projMatrix)) {"),r.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),r.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("} else {"),r.push("if (viewNormal.z < 0.0) {"),r.push("position = positions[2 - (gl_VertexID % 3)];"),r.push("viewNormal = -viewNormal;"),r.push("}"),r.push("}"),r.push("}"),r.push("vec4 worldPosition = sceneModelMatrix * ((objectDecodeAndInstanceMatrix * vec4(position, 1.0))); "),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),r.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),r.push("float lambertian = 1.0;");for(let e=0,t=s.lights.length;e0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),this._withSAO&&(n.push("uniform sampler2D uOcclusionTexture;"),n.push("uniform vec4 uSAOParams;"),n.push("const float packUpscale = 256. / 255.;"),n.push("const float unpackDownScale = 255. / 256.;"),n.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),n.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),n.push("float unpackRGBToFloat( const in vec4 v ) {"),n.push(" return dot( v, unPackFactors );"),n.push("}")),s){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(let e=0,s=t.getNumAllocatedSectionPlanes();e 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(n.push(" float viewportWidth = uSAOParams[0];"),n.push(" float viewportHeight = uSAOParams[1];"),n.push(" float blendCutoff = uSAOParams[2];"),n.push(" float blendFactor = uSAOParams[3];"),n.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),n.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),n.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):n.push(" outColor = vColor;"),n.push("}"),n}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const fc=new Float32Array([1,1,1]),Ic=d.vec3(),mc=d.vec3(),yc=d.vec3();d.vec3();const vc=d.mat4();class wc{constructor(e,t){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r,A=i.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=Ic;if(c){const t=mc;d.transformPoint3(h,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,vc),I=yc,I[0]=i.eye[0]-e[0],I[1]=i.eye[1]-e[1],I[2]=i.eye[2]-e[2]}else f=A,I=i.eye;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s===dr.SILHOUETTE_XRAYED){const e=n.xrayMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.SILHOUETTE_HIGHLIGHTED){const e=n.highlightMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.SILHOUETTE_SELECTED){const e=n.selectedMaterial._state,t=e.fillColor,s=e.fillAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,fc);if(n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=n._sectionPlanesState.getNumAllocatedSectionPlanes(),y=n._sectionPlanesState.sectionPlanes.length;if(m>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture silhouette vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.y) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = color;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const gc=new Float32Array([0,0,0,1]),Ec=d.vec3(),Tc=d.vec3();d.vec3();const bc=d.mat4();class Dc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Ec;if(I){const t=d.transformPoint3(h,c,Tc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,bc)}else f=A;if(a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),s===dr.EDGES_XRAYED){const e=i.xrayMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.EDGES_HIGHLIGHTED){const e=i.highlightMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else if(s===dr.EDGES_SELECTED){const e=i.selectedMaterial._state,t=e.edgeColor,s=e.edgeAlpha;a.uniform4f(this._uColor,t[0],t[1],t[2],s)}else a.uniform4fv(this._uColor,gc);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uColor=s.getLocation("color"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uWorldMatrix=s.getLocation("worldMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("mat4 matrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vColor = vec4(color.r, color.g, color.b, color.a);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesEdgesRenderer fragment shader"),e.logarithmicDepthBufferEnabled&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Pc=d.vec3(),Cc=d.vec3(),_c=d.mat4();class Rc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=r.viewMatrix;if(!this._program&&(this._allocate(),this.errors))return;let f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Pc;if(I){const t=d.transformPoint3(h,c,Cc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,_c)}else f=A;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(a.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(a.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(a.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled,s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uObjectPerObjectOffsets;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;")),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vColor;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.z) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push("vec4 rgb = vec4(color.rgba);"),s.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureEdgesColorRenderer"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { discard; }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outColor = vColor;"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Bc=d.vec3(),Oc=d.vec3(),Sc=d.vec3(),Nc=d.mat4();class xc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(t),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n;let A,f;l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=Bc;if(I){const t=d.transformPoint3(h,c,Oc);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(r.viewMatrix,e,Nc),f=Sc,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=r.viewMatrix,f=r.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),i.logarithmicDepthBufferEnabled){const e=2/(Math.log(r.project.far+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,e)}const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry picking vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("smooth out vec4 vWorldPosition;"),s.push("flat out uvec4 vFlags2;")),s.push("out vec4 vPickColor;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry picking fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uvec4 vFlags2;");for(var n=0;n 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" outPickColor = vPickColor; "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Lc=d.vec3(),Mc=d.vec3(),Fc=d.vec3();d.vec3();const Hc=d.mat4();class Uc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=e.pickViewMatrix||r.viewMatrix;let f,I;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const t=Lc;if(c){const e=Mc;d.transformPoint3(h,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],f=z(A,t,Hc),I=Fc,I[0]=r.eye[0]-t[0],I[1]=r.eye[1]-t[1],I[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else f=A,I=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniform1f(this._uPickZNear,e.pickZNear),a.uniform1f(this._uPickZFar,e.pickZFar),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),i.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform bool pickInvisible;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = remapClipPos(clipPos);"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform float pickZNear;"),s.push("uniform float pickZFar;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(var n=0;n 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),s.push(" outPackedDepth = packDepth(zNormalizedDepth); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Gc=d.vec3(),jc=d.vec3(),Vc=d.vec3(),kc=d.vec3();d.vec3();const Qc=d.mat4();class Wc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){if(!this._program&&(this._allocate(),this.errors))return;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=Gc;let m,y;I[0]=d.safeInv(A[3]-A[0])*d.MAX_INT,I[1]=d.safeInv(A[4]-A[1])*d.MAX_INT,I[2]=d.safeInv(A[5]-A[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(I[0]),e.snapPickCoordinateScale[1]=d.safeInv(I[1]),e.snapPickCoordinateScale[2]=d.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=jc;if(v){const e=d.transformPoint3(h,c,Vc);t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=z(f,t,Qc),y=kc,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),a.drawArrays(T,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),a.drawArrays(T,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),a.drawArrays(T,0,o.numEdgeIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Batched geometry edges drawing vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),s.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uSnapVectorA;"),s.push("uniform vec2 uSnapInvVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),s.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("out vec4 vViewPosition;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int edgeIndex = gl_VertexID / 2;"),s.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),s.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),s.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),s.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),s.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2.r;")),s.push("vViewPosition = viewPosition;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vViewPosition = clipPos;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push("gl_PointSize = 1.0;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture pick depth fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const zc=d.vec3(),Kc=d.vec3(),Yc=d.vec3(),Xc=d.vec3();d.vec3();const qc=d.mat4();class Jc{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=t.aabb,f=e.pickViewMatrix||r.viewMatrix,I=zc;let m,y;I[0]=d.safeInv(A[3]-A[0])*d.MAX_INT,I[1]=d.safeInv(A[4]-A[1])*d.MAX_INT,I[2]=d.safeInv(A[5]-A[2])*d.MAX_INT,e.snapPickCoordinateScale[0]=d.safeInv(I[0]),e.snapPickCoordinateScale[1]=d.safeInv(I[1]),e.snapPickCoordinateScale[2]=d.safeInv(I[2]),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const v=0!==c[0]||0!==c[1]||0!==c[2],w=0!==u[0]||0!==u[1]||0!==u[2];if(v||w){const t=Kc;if(v){const e=Yc;d.transformPoint3(h,c,e),t[0]=e[0],t[1]=e[1],t[2]=e[2]}else t[0]=0,t[1]=0,t[2]=0;t[0]+=u[0],t[1]+=u[1],t[2]+=u[2],m=z(f,t,qc),y=Xc,y[0]=r.eye[0]-t[0],y[1]=r.eye[1]-t[1],y[2]=r.eye[2]-t[2],e.snapPickOrigin[0]=t[0],e.snapPickOrigin[1]=t[1],e.snapPickOrigin[2]=t[2]}else m=f,y=r.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform3fv(this._uCameraEyeRtc,y),a.uniform2fv(this._uVectorA,e.snapVectorA),a.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,I),a.uniform1i(this._uRenderPass,s),a.uniform1i(this._uPickInvisible,e.pickInvisible),a.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,m),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);{const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const g=i._sectionPlanesState.getNumAllocatedSectionPlanes(),E=i._sectionPlanesState.sectionPlanes.length;if(g>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*E,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("uniform vec2 uVectorAB;"),s.push("uniform vec2 uInverseVectorAB;"),s.push("vec3 positions[3];"),s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("vec2 remapClipPos(vec2 clipPos) {"),s.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),s.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),s.push(" return vec2(x, y);"),s.push("}"),s.push("flat out vec4 vPickColor;"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("out highp vec3 relativeToOriginPosition;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("{"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" } else {"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" viewNormal = -viewNormal;"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("relativeToOriginPosition = worldPosition.xyz;"),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));"),s.push("vec4 clipPos = projMatrix * viewPosition;"),s.push("float tmp = clipPos.w;"),s.push("clipPos.xyzw /= tmp;"),s.push("clipPos.xy = remapClipPos(clipPos.xy);"),s.push("clipPos.xyzw *= tmp;"),s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// DTXTrianglesSnapInitRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"),s.push("uniform int uLayerNumber;"),s.push("uniform vec3 uCoordinateScaler;"),s.push("in vec4 vWorldPosition;"),s.push("flat in vec4 vPickColor;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return s.push(" float dx = dFdx(vFragDepth);"),s.push(" float dy = dFdy(vFragDepth);"),s.push(" float diff = sqrt(dx*dx+dy*dy);"),s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),s.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),s.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(`outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("outPickColor = uvec4(vPickColor);"),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const Zc=d.vec3(),$c=d.vec3(),eu=d.vec3();d.vec3();const tu=d.mat4();class su{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=n,A=e.pickViewMatrix||r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let f,I;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),c||0!==u[0]||0!==u[1]||0!==u[2]){const e=Zc;if(c){const t=$c;d.transformPoint3(h,c,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],f=z(A,e,tu),I=eu,I[0]=r.eye[0]-e[0],I[1]=r.eye[1]-e[1],I[2]=r.eye[2]-e[2]}else f=A,I=r.eye;a.uniform3fv(this._uCameraEyeRtc,I),a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,f),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix);const m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),y=i._sectionPlanesState.sectionPlanes.length;if(m>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*y,r=n.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uWorldMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// TrianglesDataTextureOcclusionRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("if (solid != 1u) {"),s.push(" if (isPerspectiveMatrix(projMatrix)) {"),s.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" } else {"),s.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push(" if (viewNormal.z < 0.0) {"),s.push(" position = positions[2 - (gl_VertexID % 3)];"),s.push(" }"),s.push(" }"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTextureColorRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0;t 0.0) { discard; }"),s.push(" }")}return s.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const nu=d.vec3(),iu=d.vec3(),ru=d.vec3();d.vec3();const au=d.mat4();class ou{constructor(e){this._scene=e,this._allocate(),this._hash=this._getHash()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=nu;if(I){const t=d.transformPoint3(h,c,iu);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(i.viewMatrix,e,au),f=ru,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPositionsDecodeMatrix=s.getLocation("objectDecodeAndInstanceMatrix"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// Triangles dataTexture draw vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out highp vec2 vHighPrecisionZW;"),t&&(s.push("out vec4 vWorldPosition;"),s.push("flat out uint vFlags2;")),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(s.push("vWorldPosition = worldPosition;"),s.push("vFlags2 = flags2.r;")),s.push("gl_Position = clipPos;"),s.push("vHighPrecisionZW = gl_Position.zw;"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Triangles dataTexture draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),s.push("in highp vec2 vHighPrecisionZW;"),s.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),s.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const lu=d.vec3(),cu=d.vec3(),uu=d.vec3();d.vec3();const hu=d.mat4();class pu{constructor(e){this._scene=e,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){return this._scene._sectionPlanesState.getHash()}drawLayer(e,t,s){const n=t.model,i=n.scene,r=i.camera,a=i.canvas.gl,o=t._state,l=t._state.origin,{position:c,rotationMatrix:u,rotationMatrixConjugate:h}=n,p=r.viewMatrix;if(!this._program&&(this._allocate(t),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));const I=0!==l[0]||0!==l[1]||0!==l[2],m=0!==c[0]||0!==c[1]||0!==c[2];if(I||m){const e=lu;if(I){const t=cu;d.transformPoint3(u,l,t),e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=c[0],e[1]+=c[1],e[2]+=c[2],A=z(p,e,hu),f=uu,f[0]=r.eye[0]-e[0],f[1]=r.eye[1]-e[1],f[2]=r.eye[2]-e[2]}else A=p,f=r.eye;a.uniform1i(this._uRenderPass,s),a.uniformMatrix4fv(this._uWorldMatrix,!1,h),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,r.projMatrix),a.uniformMatrix4fv(this._uViewNormalMatrix,!1,r.viewNormalMatrix),a.uniformMatrix4fv(this._uWorldNormalMatrix,!1,n.worldNormalMatrix);const y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),v=i._sectionPlanesState.sectionPlanes.length;if(y>0){const e=i._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,r=n.renderFlags;for(let t=0;t0,s=[];return s.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("uniform int renderPass;"),s.push("attribute vec3 position;"),e.entityOffsetsEnabled&&s.push("attribute vec3 offset;"),s.push("attribute vec3 normal;"),s.push("attribute vec4 color;"),s.push("attribute vec4 flags;"),s.push("attribute vec4 flags2;"),s.push("uniform mat4 worldMatrix;"),s.push("uniform mat4 worldNormalMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform mat4 viewNormalMatrix;"),s.push("uniform mat4 objectDecodeAndInstanceMatrix;"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("varying float isPerspective;")),s.push("vec3 octDecode(vec2 oct) {"),s.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),s.push(" if (v.z < 0.0) {"),s.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),s.push(" }"),s.push(" return normalize(v);"),s.push("}"),t&&(s.push("out vec4 vWorldPosition;"),s.push("out vec4 vFlags2;")),s.push("out vec3 vViewNormal;"),s.push("void main(void) {"),s.push("if (int(flags.x) != renderPass) {"),s.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),s.push(" } else {"),s.push(" vec4 worldPosition = worldMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix * worldPosition; "),s.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),s.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(s.push(" vWorldPosition = worldPosition;"),s.push(" vFlags2 = flags2;")),s.push(" vViewNormal = viewNormal;"),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(Be.SUPPORTED_EXTENSIONS.EXT_frag_depth?s.push("vFragDepth = 1.0 + clipPos.w;"):(s.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),s.push("clipPos.z *= clipPos.w;")),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("gl_Position = clipPos;"),s.push(" }"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push("#extension GL_EXT_frag_depth : enable"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),t){s.push("in vec4 vWorldPosition;"),s.push("in vec4 vFlags2;");for(let t=0;t 0.0);"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var n=0;n 0.0) { discard; }"),s.push(" }")}return e.logarithmicDepthBufferEnabled&&Be.SUPPORTED_EXTENSIONS.EXT_frag_depth&&s.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}const du=d.vec3(),Au=d.vec3(),fu=d.vec3();d.vec3(),d.vec4();const Iu=d.mat4();class mu{constructor(e,t){this._scene=e,this._withSAO=t,this._hash=this._getHash(),this._allocate()}getValid(){return this._hash===this._getHash()}_getHash(){const e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}drawLayer(e,t,s){const n=this._scene,i=n.camera,r=t.model,a=n.canvas.gl,o=t._state,l=o.textureState,c=t._state.origin,{position:u,rotationMatrix:h,rotationMatrixConjugate:p}=r;if(!this._program&&(this._allocate(),this.errors))return;let A,f;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);const I=0!==c[0]||0!==c[1]||0!==c[2],m=0!==u[0]||0!==u[1]||0!==u[2];if(I||m){const e=du;if(I){const t=d.transformPoint3(h,c,Au);e[0]=t[0],e[1]=t[1],e[2]=t[2]}else e[0]=0,e[1]=0,e[2]=0;e[0]+=u[0],e[1]+=u[1],e[2]+=u[2],A=z(i.viewMatrix,e,Iu),f=fu,f[0]=i.eye[0]-e[0],f[1]=i.eye[1]-e[1],f[2]=i.eye[2]-e[2]}else A=i.viewMatrix,f=i.eye;if(a.uniform2fv(this._uPickClipPos,e.pickClipPos),a.uniform2f(this._uDrawingBufferSize,a.drawingBufferWidth,a.drawingBufferHeight),a.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),a.uniformMatrix4fv(this._uViewMatrix,!1,A),a.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),a.uniform3fv(this._uCameraEyeRtc,f),a.uniform1i(this._uRenderPass,s),n.logarithmicDepthBufferEnabled){const t=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,t)}const y=n._sectionPlanesState.getNumAllocatedSectionPlanes(),v=n._sectionPlanesState.sectionPlanes.length;if(y>0){const e=n._sectionPlanesState.sectionPlanes,s=t.layerIndex*v,i=r.renderFlags;for(let t=0;t0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),a.drawArrays(a.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),a.drawArrays(a.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),a.drawArrays(a.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}_allocate(){const e=this._scene,t=e.canvas.gl;if(this._program=new Ue(t,this._buildShader()),this._program.errors)return void(this.errors=this._program.errors);const s=this._program;this._uRenderPass=s.getLocation("renderPass"),this._uPickInvisible=s.getLocation("pickInvisible"),this._uPickClipPos=s.getLocation("pickClipPos"),this._uDrawingBufferSize=s.getLocation("drawingBufferSize"),this._uSceneModelMatrix=s.getLocation("sceneModelMatrix"),this._uViewMatrix=s.getLocation("viewMatrix"),this._uProjMatrix=s.getLocation("projMatrix"),this._uSectionPlanes=[];for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t0,s=[];return s.push("#version 300 es"),s.push("// trianglesDatatextureNormalsRenderer vertex shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("precision highp usampler2D;"),s.push("precision highp isampler2D;"),s.push("precision highp sampler2D;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("precision mediump usampler2D;"),s.push("precision mediump isampler2D;"),s.push("precision mediump sampler2D;"),s.push("#endif"),s.push("uniform int renderPass;"),e.entityOffsetsEnabled&&s.push("in vec3 offset;"),s.push("uniform mat4 sceneModelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),s.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),s.push("uniform highp sampler2D uTexturePerObjectMatrix;"),s.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),s.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),s.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),s.push("uniform vec3 uCameraEyeRtc;"),s.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("out float isPerspective;")),s.push("uniform vec2 pickClipPos;"),s.push("uniform vec2 drawingBufferSize;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out vec4 vWorldPosition;"),t&&s.push("flat out uint vFlags2;"),s.push("void main(void) {"),s.push("int polygonIndex = gl_VertexID / 3;"),s.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),s.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),s.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),s.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),s.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),s.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),s.push("if (int(flags.w) != renderPass) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("} else {"),s.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),s.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),s.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),s.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),s.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),s.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),s.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),s.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),s.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),s.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),s.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),s.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),s.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),s.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),s.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),s.push("if (color.a == 0u) {"),s.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),s.push(" return;"),s.push("};"),s.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),s.push("vec3 position;"),s.push("position = positions[gl_VertexID % 3];"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (solid != 1u) {"),s.push("if (isPerspectiveMatrix(projMatrix)) {"),s.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),s.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("viewNormal = -viewNormal;"),s.push("}"),s.push("} else {"),s.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),s.push("if (viewNormal.z < 0.0) {"),s.push("position = positions[2 - (gl_VertexID % 3)];"),s.push("}"),s.push("}"),s.push("}"),s.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),s.push("vec4 viewPosition = viewMatrix * worldPosition; "),s.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),s.push("vWorldPosition = worldPosition;"),t&&s.push("vFlags2 = flags2.r;"),s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s.push("}"),s}_buildFragmentShader(){const e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("in vec4 vWorldPosition;"),t){s.push("flat in uint vFlags2;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0u;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(let t=0,n=e._sectionPlanesState.getNumAllocatedSectionPlanes();t 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}return e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),s.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),s.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),s.push(` outNormal = ivec4(worldNormal * float(${d.MAX_INT}), 1.0);`),s.push("}"),s}webglContextRestored(){this._program=null}destroy(){this._program&&this._program.destroy(),this._program=null}}class yu{constructor(e){this._scene=e}_compile(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}eagerCreateRenders(){this._silhouetteRenderer||(this._silhouetteRenderer=new wc(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new xc(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new Uc(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new mu(this._scene)),this._snapRenderer||(this._snapRenderer=new Wc(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Jc(this._scene)),this._snapRenderer||(this._snapRenderer=new Wc(this._scene))}get colorRenderer(){return this._colorRenderer||(this._colorRenderer=new Ac(this._scene,!1)),this._colorRenderer}get colorRendererWithSAO(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new Ac(this._scene,!0)),this._colorRendererWithSAO}get colorQualityRendererWithSAO(){return this._colorQualityRendererWithSAO}get silhouetteRenderer(){return this._silhouetteRenderer||(this._silhouetteRenderer=new wc(this._scene)),this._silhouetteRenderer}get depthRenderer(){return this._depthRenderer||(this._depthRenderer=new ou(this._scene)),this._depthRenderer}get normalsRenderer(){return this._normalsRenderer||(this._normalsRenderer=new pu(this._scene)),this._normalsRenderer}get edgesRenderer(){return this._edgesRenderer||(this._edgesRenderer=new Dc(this._scene)),this._edgesRenderer}get edgesColorRenderer(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Rc(this._scene)),this._edgesColorRenderer}get pickMeshRenderer(){return this._pickMeshRenderer||(this._pickMeshRenderer=new xc(this._scene)),this._pickMeshRenderer}get pickNormalsRenderer(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new mu(this._scene)),this._pickNormalsRenderer}get pickNormalsFlatRenderer(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new mu(this._scene)),this._pickNormalsFlatRenderer}get pickDepthRenderer(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Uc(this._scene)),this._pickDepthRenderer}get snapRenderer(){return this._snapRenderer||(this._snapRenderer=new Wc(this._scene)),this._snapRenderer}get snapInitRenderer(){return this._snapInitRenderer||(this._snapInitRenderer=new Jc(this._scene)),this._snapInitRenderer}get occlusionRenderer(){return this._occlusionRenderer||(this._occlusionRenderer=new su(this._scene)),this._occlusionRenderer}_destroy(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}const vu={};class wu{constructor(){this.positionsCompressed=[],this.lenPositionsCompressed=0,this.metallicRoughness=[],this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.edgeIndices8Bits=[],this.lenEdgeIndices8Bits=0,this.edgeIndices16Bits=[],this.lenEdgeIndices16Bits=0,this.edgeIndices32Bits=[],this.lenEdgeIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]}}class gu{constructor(){this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}finalize(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}bindCommonTextures(e,t,s,n,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,s,2),this.texturePerObjectColorsAndFlags.bindTexture(e,n,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}bindTriangleIndicesTextures(e,t,s,n){this.indicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.indicesPerBitnessTextures[n].bindTexture(e,s,6)}bindEdgeIndicesTextures(e,t,s,n){this.edgeIndicesPortionIdsPerBitnessTextures[n].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[n].bindTexture(e,s,6)}}const Eu={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Eu,null,4));let e=0;Object.keys(Eu).forEach((t=>{t.startsWith("size")&&(e+=Eu[t])})),console.log(`Total size ${e} bytes (${(e/1e3/1e3).toFixed(2)} MB)`),console.log(`Avg bytes / triangle: ${(e/Eu.totalPolygons).toFixed(2)}`);let t={};Object.keys(Eu).forEach((s=>{s.startsWith("size")&&(t[s]=`${(Eu[s]/e*100).toFixed(2)} % of total`)})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};class Tu{constructor(){}disableBindedTextureFiltering(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}createTextureForColorsAndFlags(e,t,s,n,i,r,a){const o=t.length;this.numPortions=o;const l=4096,c=Math.ceil(o/512);if(0===c)throw"texture height===0";const u=new Uint8Array(16384*c);Eu.sizeDataColorsAndFlags+=u.byteLength,Eu.numberOfTextures++;for(let e=0;e>24&255,n[e]>>16&255,n[e]>>8&255,255&n[e]],32*e+16),u.set([i[e]>>24&255,i[e]>>16&255,i[e]>>8&255,255&i[e]],32*e+20),u.set([r[e]>>24&255,r[e]>>16&255,r[e]>>8&255,255&r[e]],32*e+24),u.set([a[e]?1:0,0,0,0],32*e+28);const h=e.createTexture();return e.bindTexture(e.TEXTURE_2D,h),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,c),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,c,e.RGBA_INTEGER,e.UNSIGNED_BYTE,u,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,h,l,c,u)}createTextureForObjectOffsets(e,t){const s=512,n=Math.ceil(t/s);if(0===n)throw"texture height===0";const i=new Float32Array(1536*n).fill(0);Eu.sizeDataTextureOffsets+=i.byteLength,Eu.numberOfTextures++;const r=e.createTexture();return e.bindTexture(e.TEXTURE_2D,r),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,s,n),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,n,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Zl(e,r,s,n,i)}createTextureForInstancingMatrices(e,t){const s=t.length;if(0===s)throw"num instance matrices===0";const n=2048,i=Math.ceil(s/512),r=new Float32Array(8192*i);Eu.numberOfTextures++;for(let e=0;e{s._compile(),s.eagerCreateRenders()})),e.on("destroyed",(()=>{delete vu[t],s._destroy()}))),s}(e.scene),this.model=e,this._buffer=new wu,this._dtxState=new gu,this._dtxTextureFactory=new Tu,this._state=new at({origin:d.vec3(t.origin),metallicRoughnessBuf:null,textureState:this._dtxState,numIndices8Bits:0,numIndices16Bits:0,numIndices32Bits:0,numEdgeIndices8Bits:0,numEdgeIndices16Bits:0,numEdgeIndices32Bits:0,numVertices:0}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._subPortions=[],this._portionToSubPortionsMap=[],this._bucketGeometries={},this._meshes=[],this._aabb=d.collapseAABB3(),this.aabbDirty=!0,this._numUpdatesInFrame=0,this._finalized=!1}get aabb(){if(this.aabbDirty){d.collapseAABB3(this._aabb);for(let e=0,t=this._meshes.length;e65536&&Eu.cannotCreatePortion.because10BitsObjectId++;let s=this._numPortions+t<=65536;const n=void 0!==e.geometryId&&null!==e.geometryId?`${e.geometryId}#0`:`${e.id}#0`;if(!this._bucketGeometries[n]){const t=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits);let n=0,i=0;e.buckets.forEach((e=>{n+=e.positionsCompressed.length/3,i+=e.indices.length/3})),(this._state.numVertices+n>4096*Du||t+i>4096*Du)&&Eu.cannotCreatePortion.becauseTextureSize++,s&&=this._state.numVertices+n<=4096*Du&&t+i<=4096*Du}return s}createPortion(e,t){if(this._finalized)throw"Already finalized";const s=[];t.buckets.forEach(((e,n)=>{const i=void 0!==t.geometryId&&null!==t.geometryId?`${t.geometryId}#${n}`:`${t.id}#${n}`;let r=this._bucketGeometries[i];r||(r=this._createBucketGeometry(t,e),this._bucketGeometries[i]=r);const a=this._createSubPortion(t,r,e);s.push(a)}));const n=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(s),this.model.numPortions++,this._meshes.push(e),n}_createBucketGeometry(e,t){if(t.indices){const e=8*Math.ceil(t.indices.length/3/8)*3;Eu.overheadSizeAlignementIndices+=2*(e-t.indices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.indices),t.indices=s}if(t.edgeIndices){const e=8*Math.ceil(t.edgeIndices.length/2/8)*2;Eu.overheadSizeAlignementEdgeIndices+=2*(e-t.edgeIndices.length);const s=new Uint32Array(e);s.fill(0),s.set(t.edgeIndices),t.edgeIndices=s}const s=t.positionsCompressed,n=t.indices,i=t.edgeIndices,r=this._buffer;r.positionsCompressed.push(s);const a=r.lenPositionsCompressed/3,o=s.length/3;let l;r.lenPositionsCompressed+=s.length;let c,u=0;if(n){let e;u=n.length/3,o<=256?(e=r.indices8Bits,l=r.lenIndices8Bits/3,r.lenIndices8Bits+=n.length):o<=65536?(e=r.indices16Bits,l=r.lenIndices16Bits/3,r.lenIndices16Bits+=n.length):(e=r.indices32Bits,l=r.lenIndices32Bits/3,r.lenIndices32Bits+=n.length),e.push(n)}let h=0;if(i){let e;h=i.length/2,o<=256?(e=r.edgeIndices8Bits,c=r.lenEdgeIndices8Bits/2,r.lenEdgeIndices8Bits+=i.length):o<=65536?(e=r.edgeIndices16Bits,c=r.lenEdgeIndices16Bits/2,r.lenEdgeIndices16Bits+=i.length):(e=r.edgeIndices32Bits,c=r.lenEdgeIndices32Bits/2,r.lenEdgeIndices32Bits+=i.length),e.push(i)}this._state.numVertices+=o,Eu.numberOfGeometries++;return{vertexBase:a,numVertices:o,numTriangles:u,numEdges:h,indicesBase:l,edgeIndicesBase:c}}_createSubPortion(e,t,s,n){const i=e.color;e.metallic,e.roughness;const r=e.colors,a=e.opacity,o=e.meshMatrix,l=e.pickColor,c=this._buffer,u=this._state;c.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),c.perObjectInstancePositioningMatrices.push(o||Bu),c.perObjectSolid.push(!!e.solid),r?c.perObjectColors.push([255*r[0],255*r[1],255*r[2],255]):i&&c.perObjectColors.push([i[0],i[1],i[2],a]),c.perObjectPickColors.push(l),c.perObjectVertexBases.push(t.vertexBase);{let e;e=t.numVertices<=256?u.numIndices8Bits:t.numVertices<=65536?u.numIndices16Bits:u.numIndices32Bits,c.perObjectIndexBaseOffsets.push(e/3-t.indicesBase)}{let e;e=t.numVertices<=256?u.numEdgeIndices8Bits:t.numVertices<=65536?u.numEdgeIndices16Bits:u.numEdgeIndices32Bits,c.perObjectEdgeIndexBaseOffsets.push(e/2-t.edgeIndicesBase)}const h=this._subPortions.length;if(t.numTriangles>0){let e,s=3*t.numTriangles;t.numVertices<=256?(e=c.perTriangleNumberPortionId8Bits,u.numIndices8Bits+=s,Eu.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(e=c.perTriangleNumberPortionId16Bits,u.numIndices16Bits+=s,Eu.totalPolygons16Bits+=t.numTriangles):(e=c.perTriangleNumberPortionId32Bits,u.numIndices32Bits+=s,Eu.totalPolygons32Bits+=t.numTriangles),Eu.totalPolygons+=t.numTriangles;for(let s=0;s0){let e,s=2*t.numEdges;t.numVertices<=256?(e=c.perEdgeNumberPortionId8Bits,u.numEdgeIndices8Bits+=s,Eu.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(e=c.perEdgeNumberPortionId16Bits,u.numEdgeIndices16Bits+=s,Eu.totalEdges16Bits+=t.numEdges):(e=c.perEdgeNumberPortionId32Bits,u.numEdgeIndices32Bits+=s,Eu.totalEdges32Bits+=t.numEdges),Eu.totalEdges+=t.numEdges;for(let s=0;s0&&(t.texturePerEdgeIdPortionIds8Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId8Bits)),n.perEdgeNumberPortionId16Bits.length>0&&(t.texturePerEdgeIdPortionIds16Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId16Bits)),n.perEdgeNumberPortionId32Bits.length>0&&(t.texturePerEdgeIdPortionIds32Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(s,n.perEdgeNumberPortionId32Bits)),n.lenIndices8Bits>0&&(t.texturePerPolygonIdIndices8Bits=this._dtxTextureFactory.createTextureFor8BitIndices(s,n.indices8Bits,n.lenIndices8Bits)),n.lenIndices16Bits>0&&(t.texturePerPolygonIdIndices16Bits=this._dtxTextureFactory.createTextureFor16BitIndices(s,n.indices16Bits,n.lenIndices16Bits)),n.lenIndices32Bits>0&&(t.texturePerPolygonIdIndices32Bits=this._dtxTextureFactory.createTextureFor32BitIndices(s,n.indices32Bits,n.lenIndices32Bits)),n.lenEdgeIndices8Bits>0&&(t.texturePerPolygonIdEdgeIndices8Bits=this._dtxTextureFactory.createTextureFor8BitsEdgeIndices(s,n.edgeIndices8Bits,n.lenEdgeIndices8Bits)),n.lenEdgeIndices16Bits>0&&(t.texturePerPolygonIdEdgeIndices16Bits=this._dtxTextureFactory.createTextureFor16BitsEdgeIndices(s,n.edgeIndices16Bits,n.lenEdgeIndices16Bits)),n.lenEdgeIndices32Bits>0&&(t.texturePerPolygonIdEdgeIndices32Bits=this._dtxTextureFactory.createTextureFor32BitsEdgeIndices(s,n.edgeIndices32Bits,n.lenEdgeIndices32Bits)),t.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(()=>{this._deferredSetFlagsDirty&&this._uploadDeferredFlags(),this._numUpdatesInFrame=0}))}isEmpty(){return 0===this._numPortions}initFlags(e,t,s){t&J&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&ne&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&se&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&ie&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&ee&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&re&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&$&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Z&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),s&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,s,true),this._setFlags2(e,t,true)}flushInitFlags(){this._setDeferredFlags(),this._setDeferredFlags2()}setVisible(e,t,s){if(!this._finalized)throw"Not finalized";t&J?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,s)}setHighlighted(e,t,s){if(!this._finalized)throw"Not finalized";t&ne?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,s)}setXRayed(e,t,s){if(!this._finalized)throw"Not finalized";t&se?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,s)}setSelected(e,t,s){if(!this._finalized)throw"Not finalized";t&ie?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,s)}setEdges(e,t,s){if(!this._finalized)throw"Not finalized";t&re?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,s)}setClippable(e,t){if(!this._finalized)throw"Not finalized";t&ee?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}_beginDeferredFlags(){this._deferredSetFlagsActive=!0}_uploadDeferredFlags(){if(this._deferredSetFlagsActive=!1,!this._deferredSetFlagsDirty)return;this._deferredSetFlagsDirty=!1;const e=this.model.scene.canvas.gl,t=this._dtxState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}setCulled(e,t,s){if(!this._finalized)throw"Not finalized";t&Z?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,s)}setCollidable(e,t){if(!this._finalized)throw"Not finalized"}setPickable(e,t,s){if(!this._finalized)throw"Not finalized";t&$?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,s)}setColor(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectColorsAndFlags._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,n.RGBA_INTEGER,n.UNSIGNED_BYTE,Cu)}setTransparent(e,t,s){s?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,s)}_setFlags(e,t,s,n=!1){const i=this._portionToSubPortionsMap[e];for(let e=0,r=i.length;e=10&&this._beginDeferredFlags(),A.bindTexture(A.TEXTURE_2D,d.texturePerObjectColorsAndFlags._texture),A.texSubImage2D(A.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,A.RGBA_INTEGER,A.UNSIGNED_BYTE,Cu))}_setDeferredFlags(){}_setFlags2(e,t,s=!1){const n=this._portionToSubPortionsMap[e];for(let e=0,i=n.length;e=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,Cu))}_setDeferredFlags2(){}setOffset(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectOffsets._texture),n.texSubImage2D(n.TEXTURE_2D,0,0,e,1,1,n.RGB,n.FLOAT,_u))}setMatrix(e,t){const s=this._portionToSubPortionsMap[e];for(let e=0,n=s.length;e=10&&this._beginDeferredFlags(),n.bindTexture(n.TEXTURE_2D,s.texturePerObjectInstanceMatrices._texture),n.texSubImage2D(n.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,n.RGBA,n.FLOAT,Pu))}drawColorOpaque(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._renderers.colorRendererWithSAO&&this._renderers.colorRendererWithSAO.drawLayer(t,this,dr.COLOR_OPAQUE):this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}_updateBackfaceCull(e,t){const s=this.model.backfaces||e.sectioned;if(t.backfaces!==s){const e=t.gl;s?e.disable(e.CULL_FACE):e.enable(e.CULL_FACE),t.backfaces=s}}drawColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,dr.COLOR_TRANSPARENT))}drawDepth(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.depthRenderer&&this._renderers.depthRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}drawNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.normalsRenderer&&this._renderers.normalsRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}drawSilhouetteXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_XRAYED))}drawSilhouetteHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_HIGHLIGHTED))}drawSilhouetteSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,dr.SILHOUETTE_SELECTED))}drawEdgesColorOpaque(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,dr.EDGES_COLOR_OPAQUE)}drawEdgesColorTransparent(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,dr.EDGES_COLOR_TRANSPARENT)}drawEdgesHighlighted(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,dr.EDGES_HIGHLIGHTED)}drawEdgesSelected(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,dr.EDGES_SELECTED)}drawEdgesXRayed(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,dr.EDGES_XRAYED)}drawOcclusion(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}drawShadow(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.shadowRenderer&&this._renderers.shadowRenderer.drawLayer(t,this,dr.COLOR_OPAQUE))}setPickMatrices(e,t){}drawPickMesh(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,dr.PICK))}drawPickDepths(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,dr.PICK))}drawSnapInit(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,dr.PICK))}drawSnap(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,dr.PICK))}drawPickNormals(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickNormalsRenderer&&this._renderers.pickNormalsRenderer.drawLayer(t,this,dr.PICK))}destroy(){if(this._destroyed)return;const e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}class Su{constructor(e){this.id=e.id,this.colorTexture=e.colorTexture,this.metallicRoughnessTexture=e.metallicRoughnessTexture,this.normalsTexture=e.normalsTexture,this.emissiveTexture=e.emissiveTexture,this.occlusionTexture=e.occlusionTexture}destroy(){}}class Nu{constructor(e){this.id=e.id,this.texture=e.texture}destroy(){this.texture&&(this.texture.destroy(),this.texture=null)}}const xu={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class Lu{constructor(e,t,s){this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=s}itemStart(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}itemEnd(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}itemError(e){void 0!==this.onError&&this.onError(e)}resolveURL(e){return this.urlModifier?this.urlModifier(e):e}setURLModifier(e){return this.urlModifier=e,this}addHandler(e,t){return this.handlers.push(e,t),this}removeHandler(e){const t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}getHandler(e){for(let t=0,s=this.handlers.length;t{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==Hu[e])return void Hu[e].push({onLoad:t,onProgress:s,onError:n});Hu[e]=[],Hu[e].push({onLoad:t,onProgress:s,onError:n});const r=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(r).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body.getReader)return t;const s=Hu[e],n=t.body.getReader(),i=t.headers.get("Content-Length"),r=i?parseInt(i):0,a=0!==r;let o=0;const l=new ReadableStream({start(e){!function t(){n.read().then((({done:n,value:i})=>{if(n)e.close();else{o+=i.byteLength;const n=new ProgressEvent("progress",{lengthComputable:a,loaded:o,total:r});for(let e=0,t=s.length;e{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,a)));case"json":return e.json();default:if(void 0===a)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(a),s=t&&t[1]?t[1].toLowerCase():void 0,n=new TextDecoder(s);return e.arrayBuffer().then((e=>n.decode(e)))}}})).then((t=>{xu.add(e,t);const s=Hu[e];delete Hu[e];for(let e=0,n=s.length;e{const s=Hu[e];if(void 0===s)throw this.manager.itemError(e),t;delete Hu[e];for(let e=0,n=s.length;e{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class Gu{constructor(e=4){this.pool=e,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(e){if(!this.workers[e]){const t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}_getIdleWorker(){for(let e=0;e{const n=this._getIdleWorker();-1!==n?(this._initWorker(n),this.workerStatus|=1<e.terminate())),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}let ju=0;class Vu{constructor({viewer:e,transcoderPath:t,workerLimit:s}){this._transcoderPath=t||"https://cdn.jsdelivr.net/npm/@xeokit/xeokit-sdk/dist/basis/",this._transcoderBinary=null,this._transcoderPending=null,this._workerPool=new Gu,this._workerSourceURL="",s&&this._workerPool.setWorkerLimit(s);const n=e.capabilities;this._workerConfig={astcSupported:n.astcSupported,etc1Supported:n.etc1Supported,etc2Supported:n.etc2Supported,dxtSupported:n.dxtSupported,bptcSupported:n.bptcSupported,pvrtcSupported:n.pvrtcSupported},this._supportedFileTypes=["xkt2"]}_init(){if(!this._transcoderPending){const e=new Uu;e.setPath(this._transcoderPath),e.setWithCredentials(this.withCredentials);const t=e.loadAsync("basis_transcoder.js"),s=new Uu;s.setPath(this._transcoderPath),s.setResponseType("arraybuffer"),s.setWithCredentials(this.withCredentials);const n=s.loadAsync("basis_transcoder.wasm");this._transcoderPending=Promise.all([t,n]).then((([e,t])=>{const s=Vu.BasisWorker.toString(),n=["/* constants */","let _EngineFormat = "+JSON.stringify(Vu.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Vu.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Vu.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join("\n");this._workerSourceURL=URL.createObjectURL(new Blob([n])),this._transcoderBinary=t,this._workerPool.setWorkerCreator((()=>{const e=new Worker(this._workerSourceURL),t=this._transcoderBinary.slice(0);return e.postMessage({type:"init",config:this._workerConfig,transcoderBinary:t},[t]),e}))})),ju>0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),ju++}return this._transcoderPending}transcode(e,t,s={}){return new Promise(((n,i)=>{const r=s;this._init().then((()=>this._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:r},e))).then((e=>{const s=e.data,{mipmaps:r,width:a,height:o,format:l,type:c,error:u,dfdTransferFn:h,dfdFlags:p}=s;if("error"===c)return i(u);t.setCompressedData({mipmaps:r,props:{format:l,minFilter:1===r.length?1006:1008,magFilter:1===r.length?1006:1008,encoding:2===h?3001:3e3,premultiplyAlpha:!!(1&p)}}),n()}))}))}destroy(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),ju--}}Vu.BasisFormat={ETC1S:0,UASTC_4x4:1},Vu.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Vu.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},Vu.BasisWorker=function(){let e,t,s;const n=_EngineFormat,i=_TranscoderFormat,r=_BasisFormat;self.addEventListener("message",(function(a){const u=a.data;switch(u.type){case"init":e=u.config,h=u.transcoderBinary,t=new Promise((e=>{s={wasmBinary:h,onRuntimeInitialized:e},BASIS(s)})).then((()=>{s.initializeBasis(),void 0===s.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((()=>{try{const{width:t,height:a,hasAlpha:h,mipmaps:p,format:d,dfdTransferFn:A,dfdFlags:f}=function(t){const a=new s.KTX2File(new Uint8Array(t));function u(){a.close(),a.delete()}if(!a.isValid())throw u(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");const h=a.isUASTC()?r.UASTC_4x4:r.ETC1S,p=a.getWidth(),d=a.getHeight(),A=a.getLevels(),f=a.getHasAlpha(),I=a.getDFDTransferFunc(),m=a.getDFDFlags(),{transcoderFormat:y,engineFormat:v}=function(t,s,a,u){let h,p;const d=t===r.ETC1S?o:l;for(let n=0;n{delete ku[t],s.destroy()}))),s} /** * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT @@ -14,7 +14,7 @@ class e{constructor(e,t){this.items=e||[],this._lastUniqueId=(t||0)+1}addItem(){ /** * @author https://github.com/tmarti, with support from https://tribia.com/ * @license MIT - **/let Xu=null;function qu(e,t){const s=3*e,n=3*t;let i,r,a,o,l,c;const u=Math.min(i=Xu[s],r=Xu[s+1],a=Xu[s+2]),h=Math.min(o=Xu[n],l=Xu[n+1],c=Xu[n+2]);if(u!==h)return u-h;const p=Math.max(i,r,a),d=Math.max(o,l,c);return p!==d?p-d:0}let Ju=null;function Zu(e,t){let s=Ju[2*e]-Ju[2*t];return 0!==s?s:Ju[2*e+1]-Ju[2*t+1]}function $u(e,t,s=!1){const n=e.positionsCompressed||[],i=function(e,t){const s=new Int32Array(e.length/3);for(let e=0,t=s.length;e>t;s.sort(qu);const n=new Int32Array(e.length);for(let t=0,i=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}Ju=new Int32Array(e),t.sort(Zu);const s=new Int32Array(e.length);for(let n=0,i=t.length;nt){let s=e;e=t,t=s}function s(s,n){return s!==e?e-s:n!==t?t-n:0}let n=0,i=(r.length>>1)-1;for(;n<=i;){const e=i+n>>1,t=s(r[2*e],r[2*e+1]);if(t>0)n=e+1;else{if(!(t<0))return e;i=e-1}}return-n-1}const o=new Int32Array(r.length/2);o.fill(0);const l=n.length/3;if(l>8*(1<p.maxNumPositions&&(p=h()),p.bucketNumber>8)return[e];let A;-1===c[l]&&(c[l]=p.numPositions++,p.positionsCompressed.push(n[3*l]),p.positionsCompressed.push(n[3*l+1]),p.positionsCompressed.push(n[3*l+2])),-1===c[u]&&(c[u]=p.numPositions++,p.positionsCompressed.push(n[3*u]),p.positionsCompressed.push(n[3*u+1]),p.positionsCompressed.push(n[3*u+2])),-1===c[d]&&(c[d]=p.numPositions++,p.positionsCompressed.push(n[3*d]),p.positionsCompressed.push(n[3*d+1]),p.positionsCompressed.push(n[3*d+2])),p.indices.push(c[l]),p.indices.push(c[u]),p.indices.push(c[d]),(A=a(l,u))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(l,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(u,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]]))}const d=t/8*2,A=t/8,f=2*n.length+(i.length+r.length)*d;let I=0,m=-n.length/3;return u.forEach((e=>{I+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*A,m+=e.positionsCompressed.length/3})),I>f?[e]:(s&&function(e,t){const s={},n={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,a=e.positionsCompressed;for(let e=0,n=t.length;e0){const e=t._meshes;for(let t=0,s=e.length;t0){const e=this._meshes;for(let t=0,s=e.length;t{this._viewMatrixDirty=!0})),this._meshesWithDirtyMatrices=[],this._numMeshesWithDirtyMatrices=0,this._onTick=this.scene.on("tick",(()=>{for(;this._numMeshesWithDirtyMatrices>0;)this._meshesWithDirtyMatrices[--this._numMeshesWithDirtyMatrices]._updateMatrix()})),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_meshMatrixDirty(e){this._meshesWithDirtyMatrices[this._numMeshesWithDirtyMatrices++]=e}_createDefaultTextureSet(){const e=new Nu({id:"defaultColorTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new Nu({id:"defaultMetalRoughTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new Nu({id:"defaultNormalsTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),n=new Nu({id:"defaultEmissiveTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),i=new Nu({id:"defaultOcclusionTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=n,this._textures.defaultOcclusionTexture=i,this._textureSets.defaultTextureSet=new Su({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:n,occlusionTexture:i})}get isPerformanceModel(){return!0}get transforms(){return this._transforms}get textures(){return this._textures}get textureSets(){return this._textureSets}get meshes(){return this._meshes}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),d.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),d.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||Ah),d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),d.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),d.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),d.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),d.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0,this._aabbDirty=!0}_transformDirty(){this._matrixDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0}_sceneModelDirty(){this.scene._aabbDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0,this._matrixDirty=!0;for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,n=t.length;e{l.setImage(c,{minFilter:s,magFilter:n,wrapS:i,wrapT:r,wrapR:a,flipY:e.flipY,encoding:o}),this.glRedraw()},c.src=e.src;break;default:this._textureTranscoder?g.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new Nu({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,n,i,r,a;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(n=this._textures[e.metallicRoughnessTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(i=this._textures[e.normalsTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(r=this._textures[e.emissiveTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(a=this._textures[e.occlusionTextureId],!a)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else a=this._textures.defaultOcclusionTexture;const o=new Su({id:t,model:this,colorTexture:s,metallicRoughnessTexture:n,normalsTexture:i,emissiveTexture:r,occlusionTexture:a});return this._textureSets[t]=o,o}createTransform(e){if(void 0===e.id||null===e.id)return void this.error("[createTransform] SceneModel.createTransform() config missing: id");if(this._transforms[e.id])return void this.error(`[createTransform] SceneModel already has a transform with this ID: ${e.id}`);let t;if(this.parentTransformId&&(t=this._transforms[e.parentTransformId],!t))return void this.error("[createTransform] SceneModel.createTransform() config missing: id");const s=new oh({id:e.id,model:this,parentTransform:t,matrix:e.matrix,position:e.position,scale:e.scale,rotation:e.rotation,quaternion:e.quaternion});return this._transforms[s.id]=s,s}createMesh(e){if(void 0===e.id||null===e.id)return this.error("[createMesh] SceneModel.createMesh() config missing: id"),!1;if(this._scheduledMeshes[e.id])return this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`),!1;if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`),!1;if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),!1;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),!1;if(!e.buckets&&!e.indices&&"points"!==e.primitive)return this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),!1;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),!1;const t=!(!this._dtxEnabled||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||e.textureSetId);if(e.origin=e.origin?d.addVec3(this._origin,e.origin,d.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||uh,s=e.position||hh,n=e.rotation||ph;d.eulerToQuaternion(n,"XYZ",dh),e.meshMatrix=d.composeMat4(s,dh,t,d.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=aa(e.positionsDecodeBoundary,d.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):fh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=d.vec3(),s=[];Y(e.positions,s,t)&&(e.positions=s,e.origin=d.addVec3(e.origin,t,t))}if(e.positions){const t=d.collapseAABB3();e.positionsDecodeMatrix=d.mat4(),d.expandAABB3Points3(t,e.positions),e.positionsCompressed=ra(e.positions,t,e.positionsDecodeMatrix),e.aabb=t}else if(e.positionsCompressed){const t=d.collapseAABB3();d.expandAABB3Points3(t,e.positionsCompressed),Ut.decompressAABB(t,e.positionsDecodeMatrix),e.aabb=t}if(e.buckets){const t=d.collapseAABB3();for(let s=0,n=e.buckets.length;s>24&255,i=s>>16&255,r=s>>8&255,a=255&s;switch(e.pickColor=new Uint8Array([a,r,i,n]),e.solid="solid"===e.primitive,t.origin=d.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e),t.aabb=e.aabb;break;case 1:t.layer=this._getVBOBatchingLayer(e),t.aabb=e.aabb;break;case 0:t.layer=this._getVBOInstancingLayer(e),t.aabb=e.aabb}return e.transform&&(e.meshMatrix=e.transform.worldMatrix),t.portionId=t.layer.createPortion(t,e),t}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,n=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,n=e.textureSetId||"-",i=e.geometryId,r=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${n}.${i}`;let a=this._vboInstancingLayers[r];if(a)return a;let o=e.textureSet;const l=e.geometry;for(;!a;)switch(l.primitive){case"triangles":case"surface":a=new uo({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":a=new uo({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":a=new qo({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0});break;case"points":a=new kl({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[r]=a,this.layerList.push(a),a}createEntity(e){if(void 0===e.id?e.id=d.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=d.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;this._visible&&!1!==e.visible&&(t|=J),this._pickable&&!1!==e.pickable&&(t|=$),this._culled&&!1!==e.culled&&(t|=Z),this._clippable&&!1!==e.clippable&&(t|=ee),this._collidable&&!1!==e.collidable&&(t|=te),this._edges&&!1!==e.edges&&(t|=re),this._xrayed&&!1!==e.xrayed&&(t|=se),this._highlighted&&!1!==e.highlighted&&(t|=ne),this._selected&&!1!==e.selected&&(t|=ie),e.flags=t,this._createEntity(e)}_createEntity(e){let t=[];for(let s=0,n=e.meshIds.length;se.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,n=t.visibleLayers.length;s65536?16:8)}else a=[{positionsCompressed:n,indices:i,edgeIndices:r}];return a}class yh extends x{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;eA.has(e.id)||I.has(e.id)||f.has(e.id))).reduce(((e,s)=>{let n,i=function(e){let t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0"),t}(s.colorize);s.xrayed?(n=0===t.xrayMaterial.fillAlpha&&0!==t.xrayMaterial.edgeAlpha?.1:t.xrayMaterial.fillAlpha,n=Math.round(255*n).toString(16).padStart(2,"0"),i=n+i):A.has(s.id)&&(n=Math.round(255*s.opacity).toString(16).padStart(2,"0"),i=n+i),e[i]||(e[i]=[]);const r=s.id,a=s.originalSystemId,o={ifc_guid:a,originating_system:this.originatingSystem};return a!==r&&(o.authoring_tool_id=r),e[i].push(o),e}),{}),y=Object.entries(m).map((([e,t])=>({color:e,components:t})));r.components.coloring=y;const v=t.objectIds,w=t.visibleObjects,g=t.visibleObjectIds,E=v.filter((e=>!w[e])),T=t.selectedObjectIds;return e.defaultInvisible||g.length0&&e.clipping_planes.forEach((function(e){let t=Dh(e.location,vh),s=Dh(e.direction,vh);c&&d.negateVec3(s),d.subVec3(t,l),i.yUp&&(t=Ch(t),s=Ch(s)),new vi(n,{pos:t,dir:s})})),n.clearLines(),e.lines&&e.lines.length>0){const t=[],s=[];let i=0;e.lines.forEach((e=>{e.start_point&&e.end_point&&(t.push(e.start_point.x),t.push(e.start_point.y),t.push(e.start_point.z),t.push(e.end_point.x),t.push(e.end_point.y),t.push(e.end_point.z),s.push(i++),s.push(i++))})),new yh(n,{positions:t,indices:s,clippable:!1,collidable:!0})}if(n.clearBitmaps(),e.bitmaps&&e.bitmaps.length>0&&e.bitmaps.forEach((function(e){const t=e.bitmap_type||"jpg",s=e.bitmap_data;let r=Dh(e.location,wh),a=Dh(e.normal,gh),o=Dh(e.up,Eh),l=e.height||1;t&&s&&r&&a&&o&&(i.yUp&&(r=Ch(r),a=Ch(a),o=Ch(o)),new ar(n,{src:s,type:t,pos:r,normal:a,up:o,clippable:!1,collidable:!0,height:l}))})),o&&(n.setObjectsXRayed(n.xrayedObjectIds,!1),n.setObjectsHighlighted(n.highlightedObjectIds,!1),n.setObjectsSelected(n.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(n.setObjectsVisible(n.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!1))))):(n.setObjectsVisible(n.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!0)))));const i=e.components.visibility.view_setup_hints;i&&(!1===i.spaces_visible&&n.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcSpace"),!0),void 0!==i.spaces_translucent&&n.setObjectsXRayed(s.metaScene.getObjectIDsByType("IfcSpace"),!0),i.space_boundaries_visible,!1===i.openings_visible&&n.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcOpening"),!0),i.space_boundaries_translucent,void 0!==i.openings_translucent&&n.setObjectsXRayed(s.metaScene.getObjectIDsByType("IfcOpening"),!0))}e.components.selection&&(n.setObjectsSelected(n.selectedObjectIds,!1),e.components.selection.forEach((e=>this._withBCFComponent(t,e,(e=>e.selected=!0))))),e.components.translucency&&(n.setObjectsXRayed(n.xrayedObjectIds,!1),e.components.translucency.forEach((e=>this._withBCFComponent(t,e,(e=>e.xrayed=!0))))),e.components.coloring&&e.components.coloring.forEach((e=>{let s=e.color,n=0,i=!1;8===s.length&&(n=parseInt(s.substring(0,2),16)/256,n<=1&&n>=.95&&(n=1),s=s.substring(2),i=!0);const r=[parseInt(s.substring(0,2),16)/256,parseInt(s.substring(2,4),16)/256,parseInt(s.substring(4,6),16)/256];e.components.map((e=>this._withBCFComponent(t,e,(e=>{e.colorize=r,i&&(e.opacity=n)}))))}))}if(e.perspective_camera||e.orthogonal_camera){let o,c,u,h;if(e.perspective_camera?(o=Dh(e.perspective_camera.camera_view_point,vh),c=Dh(e.perspective_camera.camera_direction,vh),u=Dh(e.perspective_camera.camera_up_vector,vh),i.perspective.fov=e.perspective_camera.field_of_view,h="perspective"):(o=Dh(e.orthogonal_camera.camera_view_point,vh),c=Dh(e.orthogonal_camera.camera_direction,vh),u=Dh(e.orthogonal_camera.camera_up_vector,vh),i.ortho.scale=e.orthogonal_camera.view_to_world_scale,h="ortho"),d.subVec3(o,l),i.yUp&&(o=Ch(o),c=Ch(c),u=Ch(u)),r){const e=n.pick({pickSurface:!0,origin:o,direction:c});c=e?e.worldPos:d.addVec3(o,c,vh)}else c=d.addVec3(o,c,vh);a?(i.eye=o,i.look=c,i.up=u,i.projection=h):s.cameraFlight.flyTo({eye:o,look:c,up:u,duration:t.duration,projection:h})}}_withBCFComponent(e,t,s){const n=this.viewer,i=n.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){const r=t.authoring_tool_id,a=i.objects[r];if(a)return void s(a);if(e.updateCompositeObjects){if(n.metaScene.metaObjects[r])return void i.withObjects(n.metaScene.getObjectIDsInSubtree(r),s)}}if(t.ifc_guid){const r=t.ifc_guid,a=i.objects[r];if(a)return void s(a);if(e.updateCompositeObjects){if(n.metaScene.metaObjects[r])return void i.withObjects(n.metaScene.getObjectIDsInSubtree(r),s)}Object.keys(i.models).forEach((t=>{const a=d.globalizeObjectId(t,r),o=i.objects[a];if(o)s(o);else if(e.updateCompositeObjects){n.metaScene.metaObjects[a]&&i.withObjects(n.metaScene.getObjectIDsInSubtree(a),s)}}))}}destroy(){super.destroy()}}function bh(e){return{x:e[0],y:e[1],z:e[2]}}function Dh(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function Ph(e){return new Float64Array([e[0],-e[2],e[1]])}function Ch(e){return new Float64Array([e[0],e[2],-e[1]])}const _h=d.vec3(),Rh=(e,t,s,n)=>{var i=e-s,r=t-n;return Math.sqrt(i*i+r*r)};class Bh extends x{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._eventSubs={};var s=this.plugin.viewer.scene;this._originMarker=new he(s,t.origin),this._targetMarker=new he(s,t.target),this._originWorld=d.vec3(),this._targetWorld=d.vec3(),this._wp=new Float64Array(24),this._vp=new Float64Array(24),this._pp=new Float64Array(24),this._cp=new Float64Array(8),this._xAxisLabelCulled=!1,this._yAxisLabelCulled=!1,this._zAxisLabelCulled=!1,this._color=t.color||this.plugin.defaultColor;const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))},l=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))};this._originDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._targetDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthWire=new pe(this._container,{color:this._color,thickness:2,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisWire=new pe(this._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisWire=new pe(this._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisWire=new pe(this._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthLabel=new Ae(this._container,{fillColor:this._color,prefix:"",text:"",zIndex:void 0!==e.zIndex?e.zIndex+4:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisLabel=new Ae(this._container,{fillColor:"red",prefix:"X",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisLabel=new Ae(this._container,{fillColor:"green",prefix:"Y",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisLabel=new Ae(this._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._sectionPlanesDirty=!0,this._visible=!1,this._originVisible=!1,this._targetVisible=!1,this._wireVisible=!1,this._axisVisible=!1,this._xAxisVisible=!1,this._yAxisVisible=!1,this._zAxisVisible=!1,this._axisEnabled=!0,this._labelsVisible=!1,this._labelsOnWires=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onMetricsUnits=s.metrics.on("units",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsScale=s.metrics.on("scale",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsOrigin=s.metrics.on("origin",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.targetVisible=t.targetVisible,this.wireVisible=t.wireVisible,this.axisVisible=t.axisVisible,this.xAxisVisible=t.xAxisVisible,this.yAxisVisible=t.yAxisVisible,this.zAxisVisible=t.zAxisVisible,this.labelsVisible=t.labelsVisible,this.labelsOnWires=t.labelsOnWires}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._targetWorld[0],this._wp[5]=this._originWorld[1],this._wp[6]=this._originWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._originWorld[2],this._wp[11]=1,this._wp[12]=this._targetWorld[0],this._wp[13]=this._targetWorld[1],this._wp[14]=this._targetWorld[2],this._wp[15]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(d.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vp[15]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setCulled(!0),this._yAxisWire.setCulled(!0),this._zAxisWire.setCulled(!0),this._lengthWire.setCulled(!0),this._originDot.setCulled(!0),void this._targetDot.setCulled(!0);this._xAxisLabel.setCulled(!1),this._yAxisLabel.setCulled(!1),this._zAxisLabel.setCulled(!1),this._lengthLabel.setCulled(!1),this._xAxisWire.setCulled(!1),this._yAxisWire.setCulled(!1),this._zAxisWire.setCulled(!1),this._lengthWire.setCulled(!1),this._originDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}const t=this._originMarker.viewPos[2],s=this._targetMarker.viewPos[2];if(t>-.3||s>-.3)return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setVisible(!1),this._yAxisWire.setVisible(!1),this._zAxisWire.setVisible(!1),this._lengthWire.setVisible(!1),this._originDot.setVisible(!1),void this._targetDot.setVisible(!1);if(this._cpDirty){d.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var n=this._pp,i=this._cp,r=e.canvas.canvas.getBoundingClientRect();const t=this._container.getBoundingClientRect();var a=r.top-t.top,o=r.left-t.left,l=e.canvas.boundary,c=l[2],u=l[3],h=0;const s=this.plugin.viewer.scene.metrics,f=s.scale,I=s.units,m=s.unitsInfo[I].abbrev;for(var p=0,A=n.length;p{const t=e.snappedCanvasPos||e.canvasPos;if(i=!0,r.set(e.worldPos),a.set(e.canvasPos),0===this._mouseState){const s=n.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=s.left+i,o=s.top+r;this._markerDiv.style.marginLeft=a+t[0]-5+"px",this._markerDiv.style.marginTop=o+t[1]-5+"px",this._markerDiv.style.background="pink",e.snappedToVertex||e.snappedToEdge?(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,this.pointerLens.snapped=!0),this._markerDiv.style.background="greenyellow",this._markerDiv.style.border="2px solid green"):(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.canvasPos,this.pointerLens.snapped=!1),this._markerDiv.style.background="pink",this._markerDiv.style.border="2px solid red"),c=e.entity}else this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px";n.style.cursor="pointer",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=this._currentDistanceMeasurementInitState.wireVisible,this._currentDistanceMeasurement.axisVisible=this._currentDistanceMeasurementInitState.axisVisible&&this.distanceMeasurementsPlugin.defaultAxisVisible,this._currentDistanceMeasurement.xAxisVisible=this._currentDistanceMeasurementInitState.xAxisVisible&&this.distanceMeasurementsPlugin.defaultXAxisVisible,this._currentDistanceMeasurement.yAxisVisible=this._currentDistanceMeasurementInitState.yAxisVisible&&this.distanceMeasurementsPlugin.defaultYAxisVisible,this._currentDistanceMeasurement.zAxisVisible=this._currentDistanceMeasurementInitState.zAxisVisible&&this.distanceMeasurementsPlugin.defaultZAxisVisible,this._currentDistanceMeasurement.targetVisible=this._currentDistanceMeasurementInitState.targetVisible,this._currentDistanceMeasurement.target.worldPos=r.slice(),this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px")})),n.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(o=e.clientX,l=e.clientY)}),n.addEventListener("mouseup",this._onMouseUp=t=>{1===t.which&&(t.clientX>o+20||t.clientXl+20||t.clientY{this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos),i=!1,this._markerDiv.style.marginLeft="-100px",this._markerDiv.style.marginTop="-100px",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=!1,this._currentDistanceMeasurement.targetVisible=!1,this._currentDistanceMeasurement.axisVisible=!1),n.style.cursor="default"})),this._active=!0}deactivate(){if(!this._active)return;this.fire("activated",!1),this.pointerLens&&(this.pointerLens.visible=!1),this._markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.distanceMeasurementsPlugin.viewer.cameraControl;t.off(this._onCameraControlHoverSnapOrSurface),t.off(this._onCameraControlHoverSnapOrSurfaceOff),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null),this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null))}destroy(){this.deactivate(),super.destroy()}}class Nh extends Q{constructor(e,t={}){super("DistanceMeasurements",e),this._pointerLens=t.pointerLens,this._container=t.container||document.body,this._defaultControl=null,this._measurements={},this.labelMinAxisLength=t.labelMinAxisLength,this.defaultVisible=!1!==t.defaultVisible,this.defaultOriginVisible=!1!==t.defaultOriginVisible,this.defaultTargetVisible=!1!==t.defaultTargetVisible,this.defaultWireVisible=!1!==t.defaultWireVisible,this.defaultLabelsVisible=!1!==t.defaultLabelsVisible,this.defaultAxisVisible=!1!==t.defaultAxisVisible,this.defaultXAxisVisible=!1!==t.defaultXAxisVisible,this.defaultYAxisVisible=!1!==t.defaultYAxisVisible,this.defaultZAxisVisible=!1!==t.defaultZAxisVisible,this.defaultColor=void 0!==t.defaultColor?t.defaultColor:"#00BBFF",this.zIndex=t.zIndex||1e4,this.defaultLabelsOnWires=!1!==t.defaultLabelsOnWires,this._onMouseOver=(e,t)=>{this.fire("mouseOver",{plugin:this,distanceMeasurement:t,measurement:t,event:e})},this._onMouseLeave=(e,t)=>{this.fire("mouseLeave",{plugin:this,distanceMeasurement:t,measurement:t,event:e})},this._onContextMenu=(e,t)=>{this.fire("contextMenu",{plugin:this,distanceMeasurement:t,measurement:t,event:e})}}getContainerElement(){return this._container}send(e,t){}get pointerLens(){return this._pointerLens}get control(){return this._defaultControl||(this._defaultControl=new Sh(this,{})),this._defaultControl}get measurements(){return this._measurements}set labelMinAxisLength(e){e<1&&(this.error("labelMinAxisLength must be >= 1; defaulting to 25"),e=25),this._labelMinAxisLength=e||25}get labelMinAxisLength(){return this._labelMinAxisLength}createMeasurement(e={}){this.viewer.scene.components[e.id]&&(this.error("Viewer scene component with this ID already exists: "+e.id),delete e.id);const t=e.origin,s=e.target,n=new Bh(this,{id:e.id,plugin:this,container:this._container,origin:{entity:t.entity,worldPos:t.worldPos},target:{entity:s.entity,worldPos:s.worldPos},visible:e.visible,wireVisible:e.wireVisible,axisVisible:!1!==e.axisVisible&&!1!==this.defaultAxisVisible,xAxisVisible:!1!==e.xAxisVisible&&!1!==this.defaultXAxisVisible,yAxisVisible:!1!==e.yAxisVisible&&!1!==this.defaultYAxisVisible,zAxisVisible:!1!==e.zAxisVisible&&!1!==this.defaultZAxisVisible,labelsVisible:!1!==e.labelsVisible&&!1!==this.defaultLabelsVisible,originVisible:e.originVisible,targetVisible:e.targetVisible,color:e.color,labelsOnWires:!1!==e.labelsOnWires&&!1!==this.defaultLabelsOnWires,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[n.id]=n,n.on("destroyed",(()=>{delete this._measurements[n.id]})),this.fire("measurementCreated",n),n}destroyMeasurement(e){const t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("DistanceMeasurement not found: "+e)}setLabelsShown(e){for(const[t,s]of Object.entries(this.measurements))s.labelShown=e}setAxisVisible(e){for(const[t,s]of Object.entries(this.measurements))s.axisVisible=e;this.defaultAxisVisible=e}getAxisVisible(){return this.defaultAxisVisible}clear(){const e=Object.keys(this._measurements);for(var t=0,s=e.length;t{s=1e3*this._delayBeforeRestoreSeconds,n||(e.scene._renderer.setColorTextureEnabled(!this._hideColorTexture),e.scene._renderer.setPBREnabled(!this._hidePBR),e.scene._renderer.setSAOEnabled(!this._hideSAO),e.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!this._hideEdges),this._scaleCanvasResolution?e.scene.canvas.resolutionScale=this._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,n=!0)};this._onCanvasBoundary=e.scene.canvas.on("boundary",i),this._onCameraMatrix=e.scene.camera.on("matrix",i),this._onSceneTick=e.scene.on("tick",(t=>{n&&(s-=t.deltaTime,(!this._delayBeforeRestore||s<=0)&&(e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),n=!1))}));let r=!1;this._onSceneMouseDown=e.scene.input.on("mousedown",(()=>{r=!0})),this._onSceneMouseUp=e.scene.input.on("mouseup",(()=>{r=!1})),this._onSceneMouseMove=e.scene.input.on("mousemove",(()=>{r&&i()}))}get hideColorTexture(){return this._hideColorTexture}set hideColorTexture(e){this._hideColorTexture=e}get hidePBR(){return this._hidePBR}set hidePBR(e){this._hidePBR=e}get hideSAO(){return this._hideSAO}set hideSAO(e){this._hideSAO=e}get hideEdges(){return this._hideEdges}set hideEdges(e){this._hideEdges=e}get hideTransparentObjects(){return this._hideTransparentObjects}set hideTransparentObjects(e){this._hideTransparentObjects=!1!==e}get scaleCanvasResolution(){return this._scaleCanvasResolution}set scaleCanvasResolution(e){this._scaleCanvasResolution=e}get scaleCanvasResolutionFactor(){return this._scaleCanvasResolutionFactor}set scaleCanvasResolutionFactor(e){this._scaleCanvasResolutionFactor=e||.6}get delayBeforeRestore(){return this._delayBeforeRestore}set delayBeforeRestore(e){this._delayBeforeRestore=e}get delayBeforeRestoreSeconds(){return this._delayBeforeRestoreSeconds}set delayBeforeRestoreSeconds(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}send(e,t){}destroy(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),super.destroy()}}class Lh{constructor(){}getMetaModel(e,t,s){g.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getGLTF(e,t,s){g.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getGLB(e,t,s){g.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getArrayBuffer(e,t,s,n){!function(e,t,s,n){var i=()=>{};s=s||i,n=n||i;const r=/^data:(.*?)(;base64)?,(.*)$/,a=t.match(r);if(a){const e=!!a[2];var o=a[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),t=new Uint8Array(e);for(var l=0;l{s(e)}),(function(e){n(e)}))}}class Mh{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const n=Fh(e,s);return n?t?Hh(n,t):n:null}translatePlurals(e,t,s){const n=this._messages[this._locale];if(!n)return null;let i=Fh(e,n);return i=0===(t=parseInt(""+t,10))?i.zero:t>1?i.other:i.one,i?(i=Hh(i,[t]),s&&(i=Hh(i,s)),i):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];if(n)for(const e in n)if(n.hasOwnProperty(e)){n[e].callback(t)}}on(t,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new e),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let n=this._eventSubs[t];n||(n={},this._eventSubs[t]=n);const i=this._eventSubIDMap.addItem();n[i]={callback:s},this._eventSubEvents[i]=t;const r=this._events[t];return void 0!==r&&s(r),i}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function Fh(e,t){if(t[e])return t[e];const s=e.split(".");let n=t;for(let e=0,t=s.length;n&&e1?1:e}get t(){return this._t}get tangent(){return this.getTangent(this._t)}get length(){var e=this._getLengths();return e[e.length-1]}getTangent(e){var t=1e-4;void 0===e&&(e=this._t);var s=e-t,n=e+t;s<0&&(s=0),n>1&&(n=1);var i=this.getPoint(s),r=this.getPoint(n),a=d.subVec3(r,i,[]);return d.normalizeVec3(a,[])}getPointAt(e){var t=this.getUToTMapping(e);return this.getPoint(t)}getPoints(e){e||(e=5);var t,s=[];for(t=0;t<=e;t++)s.push(this.getPoint(t/e));return s}_getLengths(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,s,n=[],i=this.getPoint(0),r=0;for(n.push(0),s=1;s<=e;s++)t=this.getPoint(s/e),r+=d.lenVec3(d.subVec3(t,i,[])),n.push(r),i=t;return this.cacheArcLengths=n,n}_updateArcLengths(){this.needsUpdate=!0,this._getLengths()}getUToTMapping(e,t){var s,n=this._getLengths(),i=0,r=n.length;s=t||e*n[r-1];for(var a,o=0,l=r-1;o<=l;)if((a=n[i=Math.floor(o+(l-o)/2)]-s)<0)o=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(n[i=l]===s)return i/(r-1);var c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}}class Gh extends Uh{constructor(e,t={}){super(e,t),this.points=t.points,this.t=t.t}set points(e){this._points=e||[]}get points(){return this._points}set t(e){e=e||0,this._t=e<0?0:e>1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=this.points;if(!(t.length<3)){var s=(t.length-1)*e,n=Math.floor(s),i=s-n,r=t[0===n?n:n-1],a=t[n],o=t[n>t.length-2?t.length-1:n+1],l=t[n>t.length-3?t.length-1:n+2],c=d.vec3();return c[0]=d.catmullRomInterpolate(r[0],a[0],o[0],l[0],i),c[1]=d.catmullRomInterpolate(r[1],a[1],o[1],l[1],i),c[2]=d.catmullRomInterpolate(r[2],a[2],o[2],l[2],i),c}this.error("Can't sample point from SplineCurve - not enough points on curve - returning [0,0,0].")}getJSON(){return{points:points,t:this._t}}}const jh=d.vec3();class Vh extends x{get type(){return"CameraPath"}constructor(e,t={}){super(e,t),this._frames=[],this._eyeCurve=new Gh(this),this._lookCurve=new Gh(this),this._upCurve=new Gh(this),t.frames&&(this.addFrames(t.frames),this.smoothFrameTimes(1))}get frames(){return this._frames}get eyeCurve(){return this._eyeCurve}get lookCurve(){return this._lookCurve}get upCurve(){return this._upCurve}saveFrame(e){const t=this.scene.camera;this.addFrame(e,t.eye,t.look,t.up)}addFrame(e,t,s,n){const i={t:e,eye:t.slice(0),look:s.slice(0),up:n.slice(0)};this._frames.push(i),this._eyeCurve.points.push(i.eye),this._lookCurve.points.push(i.look),this._upCurve.points.push(i.up)}addFrames(e){let t;for(let s=0,n=e.length;s1?1:e,t.eye=this._eyeCurve.getPoint(e,jh),t.look=this._lookCurve.getPoint(e,jh),t.up=this._upCurve.getPoint(e,jh)}sampleFrame(e,t,s,n){e=e<0?0:e>1?1:e,this._eyeCurve.getPoint(e,t),this._lookCurve.getPoint(e,s),this._upCurve.getPoint(e,n)}smoothFrameTimes(e){if(0===this._frames.length)return;const t=d.vec3();var s=0;this._frames[0].t=0;const n=[];for(let e=1,r=this._frames.length;e=1;e>1&&(e=1);const s=this.easing?Yh._ease(e,0,1,1):e,n=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(d.subVec3(n.eye,n.look,Kh),n.eye=d.lerpVec3(s,0,1,this._eye1,this._eye2,Wh),n.look=d.subVec3(Wh,Kh,Qh)):this._flyingLook&&(n.look=d.lerpVec3(s,0,1,this._look1,this._look2,Qh),n.up=d.lerpVec3(s,0,1,this._up1,this._up2,zh)):this._flyingEyeLookUp&&(n.eye=d.lerpVec3(s,0,1,this._eye1,this._eye2,Wh),n.look=d.lerpVec3(s,0,1,this._look1,this._look2,Qh),n.up=d.lerpVec3(s,0,1,this._up1,this._up2,zh)),this._projection2){const t="ortho"===this._projection2?Yh._easeOutExpo(e,0,1,1):Yh._easeInCubic(e,0,1,1);n.customProjection.matrix=d.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else n.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return n.ortho.scale=this._orthoScale2,void this.stop();B.scheduleTask(this._update,this)}static _ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}static _easeInCubic(e,t,s,n){return s*(e/=n)*e*e+t}static _easeOutExpo(e,t,s,n){return s*(1-Math.pow(2,-10*e/n))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class Xh extends x{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new Yh(this),this._t=0,this.state=Xh.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const n=performance.now(),i=this._lastTime?.001*(n-this._lastTime):0;if(this._lastTime=n,0!==i)switch(this.state){case Xh.SCRUBBING:return;case Xh.PLAYING:if(this._t+=this._playingRate*i,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=Xh.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case Xh.PLAYING_TO:s=this._t+this._playingRate*i*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=Xh.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=Xh.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=Xh.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const n=s.frames[e];n?(this.state=Xh.SCRUBBING,this._cameraFlightAnimation.flyTo(n,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=Xh.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=Xh.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=Xh.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}Xh.STOPPED=0,Xh.SCRUBBING=1,Xh.PLAYING=2,Xh.PLAYING_TO=3;const qh=d.vec3(),Jh=d.vec3();d.vec3();const Zh=d.vec3([0,-1,0]),$h=d.vec4([0,0,0,1]);class ep extends x{constructor(e,t={}){super(e,t),this._src=null,this._image=null,this._pos=d.vec3(),this._origin=d.vec3(),this._rtcPos=d.vec3(),this._dir=d.vec3(),this._size=1,this._imageSize=d.vec2(),this._texture=new Wi(this),this._plane=new pi(this,{geometry:new Vt(this,sr({center:[0,0,0],xSize:1,zSize:1,xSegments:10,zSegments:10})),material:new Kt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0}),clippable:t.clippable}),this._grid=new pi(this,{geometry:new Vt(this,tr({size:1,divisions:10})),material:new Kt(this,{diffuse:[0,0,0],ambient:[0,0,0],emissive:[.2,.8,.2]}),position:[0,.001,0],clippable:t.clippable}),this._node=new Ri(this,{rotation:[0,0,0],position:[0,0,0],scale:[1,1,1],clippable:!1,children:[this._plane,this._grid]}),this._gridVisible=!1,this.visible=!0,this.gridVisible=t.gridVisible,this.position=t.position,this.rotation=t.rotation,this.dir=t.dir,this.size=t.size,this.collidable=t.collidable,this.clippable=t.clippable,this.pickable=t.pickable,this.opacity=t.opacity,t.image?this.image=t.image:this.src=t.src}set visible(e){this._plane.visible=e,this._grid.visible=this._gridVisible&&e}get visible(){return this._plane.visible}set gridVisible(e){e=!1!==e,this._gridVisible=e,this._grid.visible=this._gridVisible&&this.visible}get gridVisible(){return this._gridVisible}set image(e){this._image=e,this._image&&(this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage(),this._src=null,this._texture.image=this._image)}get image(){return this._image}set src(e){if(this._src=e,this._src){this._image=null;const e=new Image;e.onload=()=>{this._texture.image=e,this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage()},e.src=this._src}}get src(){return this._src}set position(e){this._pos.set(e||[0,0,0]),K(this._pos,this._origin,this._rtcPos),this._node.origin=this._origin,this._node.position=this._rtcPos}get position(){return this._pos}set rotation(e){this._node.rotation=e}get rotation(){return this._node.rotation}set size(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}get size(){return this._size}set dir(e){if(this._dir.set(e||[0,0,-1]),e){const t=this.scene.center,s=[-this._dir[0],-this._dir[1],-this._dir[2]];d.subVec3(t,this.position,qh);const n=-d.dotVec3(s,qh);d.normalizeVec3(s),d.mulVec3Scalar(s,n,Jh),d.vec3PairToQuaternion(Zh,e,$h),this._node.quaternion=$h}}get dir(){return this._dir}set collidable(e){this._node.collidable=!1!==e}get collidable(){return this._node.collidable}set clippable(e){this._node.clippable=!1!==e}get clippable(){return this._node.clippable}set pickable(e){this._node.pickable=!1!==e}get pickable(){return this._node.pickable}set opacity(e){this._node.opacity=e}get opacity(){return this._node.opacity}destroy(){super.destroy()}_updatePlaneSizeFromImage(){const e=this._size,t=this._imageSize[0],s=this._imageSize[1];if(t>s){const n=s/t;this._node.scale=[e,1,e*n]}else{const n=t/s;this._node.scale=[e*n,1,e]}}}class tp extends _t{get type(){return"PointLight"}constructor(e,t={}){super(e,t);const s=this;this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const n=this.scene.camera,i=this.scene.canvas;this._onCameraViewMatrix=n.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=n.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=i.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new at({type:"point",pos:d.vec3([1,1,1]),color:d.vec3([.7,.7,.8]),intensity:1,attenuation:[0,0,0],space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(s._shadowViewMatrixDirty){s._shadowViewMatrix||(s._shadowViewMatrix=d.identityMat4());const e=s._state.pos,t=n.look,i=n.up;d.lookAtMat4v(e,t,i,s._shadowViewMatrix),s._shadowViewMatrixDirty=!1}return s._shadowViewMatrix},getShadowProjMatrix:()=>{if(s._shadowProjMatrixDirty){s._shadowProjMatrix||(s._shadowProjMatrix=d.identityMat4());const e=s.scene.canvas.canvas;d.perspectiveMat4(Math.PI/180*70,e.clientWidth/e.clientHeight,.1,500,s._shadowProjMatrix),s._shadowProjMatrixDirty=!1}return s._shadowProjMatrix},getShadowRenderBuf:()=>(s._shadowRenderBuf||(s._shadowRenderBuf=new et(s.scene.canvas.canvas,s.scene.canvas.gl,{size:[1024,1024]})),s._shadowRenderBuf)}),this.pos=t.pos,this.color=t.color,this.intensity=t.intensity,this.constantAttenuation=t.constantAttenuation,this.linearAttenuation=t.linearAttenuation,this.quadraticAttenuation=t.quadraticAttenuation,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set pos(e){this._state.pos.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get pos(){return this._state.pos}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set constantAttenuation(e){this._state.attenuation[0]=e||0,this.glRedraw()}get constantAttenuation(){return this._state.attenuation[0]}set linearAttenuation(e){this._state.attenuation[1]=e||0,this.glRedraw()}get linearAttenuation(){return this._state.attenuation[1]}set quadraticAttenuation(e){this._state.attenuation[2]=e||0,this.glRedraw()}get quadraticAttenuation(){return this._state.attenuation[2]}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}function sp(e){if(!np(e.width)||!np(e.height)){const t=document.createElement("canvas");t.width=ip(e.width),t.height=ip(e.height);t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}function np(e){return 0==(e&e-1)}function ip(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}class rp extends x{get type(){return"CubeTexture"}constructor(e,t={}){super(e,t);const s=this.scene.canvas.gl;this._state=new at({texture:new Ui({gl:s,target:s.TEXTURE_CUBE_MAP}),flipY:this._checkFlipY(t.minFilter),encoding:this._checkEncoding(t.encoding),minFilter:1008,magFilter:1006,wrapS:1001,wrapT:1001,mipmaps:!0}),this._src=t.src,this._images=[],this._loadSrc(t.src),m.memory.textures++}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this.scene.canvas.gl,this._state.texture=null,this._src&&this._loadSrc(this._src)}_loadSrc(e){const t=this,s=this.scene.canvas.gl;this._images=[];let n=!1,i=0;for(let r=0;r{this._texture.image=e,this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage()},e.src=this._src}}get src(){return this._src}set size(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}get size(){return this._size}set collidable(e){this._mesh.collidable=!1!==e}get collidable(){return this._mesh.collidable}set clippable(e){this._mesh.clippable=!1!==e}get clippable(){return this._mesh.clippable}set pickable(e){this._mesh.pickable=!1!==e}get pickable(){return this._mesh.pickable}set opacity(e){this._mesh.opacity=e}get opacity(){return this._mesh.opacity}_updatePlaneSizeFromImage(){const e=.5*this._size,t=this._imageSize[0],s=this._imageSize[1],n=s/t;this._geometry.positions=t>s?[e,e*n,0,-e,e*n,0,-e,-e*n,0,e,-e*n,0]:[e/n,e,0,-e/n,e,0,-e/n,-e,0,e/n,-e,0]}}class cp{constructor(e){this._eye=d.vec3(),this._look=d.vec3(),this._up=d.vec3(),this._projection={},e&&this.saveCamera(e)}saveCamera(e){const t=e.camera,s=t.project;switch(this._eye.set(t.eye),this._look.set(t.look),this._up.set(t.up),t.projection){case"perspective":this._projection={projection:"perspective",fov:s.fov,fovAxis:s.fovAxis,near:s.near,far:s.far};break;case"ortho":this._projection={projection:"ortho",scale:s.scale,near:s.near,far:s.far};break;case"frustum":this._projection={projection:"frustum",left:s.left,right:s.right,top:s.top,bottom:s.bottom,near:s.near,far:s.far};break;case"custom":this._projection={projection:"custom",matrix:s.matrix.slice()}}}restoreCamera(e,t){const s=e.camera,n=this._projection;function i(){switch(n.type){case"perspective":s.perspective.fov=n.fov,s.perspective.fovAxis=n.fovAxis,s.perspective.near=n.near,s.perspective.far=n.far;break;case"ortho":s.ortho.scale=n.scale,s.ortho.near=n.near,s.ortho.far=n.far;break;case"frustum":s.frustum.left=n.left,s.frustum.right=n.right,s.frustum.top=n.top,s.frustum.bottom=n.bottom,s.frustum.near=n.near,s.frustum.far=n.far;break;case"custom":s.customProjection.matrix=n.matrix}}t?e.viewer.cameraFlight.flyTo({eye:this._eye,look:this._look,up:this._up,orthoScale:n.scale,projection:n.projection},(()=>{i(),t()})):(s.eye=this._eye,s.look=this._look,s.up=this._up,i(),s.projection=n.projection)}}const up=d.vec3();class hp{constructor(e){if(this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,e){const t=e.metaScene.scene;this.saveObjects(t,e)}}saveObjects(e,t,s){this.numObjects=0,this._mask=s?g.apply(s,{}):null;const n=!s||s.visible,i=!s||s.edges,r=!s||s.xrayed,a=!s||s.highlighted,o=!s||s.selected,l=!s||s.clippable,c=!s||s.pickable,u=!s||s.colorize,h=!s||s.opacity,p=t.metaObjects,d=e.objects;for(let e=0,t=p.length;e1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=d.vec3();return t[0]=d.b3(e,this._v0[0],this._v1[0],this._v2[0],this._v3[0]),t[1]=d.b3(e,this._v0[1],this._v1[1],this._v2[1],this._v3[1]),t[2]=d.b3(e,this._v0[2],this._v1[2],this._v2[2],this._v3[2]),t}getJSON(){return{v0:this._v0,v1:this._v1,v2:this._v2,v3:this._v3,t:this._t}}}class fp extends Uh{constructor(e,t={}){super(e,t),this._cachedLengths=[],this._dirty=!0,this._curves=[],this._t=0,this._dirtySubs=[],this._destroyedSubs=[],this.curves=t.curves||[],this.t=t.t}addCurve(e){this._curves.push(e),this._dirty=!0}set curves(e){var t,s,n;for(e=e||[],s=0,n=this._curves.length;s1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}get length(){var e=this._getCurveLengths();return e[e.length-1]}getPoint(e){for(var t,s=e*this.length,n=this._getCurveLengths(),i=0;i=s){var r=1-(n[i]-s)/(t=this._curves[i]).length;return t.getPointAt(r)}i++}return null}_getCurveLengths(){if(!this._dirty)return this._cachedLengths;var e,t=[],s=0,n=this._curves.length;for(e=0;e1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=d.vec3();return t[0]=d.b2(e,this._v0[0],this._v1[0],this._v2[0]),t[1]=d.b2(e,this._v0[1],this._v1[1],this._v2[1]),t[2]=d.b2(e,this._v0[2],this._v1[2],this._v2[2]),t}getJSON(){return{v0:this._v0,v1:this._v1,v2:this._v2,t:this._t}}}class mp extends Ih{constructor(e,t={}){super(e,t)}}class yp extends x{constructor(e,t={}){super(e,t),this._skyboxMesh=new pi(this,{geometry:new Vt(this,{primitive:"triangles",positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),background:!0,scale:[2e3,2e3,2e3],rotation:[0,-90,0],material:new Kt(this,{ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],emissive:[1,1,1],emissiveMap:new Wi(this,{src:t.src,flipY:!0,wrapS:"clampToEdge",wrapT:"clampToEdge",encoding:t.encoding||"sRGB"}),backfaces:!0}),visible:!1,pickable:!1,clippable:!1,collidable:!1}),this.size=t.size,this.active=t.active}set size(e){this._size=e||1e3,this._skyboxMesh.scale=[this._size,this._size,this._size]}get size(){return this._size}set active(e){this._skyboxMesh.visible=e}get active(){return this._skyboxMesh.visible}}class vp{transcode(e,t,s={}){}destroy(){}}const wp=d.vec4(),gp=d.vec4(),Ep=d.vec3(),Tp=d.vec3(),bp=d.vec3(),Dp=d.vec4(),Pp=d.vec4(),Cp=d.vec4();class _p{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let n=!1;const i=this._scene.camera;if(e){const t=d.subVec3(e,i.eye,Ep);n=d.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=d.vec3();d.decomposeMat4(d.inverseMat4(this._scene.viewer.camera.viewMatrix,d.mat4()),t,d.vec4(),d.vec3());const s=d.distVec3(t,e);let n=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(n/=this._scene.camera.ortho.scale/2),K(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new Xi(this._scene,fi({radius:n})),this._pivotSphere=new pi(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){d.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,d.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,n=s[2],i=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*n/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*i/2);let r=t._lastBoundingClientRect;if(!r||t._canvasSizeChanged){const e=t.canvas;r=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(r.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(r.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(K(this.getPivotPos(),this._rtcCenter,this._rtcPos),d.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new Kt(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=d.lookAtMat4v(e.eye,e.look,e.worldUp);d.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=d.distVec3(e.eye,s),t=d.inverseMat4(t);const n=d.transformVec3(t,this._cameraOffset),i=d.vec3();if(d.subVec3(e.eye,s,i),d.addVec3(i,n),e.zUp){const e=i[1];i[1]=i[2],i[2]=e}this._radius=d.lenVec3(i),this._polar=Math.acos(i[1]/this._radius),this._azimuth=Math.atan2(i[0],i[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=d.normalizeVec3(d.subVec3(e.look,e.eye,Rp)),s=d.cross3Vec3(t,e.worldUp,Bp);return d.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(d.distVec3(this._scene.center,t.eye)),n=t.project.transposedMatrix,i=n.subarray(8,12),r=n.subarray(12),a=[0,0,-1,1],o=d.dotVec4(a,i)/d.dotVec4(a,r),l=Sp;t.project.unproject(e,o,Np,xp,l);const c=d.normalizeVec3(d.subVec3(l,t.eye,Rp)),u=d.addVec3(t.eye,d.mulVec3Scalar(c,s,Bp),Op);this.setPivotPos(u)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var n=-e;const i=-t;1===s.worldUp[2]&&(n=-n),this._azimuth+=.01*-n,this._polar+=.01*i,this._polar=d.clamp(this._polar,.001,Math.PI-.001);const r=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=r[1];r[1]=r[2],r[2]=e}const a=d.lenVec3(d.subVec3(s.look,s.eye,d.vec3())),o=this.getPivotPos();d.addVec3(r,o);let l=d.lookAtMat4v(r,o,s.worldUp);l=d.inverseMat4(l);const c=d.transformVec3(l,this._cameraOffset);l[12]-=c[0],l[13]-=c[1],l[14]-=c[2];const u=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],d.subVec3(s.eye,d.mulVec3Scalar(u,a),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class Mp{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=d.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._lastHash=null,this._needFireEvents=0}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;const e=`${~~this.pickCursorPos[0]}-${~~this.pickCursorPos[1]}-${this.scheduleSnapOrPick}-${this.schedulePickSurface}-${this.schedulePickEntity}`;if(this._lastHash===e)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1;const t=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.pick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});e&&(e.snappedToEdge||e.snappedToVertex)?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents++):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const e=this.pickResult.canvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents+=t?1:0,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents++):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents++)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents++)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(0!==this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,pointerPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new Se;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.worldPos,e.canvasPos=this.pickCursorPos,e.snappedCanvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=0}}}const Fp=d.vec2();class Hp{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController;let a,o,l,c=0,u=0,h=0,p=0,A=!1;const f=d.vec3();let I=!0;const m=this._scene.canvas.canvas,y=[];function v(e=!0){m.style.cursor="move",c=n.pointerCanvasPos[0],u=n.pointerCanvasPos[1],h=n.pointerCanvasPos[0],p=n.pointerCanvasPos[1],e&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(A=!0,f.set(r.pickResult.worldPos)):A=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(a=!0,v()):(a=!0,v(!1));break;case 2:o=!0,v();break;case 3:l=!0,s.panRightClick&&v()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!a&&!o&&!l)return;const t=e.canvas.boundary,r=t[2],h=t[3],p=n.pointerCanvasPos[0],I=n.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&o||s.panRightClick&&l){const t=p-c,s=I-u,n=e.camera;if("perspective"===n.projection){const r=Math.abs(A?d.lenVec3(d.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=1.5*t*r/h,i.panDeltaY+=1.5*s*r/h}else i.panDeltaX+=.5*n.ortho.scale*(t/h),i.panDeltaY+=.5*n.ortho.scale*(s/h)}else!a||o||l||s.planView||(s.firstPerson?(i.rotateDeltaY-=(p-c)/r*s.dragRotationRate/2,i.rotateDeltaX+=(I-u)/h*(s.dragRotationRate/4)):(i.rotateDeltaY-=(p-c)/r*(1.5*s.dragRotationRate),i.rotateDeltaX+=(I-u)/h*(1.5*s.dragRotationRate)));c=p,u=I}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&n.mouseover&&(I=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:a=!1,o=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,n=0,i=0,r=0,a=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,r+=s.scrollLeft,a+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+r-n,t[1]=e.pageY+a-i}else e=window.event,t[0]=e.x,t[1]=e.y}(e,Fp);const s=Fp[0],n=Fp[1];Math.abs(s-h)<3&&Math.abs(n-p)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:Fp,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const w=1/60;let g=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var r=null!==g?t-g:0;g=t,r>.05&&(r=.05),r{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const a=i._isKeyDownForAction(i.AXIS_VIEW_RIGHT),o=i._isKeyDownForAction(i.AXIS_VIEW_BACK),l=i._isKeyDownForAction(i.AXIS_VIEW_LEFT),c=i._isKeyDownForAction(i.AXIS_VIEW_FRONT),u=i._isKeyDownForAction(i.AXIS_VIEW_TOP),h=i._isKeyDownForAction(i.AXIS_VIEW_BOTTOM);if(!(a||o||l||c||u||h))return;const p=e.aabb,A=d.getAABB3Diag(p);d.getAABB3Center(p,Up);const f=Math.abs(A/Math.tan(t.cameraFlight.fitFOV*d.DEGTORAD)),I=1.1*A;Qp.orthoScale=I,a?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldRight,f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):o?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldForward,f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):l?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldRight,-f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):c?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldForward,-f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):u?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldUp,f,Gp),kp)),Qp.look.set(Up),Qp.up.set(d.normalizeVec3(d.mulVec3Scalar(r.worldForward,1,jp),Vp))):h&&(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldUp,-f,Gp),kp)),Qp.look.set(Up),Qp.up.set(d.normalizeVec3(d.mulVec3Scalar(r.worldForward,-1,jp)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(Up),t.cameraFlight.duration>0?t.cameraFlight.flyTo(Qp,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(Qp),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class zp{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,c=!1;const u=this._scene.canvas.canvas,h=s=>{let n;s&&s.worldPos&&(n=s.worldPos);const i=s&&s.entity?s.entity.aabb:e.aabb;if(n){const s=e.camera;d.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})},p=e.tickify(this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||c)return;const i=o.hasSubs("hover"),a=o.hasSubs("hoverEnter"),u=o.hasSubs("hoverOut"),h=o.hasSubs("hoverOff"),p=o.hasSubs("hoverSurface"),d=o.hasSubs("hoverSnapOrSurface");if(i||a||u||h||p||d)if(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=p,r.scheduleSnapOrPick=d,r.update(),r.pickResult){if(r.pickResult.entity){const t=r.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),o.fire("hoverEnter",r.pickResult,!0),this._lastPickedEntityId=t)}o.fire("hover",r.pickResult,!0),(r.pickResult.worldPos||r.pickResult.snappedWorldPos)&&o.fire("hoverSurface",r.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),o.fire("hoverOff",{canvasPos:r.pickCursorPos},!0)});u.addEventListener("mousemove",p),u.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(c=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(n.mouseDownClientX=t.clientX,n.mouseDownClientY=t.clientY,n.mouseDownCursorX=n.pointerCanvasPos[0],n.mouseDownCursorY=n.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),1===t.which))){const t=r.pickResult;t&&t.worldPos?(a.setPivotPos(t.worldPos),a.startPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),a.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(c=!1),a.getPivoting()&&a.endPivot()}),u.addEventListener("mouseup",this._canvasMouseUpHandler=i=>{if(!s.active||!s.pointerEnabled)return;if(!(1===i.which))return;if(a.hidePivot(),Math.abs(i.clientX-n.mouseDownClientX)>3||Math.abs(i.clientY-n.mouseDownClientY)>3)return;const l=o.hasSubs("picked"),c=o.hasSubs("pickedNothing"),u=o.hasSubs("pickedSurface"),p=o.hasSubs("doublePicked"),A=o.hasSubs("doublePickedSurface"),f=o.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||p||A||f))return(l||c||u)&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=u,r.update(),r.pickResult?(o.fire("picked",r.pickResult,!0),r.pickedSurface&&o.fire("pickedSurface",r.pickResult,!0)):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo,r.schedulePickSurface=u,r.update();const e=r.pickResult,i=r.pickedSurface;this._timeout=setTimeout((()=>{e?(o.fire("picked",e,!0),i&&(o.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo||p||A,r.schedulePickSurface=r.schedulePickEntity&&A,r.update(),r.pickResult){if(o.fire("doublePicked",r.pickResult,!0),r.pickedSurface&&o.fire("doublePickedSurface",r.pickResult,!0),s.doublePickFlyTo&&(h(r.pickResult),!s.firstPerson&&s.followPointer)){const e=r.pickResult.entity.aabb,s=d.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(o.fire("doublePickedNothing",{canvasPos:n.pointerCanvasPos},!0),s.doublePickFlyTo&&(h(),!s.firstPerson&&s.followPointer)){const s=e.aabb,n=d.getAABB3Center(s);t.pivotController.setPivotPos(n),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class Kp{constructor(e,t,s,n,i){this._scene=e;const r=e.input,a=[],o=e.canvas.canvas;let l=!0;this._onSceneMouseMove=r.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=r.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&n.mouseover&&(a[t]=!0,t===r.KEY_SHIFT&&(o.style.cursor="move"))})),this._onSceneKeyUp=r.on("keyup",(n=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(a[n]=!1,n===r.KEY_SHIFT&&(o.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(o=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const c=t.cameraControl,u=o.deltaTime/1e3;if(!s.planView){const e=c._isKeyDownForAction(c.ROTATE_Y_POS,a),n=c._isKeyDownForAction(c.ROTATE_Y_NEG,a),r=c._isKeyDownForAction(c.ROTATE_X_POS,a),o=c._isKeyDownForAction(c.ROTATE_X_NEG,a),l=u*s.keyboardRotationRate;(e||n||r||o)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?i.rotateDeltaY+=l:n&&(i.rotateDeltaY-=l),r?i.rotateDeltaX+=l:o&&(i.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!a[r.KEY_CTRL]&&!a[r.KEY_ALT]){const e=c._isKeyDownForAction(c.DOLLY_BACKWARDS,a),r=c._isKeyDownForAction(c.DOLLY_FORWARDS,a);if(e||r){const a=u*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),r?i.dollyDelta-=a:e&&(i.dollyDelta+=a),l&&(n.followPointerDirty=!0,l=!1)}}const h=c._isKeyDownForAction(c.PAN_FORWARDS,a),p=c._isKeyDownForAction(c.PAN_BACKWARDS,a),d=c._isKeyDownForAction(c.PAN_LEFT,a),A=c._isKeyDownForAction(c.PAN_RIGHT,a),f=c._isKeyDownForAction(c.PAN_UP,a),I=c._isKeyDownForAction(c.PAN_DOWN,a),m=(a[r.KEY_ALT]?.3:1)*u*s.keyboardPanRate;(h||p||d||A||f||I)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),I?i.panDeltaY+=m:f&&(i.panDeltaY+=-m),A?i.panDeltaX+=-m:d&&(i.panDeltaX+=m),p?i.panDeltaZ+=m:h&&(i.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const Yp=d.vec3();class Xp{constructor(e,t,s,n,i){this._scene=e;const r=e.camera,a=t.pickController,o=t.pivotController,l=t.panController;let c=1,u=1,h=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(i.dollyDelta)<.001&&(i.dollyDelta=0),Math.abs(i.rotateDeltaX)<.001&&(i.rotateDeltaX=0),Math.abs(i.rotateDeltaY)<.001&&(i.rotateDeltaY=0),0===i.rotateDeltaX&&0===i.rotateDeltaY||(i.dollyDelta=0),s.followPointer&&--c<=0&&(c=1,0!==i.dollyDelta)){if(0===i.rotateDeltaY&&0===i.rotateDeltaX&&s.followPointer&&n.followPointerDirty&&(a.pickCursorPos=n.pointerCanvasPos,a.schedulePickSurface=!0,a.update(),a.pickResult&&a.pickResult.worldPos?h=a.pickResult.worldPos:(u=1,h=null),n.followPointerDirty=!1),h){const t=Math.abs(d.lenVec3(d.subVec3(h,e.camera.eye,Yp)));u=t/s.dollyProximityThreshold}u{n.mouseover=!0}),r.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{n.mouseover=!1,r.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{Jp(e,r,n.pointerCanvasPos)}),r.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(Jp(e,r,n.pointerCanvasPos),n.mouseover=!0)}),r.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function Jp(e,t,s){if(e){const{x:n,y:i}=t.getBoundingClientRect();s[0]=e.clientX-n,s[1]=e.clientY-i}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const Zp=function(e,t){if(e){let s=e.target,n=0,i=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-n,t[1]=e.pageY-i}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class $p{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=d.vec2(),l=d.vec2(),c=d.vec2(),u=d.vec2(),h=[],p=this._scene.canvas.canvas;let A=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),p.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const i=t.touches,l=t.changedTouches;for(n.touchStartTime=Date.now(),1===i.length&&1===l.length&&(Zp(i[0],o),s.followPointer&&(r.pickCursorPos=o,r.schedulePickSurface=!0,r.update(),s.planView||(r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(a.setPivotPos(r.pickResult.worldPos),!s.firstPerson&&a.startPivot()&&a.showPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),!s.firstPerson&&a.startPivot()&&a.showPivot()))));h.length{a.getPivoting()&&a.endPivot()}),p.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const a=e.canvas.boundary,o=a[2],p=a[3],I=t.touches;if(t.touches.length===A){if(1===A){Zp(I[0],l),d.subVec2(l,h[0],u);const t=u[0],r=u[1];if(null!==n.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(r)>s.longTapRadius)&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),s.planView){const n=e.camera;if("perspective"===n.projection){const a=Math.abs(e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=t*a/p*s.touchPanRate,i.panDeltaY+=r*a/p*s.touchPanRate}else i.panDeltaX+=.5*n.ortho.scale*(t/p)*s.touchPanRate,i.panDeltaY+=.5*n.ortho.scale*(r/p)*s.touchPanRate}else i.rotateDeltaY-=t/o*(1*s.dragRotationRate),i.rotateDeltaX+=r/p*(1.5*s.dragRotationRate)}else if(2===A){const t=I[0],a=I[1];Zp(t,l),Zp(a,c);const o=d.geometricMeanVec2(h[0],h[1]),u=d.geometricMeanVec2(l,c),A=d.vec2();d.subVec2(o,u,A);const f=A[0],m=A[1],y=e.camera,v=d.distVec2([t.pageX,t.pageY],[a.pageX,a.pageY]),w=(d.distVec2(h[0],h[1])-v)*s.touchDollyRate;if(i.dollyDelta=w,Math.abs(w)<1)if("perspective"===y.projection){const t=r.pickResult?r.pickResult.worldPos:e.center,n=Math.abs(d.lenVec3(d.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);i.panDeltaX-=f*n/p*s.touchPanRate,i.panDeltaY-=m*n/p*s.touchPanRate}else i.panDeltaX-=.5*y.ortho.scale*(f/p)*s.touchPanRate,i.panDeltaY-=.5*y.ortho.scale*(m/p)*s.touchPanRate;n.pointerCanvasPos=u}for(let e=0;e{let n;s&&s.worldPos&&(n=s.worldPos);const i=s?s.entity.aabb:e.aabb;if(n){const s=e.camera;d.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})};p.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null);const i=e.touches,r=e.changedTouches;if(o=Date.now(),1===i.length&&1===r.length){u=o,ed(i[0],c);const r=c[0],a=c[1],l=i[0].pageX,h=i[0].pageY;n.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(h)],canvasPos:[Math.round(r),Math.round(a)],event:e},!0),n.longTouchTimeout=null}),s.longTapTimeout)}else u=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),i=e.touches,o=e.changedTouches,p=a.hasSubs("pickedSurface");null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),0===i.length&&1===o.length&&u>-1&&t-u<150&&(h>-1&&u-h<325?(ed(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=p,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("doublePicked",r.pickResult),r.pickedSurface&&a.fire("doublePickedSurface",r.pickResult),s.doublePickFlyTo&&A(r.pickResult)):(a.fire("doublePickedNothing"),s.doublePickFlyTo&&A()),h=-1):d.distVec2(l[0],c)<4&&(ed(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=p,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("picked",r.pickResult),r.pickedSurface&&a.fire("pickedSurface",r.pickResult)):a.fire("pickedNothing"),h=t),u=-1),l.length=i.length;for(let e=0,t=i.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:d.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:d.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new Mp(this,this._configs),pivotController:new Lp(s,this._configs),panController:new _p(s),cameraFlight:new Yh(this,{duration:.5})},this._handlers=[new qp(this.scene,this._controllers,this._configs,this._states,this._updates),new $p(this.scene,this._controllers,this._configs,this._states,this._updates),new Hp(this.scene,this._controllers,this._configs,this._states,this._updates),new Wp(this.scene,this._controllers,this._configs,this._states,this._updates),new zp(this.scene,this._controllers,this._configs,this._states,this._updates),new td(this.scene,this._controllers,this._configs,this._states,this._updates),new Kp(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new Xp(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",g.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,n=s.length;e0?ld(t):null,a=s&&s.length>0?ld(s):null,o=e=>{if(!e)return;var t=!0;(a&&a[e.type]||r&&!r[e.type])&&(t=!1),t&&n.push(e.id);const s=e.children;if(s)for(var i=0,l=s.length;i>t;s.sort(qu);const n=new Int32Array(e.length);for(let t=0,i=s.length;te[t+1]){let s=e[t];e[t]=e[t+1],e[t+1]=s}Ju=new Int32Array(e),t.sort(Zu);const s=new Int32Array(e.length);for(let n=0,i=t.length;nt){let s=e;e=t,t=s}function s(s,n){return s!==e?e-s:n!==t?t-n:0}let n=0,i=(r.length>>1)-1;for(;n<=i;){const e=i+n>>1,t=s(r[2*e],r[2*e+1]);if(t>0)n=e+1;else{if(!(t<0))return e;i=e-1}}return-n-1}const o=new Int32Array(r.length/2);o.fill(0);const l=n.length/3;if(l>8*(1<p.maxNumPositions&&(p=h()),p.bucketNumber>8)return[e];let A;-1===c[l]&&(c[l]=p.numPositions++,p.positionsCompressed.push(n[3*l]),p.positionsCompressed.push(n[3*l+1]),p.positionsCompressed.push(n[3*l+2])),-1===c[u]&&(c[u]=p.numPositions++,p.positionsCompressed.push(n[3*u]),p.positionsCompressed.push(n[3*u+1]),p.positionsCompressed.push(n[3*u+2])),-1===c[d]&&(c[d]=p.numPositions++,p.positionsCompressed.push(n[3*d]),p.positionsCompressed.push(n[3*d+1]),p.positionsCompressed.push(n[3*d+2])),p.indices.push(c[l]),p.indices.push(c[u]),p.indices.push(c[d]),(A=a(l,u))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(l,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]])),(A=a(u,d))>=0&&0===o[A]&&(o[A]=1,p.edgeIndices.push(c[r[2*A]]),p.edgeIndices.push(c[r[2*A+1]]))}const d=t/8*2,A=t/8,f=2*n.length+(i.length+r.length)*d;let I=0,m=-n.length/3;return u.forEach((e=>{I+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*A,m+=e.positionsCompressed.length/3})),I>f?[e]:(s&&function(e,t){const s={},n={};let i=0;e.forEach((e=>{const t=e.indices,r=e.edgeIndices,a=e.positionsCompressed;for(let e=0,n=t.length;e0){const e=t._meshes;for(let t=0,s=e.length;t0){const e=this._meshes;for(let t=0,s=e.length;t{this._viewMatrixDirty=!0})),this._meshesWithDirtyMatrices=[],this._numMeshesWithDirtyMatrices=0,this._onTick=this.scene.on("tick",(()=>{for(;this._numMeshesWithDirtyMatrices>0;)this._meshesWithDirtyMatrices[--this._numMeshesWithDirtyMatrices]._updateMatrix()})),this._createDefaultTextureSet(),this.visible=t.visible,this.culled=t.culled,this.pickable=t.pickable,this.clippable=t.clippable,this.collidable=t.collidable,this.castsShadow=t.castsShadow,this.receivesShadow=t.receivesShadow,this.xrayed=t.xrayed,this.highlighted=t.highlighted,this.selected=t.selected,this.edges=t.edges,this.colorize=t.colorize,this.opacity=t.opacity,this.backfaces=t.backfaces}_meshMatrixDirty(e){this._meshesWithDirtyMatrices[this._numMeshesWithDirtyMatrices++]=e}_createDefaultTextureSet(){const e=new Nu({id:"defaultColorTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new Nu({id:"defaultMetalRoughTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),s=new Nu({id:"defaultNormalsTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),n=new Nu({id:"defaultEmissiveTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),i=new Nu({id:"defaultOcclusionTexture",texture:new Ui({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=s,this._textures.defaultEmissiveTexture=n,this._textures.defaultOcclusionTexture=i,this._textureSets.defaultTextureSet=new Su({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:s,emissiveTexture:n,occlusionTexture:i})}get isPerformanceModel(){return!0}get transforms(){return this._transforms}get textures(){return this._textures}get textureSets(){return this._textureSets}get meshes(){return this._meshes}get objects(){return this._entities}get origin(){return this._origin}set position(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get position(){return this._position}set rotation(e){this._rotation.set(e||[0,0,0]),d.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get rotation(){return this._rotation}set quaternion(e){this._quaternion.set(e||[0,0,0,1]),d.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get quaternion(){return this._quaternion}set scale(e){}get scale(){return this._scale}set matrix(e){this._matrix.set(e||Ah),d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),d.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),d.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}get matrix(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix}get rotationMatrix(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}_rebuildMatrices(){this._matrixDirty&&(d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),d.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),d.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),d.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}get rotationMatrixConjugate(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}_setWorldMatrixDirty(){this._matrixDirty=!0,this._aabbDirty=!0}_transformDirty(){this._matrixDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0}_sceneModelDirty(){this.scene._aabbDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0,this._matrixDirty=!0;for(let e=0,t=this._entityList.length;e0}set visible(e){e=!1!==e,this._visible=e;for(let t=0,s=this._entityList.length;t0}set xrayed(e){e=!!e,this._xrayed=e;for(let t=0,s=this._entityList.length;t0}set highlighted(e){e=!!e,this._highlighted=e;for(let t=0,s=this._entityList.length;t0}set selected(e){e=!!e,this._selected=e;for(let t=0,s=this._entityList.length;t0}set edges(e){e=!!e,this._edges=e;for(let t=0,s=this._entityList.length;t0}set pickable(e){e=!1!==e,this._pickable=e;for(let t=0,s=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){const t=e.colors,s=new Uint8Array(t.length);for(let e=0,n=t.length;e{l.setImage(c,{minFilter:s,magFilter:n,wrapS:i,wrapT:r,wrapR:a,flipY:e.flipY,encoding:o}),this.glRedraw()},c.src=e.src;break;default:this._textureTranscoder?g.loadArraybuffer(e.src,(e=>{e.byteLength?this._textureTranscoder.transcode([e],l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'src': file data is zero length")}),(function(e){this.error(`[createTexture] Can't create texture from 'src': ${e}`)})):this.error(`[createTexture] Can't create texture from 'src' - SceneModel needs to be configured with a TextureTranscoder for this file type ('${t}')`)}}else e.buffers&&(this._textureTranscoder?this._textureTranscoder.transcode(e.buffers,l).then((()=>{this.glRedraw()})):this.error("[createTexture] Can't create texture from 'buffers' - SceneModel needs to be configured with a TextureTranscoder for this option"));this._textures[t]=new Nu({id:t,texture:l})}createTextureSet(e){const t=e.id;if(null==t)return void this.error("[createTextureSet] Config missing: id");if(this._textureSets[t])return void this.error(`[createTextureSet] Texture set already created: ${t}`);let s,n,i,r,a;if(void 0!==e.colorTextureId&&null!==e.colorTextureId){if(s=this._textures[e.colorTextureId],!s)return void this.error(`[createTextureSet] Texture not found: ${e.colorTextureId} - ensure that you create it first with createTexture()`)}else s=this._textures.defaultColorTexture;if(void 0!==e.metallicRoughnessTextureId&&null!==e.metallicRoughnessTextureId){if(n=this._textures[e.metallicRoughnessTextureId],!n)return void this.error(`[createTextureSet] Texture not found: ${e.metallicRoughnessTextureId} - ensure that you create it first with createTexture()`)}else n=this._textures.defaultMetalRoughTexture;if(void 0!==e.normalsTextureId&&null!==e.normalsTextureId){if(i=this._textures[e.normalsTextureId],!i)return void this.error(`[createTextureSet] Texture not found: ${e.normalsTextureId} - ensure that you create it first with createTexture()`)}else i=this._textures.defaultNormalsTexture;if(void 0!==e.emissiveTextureId&&null!==e.emissiveTextureId){if(r=this._textures[e.emissiveTextureId],!r)return void this.error(`[createTextureSet] Texture not found: ${e.emissiveTextureId} - ensure that you create it first with createTexture()`)}else r=this._textures.defaultEmissiveTexture;if(void 0!==e.occlusionTextureId&&null!==e.occlusionTextureId){if(a=this._textures[e.occlusionTextureId],!a)return void this.error(`[createTextureSet] Texture not found: ${e.occlusionTextureId} - ensure that you create it first with createTexture()`)}else a=this._textures.defaultOcclusionTexture;const o=new Su({id:t,model:this,colorTexture:s,metallicRoughnessTexture:n,normalsTexture:i,emissiveTexture:r,occlusionTexture:a});return this._textureSets[t]=o,o}createTransform(e){if(void 0===e.id||null===e.id)return void this.error("[createTransform] SceneModel.createTransform() config missing: id");if(this._transforms[e.id])return void this.error(`[createTransform] SceneModel already has a transform with this ID: ${e.id}`);let t;if(this.parentTransformId&&(t=this._transforms[e.parentTransformId],!t))return void this.error("[createTransform] SceneModel.createTransform() config missing: id");const s=new oh({id:e.id,model:this,parentTransform:t,matrix:e.matrix,position:e.position,scale:e.scale,rotation:e.rotation,quaternion:e.quaternion});return this._transforms[s.id]=s,s}createMesh(e){if(void 0===e.id||null===e.id)return this.error("[createMesh] SceneModel.createMesh() config missing: id"),!1;if(this._scheduledMeshes[e.id])return this.error(`[createMesh] SceneModel already has a mesh with this ID: ${e.id}`),!1;if(!(void 0!==e.geometryId)){if(void 0!==e.primitive&&null!==e.primitive||(e.primitive="triangles"),"points"!==e.primitive&&"lines"!==e.primitive&&"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)return this.error(`Unsupported value for 'primitive': '${primitive}' ('geometryId' is absent) - supported values are 'points', 'lines', 'triangles', 'solid' and 'surface'.`),!1;if(!e.positions&&!e.positionsCompressed&&!e.buckets)return this.error("Param expected: 'positions', 'positionsCompressed' or `buckets` ('geometryId' is absent)"),!1;if(e.positions&&(e.positionsDecodeMatrix||e.positionsDecodeBoundary))return this.error("Illegal params: 'positions' not expected with 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.positionsCompressed&&!e.positionsDecodeMatrix&&!e.positionsDecodeBoundary)return this.error("Param expected: 'positionsCompressed' should be accompanied by 'positionsDecodeMatrix'/'positionsDecodeBoundary' ('geometryId' is absent)"),!1;if(e.uvCompressed&&!e.uvDecodeMatrix)return this.error("Param expected: 'uvCompressed' should be accompanied by `uvDecodeMatrix` ('geometryId' is absent)"),!1;if(!(e.buckets||e.indices||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive)){const t=(e.positions||e.positionsCompressed).length/3;e.indices=this._createDefaultIndices(t)}if(!e.buckets&&!e.indices&&"points"!==e.primitive)return e.indices=this._createDefaultIndices(numIndices),this.error(`Param expected: indices (required for '${e.primitive}' primitive type)`),!1;if((e.matrix||e.position||e.rotation||e.scale)&&(e.positionsCompressed||e.positionsDecodeBoundary))return this.error("Unexpected params: 'matrix', 'rotation', 'scale', 'position' not allowed with 'positionsCompressed'"),!1;const t=!(!this._dtxEnabled||"triangles"!==e.primitive&&"solid"!==e.primitive&&"surface"!==e.primitive||e.textureSetId);if(e.origin=e.origin?d.addVec3(this._origin,e.origin,d.vec3()):this._origin,e.matrix)e.meshMatrix=e.matrix;else if(e.scale||e.rotation||e.position){const t=e.scale||uh,s=e.position||hh,n=e.rotation||ph;d.eulerToQuaternion(n,"XYZ",dh),e.meshMatrix=d.composeMat4(s,dh,t,d.mat4())}if(e.positionsDecodeBoundary&&(e.positionsDecodeMatrix=aa(e.positionsDecodeBoundary,d.mat4())),t){if(e.type=2,e.color=e.color?new Uint8Array([Math.floor(255*e.color[0]),Math.floor(255*e.color[1]),Math.floor(255*e.color[2])]):fh,e.opacity=void 0!==e.opacity&&null!==e.opacity?Math.floor(255*e.opacity):255,e.positions){const t=d.vec3(),s=[];Y(e.positions,s,t)&&(e.positions=s,e.origin=d.addVec3(e.origin,t,t))}if(e.positions){const t=d.collapseAABB3();e.positionsDecodeMatrix=d.mat4(),d.expandAABB3Points3(t,e.positions),e.positionsCompressed=ra(e.positions,t,e.positionsDecodeMatrix),e.aabb=t}else if(e.positionsCompressed){const t=d.collapseAABB3();d.expandAABB3Points3(t,e.positionsCompressed),Ut.decompressAABB(t,e.positionsDecodeMatrix),e.aabb=t}if(e.buckets){const t=d.collapseAABB3();for(let s=0,n=e.buckets.length;s>24&255,i=s>>16&255,r=s>>8&255,a=255&s;switch(e.pickColor=new Uint8Array([a,r,i,n]),e.solid="solid"===e.primitive,t.origin=d.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e),t.aabb=e.aabb;break;case 1:t.layer=this._getVBOBatchingLayer(e),t.aabb=e.aabb;break;case 0:t.layer=this._getVBOInstancingLayer(e),t.aabb=e.aabb}return e.transform&&(e.meshMatrix=e.transform.worldMatrix),t.portionId=t.layer.createPortion(t,e),t}_getNumPrimitives(e){let t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(let s=0,n=e.buckets.length;s>>0).toString(16)}_getVBOInstancingLayer(e){const t=this,s=e.origin,n=e.textureSetId||"-",i=e.geometryId,r=`${Math.round(s[0])}.${Math.round(s[1])}.${Math.round(s[2])}.${n}.${i}`;let a=this._vboInstancingLayers[r];if(a)return a;let o=e.textureSet;const l=e.geometry;for(;!a;)switch(l.primitive){case"triangles":case"surface":a=new uo({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!1});break;case"solid":a=new uo({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0,solid:!0});break;case"lines":a=new qo({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0});break;case"points":a=new kl({model:t,textureSet:o,geometry:l,origin:s,layerIndex:0})}return this._vboInstancingLayers[r]=a,this.layerList.push(a),a}createEntity(e){if(void 0===e.id?e.id=d.createUUID():this.scene.components[e.id]&&(this.error(`Scene already has a Component with this ID: ${e.id} - will assign random ID`),e.id=d.createUUID()),void 0===e.meshIds)return void this.error("Config missing: meshIds");let t=0;this._visible&&!1!==e.visible&&(t|=J),this._pickable&&!1!==e.pickable&&(t|=$),this._culled&&!1!==e.culled&&(t|=Z),this._clippable&&!1!==e.clippable&&(t|=ee),this._collidable&&!1!==e.collidable&&(t|=te),this._edges&&!1!==e.edges&&(t|=re),this._xrayed&&!1!==e.xrayed&&(t|=se),this._highlighted&&!1!==e.highlighted&&(t|=ne),this._selected&&!1!==e.selected&&(t|=ie),e.flags=t,this._createEntity(e)}_createEntity(e){let t=[];for(let s=0,n=e.meshIds.length;se.sortIdt.sortId?1:0));for(let e=0,t=this.layerList.length;e0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}_updateRenderFlagsVisibleLayers(){const e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(let t=0,s=this.layerList.length;t0)for(let e=0;e0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){const t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0){this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0))}if(this.numSelectedLayerPortions>0){const t=this.scene.selectedMaterial._state;t.fill&&(t.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){const t=this.scene.highlightMaterial._state;t.fill&&(t.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}drawColorOpaque(e){const t=this.renderFlags;for(let s=0,n=t.visibleLayers.length;s65536?16:8)}else a=[{positionsCompressed:n,indices:i,edgeIndices:r}];return a}class yh extends x{constructor(e,t={}){if(super(e,t),this._positions=t.positions||[],t.indices)this._indices=t.indices;else{this._indices=[];for(let e=0,t=this._positions.length/3-1;eA.has(e.id)||I.has(e.id)||f.has(e.id))).reduce(((e,s)=>{let n,i=function(e){let t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0"),t}(s.colorize);s.xrayed?(n=0===t.xrayMaterial.fillAlpha&&0!==t.xrayMaterial.edgeAlpha?.1:t.xrayMaterial.fillAlpha,n=Math.round(255*n).toString(16).padStart(2,"0"),i=n+i):A.has(s.id)&&(n=Math.round(255*s.opacity).toString(16).padStart(2,"0"),i=n+i),e[i]||(e[i]=[]);const r=s.id,a=s.originalSystemId,o={ifc_guid:a,originating_system:this.originatingSystem};return a!==r&&(o.authoring_tool_id=r),e[i].push(o),e}),{}),y=Object.entries(m).map((([e,t])=>({color:e,components:t})));r.components.coloring=y;const v=t.objectIds,w=t.visibleObjects,g=t.visibleObjectIds,E=v.filter((e=>!w[e])),T=t.selectedObjectIds;return e.defaultInvisible||g.length0&&e.clipping_planes.forEach((function(e){let t=Dh(e.location,vh),s=Dh(e.direction,vh);c&&d.negateVec3(s),d.subVec3(t,l),i.yUp&&(t=Ch(t),s=Ch(s)),new vi(n,{pos:t,dir:s})})),n.clearLines(),e.lines&&e.lines.length>0){const t=[],s=[];let i=0;e.lines.forEach((e=>{e.start_point&&e.end_point&&(t.push(e.start_point.x),t.push(e.start_point.y),t.push(e.start_point.z),t.push(e.end_point.x),t.push(e.end_point.y),t.push(e.end_point.z),s.push(i++),s.push(i++))})),new yh(n,{positions:t,indices:s,clippable:!1,collidable:!0})}if(n.clearBitmaps(),e.bitmaps&&e.bitmaps.length>0&&e.bitmaps.forEach((function(e){const t=e.bitmap_type||"jpg",s=e.bitmap_data;let r=Dh(e.location,wh),a=Dh(e.normal,gh),o=Dh(e.up,Eh),l=e.height||1;t&&s&&r&&a&&o&&(i.yUp&&(r=Ch(r),a=Ch(a),o=Ch(o)),new ar(n,{src:s,type:t,pos:r,normal:a,up:o,clippable:!1,collidable:!0,height:l}))})),o&&(n.setObjectsXRayed(n.xrayedObjectIds,!1),n.setObjectsHighlighted(n.highlightedObjectIds,!1),n.setObjectsSelected(n.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(n.setObjectsVisible(n.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!1))))):(n.setObjectsVisible(n.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((e=>this._withBCFComponent(t,e,(e=>e.visible=!0)))));const i=e.components.visibility.view_setup_hints;i&&(!1===i.spaces_visible&&n.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcSpace"),!0),void 0!==i.spaces_translucent&&n.setObjectsXRayed(s.metaScene.getObjectIDsByType("IfcSpace"),!0),i.space_boundaries_visible,!1===i.openings_visible&&n.setObjectsVisible(s.metaScene.getObjectIDsByType("IfcOpening"),!0),i.space_boundaries_translucent,void 0!==i.openings_translucent&&n.setObjectsXRayed(s.metaScene.getObjectIDsByType("IfcOpening"),!0))}e.components.selection&&(n.setObjectsSelected(n.selectedObjectIds,!1),e.components.selection.forEach((e=>this._withBCFComponent(t,e,(e=>e.selected=!0))))),e.components.translucency&&(n.setObjectsXRayed(n.xrayedObjectIds,!1),e.components.translucency.forEach((e=>this._withBCFComponent(t,e,(e=>e.xrayed=!0))))),e.components.coloring&&e.components.coloring.forEach((e=>{let s=e.color,n=0,i=!1;8===s.length&&(n=parseInt(s.substring(0,2),16)/256,n<=1&&n>=.95&&(n=1),s=s.substring(2),i=!0);const r=[parseInt(s.substring(0,2),16)/256,parseInt(s.substring(2,4),16)/256,parseInt(s.substring(4,6),16)/256];e.components.map((e=>this._withBCFComponent(t,e,(e=>{e.colorize=r,i&&(e.opacity=n)}))))}))}if(e.perspective_camera||e.orthogonal_camera){let o,c,u,h;if(e.perspective_camera?(o=Dh(e.perspective_camera.camera_view_point,vh),c=Dh(e.perspective_camera.camera_direction,vh),u=Dh(e.perspective_camera.camera_up_vector,vh),i.perspective.fov=e.perspective_camera.field_of_view,h="perspective"):(o=Dh(e.orthogonal_camera.camera_view_point,vh),c=Dh(e.orthogonal_camera.camera_direction,vh),u=Dh(e.orthogonal_camera.camera_up_vector,vh),i.ortho.scale=e.orthogonal_camera.view_to_world_scale,h="ortho"),d.subVec3(o,l),i.yUp&&(o=Ch(o),c=Ch(c),u=Ch(u)),r){const e=n.pick({pickSurface:!0,origin:o,direction:c});c=e?e.worldPos:d.addVec3(o,c,vh)}else c=d.addVec3(o,c,vh);a?(i.eye=o,i.look=c,i.up=u,i.projection=h):s.cameraFlight.flyTo({eye:o,look:c,up:u,duration:t.duration,projection:h})}}_withBCFComponent(e,t,s){const n=this.viewer,i=n.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){const r=t.authoring_tool_id,a=i.objects[r];if(a)return void s(a);if(e.updateCompositeObjects){if(n.metaScene.metaObjects[r])return void i.withObjects(n.metaScene.getObjectIDsInSubtree(r),s)}}if(t.ifc_guid){const r=t.ifc_guid,a=i.objects[r];if(a)return void s(a);if(e.updateCompositeObjects){if(n.metaScene.metaObjects[r])return void i.withObjects(n.metaScene.getObjectIDsInSubtree(r),s)}Object.keys(i.models).forEach((t=>{const a=d.globalizeObjectId(t,r),o=i.objects[a];if(o)s(o);else if(e.updateCompositeObjects){n.metaScene.metaObjects[a]&&i.withObjects(n.metaScene.getObjectIDsInSubtree(a),s)}}))}}destroy(){super.destroy()}}function bh(e){return{x:e[0],y:e[1],z:e[2]}}function Dh(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function Ph(e){return new Float64Array([e[0],-e[2],e[1]])}function Ch(e){return new Float64Array([e[0],e[2],-e[1]])}const _h=d.vec3(),Rh=(e,t,s,n)=>{var i=e-s,r=t-n;return Math.sqrt(i*i+r*r)};class Bh extends x{constructor(e,t={}){if(super(e.viewer.scene,t),this.plugin=e,this._container=t.container,!this._container)throw"config missing: container";this._eventSubs={};var s=this.plugin.viewer.scene;this._originMarker=new he(s,t.origin),this._targetMarker=new he(s,t.target),this._originWorld=d.vec3(),this._targetWorld=d.vec3(),this._wp=new Float64Array(24),this._vp=new Float64Array(24),this._pp=new Float64Array(24),this._cp=new Float64Array(8),this._xAxisLabelCulled=!1,this._yAxisLabelCulled=!1,this._zAxisLabelCulled=!1,this._color=t.color||this.plugin.defaultColor;const n=t.onMouseOver?e=>{t.onMouseOver(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,i=t.onMouseLeave?e=>{t.onMouseLeave(e,this),this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,r=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},a=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},o=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))},l=t.onContextMenu?e=>{t.onContextMenu(e,this)}:null,c=e=>{this.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))};this._originDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._targetDot=new de(this._container,{fillColor:this._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthWire=new pe(this._container,{color:this._color,thickness:2,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisWire=new pe(this._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisWire=new pe(this._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisWire=new pe(this._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._lengthLabel=new Ae(this._container,{fillColor:this._color,prefix:"",text:"",zIndex:void 0!==e.zIndex?e.zIndex+4:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._xAxisLabel=new Ae(this._container,{fillColor:"red",prefix:"X",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._yAxisLabel=new Ae(this._container,{fillColor:"green",prefix:"Y",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._zAxisLabel=new Ae(this._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:n,onMouseLeave:i,onMouseWheel:c,onMouseDown:r,onMouseUp:a,onMouseMove:o,onContextMenu:l}),this._wpDirty=!1,this._vpDirty=!1,this._cpDirty=!1,this._sectionPlanesDirty=!0,this._visible=!1,this._originVisible=!1,this._targetVisible=!1,this._wireVisible=!1,this._axisVisible=!1,this._xAxisVisible=!1,this._yAxisVisible=!1,this._zAxisVisible=!1,this._axisEnabled=!0,this._labelsVisible=!1,this._labelsOnWires=!1,this._clickable=!1,this._originMarker.on("worldPos",(e=>{this._originWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._targetMarker.on("worldPos",(e=>{this._targetWorld.set(e||[0,0,0]),this._wpDirty=!0,this._needUpdate(0)})),this._onViewMatrix=s.camera.on("viewMatrix",(()=>{this._vpDirty=!0,this._needUpdate(0)})),this._onProjMatrix=s.camera.on("projMatrix",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onCanvasBoundary=s.canvas.on("boundary",(()=>{this._cpDirty=!0,this._needUpdate(0)})),this._onMetricsUnits=s.metrics.on("units",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsScale=s.metrics.on("scale",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onMetricsOrigin=s.metrics.on("origin",(()=>{this._cpDirty=!0,this._needUpdate()})),this._onSectionPlaneUpdated=s.on("sectionPlaneUpdated",(()=>{this._sectionPlanesDirty=!0,this._needUpdate()})),this.approximate=t.approximate,this.visible=t.visible,this.originVisible=t.originVisible,this.targetVisible=t.targetVisible,this.wireVisible=t.wireVisible,this.axisVisible=t.axisVisible,this.xAxisVisible=t.xAxisVisible,this.yAxisVisible=t.yAxisVisible,this.zAxisVisible=t.zAxisVisible,this.labelsVisible=t.labelsVisible,this.labelsOnWires=t.labelsOnWires}_update(){if(!this._visible)return;const e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._targetWorld[0],this._wp[5]=this._originWorld[1],this._wp[6]=this._originWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._originWorld[2],this._wp[11]=1,this._wp[12]=this._targetWorld[0],this._wp[13]=this._targetWorld[1],this._wp[14]=this._targetWorld[2],this._wp[15]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&(d.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vp[15]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setCulled(!0),this._yAxisWire.setCulled(!0),this._zAxisWire.setCulled(!0),this._lengthWire.setCulled(!0),this._originDot.setCulled(!0),void this._targetDot.setCulled(!0);this._xAxisLabel.setCulled(!1),this._yAxisLabel.setCulled(!1),this._zAxisLabel.setCulled(!1),this._lengthLabel.setCulled(!1),this._xAxisWire.setCulled(!1),this._yAxisWire.setCulled(!1),this._zAxisWire.setCulled(!1),this._lengthWire.setCulled(!1),this._originDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}const t=this._originMarker.viewPos[2],s=this._targetMarker.viewPos[2];if(t>-.3||s>-.3)return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setVisible(!1),this._yAxisWire.setVisible(!1),this._zAxisWire.setVisible(!1),this._lengthWire.setVisible(!1),this._originDot.setVisible(!1),void this._targetDot.setVisible(!1);if(this._cpDirty){d.transformPositions4(e.camera.project.matrix,this._vp,this._pp);var n=this._pp,i=this._cp,r=e.canvas.canvas.getBoundingClientRect();const t=this._container.getBoundingClientRect();var a=r.top-t.top,o=r.left-t.left,l=e.canvas.boundary,c=l[2],u=l[3],h=0;const s=this.plugin.viewer.scene.metrics,f=s.scale,I=s.units,m=s.unitsInfo[I].abbrev;for(var p=0,A=n.length;p{const t=e.snappedCanvasPos||e.canvasPos;if(i=!0,r.set(e.worldPos),a.set(e.canvasPos),0===this._mouseState){const s=n.getBoundingClientRect(),i=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop,a=s.left+i,o=s.top+r;this._markerDiv.style.marginLeft=a+t[0]-5+"px",this._markerDiv.style.marginTop=o+t[1]-5+"px",this._markerDiv.style.background="pink",e.snappedToVertex||e.snappedToEdge?(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos,this.pointerLens.snapped=!0),this._markerDiv.style.background="greenyellow",this._markerDiv.style.border="2px solid green"):(this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.canvasPos,this.pointerLens.snapped=!1),this._markerDiv.style.background="pink",this._markerDiv.style.border="2px solid red"),c=e.entity}else this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px";n.style.cursor="pointer",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=this._currentDistanceMeasurementInitState.wireVisible,this._currentDistanceMeasurement.axisVisible=this._currentDistanceMeasurementInitState.axisVisible&&this.distanceMeasurementsPlugin.defaultAxisVisible,this._currentDistanceMeasurement.xAxisVisible=this._currentDistanceMeasurementInitState.xAxisVisible&&this.distanceMeasurementsPlugin.defaultXAxisVisible,this._currentDistanceMeasurement.yAxisVisible=this._currentDistanceMeasurementInitState.yAxisVisible&&this.distanceMeasurementsPlugin.defaultYAxisVisible,this._currentDistanceMeasurement.zAxisVisible=this._currentDistanceMeasurementInitState.zAxisVisible&&this.distanceMeasurementsPlugin.defaultZAxisVisible,this._currentDistanceMeasurement.targetVisible=this._currentDistanceMeasurementInitState.targetVisible,this._currentDistanceMeasurement.target.worldPos=r.slice(),this._markerDiv.style.marginLeft="-10000px",this._markerDiv.style.marginTop="-10000px")})),n.addEventListener("mousedown",this._onMouseDown=e=>{1===e.which&&(o=e.clientX,l=e.clientY)}),n.addEventListener("mouseup",this._onMouseUp=t=>{1===t.which&&(t.clientX>o+20||t.clientXl+20||t.clientY{this.pointerLens&&(this.pointerLens.visible=!0,this.pointerLens.canvasPos=e.canvasPos,this.pointerLens.snappedCanvasPos=e.snappedCanvasPos||e.canvasPos),i=!1,this._markerDiv.style.marginLeft="-100px",this._markerDiv.style.marginTop="-100px",this._currentDistanceMeasurement&&(this._currentDistanceMeasurement.wireVisible=!1,this._currentDistanceMeasurement.targetVisible=!1,this._currentDistanceMeasurement.axisVisible=!1),n.style.cursor="default"})),this._active=!0}deactivate(){if(!this._active)return;this.fire("activated",!1),this.pointerLens&&(this.pointerLens.visible=!1),this._markerDiv&&this._destroyMarkerDiv(),this.reset();const e=this.scene.canvas.canvas;e.removeEventListener("mousedown",this._onMouseDown),e.removeEventListener("mouseup",this._onMouseUp);const t=this.distanceMeasurementsPlugin.viewer.cameraControl;t.off(this._onCameraControlHoverSnapOrSurface),t.off(this._onCameraControlHoverSnapOrSurfaceOff),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null),this._active=!1}reset(){this._active&&(this._destroyMarkerDiv(),this._initMarkerDiv(),this._currentDistanceMeasurement&&(this.distanceMeasurementsPlugin.fire("measurementCancel",this._currentDistanceMeasurement),this._currentDistanceMeasurement.destroy(),this._currentDistanceMeasurement=null))}destroy(){this.deactivate(),super.destroy()}}class Nh extends Q{constructor(e,t={}){super("DistanceMeasurements",e),this._pointerLens=t.pointerLens,this._container=t.container||document.body,this._defaultControl=null,this._measurements={},this.labelMinAxisLength=t.labelMinAxisLength,this.defaultVisible=!1!==t.defaultVisible,this.defaultOriginVisible=!1!==t.defaultOriginVisible,this.defaultTargetVisible=!1!==t.defaultTargetVisible,this.defaultWireVisible=!1!==t.defaultWireVisible,this.defaultLabelsVisible=!1!==t.defaultLabelsVisible,this.defaultAxisVisible=!1!==t.defaultAxisVisible,this.defaultXAxisVisible=!1!==t.defaultXAxisVisible,this.defaultYAxisVisible=!1!==t.defaultYAxisVisible,this.defaultZAxisVisible=!1!==t.defaultZAxisVisible,this.defaultColor=void 0!==t.defaultColor?t.defaultColor:"#00BBFF",this.zIndex=t.zIndex||1e4,this.defaultLabelsOnWires=!1!==t.defaultLabelsOnWires,this._onMouseOver=(e,t)=>{this.fire("mouseOver",{plugin:this,distanceMeasurement:t,measurement:t,event:e})},this._onMouseLeave=(e,t)=>{this.fire("mouseLeave",{plugin:this,distanceMeasurement:t,measurement:t,event:e})},this._onContextMenu=(e,t)=>{this.fire("contextMenu",{plugin:this,distanceMeasurement:t,measurement:t,event:e})}}getContainerElement(){return this._container}send(e,t){}get pointerLens(){return this._pointerLens}get control(){return this._defaultControl||(this._defaultControl=new Sh(this,{})),this._defaultControl}get measurements(){return this._measurements}set labelMinAxisLength(e){e<1&&(this.error("labelMinAxisLength must be >= 1; defaulting to 25"),e=25),this._labelMinAxisLength=e||25}get labelMinAxisLength(){return this._labelMinAxisLength}createMeasurement(e={}){this.viewer.scene.components[e.id]&&(this.error("Viewer scene component with this ID already exists: "+e.id),delete e.id);const t=e.origin,s=e.target,n=new Bh(this,{id:e.id,plugin:this,container:this._container,origin:{entity:t.entity,worldPos:t.worldPos},target:{entity:s.entity,worldPos:s.worldPos},visible:e.visible,wireVisible:e.wireVisible,axisVisible:!1!==e.axisVisible&&!1!==this.defaultAxisVisible,xAxisVisible:!1!==e.xAxisVisible&&!1!==this.defaultXAxisVisible,yAxisVisible:!1!==e.yAxisVisible&&!1!==this.defaultYAxisVisible,zAxisVisible:!1!==e.zAxisVisible&&!1!==this.defaultZAxisVisible,labelsVisible:!1!==e.labelsVisible&&!1!==this.defaultLabelsVisible,originVisible:e.originVisible,targetVisible:e.targetVisible,color:e.color,labelsOnWires:!1!==e.labelsOnWires&&!1!==this.defaultLabelsOnWires,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[n.id]=n,n.on("destroyed",(()=>{delete this._measurements[n.id]})),this.fire("measurementCreated",n),n}destroyMeasurement(e){const t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("DistanceMeasurement not found: "+e)}setLabelsShown(e){for(const[t,s]of Object.entries(this.measurements))s.labelShown=e}setAxisVisible(e){for(const[t,s]of Object.entries(this.measurements))s.axisVisible=e;this.defaultAxisVisible=e}getAxisVisible(){return this.defaultAxisVisible}clear(){const e=Object.keys(this._measurements);for(var t=0,s=e.length;t{s=1e3*this._delayBeforeRestoreSeconds,n||(e.scene._renderer.setColorTextureEnabled(!this._hideColorTexture),e.scene._renderer.setPBREnabled(!this._hidePBR),e.scene._renderer.setSAOEnabled(!this._hideSAO),e.scene._renderer.setTransparentEnabled(!this._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!this._hideEdges),this._scaleCanvasResolution?e.scene.canvas.resolutionScale=this._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,n=!0)};this._onCanvasBoundary=e.scene.canvas.on("boundary",i),this._onCameraMatrix=e.scene.camera.on("matrix",i),this._onSceneTick=e.scene.on("tick",(t=>{n&&(s-=t.deltaTime,(!this._delayBeforeRestore||s<=0)&&(e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),n=!1))}));let r=!1;this._onSceneMouseDown=e.scene.input.on("mousedown",(()=>{r=!0})),this._onSceneMouseUp=e.scene.input.on("mouseup",(()=>{r=!1})),this._onSceneMouseMove=e.scene.input.on("mousemove",(()=>{r&&i()}))}get hideColorTexture(){return this._hideColorTexture}set hideColorTexture(e){this._hideColorTexture=e}get hidePBR(){return this._hidePBR}set hidePBR(e){this._hidePBR=e}get hideSAO(){return this._hideSAO}set hideSAO(e){this._hideSAO=e}get hideEdges(){return this._hideEdges}set hideEdges(e){this._hideEdges=e}get hideTransparentObjects(){return this._hideTransparentObjects}set hideTransparentObjects(e){this._hideTransparentObjects=!1!==e}get scaleCanvasResolution(){return this._scaleCanvasResolution}set scaleCanvasResolution(e){this._scaleCanvasResolution=e}get scaleCanvasResolutionFactor(){return this._scaleCanvasResolutionFactor}set scaleCanvasResolutionFactor(e){this._scaleCanvasResolutionFactor=e||.6}get delayBeforeRestore(){return this._delayBeforeRestore}set delayBeforeRestore(e){this._delayBeforeRestore=e}get delayBeforeRestoreSeconds(){return this._delayBeforeRestoreSeconds}set delayBeforeRestoreSeconds(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}send(e,t){}destroy(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),super.destroy()}}class Lh{constructor(){}getMetaModel(e,t,s){g.loadJSON(e,(e=>{t(e)}),(function(e){s(e)}))}getGLTF(e,t,s){g.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getGLB(e,t,s){g.loadArraybuffer(e,(e=>{t(e)}),(function(e){s(e)}))}getArrayBuffer(e,t,s,n){!function(e,t,s,n){var i=()=>{};s=s||i,n=n||i;const r=/^data:(.*?)(;base64)?,(.*)$/,a=t.match(r);if(a){const e=!!a[2];var o=a[3];o=window.decodeURIComponent(o),e&&(o=window.atob(o));try{const e=new ArrayBuffer(o.length),t=new Uint8Array(e);for(var l=0;l{s(e)}),(function(e){n(e)}))}}class Mh{constructor(e={}){this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=e.messages,this.locale=e.locale}set messages(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}loadMessages(e={}){for(let t in e)this._messages[t]=e[t];this.messages=this._messages}clearMessages(){this.messages={}}get locales(){return this._locales}set locale(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}get locale(){return this._locale}translate(e,t){const s=this._messages[this._locale];if(!s)return null;const n=Fh(e,s);return n?t?Hh(n,t):n:null}translatePlurals(e,t,s){const n=this._messages[this._locale];if(!n)return null;let i=Fh(e,n);return i=0===(t=parseInt(""+t,10))?i.zero:t>1?i.other:i.one,i?(i=Hh(i,[t]),s&&(i=Hh(i,s)),i):null}fire(e,t,s){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==s&&(this._events[e]=t||!0);const n=this._eventSubs[e];if(n)for(const e in n)if(n.hasOwnProperty(e)){n[e].callback(t)}}on(t,s){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new e),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});let n=this._eventSubs[t];n||(n={},this._eventSubs[t]=n);const i=this._eventSubIDMap.addItem();n[i]={callback:s},this._eventSubEvents[i]=t;const r=this._events[t];return void 0!==r&&s(r),i}off(e){if(null==e)return;if(!this._eventSubEvents)return;const t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];const s=this._eventSubs[t];s&&delete s[e],this._eventSubIDMap.removeItem(e)}}}function Fh(e,t){if(t[e])return t[e];const s=e.split(".");let n=t;for(let e=0,t=s.length;n&&e1?1:e}get t(){return this._t}get tangent(){return this.getTangent(this._t)}get length(){var e=this._getLengths();return e[e.length-1]}getTangent(e){var t=1e-4;void 0===e&&(e=this._t);var s=e-t,n=e+t;s<0&&(s=0),n>1&&(n=1);var i=this.getPoint(s),r=this.getPoint(n),a=d.subVec3(r,i,[]);return d.normalizeVec3(a,[])}getPointAt(e){var t=this.getUToTMapping(e);return this.getPoint(t)}getPoints(e){e||(e=5);var t,s=[];for(t=0;t<=e;t++)s.push(this.getPoint(t/e));return s}_getLengths(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,s,n=[],i=this.getPoint(0),r=0;for(n.push(0),s=1;s<=e;s++)t=this.getPoint(s/e),r+=d.lenVec3(d.subVec3(t,i,[])),n.push(r),i=t;return this.cacheArcLengths=n,n}_updateArcLengths(){this.needsUpdate=!0,this._getLengths()}getUToTMapping(e,t){var s,n=this._getLengths(),i=0,r=n.length;s=t||e*n[r-1];for(var a,o=0,l=r-1;o<=l;)if((a=n[i=Math.floor(o+(l-o)/2)]-s)<0)o=i+1;else{if(!(a>0)){l=i;break}l=i-1}if(n[i=l]===s)return i/(r-1);var c=n[i];return(i+(s-c)/(n[i+1]-c))/(r-1)}}class Gh extends Uh{constructor(e,t={}){super(e,t),this.points=t.points,this.t=t.t}set points(e){this._points=e||[]}get points(){return this._points}set t(e){e=e||0,this._t=e<0?0:e>1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=this.points;if(!(t.length<3)){var s=(t.length-1)*e,n=Math.floor(s),i=s-n,r=t[0===n?n:n-1],a=t[n],o=t[n>t.length-2?t.length-1:n+1],l=t[n>t.length-3?t.length-1:n+2],c=d.vec3();return c[0]=d.catmullRomInterpolate(r[0],a[0],o[0],l[0],i),c[1]=d.catmullRomInterpolate(r[1],a[1],o[1],l[1],i),c[2]=d.catmullRomInterpolate(r[2],a[2],o[2],l[2],i),c}this.error("Can't sample point from SplineCurve - not enough points on curve - returning [0,0,0].")}getJSON(){return{points:points,t:this._t}}}const jh=d.vec3();class Vh extends x{get type(){return"CameraPath"}constructor(e,t={}){super(e,t),this._frames=[],this._eyeCurve=new Gh(this),this._lookCurve=new Gh(this),this._upCurve=new Gh(this),t.frames&&(this.addFrames(t.frames),this.smoothFrameTimes(1))}get frames(){return this._frames}get eyeCurve(){return this._eyeCurve}get lookCurve(){return this._lookCurve}get upCurve(){return this._upCurve}saveFrame(e){const t=this.scene.camera;this.addFrame(e,t.eye,t.look,t.up)}addFrame(e,t,s,n){const i={t:e,eye:t.slice(0),look:s.slice(0),up:n.slice(0)};this._frames.push(i),this._eyeCurve.points.push(i.eye),this._lookCurve.points.push(i.look),this._upCurve.points.push(i.up)}addFrames(e){let t;for(let s=0,n=e.length;s1?1:e,t.eye=this._eyeCurve.getPoint(e,jh),t.look=this._lookCurve.getPoint(e,jh),t.up=this._upCurve.getPoint(e,jh)}sampleFrame(e,t,s,n){e=e<0?0:e>1?1:e,this._eyeCurve.getPoint(e,t),this._lookCurve.getPoint(e,s),this._upCurve.getPoint(e,n)}smoothFrameTimes(e){if(0===this._frames.length)return;const t=d.vec3();var s=0;this._frames[0].t=0;const n=[];for(let e=1,r=this._frames.length;e=1;e>1&&(e=1);const s=this.easing?Yh._ease(e,0,1,1):e,n=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?(d.subVec3(n.eye,n.look,Kh),n.eye=d.lerpVec3(s,0,1,this._eye1,this._eye2,Wh),n.look=d.subVec3(Wh,Kh,Qh)):this._flyingLook&&(n.look=d.lerpVec3(s,0,1,this._look1,this._look2,Qh),n.up=d.lerpVec3(s,0,1,this._up1,this._up2,zh)):this._flyingEyeLookUp&&(n.eye=d.lerpVec3(s,0,1,this._eye1,this._eye2,Wh),n.look=d.lerpVec3(s,0,1,this._look1,this._look2,Qh),n.up=d.lerpVec3(s,0,1,this._up1,this._up2,zh)),this._projection2){const t="ortho"===this._projection2?Yh._easeOutExpo(e,0,1,1):Yh._easeInCubic(e,0,1,1);n.customProjection.matrix=d.lerpMat4(t,0,1,this._projMatrix1,this._projMatrix2)}else n.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return n.ortho.scale=this._orthoScale2,void this.stop();B.scheduleTask(this._update,this)}static _ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}static _easeInCubic(e,t,s,n){return s*(e/=n)*e*e+t}static _easeOutExpo(e,t,s,n){return s*(1-Math.pow(2,-10*e/n))+t}stop(){if(!this._flying)return;this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);const e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}cancel(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}set duration(e){this._duration=e?1e3*e:500,this.stop()}get duration(){return this._duration/1e3}set fit(e){this._fit=!1!==e}get fit(){return this._fit}set fitFOV(e){this._fitFOV=e||45}get fitFOV(){return this._fitFOV}set trail(e){this._trail=!!e}get trail(){return this._trail}destroy(){this.stop(),super.destroy()}}class Xh extends x{get type(){return"CameraPathAnimation"}constructor(e,t={}){super(e,t),this._cameraFlightAnimation=new Yh(this),this._t=0,this.state=Xh.SCRUBBING,this._playingFromT=0,this._playingToT=0,this._playingRate=t.playingRate||1,this._playingDir=1,this._lastTime=null,this.cameraPath=t.cameraPath,this._tick=this.scene.on("tick",this._updateT,this)}_updateT(){const e=this._cameraPath;if(!e)return;let t,s;const n=performance.now(),i=this._lastTime?.001*(n-this._lastTime):0;if(this._lastTime=n,0!==i)switch(this.state){case Xh.SCRUBBING:return;case Xh.PLAYING:if(this._t+=this._playingRate*i,t=this._cameraPath.frames.length,0===t||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=Xh.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case Xh.PLAYING_TO:s=this._t+this._playingRate*i*this._playingDir,(this._playingDir<0&&s<=this._playingToT||this._playingDir>0&&s>=this._playingToT)&&(s=this._playingToT,this.state=Xh.SCRUBBING,this.fire("stopped")),this._t=s,e.loadFrame(this._t)}}_ease(e,t,s,n){return-s*(e/=n)*(e-2)+t}set cameraPath(e){this._cameraPath=e}get cameraPath(){return this._cameraPath}set rate(e){this._playingRate=e}get rate(){return this._playingRate}play(){this._cameraPath&&(this._lastTime=null,this.state=Xh.PLAYING)}playToT(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=Xh.PLAYING_TO)}playToFrame(e){const t=this._cameraPath;if(!t)return;const s=t.frames[e];s?this.playToT(s.t):this.error("playToFrame - frame index out of range: "+e)}flyToFrame(e,t){const s=this._cameraPath;if(!s)return;const n=s.frames[e];n?(this.state=Xh.SCRUBBING,this._cameraFlightAnimation.flyTo(n,t)):this.error("flyToFrame - frame index out of range: "+e)}scrubToT(e){const t=this._cameraPath;if(!t)return;this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=Xh.SCRUBBING)}scrubToFrame(e){const t=this._cameraPath;if(!t)return;if(!this.scene.camera)return;t.frames[e]?(t.loadFrame(this._t),this.state=Xh.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)}stop(){this.state=Xh.SCRUBBING,this.fire("stopped")}destroy(){super.destroy(),this.scene.off(this._tick)}}Xh.STOPPED=0,Xh.SCRUBBING=1,Xh.PLAYING=2,Xh.PLAYING_TO=3;const qh=d.vec3(),Jh=d.vec3();d.vec3();const Zh=d.vec3([0,-1,0]),$h=d.vec4([0,0,0,1]);class ep extends x{constructor(e,t={}){super(e,t),this._src=null,this._image=null,this._pos=d.vec3(),this._origin=d.vec3(),this._rtcPos=d.vec3(),this._dir=d.vec3(),this._size=1,this._imageSize=d.vec2(),this._texture=new Wi(this),this._plane=new pi(this,{geometry:new Vt(this,sr({center:[0,0,0],xSize:1,zSize:1,xSegments:10,zSegments:10})),material:new Kt(this,{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:this._texture,emissiveMap:this._texture,backfaces:!0}),clippable:t.clippable}),this._grid=new pi(this,{geometry:new Vt(this,tr({size:1,divisions:10})),material:new Kt(this,{diffuse:[0,0,0],ambient:[0,0,0],emissive:[.2,.8,.2]}),position:[0,.001,0],clippable:t.clippable}),this._node=new Ri(this,{rotation:[0,0,0],position:[0,0,0],scale:[1,1,1],clippable:!1,children:[this._plane,this._grid]}),this._gridVisible=!1,this.visible=!0,this.gridVisible=t.gridVisible,this.position=t.position,this.rotation=t.rotation,this.dir=t.dir,this.size=t.size,this.collidable=t.collidable,this.clippable=t.clippable,this.pickable=t.pickable,this.opacity=t.opacity,t.image?this.image=t.image:this.src=t.src}set visible(e){this._plane.visible=e,this._grid.visible=this._gridVisible&&e}get visible(){return this._plane.visible}set gridVisible(e){e=!1!==e,this._gridVisible=e,this._grid.visible=this._gridVisible&&this.visible}get gridVisible(){return this._gridVisible}set image(e){this._image=e,this._image&&(this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage(),this._src=null,this._texture.image=this._image)}get image(){return this._image}set src(e){if(this._src=e,this._src){this._image=null;const e=new Image;e.onload=()=>{this._texture.image=e,this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage()},e.src=this._src}}get src(){return this._src}set position(e){this._pos.set(e||[0,0,0]),K(this._pos,this._origin,this._rtcPos),this._node.origin=this._origin,this._node.position=this._rtcPos}get position(){return this._pos}set rotation(e){this._node.rotation=e}get rotation(){return this._node.rotation}set size(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}get size(){return this._size}set dir(e){if(this._dir.set(e||[0,0,-1]),e){const t=this.scene.center,s=[-this._dir[0],-this._dir[1],-this._dir[2]];d.subVec3(t,this.position,qh);const n=-d.dotVec3(s,qh);d.normalizeVec3(s),d.mulVec3Scalar(s,n,Jh),d.vec3PairToQuaternion(Zh,e,$h),this._node.quaternion=$h}}get dir(){return this._dir}set collidable(e){this._node.collidable=!1!==e}get collidable(){return this._node.collidable}set clippable(e){this._node.clippable=!1!==e}get clippable(){return this._node.clippable}set pickable(e){this._node.pickable=!1!==e}get pickable(){return this._node.pickable}set opacity(e){this._node.opacity=e}get opacity(){return this._node.opacity}destroy(){super.destroy()}_updatePlaneSizeFromImage(){const e=this._size,t=this._imageSize[0],s=this._imageSize[1];if(t>s){const n=s/t;this._node.scale=[e,1,e*n]}else{const n=t/s;this._node.scale=[e*n,1,e]}}}class tp extends _t{get type(){return"PointLight"}constructor(e,t={}){super(e,t);const s=this;this._shadowRenderBuf=null,this._shadowViewMatrix=null,this._shadowProjMatrix=null,this._shadowViewMatrixDirty=!0,this._shadowProjMatrixDirty=!0;const n=this.scene.camera,i=this.scene.canvas;this._onCameraViewMatrix=n.on("viewMatrix",(()=>{this._shadowViewMatrixDirty=!0})),this._onCameraProjMatrix=n.on("projMatrix",(()=>{this._shadowProjMatrixDirty=!0})),this._onCanvasBoundary=i.on("boundary",(()=>{this._shadowProjMatrixDirty=!0})),this._state=new at({type:"point",pos:d.vec3([1,1,1]),color:d.vec3([.7,.7,.8]),intensity:1,attenuation:[0,0,0],space:t.space||"view",castsShadow:!1,getShadowViewMatrix:()=>{if(s._shadowViewMatrixDirty){s._shadowViewMatrix||(s._shadowViewMatrix=d.identityMat4());const e=s._state.pos,t=n.look,i=n.up;d.lookAtMat4v(e,t,i,s._shadowViewMatrix),s._shadowViewMatrixDirty=!1}return s._shadowViewMatrix},getShadowProjMatrix:()=>{if(s._shadowProjMatrixDirty){s._shadowProjMatrix||(s._shadowProjMatrix=d.identityMat4());const e=s.scene.canvas.canvas;d.perspectiveMat4(Math.PI/180*70,e.clientWidth/e.clientHeight,.1,500,s._shadowProjMatrix),s._shadowProjMatrixDirty=!1}return s._shadowProjMatrix},getShadowRenderBuf:()=>(s._shadowRenderBuf||(s._shadowRenderBuf=new et(s.scene.canvas.canvas,s.scene.canvas.gl,{size:[1024,1024]})),s._shadowRenderBuf)}),this.pos=t.pos,this.color=t.color,this.intensity=t.intensity,this.constantAttenuation=t.constantAttenuation,this.linearAttenuation=t.linearAttenuation,this.quadraticAttenuation=t.quadraticAttenuation,this.castsShadow=t.castsShadow,this.scene._lightCreated(this)}set pos(e){this._state.pos.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}get pos(){return this._state.pos}set color(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}get color(){return this._state.color}set intensity(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}get intensity(){return this._state.intensity}set constantAttenuation(e){this._state.attenuation[0]=e||0,this.glRedraw()}get constantAttenuation(){return this._state.attenuation[0]}set linearAttenuation(e){this._state.attenuation[1]=e||0,this.glRedraw()}get linearAttenuation(){return this._state.attenuation[1]}set quadraticAttenuation(e){this._state.attenuation[2]=e||0,this.glRedraw()}get quadraticAttenuation(){return this._state.attenuation[2]}set castsShadow(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}get castsShadow(){return this._state.castsShadow}destroy(){const e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),super.destroy(),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}function sp(e){if(!np(e.width)||!np(e.height)){const t=document.createElement("canvas");t.width=ip(e.width),t.height=ip(e.height);t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}function np(e){return 0==(e&e-1)}function ip(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}class rp extends x{get type(){return"CubeTexture"}constructor(e,t={}){super(e,t);const s=this.scene.canvas.gl;this._state=new at({texture:new Ui({gl:s,target:s.TEXTURE_CUBE_MAP}),flipY:this._checkFlipY(t.minFilter),encoding:this._checkEncoding(t.encoding),minFilter:1008,magFilter:1006,wrapS:1001,wrapT:1001,mipmaps:!0}),this._src=t.src,this._images=[],this._loadSrc(t.src),m.memory.textures++}_checkFlipY(e){return!!e}_checkEncoding(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}_webglContextRestored(){this.scene.canvas.gl,this._state.texture=null,this._src&&this._loadSrc(this._src)}_loadSrc(e){const t=this,s=this.scene.canvas.gl;this._images=[];let n=!1,i=0;for(let r=0;r{this._texture.image=e,this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage()},e.src=this._src}}get src(){return this._src}set size(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}get size(){return this._size}set collidable(e){this._mesh.collidable=!1!==e}get collidable(){return this._mesh.collidable}set clippable(e){this._mesh.clippable=!1!==e}get clippable(){return this._mesh.clippable}set pickable(e){this._mesh.pickable=!1!==e}get pickable(){return this._mesh.pickable}set opacity(e){this._mesh.opacity=e}get opacity(){return this._mesh.opacity}_updatePlaneSizeFromImage(){const e=.5*this._size,t=this._imageSize[0],s=this._imageSize[1],n=s/t;this._geometry.positions=t>s?[e,e*n,0,-e,e*n,0,-e,-e*n,0,e,-e*n,0]:[e/n,e,0,-e/n,e,0,-e/n,-e,0,e/n,-e,0]}}class cp{constructor(e){this._eye=d.vec3(),this._look=d.vec3(),this._up=d.vec3(),this._projection={},e&&this.saveCamera(e)}saveCamera(e){const t=e.camera,s=t.project;switch(this._eye.set(t.eye),this._look.set(t.look),this._up.set(t.up),t.projection){case"perspective":this._projection={projection:"perspective",fov:s.fov,fovAxis:s.fovAxis,near:s.near,far:s.far};break;case"ortho":this._projection={projection:"ortho",scale:s.scale,near:s.near,far:s.far};break;case"frustum":this._projection={projection:"frustum",left:s.left,right:s.right,top:s.top,bottom:s.bottom,near:s.near,far:s.far};break;case"custom":this._projection={projection:"custom",matrix:s.matrix.slice()}}}restoreCamera(e,t){const s=e.camera,n=this._projection;function i(){switch(n.type){case"perspective":s.perspective.fov=n.fov,s.perspective.fovAxis=n.fovAxis,s.perspective.near=n.near,s.perspective.far=n.far;break;case"ortho":s.ortho.scale=n.scale,s.ortho.near=n.near,s.ortho.far=n.far;break;case"frustum":s.frustum.left=n.left,s.frustum.right=n.right,s.frustum.top=n.top,s.frustum.bottom=n.bottom,s.frustum.near=n.near,s.frustum.far=n.far;break;case"custom":s.customProjection.matrix=n.matrix}}t?e.viewer.cameraFlight.flyTo({eye:this._eye,look:this._look,up:this._up,orthoScale:n.scale,projection:n.projection},(()=>{i(),t()})):(s.eye=this._eye,s.look=this._look,s.up=this._up,i(),s.projection=n.projection)}}const up=d.vec3();class hp{constructor(e){if(this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,e){const t=e.metaScene.scene;this.saveObjects(t,e)}}saveObjects(e,t,s){this.numObjects=0,this._mask=s?g.apply(s,{}):null;const n=!s||s.visible,i=!s||s.edges,r=!s||s.xrayed,a=!s||s.highlighted,o=!s||s.selected,l=!s||s.clippable,c=!s||s.pickable,u=!s||s.colorize,h=!s||s.opacity,p=t.metaObjects,d=e.objects;for(let e=0,t=p.length;e1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=d.vec3();return t[0]=d.b3(e,this._v0[0],this._v1[0],this._v2[0],this._v3[0]),t[1]=d.b3(e,this._v0[1],this._v1[1],this._v2[1],this._v3[1]),t[2]=d.b3(e,this._v0[2],this._v1[2],this._v2[2],this._v3[2]),t}getJSON(){return{v0:this._v0,v1:this._v1,v2:this._v2,v3:this._v3,t:this._t}}}class fp extends Uh{constructor(e,t={}){super(e,t),this._cachedLengths=[],this._dirty=!0,this._curves=[],this._t=0,this._dirtySubs=[],this._destroyedSubs=[],this.curves=t.curves||[],this.t=t.t}addCurve(e){this._curves.push(e),this._dirty=!0}set curves(e){var t,s,n;for(e=e||[],s=0,n=this._curves.length;s1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}get length(){var e=this._getCurveLengths();return e[e.length-1]}getPoint(e){for(var t,s=e*this.length,n=this._getCurveLengths(),i=0;i=s){var r=1-(n[i]-s)/(t=this._curves[i]).length;return t.getPointAt(r)}i++}return null}_getCurveLengths(){if(!this._dirty)return this._cachedLengths;var e,t=[],s=0,n=this._curves.length;for(e=0;e1?1:e}get t(){return this._t}get point(){return this.getPoint(this._t)}getPoint(e){var t=d.vec3();return t[0]=d.b2(e,this._v0[0],this._v1[0],this._v2[0]),t[1]=d.b2(e,this._v0[1],this._v1[1],this._v2[1]),t[2]=d.b2(e,this._v0[2],this._v1[2],this._v2[2]),t}getJSON(){return{v0:this._v0,v1:this._v1,v2:this._v2,t:this._t}}}class mp extends Ih{constructor(e,t={}){super(e,t)}}class yp extends x{constructor(e,t={}){super(e,t),this._skyboxMesh=new pi(this,{geometry:new Vt(this,{primitive:"triangles",positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),background:!0,scale:[2e3,2e3,2e3],rotation:[0,-90,0],material:new Kt(this,{ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],emissive:[1,1,1],emissiveMap:new Wi(this,{src:t.src,flipY:!0,wrapS:"clampToEdge",wrapT:"clampToEdge",encoding:t.encoding||"sRGB"}),backfaces:!0}),visible:!1,pickable:!1,clippable:!1,collidable:!1}),this.size=t.size,this.active=t.active}set size(e){this._size=e||1e3,this._skyboxMesh.scale=[this._size,this._size,this._size]}get size(){return this._size}set active(e){this._skyboxMesh.visible=e}get active(){return this._skyboxMesh.visible}}class vp{transcode(e,t,s={}){}destroy(){}}const wp=d.vec4(),gp=d.vec4(),Ep=d.vec3(),Tp=d.vec3(),bp=d.vec3(),Dp=d.vec4(),Pp=d.vec4(),Cp=d.vec4();class _p{constructor(e){this._scene=e}dollyToCanvasPos(e,t,s){let n=!1;const i=this._scene.camera;if(e){const t=d.subVec3(e,i.eye,Ep);n=d.lenVec3(t){this._cameraDirty=!0})),this._onProjMatrix=this._scene.camera.on("projMatrix",(()=>{this._cameraDirty=!0})),this._onTick=this._scene.on("tick",(()=>{this.updatePivotElement(),this.updatePivotSphere()}))}createPivotSphere(){const e=this.getPivotPos(),t=d.vec3();d.decomposeMat4(d.inverseMat4(this._scene.viewer.camera.viewMatrix,d.mat4()),t,d.vec4(),d.vec3());const s=d.distVec3(t,e);let n=Math.tan(Math.PI/500)*s*this._pivotSphereSize;"ortho"==this._scene.camera.projection&&(n/=this._scene.camera.ortho.scale/2),K(e,this._rtcCenter,this._rtcPos),this._pivotSphereGeometry=new Xi(this._scene,fi({radius:n})),this._pivotSphere=new pi(this._scene,{geometry:this._pivotSphereGeometry,material:this._pivotSphereMaterial,pickable:!1,position:this._rtcPos,rtcCenter:this._rtcCenter})}destroyPivotSphere(){this._pivotSphere&&(this._pivotSphere.destroy(),this._pivotSphere=null),this._pivotSphereGeometry&&(this._pivotSphereGeometry.destroy(),this._pivotSphereGeometry=null)}updatePivotElement(){const e=this._scene.camera,t=this._scene.canvas;if(this._pivoting&&this._cameraDirty){d.transformPoint3(e.viewMatrix,this.getPivotPos(),this._pivotViewPos),this._pivotViewPos[3]=1,d.transformPoint4(e.projMatrix,this._pivotViewPos,this._pivotProjPos);const s=t.boundary,n=s[2],i=s[3];this._pivotCanvasPos[0]=Math.floor((1+this._pivotProjPos[0]/this._pivotProjPos[3])*n/2),this._pivotCanvasPos[1]=Math.floor((1-this._pivotProjPos[1]/this._pivotProjPos[3])*i/2);let r=t._lastBoundingClientRect;if(!r||t._canvasSizeChanged){const e=t.canvas;r=t._lastBoundingClientRect=e.getBoundingClientRect()}this._pivotElement&&(this._pivotElement.style.left=Math.floor(r.left+this._pivotCanvasPos[0])-this._pivotElement.clientWidth/2+window.scrollX+"px",this._pivotElement.style.top=Math.floor(r.top+this._pivotCanvasPos[1])-this._pivotElement.clientHeight/2+window.scrollY+"px"),this._cameraDirty=!1}}updatePivotSphere(){this._pivoting&&this._pivotSphere&&(K(this.getPivotPos(),this._rtcCenter,this._rtcPos),d.compareVec3(this._rtcPos,this._pivotSphere.position)||(this.destroyPivotSphere(),this.createPivotSphere()))}setPivotElement(e){this._pivotElement=e}enablePivotSphere(e={}){this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);const t=e.color||[1,0,0];this._pivotSphereMaterial=new Kt(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}disablePivotSphere(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}startPivot(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;const e=this._scene.camera;let t=d.lookAtMat4v(e.eye,e.look,e.worldUp);d.transformPoint3(t,this.getPivotPos(),this._cameraOffset);const s=this.getPivotPos();this._cameraOffset[2]+=d.distVec3(e.eye,s),t=d.inverseMat4(t);const n=d.transformVec3(t,this._cameraOffset),i=d.vec3();if(d.subVec3(e.eye,s,i),d.addVec3(i,n),e.zUp){const e=i[1];i[1]=i[2],i[2]=e}this._radius=d.lenVec3(i),this._polar=Math.acos(i[1]/this._radius),this._azimuth=Math.atan2(i[0],i[2]),this._pivoting=!0}_cameraLookingDownwards(){const e=this._scene.camera,t=d.normalizeVec3(d.subVec3(e.look,e.eye,Rp)),s=d.cross3Vec3(t,e.worldUp,Bp);return d.sqLenVec3(s)<=1e-4}getPivoting(){return this._pivoting}setPivotPos(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}setCanvasPivotPos(e){const t=this._scene.camera,s=Math.abs(d.distVec3(this._scene.center,t.eye)),n=t.project.transposedMatrix,i=n.subarray(8,12),r=n.subarray(12),a=[0,0,-1,1],o=d.dotVec4(a,i)/d.dotVec4(a,r),l=Sp;t.project.unproject(e,o,Np,xp,l);const c=d.normalizeVec3(d.subVec3(l,t.eye,Rp)),u=d.addVec3(t.eye,d.mulVec3Scalar(c,s,Bp),Op);this.setPivotPos(u)}getPivotPos(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}continuePivot(e,t){if(!this._pivoting)return;if(0===e&&0===t)return;const s=this._scene.camera;var n=-e;const i=-t;1===s.worldUp[2]&&(n=-n),this._azimuth+=.01*-n,this._polar+=.01*i,this._polar=d.clamp(this._polar,.001,Math.PI-.001);const r=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===s.worldUp[2]){const e=r[1];r[1]=r[2],r[2]=e}const a=d.lenVec3(d.subVec3(s.look,s.eye,d.vec3())),o=this.getPivotPos();d.addVec3(r,o);let l=d.lookAtMat4v(r,o,s.worldUp);l=d.inverseMat4(l);const c=d.transformVec3(l,this._cameraOffset);l[12]-=c[0],l[13]-=c[1],l[14]-=c[2];const u=[l[8],l[9],l[10]];s.eye=[l[12],l[13],l[14]],d.subVec3(s.eye,d.mulVec3Scalar(u,a),s.look),s.up=[l[4],l[5],l[6]],this.showPivot()}showPivot(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}hidePivot(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}endPivot(){this._pivoting=!1}destroy(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}class Mp{constructor(e,t){this._scene=e.scene,this._cameraControl=e,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=t,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=d.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._lastHash=null,this._needFireEvents=0}update(){if(!this._configs.pointerEnabled)return;if(!this.schedulePickEntity&&!this.schedulePickSurface)return;const e=`${~~this.pickCursorPos[0]}-${~~this.pickCursorPos[1]}-${this.scheduleSnapOrPick}-${this.schedulePickSurface}-${this.schedulePickEntity}`;if(this._lastHash===e)return;this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1;const t=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){const e=this._scene.pick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});e&&(e.snappedToEdge||e.snappedToVertex)?(this.snapPickResult=e,this.snappedOrPicked=!0,this._needFireEvents++):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){const e=this.pickResult.canvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents+=t?1:0,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){const e=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(e[0]===this.pickCursorPos[0]&&e[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents++):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents++)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents++)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}fireEvents(){if(0!==this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,pointerPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){const e=new Se;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.worldPos,e.canvasPos=this.pickCursorPos,e.snappedCanvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){const e=this.pickResult.entity.id;this._lastPickedEntityId!==e&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=e)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=0}}}const Fp=d.vec2();class Hp{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController;let a,o,l,c=0,u=0,h=0,p=0,A=!1;const f=d.vec3();let I=!0;const m=this._scene.canvas.canvas,y=[];function v(e=!0){m.style.cursor="move",c=n.pointerCanvasPos[0],u=n.pointerCanvasPos[1],h=n.pointerCanvasPos[0],p=n.pointerCanvasPos[1],e&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(A=!0,f.set(r.pickResult.worldPos)):A=!1)}document.addEventListener("keydown",this._documentKeyDownHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!0}),document.addEventListener("keyup",this._documentKeyUpHandler=t=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;const n=t.keyCode;y[n]=!1}),m.addEventListener("mousedown",this._mouseDownHandler=t=>{if(s.active&&s.pointerEnabled)switch(t.which){case 1:y[e.input.KEY_SHIFT]||s.planView?(a=!0,v()):(a=!0,v(!1));break;case 2:o=!0,v();break;case 3:l=!0,s.panRightClick&&v()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=()=>{if(!s.active||!s.pointerEnabled)return;if(!a&&!o&&!l)return;const t=e.canvas.boundary,r=t[2],h=t[3],p=n.pointerCanvasPos[0],I=n.pointerCanvasPos[1];if(y[e.input.KEY_SHIFT]||s.planView||!s.panRightClick&&o||s.panRightClick&&l){const t=p-c,s=I-u,n=e.camera;if("perspective"===n.projection){const r=Math.abs(A?d.lenVec3(d.subVec3(f,e.camera.eye,[])):e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=1.5*t*r/h,i.panDeltaY+=1.5*s*r/h}else i.panDeltaX+=.5*n.ortho.scale*(t/h),i.panDeltaY+=.5*n.ortho.scale*(s/h)}else!a||o||l||s.planView||(s.firstPerson?(i.rotateDeltaY-=(p-c)/r*s.dragRotationRate/2,i.rotateDeltaX+=(I-u)/h*(s.dragRotationRate/4)):(i.rotateDeltaY-=(p-c)/r*(1.5*s.dragRotationRate),i.rotateDeltaX+=(I-u)/h*(1.5*s.dragRotationRate)));c=p,u=I}),m.addEventListener("mousemove",this._canvasMouseMoveHandler=e=>{s.active&&s.pointerEnabled&&n.mouseover&&(I=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{if(s.active&&s.pointerEnabled)switch(e.which){case 1:case 2:case 3:a=!1,o=!1,l=!1}}),m.addEventListener("mouseup",this._mouseUpHandler=e=>{if(s.active&&s.pointerEnabled){if(3===e.which){!function(e,t){if(e){let s=e.target,n=0,i=0,r=0,a=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,r+=s.scrollLeft,a+=s.scrollTop,s=s.offsetParent;t[0]=e.pageX+r-n,t[1]=e.pageY+a-i}else e=window.event,t[0]=e.x,t[1]=e.y}(e,Fp);const s=Fp[0],n=Fp[1];Math.abs(s-h)<3&&Math.abs(n-p)<3&&t.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:Fp,event:e},!0)}m.style.removeProperty("cursor")}}),m.addEventListener("mouseenter",this._mouseEnterHandler=()=>{s.active&&s.pointerEnabled});const w=1/60;let g=null;m.addEventListener("wheel",this._mouseWheelHandler=e=>{if(!s.active||!s.pointerEnabled)return;const t=performance.now()/1e3;var r=null!==g?t-g:0;g=t,r>.05&&(r=.05),r{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const a=i._isKeyDownForAction(i.AXIS_VIEW_RIGHT),o=i._isKeyDownForAction(i.AXIS_VIEW_BACK),l=i._isKeyDownForAction(i.AXIS_VIEW_LEFT),c=i._isKeyDownForAction(i.AXIS_VIEW_FRONT),u=i._isKeyDownForAction(i.AXIS_VIEW_TOP),h=i._isKeyDownForAction(i.AXIS_VIEW_BOTTOM);if(!(a||o||l||c||u||h))return;const p=e.aabb,A=d.getAABB3Diag(p);d.getAABB3Center(p,Up);const f=Math.abs(A/Math.tan(t.cameraFlight.fitFOV*d.DEGTORAD)),I=1.1*A;Qp.orthoScale=I,a?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldRight,f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):o?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldForward,f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):l?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldRight,-f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):c?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldForward,-f,Gp),kp)),Qp.look.set(Up),Qp.up.set(r.worldUp)):u?(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldUp,f,Gp),kp)),Qp.look.set(Up),Qp.up.set(d.normalizeVec3(d.mulVec3Scalar(r.worldForward,1,jp),Vp))):h&&(Qp.eye.set(d.addVec3(Up,d.mulVec3Scalar(r.worldUp,-f,Gp),kp)),Qp.look.set(Up),Qp.up.set(d.normalizeVec3(d.mulVec3Scalar(r.worldForward,-1,jp)))),!s.firstPerson&&s.followPointer&&t.pivotController.setPivotPos(Up),t.cameraFlight.duration>0?t.cameraFlight.flyTo(Qp,(()=>{t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot()})):(t.cameraFlight.jumpTo(Qp),t.pivotController.getPivoting()&&s.followPointer&&t.pivotController.showPivot())}))}reset(){}destroy(){this._scene.input.off(this._onSceneKeyDown)}}class zp{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=t.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;let l=!1,c=!1;const u=this._scene.canvas.canvas,h=s=>{let n;s&&s.worldPos&&(n=s.worldPos);const i=s&&s.entity?s.entity.aabb:e.aabb;if(n){const s=e.camera;d.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})},p=e.tickify(this._canvasMouseMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(l||c)return;const i=o.hasSubs("hover"),a=o.hasSubs("hoverEnter"),u=o.hasSubs("hoverOut"),h=o.hasSubs("hoverOff"),p=o.hasSubs("hoverSurface"),d=o.hasSubs("hoverSnapOrSurface");if(i||a||u||h||p||d)if(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=p,r.scheduleSnapOrPick=d,r.update(),r.pickResult){if(r.pickResult.entity){const t=r.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),o.fire("hoverEnter",r.pickResult,!0),this._lastPickedEntityId=t)}o.fire("hover",r.pickResult,!0),(r.pickResult.worldPos||r.pickResult.snappedWorldPos)&&o.fire("hoverSurface",r.pickResult,!0)}else void 0!==this._lastPickedEntityId&&(o.fire("hoverOut",{entity:e.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),o.fire("hoverOff",{canvasPos:r.pickCursorPos},!0)});u.addEventListener("mousemove",p),u.addEventListener("mousedown",this._canvasMouseDownHandler=t=>{1===t.which&&(l=!0),3===t.which&&(c=!0);if(1===t.which&&s.active&&s.pointerEnabled&&(n.mouseDownClientX=t.clientX,n.mouseDownClientY=t.clientY,n.mouseDownCursorX=n.pointerCanvasPos[0],n.mouseDownCursorY=n.pointerCanvasPos[1],!s.firstPerson&&s.followPointer&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickSurface=!0,r.update(),1===t.which))){const t=r.pickResult;t&&t.worldPos?(a.setPivotPos(t.worldPos),a.startPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),a.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=e=>{1===e.which&&(l=!1),3===e.which&&(c=!1),a.getPivoting()&&a.endPivot()}),u.addEventListener("mouseup",this._canvasMouseUpHandler=i=>{if(!s.active||!s.pointerEnabled)return;if(!(1===i.which))return;if(a.hidePivot(),Math.abs(i.clientX-n.mouseDownClientX)>3||Math.abs(i.clientY-n.mouseDownClientY)>3)return;const l=o.hasSubs("picked"),c=o.hasSubs("pickedNothing"),u=o.hasSubs("pickedSurface"),p=o.hasSubs("doublePicked"),A=o.hasSubs("doublePickedSurface"),f=o.hasSubs("doublePickedNothing");if(!(s.doublePickFlyTo||p||A||f))return(l||c||u)&&(r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=!0,r.schedulePickSurface=u,r.update(),r.pickResult?(o.fire("picked",r.pickResult,!0),r.pickedSurface&&o.fire("pickedSurface",r.pickResult,!0)):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0)),void(this._clicks=0);if(this._clicks++,1===this._clicks){r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo,r.schedulePickSurface=u,r.update();const e=r.pickResult,i=r.pickedSurface;this._timeout=setTimeout((()=>{e?(o.fire("picked",e,!0),i&&(o.fire("pickedSurface",e,!0),!s.firstPerson&&s.followPointer&&(t.pivotController.setPivotPos(e.worldPos),t.pivotController.startPivot()&&t.pivotController.showPivot()))):o.fire("pickedNothing",{canvasPos:n.pointerCanvasPos},!0),this._clicks=0}),s.doubleClickTimeFrame)}else{if(null!==this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null),r.pickCursorPos=n.pointerCanvasPos,r.schedulePickEntity=s.doublePickFlyTo||p||A,r.schedulePickSurface=r.schedulePickEntity&&A,r.update(),r.pickResult){if(o.fire("doublePicked",r.pickResult,!0),r.pickedSurface&&o.fire("doublePickedSurface",r.pickResult,!0),s.doublePickFlyTo&&(h(r.pickResult),!s.firstPerson&&s.followPointer)){const e=r.pickResult.entity.aabb,s=d.getAABB3Center(e);t.pivotController.setPivotPos(s),t.pivotController.startPivot()&&t.pivotController.showPivot()}}else if(o.fire("doublePickedNothing",{canvasPos:n.pointerCanvasPos},!0),s.doublePickFlyTo&&(h(),!s.firstPerson&&s.followPointer)){const s=e.aabb,n=d.getAABB3Center(s);t.pivotController.setPivotPos(n),t.pivotController.startPivot()&&t.pivotController.showPivot()}this._clicks=0}},!1)}reset(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}destroy(){const e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}class Kp{constructor(e,t,s,n,i){this._scene=e;const r=e.input,a=[],o=e.canvas.canvas;let l=!0;this._onSceneMouseMove=r.on("mousemove",(()=>{l=!0})),this._onSceneKeyDown=r.on("keydown",(t=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&n.mouseover&&(a[t]=!0,t===r.KEY_SHIFT&&(o.style.cursor="move"))})),this._onSceneKeyUp=r.on("keyup",(n=>{s.active&&s.pointerEnabled&&e.input.keyboardEnabled&&(a[n]=!1,n===r.KEY_SHIFT&&(o.style.cursor=null),t.pivotController.getPivoting()&&t.pivotController.endPivot())})),this._onTick=e.on("tick",(o=>{if(!s.active||!s.pointerEnabled||!e.input.keyboardEnabled)return;if(!n.mouseover)return;const c=t.cameraControl,u=o.deltaTime/1e3;if(!s.planView){const e=c._isKeyDownForAction(c.ROTATE_Y_POS,a),n=c._isKeyDownForAction(c.ROTATE_Y_NEG,a),r=c._isKeyDownForAction(c.ROTATE_X_POS,a),o=c._isKeyDownForAction(c.ROTATE_X_NEG,a),l=u*s.keyboardRotationRate;(e||n||r||o)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),e?i.rotateDeltaY+=l:n&&(i.rotateDeltaY-=l),r?i.rotateDeltaX+=l:o&&(i.rotateDeltaX-=l),!s.firstPerson&&s.followPointer&&t.pivotController.startPivot())}if(!a[r.KEY_CTRL]&&!a[r.KEY_ALT]){const e=c._isKeyDownForAction(c.DOLLY_BACKWARDS,a),r=c._isKeyDownForAction(c.DOLLY_FORWARDS,a);if(e||r){const a=u*s.keyboardDollyRate;!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),r?i.dollyDelta-=a:e&&(i.dollyDelta+=a),l&&(n.followPointerDirty=!0,l=!1)}}const h=c._isKeyDownForAction(c.PAN_FORWARDS,a),p=c._isKeyDownForAction(c.PAN_BACKWARDS,a),d=c._isKeyDownForAction(c.PAN_LEFT,a),A=c._isKeyDownForAction(c.PAN_RIGHT,a),f=c._isKeyDownForAction(c.PAN_UP,a),I=c._isKeyDownForAction(c.PAN_DOWN,a),m=(a[r.KEY_ALT]?.3:1)*u*s.keyboardPanRate;(h||p||d||A||f||I)&&(!s.firstPerson&&s.followPointer&&t.pivotController.startPivot(),I?i.panDeltaY+=m:f&&(i.panDeltaY+=-m),A?i.panDeltaX+=-m:d&&(i.panDeltaX+=m),p?i.panDeltaZ+=m:h&&(i.panDeltaZ+=-m))}))}reset(){}destroy(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}const Yp=d.vec3();class Xp{constructor(e,t,s,n,i){this._scene=e;const r=e.camera,a=t.pickController,o=t.pivotController,l=t.panController;let c=1,u=1,h=null;this._onTick=e.on("tick",(()=>{if(!s.active||!s.pointerEnabled)return;let t="default";if(Math.abs(i.dollyDelta)<.001&&(i.dollyDelta=0),Math.abs(i.rotateDeltaX)<.001&&(i.rotateDeltaX=0),Math.abs(i.rotateDeltaY)<.001&&(i.rotateDeltaY=0),0===i.rotateDeltaX&&0===i.rotateDeltaY||(i.dollyDelta=0),s.followPointer&&--c<=0&&(c=1,0!==i.dollyDelta)){if(0===i.rotateDeltaY&&0===i.rotateDeltaX&&s.followPointer&&n.followPointerDirty&&(a.pickCursorPos=n.pointerCanvasPos,a.schedulePickSurface=!0,a.update(),a.pickResult&&a.pickResult.worldPos?h=a.pickResult.worldPos:(u=1,h=null),n.followPointerDirty=!1),h){const t=Math.abs(d.lenVec3(d.subVec3(h,e.camera.eye,Yp)));u=t/s.dollyProximityThreshold}u{n.mouseover=!0}),r.addEventListener("mouseleave",this._mouseLeaveHandler=()=>{n.mouseover=!1,r.style.cursor=null}),document.addEventListener("mousemove",this._mouseMoveHandler=e=>{Jp(e,r,n.pointerCanvasPos)}),r.addEventListener("mousedown",this._mouseDownHandler=e=>{s.active&&s.pointerEnabled&&(Jp(e,r,n.pointerCanvasPos),n.mouseover=!0)}),r.addEventListener("mouseup",this._mouseUpHandler=e=>{s.active&&s.pointerEnabled})}reset(){}destroy(){const e=this._scene.canvas.canvas;document.removeEventListener("mousemove",this._mouseMoveHandler),e.removeEventListener("mouseenter",this._mouseEnterHandler),e.removeEventListener("mouseleave",this._mouseLeaveHandler),e.removeEventListener("mousedown",this._mouseDownHandler),e.removeEventListener("mouseup",this._mouseUpHandler)}}function Jp(e,t,s){if(e){const{x:n,y:i}=t.getBoundingClientRect();s[0]=e.clientX-n,s[1]=e.clientY-i}else e=window.event,s[0]=e.x,s[1]=e.y;return s}const Zp=function(e,t){if(e){let s=e.target,n=0,i=0;for(;s.offsetParent;)n+=s.offsetLeft,i+=s.offsetTop,s=s.offsetParent;t[0]=e.pageX-n,t[1]=e.pageY-i}else e=window.event,t[0]=e.x,t[1]=e.y;return t};class $p{constructor(e,t,s,n,i){this._scene=e;const r=t.pickController,a=t.pivotController,o=d.vec2(),l=d.vec2(),c=d.vec2(),u=d.vec2(),h=[],p=this._scene.canvas.canvas;let A=0,f=!1;this._onTick=e.on("tick",(()=>{f=!1})),p.addEventListener("touchstart",this._canvasTouchStartHandler=t=>{if(!s.active||!s.pointerEnabled)return;t.preventDefault();const i=t.touches,l=t.changedTouches;for(n.touchStartTime=Date.now(),1===i.length&&1===l.length&&(Zp(i[0],o),s.followPointer&&(r.pickCursorPos=o,r.schedulePickSurface=!0,r.update(),s.planView||(r.picked&&r.pickedSurface&&r.pickResult&&r.pickResult.worldPos?(a.setPivotPos(r.pickResult.worldPos),!s.firstPerson&&a.startPivot()&&a.showPivot()):(s.smartPivot?a.setCanvasPivotPos(n.pointerCanvasPos):a.setPivotPos(e.camera.look),!s.firstPerson&&a.startPivot()&&a.showPivot()))));h.length{a.getPivoting()&&a.endPivot()}),p.addEventListener("touchmove",this._canvasTouchMoveHandler=t=>{if(!s.active||!s.pointerEnabled)return;if(t.stopPropagation(),t.preventDefault(),f)return;f=!0;const a=e.canvas.boundary,o=a[2],p=a[3],I=t.touches;if(t.touches.length===A){if(1===A){Zp(I[0],l),d.subVec2(l,h[0],u);const t=u[0],r=u[1];if(null!==n.longTouchTimeout&&(Math.abs(t)>s.longTapRadius||Math.abs(r)>s.longTapRadius)&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),s.planView){const n=e.camera;if("perspective"===n.projection){const a=Math.abs(e.camera.eyeLookDist)*Math.tan(n.perspective.fov/2*Math.PI/180);i.panDeltaX+=t*a/p*s.touchPanRate,i.panDeltaY+=r*a/p*s.touchPanRate}else i.panDeltaX+=.5*n.ortho.scale*(t/p)*s.touchPanRate,i.panDeltaY+=.5*n.ortho.scale*(r/p)*s.touchPanRate}else i.rotateDeltaY-=t/o*(1*s.dragRotationRate),i.rotateDeltaX+=r/p*(1.5*s.dragRotationRate)}else if(2===A){const t=I[0],a=I[1];Zp(t,l),Zp(a,c);const o=d.geometricMeanVec2(h[0],h[1]),u=d.geometricMeanVec2(l,c),A=d.vec2();d.subVec2(o,u,A);const f=A[0],m=A[1],y=e.camera,v=d.distVec2([t.pageX,t.pageY],[a.pageX,a.pageY]),w=(d.distVec2(h[0],h[1])-v)*s.touchDollyRate;if(i.dollyDelta=w,Math.abs(w)<1)if("perspective"===y.projection){const t=r.pickResult?r.pickResult.worldPos:e.center,n=Math.abs(d.lenVec3(d.subVec3(t,e.camera.eye,[])))*Math.tan(y.perspective.fov/2*Math.PI/180);i.panDeltaX-=f*n/p*s.touchPanRate,i.panDeltaY-=m*n/p*s.touchPanRate}else i.panDeltaX-=.5*y.ortho.scale*(f/p)*s.touchPanRate,i.panDeltaY-=.5*y.ortho.scale*(m/p)*s.touchPanRate;n.pointerCanvasPos=u}for(let e=0;e{let n;s&&s.worldPos&&(n=s.worldPos);const i=s?s.entity.aabb:e.aabb;if(n){const s=e.camera;d.subVec3(s.eye,s.look,[]),t.cameraFlight.flyTo({aabb:i})}else t.cameraFlight.flyTo({aabb:i})};p.addEventListener("touchstart",this._canvasTouchStartHandler=e=>{if(!s.active||!s.pointerEnabled)return;null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null);const i=e.touches,r=e.changedTouches;if(o=Date.now(),1===i.length&&1===r.length){u=o,ed(i[0],c);const r=c[0],a=c[1],l=i[0].pageX,h=i[0].pageY;n.longTouchTimeout=setTimeout((()=>{t.cameraControl.fire("rightClick",{pagePos:[Math.round(l),Math.round(h)],canvasPos:[Math.round(r),Math.round(a)],event:e},!0),n.longTouchTimeout=null}),s.longTapTimeout)}else u=-1;for(;l.length{if(!s.active||!s.pointerEnabled)return;const t=Date.now(),i=e.touches,o=e.changedTouches,p=a.hasSubs("pickedSurface");null!==n.longTouchTimeout&&(clearTimeout(n.longTouchTimeout),n.longTouchTimeout=null),0===i.length&&1===o.length&&u>-1&&t-u<150&&(h>-1&&u-h<325?(ed(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=p,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("doublePicked",r.pickResult),r.pickedSurface&&a.fire("doublePickedSurface",r.pickResult),s.doublePickFlyTo&&A(r.pickResult)):(a.fire("doublePickedNothing"),s.doublePickFlyTo&&A()),h=-1):d.distVec2(l[0],c)<4&&(ed(o[0],r.pickCursorPos),r.schedulePickEntity=!0,r.schedulePickSurface=p,r.update(),r.pickResult?(r.pickResult.touchInput=!0,a.fire("picked",r.pickResult),r.pickedSurface&&a.fire("pickedSurface",r.pickResult)):a.fire("pickedNothing"),h=t),u=-1),l.length=i.length;for(let e=0,t=i.length;e{e.preventDefault()},this._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},this._states={pointerCanvasPos:d.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:d.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},this._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};const s=this.scene;this._controllers={cameraControl:this,pickController:new Mp(this,this._configs),pivotController:new Lp(s,this._configs),panController:new _p(s),cameraFlight:new Yh(this,{duration:.5})},this._handlers=[new qp(this.scene,this._controllers,this._configs,this._states,this._updates),new $p(this.scene,this._controllers,this._configs,this._states,this._updates),new Hp(this.scene,this._controllers,this._configs,this._states,this._updates),new Wp(this.scene,this._controllers,this._configs,this._states,this._updates),new zp(this.scene,this._controllers,this._configs,this._states,this._updates),new td(this.scene,this._controllers,this._configs,this._states,this._updates),new Kp(this.scene,this._controllers,this._configs,this._states,this._updates)],this._cameraUpdater=new Xp(this.scene,this._controllers,this._configs,this._states,this._updates),this.navMode=t.navMode,t.planView&&(this.planView=t.planView),this.constrainVertical=t.constrainVertical,t.keyboardLayout?this.keyboardLayout=t.keyboardLayout:this.keyMap=t.keyMap,this.doublePickFlyTo=t.doublePickFlyTo,this.panRightClick=t.panRightClick,this.active=t.active,this.followPointer=t.followPointer,this.rotationInertia=t.rotationInertia,this.keyboardPanRate=t.keyboardPanRate,this.touchPanRate=t.touchPanRate,this.keyboardRotationRate=t.keyboardRotationRate,this.dragRotationRate=t.dragRotationRate,this.touchDollyRate=t.touchDollyRate,this.dollyInertia=t.dollyInertia,this.dollyProximityThreshold=t.dollyProximityThreshold,this.dollyMinSpeed=t.dollyMinSpeed,this.panInertia=t.panInertia,this.pointerEnabled=!0,this.keyboardDollyRate=t.keyboardDollyRate,this.mouseWheelDollyRate=t.mouseWheelDollyRate}set keyMap(e){if(e=e||"qwerty",g.isString(e)){const t=this.scene.input,s={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":s[this.PAN_LEFT]=[t.KEY_A],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_Z],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":s[this.PAN_LEFT]=[t.KEY_Q],s[this.PAN_RIGHT]=[t.KEY_D],s[this.PAN_UP]=[t.KEY_W],s[this.PAN_DOWN]=[t.KEY_X],s[this.PAN_BACKWARDS]=[],s[this.PAN_FORWARDS]=[],s[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],s[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],s[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],s[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],s[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],s[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],s[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],s[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],s[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],s[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],s[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],s[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=s}else{const t=e;this._keyMap=t}}get keyMap(){return this._keyMap}_isKeyDownForAction(e,t){const s=this._keyMap[e];if(!s)return!1;t||(t=this.scene.input.keyDown);for(let e=0,n=s.length;e0?ld(t):null,a=s&&s.length>0?ld(s):null,o=e=>{if(!e)return;var t=!0;(a&&a[e.type]||r&&!r[e.type])&&(t=!1),t&&n.push(e.id);const s=e.children;if(s)for(var i=0,l=s.length;i * Copyright (c) 2022 Niklas von Hertzen diff --git a/dist/xeokit-sdk.min.es5.js b/dist/xeokit-sdk.min.es5.js index 2e0bff0a11..c4b8455f29 100644 --- a/dist/xeokit-sdk.min.es5.js +++ b/dist/xeokit-sdk.min.es5.js @@ -1,4 +1,4 @@ -var e,t=s().mark(GT),n=s().mark(kT),r=s().mark(ZP);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(o&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;b(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function o(e,t,n,r,i,a,s){try{var o=e[a](s),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,l,"next",e)}function l(e){o(a,r,i,s,l,"throw",e)}s(void 0)}))}}function u(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);s=!0);}catch(e){o=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};b(this,e),this._id=k.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==n.hideOnMouseDown&&(document.addEventListener("mousedown",(function(e){e.target.classList.contains("xeokit-context-menu-item")||t.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=function(e){e.target.classList.contains("xeokit-context-menu-item")||t.hide()})),n.items&&(this.items=n.items),this._hideOnAction=!1!==n.hideOnAction,this.context=n.context,this.enabled=!1!==n.enabled,this.hide()}return P(e,[{key:"on",value:function(e,t){var n=this._eventSubs[e];n||(n=[],this._eventSubs[e]=n),n.push(t)}},{key:"fire",value:function(e,t){var n=this._eventSubs[e];if(n)for(var r=0,i=n.length;r0,c=t._getNextId(),f=a.getTitle||function(){return a.title||""},p=a.doAction||a.callback||function(){},A=a.getEnabled||function(){return!0},d=a.getShown||function(){return!0},v=new Q(c,f,p,A,d);if(v.parentMenu=i,l.items.push(v),u){var h=e(s);v.subMenu=h,h.parentItem=v}t._itemList.push(v),t._itemMap[v.id]=v},c=0,f=o.length;c'),r.push("
    "),n)for(var i=0,a=n.length;i'+A+" [MORE]"):r.push('
  • '+A+"
  • ")}}r.push("
"),r.push("");var d=r.join("");document.body.insertAdjacentHTML("beforeend",d);var v=document.querySelector("."+e.id);e.menuElement=v,v.style["border-radius"]="4px",v.style.display="none",v.style["z-index"]=3e5,v.style.background="white",v.style.border="1px solid black",v.style["box-shadow"]="0 4px 5px 0 gray",v.oncontextmenu=function(e){e.preventDefault()};var h=this,I=null;if(n)for(var y=0,m=n.length;ywindow.innerWidth?h._showMenu(t.id,a.left-200,a.top-1):h._showMenu(t.id,a.right-5,a.top-1),I=t}}else I&&(h._hideMenu(I.id),I=null)})),i||(r.itemElement.addEventListener("click",(function(e){e.preventDefault(),h._context&&!1!==r.enabled&&(r.doAction&&r.doAction(h._context),t._hideOnAction?h.hide():(h._updateItemsTitles(),h._updateItemsEnabledStatus()))})),r.itemElement.addEventListener("mouseenter",(function(e){e.preventDefault(),!1!==r.enabled&&r.doHover&&r.doHover(h._context)})))},E=0,T=w.length;Ewindow.innerHeight&&(n=window.innerHeight-r),t+i>window.innerWidth&&(t=window.innerWidth-i),e.style.left=t+"px",e.style.top=n+"px"}},{key:"_hideMenuElement",value:function(e){e.style.display="none"}}]),e}(),z=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this.viewer=t,this.scene=this.viewer.scene,this._lensCursorDiv=document.createElement("div"),this.viewer.scene.canvas.canvas.parentNode.insertBefore(this._lensCursorDiv,this.viewer.scene.canvas.canvas),this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red",this._lensCursorDiv.style.borderRadius="20px",this._lensCursorDiv.style.width="10px",this._lensCursorDiv.style.height="10px",this._lensCursorDiv.style.margin="-200px -200px",this._lensCursorDiv.style.zIndex="100000",this._lensCursorDiv.style.position="absolute",this._lensCursorDiv.style.pointerEvents="none",this._lensContainer=document.createElement("div"),this._lensContainer.style.border="1px solid black",this._lensContainer.style.background="white",this._lensContainer.style.borderRadius="50%",this._lensContainer.style.width="300px",this._lensContainer.style.height="300px",this._lensContainer.style.marginTop="85px",this._lensContainer.style.marginLeft="25px",this._lensContainer.style.zIndex="15000",this._lensContainer.style.position="absolute",this._lensContainer.style.pointerEvents="none",this._lensContainer.style.visibility="hidden",this._lensCanvas=document.createElement("canvas"),this._lensCanvas.style.borderRadius="50%",this._lensCanvas.style.width="300px",this._lensCanvas.style.height="300px",this._lensCanvas.style.zIndex="15000",this._lensCanvas.style.pointerEvents="none",document.body.appendChild(this._lensContainer),this._lensContainer.appendChild(this._lensCanvas),this._lensCanvasContext=this._lensCanvas.getContext("2d"),this._canvasElement=this.viewer.scene.canvas.canvas,this._canvasPos=null,this._snappedCanvasPos=null,this._lensPosToggle=!0,this._zoomLevel=r.zoomLevel||2,this._active=!1!==r.active,this._visible=!1,this._snapped=!1,this._onViewerRendering=this.viewer.scene.on("rendering",(function(){n._active&&n._visible&&n.update()}))}return P(e,[{key:"update",value:function(){if(this._active&&this._visible&&this._canvasPos){var e=this._lensContainer.getBoundingClientRect(),t=this._canvasElement.getBoundingClientRect(),n=this._canvasPos[0]e.left&&this._canvasPos[1]e.top;this._lensContainer.style.marginLeft="25px",n&&(this._lensPosToggle?this._lensContainer.style.marginTop="".concat(t.bottom-t.top-this._lensCanvas.height-85,"px"):this._lensContainer.style.marginTop="85px",this._lensPosToggle=!this._lensPosToggle),this._lensCanvasContext.clearRect(0,0,this._lensCanvas.width,this._lensCanvas.height);var r=Math.max(this._lensCanvas.width,this._lensCanvas.height)/this._zoomLevel;this._lensCanvasContext.drawImage(this._canvasElement,this._canvasPos[0]-r/2,this._canvasPos[1]-r/2,r,r,0,0,this._lensCanvas.width,this._lensCanvas.height);var i=[(e.left+e.right)/2,(e.top+e.bottom)/2];if(this._snappedCanvasPos){var a=this._snappedCanvasPos[0]-this._canvasPos[0],s=this._snappedCanvasPos[1]-this._canvasPos[1];this._lensCursorDiv.style.marginLeft="".concat(i[0]+a*this._zoomLevel-10,"px"),this._lensCursorDiv.style.marginTop="".concat(i[1]+s*this._zoomLevel-10,"px")}else this._lensCursorDiv.style.marginLeft="".concat(i[0]-10,"px"),this._lensCursorDiv.style.marginTop="".concat(i[1]-10,"px")}}},{key:"zoomFactor",get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.update()}},{key:"canvasPos",get:function(){return this._canvasPos},set:function(e){this._canvasPos=e,this.update()}},{key:"snappedCanvasPos",get:function(){return this._snappedCanvasPos},set:function(e){this._snappedCanvasPos=e,this.update()}},{key:"snapped",get:function(){return this._snapped},set:function(e){this._snapped=e,e?(this._lensCursorDiv.style.background="greenyellow",this._lensCursorDiv.style.border="2px solid green"):(this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red")}},{key:"active",get:function(){return this._active},set:function(e){this._active=e,this._lensContainer.style.visibility=e&&this._visible?"visible":"hidden",e&&this._visible||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this._lensContainer.style.visibility=e&&this._active?"visible":"hidden",e&&this._active||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}},{key:"destroy",value:function(){this._destroyed||(this.viewer.scene.off(this._onViewerRendering),this._lensContainer.removeChild(this._lensCanvas),document.body.removeChild(this._lensContainer),this._destroyed=!0)}}]),e}(),K=!0,Y=K?Float64Array:Float32Array,X=new Y(3),q=new Y(16),J=new Y(16),Z=new Y(4),$={setDoublePrecisionEnabled:function(e){Y=(K=e)?Float64Array:Float32Array},getDoublePrecisionEnabled:function(){return K},MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId:function(e,t){var n=t.indexOf("#");return n===e.length&&t.startsWith(e)?t.substring(n+1):t},globalizeObjectId:function(e,t){return e+"#"+t},safeInv:function(e){var t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:function(e){return new Y(e||2)},vec3:function(e){return new Y(e||3)},vec4:function(e){return new Y(e||4)},mat3:function(e){return new Y(e||9)},mat3ToMat4:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Y(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},mat4:function(e){return new Y(e||16)},mat4ToMat3:function(e,t){},doublesToFloats:function(e,t,n){for(var r=new Y(2),i=0,a=e.length;i>8&255]+e[t>>16&255]+e[t>>24&255],"-").concat(e[255&n]).concat(e[n>>8&255],"-").concat(e[n>>16&15|64]).concat(e[n>>24&255],"-").concat(e[63&r|128]).concat(e[r>>8&255],"-").concat(e[r>>16&255]).concat(e[r>>24&255]).concat(e[255&i]).concat(e[i>>8&255]).concat(e[i>>16&255]).concat(e[i>>24&255])}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},fmod:function(e,t){if(e1?1:n,Math.acos(n)},vec3FromMat4Scale:function(){var e=new Y(3);return function(t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],n[0]=$.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],n[1]=$.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],n[2]=$.lenVec3(e),n}}(),vecToArray:function(){function e(e){return Math.round(1e5*e)/1e5}return function(t){for(var n=0,r=(t=Array.prototype.slice.call(t)).length;n0&&void 0!==arguments[0]?arguments[0]:new Y(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},identityMat3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Y(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},isIdentityMat4:function(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]},negateMat4:function(e,t){return t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},addMat4:function(e,t,n){return n||(n=e),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},addMat4Scalar:function(e,t,n){return n||(n=e),n[0]=e[0]+t,n[1]=e[1]+t,n[2]=e[2]+t,n[3]=e[3]+t,n[4]=e[4]+t,n[5]=e[5]+t,n[6]=e[6]+t,n[7]=e[7]+t,n[8]=e[8]+t,n[9]=e[9]+t,n[10]=e[10]+t,n[11]=e[11]+t,n[12]=e[12]+t,n[13]=e[13]+t,n[14]=e[14]+t,n[15]=e[15]+t,n},addScalarMat4:function(e,t,n){return $.addMat4Scalar(t,e,n)},subMat4:function(e,t,n){return n||(n=e),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n},subMat4Scalar:function(e,t,n){return n||(n=e),n[0]=e[0]-t,n[1]=e[1]-t,n[2]=e[2]-t,n[3]=e[3]-t,n[4]=e[4]-t,n[5]=e[5]-t,n[6]=e[6]-t,n[7]=e[7]-t,n[8]=e[8]-t,n[9]=e[9]-t,n[10]=e[10]-t,n[11]=e[11]-t,n[12]=e[12]-t,n[13]=e[13]-t,n[14]=e[14]-t,n[15]=e[15]-t,n},subScalarMat4:function(e,t,n){return n||(n=t),n[0]=e-t[0],n[1]=e-t[1],n[2]=e-t[2],n[3]=e-t[3],n[4]=e-t[4],n[5]=e-t[5],n[6]=e-t[6],n[7]=e-t[7],n[8]=e-t[8],n[9]=e-t[9],n[10]=e-t[10],n[11]=e-t[11],n[12]=e-t[12],n[13]=e-t[13],n[14]=e-t[14],n[15]=e-t[15],n},mulMat4:function(e,t,n){n||(n=e);var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],c=e[7],f=e[8],p=e[9],A=e[10],d=e[11],v=e[12],h=e[13],I=e[14],y=e[15],m=t[0],w=t[1],g=t[2],E=t[3],T=t[4],b=t[5],D=t[6],P=t[7],C=t[8],_=t[9],R=t[10],B=t[11],O=t[12],S=t[13],N=t[14],L=t[15];return n[0]=m*r+w*o+g*f+E*v,n[1]=m*i+w*l+g*p+E*h,n[2]=m*a+w*u+g*A+E*I,n[3]=m*s+w*c+g*d+E*y,n[4]=T*r+b*o+D*f+P*v,n[5]=T*i+b*l+D*p+P*h,n[6]=T*a+b*u+D*A+P*I,n[7]=T*s+b*c+D*d+P*y,n[8]=C*r+_*o+R*f+B*v,n[9]=C*i+_*l+R*p+B*h,n[10]=C*a+_*u+R*A+B*I,n[11]=C*s+_*c+R*d+B*y,n[12]=O*r+S*o+N*f+L*v,n[13]=O*i+S*l+N*p+L*h,n[14]=O*a+S*u+N*A+L*I,n[15]=O*s+S*c+N*d+L*y,n},mulMat3:function(e,t,n){n||(n=new Y(9));var r=e[0],i=e[3],a=e[6],s=e[1],o=e[4],l=e[7],u=e[2],c=e[5],f=e[8],p=t[0],A=t[3],d=t[6],v=t[1],h=t[4],I=t[7],y=t[2],m=t[5],w=t[8];return n[0]=r*p+i*v+a*y,n[3]=r*A+i*h+a*m,n[6]=r*d+i*I+a*w,n[1]=s*p+o*v+l*y,n[4]=s*A+o*h+l*m,n[7]=s*d+o*I+l*w,n[2]=u*p+c*v+f*y,n[5]=u*A+c*h+f*m,n[8]=u*d+c*I+f*w,n},mulMat4Scalar:function(e,t,n){return n||(n=e),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n},mulMat4v4:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=t[0],i=t[1],a=t[2],s=t[3];return n[0]=e[0]*r+e[4]*i+e[8]*a+e[12]*s,n[1]=e[1]*r+e[5]*i+e[9]*a+e[13]*s,n[2]=e[2]*r+e[6]*i+e[10]*a+e[14]*s,n[3]=e[3]*r+e[7]*i+e[11]*a+e[15]*s,n},transposeMat4:function(e,t){var n=e[4],r=e[14],i=e[8],a=e[13],s=e[12],o=e[9];if(!t||e===t){var l=e[1],u=e[2],c=e[3],f=e[6],p=e[7],A=e[11];return e[1]=n,e[2]=i,e[3]=s,e[4]=l,e[6]=o,e[7]=a,e[8]=u,e[9]=f,e[11]=r,e[12]=c,e[13]=p,e[14]=A,e}return t[0]=e[0],t[1]=n,t[2]=i,t[3]=s,t[4]=e[1],t[5]=e[5],t[6]=o,t[7]=a,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=r,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3:function(e,t){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],f=e[10],p=e[11],A=e[12],d=e[13],v=e[14],h=e[15];return A*c*o*i-u*d*o*i-A*s*f*i+a*d*f*i+u*s*v*i-a*c*v*i-A*c*r*l+u*d*r*l+A*n*f*l-t*d*f*l-u*n*v*l+t*c*v*l+A*s*r*p-a*d*r*p-A*n*o*p+t*d*o*p+a*n*v*p-t*s*v*p-u*s*r*h+a*c*r*h+u*n*o*h-t*c*o*h-a*n*f*h+t*s*f*h},inverseMat4:function(e,t){t||(t=e);var n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],c=e[8],f=e[9],p=e[10],A=e[11],d=e[12],v=e[13],h=e[14],I=e[15],y=n*o-r*s,m=n*l-i*s,w=n*u-a*s,g=r*l-i*o,E=r*u-a*o,T=i*u-a*l,b=c*v-f*d,D=c*h-p*d,P=c*I-A*d,C=f*h-p*v,_=f*I-A*v,R=p*I-A*h,B=1/(y*R-m*_+w*C+g*P-E*D+T*b);return t[0]=(o*R-l*_+u*C)*B,t[1]=(-r*R+i*_-a*C)*B,t[2]=(v*T-h*E+I*g)*B,t[3]=(-f*T+p*E-A*g)*B,t[4]=(-s*R+l*P-u*D)*B,t[5]=(n*R-i*P+a*D)*B,t[6]=(-d*T+h*w-I*m)*B,t[7]=(c*T-p*w+A*m)*B,t[8]=(s*_-o*P+u*b)*B,t[9]=(-n*_+r*P-a*b)*B,t[10]=(d*E-v*w+I*y)*B,t[11]=(-c*E+f*w-A*y)*B,t[12]=(-s*C+o*D-l*b)*B,t[13]=(n*C-r*D+i*b)*B,t[14]=(-d*g+v*m-h*y)*B,t[15]=(c*g-f*m+p*y)*B,t},traceMat4:function(e){return e[0]+e[5]+e[10]+e[15]},translationMat4v:function(e,t){var n=t||$.identityMat4();return n[12]=e[0],n[13]=e[1],n[14]=e[2],n},translationMat3v:function(e,t){var n=t||$.identityMat3();return n[6]=e[0],n[7]=e[1],n},translationMat4c:(H=new Y(3),function(e,t,n,r){return H[0]=e,H[1]=t,H[2]=n,$.translationMat4v(H,r)}),translationMat4s:function(e,t){return $.translationMat4c(e,e,e,t)},translateMat4v:function(e,t){return $.translateMat4c(e[0],e[1],e[2],t)},translateMat4c:function(e,t,n,r){var i=r[3];r[0]+=i*e,r[1]+=i*t,r[2]+=i*n;var a=r[7];r[4]+=a*e,r[5]+=a*t,r[6]+=a*n;var s=r[11];r[8]+=s*e,r[9]+=s*t,r[10]+=s*n;var o=r[15];return r[12]+=o*e,r[13]+=o*t,r[14]+=o*n,r},setMat4Translation:function(e,t,n){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=e[15],n},rotationMat4v:function(e,t,n){var r,i,a,s,o,l,u=$.normalizeVec4([t[0],t[1],t[2],0],[]),c=Math.sin(e),f=Math.cos(e),p=1-f,A=u[0],d=u[1],v=u[2];return r=A*d,i=d*v,a=v*A,s=A*c,o=d*c,l=v*c,(n=n||$.mat4())[0]=p*A*A+f,n[1]=p*r+l,n[2]=p*a-o,n[3]=0,n[4]=p*r-l,n[5]=p*d*d+f,n[6]=p*i+s,n[7]=0,n[8]=p*a+o,n[9]=p*i-s,n[10]=p*v*v+f,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},rotationMat4c:function(e,t,n,r,i){return $.rotationMat4v(e,[t,n,r],i)},scalingMat4v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.identityMat4();return t[0]=e[0],t[5]=e[1],t[10]=e[2],t},scalingMat3v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.identityMat3();return t[0]=e[0],t[4]=e[1],t},scalingMat4c:function(){var e=new Y(3);return function(t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,$.scalingMat4v(e,i)}}(),scaleMat4c:function(e,t,n,r){return r[0]*=e,r[4]*=t,r[8]*=n,r[1]*=e,r[5]*=t,r[9]*=n,r[2]*=e,r[6]*=t,r[10]*=n,r[3]*=e,r[7]*=t,r[11]*=n,r},scaleMat4v:function(e,t){var n=e[0],r=e[1],i=e[2];return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,t},scalingMat4s:function(e){return $.scalingMat4c(e,e,e)},rotationTranslationMat4:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.mat4(),r=e[0],i=e[1],a=e[2],s=e[3],o=r+r,l=i+i,u=a+a,c=r*o,f=r*l,p=r*u,A=i*l,d=i*u,v=a*u,h=s*o,I=s*l,y=s*u;return n[0]=1-(A+v),n[1]=f+y,n[2]=p-I,n[3]=0,n[4]=f-y,n[5]=1-(c+v),n[6]=d+h,n[7]=0,n[8]=p+I,n[9]=d-h,n[10]=1-(c+A),n[11]=0,n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=1,n},mat4ToEuler:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=$.clamp,i=e[0],a=e[4],s=e[8],o=e[1],l=e[5],u=e[9],c=e[2],f=e[6],p=e[10];return"XYZ"===t?(n[1]=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(n[0]=Math.atan2(-u,p),n[2]=Math.atan2(-a,i)):(n[0]=Math.atan2(f,l),n[2]=0)):"YXZ"===t?(n[0]=Math.asin(-r(u,-1,1)),Math.abs(u)<.99999?(n[1]=Math.atan2(s,p),n[2]=Math.atan2(o,l)):(n[1]=Math.atan2(-c,i),n[2]=0)):"ZXY"===t?(n[0]=Math.asin(r(f,-1,1)),Math.abs(f)<.99999?(n[1]=Math.atan2(-c,p),n[2]=Math.atan2(-a,l)):(n[1]=0,n[2]=Math.atan2(o,i))):"ZYX"===t?(n[1]=Math.asin(-r(c,-1,1)),Math.abs(c)<.99999?(n[0]=Math.atan2(f,p),n[2]=Math.atan2(o,i)):(n[0]=0,n[2]=Math.atan2(-a,l))):"YZX"===t?(n[2]=Math.asin(r(o,-1,1)),Math.abs(o)<.99999?(n[0]=Math.atan2(-u,l),n[1]=Math.atan2(-c,i)):(n[0]=0,n[1]=Math.atan2(s,p))):"XZY"===t&&(n[2]=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(n[0]=Math.atan2(f,l),n[1]=Math.atan2(s,i)):(n[0]=Math.atan2(-u,p),n[1]=0)),n},composeMat4:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$.mat4();return $.quaternionToRotationMat4(t,r),$.scaleMat4v(n,r),$.translateMat4v(e,r),r},decomposeMat4:function(){var e=new Y(3),t=new Y(16);return function(n,r,i,a){e[0]=n[0],e[1]=n[1],e[2]=n[2];var s=$.lenVec3(e);e[0]=n[4],e[1]=n[5],e[2]=n[6];var o=$.lenVec3(e);e[8]=n[8],e[9]=n[9],e[10]=n[10];var l=$.lenVec3(e);$.determinantMat4(n)<0&&(s=-s),r[0]=n[12],r[1]=n[13],r[2]=n[14],t.set(n);var u=1/s,c=1/o,f=1/l;return t[0]*=u,t[1]*=u,t[2]*=u,t[4]*=c,t[5]*=c,t[6]*=c,t[8]*=f,t[9]*=f,t[10]*=f,$.mat4ToQuaternion(t,i),a[0]=s,a[1]=o,a[2]=l,this}}(),getColMat4:function(e,t){var n=4*t;return[e[n],e[n+1],e[n+2],e[n+3]]},setRowMat4:function(e,t,n){e[t]=n[0],e[t+4]=n[1],e[t+8]=n[2],e[t+12]=n[3]},lookAtMat4v:function(e,t,n,r){r||(r=$.mat4());var i,a,s,o,l,u,c,f,p,A,d=e[0],v=e[1],h=e[2],I=n[0],y=n[1],m=n[2],w=t[0],g=t[1],E=t[2];return d===w&&v===g&&h===E?$.identityMat4():(i=d-w,a=v-g,s=h-E,o=y*(s*=A=1/Math.sqrt(i*i+a*a+s*s))-m*(a*=A),l=m*(i*=A)-I*s,u=I*a-y*i,(A=Math.sqrt(o*o+l*l+u*u))?(o*=A=1/A,l*=A,u*=A):(o=0,l=0,u=0),c=a*u-s*l,f=s*o-i*u,p=i*l-a*o,(A=Math.sqrt(c*c+f*f+p*p))?(c*=A=1/A,f*=A,p*=A):(c=0,f=0,p=0),r[0]=o,r[1]=c,r[2]=i,r[3]=0,r[4]=l,r[5]=f,r[6]=a,r[7]=0,r[8]=u,r[9]=p,r[10]=s,r[11]=0,r[12]=-(o*d+l*v+u*h),r[13]=-(c*d+f*v+p*h),r[14]=-(i*d+a*v+s*h),r[15]=1,r)},lookAtMat4c:function(e,t,n,r,i,a,s,o,l){return $.lookAtMat4v([e,t,n],[r,i,a],[s,o,l],[])},orthoMat4c:function(e,t,n,r,i,a,s){s||(s=$.mat4());var o=t-e,l=r-n,u=a-i;return s[0]=2/o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2/l,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-2/u,s[11]=0,s[12]=-(e+t)/o,s[13]=-(r+n)/l,s[14]=-(a+i)/u,s[15]=1,s},frustumMat4v:function(e,t,n){n||(n=$.mat4());var r=[e[0],e[1],e[2],0],i=[t[0],t[1],t[2],0];$.addVec4(i,r,q),$.subVec4(i,r,J);var a=2*r[2],s=J[0],o=J[1],l=J[2];return n[0]=a/s,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=a/o,n[6]=0,n[7]=0,n[8]=q[0]/s,n[9]=q[1]/o,n[10]=-q[2]/l,n[11]=-1,n[12]=0,n[13]=0,n[14]=-a*i[2]/l,n[15]=0,n},frustumMat4:function(e,t,n,r,i,a,s){s||(s=$.mat4());var o=t-e,l=r-n,u=a-i;return s[0]=2*i/o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/l,s[6]=0,s[7]=0,s[8]=(t+e)/o,s[9]=(r+n)/l,s[10]=-(a+i)/u,s[11]=-1,s[12]=0,s[13]=0,s[14]=-a*i*2/u,s[15]=0,s},perspectiveMat4:function(e,t,n,r,i){var a=[],s=[];return a[2]=n,s[2]=r,s[1]=a[2]*Math.tan(e/2),a[1]=-s[1],s[0]=s[1]*t,a[0]=-s[0],$.frustumMat4v(a,s,i)},compareMat4:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},transformPoint3:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec3(),r=t[0],i=t[1],a=t[2];return n[0]=e[0]*r+e[4]*i+e[8]*a+e[12],n[1]=e[1]*r+e[5]*i+e[9]*a+e[13],n[2]=e[2]*r+e[6]*i+e[10]*a+e[14],n},transformPoint4:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4();return n[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],n[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],n[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],n[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],n},transformPoints3:function(e,t,n){for(var r,i,a,s,o,l=n||[],u=t.length,c=e[0],f=e[1],p=e[2],A=e[3],d=e[4],v=e[5],h=e[6],I=e[7],y=e[8],m=e[9],w=e[10],g=e[11],E=e[12],T=e[13],b=e[14],D=e[15],P=0;P2&&void 0!==arguments[2]?arguments[2]:t,o=t.length,l=e[0],u=e[1],c=e[2];e[3];var f=e[4],p=e[5],A=e[6];e[7];var d=e[8],v=e[9],h=e[10];e[11];var I=e[12],y=e[13],m=e[14];for(e[15],n=0;n2&&void 0!==arguments[2]?arguments[2]:t,o=t.length,l=e[0],u=e[1],c=e[2],f=e[3],p=e[4],A=e[5],d=e[6],v=e[7],h=e[8],I=e[9],y=e[10],m=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;n3&&void 0!==arguments[3]?arguments[3]:e,i=Math.cos(n),a=Math.sin(n),s=e[0]-t[0],o=e[1]-t[1];return r[0]=s*i-o*a+t[0],r[1]=s*a+o*i+t[1],e},rotateVec3X:function(e,t,n,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r},rotateVec3Y:function(e,t,n,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r},rotateVec3Z:function(e,t,n,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r},projectVec4:function(e,t){var n=1/e[3];return(t=t||$.vec2())[0]=e[0]*n,t[1]=e[1]*n,t},unprojectVec3:(x=new Y(16),M=new Y(16),F=new Y(16),function(e,t,n,r){return this.transformVec3(this.mulMat4(this.inverseMat4(t,x),this.inverseMat4(n,M),F),e,r)}),lerpVec3:function(e,t,n,r,i,a){var s=a||$.vec3(),o=(e-t)/(n-t);return s[0]=r[0]+o*(i[0]-r[0]),s[1]=r[1]+o*(i[1]-r[1]),s[2]=r[2]+o*(i[2]-r[2]),s},lerpMat4:function(e,t,n,r,i,a){var s=a||$.mat4(),o=(e-t)/(n-t);return s[0]=r[0]+o*(i[0]-r[0]),s[1]=r[1]+o*(i[1]-r[1]),s[2]=r[2]+o*(i[2]-r[2]),s[3]=r[3]+o*(i[3]-r[3]),s[4]=r[4]+o*(i[4]-r[4]),s[5]=r[5]+o*(i[5]-r[5]),s[6]=r[6]+o*(i[6]-r[6]),s[7]=r[7]+o*(i[7]-r[7]),s[8]=r[8]+o*(i[8]-r[8]),s[9]=r[9]+o*(i[9]-r[9]),s[10]=r[10]+o*(i[10]-r[10]),s[11]=r[11]+o*(i[11]-r[11]),s[12]=r[12]+o*(i[12]-r[12]),s[13]=r[13]+o*(i[13]-r[13]),s[14]=r[14]+o*(i[14]-r[14]),s[15]=r[15]+o*(i[15]-r[15]),s},flatten:function(e){var t,n,r,i,a,s=[];for(t=0,n=e.length;t0&&void 0!==arguments[0]?arguments[0]:$.vec4();return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},eulerToQuaternion:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=e[0]*$.DEGTORAD/2,i=e[1]*$.DEGTORAD/2,a=e[2]*$.DEGTORAD/2,s=Math.cos(r),o=Math.cos(i),l=Math.cos(a),u=Math.sin(r),c=Math.sin(i),f=Math.sin(a);return"XYZ"===t?(n[0]=u*o*l+s*c*f,n[1]=s*c*l-u*o*f,n[2]=s*o*f+u*c*l,n[3]=s*o*l-u*c*f):"YXZ"===t?(n[0]=u*o*l+s*c*f,n[1]=s*c*l-u*o*f,n[2]=s*o*f-u*c*l,n[3]=s*o*l+u*c*f):"ZXY"===t?(n[0]=u*o*l-s*c*f,n[1]=s*c*l+u*o*f,n[2]=s*o*f+u*c*l,n[3]=s*o*l-u*c*f):"ZYX"===t?(n[0]=u*o*l-s*c*f,n[1]=s*c*l+u*o*f,n[2]=s*o*f-u*c*l,n[3]=s*o*l+u*c*f):"YZX"===t?(n[0]=u*o*l+s*c*f,n[1]=s*c*l+u*o*f,n[2]=s*o*f-u*c*l,n[3]=s*o*l-u*c*f):"XZY"===t&&(n[0]=u*o*l-s*c*f,n[1]=s*c*l-u*o*f,n[2]=s*o*f+u*c*l,n[3]=s*o*l+u*c*f),n},mat4ToQuaternion:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec4(),r=e[0],i=e[4],a=e[8],s=e[1],o=e[5],l=e[9],u=e[2],c=e[6],f=e[10],p=r+o+f;return p>0?(t=.5/Math.sqrt(p+1),n[3]=.25/t,n[0]=(c-l)*t,n[1]=(a-u)*t,n[2]=(s-i)*t):r>o&&r>f?(t=2*Math.sqrt(1+r-o-f),n[3]=(c-l)/t,n[0]=.25*t,n[1]=(i+s)/t,n[2]=(a+u)/t):o>f?(t=2*Math.sqrt(1+o-r-f),n[3]=(a-u)/t,n[0]=(i+s)/t,n[1]=.25*t,n[2]=(l+c)/t):(t=2*Math.sqrt(1+f-r-o),n[3]=(s-i)/t,n[0]=(a+u)/t,n[1]=(l+c)/t,n[2]=.25*t),n},vec3PairToQuaternion:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=Math.sqrt($.dotVec3(e,e)*$.dotVec3(t,t)),i=r+$.dotVec3(e,t);return i<1e-8*r?(i=0,Math.abs(e[0])>Math.abs(e[2])?(n[0]=-e[1],n[1]=e[0],n[2]=0):(n[0]=0,n[1]=-e[2],n[2]=e[1])):$.cross3Vec3(e,t,n),n[3]=i,$.normalizeQuaternion(n)},angleAxisToQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec4(),n=e[3]/2,r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t},quaternionToEuler:function(){var e=new Y(16);return function(t,n,r){return r=r||$.vec3(),$.quaternionToRotationMat4(t,e),$.mat4ToEuler(e,n,r),r}}(),mulQuaternions:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=e[0],i=e[1],a=e[2],s=e[3],o=t[0],l=t[1],u=t[2],c=t[3];return n[0]=s*o+r*c+i*u-a*l,n[1]=s*l+i*c+a*o-r*u,n[2]=s*u+a*c+r*l-i*o,n[3]=s*c-r*o-i*l-a*u,n},vec3ApplyQuaternion:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec3(),r=t[0],i=t[1],a=t[2],s=e[0],o=e[1],l=e[2],u=e[3],c=u*r+o*a-l*i,f=u*i+l*r-s*a,p=u*a+s*i-o*r,A=-s*r-o*i-l*a;return n[0]=c*u+A*-s+f*-l-p*-o,n[1]=f*u+A*-o+p*-s-c*-l,n[2]=p*u+A*-l+c*-o-f*-s,n},quaternionToMat4:function(e,t){t=$.identityMat4(t);var n=e[0],r=e[1],i=e[2],a=e[3],s=2*n,o=2*r,l=2*i,u=s*a,c=o*a,f=l*a,p=s*n,A=o*n,d=l*n,v=o*r,h=l*r,I=l*i;return t[0]=1-(v+I),t[1]=A+f,t[2]=d-c,t[4]=A-f,t[5]=1-(p+I),t[6]=h+u,t[8]=d+c,t[9]=h-u,t[10]=1-(p+v),t},quaternionToRotationMat4:function(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],s=n+n,o=r+r,l=i+i,u=n*s,c=n*o,f=n*l,p=r*o,A=r*l,d=i*l,v=a*s,h=a*o,I=a*l;return t[0]=1-(p+d),t[4]=c-I,t[8]=f+h,t[1]=c+I,t[5]=1-(u+d),t[9]=A-v,t[2]=f-h,t[6]=A+v,t[10]=1-(u+p),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=$.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n,t[3]=e[3]/n,t},conjugateQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},inverseQuaternion:function(e,t){return $.normalizeQuaternion($.conjugateQuaternion(e,t))},quaternionToAngleAxis:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec4(),n=(e=$.normalizeQuaternion(e,Z))[3],r=2*Math.acos(n),i=Math.sqrt(1-n*n);return i<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i),t[3]=r,t},AABB3:function(e){return new Y(e||6)},AABB2:function(e){return new Y(e||4)},OBB3:function(e){return new Y(e||32)},OBB2:function(e){return new Y(e||16)},Sphere3:function(e,t,n,r){return new Y([e,t,n,r])},transformOBB3:function(e,t){var n,r,i,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,o=t.length,l=e[0],u=e[1],c=e[2],f=e[3],p=e[4],A=e[5],d=e[6],v=e[7],h=e[8],I=e[9],y=e[10],m=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;no?s:o,a[1]+=l>u?l:u,a[2]+=c>f?c:f,Math.abs($.lenVec3(a))}}(),getAABB3Area:function(e){return(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2])},getAABB3Center:function(e,t){var n=t||$.vec3();return n[0]=(e[0]+e[3])/2,n[1]=(e[1]+e[4])/2,n[2]=(e[2]+e[5])/2,n},getAABB2Center:function(e,t){var n=t||$.vec2();return n[0]=(e[2]+e[0])/2,n[1]=(e[3]+e[1])/2,n},collapseAABB3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$.AABB3();return e[0]=$.MAX_DOUBLE,e[1]=$.MAX_DOUBLE,e[2]=$.MAX_DOUBLE,e[3]=$.MIN_DOUBLE,e[4]=$.MIN_DOUBLE,e[5]=$.MIN_DOUBLE,e},AABB3ToOBB3:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.OBB3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t},positions3ToAABB3:function(){var e=new Y(3);return function(t,n,r){n=n||$.AABB3();for(var i,a,s,o=$.MAX_DOUBLE,l=$.MAX_DOUBLE,u=$.MAX_DOUBLE,c=$.MIN_DOUBLE,f=$.MIN_DOUBLE,p=$.MIN_DOUBLE,A=0,d=t.length;Ac&&(c=i),a>f&&(f=a),s>p&&(p=s);return n[0]=o,n[1]=l,n[2]=u,n[3]=c,n[4]=f,n[5]=p,n}}(),OBB3ToAABB3:function(e){for(var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.AABB3(),a=$.MAX_DOUBLE,s=$.MAX_DOUBLE,o=$.MAX_DOUBLE,l=$.MIN_DOUBLE,u=$.MIN_DOUBLE,c=$.MIN_DOUBLE,f=0,p=e.length;fl&&(l=t),n>u&&(u=n),r>c&&(c=r);return i[0]=a,i[1]=s,i[2]=o,i[3]=l,i[4]=u,i[5]=c,i},points3ToAABB3:function(e){for(var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.AABB3(),a=$.MAX_DOUBLE,s=$.MAX_DOUBLE,o=$.MAX_DOUBLE,l=$.MIN_DOUBLE,u=$.MIN_DOUBLE,c=$.MIN_DOUBLE,f=0,p=e.length;fl&&(l=t),n>u&&(u=n),r>c&&(c=r);return i[0]=a,i[1]=s,i[2]=o,i[3]=l,i[4]=u,i[5]=c,i},points3ToSphere3:function(){var e=new Y(3);return function(t,n){n=n||$.vec4();var r,i=0,a=0,s=0,o=t.length;for(r=0;ru&&(u=l);return n[3]=u,n}}(),positions3ToSphere3:function(){var e=new Y(3),t=new Y(3);return function(n,r){r=r||$.vec4();var i,a=0,s=0,o=0,l=n.length,u=0;for(i=0;iu&&(u=c);return r[3]=u,r}}(),OBB3ToSphere3:function(){var e=new Y(3),t=new Y(3);return function(n,r){r=r||$.vec4();var i,a=0,s=0,o=0,l=n.length,u=l/4;for(i=0;if&&(f=c);return r[3]=f,r}}(),getSphere3Center:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},getPositionsCenter:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3(),n=0,r=0,i=0,a=0,s=e.length;at[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]n&&(e[0]=n),e[1]>r&&(e[1]=r),e[2]>i&&(e[2]=i),e[3]0&&void 0!==arguments[0]?arguments[0]:$.AABB2();return e[0]=$.MAX_DOUBLE,e[1]=$.MAX_DOUBLE,e[2]=$.MIN_DOUBLE,e[3]=$.MIN_DOUBLE,e},point3AABB3Intersect:function(e,t){return e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(r=e[0]*n[0],i=e[0]*n[3]):(r=e[0]*n[3],i=e[0]*n[0]),e[1]>0?(r+=e[1]*n[1],i+=e[1]*n[4]):(r+=e[1]*n[4],i+=e[1]*n[1]),e[2]>0?(r+=e[2]*n[2],i+=e[2]*n[5]):(r+=e[2]*n[5],i+=e[2]*n[2]),r<=-t&&i<=-t?-1:r>=-t&&i>=-t?1:0},OBB3ToAABB2:function(e){for(var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.AABB2(),a=$.MAX_DOUBLE,s=$.MAX_DOUBLE,o=$.MIN_DOUBLE,l=$.MIN_DOUBLE,u=0,c=e.length;uo&&(o=t),n>l&&(l=n);return i[0]=a,i[1]=s,i[2]=o,i[3]=l,i},expandAABB2:function(e,t){return e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]3&&void 0!==arguments[3]?arguments[3]:e,i=.5*(e[0]+1),a=.5*(e[1]+1),s=.5*(e[2]+1),o=.5*(e[3]+1);return r[0]=Math.floor(i*t),r[1]=n-Math.floor(o*n),r[2]=Math.floor(s*t),r[3]=n-Math.floor(a*n),r},tangentQuadraticBezier:function(e,t,n,r){return 2*(1-e)*(n-t)+2*e*(r-n)},tangentQuadraticBezier3:function(e,t,n,r,i){return-3*t*(1-e)*(1-e)+3*n*(1-e)*(1-e)-6*e*n*(1-e)+6*e*r*(1-e)-3*e*e*r+3*e*e*i},tangentSpline:function(e){return 6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e)},catmullRomInterpolate:function(e,t,n,r,i){var a=.5*(n-e),s=.5*(r-t),o=i*i;return(2*t-2*n+a+s)*(i*o)+(-3*t+3*n-2*a-s)*o+a*i+t},b2p0:function(e,t){var n=1-e;return n*n*t},b2p1:function(e,t){return 2*(1-e)*e*t},b2p2:function(e,t){return e*e*t},b2:function(e,t,n,r){return this.b2p0(e,t)+this.b2p1(e,n)+this.b2p2(e,r)},b3p0:function(e,t){var n=1-e;return n*n*n*t},b3p1:function(e,t){var n=1-e;return 3*n*n*e*t},b3p2:function(e,t){return 3*(1-e)*e*e*t},b3p3:function(e,t){return e*e*e*t},b3:function(e,t,n,r,i){return this.b3p0(e,t)+this.b3p1(e,n)+this.b3p2(e,r)+this.b3p3(e,i)},triangleNormal:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$.vec3(),i=t[0]-e[0],a=t[1]-e[1],s=t[2]-e[2],o=n[0]-e[0],l=n[1]-e[1],u=n[2]-e[2],c=a*u-s*l,f=s*o-i*u,p=i*l-a*o,A=Math.sqrt(c*c+f*f+p*p);return 0===A?(r[0]=0,r[1]=0,r[2]=0):(r[0]=c/A,r[1]=f/A,r[2]=p/A),r},rayTriangleIntersect:function(){var e=new Y(3),t=new Y(3),n=new Y(3),r=new Y(3),i=new Y(3);return function(a,s,o,l,u,c){c=c||$.vec3();var f=$.subVec3(l,o,e),p=$.subVec3(u,o,t),A=$.cross3Vec3(s,p,n),d=$.dotVec3(f,A);if(d<1e-6)return null;var v=$.subVec3(a,o,r),h=$.dotVec3(v,A);if(h<0||h>d)return null;var I=$.cross3Vec3(v,f,i),y=$.dotVec3(s,I);if(y<0||h+y>d)return null;var m=$.dotVec3(p,I)/d;return c[0]=a[0]+m*s[0],c[1]=a[1]+m*s[1],c[2]=a[2]+m*s[2],c}}(),rayPlaneIntersect:function(){var e=new Y(3),t=new Y(3),n=new Y(3),r=new Y(3);return function(i,a,s,o,l,u){u=u||$.vec3(),a=$.normalizeVec3(a,e);var c=$.subVec3(o,s,t),f=$.subVec3(l,s,n),p=$.cross3Vec3(c,f,r);$.normalizeVec3(p,p);var A=-$.dotVec3(s,p),d=-($.dotVec3(i,p)+A)/$.dotVec3(a,p);return u[0]=i[0]+d*a[0],u[1]=i[1]+d*a[1],u[2]=i[2]+d*a[2],u}}(),cartesianToBarycentric:function(){var e=new Y(3),t=new Y(3),n=new Y(3);return function(r,i,a,s,o){var l=$.subVec3(s,i,e),u=$.subVec3(a,i,t),c=$.subVec3(r,i,n),f=$.dotVec3(l,l),p=$.dotVec3(l,u),A=$.dotVec3(l,c),d=$.dotVec3(u,u),v=$.dotVec3(u,c),h=f*d-p*p;if(0===h)return null;var I=1/h,y=(d*A-p*v)*I,m=(f*v-p*A)*I;return o[0]=1-y-m,o[1]=m,o[2]=y,o}}(),barycentricInsideTriangle:function(e){var t=e[1],n=e[2];return n>=0&&t>=0&&n+t<1},barycentricToCartesian:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:$.vec3(),a=e[0],s=e[1],o=e[2];return i[0]=t[0]*a+n[0]*s+r[0]*o,i[1]=t[1]*a+n[1]*s+r[1]*o,i[2]=t[2]*a+n[2]*s+r[2]*o,i},mergeVertices:function(e,t,n,r){var i,a,s,o,l,u,c={},f=[],p=[],A=t?[]:null,d=n?[]:null,v=[],h=Math.pow(10,4),I=0;for(l=0,u=e.length;l>24&255,s=f>>16&255,a=f>>8&255,i=255&f,r=3*t[d],u[p++]=e[r],u[p++]=e[r+1],u[p++]=e[r+2],c[A++]=i,c[A++]=a,c[A++]=s,c[A++]=o,r=3*t[d+1],u[p++]=e[r],u[p++]=e[r+1],u[p++]=e[r+2],c[A++]=i,c[A++]=a,c[A++]=s,c[A++]=o,r=3*t[d+2],u[p++]=e[r],u[p++]=e[r+1],u[p++]=e[r+2],c[A++]=i,c[A++]=a,c[A++]=s,c[A++]=o,f++;return{positions:u,colors:c}},faceToVertexNormals:function(e,t){var n,r,i,a,s,o,l,u,c,f,p,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=A.smoothNormalsAngleThreshold||20,v={},h=[],I={},y=4,m=Math.pow(10,y);for(l=0,c=e.length;ll[3]&&(l[3]=i[p]),i[p+1]l[4]&&(l[4]=i[p+1]),i[p+2]l[5]&&(l[5]=i[p+2])}if(n.length<20||a>10)return u.triangles=n,u.leaf=!0,u;e[0]=l[3]-l[0],e[1]=l[4]-l[1],e[2]=l[5]-l[2];var A=0;e[1]>e[A]&&(A=1),e[2]>e[A]&&(A=2),u.splitDim=A;var d=(l[A]+l[A+3])/2,v=new Array(n.length),h=0,I=new Array(n.length),y=0;for(s=0,o=n.length;s2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;r2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;r=0?1:-1),r=(1-Math.abs(n))*(r>=0?1:-1));var a=Math.sqrt(n*n+r*r+i*i);return t[0]=n/a,t[1]=r/a,t[2]=i/a,t},octDecodeVec2s:function(e,t){for(var n=0,r=0,i=e.length;n=0?1:-1),s=(1-Math.abs(a))*(s>=0?1:-1));var l=Math.sqrt(a*a+s*s+o*o);t[r+0]=a/l,t[r+1]=s/l,t[r+2]=o/l,r+=3}return t}};$.buildEdgeIndices=function(){var e=[],t=[],n=[],r=[],i=[],a=0,s=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),u=$.vec3(),c=$.vec3(),f=$.vec3(),p=$.vec3(),A=$.vec3(),d=$.vec3(),v=$.vec3();return function(h,I,y,m){!function(i,a){var s,o,l,u,c,f,p={},A=Math.pow(10,4),d=0;for(c=0,f=i.length;cO)||(_=n[D.index1],R=n[D.index2],(!N&&_>65535||R>65535)&&(N=!0),B.push(_),B.push(R));return N?new Uint32Array(B):new Uint16Array(B)}}(),$.planeClipsPositions3=function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,i=0,a=n.length;i=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&$.containsAABB3(e.left.aabb,r))this._insertEntity(e.left,t,n+1);else if(e.right&&$.containsAABB3(e.right.aabb,r))this._insertEntity(e.right,t,n+1);else{var i=e.aabb;ee[0]=i[3]-i[0],ee[1]=i[4]-i[1],ee[2]=i[5]-i[2];var a=0;if(ee[1]>ee[a]&&(a=1),ee[2]>ee[a]&&(a=2),!e.left){var s=i.slice();if(s[a+3]=(i[a]+i[a+3])/2,e.left={aabb:s},$.containsAABB3(s,r))return void this._insertEntity(e.left,t,n+1)}if(!e.right){var o=i.slice();if(o[a]=(i[a]+i[a+3])/2,e.right={aabb:o},$.containsAABB3(o,r))return void this._insertEntity(e.right,t,n+1)}e.entities=e.entities||[],e.entities.push(t)}}},{key:"destroy",value:function(){var e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}]),e}(),ne=function(){function e(){b(this,e),this._head=[],this._headLength=0,this._tail=[],this._index=0,this._length=0}return P(e,[{key:"length",get:function(){return this._length}},{key:"shift",value:function(){if(this._index>=this._headLength){var e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}var t=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,t}},{key:"push",value:function(e){return this._length++,this._tail.push(e),this}},{key:"unshift",value:function(e){return this._head[--this._index]=e,this._length++,this}}]),e}(),re={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var ie=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],n=e[0].charCodeAt(0),r=n+e[1],i=n;i1&&void 0!==arguments[1]?arguments[1]:null;fe.push(e),fe.push(t)},this.runTasks=function(){for(var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,r=(new Date).getTime(),i=0;fe.length>0&&(n<0||r0&&oe>0){var t=1e3/oe;ve+=t,Ae.push(t),Ae.length>=30&&(ve-=Ae.shift()),re.frame.fps=Math.round(ve/Ae.length)}for(var n in he.scenes)he.scenes[n].compile();ye(e),de=e};new(function(){function e(t,n){b(this,e),E(this,"worker",null);var r=new Blob(["setInterval(() => postMessage(0), ".concat(n,");")]),i=URL.createObjectURL(r);this.worker=new Worker(i),this.worker.onmessage=t}return P(e,[{key:"stop",value:function(){this.worker.terminate()}}]),e}())(Ie,100);function ye(e){var t=he.runTasks(e+10),n=he.getNumTasks();re.frame.tasksRun=t,re.frame.tasksScheduled=n,re.frame.tasksBudget=10}!function e(){var t=Date.now();if(oe=t-de,de>0&&oe>0){var n=1e3/oe;ve+=n,Ae.push(n),Ae.length>=30&&(ve-=Ae.shift()),re.frame.fps=Math.round(ve/Ae.length)}ye(t),function(e){for(var t in pe.time=e,he.scenes)if(he.scenes.hasOwnProperty(t)){var n=he.scenes[t];pe.sceneId=t,pe.startTime=n.startTime,pe.deltaTime=null!=pe.prevTime?pe.time-pe.prevTime:0,n.fire("tick",pe,!0)}pe.prevTime=e}(t),function(){var e,t,n,r,i,a=he.scenes,s=!1;for(i in a)a.hasOwnProperty(i)&&(e=a[i],(t=ue[i])||(t=ue[i]={}),n=e.ticksPerOcclusionTest,t.ticksPerOcclusionTest!==n&&(t.ticksPerOcclusionTest=n,t.renderCountdown=n),--e.occlusionTestCountdown<=0&&(e.doOcclusionTest(),e.occlusionTestCountdown=n),r=e.ticksPerRender,t.ticksPerRender!==r&&(t.ticksPerRender=r,t.renderCountdown=r),0==--t.renderCountdown&&(e.render(s),t.renderCountdown=r))}(),void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(Ie):requestAnimationFrame(e)}();var me=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,e),this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=n.viewer;else{if("Scene"===t.type)this.scene=t;else{if(!(t instanceof e))throw"Invalid param: owner must be a Component";this.scene=t.scene}this._owner=t}this._dontClear=!!n.dontClear,this._renderer=this.scene._renderer,this.meta=n.meta||{},this.id=n.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,t&&t._own(this)}return P(e,[{key:"type",get:function(){return"Component"}},{key:"isComponent",get:function(){return!0}},{key:"glRedraw",value:function(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}},{key:"glResort",value:function(){this._renderer&&this._renderer.needStateSort()}},{key:"owner",get:function(){return this._owner}},{key:"isType",value:function(e){return this.type===e}},{key:"fire",value:function(e,t,n){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==n&&(this._events[e]=t||!0);var r,i=this._eventSubs[e];if(i)for(var a in i)i.hasOwnProperty(a)&&(r=i[a],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}},{key:"on",value:function(e,t,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new G),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});var r=this._eventSubs[e];r?this._eventSubsNum[e]++:(r={},this._eventSubs[e]=r,this._eventSubsNum[e]=1);var i=this._subIdMap.addItem();r[i]={callback:t,scope:n||this},this._subIdEvents[i]=e;var a=this._events[e];return void 0!==a&&t.call(n||this,a),i}},{key:"off",value:function(e){if(null!=e&&this._subIdEvents){var t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];var n=this._eventSubs[t];n&&(delete n[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}}},{key:"once",value:function(e,t,n){var r=this,i=this.on(e,(function(e){r.off(i),t.call(n||this,e)}),n)}},{key:"hasSubs",value:function(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}},{key:"log",value:function(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}},{key:"_message",value:function(e){return" ["+this.type+" "+le.inQuotes(this.id)+"]: "+e}},{key:"warn",value:function(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}},{key:"error",value:function(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}},{key:"_attach",value:function(e){var t=e.name;if(t){var n=e.component,r=e.sceneDefault,i=e.sceneSingleton,a=e.type,s=e.on,o=!1!==e.recompiles;if(n&&(le.isNumeric(n)||le.isString(n))){var l=n;if(!(n=this.scene.components[l]))return void this.error("Component not found: "+le.inQuotes(l))}if(!n)if(!0===i){var u=this.scene.types[a];for(var c in u)if(u.hasOwnProperty){n=u[c];break}if(!n)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===r&&!(n=this.scene[t]))return this.error("Scene has no default component for '"+t+"'"),null;if(n){if(n.scene.id!==this.scene.id)return void this.error("Not in same scene: "+n.type+" "+le.inQuotes(n.id));if(a&&!n.isType(a))return void this.error("Expected a "+a+" type or subtype: "+n.type+" "+le.inQuotes(n.id))}this._attachments||(this._attachments={});var f,p,A,d=this._attached[t];if(d){if(n&&d.id===n.id)return;var v=this._attachments[d.id];for(p=0,A=(f=v.subs).length;p=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}]),e}(),be=P((function e(){b(this,e),this.planes=[new Te,new Te,new Te,new Te,new Te,new Te]}));function De(e,t,n){var r=$.mulMat4(n,t,Ee),i=r[0],a=r[1],s=r[2],o=r[3],l=r[4],u=r[5],c=r[6],f=r[7],p=r[8],A=r[9],d=r[10],v=r[11],h=r[12],I=r[13],y=r[14],m=r[15];e.planes[0].set(o-i,f-l,v-p,m-h),e.planes[1].set(o+i,f+l,v+p,m+h),e.planes[2].set(o-a,f-u,v-A,m-I),e.planes[3].set(o+a,f+u,v+A,m+I),e.planes[4].set(o-s,f-c,v-d,m-y),e.planes[5].set(o+s,f+c,v+d,m+y)}function Pe(e,t){var n=be.INSIDE,r=we,i=ge;r[0]=t[0],r[1]=t[1],r[2]=t[2],i[0]=t[3],i[1]=t[4],i[2]=t[5];for(var a=[r,i],s=0;s<6;++s){var o=e.planes[s];if(o.normal[0]*a[o.testVertex[0]][0]+o.normal[1]*a[o.testVertex[1]][1]+o.normal[2]*a[o.testVertex[2]][2]+o.offset<0)return be.OUTSIDE;o.normal[0]*a[1-o.testVertex[0]][0]+o.normal[1]*a[1-o.testVertex[1]][1]+o.normal[2]*a[1-o.testVertex[2]][2]+o.offset<0&&(n=be.INTERSECT)}return n}be.INSIDE=0,be.INTERSECT=1,be.OUTSIDE=2;var Ce=function(e){h(n,me);var t=y(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(b(this,n),!r.viewer)throw"[MarqueePicker] Missing config: viewer";if(!r.objectsKdTree3)throw"[MarqueePicker] Missing config: objectsKdTree3";return(e=t.call(this,r.viewer.scene,r)).viewer=r.viewer,e._objectsKdTree3=r.objectsKdTree3,e._canvasMarqueeCorner1=$.vec2(),e._canvasMarqueeCorner2=$.vec2(),e._canvasMarquee=$.AABB2(),e._marqueeFrustum=new be,e._marqueeFrustumProjMat=$.mat4(),e._pickMode=!1,e._marqueeElement=document.createElement("div"),document.body.appendChild(e._marqueeElement),e._marqueeElement.style.position="absolute",e._marqueeElement.style["z-index"]="40000005",e._marqueeElement.style.width="8px",e._marqueeElement.style.height="8px",e._marqueeElement.style.visibility="hidden",e._marqueeElement.style.top="0px",e._marqueeElement.style.left="0px",e._marqueeElement.style["box-shadow"]="0 2px 5px 0 #182A3D;",e._marqueeElement.style.opacity=1,e._marqueeElement.style["pointer-events"]="none",e}return P(n,[{key:"setMarqueeCorner1",value:function(e){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(e),this._updateMarquee()}},{key:"setMarqueeCorner2",value:function(e){this._canvasMarqueeCorner2.set(e),this._updateMarquee()}},{key:"setMarquee",value:function(e,t){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(t),this._updateMarquee()}},{key:"setMarqueeVisible",value:function(e){this._marqueVisible=e,this._marqueeElement.style.visibility=e?"visible":"hidden"}},{key:"getMarqueeVisible",value:function(){return this._marqueVisible}},{key:"setPickMode",value:function(e){if(e!==n.PICK_MODE_INSIDE&&e!==n.PICK_MODE_INTERSECTS)throw"Illegal MarqueePicker pickMode: must be MarqueePicker.PICK_MODE_INSIDE or MarqueePicker.PICK_MODE_INTERSECTS";e!==this._pickMode&&(this._marqueeElement.style["background-image"]=e===n.PICK_MODE_INSIDE?"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4'/%3e%3c/svg%3e\")":"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e\")",this._pickMode=e)}},{key:"getPickMode",value:function(){return this._pickMode}},{key:"clear",value:function(){this.fire("clear",{})}},{key:"pick",value:function(){var e=this;this._updateMarquee(),this._buildMarqueeFrustum();var t=[];return(this._canvasMarquee[2]-this._canvasMarquee[0]>3||this._canvasMarquee[3]-this._canvasMarquee[1]>3)&&function r(i){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be.INTERSECT;if(a===be.INTERSECT&&(a=Pe(e._marqueeFrustum,i.aabb)),a!==be.OUTSIDE){if(i.entities)for(var s=i.entities,o=0,l=s.length;o3||n>3)&&f.pick()}})),document.addEventListener("mouseup",(function(e){r.getActive()&&0===e.button&&(clearTimeout(c),A&&(f.setMarqueeVisible(!1),A=!1,d=!1,v=!0,f.viewer.cameraControl.pointerEnabled=!0))}),!0),p.addEventListener("mousemove",(function(e){r.getActive()&&0===e.button&&d&&(clearTimeout(c),A&&(s=e.pageX,o=e.pageY,u=e.offsetX,f.setMarqueeVisible(!0),f.setMarqueeCorner2([s,o]),f.setPickMode(l0}},{key:"log",value:function(e){console.log("[xeokit plugin ".concat(this.id,"]: ").concat(e))}},{key:"warn",value:function(e){console.warn("[xeokit plugin ".concat(this.id,"]: ").concat(e))}},{key:"error",value:function(e){console.error("[xeokit plugin ".concat(this.id,"]: ").concat(e))}},{key:"send",value:function(e,t){}},{key:"destroy",value:function(){this.viewer.removePlugin(this)}}]),e}(),Be=$.vec3(),Oe=function(){var e=new Float64Array(16),t=new Float64Array(4),n=new Float64Array(4);return function(r,i,a){return a=a||e,t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,$.transformVec4(r,t,n),$.setMat4Translation(r,n,a),a.slice()}}();function Se(e,t,n){var r=Float32Array.from([e[0]])[0],i=e[0]-r,a=Float32Array.from([e[1]])[0],s=e[1]-a,o=Float32Array.from([e[2]])[0],l=e[2]-o;t[0]=r,t[1]=a,t[2]=o,n[0]=i,n[1]=s,n[2]=l}function Ne(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3,i=$.getPositionsCenter(e,Be),a=Math.round(i[0]/r)*r,s=Math.round(i[1]/r)*r,o=Math.round(i[2]/r)*r;n[0]=a,n[1]=s,n[2]=o;var l=0!==n[0]||0!==n[1]||0!==n[2];if(l)for(var u=0,c=e.length;u0?this.meshes[0]._colorize[3]/255:1},set:function(e){if(0!==this.meshes.length){var t=null!=e,n=this.meshes[0]._colorize[3],r=255;if(t){if(e<0?e=0:e>1&&(e=1),n===(r=Math.floor(255*e)))return}else if(n===(r=255))return;for(var i=0,a=this.meshes.length;i1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this._color=r.color||"black",this._highlightClass="viewer-ruler-wire-highlighted",this._wire=document.createElement("div"),this._wire.className+=this._wire.className?" viewer-ruler-wire":"viewer-ruler-wire",this._wireClickable=document.createElement("div"),this._wireClickable.className+=this._wireClickable.className?" viewer-ruler-wire-clickable":"viewer-ruler-wire-clickable",this._thickness=r.thickness||1,this._thicknessClickable=r.thicknessClickable||6,this._visible=!0,this._culled=!1;var i=this._wire,a=i.style;a.border="solid "+this._thickness+"px "+this._color,a.position="absolute",a["z-index"]=void 0===r.zIndex?"2000001":r.zIndex,a.width="0px",a.height="0px",a.visibility="visible",a.top="0px",a.left="0px",a["-webkit-transform-origin"]="0 0",a["-moz-transform-origin"]="0 0",a["-ms-transform-origin"]="0 0",a["-o-transform-origin"]="0 0",a["transform-origin"]="0 0",a["-webkit-transform"]="rotate(0deg)",a["-moz-transform"]="rotate(0deg)",a["-ms-transform"]="rotate(0deg)",a["-o-transform"]="rotate(0deg)",a.transform="rotate(0deg)",a.opacity=1,a["pointer-events"]="none",r.onContextMenu,t.appendChild(i);var s=this._wireClickable,o=s.style;o.border="solid "+this._thicknessClickable+"px "+this._color,o.position="absolute",o["z-index"]=void 0===r.zIndex?"2000002":r.zIndex+1,o.width="0px",o.height="0px",o.visibility="visible",o.top="0px",o.left="0px",o["-webkit-transform-origin"]="0 0",o["-moz-transform-origin"]="0 0",o["-ms-transform-origin"]="0 0",o["-o-transform-origin"]="0 0",o["transform-origin"]="0 0",o["-webkit-transform"]="rotate(0deg)",o["-moz-transform"]="rotate(0deg)",o["-ms-transform"]="rotate(0deg)",o["-o-transform"]="rotate(0deg)",o.transform="rotate(0deg)",o.opacity=0,o["pointer-events"]="none",r.onContextMenu,t.appendChild(s),r.onMouseOver&&s.addEventListener("mouseover",(function(e){r.onMouseOver(e,n)})),r.onMouseLeave&&s.addEventListener("mouseleave",(function(e){r.onMouseLeave(e,n)})),r.onMouseWheel&&s.addEventListener("wheel",(function(e){r.onMouseWheel(e,n)})),r.onMouseDown&&s.addEventListener("mousedown",(function(e){r.onMouseDown(e,n)})),r.onMouseUp&&s.addEventListener("mouseup",(function(e){r.onMouseUp(e,n)})),r.onMouseMove&&s.addEventListener("mousemove",(function(e){r.onMouseMove(e,n)})),r.onContextMenu&&s.addEventListener("contextmenu",(function(e){r.onContextMenu(e,n),e.preventDefault()})),this._x1=0,this._y1=0,this._x2=0,this._y2=0,this._update()}return P(e,[{key:"visible",get:function(){return"visible"===this._wire.style.visibility}},{key:"_update",value:function(){var e=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2))),t=180*Math.atan2(this._y2-this._y1,this._x2-this._x1)/Math.PI,n=this._wire.style;n.width=Math.round(e)+"px",n.left=Math.round(this._x1)+"px",n.top=Math.round(this._y1)+"px",n["-webkit-transform"]="rotate("+t+"deg)",n["-moz-transform"]="rotate("+t+"deg)",n["-ms-transform"]="rotate("+t+"deg)",n["-o-transform"]="rotate("+t+"deg)",n.transform="rotate("+t+"deg)";var r=this._wireClickable.style;r.width=Math.round(e)+"px",r.left=Math.round(this._x1)+"px",r.top=Math.round(this._y1)+"px",r["-webkit-transform"]="rotate("+t+"deg)",r["-moz-transform"]="rotate("+t+"deg)",r["-ms-transform"]="rotate("+t+"deg)",r["-o-transform"]="rotate("+t+"deg)",r.transform="rotate("+t+"deg)"}},{key:"setStartAndEnd",value:function(e,t,n,r){this._x1=e,this._y1=t,this._x2=n,this._y2=r,this._update()}},{key:"setColor",value:function(e){this._color=e||"black",this._wire.style.border="solid "+this._thickness+"px "+this._color}},{key:"setOpacity",value:function(e){this._wire.style.opacity=e}},{key:"setVisible",value:function(e){this._visible!==e&&(this._visible=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setCulled",value:function(e){this._culled!==e&&(this._culled=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setClickable",value:function(e){this._wireClickable.style["pointer-events"]=e?"all":"none"}},{key:"setHighlighted",value:function(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._wire.classList.add(this._highlightClass):this._wire.classList.remove(this._highlightClass))}},{key:"destroy",value:function(e){this._wire.parentElement&&this._wire.parentElement.removeChild(this._wire),this._wireClickable.parentElement&&this._wireClickable.parentElement.removeChild(this._wireClickable)}}]),e}(),Ze=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this._highlightClass="viewer-ruler-dot-highlighted",this._x=0,this._y=0,this._visible=!0,this._dot=document.createElement("div"),this._dot.className+=this._dot.className?" viewer-ruler-dot":"viewer-ruler-dot",this._dotClickable=document.createElement("div"),this._dotClickable.className+=this._dotClickable.className?" viewer-ruler-dot-clickable":"viewer-ruler-dot-clickable",this._visible=!0,this._culled=!1;var i=this._dot,a=i.style;a["border-radius"]="25px",a.border="solid 2px white",a.background="lightgreen",a.position="absolute",a["z-index"]=void 0===r.zIndex?"40000005":r.zIndex,a.width="8px",a.height="8px",a.visibility=!1!==r.visible?"visible":"hidden",a.top="0px",a.left="0px",a["box-shadow"]="0 2px 5px 0 #182A3D;",a.opacity=1,a["pointer-events"]="none",r.onContextMenu,t.appendChild(i);var s=this._dotClickable,o=s.style;o["border-radius"]="35px",o.border="solid 10px white",o.position="absolute",o["z-index"]=void 0===r.zIndex?"40000007":r.zIndex+1,o.width="8px",o.height="8px",o.visibility="visible",o.top="0px",o.left="0px",o.opacity=0,o["pointer-events"]="none",r.onContextMenu,t.appendChild(s),s.addEventListener("click",(function(e){t.dispatchEvent(new MouseEvent("mouseover",e))})),r.onMouseOver&&s.addEventListener("mouseover",(function(e){r.onMouseOver(e,n),t.dispatchEvent(new MouseEvent("mouseover",e))})),r.onMouseLeave&&s.addEventListener("mouseleave",(function(e){r.onMouseLeave(e,n)})),r.onMouseWheel&&s.addEventListener("wheel",(function(e){r.onMouseWheel(e,n)})),r.onMouseDown&&s.addEventListener("mousedown",(function(e){r.onMouseDown(e,n)})),r.onMouseUp&&s.addEventListener("mouseup",(function(e){r.onMouseUp(e,n)})),r.onMouseMove&&s.addEventListener("mousemove",(function(e){r.onMouseMove(e,n)})),r.onContextMenu&&s.addEventListener("contextmenu",(function(e){r.onContextMenu(e,n),e.preventDefault()})),this.setPos(r.x||0,r.y||0),this.setFillColor(r.fillColor),this.setBorderColor(r.borderColor)}return P(e,[{key:"setPos",value:function(e,t){this._x=e,this._y=t;var n=this._dot.style;n.left=Math.round(e)-4+"px",n.top=Math.round(t)-4+"px";var r=this._dotClickable.style;r.left=Math.round(e)-9+"px",r.top=Math.round(t)-9+"px"}},{key:"setFillColor",value:function(e){this._dot.style.background=e||"lightgreen"}},{key:"setBorderColor",value:function(e){this._dot.style.border="solid 2px"+(e||"black")}},{key:"setOpacity",value:function(e){this._dot.style.opacity=e}},{key:"setVisible",value:function(e){this._visible!==e&&(this._visible=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setCulled",value:function(e){this._culled!==e&&(this._culled=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setClickable",value:function(e){this._dotClickable.style["pointer-events"]=e?"all":"none"}},{key:"setHighlighted",value:function(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._dot.classList.add(this._highlightClass):this._dot.classList.remove(this._highlightClass))}},{key:"destroy",value:function(){this.setVisible(!1),this._dot.parentElement&&this._dot.parentElement.removeChild(this._dot),this._dotClickable.parentElement&&this._dotClickable.parentElement.removeChild(this._dotClickable)}}]),e}(),$e=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this._highlightClass="viewer-ruler-label-highlighted",this._prefix=r.prefix||"",this._x=0,this._y=0,this._visible=!0,this._culled=!1,this._label=document.createElement("div"),this._label.className+=this._label.className?" viewer-ruler-label":"viewer-ruler-label";var i=this._label,a=i.style;a["border-radius"]="5px",a.color="white",a.padding="4px",a.border="solid 1px",a.background="lightgreen",a.position="absolute",a["z-index"]=void 0===r.zIndex?"5000005":r.zIndex,a.width="auto",a.height="auto",a.visibility="visible",a.top="0px",a.left="0px",a["pointer-events"]="all",a.opacity=1,r.onContextMenu,i.innerText="",t.appendChild(i),this.setPos(r.x||0,r.y||0),this.setFillColor(r.fillColor),this.setBorderColor(r.fillColor),this.setText(r.text),r.onMouseOver&&i.addEventListener("mouseover",(function(e){r.onMouseOver(e,n),e.preventDefault()})),r.onMouseLeave&&i.addEventListener("mouseleave",(function(e){r.onMouseLeave(e,n),e.preventDefault()})),r.onMouseWheel&&i.addEventListener("wheel",(function(e){r.onMouseWheel(e,n)})),r.onMouseDown&&i.addEventListener("mousedown",(function(e){r.onMouseDown(e,n)})),r.onMouseUp&&i.addEventListener("mouseup",(function(e){r.onMouseUp(e,n)})),r.onMouseMove&&i.addEventListener("mousemove",(function(e){r.onMouseMove(e,n)})),r.onContextMenu&&i.addEventListener("contextmenu",(function(e){r.onContextMenu(e,n),e.preventDefault()}))}return P(e,[{key:"setPos",value:function(e,t){this._x=e,this._y=t;var n=this._label.style;n.left=Math.round(e)-20+"px",n.top=Math.round(t)-12+"px"}},{key:"setPosOnWire",value:function(e,t,n,r){var i=e+.5*(n-e),a=t+.5*(r-t),s=this._label.style;s.left=Math.round(i)-20+"px",s.top=Math.round(a)-12+"px"}},{key:"setPosBetweenWires",value:function(e,t,n,r,i,a){var s=(e+n+i)/3,o=(t+r+a)/3,l=this._label.style;l.left=Math.round(s)-20+"px",l.top=Math.round(o)-12+"px"}},{key:"setText",value:function(e){this._label.innerHTML=this._prefix+(e||"")}},{key:"setFillColor",value:function(e){this._fillColor=e||"lightgreen",this._label.style.background=this._fillColor}},{key:"setBorderColor",value:function(e){this._borderColor=e||"black",this._label.style.border="solid 1px "+this._borderColor}},{key:"setOpacity",value:function(e){this._label.style.opacity=e}},{key:"setVisible",value:function(e){this._visible!==e&&(this._visible=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setCulled",value:function(e){this._culled!==e&&(this._culled=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setHighlighted",value:function(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._label.classList.add(this._highlightClass):this._label.classList.remove(this._highlightClass))}},{key:"setClickable",value:function(e){this._label.style["pointer-events"]=e?"all":"none"}},{key:"destroy",value:function(){this._label.parentElement&&this._label.parentElement.removeChild(this._label)}}]),e}(),et=$.vec3(),tt=$.vec3(),nt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e.viewer.scene,i)).plugin=e,r._container=i.container,!r._container)throw"config missing: container";r._color=i.color||e.defaultColor;var a=r.plugin.viewer.scene;r._originMarker=new qe(a,i.origin),r._cornerMarker=new qe(a,i.corner),r._targetMarker=new qe(a,i.target),r._originWorld=$.vec3(),r._cornerWorld=$.vec3(),r._targetWorld=$.vec3(),r._wp=new Float64Array(12),r._vp=new Float64Array(12),r._pp=new Float64Array(12),r._cp=new Int16Array(6);var s=i.onMouseOver?function(e){i.onMouseOver(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,o=i.onMouseLeave?function(e){i.onMouseLeave(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,l=i.onContextMenu?function(e){i.onContextMenu(e,w(r))}:null,u=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))},c=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},f=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},p=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))};return r._originDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._cornerDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._targetDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._originWire=new Je(r._container,{color:r._color||"blue",thickness:1,zIndex:e.zIndex,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._targetWire=new Je(r._container,{color:r._color||"red",thickness:1,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._angleLabel=new $e(r._container,{fillColor:r._color||"#00BBFF",prefix:"",text:"",zIndex:e.zIndex+2,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._wpDirty=!1,r._vpDirty=!1,r._cpDirty=!1,r._visible=!1,r._originVisible=!1,r._cornerVisible=!1,r._targetVisible=!1,r._originWireVisible=!1,r._targetWireVisible=!1,r._angleVisible=!1,r._labelsVisible=!1,r._clickable=!1,r._originMarker.on("worldPos",(function(e){r._originWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._cornerMarker.on("worldPos",(function(e){r._cornerWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._targetMarker.on("worldPos",(function(e){r._targetWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._onViewMatrix=a.camera.on("viewMatrix",(function(){r._vpDirty=!0,r._needUpdate(0)})),r._onProjMatrix=a.camera.on("projMatrix",(function(){r._cpDirty=!0,r._needUpdate()})),r._onCanvasBoundary=a.canvas.on("boundary",(function(){r._cpDirty=!0,r._needUpdate(0)})),r._onSectionPlaneUpdated=a.on("sectionPlaneUpdated",(function(){r._sectionPlanesDirty=!0,r._needUpdate()})),r.approximate=i.approximate,r.visible=i.visible,r.originVisible=i.originVisible,r.cornerVisible=i.cornerVisible,r.targetVisible=i.targetVisible,r.originWireVisible=i.originWireVisible,r.targetWireVisible=i.targetWireVisible,r.angleVisible=i.angleVisible,r.labelsVisible=i.labelsVisible,r}return P(n,[{key:"_update",value:function(){if(this._visible){var e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._cornerWorld[0],this._wp[5]=this._cornerWorld[1],this._wp[6]=this._cornerWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._targetWorld[2],this._wp[11]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&($.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._angleLabel.setCulled(!0),this._originWire.setCulled(!0),this._targetWire.setCulled(!0),this._originDot.setCulled(!0),this._cornerDot.setCulled(!0),void this._targetDot.setCulled(!0);this._angleLabel.setCulled(!1),this._originWire.setCulled(!1),this._targetWire.setCulled(!1),this._originDot.setCulled(!1),this._cornerDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}if(this._cpDirty){var t=-.3,n=this._originMarker.viewPos[2],r=this._cornerMarker.viewPos[2],i=this._targetMarker.viewPos[2];if(n>t||r>t||i>t)return this._originDot.setVisible(!1),this._cornerDot.setVisible(!1),this._targetDot.setVisible(!1),this._originWire.setVisible(!1),this._targetWire.setVisible(!1),void this._angleLabel.setCulled(!0);$.transformPositions4(e.camera.project.matrix,this._vp,this._pp);for(var a=this._pp,s=this._cp,o=e.canvas.canvas.getBoundingClientRect(),l=this._container.getBoundingClientRect(),u=o.top-l.top,c=o.left-l.left,f=e.canvas.boundary,p=f[2],A=f[3],d=0,v=0,h=a.length;v1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e.viewer.scene)).pointerLens=i.pointerLens,r._active=!1,r._mouseState=0,r._currentAngleMeasurement=null,r._initMarkerDiv(),r._onMouseHoverSurface=null,r._onHoverNothing=null,r._onPickedNothing=null,r._onPickedSurface=null,r._onInputMouseDown=null,r._onInputMouseUp=null,r._snapping=!1!==i.snapping,r._attachPlugin(e,i),r}return P(n,[{key:"_initMarkerDiv",value:function(){var e=document.createElement("div");e.setAttribute("id","myMarkerDiv");var t=this.scene.canvas.canvas;t.parentNode.insertBefore(e,t),e.style.background="black",e.style.border="2px solid blue",e.style.borderRadius="10px",e.style.width="5px",e.style.height="5px",e.style.margin="-200px -200px",e.style.zIndex="100",e.style.position="absolute",e.style.pointerEvents="none",this.markerDiv=e}},{key:"_destroyMarkerDiv",value:function(){if(this._markerDiv){var e=document.getElementById("myMarkerDiv");e.parentNode.removeChild(e),this._markerDiv=null}}},{key:"_attachPlugin",value:function(e){this.angleMeasurementsPlugin=e,this.plugin=e}},{key:"active",get:function(){return this._active}},{key:"snapping",get:function(){return this._snapping},set:function(e){e!==this._snapping?(this._snapping=e,this.deactivate(),this.activate()):this._snapping=e}},{key:"activate",value:function(){var e=this;if(!this._active){this.markerDiv||this._initMarkerDiv(),this.angleMeasurementsPlugin;var t=this.scene;t.input;var n=t.canvas.canvas,r=this.angleMeasurementsPlugin.viewer.cameraControl,i=this.pointerLens,a=!1,s=null,o=0,l=0,u=$.vec3(),c=$.vec2();this._currentAngleMeasurement=null,this._onMouseHoverSurface=r.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",(function(t){t.snappedToVertex||t.snappedToEdge?(i&&(i.visible=!0,i.canvasPos=t.canvasPos,i.snappedCanvasPos=t.snappedCanvasPos||t.canvasPos,i.snapped=!0),e.markerDiv.style.background="greenyellow",e.markerDiv.style.border="2px solid green"):(i&&(i.visible=!0,i.canvasPos=t.canvasPos,i.snappedCanvasPos=t.canvasPos,i.snapped=!1),e.markerDiv.style.background="pink",e.markerDiv.style.border="2px solid red");var r=t.snappedCanvasPos||t.canvasPos;switch(a=!0,s=t.entity,u.set(t.worldPos),c.set(r),e._mouseState){case 0:var o=n.getBoundingClientRect(),l=window.pageXOffset||document.documentElement.scrollLeft,f=window.pageYOffset||document.documentElement.scrollTop,p=o.left+l,A=o.top+f;e.markerDiv.style.marginLeft="".concat(p+r[0]-5,"px"),e.markerDiv.style.marginTop="".concat(A+r[1]-5,"px");break;case 1:e._currentAngleMeasurement&&(e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.angleVisible=!1,e._currentAngleMeasurement.corner.worldPos=t.worldPos,e._currentAngleMeasurement.corner.entity=t.entity),e.markerDiv.style.marginLeft="-10000px",e.markerDiv.style.marginTop="-10000px",n.style.cursor="pointer";break;case 2:e._currentAngleMeasurement&&(e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.angleVisible=!0,e._currentAngleMeasurement.target.worldPos=t.worldPos,e._currentAngleMeasurement.target.entity=t.entity),e.markerDiv.style.marginLeft="-10000px",e.markerDiv.style.marginTop="-10000px",n.style.cursor="pointer"}})),n.addEventListener("mousedown",this._onMouseDown=function(e){1===e.which&&(o=e.clientX,l=e.clientY)}),n.addEventListener("mouseup",this._onMouseUp=function(t){if(1===t.which&&!(t.clientX>o+20||t.clientXl+20||t.clientY1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,"AngleMeasurements",e))._container=i.container||document.body,r._defaultControl=null,r._measurements={},r.defaultColor=void 0!==i.defaultColor?i.defaultColor:"#00BBFF",r.defaultLabelsVisible=!1!==i.defaultLabelsVisible,r.zIndex=i.zIndex||1e4,r._onMouseOver=function(e,t){r.fire("mouseOver",{plugin:w(r),angleMeasurement:t,measurement:t,event:e})},r._onMouseLeave=function(e,t){r.fire("mouseLeave",{plugin:w(r),angleMeasurement:t,measurement:t,event:e})},r._onContextMenu=function(e,t){r.fire("contextMenu",{plugin:w(r),angleMeasurement:t,measurement:t,event:e})},r}return P(n,[{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,t){}},{key:"control",get:function(){return this._defaultControl||(this._defaultControl=new it(this,{})),this._defaultControl}},{key:"measurements",get:function(){return this._measurements}},{key:"createMeasurement",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.viewer.scene.components[t.id]&&(this.error("Viewer scene component with this ID already exists: "+t.id),delete t.id);var n=t.origin,r=t.corner,i=t.target,a=new nt(this,{id:t.id,plugin:this,container:this._container,origin:{entity:n.entity,worldPos:n.worldPos},corner:{entity:r.entity,worldPos:r.worldPos},target:{entity:i.entity,worldPos:i.worldPos},visible:t.visible,originVisible:!0,originWireVisible:!0,cornerVisible:!0,targetWireVisible:!0,targetVisible:!0,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[a.id]=a,a.on("destroyed",(function(){delete e._measurements[a.id]})),a.clickable=!0,this.fire("measurementCreated",a),a}},{key:"destroyMeasurement",value:function(e){var t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("AngleMeasurement not found: "+e)}},{key:"setLabelsShown",value:function(e){for(var t=0,n=Object.entries(this.measurements);t

";le.isArray(t)&&(t=t.join("")),t=this._renderTemplate(t.trim());var n=document.createRange().createContextualFragment(t);this._marker=n.firstChild,this._container.appendChild(this._marker),this._marker.style.visibility=this._markerShown?"visible":"hidden",this._marker.addEventListener("click",(function(){e.plugin.fire("markerClicked",e)})),this._marker.addEventListener("mouseenter",(function(){e.plugin.fire("markerMouseEnter",e)})),this._marker.addEventListener("mouseleave",(function(){e.plugin.fire("markerMouseLeave",e)})),this._marker.addEventListener("wheel",(function(t){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",t))}))}if(!this._labelExternal){this._label&&(this._container.removeChild(this._label),this._label=null);var r=this._labelHTML||"

";le.isArray(r)&&(r=r.join("")),r=this._renderTemplate(r.trim());var i=document.createRange().createContextualFragment(r);this._label=i.firstChild,this._container.appendChild(this._label),this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden",this._label.addEventListener("wheel",(function(t){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",t))}))}}},{key:"_updatePosition",value:function(){var e=this.scene.canvas.boundary,t=e[0],n=e[1],r=this.canvasPos;this._marker.style.left=Math.floor(t+r[0])-12+"px",this._marker.style.top=Math.floor(n+r[1])-12+"px",this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;this._label.style.left=20+Math.floor(t+r[0]+20)+"px",this._label.style.top=Math.floor(n+r[1]+-17)+"px",this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1}},{key:"_renderTemplate",value:function(e){for(var t in this._values)if(this._values.hasOwnProperty(t)){var n=this._values[t];e=e.replace(new RegExp("{{"+t+"}}","g"),n)}return e}},{key:"setMarkerShown",value:function(e){e=!!e,this._markerShown!==e&&(this._markerShown=e,this._visibilityDirty=!0)}},{key:"getMarkerShown",value:function(){return this._markerShown}},{key:"setLabelShown",value:function(e){e=!!e,this._labelShown!==e&&(this._labelShown=e,this._visibilityDirty=!0)}},{key:"getLabelShown",value:function(){return this._labelShown}},{key:"setField",value:function(e,t){this._values[e]=t||"",this._htmlDirty=!0}},{key:"getField",value:function(e){return this._values[e]}},{key:"setValues",value:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];this.setField(t,n)}}},{key:"getValues",value:function(){return this._values}},{key:"destroy",value:function(){this._marker&&(this._markerExternal?(this._marker.removeEventListener("click",this._onMouseClickedExternalMarker),this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker),this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker),this._marker=null):this._marker.parentNode.removeChild(this._marker)),this._label&&(this._labelExternal||this._label.parentNode.removeChild(this._label),this._label=null),this.scene.off(this._onTick),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),ot=$.vec3(),lt=$.vec3(),ut=$.vec3(),ct=function(e){h(n,Re);var t=y(n);function n(e,r){var i;return b(this,n),(i=t.call(this,"Annotations",e))._labelHTML=r.labelHTML||"
",i._markerHTML=r.markerHTML||"
",i._container=r.container||document.body,i._values=r.values||{},i.annotations={},i.surfaceOffset=r.surfaceOffset,i}return P(n,[{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,t){if("clearAnnotations"===e)this.clear()}},{key:"surfaceOffset",get:function(){return this._surfaceOffset},set:function(e){null==e&&(e=.3),this._surfaceOffset=e}},{key:"createAnnotation",value:function(e){var t,n,r=this;if(this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),e.pickResult=e.pickResult||e.pickRecord,e.pickResult){var i=e.pickResult;if(i.worldPos&&i.worldNormal){var a=$.normalizeVec3(i.worldNormal,ot),s=$.mulVec3Scalar(a,this._surfaceOffset,lt);t=$.addVec3(i.worldPos,s,ut),n=i.entity}else this.error("Param 'pickResult' does not have both worldPos and worldNormal")}else t=e.worldPos,n=e.entity;var o=null;e.markerElementId&&((o=document.getElementById(e.markerElementId))||this.error("Can't find DOM element for 'markerElementId' value '"+e.markerElementId+"' - defaulting to internally-generated empty DIV"));var l=null;e.labelElementId&&((l=document.getElementById(e.labelElementId))||this.error("Can't find DOM element for 'labelElementId' value '"+e.labelElementId+"' - defaulting to internally-generated empty DIV"));var u=new st(this.viewer.scene,{id:e.id,plugin:this,entity:n,worldPos:t,container:this._container,markerElement:o,labelElement:l,markerHTML:e.markerHTML||this._markerHTML,labelHTML:e.labelHTML||this._labelHTML,occludable:e.occludable,values:le.apply(e.values,le.apply(this._values,{})),markerShown:e.markerShown,labelShown:e.labelShown,eye:e.eye,look:e.look,up:e.up,projection:e.projection,visible:!1!==e.visible});return this.annotations[u.id]=u,u.on("destroyed",(function(){delete r.annotations[u.id],r.fire("annotationDestroyed",u.id)})),this.fire("annotationCreated",u.id),u}},{key:"destroyAnnotation",value:function(e){var t=this.annotations[e];t?t.destroy():this.log("Annotation not found: "+e)}},{key:"clear",value:function(){for(var e=Object.keys(this.annotations),t=0,n=e.length;t1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._canvas=i.canvas,r._element=null,r._isCustom=!1,i.elementId&&(r._element=document.getElementById(i.elementId),r._element?r._adjustPosition():r.error("Can't find given Spinner HTML element: '"+i.elementId+"' - will automatically create default element")),r._element||r._createDefaultSpinner(),r.processes=0,r}return P(n,[{key:"type",get:function(){return"Spinner"}},{key:"_createDefaultSpinner",value:function(){this._injectDefaultCSS();var e=document.createElement("div"),t=e.style;t["z-index"]="9000",t.position="absolute",e.innerHTML='
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}},{key:"_injectDefaultCSS",value:function(){var e="xeokit-spinner-css";if(!document.getElementById(e)){var t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}}},{key:"_adjustPosition",value:function(){if(!this._isCustom){var e=this._canvas,t=this._element,n=t.style;n.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",n.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}}},{key:"processes",get:function(){return this._processes},set:function(e){if(e=e||0,this._processes!==e&&!(e<0)){var t=this._processes;this._processes=e;var n=this._element;n&&(n.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}}},{key:"_destroy",value:function(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);var e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}]),n}(),pt=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"],At=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._backgroundColor=$.vec3([i.backgroundColor?i.backgroundColor[0]:1,i.backgroundColor?i.backgroundColor[1]:1,i.backgroundColor?i.backgroundColor[2]:1]),r._backgroundColorFromAmbientLight=!!i.backgroundColorFromAmbientLight,r.canvas=i.canvas,r.gl=null,r.webgl2=!1,r.transparent=!!i.transparent,r.contextAttr=i.contextAttr||{},r.contextAttr.alpha=r.transparent,r.contextAttr.preserveDrawingBuffer=!!r.contextAttr.preserveDrawingBuffer,r.contextAttr.stencil=!1,r.contextAttr.premultipliedAlpha=!!r.contextAttr.premultipliedAlpha,r.contextAttr.antialias=!1!==r.contextAttr.antialias,r.resolutionScale=i.resolutionScale,r.canvas.width=Math.round(r.canvas.clientWidth*r._resolutionScale),r.canvas.height=Math.round(r.canvas.clientHeight*r._resolutionScale),r.boundary=[r.canvas.offsetLeft,r.canvas.offsetTop,r.canvas.clientWidth,r.canvas.clientHeight],r._initWebGL(i);var a=w(r);r.canvas.addEventListener("webglcontextlost",r._webglcontextlostListener=function(e){console.time("webglcontextrestored"),a.scene._webglContextLost(),a.fire("webglcontextlost"),e.preventDefault()},!1),r.canvas.addEventListener("webglcontextrestored",r._webglcontextrestoredListener=function(e){a._initWebGL(),a.gl&&(a.scene._webglContextRestored(a.gl),a.fire("webglcontextrestored",a.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);var s=!0,o=new ResizeObserver((function(e){var t,n=c(e);try{for(n.s();!(t=n.n()).done;){t.value.contentBoxSize&&(s=!0)}}catch(e){n.e(e)}finally{n.f()}}));return o.observe(r.canvas),r._tick=r.scene.on("tick",(function(){s&&(s=!1,a.canvas.width=Math.round(a.canvas.clientWidth*a._resolutionScale),a.canvas.height=Math.round(a.canvas.clientHeight*a._resolutionScale),a.boundary[0]=a.canvas.offsetLeft,a.boundary[1]=a.canvas.offsetTop,a.boundary[2]=a.canvas.clientWidth,a.boundary[3]=a.canvas.clientHeight,a.fire("boundary",a.boundary))})),r._spinner=new ft(r.scene,{canvas:r.canvas,elementId:i.spinnerElementId}),r}return P(n,[{key:"type",get:function(){return"Canvas"}},{key:"backgroundColorFromAmbientLight",get:function(){return this._backgroundColorFromAmbientLight},set:function(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}},{key:"resolutionScale",get:function(){return this._resolutionScale},set:function(e){if((e=e||1)!==this._resolutionScale){this._resolutionScale=e;var t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}}},{key:"spinner",get:function(){return this._spinner}},{key:"_createCanvas",value:function(){var e="xeokit-canvas-"+$.createUUID(),t=document.getElementsByTagName("body")[0],n=document.createElement("div"),r=n.style;r.height="100%",r.width="100%",r.padding="0",r.margin="0",r.background="rgba(0,0,0,0);",r.float="left",r.left="0",r.top="0",r.position="absolute",r.opacity="1.0",r["z-index"]="-10000",n.innerHTML+='',t.appendChild(n),this.canvas=document.getElementById(e)}},{key:"_getElementXY",value:function(e){for(var t=0,n=0;e;)t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:n}}},{key:"_initWebGL",value:function(){if(!this.gl)for(var e=0;!this.gl&&e0?vt.FS_MAX_FLOAT_PRECISION="highp":It.getShaderPrecisionFormat(It.FRAGMENT_SHADER,It.MEDIUM_FLOAT).precision>0?vt.FS_MAX_FLOAT_PRECISION="mediump":vt.FS_MAX_FLOAT_PRECISION="lowp":vt.FS_MAX_FLOAT_PRECISION="mediump",vt.DEPTH_BUFFER_BITS=It.getParameter(It.DEPTH_BITS),vt.MAX_TEXTURE_SIZE=It.getParameter(It.MAX_TEXTURE_SIZE),vt.MAX_CUBE_MAP_SIZE=It.getParameter(It.MAX_CUBE_MAP_TEXTURE_SIZE),vt.MAX_RENDERBUFFER_SIZE=It.getParameter(It.MAX_RENDERBUFFER_SIZE),vt.MAX_TEXTURE_UNITS=It.getParameter(It.MAX_COMBINED_TEXTURE_IMAGE_UNITS),vt.MAX_TEXTURE_IMAGE_UNITS=It.getParameter(It.MAX_TEXTURE_IMAGE_UNITS),vt.MAX_VERTEX_ATTRIBS=It.getParameter(It.MAX_VERTEX_ATTRIBS),vt.MAX_VERTEX_UNIFORM_VECTORS=It.getParameter(It.MAX_VERTEX_UNIFORM_VECTORS),vt.MAX_FRAGMENT_UNIFORM_VECTORS=It.getParameter(It.MAX_FRAGMENT_UNIFORM_VECTORS),vt.MAX_VARYING_VECTORS=It.getParameter(It.MAX_VARYING_VECTORS),It.getSupportedExtensions().forEach((function(e){vt.SUPPORTED_EXTENSIONS[e]=!0})))}var yt=function(){function e(){b(this,e),this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._canvasPos=new Int16Array([0,0]),this._snappedCanvasPos=new Int16Array([0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}return P(e,[{key:"canvasPos",get:function(){return this._gotCanvasPos?this._canvasPos:null},set:function(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}},{key:"origin",get:function(){return this._gotOrigin?this._origin:null},set:function(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}},{key:"direction",get:function(){return this._gotDirection?this._direction:null},set:function(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}},{key:"indices",get:function(){return this.entity&&this._gotIndices?this._indices:null},set:function(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}},{key:"localPos",get:function(){return this.entity&&this._gotLocalPos?this._localPos:null},set:function(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}},{key:"snappedCanvasPos",get:function(){return this._gotSnappedCanvasPos?this._snappedCanvasPos:null},set:function(e){e?(this._snappedCanvasPos[0]=e[0],this._snappedCanvasPos[1]=e[1],this._gotSnappedCanvasPos=!0):this._gotSnappedCanvasPos=!1}},{key:"worldPos",get:function(){return this._gotWorldPos?this._worldPos:null},set:function(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}},{key:"viewPos",get:function(){return this.entity&&this._gotViewPos?this._viewPos:null},set:function(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}},{key:"bary",get:function(){return this.entity&&this._gotBary?this._bary:null},set:function(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}},{key:"worldNormal",get:function(){return this.entity&&this._gotWorldNormal?this._worldNormal:null},set:function(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}},{key:"uv",get:function(){return this.entity&&this._gotUV?this._uv:null},set:function(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}},{key:"reset",value:function(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotSnappedCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}]),e}(),mt=function(){function e(t,n,r){if(b(this,e),this.allocated=!1,this.compiled=!1,this.handle=t.createShader(n),this.handle){if(this.allocated=!0,t.shaderSource(this.handle,r),t.compileShader(this.handle),this.compiled=t.getShaderParameter(this.handle,t.COMPILE_STATUS),!this.compiled&&!t.isContextLost()){for(var i=r.split("\n"),a=[],s=0;s0&&"/"===t.charAt(n+1)&&(t=t.substring(0,n)),r.push(t);return r.join("\n")}function bt(e){console.error(e.join("\n"))}var Dt=function(){function e(t,n){b(this,e),this.id=Et.addItem({}),this.source=n,this.init(t)}return P(e,[{key:"init",value:function(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new mt(e,e.VERTEX_SHADER,Tt(this.source.vertex)),this._fragmentShader=new mt(e,e.FRAGMENT_SHADER,Tt(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void bt(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void bt(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void bt(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void bt(this.errors);var t,n,r,i,a;if(this.compiled=!0,this.handle=e.createProgram(),this.handle){if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void bt(this.errors);var s=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(n=0;nthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}},{key:"setData",value:function(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}},{key:"bind",value:function(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}},{key:"unbind",value:function(){this.allocated&&this._gl.bindBuffer(this.type,null)}},{key:"destroy",value:function(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}]),e}(),Ct=function(){function e(t,n){b(this,e),this.scene=t,this.aabb=$.AABB3(),this.origin=$.vec3(n),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}return P(e,[{key:"addMarker",value:function(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}},{key:"markerWorldPosUpdated",value:function(e){if(this.markers[e.id]){var t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}}},{key:"removeMarker",value:function(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}},{key:"update",value:function(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}},{key:"_buildMarkerList",value:function(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}},{key:"_buildPositions",value:function(){for(var e=0,t=0;t-t)o._setVisible(!1);else{var l=o.canvasPos,u=l[0],c=l[1];u+10<0||c+10<0||u-10>r||c-10>i?o._setVisible(!1):!o.entity||o.entity.visible?o.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=o,this.pixels[a++]=u,this.pixels[a++]=c):o._setVisible(!0):o._setVisible(!1)}}}},{key:"_updateActiveSectionPlanes",value:function(){var e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(var n=0;n0,n=[];return n.push("#version 300 es"),n.push("// OcclusionTester vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&n.push("out vec4 vWorldPosition;"),n.push("void main(void) {"),n.push("vec4 worldPosition = vec4(position, 1.0); "),n.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&n.push(" vWorldPosition = worldPosition;"),n.push(" vec4 clipPos = projMatrix * viewPosition;"),n.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?n.push("vFragDepth = 1.0 + clipPos.w;"):n.push("clipPos.z += -0.001;"),n.push(" gl_Position = clipPos;"),n.push("}"),n}},{key:"_buildFragmentShaderSource",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.sectionPlanes.length>0,r=[];if(r.push("#version 300 es"),r.push("// OcclusionTester fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;");for(var i=0;i 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),r.push("}"),r}},{key:"_buildProgram",value:function(){this._program&&this._program.destroy();var e=this._scene,t=e.canvas.gl,n=e._sectionPlanesState;if(this._program=new Dt(t,this._shaderSource),this._program.errors)this.errors=this._program.errors;else{var r=this._program;this._uViewMatrix=r.getLocation("viewMatrix"),this._uProjMatrix=r.getLocation("projMatrix"),this._uSectionPlanes=[];for(var i=0,a=n.sectionPlanes.length;i0)for(var p=r.sectionPlanes,A=0;A= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }")]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);var r=new Float32Array([1,1,0,1,0,0,1,0]),i=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),a=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Pt(n,n.ARRAY_BUFFER,i,i.length,3,n.STATIC_DRAW),this._uvBuf=new Pt(n,n.ARRAY_BUFFER,r,r.length,2,n.STATIC_DRAW),this._indicesBuf=new Pt(n,n.ELEMENT_ARRAY_BUFFER,a,a.length,1,n.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}}},{key:"destroy",value:function(){this._program&&(this._program.destroy(),this._program=null)}}]),e}(),Nt=new Float32Array(Ut(17,[0,1])),Lt=new Float32Array(Ut(17,[1,0])),xt=new Float32Array(function(e,t){for(var n=[],r=0;r<=e;r++)n.push(Ht(r,t));return n}(17,4)),Mt=new Float32Array(2),Ft=function(){function e(t){b(this,e),this._scene=t,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}return P(e,[{key:"init",value:function(){var e=this._scene.canvas.gl;if(this._program=new Dt(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS ".concat(16,"\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }")]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);var t=new Float32Array([1,1,0,1,0,0,1,0]),n=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),r=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Pt(e,e.ARRAY_BUFFER,n,n.length,3,e.STATIC_DRAW),this._uvBuf=new Pt(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new Pt(e,e.ELEMENT_ARRAY_BUFFER,r,r.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}},{key:"render",value:function(e,t,n){var r=this;if(!this._programError){this._getInverseProjectMat||(this._getInverseProjectMat=function(){var e=!0;r._scene.camera.on("projMatrix",(function(){e=!0}));var t=$.mat4();return function(){return e&&$.inverseMat4(s.camera.projMatrix,t),t}}());var i=this._scene.canvas.gl,a=this._program,s=this._scene,o=i.drawingBufferWidth,l=i.drawingBufferHeight,u=s.camera.project._state,c=u.near,f=u.far;i.viewport(0,0,o,l),i.clearColor(0,0,0,1),i.enable(i.DEPTH_TEST),i.disable(i.BLEND),i.frontFace(i.CCW),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),a.bind(),Mt[0]=o,Mt[1]=l,i.uniform2fv(this._uViewport,Mt),i.uniform1f(this._uCameraNear,c),i.uniform1f(this._uCameraFar,f),i.uniform1f(this._uDepthCutoff,.01),0===n?i.uniform2fv(this._uSampleOffsets,Lt):i.uniform2fv(this._uSampleOffsets,Nt),i.uniform1fv(this._uSampleWeights,xt);var p=e.getDepthTexture(),A=t.getTexture();a.bindTexture(this._uDepthTexture,p,0),a.bindTexture(this._uOcclusionTexture,A,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),i.drawElements(i.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}}},{key:"destroy",value:function(){this._program.destroy()}}]),e}();function Ht(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function Ut(e,t){for(var n=[],r=0;r<=e;r++)n.push(t[0]*r),n.push(t[1]*r);return n}var Gt=function(){function e(t,n,r){b(this,e),r=r||{},this.gl=n,this.allocated=!1,this.canvas=t,this.buffer=null,this.bound=!1,this.size=r.size,this._hasDepthTexture=!!r.depthTexture}return P(e,[{key:"setSize",value:function(e){this.size=e}},{key:"webglContextRestored",value:function(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}},{key:"bind",value:function(){if(this._touch.apply(this,arguments),!this.bound){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}}},{key:"createTexture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.gl,i=r.createTexture();return r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),n?r.texStorage2D(r.TEXTURE_2D,1,n,e,t):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null),i}},{key:"_touch",value:function(){var e,t,n=this,r=this.gl;if(this.size?(e=this.size[0],t=this.size[1]):(e=r.drawingBufferWidth,t=r.drawingBufferHeight),this.buffer){if(this.buffer.width===e&&this.buffer.height===t)return;this.buffer.textures.forEach((function(e){return r.deleteTexture(e)})),r.deleteFramebuffer(this.buffer.framebuf),r.deleteRenderbuffer(this.buffer.renderbuf)}for(var i,a=[],s=arguments.length,o=new Array(s),l=0;l0?a.push.apply(a,u(o.map((function(r){return n.createTexture(e,t,r)})))):a.push(this.createTexture(e,t)),this._hasDepthTexture&&(i=r.createTexture(),r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texImage2D(r.TEXTURE_2D,0,r.DEPTH_COMPONENT32F,e,t,0,r.DEPTH_COMPONENT,r.FLOAT,null));var c=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,c),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_COMPONENT32F,e,t);var f=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,f);for(var p=0;p0&&r.drawBuffers(a.map((function(e,t){return r.COLOR_ATTACHMENT0+t}))),this._hasDepthTexture?r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,i,0):r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,c),r.bindTexture(r.TEXTURE_2D,null),r.bindRenderbuffer(r.RENDERBUFFER,null),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindFramebuffer(r.FRAMEBUFFER,f),!r.isFramebuffer(f))throw"Invalid framebuffer";r.bindFramebuffer(r.FRAMEBUFFER,null);var A=r.checkFramebufferStatus(r.FRAMEBUFFER);switch(A){case r.FRAMEBUFFER_COMPLETE:break;case r.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case r.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case r.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case r.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+A}this.buffer={framebuf:f,renderbuf:c,texture:a[0],textures:a,depthTexture:i,width:e,height:t},this.bound=!1}},{key:"clear",value:function(){if(!this.bound)throw"Render buffer not bound";var e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}},{key:"read",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Uint8Array,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:4,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=e,l=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,u=new i(a),c=this.gl;return c.readBuffer(c.COLOR_ATTACHMENT0+s),c.readPixels(o,l,1,1,n||c.RGBA,r||c.UNSIGNED_BYTE,u,0),u}},{key:"readArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Uint8Array,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=new n(this.buffer.width*this.buffer.height*r),s=this.gl;return s.readBuffer(s.COLOR_ATTACHMENT0+i),s.readPixels(0,0,this.buffer.width,this.buffer.height,e||s.RGBA,t||s.UNSIGNED_BYTE,a,0),a}},{key:"readImageAsCanvas",value:function(){var e=this.gl,t=this._getImageDataCache(),n=t.pixelData,r=t.canvas,i=t.imageData,a=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,n);for(var s=this.buffer.width,o=this.buffer.height,l=o/2|0,u=4*s,c=new Uint8Array(4*s),f=0;f0&&void 0!==arguments[0]?arguments[0]:Uint8Array,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=this.buffer.width,r=this.buffer.height,i=this._imageDataCache;if(i&&(i.width===n&&i.height===r||(this._imageDataCache=null,i=null)),!i){var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=r,i={pixelData:new e(n*r*t),canvas:a,context:s,imageData:s.createImageData(n,r),width:n,height:r},this._imageDataCache=i}return i.context.resetTransform(),i}},{key:"unbind",value:function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,null),this.bound=!1}},{key:"getTexture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this;return this._texture||(this._texture={renderBuffer:this,bind:function(n){return!(!t.buffer||!t.buffer.textures[e])&&(t.gl.activeTexture(t.gl["TEXTURE"+n]),t.gl.bindTexture(t.gl.TEXTURE_2D,t.buffer.textures[e]),!0)},unbind:function(n){t.buffer&&t.buffer.textures[e]&&(t.gl.activeTexture(t.gl["TEXTURE"+n]),t.gl.bindTexture(t.gl.TEXTURE_2D,null))}})}},{key:"hasDepthTexture",value:function(){return this._hasDepthTexture}},{key:"getDepthTexture",value:function(){if(!this._hasDepthTexture)return null;var e=this;return this._depthTexture||(this._dethTexture={renderBuffer:this,bind:function(t){return!(!e.buffer||!e.buffer.depthTexture)&&(e.gl.activeTexture(e.gl["TEXTURE"+t]),e.gl.bindTexture(e.gl.TEXTURE_2D,e.buffer.depthTexture),!0)},unbind:function(t){e.buffer&&e.buffer.depthTexture&&(e.gl.activeTexture(e.gl["TEXTURE"+t]),e.gl.bindTexture(e.gl.TEXTURE_2D,null))}})}},{key:"destroy",value:function(){if(this.allocated){var e=this.gl;this.buffer.textures.forEach((function(t){return e.deleteTexture(t)})),e.deleteTexture(this.buffer.depthTexture),e.deleteFramebuffer(this.buffer.framebuf),e.deleteRenderbuffer(this.buffer.renderbuf),this.allocated=!1,this.buffer=null,this.bound=!1}this._imageDataCache=null,this._texture=null,this._depthTexture=null}}]),e}(),kt=function(){function e(t){b(this,e),this.scene=t,this._renderBuffersBasic={},this._renderBuffersScaled={}}return P(e,[{key:"getRenderBuffer",value:function(e,t){var n=1===this.scene.canvas.resolutionScale?this._renderBuffersBasic:this._renderBuffersScaled,r=n[e];return r||(r=new Gt(this.scene.canvas.canvas,this.scene.canvas.gl,t),n[e]=r),r}},{key:"destroy",value:function(){for(var e in this._renderBuffersBasic)this._renderBuffersBasic[e].destroy();for(var t in this._renderBuffersScaled)this._renderBuffersScaled[t].destroy()}}]),e}();function jt(e,t){if(void 0===e._cachedExtensions&&(e._cachedExtensions={}),void 0!==e._cachedExtensions[t])return e._cachedExtensions[t];var n;switch(t){case"WEBGL_depth_texture":n=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=e.getExtension(t)}return e._cachedExtensions[t]=n,n}var Vt=function(e,t){t=t||{};var n=new dt(e),r=e.canvas.canvas,i=e.canvas.gl,a=!!t.transparent,s=t.alphaDepthMask,o=new G({}),l={},u={},c=!0,f=!0,p=!0,A=!0,d=!0,v=!0,h=!0,I=!0,y=new kt(e),m=!1,w=new St(e),g=new Ft(e);function E(){c&&(!function(){for(var e in l)if(l.hasOwnProperty(e)){var t=l[e],n=t.drawableMap,r=t.drawableListPreCull,i=0;for(var a in n)n.hasOwnProperty(a)&&(r[i++]=n[a]);r.length=i}}(),c=!1,f=!0),f&&(!function(){for(var e in l)if(l.hasOwnProperty(e)){var t=l[e];t.isStateSortable&&t.drawableListPreCull.sort(t.stateSortCompare)}}(),f=!1,p=!0),p&&function(){for(var e in l)if(l.hasOwnProperty(e)){for(var t=l[e],n=t.drawableListPreCull,r=t.drawableList,i=0,a=0,s=n.length;a0)for(n.withSAO=!0,O=0;O0)for(O=0;O0)for(O=0;O0)for(O=0;O0||Q>0||U>0||G>0){if(i.enable(i.CULL_FACE),i.enable(i.BLEND),a?(i.blendEquation(i.FUNC_ADD),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)):(i.blendEquation(i.FUNC_ADD),i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA)),n.backfaces=!1,s||i.depthMask(!1),(U>0||G>0)&&i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),G>0)for(O=0;O0)for(O=0;O0)for(O=0;O0)for(O=0;O0||z>0){if(n.lastProgramId=null,e.highlightMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),z>0)for(O=0;O0)for(O=0;O0||Y>0||W>0){if(n.lastProgramId=null,e.selectedMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),i.enable(i.BLEND),a?(i.blendEquation(i.FUNC_ADD),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)):i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),i.enable(i.CULL_FACE),Y>0)for(O=0;O0)for(O=0;O0||q>0){if(n.lastProgramId=null,e.selectedMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),q>0)for(O=0;O0)for(O=0;O0||Z>0){if(n.lastProgramId=null,e.selectedMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),i.enable(i.CULL_FACE),i.enable(i.BLEND),a?(i.blendEquation(i.FUNC_ADD),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)):i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),Z>0)for(O=0;O0)for(O=0;O1&&void 0!==arguments[1]?arguments[1]:s;d.reset(),E();var v=null,h=null;for(var I in d.pickSurface=p.pickSurface,p.canvasPos?(u[0]=p.canvasPos[0],u[1]=p.canvasPos[1],v=e.camera.viewMatrix,h=e.camera.projMatrix,d.canvasPos=p.canvasPos):(p.matrix?(v=p.matrix,h=e.camera.projMatrix):(c.set(p.origin||[0,0,0]),f.set(p.direction||[0,0,1]),A=$.addVec3(c,f,t),i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),$.normalizeVec3(i),$.cross3Vec3(f,i,a),v=$.lookAtMat4v(c,A,a,n),h=e.camera.ortho.matrix,d.origin=c,d.direction=f),u[0]=.5*r.clientWidth,u[1]=.5*r.clientHeight),l)if(l.hasOwnProperty(I))for(var m=l[I].drawableList,w=0,g=m.length;w4&&void 0!==arguments[4]?arguments[4]:P;if(!a&&!s)return this.pick({canvasPos:t,pickSurface:!0});var c=e.canvas.resolutionScale;n.reset(),n.backfaces=!0,n.frontface=!0,n.pickZNear=e.camera.project.near,n.pickZFar=e.camera.project.far,r=r||30;var f=y.getRenderBuffer("uniquePickColors-aabs",{depthTexture:!0,size:[2*r+1,2*r+1]});n.snapVectorA=[B(t[0]*c,i.drawingBufferWidth),O(t[1]*c,i.drawingBufferHeight)],n.snapInvVectorAB=[i.drawingBufferWidth/(2*r),i.drawingBufferHeight/(2*r)],f.bind(i.RGBA32I,i.RGBA32I,i.RGBA8UI),i.viewport(0,0,f.size[0],f.size[1]),i.enable(i.DEPTH_TEST),i.frontFace(i.CCW),i.disable(i.CULL_FACE),i.depthMask(!0),i.disable(i.BLEND),i.depthFunc(i.LEQUAL),i.clear(i.DEPTH_BUFFER_BIT),i.clearBufferiv(i.COLOR,0,new Int32Array([0,0,0,0])),i.clearBufferiv(i.COLOR,1,new Int32Array([0,0,0,0])),i.clearBufferuiv(i.COLOR,2,new Uint32Array([0,0,0,0]));var p=e.camera.viewMatrix,A=e.camera.projMatrix;for(var d in l)if(l.hasOwnProperty(d))for(var v=l[d].drawableList,h=0,I=v.length;h0){var V=Math.floor(j/4),Q=f.size[0],W=V%Q-Math.floor(Q/2),z=Math.floor(V/Q)-Math.floor(Q/2),K=Math.sqrt(Math.pow(W,2)+Math.pow(z,2));k.push({x:W,y:z,dist:K,isVertex:a&&s?E[j+3]>g.length/2:a,result:[E[j+0],E[j+1],E[j+2],E[j+3]],normal:[T[j+0],T[j+1],T[j+2],T[j+3]],id:[b[j+0],b[j+1],b[j+2],b[j+3]]})}var Y=null,X=null,q=null,J=null;if(k.length>0){k.sort((function(e,t){return e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist})),J=k[0].isVertex?"vertex":"edge";var Z=k[0].result,ee=k[0].normal,te=k[0].id,ne=g[Z[3]],re=ne.origin,ie=ne.coordinateScale;X=$.normalizeVec3([ee[0]/$.MAX_INT,ee[1]/$.MAX_INT,ee[2]/$.MAX_INT]),Y=[Z[0]*ie[0]+re[0],Z[1]*ie[1]+re[1],Z[2]*ie[2]+re[2]],q=o.items[te[0]+(te[1]<<8)+(te[2]<<16)+(te[3]<<24)]}if(null===D&&null==Y)return null;var ae=null;null!==Y&&(ae=e.camera.projectWorldPos(Y));var se=q&&q.delegatePickedEntity?q.delegatePickedEntity():q;return u.reset(),u.snappedToEdge="edge"===J,u.snappedToVertex="vertex"===J,u.worldPos=Y,u.worldNormal=X,u.entity=se,u.canvasPos=t,u.snappedCanvasPos=ae||t,u}),this.addMarker=function(t){this._occlusionTester=this._occlusionTester||new Bt(e,y),this._occlusionTester.addMarker(t),e.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){for(var e in E(),this._occlusionTester.bindRenderBuf(),n.reset(),n.backfaces=!0,n.frontface=!0,i.viewport(0,0,i.drawingBufferWidth,i.drawingBufferHeight),i.clearColor(0,0,0,0),i.enable(i.DEPTH_TEST),i.disable(i.CULL_FACE),i.disable(i.BLEND),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),l)if(l.hasOwnProperty(e))for(var t=l[e].drawableList,r=0,a=t.length;r0&&void 0!==arguments[0]?arguments[0]:{},t=y.getRenderBuffer("snapshot");e.width&&e.height&&t.setSize([e.width,e.height]),t.bind(),t.clear(),m=!0},this.renderSnapshot=function(){m&&(y.getRenderBuffer("snapshot").clear(),this.render({force:!0,opaqueOnly:!1}),p=!0)},this.readSnapshot=function(e){return y.getRenderBuffer("snapshot").readImage(e)},this.readSnapshotAsCanvas=function(){return y.getRenderBuffer("snapshot").readImageAsCanvas()},this.endSnapshot=function(){m&&(y.getRenderBuffer("snapshot").unbind(),m=!1)},this.destroy=function(){l={},u={},y.destroy(),w.destroy(),g.destroy(),this._occlusionTester&&this._occlusionTester.destroy()}},Qt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).KEY_BACKSPACE=8,r.KEY_TAB=9,r.KEY_ENTER=13,r.KEY_SHIFT=16,r.KEY_CTRL=17,r.KEY_ALT=18,r.KEY_PAUSE_BREAK=19,r.KEY_CAPS_LOCK=20,r.KEY_ESCAPE=27,r.KEY_PAGE_UP=33,r.KEY_PAGE_DOWN=34,r.KEY_END=35,r.KEY_HOME=36,r.KEY_LEFT_ARROW=37,r.KEY_UP_ARROW=38,r.KEY_RIGHT_ARROW=39,r.KEY_DOWN_ARROW=40,r.KEY_INSERT=45,r.KEY_DELETE=46,r.KEY_NUM_0=48,r.KEY_NUM_1=49,r.KEY_NUM_2=50,r.KEY_NUM_3=51,r.KEY_NUM_4=52,r.KEY_NUM_5=53,r.KEY_NUM_6=54,r.KEY_NUM_7=55,r.KEY_NUM_8=56,r.KEY_NUM_9=57,r.KEY_A=65,r.KEY_B=66,r.KEY_C=67,r.KEY_D=68,r.KEY_E=69,r.KEY_F=70,r.KEY_G=71,r.KEY_H=72,r.KEY_I=73,r.KEY_J=74,r.KEY_K=75,r.KEY_L=76,r.KEY_M=77,r.KEY_N=78,r.KEY_O=79,r.KEY_P=80,r.KEY_Q=81,r.KEY_R=82,r.KEY_S=83,r.KEY_T=84,r.KEY_U=85,r.KEY_V=86,r.KEY_W=87,r.KEY_X=88,r.KEY_Y=89,r.KEY_Z=90,r.KEY_LEFT_WINDOW=91,r.KEY_RIGHT_WINDOW=92,r.KEY_SELECT_KEY=93,r.KEY_NUMPAD_0=96,r.KEY_NUMPAD_1=97,r.KEY_NUMPAD_2=98,r.KEY_NUMPAD_3=99,r.KEY_NUMPAD_4=100,r.KEY_NUMPAD_5=101,r.KEY_NUMPAD_6=102,r.KEY_NUMPAD_7=103,r.KEY_NUMPAD_8=104,r.KEY_NUMPAD_9=105,r.KEY_MULTIPLY=106,r.KEY_ADD=107,r.KEY_SUBTRACT=109,r.KEY_DECIMAL_POINT=110,r.KEY_DIVIDE=111,r.KEY_F1=112,r.KEY_F2=113,r.KEY_F3=114,r.KEY_F4=115,r.KEY_F5=116,r.KEY_F6=117,r.KEY_F7=118,r.KEY_F8=119,r.KEY_F9=120,r.KEY_F10=121,r.KEY_F11=122,r.KEY_F12=123,r.KEY_NUM_LOCK=144,r.KEY_SCROLL_LOCK=145,r.KEY_SEMI_COLON=186,r.KEY_EQUAL_SIGN=187,r.KEY_COMMA=188,r.KEY_DASH=189,r.KEY_PERIOD=190,r.KEY_FORWARD_SLASH=191,r.KEY_GRAVE_ACCENT=192,r.KEY_OPEN_BRACKET=219,r.KEY_BACK_SLASH=220,r.KEY_CLOSE_BRACKET=221,r.KEY_SINGLE_QUOTE=222,r.KEY_SPACE=32,r.element=i.element,r.altDown=!1,r.ctrlDown=!1,r.mouseDownLeft=!1,r.mouseDownMiddle=!1,r.mouseDownRight=!1,r.keyDown=[],r.enabled=!0,r.keyboardEnabled=!0,r.mouseover=!1,r.mouseCanvasPos=$.vec2(),r._keyboardEventsElement=i.keyboardEventsElement||document,r._bindEvents(),r}return P(n,[{key:"_bindEvents",value:function(){var e=this;if(!this._eventsBound){this._keyboardEventsElement.addEventListener("keydown",this._keyDownListener=function(t){e.enabled&&e.keyboardEnabled&&"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&(t.keyCode===e.KEY_CTRL?e.ctrlDown=!0:t.keyCode===e.KEY_ALT?e.altDown=!0:t.keyCode===e.KEY_SHIFT&&(e.shiftDown=!0),e.keyDown[t.keyCode]=!0,e.fire("keydown",t.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=function(t){e.enabled&&e.keyboardEnabled&&"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&(t.keyCode===e.KEY_CTRL?e.ctrlDown=!1:t.keyCode===e.KEY_ALT?e.altDown=!1:t.keyCode===e.KEY_SHIFT&&(e.shiftDown=!1),e.keyDown[t.keyCode]=!1,e.fire("keyup",t.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=function(t){e.enabled&&(e.mouseover=!0,e._getMouseCanvasPos(t),e.fire("mouseenter",e.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=function(t){e.enabled&&(e.mouseover=!1,e._getMouseCanvasPos(t),e.fire("mouseleave",e.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=function(t){if(e.enabled){switch(t.which){case 1:e.mouseDownLeft=!0;break;case 2:e.mouseDownMiddle=!0;break;case 3:e.mouseDownRight=!0}e._getMouseCanvasPos(t),e.element.focus(),e.fire("mousedown",e.mouseCanvasPos,!0),e.mouseover&&t.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=function(t){if(e.enabled){switch(t.which){case 1:e.mouseDownLeft=!1;break;case 2:e.mouseDownMiddle=!1;break;case 3:e.mouseDownRight=!1}e.fire("mouseup",e.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=function(t){if(e.enabled){switch(t.which){case 1:case 3:e.mouseDownLeft=!1,e.mouseDownRight=!1;break;case 2:e.mouseDownMiddle=!1}e._getMouseCanvasPos(t),e.fire("click",e.mouseCanvasPos,!0),e.mouseover&&t.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=function(t){if(e.enabled){switch(t.which){case 1:case 3:e.mouseDownLeft=!1,e.mouseDownRight=!1;break;case 2:e.mouseDownMiddle=!1}e._getMouseCanvasPos(t),e.fire("dblclick",e.mouseCanvasPos,!0),e.mouseover&&t.preventDefault()}});var t=this.scene.tickify((function(){return e.fire("mousemove",e.mouseCanvasPos,!0)}));this.element.addEventListener("mousemove",this._mouseMoveListener=function(n){e.enabled&&(e._getMouseCanvasPos(n),t(),e.mouseover&&n.preventDefault())});var n=this.scene.tickify((function(t){e.fire("mousewheel",t,!0)}));this.element.addEventListener("wheel",this._mouseWheelListener=function(t,r){if(e.enabled){var i=Math.max(-1,Math.min(1,40*-t.deltaY));n(i)}},{passive:!0});var r,i;this.on("mousedown",(function(e){r=e[0],i=e[1]})),this.on("mouseup",(function(t){r>=t[0]-2&&r<=t[0]+2&&i>=t[1]-2&&i<=t[1]+2&&e.fire("mouseclicked",t,!0)})),this._eventsBound=!0}}},{key:"_unbindEvents",value:function(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}},{key:"_getMouseCanvasPos",value:function(e){if(e){for(var t=e.target,n=0,r=0;t.offsetParent;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-n,this.mouseCanvasPos[1]=e.pageY-r}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}},{key:"setEnabled",value:function(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}},{key:"getEnabled",value:function(){return this.enabled}},{key:"setKeyboardEnabled",value:function(e){this.keyboardEnabled=e}},{key:"getKeyboardEnabled",value:function(){return this.keyboardEnabled}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._unbindEvents()}}]),n}(),Wt=new G({}),zt=function(){function e(t){for(var n in b(this,e),this.id=Wt.addItem({}),t)t.hasOwnProperty(n)&&(this[n]=t[n])}return P(e,[{key:"destroy",value:function(){Wt.removeItem(this.id)}}]),e}(),Kt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({boundary:[0,0,100,100]}),r.boundary=i.boundary,r.autoBoundary=i.autoBoundary,r}return P(n,[{key:"type",get:function(){return"Viewport"}},{key:"boundary",get:function(){return this._state.boundary},set:function(e){if(!this._autoBoundary){if(!e){var t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}},{key:"autoBoundary",get:function(){return this._autoBoundary},set:function(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){var t=e[2],n=e[3];this._state.boundary=[0,0,t,n],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Yt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4(),near:.1,far:2e3}),r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!0,r._fov=60,r._canvasResized=r.scene.canvas.on("boundary",r._needUpdate,w(r)),r.fov=i.fov,r.fovAxis=i.fovAxis,r.near=i.near,r.far=i.far,r}return P(n,[{key:"type",get:function(){return"Perspective"}},{key:"_update",value:function(){var e=this.scene.canvas.boundary,t=e[2]/e[3],n=this._fovAxis,r=this._fov;("x"===n||"min"===n&&t<1||"max"===n&&t>1)&&(r/=t),r=Math.min(r,120),$.perspectiveMat4(r*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}},{key:"fov",get:function(){return this._fov},set:function(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}},{key:"fovAxis",get:function(){return this._fovAxis},set:function(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}},{key:"near",get:function(){return this._state.near},set:function(e){var t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}},{key:"far",get:function(){return this._state.far},set:function(e){var t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}]),n}(),Xt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4(),near:.1,far:2e3}),r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!0,r.scale=i.scale,r.near=i.near,r.far=i.far,r._onCanvasBoundary=r.scene.canvas.on("boundary",r._needUpdate,w(r)),r}return P(n,[{key:"type",get:function(){return"Ortho"}},{key:"_update",value:function(){var e,t,n,r,i=this.scene,a=.5*this._scale,s=i.canvas.boundary,o=s[2],l=s[3],u=o/l;o>l?(e=-a,t=a,n=a/u,r=-a/u):(e=-a*u,t=a*u,n=a,r=-a),$.orthoMat4c(e,t,r,n,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}},{key:"scale",get:function(){return this._scale},set:function(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}},{key:"near",get:function(){return this._state.near},set:function(e){var t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}},{key:"far",get:function(){return this._state.far},set:function(e){var t=null!=e?e:2e3;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}]),n}(),qt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4(),near:.1,far:1e4}),r._left=-1,r._right=1,r._bottom=-1,r._top=1,r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!0,r.left=i.left,r.right=i.right,r.bottom=i.bottom,r.top=i.top,r.near=i.near,r.far=i.far,r}return P(n,[{key:"type",get:function(){return"Frustum"}},{key:"_update",value:function(){$.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}},{key:"left",get:function(){return this._left},set:function(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}},{key:"right",get:function(){return this._right},set:function(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}},{key:"top",get:function(){return this._top},set:function(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}},{key:"bottom",get:function(){return this._bottom},set:function(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}},{key:"near",get:function(){return this._state.near},set:function(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}},{key:"far",get:function(){return this._state.far},set:function(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),Jt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4()}),r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!1,r.matrix=i.matrix,r}return P(n,[{key:"type",get:function(){return"CustomProjection"}},{key:"matrix",get:function(){return this._state.matrix},set:function(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Zt=$.vec3(),$t=$.vec3(),en=$.vec3(),tn=$.vec3(),nn=$.vec3(),rn=$.vec3(),an=$.vec4(),sn=$.vec4(),on=$.vec4(),ln=$.mat4(),un=$.mat4(),cn=$.vec3(),fn=$.vec3(),pn=$.vec3(),An=$.vec3(),dn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({deviceMatrix:$.mat4(),hasDeviceMatrix:!1,matrix:$.mat4(),normalMatrix:$.mat4(),inverseMatrix:$.mat4()}),r._perspective=new Yt(w(r)),r._ortho=new Xt(w(r)),r._frustum=new qt(w(r)),r._customProjection=new Jt(w(r)),r._project=r._perspective,r._eye=$.vec3([0,0,10]),r._look=$.vec3([0,0,0]),r._up=$.vec3([0,1,0]),r._worldUp=$.vec3([0,1,0]),r._worldRight=$.vec3([1,0,0]),r._worldForward=$.vec3([0,0,-1]),r.deviceMatrix=i.deviceMatrix,r.eye=i.eye,r.look=i.look,r.up=i.up,r.worldAxis=i.worldAxis,r.gimbalLock=i.gimbalLock,r.constrainPitch=i.constrainPitch,r.projection=i.projection,r._perspective.on("matrix",(function(){"perspective"===r._projectionType&&r.fire("projMatrix",r._perspective.matrix)})),r._ortho.on("matrix",(function(){"ortho"===r._projectionType&&r.fire("projMatrix",r._ortho.matrix)})),r._frustum.on("matrix",(function(){"frustum"===r._projectionType&&r.fire("projMatrix",r._frustum.matrix)})),r._customProjection.on("matrix",(function(){"customProjection"===r._projectionType&&r.fire("projMatrix",r._customProjection.matrix)})),r}return P(n,[{key:"type",get:function(){return"Camera"}},{key:"_update",value:function(){var e,t=this._state;"ortho"===this.projection?($.subVec3(this._eye,this._look,cn),$.normalizeVec3(cn,fn),$.mulVec3Scalar(fn,1e3,pn),$.addVec3(this._look,pn,An),e=An):e=this._eye,t.hasDeviceMatrix?($.lookAtMat4v(e,this._look,this._up,un),$.mulMat4(t.deviceMatrix,un,t.matrix)):$.lookAtMat4v(e,this._look,this._up,t.matrix),$.inverseMat4(this._state.matrix,this._state.inverseMatrix),$.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}},{key:"orbitYaw",value:function(e){var t=$.subVec3(this._eye,this._look,Zt);$.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,ln),t=$.transformPoint3(ln,t,$t),this.eye=$.addVec3(this._look,t,en),this.up=$.transformPoint3(ln,this._up,tn)}},{key:"orbitPitch",value:function(e){if(!(this._constrainPitch&&(e=$.dotVec3(this._up,this._worldUp)/$.DEGTORAD)<1)){var t=$.subVec3(this._eye,this._look,Zt),n=$.cross3Vec3($.normalizeVec3(t,$t),$.normalizeVec3(this._up,en));$.rotationMat4v(.0174532925*e,n,ln),t=$.transformPoint3(ln,t,tn),this.up=$.transformPoint3(ln,this._up,nn),this.eye=$.addVec3(t,this._look,rn)}}},{key:"yaw",value:function(e){var t=$.subVec3(this._look,this._eye,Zt);$.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,ln),t=$.transformPoint3(ln,t,$t),this.look=$.addVec3(t,this._eye,en),this._gimbalLock&&(this.up=$.transformPoint3(ln,this._up,tn))}},{key:"pitch",value:function(e){if(!(this._constrainPitch&&(e=$.dotVec3(this._up,this._worldUp)/$.DEGTORAD)<1)){var t=$.subVec3(this._look,this._eye,Zt),n=$.cross3Vec3($.normalizeVec3(t,$t),$.normalizeVec3(this._up,en));$.rotationMat4v(.0174532925*e,n,ln),this.up=$.transformPoint3(ln,this._up,rn),t=$.transformPoint3(ln,t,tn),this.look=$.addVec3(t,this._eye,nn)}}},{key:"pan",value:function(e){var t,n=$.subVec3(this._eye,this._look,Zt),r=[0,0,0];if(0!==e[0]){var i=$.cross3Vec3($.normalizeVec3(n,[]),$.normalizeVec3(this._up,$t));t=$.mulVec3Scalar(i,e[0]),r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]}0!==e[1]&&(t=$.mulVec3Scalar($.normalizeVec3(this._up,en),e[1]),r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]),0!==e[2]&&(t=$.mulVec3Scalar($.normalizeVec3(n,tn),e[2]),r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]),this.eye=$.addVec3(this._eye,r,nn),this.look=$.addVec3(this._look,r,rn)}},{key:"zoom",value:function(e){var t=$.subVec3(this._eye,this._look,Zt),n=Math.abs($.lenVec3(t,$t)),r=Math.abs(n+e);if(!(r<.5)){var i=$.normalizeVec3(t,en);this.eye=$.addVec3(this._look,$.mulVec3Scalar(i,r),tn)}}},{key:"eye",get:function(){return this._eye},set:function(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}},{key:"look",get:function(){return this._look},set:function(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}},{key:"up",get:function(){return this._up},set:function(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}},{key:"deviceMatrix",get:function(){return this._state.deviceMatrix},set:function(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}},{key:"worldAxis",get:function(){return this._worldAxis},set:function(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=$.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}},{key:"worldUp",get:function(){return this._worldUp}},{key:"xUp",get:function(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}},{key:"yUp",get:function(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}},{key:"zUp",get:function(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}},{key:"worldRight",get:function(){return this._worldRight}},{key:"worldForward",get:function(){return this._worldForward}},{key:"gimbalLock",get:function(){return this._gimbalLock},set:function(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}},{key:"constrainPitch",set:function(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}},{key:"eyeLookDist",get:function(){return $.lenVec3($.subVec3(this._look,this._eye,Zt))}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"viewMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"normalMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}},{key:"viewNormalMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}},{key:"inverseViewMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}},{key:"projMatrix",get:function(){return this[this.projection].matrix}},{key:"perspective",get:function(){return this._perspective}},{key:"ortho",get:function(){return this._ortho}},{key:"frustum",get:function(){return this._frustum}},{key:"customProjection",get:function(){return this._customProjection}},{key:"projection",get:function(){return this._projectionType},set:function(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}},{key:"project",get:function(){return this._project}},{key:"projectWorldPos",value:function(e){var t=an,n=sn,r=on;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,$.mulMat4v4(this.viewMatrix,t,n),$.mulMat4v4(this.projMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1;var i=this.scene.canvas.canvas,a=i.offsetWidth/2,s=i.offsetHeight/2;return[r[0]*a+a,r[1]*s+s]}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),vn=function(e){h(n,me);var t=y(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),t.call(this,e,r)}return P(n,[{key:"type",get:function(){return"Light"}},{key:"isLight",get:function(){return!0}}]),n}(),hn=function(e){h(n,vn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._shadowRenderBuf=null,r._shadowViewMatrix=null,r._shadowProjMatrix=null,r._shadowViewMatrixDirty=!0,r._shadowProjMatrixDirty=!0;var a=r.scene.camera,s=r.scene.canvas;return r._onCameraViewMatrix=a.on("viewMatrix",(function(){r._shadowViewMatrixDirty=!0})),r._onCameraProjMatrix=a.on("projMatrix",(function(){r._shadowProjMatrixDirty=!0})),r._onCanvasBoundary=s.on("boundary",(function(){r._shadowProjMatrixDirty=!0})),r._state=new zt({type:"dir",dir:$.vec3([1,1,1]),color:$.vec3([.7,.7,.8]),intensity:1,space:i.space||"view",castsShadow:!1,getShadowViewMatrix:function(){if(r._shadowViewMatrixDirty){r._shadowViewMatrix||(r._shadowViewMatrix=$.identityMat4());var e=r.scene.camera,t=r._state.dir,n=e.look,i=[n[0]-t[0],n[1]-t[1],n[2]-t[2]];$.lookAtMat4v(i,n,[0,1,0],r._shadowViewMatrix),r._shadowViewMatrixDirty=!1}return r._shadowViewMatrix},getShadowProjMatrix:function(){return r._shadowProjMatrixDirty&&(r._shadowProjMatrix||(r._shadowProjMatrix=$.identityMat4()),$.orthoMat4c(-40,40,-40,40,-40,80,r._shadowProjMatrix),r._shadowProjMatrixDirty=!1),r._shadowProjMatrix},getShadowRenderBuf:function(){return r._shadowRenderBuf||(r._shadowRenderBuf=new Gt(r.scene.canvas.canvas,r.scene.canvas.gl,{size:[1024,1024]})),r._shadowRenderBuf}}),r.dir=i.dir,r.color=i.color,r.intensity=i.intensity,r.castsShadow=i.castsShadow,r.scene._lightCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"DirLight"}},{key:"dir",get:function(){return this._state.dir},set:function(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}},{key:"color",get:function(){return this._state.color},set:function(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}},{key:"intensity",get:function(){return this._state.intensity},set:function(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}},{key:"castsShadow",get:function(){return this._state.castsShadow},set:function(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}},{key:"destroy",value:function(){var e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}]),n}(),In=function(e){h(n,vn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state={type:"ambient",color:$.vec3([.7,.7,.7]),intensity:1},r.color=i.color,r.intensity=i.intensity,r.scene._lightCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"AmbientLight"}},{key:"color",get:function(){return this._state.color},set:function(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}},{key:"intensity",get:function(){return this._state.intensity},set:function(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._lightDestroyed(this)}}]),n}(),yn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),r=t.call(this,e,i),re.memory.meshes++,r}return P(n,[{key:"type",get:function(){return"Geometry"}},{key:"isGeometry",get:function(){return!0}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),re.memory.meshes--}}]),n}(),mn=function(){var e=[],t=[],n=[],r=[],i=[],a=0,s=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),u=$.vec3(),c=$.vec3(),f=$.vec3(),p=$.vec3(),A=$.vec3(),d=$.vec3(),v=$.vec3();return function(h,I,y,m){!function(i,a){var s,o,l,u,c,f,p={},A=Math.pow(10,4),d=0;for(c=0,f=i.length;cO)||(_=n[D.index1],R=n[D.index2],(!N&&_>65535||R>65535)&&(N=!0),B.push(_),B.push(R));return N?new Uint32Array(B):new Uint16Array(B)}}();var wn=function(){var e=$.mat4(),t=$.mat4();return function(n,r){r=r||$.mat4();var i=n[0],a=n[1],s=n[2],o=n[3]-i,l=n[4]-a,u=n[5]-s,c=65535;return $.identityMat4(e),$.translationMat4v(n,e),$.identityMat4(t),$.scalingMat4v([o/c,l/c,u/c],t),$.mulMat4(e,t,r),r}}(),gn=function(){var e=$.mat4(),t=$.mat4();return function(n,r,i){var a,s=new Uint16Array(n.length),o=new Float32Array([i[0]!==r[0]?65535/(i[0]-r[0]):0,i[1]!==r[1]?65535/(i[1]-r[1]):0,i[2]!==r[2]?65535/(i[2]-r[2]):0]);for(a=0;a=0?1:-1),o=(1-Math.abs(i))*(a>=0?1:-1);i=s,a=o}return new Int8Array([Math[n](127.5*i+(i<0?-1:0)),Math[r](127.5*a+(a<0?-1:0))])}function bn(e){var t=e[0],n=e[1];t/=t<0?127:128,n/=n<0?127:128;var r=1-Math.abs(t)-Math.abs(n);r<0&&(t=(1-Math.abs(n))*(t>=0?1:-1),n=(1-Math.abs(t))*(n>=0?1:-1));var i=Math.sqrt(t*t+n*n+r*r);return[t/i,n/i,r/i]}function Dn(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]}var Pn={getPositionsBounds:function(e){var t,n,r=new Float32Array(3),i=new Float32Array(3);for(t=0;t<3;t++)r[t]=Number.MAX_VALUE,i[t]=-Number.MAX_VALUE;for(t=0;t2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;r2&&void 0!==arguments[2]?arguments[2]:e;return n[0]=e[0]*t[0]+t[12],n[1]=e[1]*t[5]+t[13],n[2]=e[2]*t[10]+t[14],n[3]=e[3]*t[0]+t[12],n[4]=e[4]*t[5]+t[13],n[5]=e[5]*t[10]+t[14],n},getUVBounds:function(e){var t,n,r=new Float32Array(2),i=new Float32Array(2);for(t=0;t<2;t++)r[t]=Number.MAX_VALUE,i[t]=-Number.MAX_VALUE;for(t=0;t2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;ri&&(n=t,i=r),(r=Dn(e,s,bn(t=Tn(e,s,"floor","ceil"))))>i&&(n=t,i=r),(r=Dn(e,s,bn(t=Tn(e,s,"ceil","ceil"))))>i&&(n=t,i=r),a[s]=n[0],a[s+1]=n[1];return a},decompressNormals:function(e,t){for(var n=0,r=0,i=e.length;n=0?1:-1),s=(1-Math.abs(a))*(s>=0?1:-1));var l=Math.sqrt(a*a+s*s+o*o);t[r+0]=a/l,t[r+1]=s/l,t[r+2]=o/l,r+=3}return t},decompressNormal:function(e,t){var n=e[0],r=e[1];n=(2*n+1)/255,r=(2*r+1)/255;var i=1-Math.abs(n)-Math.abs(r);i<0&&(n=(1-Math.abs(r))*(n>=0?1:-1),r=(1-Math.abs(n))*(r>=0?1:-1));var a=Math.sqrt(n*n+r*r+i*i);return t[0]=n/a,t[1]=r/a,t[2]=i/a,t}},Cn=re.memory,_n=$.AABB3(),Rn=function(e){h(n,yn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._state=new zt({compressGeometry:!!i.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),r._numTriangles=0,r._edgeThreshold=i.edgeThreshold||10,r._edgeIndicesBuf=null,r._pickTrianglePositionsBuf=null,r._pickTriangleColorsBuf=null,r._aabbDirty=!0,r._boundingSphere=!0,r._aabb=null,r._aabbDirty=!0,r._obb=null,r._obbDirty=!0;var a=r._state,s=r.scene.canvas.gl;switch(i.primitive=i.primitive||"triangles",i.primitive){case"points":a.primitive=s.POINTS,a.primitiveName=i.primitive;break;case"lines":a.primitive=s.LINES,a.primitiveName=i.primitive;break;case"line-loop":a.primitive=s.LINE_LOOP,a.primitiveName=i.primitive;break;case"line-strip":a.primitive=s.LINE_STRIP,a.primitiveName=i.primitive;break;case"triangles":a.primitive=s.TRIANGLES,a.primitiveName=i.primitive;break;case"triangle-strip":a.primitive=s.TRIANGLE_STRIP,a.primitiveName=i.primitive;break;case"triangle-fan":a.primitive=s.TRIANGLE_FAN,a.primitiveName=i.primitive;break;default:r.error("Unsupported value for 'primitive': '"+i.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),a.primitive=s.TRIANGLES,a.primitiveName=i.primitive}if(i.positions)if(r._state.compressGeometry){var o=Pn.getPositionsBounds(i.positions),l=Pn.compressPositions(i.positions,o.min,o.max);a.positions=l.quantized,a.positionsDecodeMatrix=l.decodeMatrix}else a.positions=i.positions.constructor===Float32Array?i.positions:new Float32Array(i.positions);if(i.colors&&(a.colors=i.colors.constructor===Float32Array?i.colors:new Float32Array(i.colors)),i.uv)if(r._state.compressGeometry){var u=Pn.getUVBounds(i.uv),c=Pn.compressUVs(i.uv,u.min,u.max);a.uv=c.quantized,a.uvDecodeMatrix=c.decodeMatrix}else a.uv=i.uv.constructor===Float32Array?i.uv:new Float32Array(i.uv);return i.normals&&(r._state.compressGeometry?a.normals=Pn.compressNormals(i.normals):a.normals=i.normals.constructor===Float32Array?i.normals:new Float32Array(i.normals)),i.indices&&(a.indices=i.indices.constructor===Uint32Array||i.indices.constructor===Uint16Array?i.indices:new Uint32Array(i.indices),"triangles"===r._state.primitiveName&&(r._numTriangles=i.indices.length/3)),r._buildHash(),Cn.meshes++,r._buildVBOs(),r}return P(n,[{key:"type",get:function(){return"ReadableGeometry"}},{key:"isReadableGeometry",get:function(){return!0}},{key:"_buildVBOs",value:function(){var e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),Cn.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),Cn.positions+=e.positionsBuf.numItems),e.normals){var n=e.compressGeometry;e.normalsBuf=new Pt(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,n),Cn.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),Cn.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new Pt(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),Cn.uvs+=e.uvBuf.numItems)}},{key:"_buildHash",value:function(){var e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}},{key:"_getEdgeIndices",value:function(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}},{key:"_getPickTrianglePositions",value:function(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}},{key:"_getPickTriangleColors",value:function(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}},{key:"_buildEdgeIndices",value:function(){var e=this._state;if(e.positions&&e.indices){var t=this.scene.canvas.gl,n=mn(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,n,n.length,1,t.STATIC_DRAW),Cn.indices+=this._edgeIndicesBuf.numItems}}},{key:"_buildPickTriangleVBOs",value:function(){var e=this._state;if(e.positions&&e.indices){var t=this.scene.canvas.gl,n=$.buildPickTriangles(e.positions,e.indices,e.compressGeometry),r=n.positions,i=n.colors;this._pickTrianglePositionsBuf=new Pt(t,t.ARRAY_BUFFER,r,r.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new Pt(t,t.ARRAY_BUFFER,i,i.length,4,t.STATIC_DRAW,!0),Cn.positions+=this._pickTrianglePositionsBuf.numItems,Cn.colors+=this._pickTriangleColorsBuf.numItems}}},{key:"_buildPickVertexVBOs",value:function(){}},{key:"_webglContextLost",value:function(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}},{key:"_webglContextRestored",value:function(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}},{key:"primitive",get:function(){return this._state.primitiveName}},{key:"compressGeometry",get:function(){return this._state.compressGeometry}},{key:"positions",get:function(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),Pn.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null},set:function(e){var t=this._state,n=t.positions;if(n)if(n.length===e.length){if(this._state.compressGeometry){var r=Pn.getPositionsBounds(e),i=Pn.compressPositions(e,r.min,r.max);e=i.quantized,t.positionsDecodeMatrix=i.decodeMatrix}n.set(e),t.positionsBuf&&t.positionsBuf.setData(n),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}},{key:"normals",get:function(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){var e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),Pn.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}},set:function(e){if(this._state.compressGeometry)this.error("can't update geometry normals - quantized geometry is immutable");else{var t=this._state,n=t.normals;n?n.length===e.length?(n.set(e),t.normalsBuf&&t.normalsBuf.setData(n),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}}},{key:"uv",get:function(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),Pn.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null},set:function(e){if(this._state.compressGeometry)this.error("can't update geometry UVs - quantized geometry is immutable");else{var t=this._state,n=t.uv;n?n.length===e.length?(n.set(e),t.uvBuf&&t.uvBuf.setData(n),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}}},{key:"colors",get:function(){return this._state.colors},set:function(e){if(this._state.compressGeometry)this.error("can't update geometry colors - quantized geometry is immutable");else{var t=this._state,n=t.colors;n?n.length===e.length?(n.set(e),t.colorsBuf&&t.colorsBuf.setData(n),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}}},{key:"indices",get:function(){return this._state.indices}},{key:"aabb",get:function(){return this._aabbDirty&&(this._aabb||(this._aabb=$.AABB3()),$.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}},{key:"obb",get:function(){return this._obbDirty&&(this._obb||(this._obb=$.OBB3()),$.positions3ToAABB3(this._state.positions,_n,this._state.positionsDecodeMatrix),$.AABB3ToOBB3(_n,this._obb),this._obbDirty=!1),this._obb}},{key:"numTriangles",get:function(){return this._numTriangles}},{key:"_setAABBDirty",value:function(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this);var e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),Cn.meshes--}}]),n}();function Bn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var n=e.ySize||1;n<0&&(console.error("negative ySize not allowed - will invert"),n*=-1);var r=e.zSize||1;r<0&&(console.error("negative zSize not allowed - will invert"),r*=-1);var i=e.center,a=i?i[0]:0,s=i?i[1]:0,o=i?i[2]:0,l=-t+a,u=-n+s,c=-r+o,f=t+a,p=n+s,A=r+o;return le.apply(e,{positions:[f,p,A,l,p,A,l,u,A,f,u,A,f,p,A,f,u,A,f,u,c,f,p,c,f,p,A,f,p,c,l,p,c,l,p,A,l,p,A,l,p,c,l,u,c,l,u,A,l,u,c,f,u,c,f,u,A,l,u,A,f,u,c,l,u,c,l,p,c,f,p,c],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}var On=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),r=t.call(this,e,i),re.memory.materials++,r}return P(n,[{key:"type",get:function(){return"Material"}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),re.memory.materials--}}]),n}(),Sn={opaque:0,mask:1,blend:2},Nn=["opaque","mask","blend"],Ln=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"PhongMaterial",ambient:$.vec3([1,1,1]),diffuse:$.vec3([1,1,1]),specular:$.vec3([1,1,1]),emissive:$.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),r.ambient=i.ambient,r.diffuse=i.diffuse,r.specular=i.specular,r.emissive=i.emissive,r.alpha=i.alpha,r.shininess=i.shininess,r.reflectivity=i.reflectivity,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,i.ambientMap&&(r._ambientMap=r._checkComponent("Texture",i.ambientMap)),i.diffuseMap&&(r._diffuseMap=r._checkComponent("Texture",i.diffuseMap)),i.specularMap&&(r._specularMap=r._checkComponent("Texture",i.specularMap)),i.emissiveMap&&(r._emissiveMap=r._checkComponent("Texture",i.emissiveMap)),i.alphaMap&&(r._alphaMap=r._checkComponent("Texture",i.alphaMap)),i.reflectivityMap&&(r._reflectivityMap=r._checkComponent("Texture",i.reflectivityMap)),i.normalMap&&(r._normalMap=r._checkComponent("Texture",i.normalMap)),i.occlusionMap&&(r._occlusionMap=r._checkComponent("Texture",i.occlusionMap)),i.diffuseFresnel&&(r._diffuseFresnel=r._checkComponent("Fresnel",i.diffuseFresnel)),i.specularFresnel&&(r._specularFresnel=r._checkComponent("Fresnel",i.specularFresnel)),i.emissiveFresnel&&(r._emissiveFresnel=r._checkComponent("Fresnel",i.emissiveFresnel)),i.alphaFresnel&&(r._alphaFresnel=r._checkComponent("Fresnel",i.alphaFresnel)),i.reflectivityFresnel&&(r._reflectivityFresnel=r._checkComponent("Fresnel",i.reflectivityFresnel)),r.alphaMode=i.alphaMode,r.alphaCutoff=i.alphaCutoff,r.backfaces=i.backfaces,r.frontface=i.frontface,r._makeHash(),r}return P(n,[{key:"type",get:function(){return"PhongMaterial"}},{key:"_makeHash",value:function(){var e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}},{key:"ambient",get:function(){return this._state.ambient},set:function(e){var t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"diffuse",get:function(){return this._state.diffuse},set:function(e){var t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"specular",get:function(){return this._state.specular},set:function(e){var t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}},{key:"shininess",get:function(){return this._state.shininess},set:function(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"reflectivity",get:function(){return this._state.reflectivity},set:function(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}},{key:"normalMap",get:function(){return this._normalMap}},{key:"ambientMap",get:function(){return this._ambientMap}},{key:"diffuseMap",get:function(){return this._diffuseMap}},{key:"specularMap",get:function(){return this._specularMap}},{key:"emissiveMap",get:function(){return this._emissiveMap}},{key:"alphaMap",get:function(){return this._alphaMap}},{key:"reflectivityMap",get:function(){return this._reflectivityMap}},{key:"occlusionMap",get:function(){return this._occlusionMap}},{key:"diffuseFresnel",get:function(){return this._diffuseFresnel}},{key:"specularFresnel",get:function(){return this._specularFresnel}},{key:"emissiveFresnel",get:function(){return this._emissiveFresnel}},{key:"alphaFresnel",get:function(){return this._alphaFresnel}},{key:"reflectivityFresnel",get:function(){return this._reflectivityFresnel}},{key:"alphaMode",get:function(){return Nn[this._state.alphaMode]},set:function(e){var t=Sn[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}},{key:"alphaCutoff",get:function(){return this._state.alphaCutoff},set:function(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),xn={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}},Mn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),r._preset="default",i.preset?(r.preset=i.preset,void 0!==i.fill&&(r.fill=i.fill),i.fillColor&&(r.fillColor=i.fillColor),void 0!==i.fillAlpha&&(r.fillAlpha=i.fillAlpha),void 0!==i.edges&&(r.edges=i.edges),i.edgeColor&&(r.edgeColor=i.edgeColor),void 0!==i.edgeAlpha&&(r.edgeAlpha=i.edgeAlpha),void 0!==i.edgeWidth&&(r.edgeWidth=i.edgeWidth),void 0!==i.backfaces&&(r.backfaces=i.backfaces),void 0!==i.glowThrough&&(r.glowThrough=i.glowThrough)):(r.fill=i.fill,r.fillColor=i.fillColor,r.fillAlpha=i.fillAlpha,r.edges=i.edges,r.edgeColor=i.edgeColor,r.edgeAlpha=i.edgeAlpha,r.edgeWidth=i.edgeWidth,r.backfaces=i.backfaces,r.glowThrough=i.glowThrough),r}return P(n,[{key:"type",get:function(){return"EmphasisMaterial"}},{key:"presets",get:function(){return xn}},{key:"fill",get:function(){return this._state.fill},set:function(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}},{key:"fillColor",get:function(){return this._state.fillColor},set:function(e){var t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}},{key:"fillAlpha",get:function(){return this._state.fillAlpha},set:function(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}},{key:"edges",get:function(){return this._state.edges},set:function(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}},{key:"edgeColor",get:function(){return this._state.edgeColor},set:function(e){var t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"edgeAlpha",get:function(){return this._state.edgeAlpha},set:function(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}},{key:"edgeWidth",get:function(){return this._state.edgeWidth},set:function(e){this._state.edgeWidth=e||1,this.glRedraw()}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"glowThrough",get:function(){return this._state.glowThrough},set:function(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=xn[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(xn).join(", "))}}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Fn={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}},Hn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),r._preset="default",i.preset?(r.preset=i.preset,i.edgeColor&&(r.edgeColor=i.edgeColor),void 0!==i.edgeAlpha&&(r.edgeAlpha=i.edgeAlpha),void 0!==i.edgeWidth&&(r.edgeWidth=i.edgeWidth)):(r.edgeColor=i.edgeColor,r.edgeAlpha=i.edgeAlpha,r.edgeWidth=i.edgeWidth),r.edges=!1!==i.edges,r}return P(n,[{key:"type",get:function(){return"EdgeMaterial"}},{key:"presets",get:function(){return Fn}},{key:"edges",get:function(){return this._state.edges},set:function(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}},{key:"edgeColor",get:function(){return this._state.edgeColor},set:function(e){var t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"edgeAlpha",get:function(){return this._state.edgeAlpha},set:function(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}},{key:"edgeWidth",get:function(){return this._state.edgeWidth},set:function(e){this._state.edgeWidth=e||1,this.glRedraw()}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=Fn[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Fn).join(", "))}}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Un={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}},Gn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._units="meters",r._scale=1,r._origin=$.vec3([0,0,0]),r.units=i.units,r.scale=i.scale,r.origin=i.origin,r}return P(n,[{key:"unitsInfo",get:function(){return Un}},{key:"units",get:function(){return this._units},set:function(e){e||(e="meters"),Un[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}},{key:"scale",get:function(){return this._scale},set:function(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}},{key:"origin",get:function(){return this._origin},set:function(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}},{key:"worldToRealPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3(3);t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}},{key:"realToWorldPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3(3);return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}]),n}(),kn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._supported=vt.SUPPORTED_EXTENSIONS.OES_standard_derivatives,r.enabled=i.enabled,r.kernelRadius=i.kernelRadius,r.intensity=i.intensity,r.bias=i.bias,r.scale=i.scale,r.minResolution=i.minResolution,r.numSamples=i.numSamples,r.blur=i.blur,r.blendCutoff=i.blendCutoff,r.blendFactor=i.blendFactor,r}return P(n,[{key:"supported",get:function(){return this._supported}},{key:"enabled",get:function(){return this._enabled},set:function(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}},{key:"possible",get:function(){if(!this._supported)return!1;if(!this._enabled)return!1;var e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}},{key:"active",get:function(){return this._active}},{key:"kernelRadius",get:function(){return this._kernelRadius},set:function(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}},{key:"intensity",get:function(){return this._intensity},set:function(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}},{key:"bias",get:function(){return this._bias},set:function(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}},{key:"scale",get:function(){return this._scale},set:function(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}},{key:"minResolution",get:function(){return this._minResolution},set:function(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}},{key:"numSamples",get:function(){return this._numSamples},set:function(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}},{key:"blur",get:function(){return this._blur},set:function(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}},{key:"blendCutoff",get:function(){return this._blendCutoff},set:function(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}},{key:"blendFactor",get:function(){return this._blendFactor},set:function(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this)}}]),n}(),jn={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}},Vn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),i.preset?(r.preset=i.preset,void 0!==i.pointSize&&(r.pointSize=i.pointSize),void 0!==i.roundPoints&&(r.roundPoints=i.roundPoints),void 0!==i.perspectivePoints&&(r.perspectivePoints=i.perspectivePoints),void 0!==i.minPerspectivePointSize&&(r.minPerspectivePointSize=i.minPerspectivePointSize),void 0!==i.maxPerspectivePointSize&&(r.maxPerspectivePointSize=i.minPerspectivePointSize)):(r._preset="default",r.pointSize=i.pointSize,r.roundPoints=i.roundPoints,r.perspectivePoints=i.perspectivePoints,r.minPerspectivePointSize=i.minPerspectivePointSize,r.maxPerspectivePointSize=i.maxPerspectivePointSize),r.filterIntensity=i.filterIntensity,r.minIntensity=i.minIntensity,r.maxIntensity=i.maxIntensity,r}return P(n,[{key:"type",get:function(){return"PointsMaterial"}},{key:"presets",get:function(){return jn}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||2,this.glRedraw()}},{key:"roundPoints",get:function(){return this._state.roundPoints},set:function(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}},{key:"perspectivePoints",get:function(){return this._state.perspectivePoints},set:function(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}},{key:"minPerspectivePointSize",get:function(){return this._state.minPerspectivePointSize},set:function(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}},{key:"maxPerspectivePointSize",get:function(){return this._state.maxPerspectivePointSize},set:function(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}},{key:"filterIntensity",get:function(){return this._state.filterIntensity},set:function(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}},{key:"minIntensity",get:function(){return this._state.minIntensity},set:function(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}},{key:"maxIntensity",get:function(){return this._state.maxIntensity},set:function(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=jn[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(jn).join(", "))}}},{key:"hash",get:function(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Qn={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}},Wn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"LinesMaterial",lineWidth:null}),i.preset?(r.preset=i.preset,void 0!==i.lineWidth&&(r.lineWidth=i.lineWidth)):(r._preset="default",r.lineWidth=i.lineWidth),r}return P(n,[{key:"type",get:function(){return"LinesMaterial"}},{key:"presets",get:function(){return Qn}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=Qn[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Qn).join(", "))}}},{key:"hash",get:function(){return[""+this.lineWidth].join(";")}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}();function zn(e,t){for(var n,r,i={},a=0,s=t.length;a1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),r=t.call(this,null,i);var a=i.canvasElement||document.getElementById(i.canvasId);if(!(a instanceof HTMLCanvasElement))throw"Mandatory config expected: valid canvasId or canvasElement";r._tickifiedFunctions={};var s=!!i.transparent,o=!!i.alphaDepthMask;return r._aabbDirty=!0,r.viewer=e,r.occlusionTestCountdown=0,r.loading=0,r.startTime=(new Date).getTime(),r.models={},r.objects={},r._numObjects=0,r.visibleObjects={},r._numVisibleObjects=0,r.xrayedObjects={},r._numXRayedObjects=0,r.highlightedObjects={},r._numHighlightedObjects=0,r.selectedObjects={},r._numSelectedObjects=0,r.colorizedObjects={},r._numColorizedObjects=0,r.opacityObjects={},r._numOpacityObjects=0,r.offsetObjects={},r._numOffsetObjects=0,r._modelIds=null,r._objectIds=null,r._visibleObjectIds=null,r._xrayedObjectIds=null,r._highlightedObjectIds=null,r._selectedObjectIds=null,r._colorizedObjectIds=null,r._opacityObjectIds=null,r._offsetObjectIds=null,r._collidables={},r._compilables={},r._needRecompile=!1,r.types={},r.components={},r.sectionPlanes={},r.lights={},r.lightMaps={},r.reflectionMaps={},r.bitmaps={},r.lineSets={},r.realWorldOffset=i.realWorldOffset||new Float64Array([0,0,0]),r.canvas=new At(w(r),{dontClear:!0,canvas:a,spinnerElementId:i.spinnerElementId,transparent:s,webgl2:!1!==i.webgl2,contextAttr:i.contextAttr||{},backgroundColor:i.backgroundColor,backgroundColorFromAmbientLight:i.backgroundColorFromAmbientLight,premultipliedAlpha:i.premultipliedAlpha}),r.canvas.on("boundary",(function(){r.glRedraw()})),r.canvas.on("webglContextFailed",(function(){alert("xeokit failed to find WebGL!")})),r._renderer=new Vt(w(r),{transparent:s,alphaDepthMask:o}),r._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1,this._numCachedSectionPlanes=0;var e=null;this.getHash=function(){if(e)return e;var t=this.getNumAllocatedSectionPlanes();if(this.sectionPlanes,0===t)return this.hash=";";for(var n=[],r=0,i=t;rthis._numCachedSectionPlanes?e:this._numCachedSectionPlanes}},r._sectionPlanesState.setNumCachedSectionPlanes(i.numCachedSectionPlanes||0),r._lightsState=new function(){var e=$.vec4([0,0,0,0]),t=$.vec4();this.lights=[],this.reflectionMaps=[],this.lightMaps=[];var n=null,r=null;this.getHash=function(){if(n)return n;for(var e,t=[],r=this.lights,i=0,a=r.length;i0&&t.push("/lm"),this.reflectionMaps.length>0&&t.push("/rm"),t.push(";"),n=t.join("")},this.addLight=function(e){this.lights.push(e),r=null,n=null},this.removeLight=function(e){for(var t=0,i=this.lights.length;t1&&void 0!==arguments[1])||arguments[1];e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}},{key:"_deRegisterVisibleObject",value:function(e){delete this.visibleObjects[e.id],this._numVisibleObjects--,this._visibleObjectIds=null}},{key:"_objectXRayedUpdated",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}},{key:"_deRegisterXRayedObject",value:function(e){delete this.xrayedObjects[e.id],this._numXRayedObjects--,this._xrayedObjectIds=null}},{key:"_objectHighlightedUpdated",value:function(e){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null}},{key:"_deRegisterHighlightedObject",value:function(e){delete this.highlightedObjects[e.id],this._numHighlightedObjects--,this._highlightedObjectIds=null}},{key:"_objectSelectedUpdated",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}},{key:"_deRegisterSelectedObject",value:function(e){delete this.selectedObjects[e.id],this._numSelectedObjects--,this._selectedObjectIds=null}},{key:"_objectColorizeUpdated",value:function(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}},{key:"_deRegisterColorizedObject",value:function(e){delete this.colorizedObjects[e.id],this._numColorizedObjects--,this._colorizedObjectIds=null}},{key:"_objectOpacityUpdated",value:function(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}},{key:"_deRegisterOpacityObject",value:function(e){delete this.opacityObjects[e.id],this._numOpacityObjects--,this._opacityObjectIds=null}},{key:"_objectOffsetUpdated",value:function(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}},{key:"_deRegisterOffsetObject",value:function(e){delete this.offsetObjects[e.id],this._numOffsetObjects--,this._offsetObjectIds=null}},{key:"_webglContextLost",value:function(){for(var e in this.canvas.spinner.processes++,this.components)if(this.components.hasOwnProperty(e)){var t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}},{key:"_webglContextRestored",value:function(){var e=this.canvas.gl;for(var t in this.components)if(this.components.hasOwnProperty(t)){var n=this.components[t];n._webglContextRestored&&n._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}},{key:"capabilities",get:function(){return this._renderer.capabilities}},{key:"entityOffsetsEnabled",get:function(){return this._entityOffsetsEnabled}},{key:"pickSurfacePrecisionEnabled",get:function(){return!1}},{key:"logarithmicDepthBufferEnabled",get:function(){return this._logarithmicDepthBufferEnabled}},{key:"numCachedSectionPlanes",get:function(){return this._sectionPlanesState.getNumCachedSectionPlanes()},set:function(e){e=e||0,this._sectionPlanesState.getNumCachedSectionPlanes()!==e&&(this._sectionPlanesState.setNumCachedSectionPlanes(e),this._needRecompile=!0,this.glRedraw())}},{key:"pbrEnabled",get:function(){return this._pbrEnabled},set:function(e){this._pbrEnabled=!!e,this.glRedraw()}},{key:"dtxEnabled",get:function(){return this._dtxEnabled},set:function(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}},{key:"colorTextureEnabled",get:function(){return this._colorTextureEnabled},set:function(e){this._colorTextureEnabled=!!e,this.glRedraw()}},{key:"doOcclusionTest",value:function(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}},{key:"render",value:function(e){e&&he.runTasks();var t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),e||this._renderer.needsRender()){t.sceneId=this.id;var n,r,i=this._passes,a=this._clearEachPass;for(n=0;na&&(a=e[3]),e[4]>s&&(s=e[4]),e[5]>o&&(o=e[5]),u=!0}u||(n=-100,r=-100,i=-100,a=100,s=100,o=100),this._aabb[0]=n,this._aabb[1]=r,this._aabb[2]=i,this._aabb[3]=a,this._aabb[4]=s,this._aabb[5]=o,this._aabbDirty=!1}return this._aabb}},{key:"_setAABBDirty",value:function(){this._aabbDirty=!0,this.fire("boundary")}},{key:"pick",value:function(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");var n=e.includeEntities||e.include;n&&(e.includeEntityIds=zn(this,n));var r=e.excludeEntities||e.exclude;return r&&(e.excludeEntityIds=zn(this,r)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=e.snapToEdge||e.snapToVertex?this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge,t):this._renderer.pick(e,t))&&t.entity&&t.entity.fire&&t.entity.fire("picked",t),t}},{key:"snapPick",value:function(e){return void 0===this._warnSnapPickDeprecated&&(this._warnSnapPickDeprecated=!0,this.warn("Scene.snapPick() is deprecated since v2.4.2 - use Scene.pick() instead")),this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}},{key:"clear",value:function(){var e;for(var t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}},{key:"clearLights",value:function(){for(var e=Object.keys(this.lights),t=0,n=e.length;ts&&(s=t[3]),t[4]>o&&(o=t[4]),t[5]>l&&(l=t[5]),n=!0}})),n){var u=$.AABB3();return u[0]=r,u[1]=i,u[2]=a,u[3]=s,u[4]=o,u[5]=l,u}return this.aabb}},{key:"setObjectsVisible",value:function(e,t){return this.withObjects(e,(function(e){var n=e.visible!==t;return e.visible=t,n}))}},{key:"setObjectsCollidable",value:function(e,t){return this.withObjects(e,(function(e){var n=e.collidable!==t;return e.collidable=t,n}))}},{key:"setObjectsCulled",value:function(e,t){return this.withObjects(e,(function(e){var n=e.culled!==t;return e.culled=t,n}))}},{key:"setObjectsSelected",value:function(e,t){return this.withObjects(e,(function(e){var n=e.selected!==t;return e.selected=t,n}))}},{key:"setObjectsHighlighted",value:function(e,t){return this.withObjects(e,(function(e){var n=e.highlighted!==t;return e.highlighted=t,n}))}},{key:"setObjectsXRayed",value:function(e,t){return this.withObjects(e,(function(e){var n=e.xrayed!==t;return e.xrayed=t,n}))}},{key:"setObjectsEdges",value:function(e,t){return this.withObjects(e,(function(e){var n=e.edges!==t;return e.edges=t,n}))}},{key:"setObjectsColorized",value:function(e,t){return this.withObjects(e,(function(e){e.colorize=t}))}},{key:"setObjectsOpacity",value:function(e,t){return this.withObjects(e,(function(e){var n=e.opacity!==t;return e.opacity=t,n}))}},{key:"setObjectsPickable",value:function(e,t){return this.withObjects(e,(function(e){var n=e.pickable!==t;return e.pickable=t,n}))}},{key:"setObjectsOffset",value:function(e,t){this.withObjects(e,(function(e){e.offset=t}))}},{key:"withObjects",value:function(e,t){le.isString(e)&&(e=[e]);for(var n=!1,r=0,i=e.length;rr&&(r=i,e.apply(void 0,u(n)))}));return this._tickifiedFunctions[t]={tickSubId:s,wrapperFunc:a},a}},{key:"destroy",value:function(){for(var e in d(g(n.prototype),"destroy",this).call(this),this.components)this.components.hasOwnProperty(e)&&this.components[e].destroy();this.canvas.gl=null,this.components=null,this.models=null,this.objects=null,this.visibleObjects=null,this.xrayedObjects=null,this.highlightedObjects=null,this.selectedObjects=null,this.colorizedObjects=null,this.opacityObjects=null,this.sectionPlanes=null,this.lights=null,this.lightMaps=null,this.reflectionMaps=null,this._objectIds=null,this._visibleObjectIds=null,this._xrayedObjectIds=null,this._highlightedObjectIds=null,this._selectedObjectIds=null,this._colorizedObjectIds=null,this.types=null,this.components=null,this.canvas=null,this._renderer=null,this.input=null,this._viewport=null,this._camera=null}}]),n}(),Yn=1e3,Xn=1001,qn=1002,Jn=1003,Zn=1004,$n=1004,er=1005,tr=1005,nr=1006,rr=1007,ir=1007,ar=1008,sr=1008,or=1009,lr=1010,ur=1011,cr=1012,fr=1013,pr=1014,Ar=1015,dr=1016,vr=1017,hr=1018,Ir=1020,yr=1021,mr=1022,wr=1023,gr=1024,Er=1025,Tr=1026,br=1027,Dr=1028,Pr=1029,Cr=1030,_r=1031,Rr=1033,Br=33776,Or=33777,Sr=33778,Nr=33779,Lr=35840,xr=35841,Mr=35842,Fr=35843,Hr=36196,Ur=37492,Gr=37496,kr=37808,jr=37809,Vr=37810,Qr=37811,Wr=37812,zr=37813,Kr=37814,Yr=37815,Xr=37816,qr=37817,Jr=37818,Zr=37819,$r=37820,ei=37821,ti=36492,ni=3e3,ri=3001,ii=1e4,ai=10001,si=10002,oi=10003,li=function(e){"LambertMaterial"===e._material._state.type?(this.vertex=function(e){var t=e.scene,n=e.scene._sectionPlanesState,r=e.scene._lightsState,i=e._geometry._state,a=e._state.billboard,s=e._state.stationary,o=n.getNumAllocatedSectionPlanes()>0,l=!!i.compressGeometry,u=[];u.push("#version 300 es"),u.push("// Lambertian drawing vertex shader"),u.push("in vec3 position;"),u.push("uniform mat4 modelMatrix;"),u.push("uniform mat4 viewMatrix;"),u.push("uniform mat4 projMatrix;"),u.push("uniform vec4 colorize;"),u.push("uniform vec3 offset;"),l&&u.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(u.push("uniform float logDepthBufFC;"),u.push("out float vFragDepth;"),u.push("bool isPerspectiveMatrix(mat4 m) {"),u.push(" return (m[2][3] == - 1.0);"),u.push("}"),u.push("out float isPerspective;"));o&&u.push("out vec4 vWorldPosition;");if(u.push("uniform vec4 lightAmbient;"),u.push("uniform vec4 materialColor;"),u.push("uniform vec3 materialEmissive;"),i.normalsBuf){u.push("in vec3 normal;"),u.push("uniform mat4 modelNormalMatrix;"),u.push("uniform mat4 viewNormalMatrix;");for(var c=0,f=r.lights.length;c= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),u.push(" }"),u.push(" return normalize(v);"),u.push("}"))}u.push("out vec4 vColor;"),"points"===i.primitiveName&&u.push("uniform float pointSize;");"spherical"!==a&&"cylindrical"!==a||(u.push("void billboard(inout mat4 mat) {"),u.push(" mat[0][0] = 1.0;"),u.push(" mat[0][1] = 0.0;"),u.push(" mat[0][2] = 0.0;"),"spherical"===a&&(u.push(" mat[1][0] = 0.0;"),u.push(" mat[1][1] = 1.0;"),u.push(" mat[1][2] = 0.0;")),u.push(" mat[2][0] = 0.0;"),u.push(" mat[2][1] = 0.0;"),u.push(" mat[2][2] =1.0;"),u.push("}"));u.push("void main(void) {"),u.push("vec4 localPosition = vec4(position, 1.0); "),u.push("vec4 worldPosition;"),l&&u.push("localPosition = positionsDecodeMatrix * localPosition;");i.normalsBuf&&(l?u.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):u.push("vec4 localNormal = vec4(normal, 0.0); "),u.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),u.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));u.push("mat4 viewMatrix2 = viewMatrix;"),u.push("mat4 modelMatrix2 = modelMatrix;"),s&&u.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===a||"cylindrical"===a?(u.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),u.push("billboard(modelMatrix2);"),u.push("billboard(viewMatrix2);"),u.push("billboard(modelViewMatrix);"),i.normalsBuf&&(u.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),u.push("billboard(modelNormalMatrix2);"),u.push("billboard(viewNormalMatrix2);"),u.push("billboard(modelViewNormalMatrix);")),u.push("worldPosition = modelMatrix2 * localPosition;"),u.push("worldPosition.xyz = worldPosition.xyz + offset;"),u.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(u.push("worldPosition = modelMatrix2 * localPosition;"),u.push("worldPosition.xyz = worldPosition.xyz + offset;"),u.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i.normalsBuf&&u.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(u.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),u.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),u.push("float lambertian = 1.0;"),i.normalsBuf)for(var A=0,d=r.lights.length;A0,a=t.gammaOutput,s=[];s.push("#version 300 es"),s.push("// Lambertian drawing fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"));if(i){s.push("in vec4 vWorldPosition;"),s.push("uniform bool clippable;");for(var o=0,l=n.getNumAllocatedSectionPlanes();o 0.0) { discard; }"),s.push("}")}"points"===r.primitiveName&&(s.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),s.push("float r = dot(cxy, cxy);"),s.push("if (r > 1.0) {"),s.push(" discard;"),s.push("}"));t.logarithmicDepthBufferEnabled&&s.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");a?s.push("outColor = linearToGamma(vColor, gammaFactor);"):s.push("outColor = vColor;");return s.push("}"),s}(e)):(this.vertex=function(e){var t=e.scene;e._material;var n,r=e._state,i=t._sectionPlanesState,a=e._geometry._state,s=t._lightsState,o=r.billboard,l=r.background,u=r.stationary,c=function(e){if(!e._geometry._state.uvBuf)return!1;var t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),f=fi(e),p=i.getNumAllocatedSectionPlanes()>0,A=ci(e),d=!!a.compressGeometry,v=[];v.push("#version 300 es"),v.push("// Drawing vertex shader"),v.push("in vec3 position;"),d&&v.push("uniform mat4 positionsDecodeMatrix;");v.push("uniform mat4 modelMatrix;"),v.push("uniform mat4 viewMatrix;"),v.push("uniform mat4 projMatrix;"),v.push("out vec3 vViewPosition;"),v.push("uniform vec3 offset;"),p&&v.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(v.push("uniform float logDepthBufFC;"),v.push("out float vFragDepth;"),v.push("bool isPerspectiveMatrix(mat4 m) {"),v.push(" return (m[2][3] == - 1.0);"),v.push("}"),v.push("out float isPerspective;"));s.lightMaps.length>0&&v.push("out vec3 vWorldNormal;");if(f){v.push("in vec3 normal;"),v.push("uniform mat4 modelNormalMatrix;"),v.push("uniform mat4 viewNormalMatrix;"),v.push("out vec3 vViewNormal;");for(var h=0,I=s.lights.length;h= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),v.push(" }"),v.push(" return normalize(v);"),v.push("}"))}c&&(v.push("in vec2 uv;"),v.push("out vec2 vUV;"),d&&v.push("uniform mat3 uvDecodeMatrix;"));a.colors&&(v.push("in vec4 color;"),v.push("out vec4 vColor;"));"points"===a.primitiveName&&v.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(v.push("void billboard(inout mat4 mat) {"),v.push(" mat[0][0] = 1.0;"),v.push(" mat[0][1] = 0.0;"),v.push(" mat[0][2] = 0.0;"),"spherical"===o&&(v.push(" mat[1][0] = 0.0;"),v.push(" mat[1][1] = 1.0;"),v.push(" mat[1][2] = 0.0;")),v.push(" mat[2][0] = 0.0;"),v.push(" mat[2][1] = 0.0;"),v.push(" mat[2][2] =1.0;"),v.push("}"));if(A){v.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(var y=0,m=s.lights.length;y0&&v.push("vWorldNormal = worldNormal;"),v.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),v.push("vec3 tmpVec3;"),v.push("float lightDist;");for(var w=0,g=s.lights.length;w0,l=fi(e),u=r.uvBuf,c="PhongMaterial"===s.type,f="MetallicMaterial"===s.type,p="SpecularMaterial"===s.type,A=ci(e);t.gammaInput;var d=t.gammaOutput,v=[];v.push("#version 300 es"),v.push("// Drawing fragment shader"),v.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),v.push("precision highp float;"),v.push("precision highp int;"),v.push("#else"),v.push("precision mediump float;"),v.push("precision mediump int;"),v.push("#endif"),t.logarithmicDepthBufferEnabled&&(v.push("in float isPerspective;"),v.push("uniform float logDepthBufFC;"),v.push("in float vFragDepth;"));A&&(v.push("float unpackDepth (vec4 color) {"),v.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),v.push(" return dot(color, bitShift);"),v.push("}"));v.push("uniform float gammaFactor;"),v.push("vec4 linearToLinear( in vec4 value ) {"),v.push(" return value;"),v.push("}"),v.push("vec4 sRGBToLinear( in vec4 value ) {"),v.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),v.push("}"),v.push("vec4 gammaToLinear( in vec4 value) {"),v.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),v.push("}"),d&&(v.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),v.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),v.push("}"));if(o){v.push("in vec4 vWorldPosition;"),v.push("uniform bool clippable;");for(var h=0;h0&&(v.push("uniform samplerCube lightMap;"),v.push("uniform mat4 viewNormalMatrix;")),a.reflectionMaps.length>0&&v.push("uniform samplerCube reflectionMap;"),(a.lightMaps.length>0||a.reflectionMaps.length>0)&&v.push("uniform mat4 viewMatrix;"),v.push("#define PI 3.14159265359"),v.push("#define RECIPROCAL_PI 0.31830988618"),v.push("#define RECIPROCAL_PI2 0.15915494"),v.push("#define EPSILON 1e-6"),v.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),v.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),v.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),v.push("}"),v.push("struct IncidentLight {"),v.push(" vec3 color;"),v.push(" vec3 direction;"),v.push("};"),v.push("struct ReflectedLight {"),v.push(" vec3 diffuse;"),v.push(" vec3 specular;"),v.push("};"),v.push("struct Geometry {"),v.push(" vec3 position;"),v.push(" vec3 viewNormal;"),v.push(" vec3 worldNormal;"),v.push(" vec3 viewEyeDir;"),v.push("};"),v.push("struct Material {"),v.push(" vec3 diffuseColor;"),v.push(" float specularRoughness;"),v.push(" vec3 specularColor;"),v.push(" float shine;"),v.push("};"),c&&((a.lightMaps.length>0||a.reflectionMaps.length>0)&&(v.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.lightMaps.length>0&&(v.push(" vec3 irradiance = "+ui[a.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),v.push(" irradiance *= PI;"),v.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),a.reflectionMaps.length>0&&(v.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),v.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),v.push(" radiance *= PI;"),v.push(" reflectedLight.specular += radiance;")),v.push("}")),v.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),v.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),v.push(" vec3 irradiance = dotNL * directLight.color * PI;"),v.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),v.push("}")),(f||p)&&(v.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),v.push(" float r = ggxRoughness + 0.0001;"),v.push(" return (2.0 / (r * r) - 2.0);"),v.push("}"),v.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),v.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),v.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),v.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),v.push("}"),a.reflectionMaps.length>0&&(v.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),v.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),v.push(" vec3 envMapColor = "+ui[a.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),v.push(" return envMapColor;"),v.push("}")),v.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),v.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),v.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),v.push("}"),v.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),v.push(" float a2 = ( alpha * alpha );"),v.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),v.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),v.push(" return 1.0 / ( gl * gv );"),v.push("}"),v.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),v.push(" float a2 = ( alpha * alpha );"),v.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),v.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),v.push(" return 0.5 / max( gv + gl, EPSILON );"),v.push("}"),v.push("float D_GGX(const in float alpha, const in float dotNH) {"),v.push(" float a2 = ( alpha * alpha );"),v.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),v.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),v.push("}"),v.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),v.push(" float alpha = ( roughness * roughness );"),v.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),v.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),v.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),v.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),v.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),v.push(" vec3 F = F_Schlick( specularColor, dotLH );"),v.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),v.push(" float D = D_GGX( alpha, dotNH );"),v.push(" return F * (G * D);"),v.push("}"),v.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),v.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),v.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),v.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),v.push(" vec4 r = roughness * c0 + c1;"),v.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),v.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),v.push(" return specularColor * AB.x + AB.y;"),v.push("}"),(a.lightMaps.length>0||a.reflectionMaps.length>0)&&(v.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.lightMaps.length>0&&(v.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),v.push(" irradiance *= PI;"),v.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),a.reflectionMaps.length>0&&(v.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),v.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),v.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),v.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),v.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),v.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),v.push("}")),v.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),v.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),v.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),v.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),v.push("}")));v.push("in vec3 vViewPosition;"),r.colors&&v.push("in vec4 vColor;");u&&(l&&n._normalMap||n._ambientMap||n._baseColorMap||n._diffuseMap||n._emissiveMap||n._metallicMap||n._roughnessMap||n._metallicRoughnessMap||n._specularMap||n._glossinessMap||n._specularGlossinessMap||n._occlusionMap||n._alphaMap)&&v.push("in vec2 vUV;");l&&(a.lightMaps.length>0&&v.push("in vec3 vWorldNormal;"),v.push("in vec3 vViewNormal;"));s.ambient&&v.push("uniform vec3 materialAmbient;");s.baseColor&&v.push("uniform vec3 materialBaseColor;");void 0!==s.alpha&&null!==s.alpha&&v.push("uniform vec4 materialAlphaModeCutoff;");s.emissive&&v.push("uniform vec3 materialEmissive;");s.diffuse&&v.push("uniform vec3 materialDiffuse;");void 0!==s.glossiness&&null!==s.glossiness&&v.push("uniform float materialGlossiness;");void 0!==s.shininess&&null!==s.shininess&&v.push("uniform float materialShininess;");s.specular&&v.push("uniform vec3 materialSpecular;");void 0!==s.metallic&&null!==s.metallic&&v.push("uniform float materialMetallic;");void 0!==s.roughness&&null!==s.roughness&&v.push("uniform float materialRoughness;");void 0!==s.specularF0&&null!==s.specularF0&&v.push("uniform float materialSpecularF0;");u&&n._ambientMap&&(v.push("uniform sampler2D ambientMap;"),n._ambientMap._state.matrix&&v.push("uniform mat4 ambientMapMatrix;"));u&&n._baseColorMap&&(v.push("uniform sampler2D baseColorMap;"),n._baseColorMap._state.matrix&&v.push("uniform mat4 baseColorMapMatrix;"));u&&n._diffuseMap&&(v.push("uniform sampler2D diffuseMap;"),n._diffuseMap._state.matrix&&v.push("uniform mat4 diffuseMapMatrix;"));u&&n._emissiveMap&&(v.push("uniform sampler2D emissiveMap;"),n._emissiveMap._state.matrix&&v.push("uniform mat4 emissiveMapMatrix;"));l&&u&&n._metallicMap&&(v.push("uniform sampler2D metallicMap;"),n._metallicMap._state.matrix&&v.push("uniform mat4 metallicMapMatrix;"));l&&u&&n._roughnessMap&&(v.push("uniform sampler2D roughnessMap;"),n._roughnessMap._state.matrix&&v.push("uniform mat4 roughnessMapMatrix;"));l&&u&&n._metallicRoughnessMap&&(v.push("uniform sampler2D metallicRoughnessMap;"),n._metallicRoughnessMap._state.matrix&&v.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&n._normalMap&&(v.push("uniform sampler2D normalMap;"),n._normalMap._state.matrix&&v.push("uniform mat4 normalMapMatrix;"),v.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),v.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),v.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),v.push(" vec2 st0 = dFdx( uv.st );"),v.push(" vec2 st1 = dFdy( uv.st );"),v.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),v.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),v.push(" vec3 N = normalize( surf_norm );"),v.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),v.push(" mat3 tsn = mat3( S, T, N );"),v.push(" return normalize( tsn * mapN );"),v.push("}"));u&&n._occlusionMap&&(v.push("uniform sampler2D occlusionMap;"),n._occlusionMap._state.matrix&&v.push("uniform mat4 occlusionMapMatrix;"));u&&n._alphaMap&&(v.push("uniform sampler2D alphaMap;"),n._alphaMap._state.matrix&&v.push("uniform mat4 alphaMapMatrix;"));l&&u&&n._specularMap&&(v.push("uniform sampler2D specularMap;"),n._specularMap._state.matrix&&v.push("uniform mat4 specularMapMatrix;"));l&&u&&n._glossinessMap&&(v.push("uniform sampler2D glossinessMap;"),n._glossinessMap._state.matrix&&v.push("uniform mat4 glossinessMapMatrix;"));l&&u&&n._specularGlossinessMap&&(v.push("uniform sampler2D materialSpecularGlossinessMap;"),n._specularGlossinessMap._state.matrix&&v.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(n._diffuseFresnel||n._specularFresnel||n._alphaFresnel||n._emissiveFresnel||n._reflectivityFresnel)&&(v.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),v.push(" float fr = abs(dot(eyeDir, normal));"),v.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),v.push(" return pow(finalFr, power);"),v.push("}"),n._diffuseFresnel&&(v.push("uniform float diffuseFresnelCenterBias;"),v.push("uniform float diffuseFresnelEdgeBias;"),v.push("uniform float diffuseFresnelPower;"),v.push("uniform vec3 diffuseFresnelCenterColor;"),v.push("uniform vec3 diffuseFresnelEdgeColor;")),n._specularFresnel&&(v.push("uniform float specularFresnelCenterBias;"),v.push("uniform float specularFresnelEdgeBias;"),v.push("uniform float specularFresnelPower;"),v.push("uniform vec3 specularFresnelCenterColor;"),v.push("uniform vec3 specularFresnelEdgeColor;")),n._alphaFresnel&&(v.push("uniform float alphaFresnelCenterBias;"),v.push("uniform float alphaFresnelEdgeBias;"),v.push("uniform float alphaFresnelPower;"),v.push("uniform vec3 alphaFresnelCenterColor;"),v.push("uniform vec3 alphaFresnelEdgeColor;")),n._reflectivityFresnel&&(v.push("uniform float materialSpecularF0FresnelCenterBias;"),v.push("uniform float materialSpecularF0FresnelEdgeBias;"),v.push("uniform float materialSpecularF0FresnelPower;"),v.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),v.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),n._emissiveFresnel&&(v.push("uniform float emissiveFresnelCenterBias;"),v.push("uniform float emissiveFresnelEdgeBias;"),v.push("uniform float emissiveFresnelPower;"),v.push("uniform vec3 emissiveFresnelCenterColor;"),v.push("uniform vec3 emissiveFresnelEdgeColor;")));if(v.push("uniform vec4 lightAmbient;"),l)for(var I=0,y=a.lights.length;I 0.0) { discard; }"),v.push("}")}"points"===r.primitiveName&&(v.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),v.push("float r = dot(cxy, cxy);"),v.push("if (r > 1.0) {"),v.push(" discard;"),v.push("}"));v.push("float occlusion = 1.0;"),s.ambient?v.push("vec3 ambientColor = materialAmbient;"):v.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");s.diffuse?v.push("vec3 diffuseColor = materialDiffuse;"):s.baseColor?v.push("vec3 diffuseColor = materialBaseColor;"):v.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");r.colors&&v.push("diffuseColor *= vColor.rgb;");s.emissive?v.push("vec3 emissiveColor = materialEmissive;"):v.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");s.specular?v.push("vec3 specular = materialSpecular;"):v.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==s.alpha?v.push("float alpha = materialAlphaModeCutoff[0];"):v.push("float alpha = 1.0;");r.colors&&v.push("alpha *= vColor.a;");void 0!==s.glossiness?v.push("float glossiness = materialGlossiness;"):v.push("float glossiness = 1.0;");void 0!==s.metallic?v.push("float metallic = materialMetallic;"):v.push("float metallic = 1.0;");void 0!==s.roughness?v.push("float roughness = materialRoughness;"):v.push("float roughness = 1.0;");void 0!==s.specularF0?v.push("float specularF0 = materialSpecularF0;"):v.push("float specularF0 = 1.0;");u&&(l&&n._normalMap||n._ambientMap||n._baseColorMap||n._diffuseMap||n._occlusionMap||n._emissiveMap||n._metallicMap||n._roughnessMap||n._metallicRoughnessMap||n._specularMap||n._glossinessMap||n._specularGlossinessMap||n._alphaMap)&&(v.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),v.push("vec2 textureCoord;"));u&&n._ambientMap&&(n._ambientMap._state.matrix?v.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),v.push("ambientTexel = "+ui[n._ambientMap._state.encoding]+"(ambientTexel);"),v.push("ambientColor *= ambientTexel.rgb;"));u&&n._diffuseMap&&(n._diffuseMap._state.matrix?v.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),v.push("diffuseTexel = "+ui[n._diffuseMap._state.encoding]+"(diffuseTexel);"),v.push("diffuseColor *= diffuseTexel.rgb;"),v.push("alpha *= diffuseTexel.a;"));u&&n._baseColorMap&&(n._baseColorMap._state.matrix?v.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),v.push("baseColorTexel = "+ui[n._baseColorMap._state.encoding]+"(baseColorTexel);"),v.push("diffuseColor *= baseColorTexel.rgb;"),v.push("alpha *= baseColorTexel.a;"));u&&n._emissiveMap&&(n._emissiveMap._state.matrix?v.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),v.push("emissiveTexel = "+ui[n._emissiveMap._state.encoding]+"(emissiveTexel);"),v.push("emissiveColor = emissiveTexel.rgb;"));u&&n._alphaMap&&(n._alphaMap._state.matrix?v.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("alpha *= texture(alphaMap, textureCoord).r;"));u&&n._occlusionMap&&(n._occlusionMap._state.matrix?v.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(a.lights.length>0||a.lightMaps.length>0||a.reflectionMaps.length>0)){u&&n._normalMap?(n._normalMap._state.matrix?v.push("textureCoord = (normalMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):v.push("vec3 viewNormal = normalize(vViewNormal);"),u&&n._specularMap&&(n._specularMap._state.matrix?v.push("textureCoord = (specularMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("specular *= texture(specularMap, textureCoord).rgb;")),u&&n._glossinessMap&&(n._glossinessMap._state.matrix?v.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("glossiness *= texture(glossinessMap, textureCoord).r;")),u&&n._specularGlossinessMap&&(n._specularGlossinessMap._state.matrix?v.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),v.push("specular *= specGlossRGB.rgb;"),v.push("glossiness *= specGlossRGB.a;")),u&&n._metallicMap&&(n._metallicMap._state.matrix?v.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("metallic *= texture(metallicMap, textureCoord).r;")),u&&n._roughnessMap&&(n._roughnessMap._state.matrix?v.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("roughness *= texture(roughnessMap, textureCoord).r;")),u&&n._metallicRoughnessMap&&(n._metallicRoughnessMap._state.matrix?v.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),v.push("metallic *= metalRoughRGB.b;"),v.push("roughness *= metalRoughRGB.g;")),v.push("vec3 viewEyeDir = normalize(-vViewPosition);"),n._diffuseFresnel&&(v.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),v.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),n._specularFresnel&&(v.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),v.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),n._alphaFresnel&&(v.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),v.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),n._emissiveFresnel&&(v.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),v.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),v.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),v.push(" discard;"),v.push("}"),v.push("IncidentLight light;"),v.push("Material material;"),v.push("Geometry geometry;"),v.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),v.push("vec3 viewLightDir;"),c&&(v.push("material.diffuseColor = diffuseColor;"),v.push("material.specularColor = specular;"),v.push("material.shine = materialShininess;")),p&&(v.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),v.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),v.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),v.push("material.specularColor = specular;")),f&&(v.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),v.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),v.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),v.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),v.push("geometry.position = vViewPosition;"),a.lightMaps.length>0&&v.push("geometry.worldNormal = normalize(vWorldNormal);"),v.push("geometry.viewNormal = viewNormal;"),v.push("geometry.viewEyeDir = viewEyeDir;"),c&&(a.lightMaps.length>0||a.reflectionMaps.length>0)&&v.push("computePhongLightMapping(geometry, material, reflectedLight);"),(p||f)&&(a.lightMaps.length>0||a.reflectionMaps.length>0)&&v.push("computePBRLightMapping(geometry, material, reflectedLight);"),v.push("float shadow = 1.0;"),v.push("float shadowAcneRemover = 0.007;"),v.push("vec3 fragmentDepth;"),v.push("float texelSize = 1.0 / 1024.0;"),v.push("float amountInLight = 0.0;"),v.push("vec3 shadowCoord;"),v.push("vec4 rgbaDepth;"),v.push("float depth;");for(var E=0,T=a.lights.length;E0)for(var v=r._sectionPlanesState.sectionPlanes,h=t.renderFlags,I=0;I0&&(this._uLightMap="lightMap"),i.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(c=0,f=a.sectionPlanes.length;c0&&a.lightMaps[0].texture&&this._uLightMap&&(o.bindTexture(this._uLightMap,a.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%n,e.bindTexture++),a.reflectionMaps.length>0&&a.reflectionMaps[0].texture&&this._uReflectionMap&&(o.bindTexture(this._uReflectionMap,a.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%n,e.bindTexture++),this._uGammaFactor&&i.uniform1f(this._uGammaFactor,r.gammaFactor),this._baseTextureUnit=e.textureUnit};var hi=P((function e(t){b(this,e),this.vertex=function(e){var t=e.scene,n=t._lightsState,r=function(e){var t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),i=t._sectionPlanesState.getNumAllocatedSectionPlanes()>0,a=!!e._geometry._state.compressGeometry,s=e._state.billboard,o=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),a&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));i&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),r){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(var u=0,c=n.lights.length;u= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===s||"cylindrical"===s)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===s&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),a&&l.push("localPosition = positionsDecodeMatrix * localPosition;");r&&(a?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),o&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===s||"cylindrical"===s?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),r&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));r&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),r)for(var p=0,A=n.lights.length;p0,a=[];a.push("#version 300 es"),a.push("// Lambertian drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));r&&(a.push("uniform float gammaFactor;"),a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(var s=0,o=n.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),a.push("}")}"points"===e._geometry._state.primitiveName&&(a.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),a.push("float r = dot(cxy, cxy);"),a.push("if (r > 1.0) {"),a.push(" discard;"),a.push("}"));t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(t)}));var Ii=new G({}),yi=$.vec3(),mi=function(e,t){this.id=Ii.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new hi(t),this._allocate(t)},wi={};mi.get=function(e){var t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";"),n=wi[t];return n||(n=new mi(t,e),wi[t]=n,re.memory.programs++),n._useCount++,n},mi.prototype.put=function(){0==--this._useCount&&(Ii.removeItem(this.id),this._program&&this._program.destroy(),delete wi[this._hash],re.memory.programs--)},mi.prototype.webglContextRestored=function(){this._program=null},mi.prototype.drawMesh=function(e,t,n){this._program||this._allocate(t);var r=this._scene,i=r.camera,a=r.canvas.gl,s=0===n?t._xrayMaterial._state:1===n?t._highlightMaterial._state:t._selectedMaterial._state,o=t._state,l=t._geometry._state,u=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),a.uniformMatrix4fv(this._uViewMatrix,!1,u?e.getRTCViewMatrix(o.originHash,u):i.viewMatrix),a.uniformMatrix4fv(this._uViewNormalMatrix,!1,i.viewNormalMatrix),o.clippable){var c=r._sectionPlanesState.getNumAllocatedSectionPlanes(),f=r._sectionPlanesState.sectionPlanes.length;if(c>0)for(var p=r._sectionPlanesState.sectionPlanes,A=t.renderFlags,d=0;d0,r=!!e._geometry._state.compressGeometry,i=e._state.billboard,a=e._state.stationary,s=[];s.push("#version 300 es"),s.push("// Edges drawing vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform vec4 edgeColor;"),s.push("uniform vec3 offset;"),r&&s.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"));n&&s.push("out vec4 vWorldPosition;");s.push("out vec4 vColor;"),("spherical"===i||"cylindrical"===i)&&(s.push("void billboard(inout mat4 mat) {"),s.push(" mat[0][0] = 1.0;"),s.push(" mat[0][1] = 0.0;"),s.push(" mat[0][2] = 0.0;"),"spherical"===i&&(s.push(" mat[1][0] = 0.0;"),s.push(" mat[1][1] = 1.0;"),s.push(" mat[1][2] = 0.0;")),s.push(" mat[2][0] = 0.0;"),s.push(" mat[2][1] = 0.0;"),s.push(" mat[2][2] =1.0;"),s.push("}"));s.push("void main(void) {"),s.push("vec4 localPosition = vec4(position, 1.0); "),s.push("vec4 worldPosition;"),r&&s.push("localPosition = positionsDecodeMatrix * localPosition;");s.push("mat4 viewMatrix2 = viewMatrix;"),s.push("mat4 modelMatrix2 = modelMatrix;"),a&&s.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(s.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),s.push("billboard(modelMatrix2);"),s.push("billboard(viewMatrix2);"),s.push("billboard(modelViewMatrix);"),s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s.push("vColor = edgeColor;"),n&&s.push("vWorldPosition = worldPosition;");s.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return s.push("gl_Position = clipPos;"),s.push("}"),s}(t),this.fragment=function(e){var t=e.scene,n=e.scene._sectionPlanesState,r=e.scene.gammaOutput,i=n.getNumAllocatedSectionPlanes()>0,a=[];a.push("#version 300 es"),a.push("// Edges drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));r&&(a.push("uniform float gammaFactor;"),a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(var s=0,o=n.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),a.push("}")}t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(t)}));var Ei=new G({}),Ti=$.vec3(),bi=function(e,t){this.id=Ei.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new gi(t),this._allocate(t)},Di={};bi.get=function(e){var t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";"),n=Di[t];return n||(n=new bi(t,e),Di[t]=n,re.memory.programs++),n._useCount++,n},bi.prototype.put=function(){0==--this._useCount&&(Ei.removeItem(this.id),this._program&&this._program.destroy(),delete Di[this._hash],re.memory.programs--)},bi.prototype.webglContextRestored=function(){this._program=null},bi.prototype.drawMesh=function(e,t,n){this._program||this._allocate(t);var r,i,a=this._scene,s=a.camera,o=a.canvas.gl,l=t._state,u=t._geometry,c=u._state,f=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,f?e.getRTCViewMatrix(l.originHash,f):s.viewMatrix),l.clippable){var p=a._sectionPlanesState.getNumAllocatedSectionPlanes(),A=a._sectionPlanesState.sectionPlanes.length;if(p>0)for(var d=a._sectionPlanesState.sectionPlanes,v=t.renderFlags,h=0;h0,r=!!e._geometry._state.compressGeometry,i=e._state.billboard,a=e._state.stationary,s=[];s.push("#version 300 es"),s.push("// Mesh picking vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("out vec4 vViewPosition;"),s.push("uniform vec3 offset;"),r&&s.push("uniform mat4 positionsDecodeMatrix;");n&&s.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(s.push("void billboard(inout mat4 mat) {"),s.push(" mat[0][0] = 1.0;"),s.push(" mat[0][1] = 0.0;"),s.push(" mat[0][2] = 0.0;"),"spherical"===i&&(s.push(" mat[1][0] = 0.0;"),s.push(" mat[1][1] = 1.0;"),s.push(" mat[1][2] = 0.0;")),s.push(" mat[2][0] = 0.0;"),s.push(" mat[2][1] = 0.0;"),s.push(" mat[2][2] =1.0;"),s.push("}"));s.push("uniform vec2 pickClipPos;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy -= pickClipPos;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("void main(void) {"),s.push("vec4 localPosition = vec4(position, 1.0); "),r&&s.push("localPosition = positionsDecodeMatrix * localPosition;");s.push("mat4 viewMatrix2 = viewMatrix;"),s.push("mat4 modelMatrix2 = modelMatrix;"),a&&s.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==i&&"cylindrical"!==i||(s.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),s.push("billboard(modelMatrix2);"),s.push("billboard(viewMatrix2);"));s.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),n&&s.push(" vWorldPosition = worldPosition;");s.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s}(t),this.fragment=function(e){var t=e.scene,n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(i.push("uniform vec4 pickColor;"),r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = pickColor; "),i.push("}"),i}(t)}));var Ci=$.vec3(),_i=function(e,t){this._hash=e,this._shaderSource=new Pi(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ri={};_i.get=function(e){var t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";"),n=Ri[t];if(!n){if((n=new _i(t,e)).errors)return console.log(n.errors.join("\n")),null;Ri[t]=n,re.memory.programs++}return n._useCount++,n},_i.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ri[this._hash],re.memory.programs--)},_i.prototype.webglContextRestored=function(){this._program=null},_i.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene,r=n.canvas.gl,i=t._state,a=t._material._state,s=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCPickViewMatrix(i.originHash,o):e.pickViewMatrix),i.clippable){var l=n._sectionPlanesState.getNumAllocatedSectionPlanes(),u=n._sectionPlanesState.sectionPlanes.length;if(l>0)for(var c=n._sectionPlanesState.sectionPlanes,f=t.renderFlags,p=0;p>24&255,g=m>>16&255,E=m>>8&255,T=255&m;r.uniform4f(this._uPickColor,T/255,E/255,g/255,w/255),r.uniform2fv(this._uPickClipPos,e.pickClipPos),s.indicesBuf?(r.drawElements(s.primitive,s.indicesBuf.numItems,s.indicesBuf.itemType,0),e.drawElements++):s.positions&&r.drawArrays(r.TRIANGLES,0,s.positions.numItems)},_i.prototype._allocate=function(e){var t=e.scene,n=t.canvas.gl;if(this._program=new Dt(n,this._shaderSource),this._program.errors)this.errors=this._program.errors;else{var r=this._program;this._uPositionsDecodeMatrix=r.getLocation("positionsDecodeMatrix"),this._uModelMatrix=r.getLocation("modelMatrix"),this._uViewMatrix=r.getLocation("viewMatrix"),this._uProjMatrix=r.getLocation("projMatrix"),this._uSectionPlanes=[];for(var i=0,a=t._sectionPlanesState.sectionPlanes.length;i0,r=!!e._geometry._state.compressGeometry,i=[];i.push("#version 300 es"),i.push("// Surface picking vertex shader"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform vec3 offset;"),n&&(i.push("uniform bool clippable;"),i.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out float isPerspective;"));i.push("uniform vec2 pickClipPos;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy -= pickClipPos;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("out vec4 vColor;"),r&&i.push("uniform mat4 positionsDecodeMatrix;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),r&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push(" vec4 worldPosition = modelMatrix * localPosition; "),i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition;"),n&&i.push(" vWorldPosition = worldPosition;");i.push(" vColor = color;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i}(t),this.fragment=function(e){var t=e.scene,n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Surface picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = vColor;"),i.push("}"),i}(t)}));var Oi=$.vec3(),Si=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Bi(t),this._allocate(t)},Ni={};Si.get=function(e){var t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";"),n=Ni[t];if(!n){if((n=new Si(t,e)).errors)return console.log(n.errors.join("\n")),null;Ni[t]=n,re.memory.programs++}return n._useCount++,n},Si.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ni[this._hash],re.memory.programs--)},Si.prototype.webglContextRestored=function(){this._program=null},Si.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene,r=n.canvas.gl,i=t._state,a=t._material._state,s=t._geometry,o=t._geometry._state,l=t.origin,u=a.backfaces,c=a.frontface,f=n.camera.project,p=s._getPickTrianglePositions(),A=s._getPickTriangleColors();if(this._program.bind(),e.useProgram++,n.logarithmicDepthBufferEnabled){var d=2/(Math.log(f.far+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,d)}if(r.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(i.originHash,l):e.pickViewMatrix),i.clippable){var v=n._sectionPlanesState.getNumAllocatedSectionPlanes(),h=n._sectionPlanesState.sectionPlanes.length;if(v>0)for(var I=n._sectionPlanesState.sectionPlanes,y=t.renderFlags,m=0;m0,r=!!e._geometry._state.compressGeometry,i=e._state.billboard,a=e._state.stationary,s=[];s.push("#version 300 es"),s.push("// Mesh occlusion vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform vec3 offset;"),r&&s.push("uniform mat4 positionsDecodeMatrix;");n&&s.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(s.push("void billboard(inout mat4 mat) {"),s.push(" mat[0][0] = 1.0;"),s.push(" mat[0][1] = 0.0;"),s.push(" mat[0][2] = 0.0;"),"spherical"===i&&(s.push(" mat[1][0] = 0.0;"),s.push(" mat[1][1] = 1.0;"),s.push(" mat[1][2] = 0.0;")),s.push(" mat[2][0] = 0.0;"),s.push(" mat[2][1] = 0.0;"),s.push(" mat[2][2] =1.0;"),s.push("}"));s.push("void main(void) {"),s.push("vec4 localPosition = vec4(position, 1.0); "),s.push("vec4 worldPosition;"),r&&s.push("localPosition = positionsDecodeMatrix * localPosition;");s.push("mat4 viewMatrix2 = viewMatrix;"),s.push("mat4 modelMatrix2 = modelMatrix;"),a&&s.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(s.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),s.push("billboard(modelMatrix2);"),s.push("billboard(viewMatrix2);"),s.push("billboard(modelViewMatrix);"),s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n&&s.push(" vWorldPosition = worldPosition;");s.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return s.push("gl_Position = clipPos;"),s.push("}"),s}(t),this.fragment=function(e){var t=e.scene,n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push("}"),i}(t)}));var xi=$.vec3(),Mi=function(e,t){this._hash=e,this._shaderSource=new Li(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Fi={};Mi.get=function(e){var t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";"),n=Fi[t];if(!n){if((n=new Mi(t,e)).errors)return console.log(n.errors.join("\n")),null;Fi[t]=n,re.memory.programs++}return n._useCount++,n},Mi.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Fi[this._hash],re.memory.programs--)},Mi.prototype.webglContextRestored=function(){this._program=null},Mi.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene,r=n.canvas.gl,i=t._material._state,a=t._state,s=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){var l=i.backfaces;e.backfaces!==l&&(l?r.disable(r.CULL_FACE):r.enable(r.CULL_FACE),e.backfaces=l);var u=i.frontface;e.frontface!==u&&(u?r.frontFace(r.CCW):r.frontFace(r.CW),e.frontface=u),this._lastMaterialId=i.id}var c=n.camera;if(r.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCViewMatrix(a.originHash,o):c.viewMatrix),a.clippable){var f=n._sectionPlanesState.getNumAllocatedSectionPlanes(),p=n._sectionPlanesState.sectionPlanes.length;if(f>0)for(var A=n._sectionPlanesState.sectionPlanes,d=t.renderFlags,v=0;v0,n=!!e._geometry._state.compressGeometry,r=[];r.push("// Mesh shadow vertex shader"),r.push("in vec3 position;"),r.push("uniform mat4 modelMatrix;"),r.push("uniform mat4 shadowViewMatrix;"),r.push("uniform mat4 shadowProjMatrix;"),r.push("uniform vec3 offset;"),n&&r.push("uniform mat4 positionsDecodeMatrix;");t&&r.push("out vec4 vWorldPosition;");r.push("void main(void) {"),r.push("vec4 localPosition = vec4(position, 1.0); "),r.push("vec4 worldPosition;"),n&&r.push("localPosition = positionsDecodeMatrix * localPosition;");r.push("worldPosition = modelMatrix * localPosition;"),r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&r.push("vWorldPosition = worldPosition;");return r.push(" gl_Position = shadowProjMatrix * viewPosition;"),r.push("}"),r}(t),this.fragment=function(e){var t=e.scene;t.canvas.gl;var n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("// Mesh shadow fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}return i.push("outColor = encodeFloat(gl_FragCoord.z);"),i.push("}"),i}(t)}));var Ui=function(e,t){this._hash=e,this._shaderSource=new Hi(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Gi={};Ui.get=function(e){var t=e.scene,n=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";"),r=Gi[n];if(!r){if((r=new Ui(n,e)).errors)return console.log(r.errors.join("\n")),null;Gi[n]=r,re.memory.programs++}return r._useCount++,r},Ui.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Gi[this._hash],re.memory.programs--)},Ui.prototype.webglContextRestored=function(){this._program=null},Ui.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene.canvas.gl,r=t._material._state,i=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.id!==this._lastMaterialId){var a=r.backfaces;e.backfaces!==a&&(a?n.disable(n.CULL_FACE):n.enable(n.CULL_FACE),e.backfaces=a);var s=r.frontface;e.frontface!==s&&(s?n.frontFace(n.CCW):n.frontFace(n.CW),e.frontface=s),e.lineWidth!==r.lineWidth&&(n.lineWidth(r.lineWidth),e.lineWidth=r.lineWidth),this._uPointSize&&n.uniform1i(this._uPointSize,r.pointSize),this._lastMaterialId=r.id}if(n.uniformMatrix4fv(this._uModelMatrix,n.FALSE,t.worldMatrix),i.combineGeometry){var o=t.vertexBufs;o.id!==this._lastVertexBufsId&&(o.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(o.positionsBuf,o.compressGeometry?n.UNSIGNED_SHORT:n.FLOAT),e.bindArray++),this._lastVertexBufsId=o.id)}this._uClippable&&n.uniform1i(this._uClippable,t._state.clippable),n.uniform3fv(this._uOffset,t._state.offset),i.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&n.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,i.positionsDecodeMatrix),i.combineGeometry?i.indicesBufCombined&&(i.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?n.UNSIGNED_SHORT:n.FLOAT),e.bindArray++),i.indicesBuf&&(i.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=i.id),i.combineGeometry?i.indicesBufCombined&&(n.drawElements(i.primitive,i.indicesBufCombined.numItems,i.indicesBufCombined.itemType,0),e.drawElements++):i.indicesBuf?(n.drawElements(i.primitive,i.indicesBuf.numItems,i.indicesBuf.itemType,0),e.drawElements++):i.positions&&(n.drawArrays(n.TRIANGLES,0,i.positions.numItems),e.drawArrays++)},Ui.prototype._allocate=function(e){var t=e.scene,n=t.canvas.gl;if(this._program=new Dt(n,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)this.errors=this._program.errors;else{var r=this._program;this._uPositionsDecodeMatrix=r.getLocation("positionsDecodeMatrix"),this._uModelMatrix=r.getLocation("modelMatrix"),this._uShadowViewMatrix=r.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=r.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(var i=0,a=t._sectionPlanesState.sectionPlanes.length;i0)for(var i,a,s,o=0,l=this._uSectionPlanes.length;o1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i)).originalSystemId=i.originalSystemId||r.id,r.renderFlags=new ki,r._state=new zt({visible:!0,culled:!1,pickable:null,clippable:null,collidable:null,occluder:!1!==i.occluder,castsShadow:null,receivesShadow:null,xrayed:!1,highlighted:!1,selected:!1,edges:!1,stationary:!!i.stationary,background:!!i.background,billboard:r._checkBillboard(i.billboard),layer:null,colorize:null,pickID:r.scene._renderer.getPickID(w(r)),drawHash:"",pickHash:"",offset:$.vec3(),origin:null,originHash:null}),r._drawRenderer=null,r._shadowRenderer=null,r._emphasisFillRenderer=null,r._emphasisEdgesRenderer=null,r._pickMeshRenderer=null,r._pickTriangleRenderer=null,r._occlusionRenderer=null,r._geometry=i.geometry?r._checkComponent2(["ReadableGeometry","VBOGeometry"],i.geometry):r.scene.geometry,r._material=i.material?r._checkComponent2(["PhongMaterial","MetallicMaterial","SpecularMaterial","LambertMaterial"],i.material):r.scene.material,r._xrayMaterial=i.xrayMaterial?r._checkComponent("EmphasisMaterial",i.xrayMaterial):r.scene.xrayMaterial,r._highlightMaterial=i.highlightMaterial?r._checkComponent("EmphasisMaterial",i.highlightMaterial):r.scene.highlightMaterial,r._selectedMaterial=i.selectedMaterial?r._checkComponent("EmphasisMaterial",i.selectedMaterial):r.scene.selectedMaterial,r._edgeMaterial=i.edgeMaterial?r._checkComponent("EdgeMaterial",i.edgeMaterial):r.scene.edgeMaterial,r._parentNode=null,r._aabb=null,r._aabbDirty=!0,r._numTriangles=r._geometry?r._geometry.numTriangles:0,r.scene._aabbDirty=!0,r._scale=$.vec3(),r._quaternion=$.identityQuaternion(),r._rotation=$.vec3(),r._position=$.vec3(),r._worldMatrix=$.identityMat4(),r._worldNormalMatrix=$.identityMat4(),r._localMatrixDirty=!0,r._worldMatrixDirty=!0,r._worldNormalMatrixDirty=!0;var a=i.origin||i.rtcCenter;if(a&&(r._state.origin=$.vec3(a),r._state.originHash=a.join()),i.matrix?r.matrix=i.matrix:(r.scale=i.scale,r.position=i.position,i.quaternion||(r.rotation=i.rotation)),r._isObject=i.isObject,r._isObject&&r.scene._registerObject(w(r)),r._isModel=i.isModel,r._isModel&&r.scene._registerModel(w(r)),r.visible=i.visible,r.culled=i.culled,r.pickable=i.pickable,r.clippable=i.clippable,r.collidable=i.collidable,r.castsShadow=i.castsShadow,r.receivesShadow=i.receivesShadow,r.xrayed=i.xrayed,r.highlighted=i.highlighted,r.selected=i.selected,r.edges=i.edges,r.layer=i.layer,r.colorize=i.colorize,r.opacity=i.opacity,r.offset=i.offset,i.parentId){var s=r.scene.components[i.parentId];s?s.isNode?s.addChild(w(r)):r.error("Parent is not a Node: '"+i.parentId+"'"):r.error("Parent not found: '"+i.parentId+"'"),r._parentNode=s}else i.parent&&(i.parent.isNode||r.error("Parent is not a Node"),i.parent.addChild(w(r)),r._parentNode=i.parent);return r.compile(),r}return P(n,[{key:"type",get:function(){return"Mesh"}},{key:"isMesh",get:function(){return!0}},{key:"parent",get:function(){return this._parentNode}},{key:"geometry",get:function(){return this._geometry}},{key:"material",get:function(){return this._material}},{key:"position",get:function(){return this._position},set:function(e){this._position.set(e||[0,0,0]),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"rotation",get:function(){return this._rotation},set:function(e){this._rotation.set(e||[0,0,0]),$.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"quaternion",get:function(){return this._quaternion},set:function(e){this._quaternion.set(e||[0,0,0,1]),$.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"scale",get:function(){return this._scale},set:function(e){this._scale.set(e||[1,1,1]),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"matrix",get:function(){return this._localMatrixDirty&&(this.__localMatrix||(this.__localMatrix=$.identityMat4()),$.composeMat4(this._position,this._quaternion,this._scale,this.__localMatrix),this._localMatrixDirty=!1),this.__localMatrix},set:function(e){this.__localMatrix||(this.__localMatrix=$.identityMat4()),this.__localMatrix.set(e||Ji),$.decomposeMat4(this.__localMatrix,this._position,this._quaternion,this._scale),this._localMatrixDirty=!1,this._setWorldMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"worldMatrix",get:function(){return this._worldMatrixDirty&&this._buildWorldMatrix(),this._worldMatrix}},{key:"worldNormalMatrix",get:function(){return this._worldNormalMatrixDirty&&this._buildWorldNormalMatrix(),this._worldNormalMatrix}},{key:"isEntity",get:function(){return!0}},{key:"isModel",get:function(){return this._isModel}},{key:"isObject",get:function(){return this._isObject}},{key:"aabb",get:function(){return this._aabbDirty&&this._updateAABB(),this._aabb}},{key:"origin",get:function(){return this._state.origin},set:function(e){e?(this._state.origin||(this._state.origin=$.vec3()),this._state.origin.set(e),this._state.originHash=e.join(),this._setAABBDirty(),this.scene._aabbDirty=!0):this._state.origin&&(this._state.origin=null,this._state.originHash=null,this._setAABBDirty(),this.scene._aabbDirty=!0)}},{key:"rtcCenter",get:function(){return this.origin},set:function(e){this.origin=e}},{key:"numTriangles",get:function(){return this._numTriangles}},{key:"visible",get:function(){return this._state.visible},set:function(e){e=!1!==e,this._state.visible=e,this._isObject&&this.scene._objectVisibilityUpdated(this,e),this.glRedraw()}},{key:"xrayed",get:function(){return this._state.xrayed},set:function(e){e=!!e,this._state.xrayed!==e&&(this._state.xrayed=e,this._isObject&&this.scene._objectXRayedUpdated(this,e),this.glRedraw())}},{key:"highlighted",get:function(){return this._state.highlighted},set:function(e){(e=!!e)!==this._state.highlighted&&(this._state.highlighted=e,this._isObject&&this.scene._objectHighlightedUpdated(this,e),this.glRedraw())}},{key:"selected",get:function(){return this._state.selected},set:function(e){(e=!!e)!==this._state.selected&&(this._state.selected=e,this._isObject&&this.scene._objectSelectedUpdated(this,e),this.glRedraw())}},{key:"edges",get:function(){return this._state.edges},set:function(e){(e=!!e)!==this._state.edges&&(this._state.edges=e,this.glRedraw())}},{key:"culled",get:function(){return this._state.culled},set:function(e){this._state.culled=!!e,this.glRedraw()}},{key:"clippable",get:function(){return this._state.clippable},set:function(e){e=!1!==e,this._state.clippable!==e&&(this._state.clippable=e,this.glRedraw())}},{key:"collidable",get:function(){return this._state.collidable},set:function(e){(e=!1!==e)!==this._state.collidable&&(this._state.collidable=e,this._setAABBDirty(),this.scene._aabbDirty=!0)}},{key:"pickable",get:function(){return this._state.pickable},set:function(e){e=!1!==e,this._state.pickable!==e&&(this._state.pickable=e)}},{key:"castsShadow",get:function(){return this._state.castsShadow},set:function(e){(e=!1!==e)!==this._state.castsShadow&&(this._state.castsShadow=e,this.glRedraw())}},{key:"receivesShadow",get:function(){return this._state.receivesShadow},set:function(e){(e=!1!==e)!==this._state.receivesShadow&&(this._state.receivesShadow=e,this._state.hash=e?"/mod/rs;":"/mod;",this.fire("dirty",this))}},{key:"saoEnabled",get:function(){return!1}},{key:"colorize",get:function(){return this._state.colorize},set:function(e){var t=this._state.colorize;t||((t=this._state.colorize=new Float32Array(4))[3]=1),e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1);var n=!!e;this.scene._objectColorizeUpdated(this,n),this.glRedraw()}},{key:"opacity",get:function(){return this._state.colorize[3]},set:function(e){var t=this._state.colorize;t||((t=this._state.colorize=new Float32Array(4))[0]=1,t[1]=1,t[2]=1);var n=null!=e;t[3]=n?e:1,this.scene._objectOpacityUpdated(this,n),this.glRedraw()}},{key:"transparent",get:function(){return 2===this._material.alphaMode||this._state.colorize[3]<1}},{key:"layer",get:function(){return this._state.layer},set:function(e){e=e||0,(e=Math.round(e))!==this._state.layer&&(this._state.layer=e,this._renderer.needStateSort())}},{key:"stationary",get:function(){return this._state.stationary}},{key:"billboard",get:function(){return this._state.billboard}},{key:"offset",get:function(){return this._state.offset},set:function(e){this._state.offset.set(e||[0,0,0]),this._setAABBDirty(),this.glRedraw()}},{key:"isDrawable",get:function(){return!0}},{key:"isStateSortable",get:function(){return!0}},{key:"xrayMaterial",get:function(){return this._xrayMaterial}},{key:"highlightMaterial",get:function(){return this._highlightMaterial}},{key:"selectedMaterial",get:function(){return this._selectedMaterial}},{key:"edgeMaterial",get:function(){return this._edgeMaterial}},{key:"_checkBillboard",value:function(e){return"spherical"!==(e=e||"none")&&"cylindrical"!==e&&"none"!==e&&(this.error("Unsupported value for 'billboard': "+e+" - accepted values are 'spherical', 'cylindrical' and 'none' - defaulting to 'none'."),e="none"),e}},{key:"compile",value:function(){var e=this._makeDrawHash();this._state.drawHash!==e&&(this._state.drawHash=e,this._putDrawRenderers(),this._drawRenderer=di.get(this),this._emphasisFillRenderer=mi.get(this),this._emphasisEdgesRenderer=bi.get(this));var t=this._makePickHash();if(this._state.pickHash!==t&&(this._state.pickHash=t,this._putPickRenderers(),this._pickMeshRenderer=_i.get(this)),this._state.occluder){var n=this._makeOcclusionHash();this._state.occlusionHash!==n&&(this._state.occlusionHash=n,this._putOcclusionRenderer(),this._occlusionRenderer=Mi.get(this))}}},{key:"_setLocalMatrixDirty",value:function(){this._localMatrixDirty=!0,this._setWorldMatrixDirty()}},{key:"_setWorldMatrixDirty",value:function(){this._worldMatrixDirty=!0,this._worldNormalMatrixDirty=!0}},{key:"_buildWorldMatrix",value:function(){var e=this.matrix;if(this._parentNode)$.mulMat4(this._parentNode.worldMatrix,e,this._worldMatrix);else for(var t=0,n=e.length;t0)for(var n=0;n-1){var x=B.geometry._state,M=B.scene,F=M.camera,H=M.canvas;if("triangles"===x.primitiveName){N.primitive="triangle";var U,G,k,j=L,V=x.indices,Q=x.positions;if(V){var W=V[j+0],z=V[j+1],K=V[j+2];a[0]=W,a[1]=z,a[2]=K,N.indices=a,U=3*W,G=3*z,k=3*K}else k=(G=(U=3*j)+3)+3;if(n[0]=Q[U+0],n[1]=Q[U+1],n[2]=Q[U+2],r[0]=Q[G+0],r[1]=Q[G+1],r[2]=Q[G+2],i[0]=Q[k+0],i[1]=Q[k+1],i[2]=Q[k+2],x.compressGeometry){var Y=x.positionsDecodeMatrix;Y&&(Pn.decompressPosition(n,Y,n),Pn.decompressPosition(r,Y,r),Pn.decompressPosition(i,Y,i))}N.canvasPos?$.canvasPosToLocalRay(H.canvas,B.origin?Oe(O,B.origin):O,S,B.worldMatrix,N.canvasPos,e,t):N.origin&&N.direction&&$.worldRayToLocalRay(B.worldMatrix,N.origin,N.direction,e,t),$.normalizeVec3(t),$.rayPlaneIntersect(e,t,n,r,i,s),N.localPos=s,N.position=s,h[0]=s[0],h[1]=s[1],h[2]=s[2],h[3]=1,$.transformVec4(B.worldMatrix,h,I),o[0]=I[0],o[1]=I[1],o[2]=I[2],N.canvasPos&&B.origin&&(o[0]+=B.origin[0],o[1]+=B.origin[1],o[2]+=B.origin[2]),N.worldPos=o,$.transformVec4(F.matrix,I,y),l[0]=y[0],l[1]=y[1],l[2]=y[2],N.viewPos=l,$.cartesianToBarycentric(s,n,r,i,u),N.bary=u;var X=x.normals;if(X){if(x.compressGeometry){var q=3*W,J=3*z,Z=3*K;Pn.decompressNormal(X.subarray(q,q+2),c),Pn.decompressNormal(X.subarray(J,J+2),f),Pn.decompressNormal(X.subarray(Z,Z+2),p)}else c[0]=X[U],c[1]=X[U+1],c[2]=X[U+2],f[0]=X[G],f[1]=X[G+1],f[2]=X[G+2],p[0]=X[k],p[1]=X[k+1],p[2]=X[k+2];var ee=$.addVec3($.addVec3($.mulVec3Scalar(c,u[0],m),$.mulVec3Scalar(f,u[1],w),g),$.mulVec3Scalar(p,u[2],E),T);N.worldNormal=$.normalizeVec3($.transformVec3(B.worldNormalMatrix,ee,b))}var te=x.uv;if(te){if(A[0]=te[2*W],A[1]=te[2*W+1],d[0]=te[2*z],d[1]=te[2*z+1],v[0]=te[2*K],v[1]=te[2*K+1],x.compressGeometry){var ne=x.uvDecodeMatrix;ne&&(Pn.decompressUV(A,ne,A),Pn.decompressUV(d,ne,d),Pn.decompressUV(v,ne,v))}N.uv=$.addVec3($.addVec3($.mulVec2Scalar(A,u[0],D),$.mulVec2Scalar(d,u[1],P),C),$.mulVec2Scalar(v,u[2],_),R)}}}}}();function ea(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);var n=e.radiusBottom||1;n<0&&(console.error("negative radiusBottom not allowed - will invert"),n*=-1);var r=e.height||1;r<0&&(console.error("negative height not allowed - will invert"),r*=-1);var i=e.radialSegments||32;i<0&&(console.error("negative radialSegments not allowed - will invert"),i*=-1),i<3&&(i=3);var a=e.heightSegments||1;a<0&&(console.error("negative heightSegments not allowed - will invert"),a*=-1),a<1&&(a=1);var s,o,l,u,c,f,p,A,d,v,h,I=!!e.openEnded,y=e.center,m=y?y[0]:0,w=y?y[1]:0,g=y?y[2]:0,E=r/2,T=r/a,b=2*Math.PI/i,D=1/i,P=(t-n)/a,C=[],_=[],R=[],B=[],O=(90-180*Math.atan(r/(n-t))/Math.PI)/90;for(s=0;s<=a;s++)for(c=t-s*P,f=E-s*T,o=0;o<=i;o++)l=Math.sin(o*b),u=Math.cos(o*b),_.push(c*l),_.push(O),_.push(c*u),R.push(o*D),R.push(1*s/a),C.push(c*l+m),C.push(f+w),C.push(c*u+g);for(s=0;s0){for(d=C.length/3,_.push(0),_.push(1),_.push(0),R.push(.5),R.push(.5),C.push(0+m),C.push(E+w),C.push(0+g),o=0;o<=i;o++)l=Math.sin(o*b),u=Math.cos(o*b),v=.5*Math.sin(o*b)+.5,h=.5*Math.cos(o*b)+.5,_.push(t*l),_.push(1),_.push(t*u),R.push(v),R.push(h),C.push(t*l+m),C.push(E+w),C.push(t*u+g);for(o=0;o0){for(d=C.length/3,_.push(0),_.push(-1),_.push(0),R.push(.5),R.push(.5),C.push(0+m),C.push(0-E+w),C.push(0+g),o=0;o<=i;o++)l=Math.sin(o*b),u=Math.cos(o*b),v=.5*Math.sin(o*b)+.5,h=.5*Math.cos(o*b)+.5,_.push(n*l),_.push(-1),_.push(n*u),R.push(v),R.push(h),C.push(n*l+m),C.push(0-E+w),C.push(n*u+g);for(o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.lod||1,n=e.center?e.center[0]:0,r=e.center?e.center[1]:0,i=e.center?e.center[2]:0,a=e.radius||1;a<0&&(console.error("negative radius not allowed - will invert"),a*=-1);var s=e.heightSegments||18;s<0&&(console.error("negative heightSegments not allowed - will invert"),s*=-1),(s=Math.floor(t*s))<18&&(s=18);var o=e.widthSegments||18;o<0&&(console.error("negative widthSegments not allowed - will invert"),o*=-1),(o=Math.floor(t*o))<18&&(o=18);var l,u,c,f,p,A,d,v,h,I,y,m,w,g,E=[],T=[],b=[],D=[];for(l=0;l<=s;l++)for(c=l*Math.PI/s,f=Math.sin(c),p=Math.cos(c),u=0;u<=o;u++)A=2*u*Math.PI/o,d=Math.sin(A),v=Math.cos(A)*f,h=p,I=d*f,y=1-u/o,m=l/s,T.push(v),T.push(h),T.push(I),b.push(y),b.push(m),E.push(n+a*v),E.push(r+a*h),E.push(i+a*I);for(l=0;l":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function ra(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.origin||[0,0,0],n=t[0],r=t[1],i=t[2],a=e.size||1,s=[],o=[],l=e.text;le.isNumeric(l)&&(l=""+l);for(var u,c,f,p,A,d,v,h,I,y=(l||"").split("\n"),m=0,w=0,g=.04,E=0;E1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({active:!0,pos:$.vec3(),dir:$.vec3(),dist:0}),r.active=i.active,r.pos=i.pos,r.dir=i.dir,r.scene._sectionPlaneCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"SectionPlane"}},{key:"active",get:function(){return this._state.active},set:function(e){this._state.active=!1!==e,this.glRedraw(),this.fire("active",this._state.active)}},{key:"pos",get:function(){return this._state.pos},set:function(e){this._state.pos.set(e||[0,0,0]),this._state.dist=-$.dotVec3(this._state.pos,this._state.dir),this.fire("pos",this._state.pos),this.scene.fire("sectionPlaneUpdated",this)}},{key:"dir",get:function(){return this._state.dir},set:function(e){this._state.dir.set(e||[0,0,-1]),this._state.dist=-$.dotVec3(this._state.pos,this._state.dir),this.glRedraw(),this.fire("dir",this._state.dir),this.scene.fire("sectionPlaneUpdated",this)}},{key:"dist",get:function(){return this._state.dist}},{key:"flipDir",value:function(){var e=this._state.dir;e[0]*=-1,e[1]*=-1,e[2]*=-1,this._state.dist=-$.dotVec3(this._state.pos,this._state.dir),this.fire("dir",this._state.dir),this.glRedraw()}},{key:"destroy",value:function(){this._state.destroy(),this.scene._sectionPlaneDestroyed(this),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),sa=$.vec4(4),oa=$.vec4(),la=$.vec4(),ua=$.vec3([1,0,0]),ca=$.vec3([0,1,0]),fa=$.vec3([0,0,1]),pa=$.vec3(3),Aa=$.vec3(3),da=$.identityMat4(),va=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e,i))._parentNode=null,r._children=[],r._aabb=null,r._aabbDirty=!0,r.scene._aabbDirty=!0,r._numTriangles=0,r._scale=$.vec3(),r._quaternion=$.identityQuaternion(),r._rotation=$.vec3(),r._position=$.vec3(),r._offset=$.vec3(),r._localMatrix=$.identityMat4(),r._worldMatrix=$.identityMat4(),r._localMatrixDirty=!0,r._worldMatrixDirty=!0,i.matrix?r.matrix=i.matrix:(r.scale=i.scale,r.position=i.position,i.quaternion||(r.rotation=i.rotation)),r._isModel=i.isModel,r._isModel&&r.scene._registerModel(w(r)),r._isObject=i.isObject,r._isObject&&r.scene._registerObject(w(r)),r.origin=i.origin,r.visible=i.visible,r.culled=i.culled,r.pickable=i.pickable,r.clippable=i.clippable,r.collidable=i.collidable,r.castsShadow=i.castsShadow,r.receivesShadow=i.receivesShadow,r.xrayed=i.xrayed,r.highlighted=i.highlighted,r.selected=i.selected,r.edges=i.edges,r.colorize=i.colorize,r.opacity=i.opacity,r.offset=i.offset,i.children)for(var a=i.children,s=0,o=a.length;s1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"LambertMaterial",ambient:$.vec3([1,1,1]),color:$.vec3([1,1,1]),emissive:$.vec3([0,0,0]),alpha:null,alphaMode:0,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:"/lam;"}),r.ambient=i.ambient,r.color=i.color,r.emissive=i.emissive,r.alpha=i.alpha,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,r.backfaces=i.backfaces,r.frontface=i.frontface,r}return P(n,[{key:"type",get:function(){return"LambertMaterial"}},{key:"ambient",get:function(){return this._state.ambient},set:function(e){var t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"color",get:function(){return this._state.color},set:function(e){var t=this._state.color;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.color=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this._state.alphaMode=e<1?2:0,this.glRedraw())}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Ia={opaque:0,mask:1,blend:2},ya=["opaque","mask","blend"],ma=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"MetallicMaterial",baseColor:$.vec4([1,1,1]),emissive:$.vec4([0,0,0]),metallic:null,roughness:null,specularF0:null,alpha:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),r.baseColor=i.baseColor,r.metallic=i.metallic,r.roughness=i.roughness,r.specularF0=i.specularF0,r.emissive=i.emissive,r.alpha=i.alpha,i.baseColorMap&&(r._baseColorMap=r._checkComponent("Texture",i.baseColorMap)),i.metallicMap&&(r._metallicMap=r._checkComponent("Texture",i.metallicMap)),i.roughnessMap&&(r._roughnessMap=r._checkComponent("Texture",i.roughnessMap)),i.metallicRoughnessMap&&(r._metallicRoughnessMap=r._checkComponent("Texture",i.metallicRoughnessMap)),i.emissiveMap&&(r._emissiveMap=r._checkComponent("Texture",i.emissiveMap)),i.occlusionMap&&(r._occlusionMap=r._checkComponent("Texture",i.occlusionMap)),i.alphaMap&&(r._alphaMap=r._checkComponent("Texture",i.alphaMap)),i.normalMap&&(r._normalMap=r._checkComponent("Texture",i.normalMap)),r.alphaMode=i.alphaMode,r.alphaCutoff=i.alphaCutoff,r.backfaces=i.backfaces,r.frontface=i.frontface,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,r._makeHash(),r}return P(n,[{key:"type",get:function(){return"MetallicMaterial"}},{key:"_makeHash",value:function(){var e=this._state,t=["/met"];this._baseColorMap&&(t.push("/bm"),this._baseColorMap._state.hasMatrix&&t.push("/mat"),t.push("/"+this._baseColorMap._state.encoding)),this._metallicMap&&(t.push("/mm"),this._metallicMap._state.hasMatrix&&t.push("/mat")),this._roughnessMap&&(t.push("/rm"),this._roughnessMap._state.hasMatrix&&t.push("/mat")),this._metallicRoughnessMap&&(t.push("/mrm"),this._metallicRoughnessMap._state.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap._state.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap._state.hasMatrix&&t.push("/mat")),this._alphaMap&&(t.push("/am"),this._alphaMap._state.hasMatrix&&t.push("/mat")),this._normalMap&&(t.push("/nm"),this._normalMap._state.hasMatrix&&t.push("/mat")),t.push(";"),e.hash=t.join("")}},{key:"baseColor",get:function(){return this._state.baseColor},set:function(e){var t=this._state.baseColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.baseColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"baseColorMap",get:function(){return this._baseColorMap}},{key:"metallic",get:function(){return this._state.metallic},set:function(e){e=null!=e?e:1,this._state.metallic!==e&&(this._state.metallic=e,this.glRedraw())}},{key:"metallicMap",get:function(){return this._attached.metallicMap}},{key:"roughness",get:function(){return this._state.roughness},set:function(e){e=null!=e?e:1,this._state.roughness!==e&&(this._state.roughness=e,this.glRedraw())}},{key:"roughnessMap",get:function(){return this._attached.roughnessMap}},{key:"metallicRoughnessMap",get:function(){return this._attached.metallicRoughnessMap}},{key:"specularF0",get:function(){return this._state.specularF0},set:function(e){e=null!=e?e:0,this._state.specularF0!==e&&(this._state.specularF0=e,this.glRedraw())}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"emissiveMap",get:function(){return this._attached.emissiveMap}},{key:"occlusionMap",get:function(){return this._attached.occlusionMap}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}},{key:"alphaMap",get:function(){return this._attached.alphaMap}},{key:"normalMap",get:function(){return this._attached.normalMap}},{key:"alphaMode",get:function(){return ya[this._state.alphaMode]},set:function(e){var t=Ia[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}},{key:"alphaCutoff",get:function(){return this._state.alphaCutoff},set:function(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),wa={opaque:0,mask:1,blend:2},ga=["opaque","mask","blend"],Ea=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"SpecularMaterial",diffuse:$.vec3([1,1,1]),emissive:$.vec3([0,0,0]),specular:$.vec3([1,1,1]),glossiness:null,specularF0:null,alpha:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),r.diffuse=i.diffuse,r.specular=i.specular,r.glossiness=i.glossiness,r.specularF0=i.specularF0,r.emissive=i.emissive,r.alpha=i.alpha,i.diffuseMap&&(r._diffuseMap=r._checkComponent("Texture",i.diffuseMap)),i.emissiveMap&&(r._emissiveMap=r._checkComponent("Texture",i.emissiveMap)),i.specularMap&&(r._specularMap=r._checkComponent("Texture",i.specularMap)),i.glossinessMap&&(r._glossinessMap=r._checkComponent("Texture",i.glossinessMap)),i.specularGlossinessMap&&(r._specularGlossinessMap=r._checkComponent("Texture",i.specularGlossinessMap)),i.occlusionMap&&(r._occlusionMap=r._checkComponent("Texture",i.occlusionMap)),i.alphaMap&&(r._alphaMap=r._checkComponent("Texture",i.alphaMap)),i.normalMap&&(r._normalMap=r._checkComponent("Texture",i.normalMap)),r.alphaMode=i.alphaMode,r.alphaCutoff=i.alphaCutoff,r.backfaces=i.backfaces,r.frontface=i.frontface,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,r._makeHash(),r}return P(n,[{key:"type",get:function(){return"SpecularMaterial"}},{key:"_makeHash",value:function(){var e=this._state,t=["/spe"];this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat")),this._glossinessMap&&(t.push("/gm"),this._glossinessMap.hasMatrix&&t.push("/mat")),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._specularGlossinessMap&&(t.push("/sgm"),this._specularGlossinessMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),t.push(";"),e.hash=t.join("")}},{key:"diffuse",get:function(){return this._state.diffuse},set:function(e){var t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"diffuseMap",get:function(){return this._diffuseMap}},{key:"specular",get:function(){return this._state.specular},set:function(e){var t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"specularMap",get:function(){return this._specularMap}},{key:"specularGlossinessMap",get:function(){return this._specularGlossinessMap}},{key:"glossiness",get:function(){return this._state.glossiness},set:function(e){e=null!=e?e:1,this._state.glossiness!==e&&(this._state.glossiness=e,this.glRedraw())}},{key:"glossinessMap",get:function(){return this._glossinessMap}},{key:"specularF0",get:function(){return this._state.specularF0},set:function(e){e=null!=e?e:0,this._state.specularF0!==e&&(this._state.specularF0=e,this.glRedraw())}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"emissiveMap",get:function(){return this._emissiveMap}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}},{key:"alphaMap",get:function(){return this._alphaMap}},{key:"normalMap",get:function(){return this._normalMap}},{key:"occlusionMap",get:function(){return this._occlusionMap}},{key:"alphaMode",get:function(){return ga[this._state.alphaMode]},set:function(e){var t=wa[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}},{key:"alphaCutoff",get:function(){return this._state.alphaCutoff},set:function(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}();function Ta(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=t;if(1009===i)return e.UNSIGNED_BYTE;if(1017===i)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===i)return e.UNSIGNED_SHORT_5_5_5_1;if(1010===i)return e.BYTE;if(1011===i)return e.SHORT;if(1012===i)return e.UNSIGNED_SHORT;if(1013===i)return e.INT;if(1014===i)return e.UNSIGNED_INT;if(1015===i)return e.FLOAT;if(1016===i)return e.HALF_FLOAT;if(1021===i)return e.ALPHA;if(1023===i)return e.RGBA;if(1024===i)return e.LUMINANCE;if(1025===i)return e.LUMINANCE_ALPHA;if(1026===i)return e.DEPTH_COMPONENT;if(1027===i)return e.DEPTH_STENCIL;if(1028===i)return e.RED;if(1022===i)return e.RGBA;if(1029===i)return e.RED_INTEGER;if(1030===i)return e.RG;if(1031===i)return e.RG_INTEGER;if(1033===i)return e.RGBA_INTEGER;if(33776===i||33777===i||33778===i||33779===i)if(3001===r){var a=jt(e,"WEBGL_compressed_texture_s3tc_srgb");if(null===a)return null;if(33776===i)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===i)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===i)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(33779===i)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(n=jt(e,"WEBGL_compressed_texture_s3tc")))return null;if(33776===i)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===i)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===i)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===i)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===i||35841===i||35842===i||35843===i){var s=jt(e,"WEBGL_compressed_texture_pvrtc");if(null===s)return null;if(35840===i)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===i)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===i)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===i)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===i){var o=jt(e,"WEBGL_compressed_texture_etc1");return null!==o?o.COMPRESSED_RGB_ETC1_WEBGL:null}if(37492===i||37496===i){var l=jt(e,"WEBGL_compressed_texture_etc");if(null===l)return null;if(37492===i)return 3001===r?l.COMPRESSED_SRGB8_ETC2:l.COMPRESSED_RGB8_ETC2;if(37496===i)return 3001===r?l.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:l.COMPRESSED_RGBA8_ETC2_EAC}if(37808===i||37809===i||37810===i||37811===i||37812===i||37813===i||37814===i||37815===i||37816===i||37817===i||37818===i||37819===i||37820===i||37821===i){var u=jt(e,"WEBGL_compressed_texture_astc");if(null===u)return null;if(37808===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:u.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:u.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:u.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:u.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:u.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:u.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:u.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:u.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:u.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:u.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:u.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:u.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:u.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:u.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===i){var c=jt(e,"EXT_texture_compression_bptc");if(null===c)return null;if(36492===i)return 3001===r?c.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:c.COMPRESSED_RGBA_BPTC_UNORM_EXT}return 1020===i?e.UNSIGNED_INT_24_8:1e3===i?e.REPEAT:1001===i?e.CLAMP_TO_EDGE:1004===i||1005===i?e.NEAREST_MIPMAP_LINEAR:1007===i?e.LINEAR_MIPMAP_NEAREST:1008===i?e.LINEAR_MIPMAP_LINEAR:1003===i?e.NEAREST:1006===i?e.LINEAR:null}var ba=new Uint8Array([0,0,0,1]),Da=function(){function e(t){var n=t.gl,r=t.target,i=t.format,a=t.type,s=t.wrapS,o=t.wrapT,l=t.wrapR,u=t.encoding,c=t.preloadColor,f=t.premultiplyAlpha,p=t.flipY;b(this,e),this.gl=n,this.target=r||n.TEXTURE_2D,this.format=i||1023,this.type=a||1009,this.internalFormat=null,this.premultiplyAlpha=!!f,this.flipY=!!p,this.unpackAlignment=4,this.wrapS=s||1e3,this.wrapT=o||1e3,this.wrapR=l||1e3,this.encoding=u||3001,this.texture=n.createTexture(),c&&this.setPreloadColor(c),this.allocated=!0}return P(e,[{key:"setPreloadColor",value:function(e){e?(ba[0]=Math.floor(255*e[0]),ba[1]=Math.floor(255*e[1]),ba[2]=Math.floor(255*e[2]),ba[3]=Math.floor(255*(void 0!==e[3]?e[3]:1))):(ba[0]=0,ba[1]=0,ba[2]=0,ba[3]=255);var t=this.gl;if(t.bindTexture(this.target,this.texture),this.target===t.TEXTURE_CUBE_MAP)for(var n=[t.TEXTURE_CUBE_MAP_POSITIVE_X,t.TEXTURE_CUBE_MAP_NEGATIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_Y,t.TEXTURE_CUBE_MAP_NEGATIVE_Y,t.TEXTURE_CUBE_MAP_POSITIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_Z],r=0,i=n.length;r1&&void 0!==arguments[1]?arguments[1]:{},n=this.gl;void 0!==t.format&&(this.format=t.format),void 0!==t.internalFormat&&(this.internalFormat=t.internalFormat),void 0!==t.encoding&&(this.encoding=t.encoding),void 0!==t.type&&(this.type=t.type),void 0!==t.flipY&&(this.flipY=t.flipY),void 0!==t.premultiplyAlpha&&(this.premultiplyAlpha=t.premultiplyAlpha),void 0!==t.unpackAlignment&&(this.unpackAlignment=t.unpackAlignment),void 0!==t.minFilter&&(this.minFilter=t.minFilter),void 0!==t.magFilter&&(this.magFilter=t.magFilter),void 0!==t.wrapS&&(this.wrapS=t.wrapS),void 0!==t.wrapT&&(this.wrapT=t.wrapT),void 0!==t.wrapR&&(this.wrapR=t.wrapR);var r=!1;n.bindTexture(this.target,this.texture);var i=n.getParameter(n.UNPACK_FLIP_Y_WEBGL);n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,this.flipY);var a=n.getParameter(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL);n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var s=n.getParameter(n.UNPACK_ALIGNMENT);n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment);var o=n.getParameter(n.UNPACK_COLORSPACE_CONVERSION_WEBGL);n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE);var l=Ta(n,this.minFilter);n.texParameteri(this.target,n.TEXTURE_MIN_FILTER,l),l!==n.NEAREST_MIPMAP_NEAREST&&l!==n.LINEAR_MIPMAP_NEAREST&&l!==n.NEAREST_MIPMAP_LINEAR&&l!==n.LINEAR_MIPMAP_LINEAR||(r=!0);var u=Ta(n,this.magFilter);u&&n.texParameteri(this.target,n.TEXTURE_MAG_FILTER,u);var c=Ta(n,this.wrapS);c&&n.texParameteri(this.target,n.TEXTURE_WRAP_S,c);var f=Ta(n,this.wrapT);f&&n.texParameteri(this.target,n.TEXTURE_WRAP_T,f);var p=Ta(n,this.format,this.encoding),A=Ta(n,this.type),d=Pa(n,this.internalFormat,p,A,this.encoding,!1);if(this.target===n.TEXTURE_CUBE_MAP){if(le.isArray(e))for(var v=e,h=[n.TEXTURE_CUBE_MAP_POSITIVE_X,n.TEXTURE_CUBE_MAP_NEGATIVE_X,n.TEXTURE_CUBE_MAP_POSITIVE_Y,n.TEXTURE_CUBE_MAP_NEGATIVE_Y,n.TEXTURE_CUBE_MAP_POSITIVE_Z,n.TEXTURE_CUBE_MAP_NEGATIVE_Z],I=0,y=h.length;I1;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,this.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,this.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,i.NONE);var o=Ta(i,this.wrapS);o&&i.texParameteri(this.target,i.TEXTURE_WRAP_S,o);var l=Ta(i,this.wrapT);if(l&&i.texParameteri(this.target,i.TEXTURE_WRAP_T,l),this.type===i.TEXTURE_3D||this.type===i.TEXTURE_2D_ARRAY){var u=Ta(i,this.wrapR);u&&i.texParameteri(this.target,i.TEXTURE_WRAP_R,u),i.texParameteri(this.type,i.TEXTURE_WRAP_R,u)}s?(i.texParameteri(this.target,i.TEXTURE_MIN_FILTER,Ca(i,this.minFilter)),i.texParameteri(this.target,i.TEXTURE_MAG_FILTER,Ca(i,this.magFilter))):(i.texParameteri(this.target,i.TEXTURE_MIN_FILTER,Ta(i,this.minFilter)),i.texParameteri(this.target,i.TEXTURE_MAG_FILTER,Ta(i,this.magFilter)));var c=Ta(i,this.format,this.encoding),f=Ta(i,this.type),p=Pa(i,this.internalFormat,c,f,this.encoding,!1);i.texStorage2D(i.TEXTURE_2D,a,p,t[0].width,t[0].height);for(var A=0,d=t.length;A5&&void 0!==arguments[5]&&arguments[5];if(null!==t){if(void 0!==e[t])return e[t];console.warn("Attempt to use non-existing WebGL internal format '"+t+"'")}var s=n;return n===e.RED&&(r===e.FLOAT&&(s=e.R32F),r===e.HALF_FLOAT&&(s=e.R16F),r===e.UNSIGNED_BYTE&&(s=e.R8)),n===e.RG&&(r===e.FLOAT&&(s=e.RG32F),r===e.HALF_FLOAT&&(s=e.RG16F),r===e.UNSIGNED_BYTE&&(s=e.RG8)),n===e.RGBA&&(r===e.FLOAT&&(s=e.RGBA32F),r===e.HALF_FLOAT&&(s=e.RGBA16F),r===e.UNSIGNED_BYTE&&(s=3001===i&&!1===a?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)),s!==e.R16F&&s!==e.R32F&&s!==e.RG16F&&s!==e.RG32F&&s!==e.RGBA16F&&s!==e.RGBA32F||jt(e,"EXT_color_buffer_float"),s}function Ca(e,t){return 1003===t||1004===t||1005===t?e.NEAREST:e.LINEAR}function _a(e){if(!Ra(e.width)||!Ra(e.height)){var t=document.createElement("canvas");t.width=Ba(e.width),t.height=Ba(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}function Ra(e){return 0==(e&e-1)}function Ba(e){--e;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1}var Oa=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({texture:new Da({gl:r.scene.canvas.gl}),matrix:$.identityMat4(),hasMatrix:i.translate&&(0!==i.translate[0]||0!==i.translate[1])||!!i.rotate||i.scale&&(0!==i.scale[0]||0!==i.scale[1]),minFilter:r._checkMinFilter(i.minFilter),magFilter:r._checkMagFilter(i.magFilter),wrapS:r._checkWrapS(i.wrapS),wrapT:r._checkWrapT(i.wrapT),flipY:r._checkFlipY(i.flipY),encoding:r._checkEncoding(i.encoding)}),r._src=null,r._image=null,r._translate=$.vec2([0,0]),r._scale=$.vec2([1,1]),r._rotate=$.vec2([0,0]),r._matrixDirty=!1,r.translate=i.translate,r.scale=i.scale,r.rotate=i.rotate,i.src?r.src=i.src:i.image&&(r.image=i.image),re.memory.textures++,r}return P(n,[{key:"type",get:function(){return"Texture"}},{key:"_checkMinFilter",value:function(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}},{key:"_checkMagFilter",value:function(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}},{key:"_checkWrapS",value:function(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}},{key:"_checkWrapT",value:function(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}},{key:"_checkFlipY",value:function(e){return!!e}},{key:"_checkEncoding",value:function(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}},{key:"_webglContextRestored",value:function(){this._state.texture=new Da({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}},{key:"_update",value:function(){var e,t,n=this._state;this._matrixDirty&&(0===this._translate[0]&&0===this._translate[1]||(e=$.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(t=$.scalingMat4v([this._scale[0],this._scale[1],1]),e=e?$.mulMat4(e,t):t),0!==this._rotate&&(t=$.rotationMat4v(.0174532925*this._rotate,[0,0,1]),e=e?$.mulMat4(e,t):t),e&&(n.matrix=e),this._matrixDirty=!1);this.glRedraw()}},{key:"image",get:function(){return this._image},set:function(e){this._image=_a(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}},{key:"src",get:function(){return this._src},set:function(e){this.scene.loading++,this.scene.canvas.spinner.processes++;var t=this,n=new Image;n.onload=function(){n=_a(n),t._state.texture.setImage(n,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},n.src=e,this._src=e,this._image=null}},{key:"translate",get:function(){return this._translate},set:function(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}},{key:"scale",get:function(){return this._scale},set:function(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}},{key:"rotate",get:function(){return this._rotate},set:function(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}},{key:"minFilter",get:function(){return this._state.minFilter}},{key:"magFilter",get:function(){return this._state.magFilter}},{key:"wrapS",get:function(){return this._state.wrapS}},{key:"wrapT",get:function(){return this._state.wrapT}},{key:"flipY",get:function(){return this._state.flipY}},{key:"encoding",get:function(){return this._state.encoding}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),re.memory.textures--}}]),n}(),Sa=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({edgeColor:$.vec3([0,0,0]),centerColor:$.vec3([1,1,1]),edgeBias:0,centerBias:1,power:1}),r.edgeColor=i.edgeColor,r.centerColor=i.centerColor,r.edgeBias=i.edgeBias,r.centerBias=i.centerBias,r.power=i.power,r}return P(n,[{key:"type",get:function(){return"Fresnel"}},{key:"edgeColor",get:function(){return this._state.edgeColor},set:function(e){this._state.edgeColor.set(e||[0,0,0]),this.glRedraw()}},{key:"centerColor",get:function(){return this._state.centerColor},set:function(e){this._state.centerColor.set(e||[1,1,1]),this.glRedraw()}},{key:"edgeBias",get:function(){return this._state.edgeBias},set:function(e){this._state.edgeBias=e||0,this.glRedraw()}},{key:"centerBias",get:function(){return this._state.centerBias},set:function(e){this._state.centerBias=null!=e?e:1,this.glRedraw()}},{key:"power",get:function(){return this._state.power},set:function(e){this._state.power=null!=e?e:1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Na=re.memory,La=$.AABB3(),xa=function(e){h(n,yn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._state=new zt({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),r._numTriangles=0,r._edgeThreshold=i.edgeThreshold||10,r._aabb=null,r._obb=$.OBB3();var a,s=r._state,o=r.scene.canvas.gl;switch(i.primitive=i.primitive||"triangles",i.primitive){case"points":s.primitive=o.POINTS,s.primitiveName=i.primitive;break;case"lines":s.primitive=o.LINES,s.primitiveName=i.primitive;break;case"line-loop":s.primitive=o.LINE_LOOP,s.primitiveName=i.primitive;break;case"line-strip":s.primitive=o.LINE_STRIP,s.primitiveName=i.primitive;break;case"triangles":s.primitive=o.TRIANGLES,s.primitiveName=i.primitive;break;case"triangle-strip":s.primitive=o.TRIANGLE_STRIP,s.primitiveName=i.primitive;break;case"triangle-fan":s.primitive=o.TRIANGLE_FAN,s.primitiveName=i.primitive;break;default:r.error("Unsupported value for 'primitive': '"+i.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=o.TRIANGLES,s.primitiveName=i.primitive}if(!i.positions)return r.error("Config expected: positions"),m(r);if(!i.indices)return r.error("Config expected: indices"),m(r);var l=i.positionsDecodeMatrix;if(l);else{var u=Pn.getPositionsBounds(i.positions),c=Pn.compressPositions(i.positions,u.min,u.max);a=c.quantized,s.positionsDecodeMatrix=c.decodeMatrix,s.positionsBuf=new Pt(o,o.ARRAY_BUFFER,a,a.length,3,o.STATIC_DRAW),Na.positions+=s.positionsBuf.numItems,$.positions3ToAABB3(i.positions,r._aabb),$.positions3ToAABB3(a,La,s.positionsDecodeMatrix),$.AABB3ToOBB3(La,r._obb)}if(i.colors){var f=i.colors.constructor===Float32Array?i.colors:new Float32Array(i.colors);s.colorsBuf=new Pt(o,o.ARRAY_BUFFER,f,f.length,4,o.STATIC_DRAW),Na.colors+=s.colorsBuf.numItems}if(i.uv){var p=Pn.getUVBounds(i.uv),A=Pn.compressUVs(i.uv,p.min,p.max),d=A.quantized;s.uvDecodeMatrix=A.decodeMatrix,s.uvBuf=new Pt(o,o.ARRAY_BUFFER,d,d.length,2,o.STATIC_DRAW),Na.uvs+=s.uvBuf.numItems}if(i.normals){var v=Pn.compressNormals(i.normals),h=s.compressGeometry;s.normalsBuf=new Pt(o,o.ARRAY_BUFFER,v,v.length,3,o.STATIC_DRAW,h),Na.normals+=s.normalsBuf.numItems}var I=i.indices.constructor===Uint32Array||i.indices.constructor===Uint16Array?i.indices:new Uint32Array(i.indices);s.indicesBuf=new Pt(o,o.ELEMENT_ARRAY_BUFFER,I,I.length,1,o.STATIC_DRAW),Na.indices+=s.indicesBuf.numItems;var y=mn(a,I,s.positionsDecodeMatrix,r._edgeThreshold);return r._edgeIndicesBuf=new Pt(o,o.ELEMENT_ARRAY_BUFFER,y,y.length,1,o.STATIC_DRAW),"triangles"===r._state.primitiveName&&(r._numTriangles=i.indices.length/3),r._buildHash(),Na.meshes++,r}return P(n,[{key:"type",get:function(){return"VBOGeometry"}},{key:"isVBOGeometry",get:function(){return!0}},{key:"_buildHash",value:function(){var e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}},{key:"_getEdgeIndices",value:function(){return this._edgeIndicesBuf}},{key:"primitive",get:function(){return this._state.primitiveName}},{key:"aabb",get:function(){return this._aabb}},{key:"obb",get:function(){return this._obb}},{key:"numTriangles",get:function(){return this._numTriangles}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this);var e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),Na.meshes--}}]),n}(),Ma={};function Fa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){t.src||(console.error("load3DSGeometry: Parameter expected: src"),r());var i=e.canvas.spinner;i.processes++,le.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("load3DSGeometry: no data loaded"),i.processes--,r());var a=Ma.parse.from3DS(e).edit.objects[0].mesh,s=a.vertices,o=a.uvt,l=a.indices;i.processes--,n(le.apply(t,{primitive:"triangles",positions:s,normals:null,uv:o,indices:l}))}),(function(e){console.error("load3DSGeometry: "+e),i.processes--,r()}))}))}function Ha(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){t.src||(console.error("loadOBJGeometry: Parameter expected: src"),r());var i=e.canvas.spinner;i.processes++,le.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("loadOBJGeometry: no data loaded"),i.processes--,r());for(var a=Ma.parse.fromOBJ(e),s=Ma.edit.unwrap(a.i_verts,a.c_verts,3),o=Ma.edit.unwrap(a.i_norms,a.c_norms,3),l=Ma.edit.unwrap(a.i_uvt,a.c_uvt,2),u=new Int32Array(a.i_verts.length),c=0;c0?o:null,autoNormals:0===o.length,uv:l,indices:u}))}),(function(e){console.error("loadOBJGeometry: "+e),i.processes--,r()}))}))}function Ua(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var n=e.ySize||1;n<0&&(console.error("negative ySize not allowed - will invert"),n*=-1);var r=e.zSize||1;r<0&&(console.error("negative zSize not allowed - will invert"),r*=-1);var i=e.center,a=i?i[0]:0,s=i?i[1]:0,o=i?i[2]:0,l=-t+a,u=-n+s,c=-r+o,f=t+a,p=n+s,A=r+o;return le.apply(e,{primitive:"lines",positions:[l,u,c,l,u,A,l,p,c,l,p,A,f,u,c,f,u,A,f,p,c,f,p,A],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]})}function Ga(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ua({id:e.id,center:[(e.aabb[0]+e.aabb[3])/2,(e.aabb[1]+e.aabb[4])/2,(e.aabb[2]+e.aabb[5])/2],xSize:Math.abs(e.aabb[3]-e.aabb[0])/2,ySize:Math.abs(e.aabb[4]-e.aabb[1])/2,zSize:Math.abs(e.aabb[5]-e.aabb[2])/2})}function ka(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);var n=e.divisions||1;n<0&&(console.error("negative divisions not allowed - will invert"),n*=-1),n<1&&(n=1);for(var r=(t=t||10)/(n=n||10),i=t/2,a=[],s=[],o=0,l=0,u=-i;l<=n;l++,u+=r)a.push(-i),a.push(0),a.push(u),a.push(i),a.push(0),a.push(u),a.push(u),a.push(0),a.push(-i),a.push(u),a.push(0),a.push(i),s.push(o++),s.push(o++),s.push(o++),s.push(o++);return le.apply(e,{primitive:"lines",positions:a,indices:s})}function ja(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);var r=e.xSegments||1;r<0&&(console.error("negative xSegments not allowed - will invert"),r*=-1),r<1&&(r=1);var i=e.xSegments||1;i<0&&(console.error("negative zSegments not allowed - will invert"),i*=-1),i<1&&(i=1);var a,s,o,l,u,c,f,p=e.center,A=p?p[0]:0,d=p?p[1]:0,v=p?p[2]:0,h=t/2,I=n/2,y=Math.floor(r)||1,m=Math.floor(i)||1,w=y+1,g=m+1,E=t/y,T=n/m,b=new Float32Array(w*g*3),D=new Float32Array(w*g*3),P=new Float32Array(w*g*2),C=0,_=0;for(a=0;a65535?Uint32Array:Uint16Array)(y*m*6);for(a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=e.radius||1;t<0&&(console.error("negative radius not allowed - will invert"),t*=-1),t*=.5;var n=e.tube||.3;n<0&&(console.error("negative tube not allowed - will invert"),n*=-1);var r=e.radialSegments||32;r<0&&(console.error("negative radialSegments not allowed - will invert"),r*=-1),r<4&&(r=4);var i=e.tubeSegments||24;i<0&&(console.error("negative tubeSegments not allowed - will invert"),i*=-1),i<4&&(i=4);var a=e.arc||2*Math.PI;a<0&&(console.warn("negative arc not allowed - will invert"),a*=-1),a>360&&(a=360);var s,o,l,u,c,f,p,A,d,v,h,I,y=e.center,m=y?y[0]:0,w=y?y[1]:0,g=y?y[2]:0,E=[],T=[],b=[],D=[];for(A=0;A<=i;A++)for(p=0;p<=r;p++)s=p/r*a,o=.785398+A/i*Math.PI*2,m=t*Math.cos(s),w=t*Math.sin(s),l=(t+n*Math.cos(o))*Math.cos(s),u=(t+n*Math.cos(o))*Math.sin(s),c=n*Math.sin(o),E.push(l+m),E.push(u+w),E.push(c+g),b.push(1-p/r),b.push(A/i),f=$.normalizeVec3($.subVec3([l,u,c],[m,w,g],[]),[]),T.push(f[0]),T.push(f[1]),T.push(f[2]);for(A=1;A<=i;A++)for(p=1;p<=r;p++)d=(r+1)*A+p-1,v=(r+1)*(A-1)+p-1,h=(r+1)*(A-1)+p,I=(r+1)*A+p,D.push(d),D.push(v),D.push(h),D.push(h),D.push(I),D.push(d);return le.apply(e,{positions:E,normals:T,uv:b,indices:D})}function Qa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.points.length%3!=0)throw"Size of points array for given polyline should be divisible by 3";var t=e.points.length/3;if(t<2)throw"There should be at least 2 points to create a polyline";for(var n=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.curve.getPoints(e.divisions).map((function(e){return u(e)})).flat();return Qa({id:e.id,points:t})}Ma.load=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(e){t(e.target.response)},n.send()},Ma.save=function(e,t){var n="data:application/octet-stream;base64,"+btoa(Ma.parse._buffToStr(e));window.location.href=n},Ma.clone=function(e){return JSON.parse(JSON.stringify(e))},Ma.bin={},Ma.bin.f=new Float32Array(1),Ma.bin.fb=new Uint8Array(Ma.bin.f.buffer),Ma.bin.rf=function(e,t){for(var n=Ma.bin.f,r=Ma.bin.fb,i=0;i<4;i++)r[i]=e[t+i];return n[0]},Ma.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},Ma.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},Ma.bin.rASCII0=function(e,t){for(var n="";0!=e[t];)n+=String.fromCharCode(e[t++]);return n},Ma.bin.wf=function(e,t,n){new Float32Array(e.buffer,t,1)[0]=n},Ma.bin.wsl=function(e,t,n){e[t]=n,e[t+1]=n>>8},Ma.bin.wil=function(e,t,n){e[t]=n,e[t+1]=n>>8,e[t+2]=n>>16,e[t+3]},Ma.parse={},Ma.parse._buffToStr=function(e){for(var t=new Uint8Array(e),n="",r=0;ri&&(i=l),ua&&(a=u),cs&&(s=c)}return{min:{x:t,y:n,z:r},max:{x:i,y:a,z:s}}};var za=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._type=i.type||(i.src?i.src.split(".").pop():null)||"jpg",r._pos=$.vec3(i.pos||[0,0,0]),r._up=$.vec3(i.up||[0,1,0]),r._normal=$.vec3(i.normal||[0,0,1]),r._height=i.height||1,r._origin=$.vec3(),r._rtcPos=$.vec3(),r._imageSize=$.vec2(),r._texture=new Oa(w(r),{flipY:!0}),r._image=new Image,"jpg"!==r._type&&"png"!==r._type&&(r.error('Unsupported type - defaulting to "jpg"'),r._type="jpg"),r._node=new va(w(r),{matrix:$.inverseMat4($.lookAtMat4v(r._pos,$.subVec3(r._pos,r._normal,$.mat4()),r._up,$.mat4())),children:[r._bitmapMesh=new Zi(w(r),{scale:[1,1,1],rotation:[-90,0,0],collidable:i.collidable,pickable:i.pickable,opacity:i.opacity,clippable:i.clippable,geometry:new Rn(w(r),ja({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new Ln(w(r),{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:r._texture,emissiveMap:r._texture,backfaces:!0})})]}),i.image?r.image=i.image:i.src?r.src=i.src:i.imageData&&(r.imageData=i.imageData),r.scene._bitmapCreated(w(r)),r}return P(n,[{key:"visible",get:function(){return this._bitmapMesh.visible},set:function(e){this._bitmapMesh.visible=e}},{key:"image",get:function(){return this._image},set:function(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}},{key:"src",get:function(){return this._image.src},set:function(e){var t=this;if(e)switch(this._image.onload=function(){t._texture.image=t._image,t._imageSize[0]=t._image.width,t._imageSize[1]=t._image.height,t._updateBitmapMeshScale()},this._image.src=e,e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}},{key:"imageData",get:function(){var e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")},set:function(e){var t=this;this._image.onload=function(){t._texture.image=image,t._imageSize[0]=image.width,t._imageSize[1]=image.height,t._updateBitmapMeshScale()},this._image.src=e}},{key:"type",get:function(){return this._type},set:function(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}},{key:"pos",get:function(){return this._pos}},{key:"normal",get:function(){return this._normal}},{key:"up",get:function(){return this._up}},{key:"height",get:function(){return this._height},set:function(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}},{key:"collidable",get:function(){return this._bitmapMesh.collidable},set:function(e){this._bitmapMesh.collidable=!1!==e}},{key:"clippable",get:function(){return this._bitmapMesh.clippable},set:function(e){this._bitmapMesh.clippable=!1!==e}},{key:"pickable",get:function(){return this._bitmapMesh.pickable},set:function(e){this._bitmapMesh.pickable=!1!==e}},{key:"opacity",get:function(){return this._bitmapMesh.opacity},set:function(e){this._bitmapMesh.opacity=e}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._bitmapDestroyed(this)}},{key:"_updateBitmapMeshScale",value:function(){var e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height/e,1,this._height]}}]),n}(),Ka=$.OBB3(),Ya=$.OBB3(),Xa=$.OBB3(),qa=function(){function e(t,n,r,i,a,s){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;b(this,e),this.model=t,this.object=null,this.parent=null,this.transform=a,this.textureSet=s,this._matrixDirty=!1,this._matrixUpdateScheduled=!1,this.id=n,this.obb=null,this._aabbLocal=null,this._aabbWorld=$.AABB3(),this._aabbWorldDirty=!1,this.layer=o,this.portionId=l,this._color=new Uint8Array([r[0],r[1],r[2],i]),this._colorize=new Uint8Array([r[0],r[1],r[2],i]),this._colorizing=!1,this._transparent=i<255,this.numTriangles=0,this.origin=null,this.entity=null,a&&a._addMesh(this)}return P(e,[{key:"_sceneModelDirty",value:function(){this._aabbWorldDirty=!0,this.layer.aabbDirty=!0}},{key:"_transformDirty",value:function(){this._matrixDirty||this._matrixUpdateScheduled||(this.model._meshMatrixDirty(this),this._matrixDirty=!0,this._matrixUpdateScheduled=!0),this._aabbWorldDirty=!0,this.layer.aabbDirty=!0,this.entity&&this.entity._transformDirty()}},{key:"_updateMatrix",value:function(){this.transform&&this._matrixDirty&&this.layer.setMatrix(this.portionId,this.transform.worldMatrix),this._matrixDirty=!1,this._matrixUpdateScheduled=!1}},{key:"_finalize",value:function(e){this.layer.initFlags(this.portionId,e,this._transparent)}},{key:"_finalize2",value:function(){this.layer.flushInitFlags&&this.layer.flushInitFlags()}},{key:"_setVisible",value:function(e){this.layer.setVisible(this.portionId,e,this._transparent)}},{key:"_setColor",value:function(e){this._color[0]=e[0],this._color[1]=e[1],this._color[2]=e[2],this._colorizing||this.layer.setColor(this.portionId,this._color,!1)}},{key:"_setColorize",value:function(e){e?(this._colorize[0]=e[0],this._colorize[1]=e[1],this._colorize[2]=e[2],this.layer.setColor(this.portionId,this._colorize,false),this._colorizing=!0):(this.layer.setColor(this.portionId,this._color,false),this._colorizing=!1)}},{key:"_setOpacity",value:function(e,t){var n=e<255,r=this._transparent!==n;this._color[3]=e,this._colorize[3]=e,this._transparent=n,this._colorizing?this.layer.setColor(this.portionId,this._colorize):this.layer.setColor(this.portionId,this._color),r&&this.layer.setTransparent(this.portionId,t,n)}},{key:"_setOffset",value:function(e){this.layer.setOffset(this.portionId,e)}},{key:"_setHighlighted",value:function(e){this.layer.setHighlighted(this.portionId,e,this._transparent)}},{key:"_setXRayed",value:function(e){this.layer.setXRayed(this.portionId,e,this._transparent)}},{key:"_setSelected",value:function(e){this.layer.setSelected(this.portionId,e,this._transparent)}},{key:"_setEdges",value:function(e){this.layer.setEdges(this.portionId,e,this._transparent)}},{key:"_setClippable",value:function(e){this.layer.setClippable(this.portionId,e,this._transparent)}},{key:"_setCollidable",value:function(e){this.layer.setCollidable(this.portionId,e)}},{key:"_setPickable",value:function(e){this.layer.setPickable(this.portionId,e,this._transparent)}},{key:"_setCulled",value:function(e){this.layer.setCulled(this.portionId,e,this._transparent)}},{key:"canPickTriangle",value:function(){return!1}},{key:"drawPickTriangles",value:function(e,t){}},{key:"pickTriangleSurface",value:function(e){}},{key:"precisionRayPickSurface",value:function(e,t,n,r){return!!this.layer.precisionRayPickSurface&&this.layer.precisionRayPickSurface(this.portionId,e,t,n,r)}},{key:"canPickWorldPos",value:function(){return!0}},{key:"drawPickDepths",value:function(e){this.model.drawPickDepths(e)}},{key:"drawPickNormals",value:function(e){this.model.drawPickNormals(e)}},{key:"delegatePickedEntity",value:function(){return this.parent}},{key:"getEachVertex",value:function(e){this.layer.getEachVertex(this.portionId,e)}},{key:"aabb",get:function(){if(this._aabbWorldDirty){if($.AABB3ToOBB3(this._aabbLocal,Ka),this.transform?($.transformOBB3(this.transform.worldMatrix,Ka,Ya),$.transformOBB3(this.model.worldMatrix,Ya,Xa),$.OBB3ToAABB3(Xa,this._aabbWorld)):($.transformOBB3(this.model.worldMatrix,Ka,Ya),$.OBB3ToAABB3(Ya,this._aabbWorld)),this.origin){var e=this.origin;this._aabbWorld[0]+=e[0],this._aabbWorld[1]+=e[1],this._aabbWorld[2]+=e[2],this._aabbWorld[3]+=e[0],this._aabbWorld[4]+=e[1],this._aabbWorld[5]+=e[2]}this._aabbWorldDirty=!1}return this._aabbWorld},set:function(e){this._aabbLocal=e}},{key:"_destroy",value:function(){this.model.scene._renderer.putPickID(this.pickId)}}]),e}(),Ja=new(function(){function e(){b(this,e),this._uint8Arrays={},this._float32Arrays={}}return P(e,[{key:"_clear",value:function(){this._uint8Arrays={},this._float32Arrays={}}},{key:"getUInt8Array",value:function(e){var t=this._uint8Arrays[e];return t||(t=new Uint8Array(e),this._uint8Arrays[e]=t),t}},{key:"getFloat32Array",value:function(e){var t=this._float32Arrays[e];return t||(t=new Float32Array(e),this._float32Arrays[e]=t),t}}]),e}()),Za=0;function $a(){return Za++,Ja}var es={NOT_RENDERED:0,COLOR_OPAQUE:1,COLOR_TRANSPARENT:2,SILHOUETTE_HIGHLIGHTED:3,SILHOUETTE_SELECTED:4,SILHOUETTE_XRAYED:5,EDGES_COLOR_OPAQUE:6,EDGES_COLOR_TRANSPARENT:7,EDGES_HIGHLIGHTED:8,EDGES_SELECTED:9,EDGES_XRAYED:10,PICK:11},ts=new Float32Array([1,1,1,1]),ns=new Float32Array([0,0,0,1]),rs=$.vec4(),is=$.vec3(),as=$.vec3(),ss=$.mat4(),os=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.instancing,a=void 0!==i&&i,s=r.edges,o=void 0!==s&&s;b(this,e),this._scene=t,this._withSAO=n,this._instancing=a,this._edges=o,this._hash=this._getHash(),this._matricesUniformBlockBufferBindingPoint=0,this._matricesUniformBlockBuffer=this._scene.canvas.gl.createBuffer(),this._matricesUniformBlockBufferData=new Float32Array(96),this._vaoCache=new WeakMap,this._allocate()}return P(e,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"_buildShader",value:function(){return{vertex:this._buildVertexShader(),fragment:this._buildFragmentShader()}}},{key:"_buildVertexShader",value:function(){return[""]}},{key:"_buildFragmentShader",value:function(){return[""]}},{key:"_addMatricesUniformBlockLines",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.push("uniform Matrices {"),e.push(" mat4 worldMatrix;"),e.push(" mat4 viewMatrix;"),e.push(" mat4 projMatrix;"),e.push(" mat4 positionsDecodeMatrix;"),t&&(e.push(" mat4 worldNormalMatrix;"),e.push(" mat4 viewNormalMatrix;")),e.push("};"),e}},{key:"_addRemapClipPosLines",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.push("uniform vec2 drawingBufferSize;"),e.push("uniform vec2 pickClipPos;"),e.push("vec4 remapClipPos(vec4 clipPos) {"),e.push(" clipPos.xy /= clipPos.w;"),1===t?e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"):e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(".concat(t,"));")),e.push(" clipPos.xy *= clipPos.w;"),e.push(" return clipPos;"),e.push("}"),e}},{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"setSectionPlanesStateUniforms",value:function(e){var t=this._scene,n=t.canvas.gl,r=e.model,i=e.layerIndex,a=t._sectionPlanesState.getNumAllocatedSectionPlanes(),s=t._sectionPlanesState.sectionPlanes.length;if(a>0)for(var o=t._sectionPlanesState.sectionPlanes,l=i*s,u=r.renderFlags,c=0;c0&&(this._uReflectionMap="reflectionMap"),n.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(var o=0,l=e._sectionPlanesState.getNumAllocatedSectionPlanes();o3&&void 0!==arguments[3]?arguments[3]:{},i=r.colorUniform,a=void 0!==i&&i,s=r.incrementDrawState,o=void 0!==s&&s,l=vt.MAX_TEXTURE_IMAGE_UNITS,u=this._scene,c=u.canvas.gl,f=t._state,p=t.model,A=f.textureSet,d=f.origin,v=f.positionsDecodeMatrix,h=u._lightsState,I=u.pointsMaterial,y=p.scene.camera,m=y.viewNormalMatrix,w=y.project,g=e.pickViewMatrix||y.viewMatrix,E=p.position,T=p.rotationMatrix,b=p.rotationMatrixConjugate,D=p.worldNormalMatrix;if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),this._vaoCache.has(t)?c.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(f));var P=0,C=16;this._matricesUniformBlockBufferData.set(b,0);var _=0!==d[0]||0!==d[1]||0!==d[2],R=0!==E[0]||0!==E[1]||0!==E[2];if(_||R){var B=is;if(_){var O=$.transformPoint3(T,d,as);B[0]=O[0],B[1]=O[1],B[2]=O[2]}else B[0]=0,B[1]=0,B[2]=0;B[0]+=E[0],B[1]+=E[1],B[2]+=E[2],this._matricesUniformBlockBufferData.set(Oe(g,B,ss),P+=C)}else this._matricesUniformBlockBufferData.set(g,P+=C);if(this._matricesUniformBlockBufferData.set(e.pickProjMatrix||w.matrix,P+=C),this._matricesUniformBlockBufferData.set(v,P+=C),this._matricesUniformBlockBufferData.set(D,P+=C),this._matricesUniformBlockBufferData.set(m,P+=C),c.bindBuffer(c.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),c.bufferData(c.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,c.DYNAMIC_DRAW),c.bindBufferBase(c.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer),c.uniform1i(this._uRenderPass,n),this.setSectionPlanesStateUniforms(t),u.logarithmicDepthBufferEnabled){if(this._uLogDepthBufFC){var S=2/(Math.log(e.pickZFar+1)/Math.LN2);c.uniform1f(this._uLogDepthBufFC,S)}this._uZFar&&c.uniform1f(this._uZFar,u.camera.project.far)}if(this._uPickInvisible&&c.uniform1i(this._uPickInvisible,e.pickInvisible),this._uPickZNear&&c.uniform1f(this._uPickZNear,e.pickZNear),this._uPickZFar&&c.uniform1f(this._uPickZFar,e.pickZFar),this._uPickClipPos&&c.uniform2fv(this._uPickClipPos,e.pickClipPos),this._uDrawingBufferSize&&c.uniform2f(this._uDrawingBufferSize,c.drawingBufferWidth,c.drawingBufferHeight),this._uUVDecodeMatrix&&c.uniformMatrix3fv(this._uUVDecodeMatrix,!1,f.uvDecodeMatrix),this._uIntensityRange&&I.filterIntensity&&c.uniform2f(this._uIntensityRange,I.minIntensity,I.maxIntensity),this._uPointSize&&c.uniform1f(this._uPointSize,I.pointSize),this._uNearPlaneHeight){var N="ortho"===u.camera.projection?1:c.drawingBufferHeight/(2*Math.tan(.5*u.camera.perspective.fov*Math.PI/180));c.uniform1f(this._uNearPlaneHeight,N)}if(A){var L=A.colorTexture,x=A.metallicRoughnessTexture,M=A.emissiveTexture,F=A.normalsTexture,H=A.occlusionTexture;this._uColorMap&&L&&(this._program.bindTexture(this._uColorMap,L.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uMetallicRoughMap&&x&&(this._program.bindTexture(this._uMetallicRoughMap,x.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uEmissiveMap&&M&&(this._program.bindTexture(this._uEmissiveMap,M.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uNormalMap&&F&&(this._program.bindTexture(this._uNormalMap,F.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uAOMap&&H&&(this._program.bindTexture(this._uAOMap,H.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l)}if(h.reflectionMaps.length>0&&h.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,h.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l,e.bindTexture++),h.lightMaps.length>0&&h.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,h.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l,e.bindTexture++),this._withSAO){var U=u.sao,G=U.possible;if(G){var k=c.drawingBufferWidth,j=c.drawingBufferHeight;rs[0]=k,rs[1]=j,rs[2]=U.blendCutoff,rs[3]=U.blendFactor,c.uniform4fv(this._uSAOParams,rs),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l,e.bindTexture++}}if(a){var V=this._edges?"edgeColor":"fillColor",Q=this._edges?"edgeAlpha":"fillAlpha";if(n===es["".concat(this._edges?"EDGES":"SILHOUETTE","_XRAYED")]){var W=u.xrayMaterial._state,z=W[V],K=W[Q];c.uniform4f(this._uColor,z[0],z[1],z[2],K)}else if(n===es["".concat(this._edges?"EDGES":"SILHOUETTE","_HIGHLIGHTED")]){var Y=u.highlightMaterial._state,X=Y[V],q=Y[Q];c.uniform4f(this._uColor,X[0],X[1],X[2],q)}else if(n===es["".concat(this._edges?"EDGES":"SILHOUETTE","_SELECTED")]){var J=u.selectedMaterial._state,Z=J[V],ee=J[Q];c.uniform4f(this._uColor,Z[0],Z[1],Z[2],ee)}else c.uniform4fv(this._uColor,this._edges?ns:ts)}this._draw({state:f,frameCtx:e,incrementDrawState:o}),c.bindVertexArray(null)}}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null,re.memory.programs--}}]),e}(),ls=function(e){h(n,os);var t=y(n);function n(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.edges,s=void 0!==a&&a;return b(this,n),t.call(this,e,r,{instancing:!1,edges:s})}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;if(this._edges)t.drawElements(t.LINES,n.edgeIndicesBuf.numItems,n.edgeIndicesBuf.itemType,0);else{var a=r.pickElementsCount||n.indicesBuf.numItems,s=r.pickElementsOffset?r.pickElementsOffset*n.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,a,n.indicesBuf.itemType,s),i&&r.drawElements++}}}]),n}(),us=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e,t=this._scene,n=t._sectionPlanesState,r=t._lightsState,i=n.getNumAllocatedSectionPlanes()>0,a=[];a.push("#version 300 es"),a.push("// Triangles batching draw vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec3 normal;"),a.push("in vec4 color;"),a.push("in float flags;"),t.entityOffsetsEnabled&&a.push("in vec3 offset;"),this._addMatricesUniformBlockLines(a,!0),t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("uniform vec4 lightAmbient;");for(var s=0,o=r.lights.length;s= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),i&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;")),a.push("out vec4 vColor;"),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),t.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),a.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;");for(var l=0,u=r.lights.length;l0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching draw fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):r.push(" outColor = vColor;"),r.push("}"),r}}]),n}(),cs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching flat-shading draw vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._lightsState,n=e._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching flat-shading draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),r){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var a=0,s=n.getNumAllocatedSectionPlanes();a> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var c=0,f=n.getNumAllocatedSectionPlanes();c 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}i.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),i.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),i.push("float lambertian = 1.0;"),i.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),i.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),i.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(var p=0,A=t.lights.length;p0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, color.a ));"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Triangles batching silhouette fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return n.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("outColor = vColor;"),a.push("}"),a}}]),n}(),ps=function(e){h(n,ls);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!1,edges:!0})}return P(n)}(),As=function(e){h(n,ps);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("uniform vec4 color;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(color.r, color.g, color.b, color.a);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// EdgesEmphasisRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),ds=function(e){h(n,ps);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!1})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry edges drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry edges drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),vs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry picking vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),this._addRemapClipPosLines(n),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vPickColor; "),r.push("}"),r}}]),n}(),hs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),this._addRemapClipPosLines(n),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching pick depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),Is=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching pick normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec3 normal;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vWorldNormal;"),n.push("out vec4 outColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec3 worldNormal = octDecode(normal.xy); "),n.push(" vWorldNormal = worldNormal;"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching pick normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outNormal = ivec4(vWorldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),ys=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching occlusion fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}]),n}(),ms=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec2 vHighPrecisionZW;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vHighPrecisionZW = gl_Position.zw;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching depth fragment shader"),r.push("precision highp float;"),r.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),r.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),r.push("}"),r}}]),n}(),ws=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec3 normal;"),n.push("in vec4 color;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n,!0),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vViewNormal;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewNormal = viewNormal;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),gs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry shadow vertex shader"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 outColor;"),n.push("void main(void) {"),n.push(" int colorFlag = int(flags) & 0xF;"),n.push(" bool visible = (colorFlag > 0);"),n.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),n.push(" if (!visible || transparent) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry shadow fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" outColor = encodeFloat( gl_FragCoord.z); "),n.push("}"),n}}]),n}(),Es=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=e._lightsState,r=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,a=[];return a.push("#version 300 es"),a.push("// Triangles batching quality draw vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("precision highp usampler2D;"),a.push("precision highp isampler2D;"),a.push("precision highp sampler2D;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("precision mediump usampler2D;"),a.push("precision mediump isampler2D;"),a.push("precision mediump sampler2D;"),a.push("#endif"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec3 normal;"),a.push("in vec4 color;"),a.push("in vec2 uv;"),a.push("in vec2 metallicRoughness;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),this._addMatricesUniformBlockLines(a,!0),a.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("vec3 octDecode(vec2 oct) {"),a.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),a.push(" if (v.z < 0.0) {"),a.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),a.push("out vec4 vViewPosition;"),a.push("out vec3 vViewNormal;"),a.push("out vec4 vColor;"),a.push("out vec2 vUV;"),a.push("out vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("out vec3 vWorldNormal;"),r&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;"),i&&a.push("out vec4 vClipPosition;")),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),a.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),a.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),a.push("vFragDepth = 1.0 + clipPos.w;")),r&&(a.push("vWorldPosition = worldPosition;"),a.push("vFlags = flags;"),i&&a.push("vClipPosition = clipPos;")),a.push("vViewPosition = viewPosition;"),a.push("vViewNormal = viewNormal;"),a.push("vColor = color;"),a.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),a.push("vMetallicRoughness = metallicRoughness;"),n.lightMaps.length>0&&a.push("vWorldNormal = worldNormal.xyz;"),a.push("gl_Position = clipPos;"),a.push("}"),a.push("}"),a}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e.gammaOutput,n=e._sectionPlanesState,r=e._lightsState,i=n.getNumAllocatedSectionPlanes()>0,a=n.clippingCaps,s=[];s.push("#version 300 es"),s.push("// Triangles batching quality draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform sampler2D uColorMap;"),s.push("uniform sampler2D uMetallicRoughMap;"),s.push("uniform sampler2D uEmissiveMap;"),s.push("uniform sampler2D uNormalMap;"),s.push("uniform sampler2D uAOMap;"),s.push("in vec4 vViewPosition;"),s.push("in vec3 vViewNormal;"),s.push("in vec4 vColor;"),s.push("in vec2 vUV;"),s.push("in vec2 vMetallicRoughness;"),r.lightMaps.length>0&&s.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(s,!0),r.reflectionMaps.length>0&&s.push("uniform samplerCube reflectionMap;"),r.lightMaps.length>0&&s.push("uniform samplerCube lightMap;"),s.push("uniform vec4 lightAmbient;");for(var o=0,l=r.lights.length;o0&&(s.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),s.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),s.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),s.push(" return envMapColor;"),s.push("}")),s.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),s.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),s.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),s.push("}"),s.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" return 1.0 / ( gl * gv );"),s.push("}"),s.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" return 0.5 / max( gv + gl, EPSILON );"),s.push("}"),s.push("float D_GGX(const in float alpha, const in float dotNH) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),s.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float alpha = ( roughness * roughness );"),s.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),s.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),s.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),s.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),s.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),s.push(" vec3 F = F_Schlick( specularColor, dotLH );"),s.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),s.push(" float D = D_GGX( alpha, dotNH );"),s.push(" return F * (G * D);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),s.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),s.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),s.push(" vec4 r = roughness * c0 + c1;"),s.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),s.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),s.push(" return specularColor * AB.x + AB.y;"),s.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(s.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(s.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),s.push(" irradiance *= PI;"),s.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(s.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),s.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),s.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),s.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),s.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),s.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),s.push("}")),s.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),s.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),s.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),s.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),s.push("}"),s.push("out vec4 outColor;"),s.push("void main(void) {"),i){s.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var p=0,A=n.getNumAllocatedSectionPlanes();p (0.002 * vClipPosition.w)) {"),s.push(" discard;"),s.push(" }"),s.push(" if (dist > 0.0) { "),s.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" return;"),s.push("}")):(s.push(" if (dist > 0.0) { "),s.push(" discard;"),s.push(" }")),s.push("}")}s.push("IncidentLight light;"),s.push("Material material;"),s.push("Geometry geometry;"),s.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),s.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),s.push("float opacity = float(vColor.a) / 255.0;"),s.push("vec3 baseColor = rgb;"),s.push("float specularF0 = 1.0;"),s.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),s.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),s.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),s.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),s.push("baseColor *= colorTexel.rgb;"),s.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),s.push("metallic *= metalRoughTexel.b;"),s.push("roughness *= metalRoughTexel.g;"),s.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),s.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),s.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),s.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),s.push("geometry.position = vViewPosition.xyz;"),s.push("geometry.viewNormal = -normalize(viewNormal);"),s.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),r.lightMaps.length>0&&s.push("geometry.worldNormal = normalize(vWorldNormal);"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&s.push("computePBRLightMapping(geometry, material, reflectedLight);");for(var d=0,v=r.lights.length;d0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching pick flat normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching pick flat normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("in vec4 vWorldPosition;"),n){r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),r.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),r.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),r.push(" outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),bs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching color texture vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in vec2 uv;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),n.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("out vec2 vUV;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e.gammaOutput,n=e._lightsState,r=e._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Triangles batching color texture fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),a.push("uniform float gammaFactor;"),a.push("vec4 linearToLinear( in vec4 value ) {"),a.push(" return value;"),a.push("}"),a.push("vec4 sRGBToLinear( in vec4 value ) {"),a.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),a.push("}"),a.push("vec4 gammaToLinear( in vec4 value) {"),a.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),a.push("}"),t&&(a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}")),i){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(var s=0,o=r.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(var f=0,p=r.getNumAllocatedSectionPlanes();f 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(var A=0,d=n.lights.length;A0,n=[];return n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Os=$.vec3(),Ss=$.vec3(),Ns=$.vec3(),Ls=$.vec3(),xs=$.mat4(),Ms=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=Os;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=Ss;if(l){var y=Ns;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,xs),(v=Ls)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),s.drawElements(s.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0),o.edgeIndicesBuf.unbind()):s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;var n=[];return n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Fs=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._silhouetteRenderer||(this._silhouetteRenderer=new fs(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new vs(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new hs(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Bs(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Ms(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new us(this._scene,!1)),this._colorRenderer}},{key:"colorRendererWithSAO",get:function(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new us(this._scene,!0)),this._colorRendererWithSAO}},{key:"flatColorRenderer",get:function(){return this._flatColorRenderer||(this._flatColorRenderer=new cs(this._scene,!1)),this._flatColorRenderer}},{key:"flatColorRendererWithSAO",get:function(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new cs(this._scene,!0)),this._flatColorRendererWithSAO}},{key:"colorTextureRenderer",get:function(){return this._colorTextureRenderer||(this._colorTextureRenderer=new bs(this._scene,!1)),this._colorTextureRenderer}},{key:"colorTextureRendererWithSAO",get:function(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new bs(this._scene,!0)),this._colorTextureRendererWithSAO}},{key:"pbrRenderer",get:function(){return this._pbrRenderer||(this._pbrRenderer=new Es(this._scene,!1)),this._pbrRenderer}},{key:"pbrRendererWithSAO",get:function(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new Es(this._scene,!0)),this._pbrRendererWithSAO}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new fs(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new ms(this._scene)),this._depthRenderer}},{key:"normalsRenderer",get:function(){return this._normalsRenderer||(this._normalsRenderer=new ws(this._scene)),this._normalsRenderer}},{key:"edgesRenderer",get:function(){return this._edgesRenderer||(this._edgesRenderer=new As(this._scene)),this._edgesRenderer}},{key:"edgesColorRenderer",get:function(){return this._edgesColorRenderer||(this._edgesColorRenderer=new ds(this._scene)),this._edgesColorRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new vs(this._scene)),this._pickMeshRenderer}},{key:"pickNormalsRenderer",get:function(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Is(this._scene)),this._pickNormalsRenderer}},{key:"pickNormalsFlatRenderer",get:function(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Ts(this._scene)),this._pickNormalsFlatRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new hs(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new ys(this._scene)),this._occlusionRenderer}},{key:"shadowRenderer",get:function(){return this._shadowRenderer||(this._shadowRenderer=new gs(this._scene)),this._shadowRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Ms(this._scene)),this._snapRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Bs(this._scene)),this._snapInitRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Hs={};var Us=65536,Gs=5e6,ks=function(){function e(){b(this,e)}return P(e,[{key:"doublePrecisionEnabled",get:function(){return $.getDoublePrecisionEnabled()},set:function(e){$.setDoublePrecisionEnabled(e)}},{key:"maxDataTextureHeight",get:function(){return Us},set:function(e){(e=1024*Math.ceil(e/1024))>4096?e=4096:e<1024&&(e=1024),Us=e}},{key:"maxGeometryBatchSize",get:function(){return Gs},set:function(e){e<1e5?e=1e5:e>5e6&&(e=5e6),Gs=e}}]),e}(),js=new ks,Vs=P((function e(){b(this,e),this.maxVerts=js.maxGeometryBatchSize,this.maxIndices=3*js.maxGeometryBatchSize,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]})),Qs=$.mat4(),Ws=$.mat4();function zs(e,t,n){for(var r=e.length,i=new Uint16Array(r),a=t[0],s=t[1],o=t[2],l=t[3]-a,u=t[4]-s,c=t[5]-o,f=65525,p=f/l,A=f/u,d=f/c,v=function(e){return e>=0?e:0},h=0;h=0?1:-1),s=(1-Math.abs(r))*(i>=0?1:-1),r=a,i=s}return new Int8Array([Math[t](127.5*r+(r<0?-1:0)),Math[n](127.5*i+(i<0?-1:0))])}function Xs(e){var t=e[0],n=e[1];t/=t<0?127:128,n/=n<0?127:128;var r=1-Math.abs(t)-Math.abs(n);r<0&&(t=(1-Math.abs(n))*(t>=0?1:-1),n=(1-Math.abs(t))*(n>=0?1:-1));var i=Math.sqrt(t*t+n*n+r*r);return[t/i,n/i,r/i]}var qs=$.mat4(),Js=$.mat4(),Zs=$.vec4([0,0,0,1]),$s=$.vec3(),eo=$.vec3(),to=$.vec3(),no=$.vec3(),ro=$.vec3(),io=$.vec3(),ao=$.vec3(),so=function(){function e(t){var n,r,i;b(this,e),console.info("Creating VBOBatchingTrianglesLayer"),this.model=t.model,this.sortId="TrianglesBatchingLayer"+(t.solid?"-solid":"-surface")+(t.autoNormals?"-autonormals":"-normals")+(t.textureSet&&t.textureSet.colorTexture?"-colorTexture":"")+(t.textureSet&&t.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Hs[r])||(i=new Fs(n),Hs[r]=i,i._compile(),i.eagerCreateRenders(),n.on("compile",(function(){i._compile(),i.eagerCreateRenders()})),n.on("destroyed",(function(){delete Hs[r],i._destroy()}))),i),this._buffer=new Vs(t.maxGeometryBatchSize),this._scratchMemory=t.scratchMemory,this._state=new zt({origin:$.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:t.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=$.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,t.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=$.mat4(t.positionsDecodeMatrix)),t.uvDecodeMatrix?(this._state.uvDecodeMatrix=$.mat3(t.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,t.origin&&this._state.origin.set(t.origin),this.solid=!!t.solid}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0)for(var P=0,C=s.length;P0){var _=qs;I?$.inverseMat4($.transposeMat4(I,Js),_):$.identityMat4(_,_),function(e,t,n,r,i){function a(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}var s,o,l,u,c,f=new Float32Array([0,0,0,0]),p=new Float32Array([0,0,0,0]);for(c=0;cu&&(o=s,u=l),(l=a(p,Xs(s=Ys(p,"floor","ceil"))))>u&&(o=s,u=l),(l=a(p,Xs(s=Ys(p,"ceil","ceil"))))>u&&(o=s,u=l),r[i+c+0]=o[0],r[i+c+1]=o[1],r[i+c+2]=0}(_,a,a.length,w.normals,w.normals.length)}if(u)for(var R=0,B=u.length;R0)for(var k=0,j=o.length;k0)for(var V=0,Q=l.length;V0){var r=this._state.positionsDecodeMatrix?new Uint16Array(n.positions):zs(n.positions,this._modelAABB,this._state.positionsDecodeMatrix=$.mat4());if(e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,r,r.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(var i=0,a=this._portions.length;i0){var u=new Int8Array(n.normals);e.normalsBuf=new Pt(t,t.ARRAY_BUFFER,u,n.normals.length,3,t.STATIC_DRAW,!0)}if(n.colors.length>0){var c=new Uint8Array(n.colors);e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,c,n.colors.length,4,t.DYNAMIC_DRAW,!1)}if(n.uv.length>0)if(e.uvDecodeMatrix){e.uvBuf=new Pt(t,t.ARRAY_BUFFER,n.uv,n.uv.length,2,t.STATIC_DRAW,!1)}else{var f=Pn.getUVBounds(n.uv),p=Pn.compressUVs(n.uv,f.min,f.max),A=p.quantized;e.uvDecodeMatrix=$.mat3(p.decodeMatrix),e.uvBuf=new Pt(t,t.ARRAY_BUFFER,A,A.length,2,t.STATIC_DRAW,!1)}if(n.metallicRoughness.length>0){var d=new Uint8Array(n.metallicRoughness);e.metallicRoughnessBuf=new Pt(t,t.ARRAY_BUFFER,d,n.metallicRoughness.length,2,t.STATIC_DRAW,!1)}if(n.positions.length>0){var v=n.positions.length/3,h=new Float32Array(v);e.flagsBuf=new Pt(t,t.ARRAY_BUFFER,h,h.length,1,t.DYNAMIC_DRAW,!1)}if(n.pickColors.length>0){var I=new Uint8Array(n.pickColors);e.pickColorsBuf=new Pt(t,t.ARRAY_BUFFER,I,n.pickColors.length,4,t.STATIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&n.offsets.length>0){var y=new Float32Array(n.offsets);e.offsetsBuf=new Pt(t,t.ARRAY_BUFFER,y,n.offsets.length,3,t.DYNAMIC_DRAW)}if(n.indices.length>0){var m=new Uint32Array(n.indices);e.indicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,m,n.indices.length,1,t.STATIC_DRAW)}if(n.edgeIndices.length>0){var w=new Uint32Array(n.edgeIndices);e.edgeIndicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,w,n.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}}},{key:"isEmpty",value:function(){return!this._state.indicesBuf}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,!0)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";for(var n=e,r=this._portions[n],i=4*r.vertsBaseIndex,a=4*r.numVerts,s=this._scratchMemory.getUInt8Array(a),o=t[0],l=t[1],u=t[2],c=t[3],f=0;f3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=e,o=this._portions[s],l=o.vertsBaseIndex,u=o.numVerts,c=l,f=u,p=!!(t&Me),A=!!(t&ke),d=!!(t&je),v=!!(t&Ve),h=!!(t&Qe),I=!!(t&He),y=!!(t&Fe);i=!p||y||A||d&&!this.model.scene.highlightMaterial.glowThrough||v&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!p||y?es.NOT_RENDERED:v?es.SILHOUETTE_SELECTED:d?es.SILHOUETTE_HIGHLIGHTED:A?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var m=0;m=!p||y?es.NOT_RENDERED:v?es.EDGES_SELECTED:d?es.EDGES_HIGHLIGHTED:A?es.EDGES_XRAYED:h?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED;var w=p&&!y&&I?es.PICK:es.NOT_RENDERED,g=t&Ue?1:0;if(r){this._deferredFlagValues||(this._deferredFlagValues=new Float32Array(this._numVerts));for(var E=c,T=c+f;EI)&&(I=b,r.set(y),i&&$.triangleNormal(A,d,v,i),h=!0)}}return h&&i&&($.transformVec3(this.model.worldNormalMatrix,i,i),$.normalizeVec3(i)),h}},{key:"destroy",value:function(){var e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}]),e}(),oo=function(e){h(n,os);var t=y(n);function n(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.edges,s=void 0!==a&&a;return b(this,n),t.call(this,e,r,{instancing:!0,edges:s})}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;this._edges?t.drawElementsInstanced(t.LINES,n.edgeIndicesBuf.numItems,n.edgeIndicesBuf.itemType,0,n.numInstances):(t.drawElementsInstanced(t.TRIANGLES,n.indicesBuf.numItems,n.indicesBuf.itemType,0,n.numInstances),i&&r.drawElements++)}}]),n}(),lo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e,t,n,r=this._scene,i=r._sectionPlanesState,a=r._lightsState,s=i.getNumAllocatedSectionPlanes()>0,o=[];for(o.push("#version 300 es"),o.push("// Instancing geometry drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec2 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),r.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),r.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;"),e=0,t=a.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),s&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),r.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),o.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),e=0,t=a.lights.length;e0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):r.push(" outColor = vColor;"),r.push("}"),r}}]),n}(),uo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry flat-shading drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=n._lightsState,a=r.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),n.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),this._withSAO&&(s.push("uniform sampler2D uOcclusionTexture;"),s.push("uniform vec4 uSAOParams;"),s.push("const float packUpscale = 256. / 255.;"),s.push("const float unpackDownScale = 255. / 256.;"),s.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),s.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),s.push("float unpackRGBToFloat( const in vec4 v ) {"),s.push(" return dot( v, unPackFactors );"),s.push("}")),a){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(var o=0,l=r.getNumAllocatedSectionPlanes();o> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var c=0,f=r.getNumAllocatedSectionPlanes();c 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}for(s.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),s.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),s.push("float lambertian = 1.0;"),s.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),s.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),s.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),e=0,t=i.lights.length;e0,n=[];return n.push("#version 300 es"),n.push("// Instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing fill fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),fo=function(e){h(n,oo);var t=y(n);function n(e,r){return b(this,n),t.call(this,e,r,{instancing:!0,edges:!0})}return P(n)}(),po=function(e){h(n,fo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("uniform vec4 color;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(color.r, color.g, color.b, color.a);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// EdgesEmphasisRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),Ao=function(e){h(n,fo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!1})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// EdgesColorRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// EdgesColorRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),vo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry picking vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vPickColor; "),r.push("}"),r}}]),n}(),ho=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),Io=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec2 normal;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("in vec4 modelNormalMatrixCol0;"),n.push("in vec4 modelNormalMatrixCol1;"),n.push("in vec4 modelNormalMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vWorldNormal;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),n.push(" vWorldNormal = worldNormal;"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outNormal = ivec4(vWorldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),yo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// TrianglesInstancingOcclusionRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesInstancingOcclusionRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}]),n}(),mo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry depth drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec2 vHighPrecisionZW;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vHighPrecisionZW = gl_Position.zw;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry depth drawing fragment shader"),a.push("precision highp float;"),a.push("precision highp int;"),n.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return n.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),a.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),a.push("}"),a}}]),n}(),wo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry normals drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec3 normal;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n,!0),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vViewNormal;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push(" vViewNormal = viewNormal;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),go=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry shadow drawing vertex shader"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("bool visible = (colorFlag > 0);"),n.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),n.push("if (!visible || transparent) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),Eo={3e3:"linearToLinear",3001:"sRGBToLinear"},To=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=e._lightsState,r=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,a=[];return a.push("#version 300 es"),a.push("// Instancing geometry quality drawing vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec3 normal;"),a.push("in vec4 color;"),a.push("in vec2 uv;"),a.push("in vec2 metallicRoughness;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),a.push("in vec4 modelMatrixCol0;"),a.push("in vec4 modelMatrixCol1;"),a.push("in vec4 modelMatrixCol2;"),a.push("in vec4 modelNormalMatrixCol0;"),a.push("in vec4 modelNormalMatrixCol1;"),a.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(a,!0),a.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("vec3 octDecode(vec2 oct) {"),a.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),a.push(" if (v.z < 0.0) {"),a.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),a.push("out vec4 vViewPosition;"),a.push("out vec3 vViewNormal;"),a.push("out vec4 vColor;"),a.push("out vec2 vUV;"),a.push("out vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("out vec3 vWorldNormal;"),r&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;"),i&&a.push("out vec4 vClipPosition;")),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),a.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&a.push(" worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),a.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),a.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),r&&(a.push("vWorldPosition = worldPosition;"),a.push("vFlags = flags;"),i&&a.push("vClipPosition = clipPos;")),a.push("vViewPosition = viewPosition;"),a.push("vViewNormal = viewNormal;"),a.push("vColor = color;"),a.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),a.push("vMetallicRoughness = metallicRoughness;"),n.lightMaps.length>0&&a.push("vWorldNormal = worldNormal.xyz;"),a.push("gl_Position = clipPos;"),a.push("}"),a.push("}"),a}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e.gammaOutput,n=e._sectionPlanesState,r=e._lightsState,i=n.getNumAllocatedSectionPlanes()>0,a=n.clippingCaps,s=[];s.push("#version 300 es"),s.push("// Instancing geometry quality drawing fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform sampler2D uColorMap;"),s.push("uniform sampler2D uMetallicRoughMap;"),s.push("uniform sampler2D uEmissiveMap;"),s.push("uniform sampler2D uNormalMap;"),this._withSAO&&(s.push("uniform sampler2D uOcclusionTexture;"),s.push("uniform vec4 uSAOParams;"),s.push("const float packUpscale = 256. / 255.;"),s.push("const float unpackDownScale = 255. / 256.;"),s.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),s.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),s.push("float unpackRGBToFloat( const in vec4 v ) {"),s.push(" return dot( v, unPackFactors );"),s.push("}")),r.reflectionMaps.length>0&&s.push("uniform samplerCube reflectionMap;"),r.lightMaps.length>0&&s.push("uniform samplerCube lightMap;"),s.push("uniform vec4 lightAmbient;");for(var o=0,l=r.lights.length;o0&&s.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(s,!0),s.push("#define PI 3.14159265359"),s.push("#define RECIPROCAL_PI 0.31830988618"),s.push("#define RECIPROCAL_PI2 0.15915494"),s.push("#define EPSILON 1e-6"),s.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),s.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),s.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),s.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),s.push(" return normalize(surf_norm );"),s.push(" }"),s.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),s.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),s.push(" vec2 st0 = dFdx( uv.st );"),s.push(" vec2 st1 = dFdy( uv.st );"),s.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),s.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),s.push(" vec3 N = normalize( surf_norm );"),s.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),s.push(" mat3 tsn = mat3( S, T, N );"),s.push(" return normalize( tsn * mapN );"),s.push("}"),s.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),s.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),s.push("}"),s.push("struct IncidentLight {"),s.push(" vec3 color;"),s.push(" vec3 direction;"),s.push("};"),s.push("struct ReflectedLight {"),s.push(" vec3 diffuse;"),s.push(" vec3 specular;"),s.push("};"),s.push("struct Geometry {"),s.push(" vec3 position;"),s.push(" vec3 viewNormal;"),s.push(" vec3 worldNormal;"),s.push(" vec3 viewEyeDir;"),s.push("};"),s.push("struct Material {"),s.push(" vec3 diffuseColor;"),s.push(" float specularRoughness;"),s.push(" vec3 specularColor;"),s.push(" float shine;"),s.push("};"),s.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),s.push(" float r = ggxRoughness + 0.0001;"),s.push(" return (2.0 / (r * r) - 2.0);"),s.push("}"),s.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),s.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),s.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),s.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),s.push("}"),r.reflectionMaps.length>0&&(s.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),s.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),s.push(" vec3 envMapColor = "+Eo[r.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),s.push(" return envMapColor;"),s.push("}")),s.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),s.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),s.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),s.push("}"),s.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" return 1.0 / ( gl * gv );"),s.push("}"),s.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" return 0.5 / max( gv + gl, EPSILON );"),s.push("}"),s.push("float D_GGX(const in float alpha, const in float dotNH) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),s.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float alpha = ( roughness * roughness );"),s.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),s.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),s.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),s.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),s.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),s.push(" vec3 F = F_Schlick( specularColor, dotLH );"),s.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),s.push(" float D = D_GGX( alpha, dotNH );"),s.push(" return F * (G * D);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),s.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),s.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),s.push(" vec4 r = roughness * c0 + c1;"),s.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),s.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),s.push(" return specularColor * AB.x + AB.y;"),s.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(s.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(s.push(" vec3 irradiance = "+Eo[r.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),s.push(" irradiance *= PI;"),s.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(s.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),s.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),s.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),s.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),s.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),s.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),s.push("}")),s.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),s.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),s.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),s.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),s.push("}"),s.push("out vec4 outColor;"),s.push("void main(void) {"),i){s.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var p=0,A=n.getNumAllocatedSectionPlanes();p (0.002 * vClipPosition.w)) {"),s.push(" discard;"),s.push(" }"),s.push(" if (dist > 0.0) { "),s.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" return;"),s.push("}")):(s.push(" if (dist > 0.0) { "),s.push(" discard;"),s.push(" }")),s.push("}")}s.push("IncidentLight light;"),s.push("Material material;"),s.push("Geometry geometry;"),s.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),s.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),s.push("float opacity = float(vColor.a) / 255.0;"),s.push("vec3 baseColor = rgb;"),s.push("float specularF0 = 1.0;"),s.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),s.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),s.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),s.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),s.push("baseColor *= colorTexel.rgb;"),s.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),s.push("metallic *= metalRoughTexel.b;"),s.push("roughness *= metalRoughTexel.g;"),s.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),s.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),s.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),s.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),s.push("geometry.position = vViewPosition.xyz;"),s.push("geometry.viewNormal = -normalize(viewNormal);"),s.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),r.lightMaps.length>0&&s.push("geometry.worldNormal = normalize(vWorldNormal);"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&s.push("computePBRLightMapping(geometry, material, reflectedLight);");for(var d=0,v=r.lights.length;d0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&n.push("out float vFlags;"),n.push("out vec4 vWorldPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&n.push("vFlags = flags;"),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("in vec4 vWorldPosition;"),n){r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),r.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),r.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),r.push(" outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),Do=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in vec2 uv;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("out vec2 vUV;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n.gammaOutput,i=n._sectionPlanesState,a=n._lightsState,s=i.getNumAllocatedSectionPlanes()>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),n.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),r&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),s){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(var l=0,u=i.getNumAllocatedSectionPlanes();l> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(var f=0,p=i.getNumAllocatedSectionPlanes();f 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}for(o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),e=0,t=a.lights.length;e0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),So=$.vec3(),No=$.vec3(),Lo=$.vec3(),xo=$.vec3(),Mo=$.mat4(),Fo=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=So;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=No;if(l){var y=$.transformPoint3(c,l,Lo);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,Mo),(v=xo)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),s.vertexAttribDivisor(this._aModelMatrixCol0.location,1),s.vertexAttribDivisor(this._aModelMatrixCol1.location,1),s.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),s.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),s.drawElementsInstanced(s.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0,o.numInstances),o.edgeIndicesBuf.unbind()):s.drawArraysInstanced(s.POINTS,0,o.positionsBuf.numItems,o.numInstances),s.vertexAttribDivisor(this._aModelMatrixCol0.location,0),s.vertexAttribDivisor(this._aModelMatrixCol1.location,0),s.vertexAttribDivisor(this._aModelMatrixCol2.location,0),s.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&s.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Ho=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._silhouetteRenderer||(this._silhouetteRenderer=new co(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new vo(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new ho(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Oo(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Fo(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new lo(this._scene,!1)),this._colorRenderer}},{key:"colorRendererWithSAO",get:function(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new lo(this._scene,!0)),this._colorRendererWithSAO}},{key:"flatColorRenderer",get:function(){return this._flatColorRenderer||(this._flatColorRenderer=new uo(this._scene,!1)),this._flatColorRenderer}},{key:"flatColorRendererWithSAO",get:function(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new uo(this._scene,!0)),this._flatColorRendererWithSAO}},{key:"pbrRenderer",get:function(){return this._pbrRenderer||(this._pbrRenderer=new To(this._scene,!1)),this._pbrRenderer}},{key:"pbrRendererWithSAO",get:function(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new To(this._scene,!0)),this._pbrRendererWithSAO}},{key:"colorTextureRenderer",get:function(){return this._colorTextureRenderer||(this._colorTextureRenderer=new Do(this._scene,!1)),this._colorTextureRenderer}},{key:"colorTextureRendererWithSAO",get:function(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new Do(this._scene,!0)),this._colorTextureRendererWithSAO}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new co(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new mo(this._scene)),this._depthRenderer}},{key:"normalsRenderer",get:function(){return this._normalsRenderer||(this._normalsRenderer=new wo(this._scene)),this._normalsRenderer}},{key:"edgesRenderer",get:function(){return this._edgesRenderer||(this._edgesRenderer=new po(this._scene)),this._edgesRenderer}},{key:"edgesColorRenderer",get:function(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Ao(this._scene)),this._edgesColorRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new vo(this._scene)),this._pickMeshRenderer}},{key:"pickNormalsRenderer",get:function(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Io(this._scene)),this._pickNormalsRenderer}},{key:"pickNormalsFlatRenderer",get:function(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new bo(this._scene)),this._pickNormalsFlatRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new ho(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new yo(this._scene)),this._occlusionRenderer}},{key:"shadowRenderer",get:function(){return this._shadowRenderer||(this._shadowRenderer=new go(this._scene)),this._shadowRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Oo(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Fo(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Uo={};var Go=new Uint8Array(4),ko=new Float32Array(1),jo=$.vec4([0,0,0,1]),Vo=new Float32Array(3),Qo=$.vec3(),Wo=$.vec3(),zo=$.vec3(),Ko=$.vec3(),Yo=$.vec3(),Xo=$.vec3(),qo=$.vec3(),Jo=new Float32Array(4),Zo=function(){function e(t){var n,r,i;b(this,e),console.info("Creating VBOInstancingTrianglesLayer"),this.model=t.model,this.sortId="TrianglesInstancingLayer"+(t.solid?"-solid":"-surface")+(t.normals?"-normals":"-autoNormals"),this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Uo[r])||(i=new Ho(n),Uo[r]=i,i._compile(),i.eagerCreateRenders(),n.on("compile",(function(){i._compile(),i.eagerCreateRenders()})),n.on("destroyed",(function(){delete Uo[r],i._destroy()}))),i),this._aabb=$.collapseAABB3(),this._state=new zt({numInstances:0,obb:$.OBB3(),origin:$.vec3(),geometry:t.geometry,textureSet:t.textureSet,pbrSupported:!1,positionsDecodeMatrix:t.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=t.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrix=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,t.origin&&this._state.origin.set(t.origin),this._finalized=!1,this.solid=!!t.solid,this.numIndices=t.geometry.numIndices}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0){e.colorsBuf=new Pt(r,r.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,r.DYNAMIC_DRAW,!1),this._colors=[]}if(this._metallicRoughness.length>0){var s=new Uint8Array(this._metallicRoughness);e.metallicRoughnessBuf=new Pt(r,r.ARRAY_BUFFER,s,this._metallicRoughness.length,2,r.STATIC_DRAW,!1)}if(a>0){e.flagsBuf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(a),a,1,r.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){e.offsetsBuf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,r.DYNAMIC_DRAW,!1),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){e.positionsBuf=new Pt(r,r.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,r.STATIC_DRAW,!1),e.positionsDecodeMatrix=$.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){var o=new Uint8Array(t.colorsCompressed);e.colorsBuf=new Pt(r,r.ARRAY_BUFFER,o,o.length,4,r.STATIC_DRAW,!1)}if(t.uvCompressed&&t.uvCompressed.length>0){var l=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new Pt(r,r.ARRAY_BUFFER,l,l.length,2,r.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new Pt(r,r.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,r.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new Pt(r,r.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,r.STATIC_DRAW)),this._modelMatrixCol0.length>0){var u=!1;e.modelMatrixCol0Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,r.STATIC_DRAW,u),e.modelMatrixCol1Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,r.STATIC_DRAW,u),e.modelMatrixCol2Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,r.STATIC_DRAW,u),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,r.STATIC_DRAW,u),e.modelNormalMatrixCol1Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,r.STATIC_DRAW,u),e.modelNormalMatrixCol2Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,r.STATIC_DRAW,u),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){e.pickColorsBuf=new Pt(r,r.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,r.STATIC_DRAW,!1),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&n&&n.colorTexture&&n.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!n&&!!n.colorTexture,this._state.geometry=null,this._finalized=!0}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";Go[0]=t[0],Go[1]=t[1],Go[2]=t[2],Go[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Go,4*e)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){if(!this._finalized)throw"Not finalized";var r=!!(t&Me),i=!!(t&ke),a=!!(t&je),s=!!(t&Ve),o=!!(t&Qe),l=!!(t&He),u=!!(t&Fe),c=0;c|=!r||u||i||a&&!this.model.scene.highlightMaterial.glowThrough||s&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,c|=(!r||u?es.NOT_RENDERED:s?es.SILHOUETTE_SELECTED:a?es.SILHOUETTE_HIGHLIGHTED:i?es.SILHOUETTE_XRAYED:es.NOT_RENDERED)<<4,c|=(!r||u?es.NOT_RENDERED:s?es.EDGES_SELECTED:a?es.EDGES_HIGHLIGHTED:i?es.EDGES_XRAYED:o?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED)<<8,c|=(r&&!u&&l?es.PICK:es.NOT_RENDERED)<<12,c|=(t&Ue?1:0)<<16,ko[0]=c,this._state.flagsBuf&&this._state.flagsBuf.setData(ko,e)}},{key:"setOffset",value:function(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Vo[0]=t[0],Vo[1]=t[1],Vo[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(Vo,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}},{key:"getEachVertex",value:function(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;var n=this._state,r=n.geometry,i=this._portions[e];if(i)for(var a=r.quantizedPositions,s=n.origin,o=i.offset,l=s[0]+o[0],u=s[1]+o[1],c=s[2]+o[2],f=jo,p=i.matrix,A=this.model.sceneModelMatrix,d=n.positionsDecodeMatrix,v=0,h=a.length;vy)&&(y=P,r.set(m),i&&$.triangleNormal(d,v,h,i),I=!0)}}return I&&i&&($.transformVec3(o.normalMatrix,i,i),$.transformVec3(this.model.worldNormalMatrix,i,i),$.normalizeVec3(i)),I}},{key:"destroy",value:function(){var e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}]),e}(),$o=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;t.drawElements(t.LINES,n.indicesBuf.numItems,n.indicesBuf.itemType,0),i&&r.drawElements++}}]),n}(),el=function(e){h(n,$o);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Lines batching color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines batching color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),tl=function(e){h(n,$o);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Lines batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines batching silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}]),n}(),nl=$.vec3(),rl=$.vec3(),il=$.vec3(),al=$.vec3(),sl=$.mat4(),ol=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=nl;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=rl;if(l){var y=il;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,sl),(v=al)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),o.indicesBuf.bind(),s.drawElements(s.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),ll=$.vec3(),ul=$.vec3(),cl=$.vec3(),fl=$.vec3(),pl=$.mat4(),Al=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=ll;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=ul;if(l){var y=cl;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,pl),(v=fl)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.indicesBuf.bind(),s.drawElements(s.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()):s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;var n=[];return n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),dl=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new el(this._scene,!1)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new tl(this._scene)),this._silhouetteRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new ol(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Al(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),vl={};var hl=P((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e6;b(this,e),t>5e6&&(t=5e6),this.maxVerts=t,this.maxIndices=3*t,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]})),Il=function(){function e(t){var n,r,i;b(this,e),console.info("Creating VBOBatchingLinesLayer"),this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=vl[r])||(i=new dl(n),vl[r]=i,i._compile(),n.on("compile",(function(){i._compile()})),n.on("destroyed",(function(){delete vl[r],i._destroy()}))),i),this.model=t.model,this._buffer=new hl(t.maxGeometryBatchSize),this._scratchMemory=t.scratchMemory,this._state=new zt({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:$.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=$.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,t.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(t.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,t.origin&&(this._state.origin=$.vec3(t.origin))}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){var r=new Uint16Array(n.positions);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,r,n.positions.length,3,t.STATIC_DRAW)}else{var i=zs(new Float32Array(n.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,i,n.positions.length,3,t.STATIC_DRAW)}if(n.colors.length>0){var a=new Uint8Array(n.colors);e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,a,n.colors.length,4,t.DYNAMIC_DRAW,!1)}if(n.colors.length>0){var s=n.colors.length/4,o=new Float32Array(s);e.flagsBuf=new Pt(t,t.ARRAY_BUFFER,o,o.length,1,t.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&n.offsets.length>0){var l=new Float32Array(n.offsets);e.offsetsBuf=new Pt(t,t.ARRAY_BUFFER,l,n.offsets.length,3,t.DYNAMIC_DRAW)}if(n.indices.length>0){var u=new Uint32Array(n.indices);e.indicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,u,n.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,!0)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";for(var n=2*e,r=4*this._portions[n],i=4*this._portions[n+1],a=this._scratchMemory.getUInt8Array(i),s=t[0],o=t[1],l=t[2],u=t[3],c=0;c3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=2*e,o=this._portions[s],l=this._portions[s+1],u=o,c=l,f=!!(t&Me),p=!!(t&ke),A=!!(t&je),d=!!(t&Ve),v=!!(t&He),h=!!(t&Fe);i=!f||h||p||A&&!this.model.scene.highlightMaterial.glowThrough||d&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!f||h?es.NOT_RENDERED:d?es.SILHOUETTE_SELECTED:A?es.SILHOUETTE_HIGHLIGHTED:p?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var I=f&&!h&&v?es.PICK:es.NOT_RENDERED,y=t&Ue?1:0;if(r){this._deferredFlagValues||(this._deferredFlagValues=new Float32Array(this._numVerts));for(var m=u,w=u+c;m0,n=[];return n.push("#version 300 es"),n.push("// Lines instancing color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 lightAmbient;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Lines instancing color fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return this._withSAO?(a.push(" float viewportWidth = uSAOParams[0];"),a.push(" float viewportHeight = uSAOParams[1];"),a.push(" float blendCutoff = uSAOParams[2];"),a.push(" float blendFactor = uSAOParams[3];"),a.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),a.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),a.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):a.push(" outColor = vColor;"),n.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("}"),a}}]),n}(),wl=function(e){h(n,yl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Lines instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 color;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines instancing silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}]),n}(),gl=$.vec3(),El=$.vec3(),Tl=$.vec3();$.vec3();var bl=$.mat4(),Dl=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.canvas.gl,s=i.camera,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||s.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=gl;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=El;if(l){var I=$.transformPoint3(c,l,Tl);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,bl),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,v),a.uniform1i(this._uRenderPass,n),a.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(s.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1)),o.indicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind(),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Pl=$.vec3(),Cl=$.vec3(),_l=$.vec3();$.vec3();var Rl=$.mat4(),Bl=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=Pl;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=Cl;if(l){var I=$.transformPoint3(c,l,_l);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,Rl),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,v),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),s.vertexAttribDivisor(this._aModelMatrixCol0.location,1),s.vertexAttribDivisor(this._aModelMatrixCol1.location,1),s.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),s.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.indicesBuf.bind(),s.drawElementsInstanced(s.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind()):s.drawArraysInstanced(s.POINTS,0,o.positionsBuf.numItems,o.numInstances),s.vertexAttribDivisor(this._aModelMatrixCol0.location,0),s.vertexAttribDivisor(this._aModelMatrixCol1.location,0),s.vertexAttribDivisor(this._aModelMatrixCol2.location,0),s.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&s.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Ol=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._snapInitRenderer||(this._snapInitRenderer=new Dl(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Bl(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new ml(this._scene)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new wl(this._scene)),this._silhouetteRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Dl(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Bl(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Sl={};var Nl=new Uint8Array(4),Ll=new Float32Array(1),xl=new Float32Array(3),Ml=new Float32Array(4),Fl=function(){function e(t){var n,r,i;b(this,e),console.info("VBOInstancingLinesLayer"),this.model=t.model,this.material=t.material,this.sortId="LinesInstancingLayer",this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Sl[r])||(i=new Ol(n),Sl[r]=i,i._compile(),n.on("compile",(function(){i._compile()})),n.on("destroyed",(function(){delete Sl[r],i._destroy()}))),i),this._aabb=$.collapseAABB3(),this._state=new zt({obb:$.OBB3(),numInstances:0,origin:null,geometry:t.geometry,positionsDecodeMatrix:t.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=t.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,t.origin&&(this._state.origin=$.vec3(t.origin)),this._finalized=!1}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0){this._state.colorsBuf=new Pt(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,!1),this._colors=[]}if(i>0){this._state.flagsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(i),i,1,e.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){this._state.offsetsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,!1),this._offsets=[]}if(n.colorsCompressed&&n.colorsCompressed.length>0){var a=new Uint8Array(n.colorsCompressed);t.colorsBuf=new Pt(e,e.ARRAY_BUFFER,a,a.length,4,e.STATIC_DRAW,!1)}if(n.positionsCompressed&&n.positionsCompressed.length>0){t.positionsBuf=new Pt(e,e.ARRAY_BUFFER,n.positionsCompressed,n.positionsCompressed.length,3,e.STATIC_DRAW,!1),t.positionsDecodeMatrix=$.mat4(n.positionsDecodeMatrix)}if(n.indices&&n.indices.length>0&&(t.indicesBuf=new Pt(e,e.ELEMENT_ARRAY_BUFFER,new Uint32Array(n.indices),n.indices.length,1,e.STATIC_DRAW),t.numIndices=n.indices.length),this._modelMatrixCol0.length>0){var s=!1;this._state.modelMatrixCol0Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,s),this._state.modelMatrixCol1Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,s),this._state.modelMatrixCol2Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,s),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";Nl[0]=t[0],Nl[1]=t[1],Nl[2]=t[2],Nl[3]=t[3],this._state.colorsBuf.setData(Nl,4*e,4)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){if(!this._finalized)throw"Not finalized";var r=!!(t&Me),i=!!(t&ke),a=!!(t&je),s=!!(t&Ve),o=!!(t&Qe),l=!!(t&He),u=!!(t&Fe),c=0;c|=!r||u||i||a&&!this.model.scene.highlightMaterial.glowThrough||s&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,c|=(!r||u?es.NOT_RENDERED:s?es.SILHOUETTE_SELECTED:a?es.SILHOUETTE_HIGHLIGHTED:i?es.SILHOUETTE_XRAYED:es.NOT_RENDERED)<<4,c|=(!r||u?es.NOT_RENDERED:s?es.EDGES_SELECTED:a?es.EDGES_HIGHLIGHTED:i?es.EDGES_XRAYED:o?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED)<<8,c|=(r&&!u&&l?es.PICK:es.NOT_RENDERED)<<12,c|=(t&Ue?255:0)<<16,Ll[0]=c,this._state.flagsBuf.setData(Ll,e)}},{key:"setOffset",value:function(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(xl[0]=t[0],xl[1]=t[1],xl[2]=t[2],this._state.offsetsBuf.setData(xl,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}},{key:"setMatrix",value:function(e,t){if(!this._finalized)throw"Not finalized";var n=4*e;Ml[0]=t[0],Ml[1]=t[4],Ml[2]=t[8],Ml[3]=t[12],this._state.modelMatrixCol0Buf.setData(Ml,n),Ml[0]=t[1],Ml[1]=t[5],Ml[2]=t[9],Ml[3]=t[13],this._state.modelMatrixCol1Buf.setData(Ml,n),Ml[0]=t[2],Ml[1]=t[6],Ml[2]=t[10],Ml[3]=t[14],this._state.modelMatrixCol2Buf.setData(Ml,n)}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT)}},{key:"drawDepth",value:function(e,t){}},{key:"drawNormals",value:function(e,t){}},{key:"drawSilhouetteXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_XRAYED)}},{key:"drawSilhouetteHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_HIGHLIGHTED)}},{key:"drawSilhouetteSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_SELECTED)}},{key:"drawEdgesColorOpaque",value:function(e,t){}},{key:"drawEdgesColorTransparent",value:function(e,t){}},{key:"drawEdgesXRayed",value:function(e,t){}},{key:"drawEdgesHighlighted",value:function(e,t){}},{key:"drawEdgesSelected",value:function(e,t){}},{key:"drawSnapInit",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,es.PICK)}},{key:"drawSnap",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,es.PICK)}},{key:"drawOcclusion",value:function(e,t){}},{key:"drawShadow",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){}},{key:"drawPickDepths",value:function(e,t){}},{key:"drawPickNormals",value:function(e,t){}},{key:"destroy",value:function(){var e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}]),e}(),Hl=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;t.drawArrays(t.POINTS,0,n.positionsBuf.numItems),i&&r.drawArrays++}}]),n}(),Ul=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial,r=[];return r.push("#version 300 es"),r.push("// Points batching color vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),n.filterIntensity&&r.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),n.filterIntensity&&(r.push("float intensity = float(color.a) / 255.0;"),r.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {")),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),n.filterIntensity&&r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),Gl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batching silhouette vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),this._addMatricesUniformBlockLines(r),r.push("uniform vec4 color;"),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),r.push("if (silhouetteFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Points batching silhouette vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e 1.0) {"),a.push(" discard;"),a.push(" }")),i){for(a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return n.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("outColor = color;"),a.push("}"),a}}]),n}(),kl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batching pick mesh vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 pickColor;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vPickColor;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push(" } else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),r.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = remapClipPos(clipPos);"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("gl_PointSize += 10.0;"),r.push(" }"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching pick mesh vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vPickColor; "),r.push("}"),r}}]),n}(),jl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batched pick depth vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vViewPosition;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push(" } else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vViewPosition = viewPosition;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = remapClipPos(clipPos);"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("gl_PointSize += 10.0;"),r.push(" }"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batched pick depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),Vl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batching occlusion vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push(" } else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push(" gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push(" }"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching occlusion fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),r.push("}"),r}}]),n}(),Ql=$.vec3(),Wl=$.vec3(),zl=$.vec3(),Kl=$.vec3(),Yl=$.mat4(),Xl=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=Ql;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=Wl;if(l){var y=zl;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,Yl),(v=Kl)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),ql=$.vec3(),Jl=$.vec3(),Zl=$.vec3(),$l=$.vec3(),eu=$.mat4(),tu=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=ql;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=Jl;if(l){var y=Zl;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,eu),(v=$l)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;var n=[];return n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),nu=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new Ul(this._scene)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Gl(this._scene)),this._silhouetteRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new kl(this._scene)),this._pickMeshRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new jl(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new Vl(this._scene)),this._occlusionRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Xl(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new tu(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),ru={};var iu=P((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e6;b(this,e),t>5e6&&(t=5e6),this.maxVerts=t,this.maxIndices=3*t,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]})),au=function(){function e(t){b(this,e),console.info("Creating VBOBatchingPointsLayer"),this.model=t.model,this.sortId="PointsBatchingLayer",this.layerIndex=t.layerIndex,this._renderers=function(e){var t=e.id,n=ru[t];return n||(n=new nu(e),ru[t]=n,n._compile(),e.on("compile",(function(){n._compile()})),e.on("destroyed",(function(){delete ru[t],n._destroy()}))),n}(t.model.scene),this._buffer=new iu(t.maxGeometryBatchSize),this._scratchMemory=t.scratchMemory,this._state=new zt({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:$.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=$.collapseAABB3(),this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,t.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(t.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,t.origin&&(this._state.origin=$.vec3(t.origin))}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){var r=new Uint16Array(n.positions);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,r,n.positions.length,3,t.STATIC_DRAW)}else{var i=zs(new Float32Array(n.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,i,n.positions.length,3,t.STATIC_DRAW)}if(n.colors.length>0){var a=new Uint8Array(n.colors);e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,a,n.colors.length,4,t.STATIC_DRAW,!1)}if(n.positions.length>0){var s=n.positions.length/3,o=new Float32Array(s);e.flagsBuf=new Pt(t,t.ARRAY_BUFFER,o,o.length,1,t.DYNAMIC_DRAW,!1)}if(n.pickColors.length>0){var l=new Uint8Array(n.pickColors);e.pickColorsBuf=new Pt(t,t.ARRAY_BUFFER,l,n.pickColors.length,4,t.STATIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&n.offsets.length>0){var u=new Float32Array(n.offsets);e.offsetsBuf=new Pt(t,t.ARRAY_BUFFER,u,n.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized"}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";for(var n=2*e,r=4*this._portions[n],i=4*this._portions[n+1],a=this._scratchMemory.getUInt8Array(i),s=t[0],o=t[1],l=t[2],u=0;u0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing color vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),n.filterIntensity&&r.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),n.filterIntensity&&(r.push("float intensity = float(color.a) / 255.0;"),r.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {")),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),n.filterIntensity&&r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),lu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing silhouette vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 color;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),r.push("uniform vec4 silhouetteColor;"),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),r.push("if (silhouetteFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),uu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing pick mesh vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 pickColor;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vPickColor;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),r.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),r.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing pick mesh fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vPickColor; "),r.push("}"),r}}]),n}(),cu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing pick depth vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vViewPosition;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push(" vViewPosition = viewPosition;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),r.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = remapClipPos(clipPos);"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing pick depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),fu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing occlusion vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 color;"),r.push("in float flags;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing occlusion vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),pu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing depth vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Points instancing depth vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e 1.0) {"),a.push(" discard;"),a.push(" }")),i){for(a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return a.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),n.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("}"),a}}]),n}(),Au=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry shadow drawing vertex shader"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("bool visible = (colorFlag > 0);"),n.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),n.push("if (!visible || transparent) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n.push("gl_PointSize = pointSize;"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }"),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),du=$.vec3(),vu=$.vec3(),hu=$.vec3();$.vec3();var Iu=$.mat4(),yu=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.canvas.gl,s=i.camera,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||s.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=du;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=vu;if(l){var I=$.transformPoint3(c,l,hu);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,Iu),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,v),a.uniform1i(this._uRenderPass,n),a.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(s.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1)),a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),mu=$.vec3(),wu=$.vec3(),gu=$.vec3();$.vec3();var Eu=$.mat4(),Tu=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=mu;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=wu;if(l){var I=$.transformPoint3(c,l,gu);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,Eu),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,v),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),s.vertexAttribDivisor(this._aModelMatrixCol0.location,1),s.vertexAttribDivisor(this._aModelMatrixCol1.location,1),s.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),s.vertexAttribDivisor(this._aFlags.location,1),s.drawArraysInstanced(s.POINTS,0,o.positionsBuf.numItems,o.numInstances),s.vertexAttribDivisor(this._aModelMatrixCol0.location,0),s.vertexAttribDivisor(this._aModelMatrixCol1.location,0),s.vertexAttribDivisor(this._aModelMatrixCol2.location,0),s.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&s.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),bu=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new ou(this._scene,!1)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new lu(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new pu(this._scene)),this._depthRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new uu(this._scene)),this._pickMeshRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new cu(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new fu(this._scene)),this._occlusionRenderer}},{key:"shadowRenderer",get:function(){return this._shadowRenderer||(this._shadowRenderer=new Au(this._scene)),this._shadowRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new yu(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Tu(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Du={};var Pu=new Uint8Array(4),Cu=new Float32Array(1),_u=new Float32Array(3),Ru=new Float32Array(4),Bu=function(){function e(t){var n,r,i;b(this,e),console.info("VBOInstancingPointsLayer"),this.model=t.model,this.material=t.material,this.sortId="PointsInstancingLayer",this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Du[r])||(i=new bu(n),Du[r]=i,i._compile(),n.on("compile",(function(){i._compile()})),n.on("destroyed",(function(){delete Du[r],i._destroy()}))),i),this._aabb=$.collapseAABB3(),this._state=new zt({obb:$.OBB3(),numInstances:0,origin:t.origin?$.vec3(t.origin):null,geometry:t.geometry,positionsDecodeMatrix:t.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=t.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0){n.flagsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){n.offsetsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,!1),this._offsets=[]}if(r.positionsCompressed&&r.positionsCompressed.length>0){n.positionsBuf=new Pt(e,e.ARRAY_BUFFER,r.positionsCompressed,r.positionsCompressed.length,3,e.STATIC_DRAW,!1),n.positionsDecodeMatrix=$.mat4(r.positionsDecodeMatrix)}if(r.colorsCompressed&&r.colorsCompressed.length>0){var i=new Uint8Array(r.colorsCompressed);n.colorsBuf=new Pt(e,e.ARRAY_BUFFER,i,i.length,4,e.STATIC_DRAW,!1)}if(this._modelMatrixCol0.length>0){var a=!1;n.modelMatrixCol0Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,a),n.modelMatrixCol1Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,a),n.modelMatrixCol2Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,a),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){n.pickColorsBuf=new Pt(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,!1),this._pickColors=[]}n.geometry=null,this._finalized=!0}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";Pu[0]=t[0],Pu[1]=t[1],Pu[2]=t[2],this._state.colorsBuf.setData(Pu,3*e)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){if(!this._finalized)throw"Not finalized";var r=!!(t&Me),i=!!(t&ke),a=!!(t&je),s=!!(t&Ve),o=!!(t&Qe),l=!!(t&He),u=!!(t&Fe),c=0;c|=!r||u||i||a&&!this.model.scene.highlightMaterial.glowThrough||s&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,c|=(!r||u?es.NOT_RENDERED:s?es.SILHOUETTE_SELECTED:a?es.SILHOUETTE_HIGHLIGHTED:i?es.SILHOUETTE_XRAYED:es.NOT_RENDERED)<<4,c|=(!r||u?es.NOT_RENDERED:s?es.EDGES_SELECTED:a?es.EDGES_HIGHLIGHTED:i?es.EDGES_XRAYED:o?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED)<<8,c|=(r&&!u&&l?es.PICK:es.NOT_RENDERED)<<12,c|=(t&Ue?255:0)<<16,Cu[0]=c,this._state.flagsBuf.setData(Cu,e)}},{key:"setOffset",value:function(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(_u[0]=t[0],_u[1]=t[1],_u[2]=t[2],this._state.offsetsBuf.setData(_u,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}},{key:"setMatrix",value:function(e,t){if(!this._finalized)throw"Not finalized";var n=4*e;Ru[0]=t[0],Ru[1]=t[4],Ru[2]=t[8],Ru[3]=t[12],this._state.modelMatrixCol0Buf.setData(Ru,n),Ru[0]=t[1],Ru[1]=t[5],Ru[2]=t[9],Ru[3]=t[13],this._state.modelMatrixCol1Buf.setData(Ru,n),Ru[0]=t[2],Ru[1]=t[6],Ru[2]=t[10],Ru[3]=t[14],this._state.modelMatrixCol2Buf.setData(Ru,n)}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT)}},{key:"drawDepth",value:function(e,t){}},{key:"drawNormals",value:function(e,t){}},{key:"drawSilhouetteXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_XRAYED)}},{key:"drawSilhouetteHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_HIGHLIGHTED)}},{key:"drawSilhouetteSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_SELECTED)}},{key:"drawEdgesColorOpaque",value:function(e,t){}},{key:"drawEdgesColorTransparent",value:function(e,t){}},{key:"drawEdgesHighlighted",value:function(e,t){}},{key:"drawEdgesSelected",value:function(e,t){}},{key:"drawEdgesXRayed",value:function(e,t){}},{key:"drawOcclusion",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawShadow",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,es.PICK)}},{key:"drawPickDepths",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,es.PICK)}},{key:"drawPickNormals",value:function(e,t){}},{key:"drawSnapInit",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,es.PICK)}},{key:"drawSnap",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,es.PICK)}},{key:"destroy",value:function(){var e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}]),e}(),Ou=$.vec3(),Su=$.vec3(),Nu=$.mat4(),Lu=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate,A=i.viewMatrix;if(this._program||(this._allocate(),!this.errors)){var d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uPerObjectDecodeMatrix,this._uPerVertexPosition,this.uPerObjectColorAndFlags,this._uPerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=Ou;if(v){var y=$.transformPoint3(f,u,Su);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],d=Oe(A,I,Nu)}else d=A;if(s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,8),s.drawArrays(s.LINES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,16),s.drawArrays(s.LINES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,32),s.drawArrays(s.LINES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// LinesDataTextureColorRenderer"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled,n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uPerObjectDecodeMatrix;"),n.push("uniform highp sampler2D uPerObjectMatrix;"),n.push("uniform lowp usampler2D uPerObjectColorAndFlags;"),n.push("uniform mediump usampler2D uPerVertexPosition;"),n.push("uniform highp usampler2D uPerLineIndices;"),n.push("uniform mediump usampler2D uPerLineObject;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push(" int lineIndex = gl_VertexID / 2;"),n.push(" int h_packed_object_id_index = (lineIndex >> 3) & 4095;"),n.push(" int v_packed_object_id_index = (lineIndex >> 3) >> 12;"),n.push(" int objectIndex = int(texelFetch(uPerLineObject, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push(" ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push(" if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push(" } else {"),n.push(" ivec4 packedVertexBase = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push(" ivec4 packedLineIndexBaseOffset = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push(" int lineIndexBaseOffset = (packedLineIndexBaseOffset.r << 24) + (packedLineIndexBaseOffset.g << 16) + (packedLineIndexBaseOffset.b << 8) + packedLineIndexBaseOffset.a;"),n.push(" int h_index = (lineIndex - lineIndexBaseOffset) & 4095;"),n.push(" int v_index = (lineIndex - lineIndexBaseOffset) >> 12;"),n.push(" ivec3 vertexIndices = ivec3(texelFetch(uPerLineIndices, ivec2(h_index, v_index), 0));"),n.push(" ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push(" int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push(" int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push(" mat4 objectInstanceMatrix = mat4 (texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push(" mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push(" vec3 position = vec3(texelFetch(uPerVertexPosition, ivec2(indexPositionH, indexPositionV), 0));"),n.push(" uvec4 color = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push(" if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push(" };"),n.push(" vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push(" vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push(" vFragDepth = 1.0 + clipPos.w;"),n.push(" isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push(" gl_Position = clipPos;"),n.push(" vec4 rgb = vec4(color.rgba);"),n.push(" vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// LinesDataTextureColorRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("flat in uint vFlags2;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 0u;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vColor;"),r.push("}"),r}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),xu=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null)}},{key:"eagerCreateRenders",value:function(){}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new Lu(this._scene,!1)),this._colorRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy()}}]),e}(),Mu={};var Fu=P((function e(){b(this,e),this.positionsCompressed=[],this.lenPositionsCompressed=0,this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perLineNumberPortionId8Bits=[],this.perLineNumberPortionId16Bits=[],this.perLineNumberPortionId32Bits=[]})),Hu=function(){function e(){b(this,e),this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerLineIdPortionIds8Bits=null,this.texturePerLineIdPortionIds16Bits=null,this.texturePerLineIdPortionIds32Bits=null,this.texturePerLineIdIndices8Bits=null,this.texturePerLineIdIndices16Bits=null,this.texturePerLineIdIndices32Bits=null,this.textureModelMatrices=null}return P(e,[{key:"finalize",value:function(){this.indicesPerBitnessTextures={8:this.texturePerLineIdIndices8Bits,16:this.texturePerLineIdIndices16Bits,32:this.texturePerLineIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerLineIdPortionIds8Bits,16:this.texturePerLineIdPortionIds16Bits,32:this.texturePerLineIdPortionIds32Bits}}},{key:"bindCommonTextures",value:function(e,t,n,r,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,n,2),this.texturePerObjectColorsAndFlags.bindTexture(e,r,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}},{key:"bindLineIndicesTextures",value:function(e,t,n,r){this.indicesPortionIdsPerBitnessTextures[r].bindTexture(e,t,5),this.indicesPerBitnessTextures[r].bindTexture(e,n,6)}}]),e}(),Uu=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;b(this,e),this._gl=t,this._texture=n,this._textureWidth=r,this._textureHeight=i,this._textureData=a}return P(e,[{key:"bindTexture",value:function(e,t,n){return e.bindTexture(t,this,n)}},{key:"bind",value:function(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}},{key:"unbind",value:function(e){}}]),e}(),Gu={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalLines:0,totalLines8Bits:0,totalLines16Bits:0,totalLines32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Gu,null,4));var e=0;Object.keys(Gu).forEach((function(t){t.startsWith("size")&&(e+=Gu[t])})),console.log("Total size ".concat(e," bytes (").concat((e/1e3/1e3).toFixed(2)," MB)")),console.log("Avg bytes / triangle: ".concat((e/Gu.totalLines).toFixed(2)));var t={};Object.keys(Gu).forEach((function(n){n.startsWith("size")&&(t[n]="".concat((Gu[n]/e*100).toFixed(2)," % of total"))})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};var ku=function(){function e(){b(this,e)}return P(e,[{key:"disableBindedTextureFiltering",value:function(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}},{key:"generateTextureForColorsAndFlags",value:function(e,t,n,r,i){var a=t.length;this.numPortions=a;var s=4096,o=Math.ceil(a/512);if(0===o)throw"texture height===0";var l=new Uint8Array(16384*o);Gu.sizeDataColorsAndFlags+=l.byteLength,Gu.numberOfTextures++;for(var u=0;u>24&255,r[u]>>16&255,r[u]>>8&255,255&r[u]],32*u+16),l.set([i[u]>>24&255,i[u]>>16&255,i[u]>>8&255,255&i[u]],32*u+20);var c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,s,o),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,o,e.RGBA_INTEGER,e.UNSIGNED_BYTE,l,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,c,s,o,l)}},{key:"generateTextureForObjectOffsets",value:function(e,t){var n=512,r=Math.ceil(t/n);if(0===r)throw"texture height===0";var i=new Float32Array(1536*r).fill(0);Gu.sizeDataTextureOffsets+=i.byteLength,Gu.numberOfTextures++;var a=e.createTexture();return e.bindTexture(e.TEXTURE_2D,a),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,n,r),e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,r,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,a,n,r,i)}},{key:"generateTextureForInstancingMatrices",value:function(e,t){var n=t.length;if(0===n)throw"num instance matrices===0";var r=2048,i=Math.ceil(n/512),a=new Float32Array(8192*i);Gu.numberOfTextures++;for(var s=0;s65536&&Gu.cannotCreatePortion.because10BitsObjectId++;var n=this._numPortions+t<=65536,r=void 0!==e.geometryId&&null!==e.geometryId?"".concat(e.geometryId,"#").concat(0):"".concat(e.id,"#").concat(0);if(!this._bucketGeometries[r]){var i=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits),a=0,s=0;e.buckets.forEach((function(e){a+=e.positionsCompressed.length/3,s+=e.indices.length/2})),(this._state.numVertices+a>4096*Vu||i+s>4096*Vu)&&Gu.cannotCreatePortion.becauseTextureSize++,n&&(n=this._state.numVertices+a<=4096*Vu&&i+s<=4096*Vu)}return n}},{key:"createPortion",value:function(e,t){var n=this;if(this._finalized)throw"Already finalized";var r=[];t.buckets.forEach((function(e,i){var a=void 0!==t.geometryId&&null!==t.geometryId?"".concat(t.geometryId,"#").concat(i):"".concat(t.id,"#").concat(i),s=n._bucketGeometries[a];s||(s=n._createBucketGeometry(t,e),n._bucketGeometries[a]=s);var o=n._createSubPortion(t,s,e);r.push(o)}));var i=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(r),this.model.numPortions++,this._meshes.push(e),i}},{key:"_createBucketGeometry",value:function(e,t){if(t.indices){var n=8*Math.ceil(t.indices.length/2/8)*2;Gu.overheadSizeAlignementIndices+=2*(n-t.indices.length);var r=new Uint32Array(n);r.fill(0),r.set(t.indices),t.indices=r}var i=t.positionsCompressed,a=t.indices,s=this._buffer;s.positionsCompressed.push(i);var o,l=s.lenPositionsCompressed/3,u=i.length/3;s.lenPositionsCompressed+=i.length;var c,f=0;a&&(f=a.length/2,u<=256?(c=s.indices8Bits,o=s.lenIndices8Bits/2,s.lenIndices8Bits+=a.length):u<=65536?(c=s.indices16Bits,o=s.lenIndices16Bits/2,s.lenIndices16Bits+=a.length):(c=s.indices32Bits,o=s.lenIndices32Bits/2,s.lenIndices32Bits+=a.length),c.push(a));return this._state.numVertices+=u,Gu.numberOfGeometries++,{vertexBase:l,numVertices:u,numLines:f,indicesBase:o}}},{key:"_createSubPortion",value:function(e,t){var n,r=e.color,i=e.colors,a=e.opacity,s=e.meshMatrix,o=e.pickColor,l=this._buffer,u=this._state;l.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),l.perObjectInstancePositioningMatrices.push(s||Yu),l.perObjectSolid.push(!!e.solid),i?l.perObjectColors.push([255*i[0],255*i[1],255*i[2],255]):r&&l.perObjectColors.push([r[0],r[1],r[2],a]),l.perObjectPickColors.push(o),l.perObjectVertexBases.push(t.vertexBase),n=t.numVertices<=256?u.numIndices8Bits:t.numVertices<=65536?u.numIndices16Bits:u.numIndices32Bits,l.perObjectIndexBaseOffsets.push(n/2-t.indicesBase);var c=this._subPortions.length;if(t.numLines>0){var f,p=2*t.numLines;t.numVertices<=256?(f=l.perLineNumberPortionId8Bits,u.numIndices8Bits+=p,Gu.totalLines8Bits+=t.numLines):t.numVertices<=65536?(f=l.perLineNumberPortionId16Bits,u.numIndices16Bits+=p,Gu.totalLines16Bits+=t.numLines):(f=l.perLineNumberPortionId32Bits,u.numIndices32Bits+=p,Gu.totalLines32Bits+=t.numLines),Gu.totalLines+=t.numLines;for(var A=0;A0&&(n.texturePerLineIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(r,i.indices8Bits,i.lenIndices8Bits)),i.lenIndices16Bits>0&&(n.texturePerLineIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(r,i.indices16Bits,i.lenIndices16Bits)),i.lenIndices32Bits>0&&(n.texturePerLineIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(r,i.indices32Bits,i.lenIndices32Bits)),n.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(function(){e._deferredSetFlagsDirty&&e._uploadDeferredFlags(),e._numUpdatesInFrame=0}))}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,true),this._setFlags2(e,t,true)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags(),this._setDeferredFlags2()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}},{key:"_beginDeferredFlags",value:function(){this._deferredSetFlagsActive=!0}},{key:"_uploadDeferredFlags",value:function(){if(this._deferredSetFlagsActive=!1,this._deferredSetFlagsDirty){this._deferredSetFlagsDirty=!1;var e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,Wu))}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._portionToSubPortionsMap[e],a=0,s=i.length;a3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=!!(t&Me),o=!!(t&ke),l=!!(t&je),u=!!(t&Ve),c=!!(t&He),f=!!(t&Fe);i=!s||f||o?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!s||f?es.NOT_RENDERED:u?es.SILHOUETTE_SELECTED:l?es.SILHOUETTE_HIGHLIGHTED:o?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var p=s&&!f&&c?es.PICK:es.NOT_RENDERED,A=this._dataTextureState,d=this.model.scene.canvas.gl;Wu[0]=i,Wu[1]=a,Wu[3]=p,A.texturePerObjectColorsAndFlags._textureData.set(Wu,32*e+8),this._deferredSetFlagsActive||r?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),d.bindTexture(d.TEXTURE_2D,A.texturePerObjectColorsAndFlags._texture),d.texSubImage2D(d.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,d.RGBA_INTEGER,d.UNSIGNED_BYTE,Wu))}},{key:"_setDeferredFlags",value:function(){}},{key:"_setFlags2",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._portionToSubPortionsMap[e],i=0,a=r.length;i2&&void 0!==arguments[2]&&arguments[2];if(!this._finalized)throw"Not finalized";var r=t&Ue?255:0,i=this._dataTextureState,a=this.model.scene.canvas.gl;Wu[0]=r,Wu[1]=0,Wu[2]=1,Wu[3]=2,i.texturePerObjectColorsAndFlags._textureData.set(Wu,32*e+12),this._deferredSetFlagsActive||n?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),a.bindTexture(a.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),a.texSubImage2D(a.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,a.RGBA_INTEGER,a.UNSIGNED_BYTE,Wu))}},{key:"_setDeferredFlags2",value:function(){}},{key:"setOffset",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectOffsets._texture),r.texSubImage2D(r.TEXTURE_2D,0,0,e,1,1,r.RGB,r.FLOAT,zu))}},{key:"setMatrix",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectInstanceMatrices._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,r.RGBA,r.FLOAT,Qu))}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT)}},{key:"drawDepth",value:function(e,t){}},{key:"drawNormals",value:function(e,t){}},{key:"drawSilhouetteXRayed",value:function(e,t){}},{key:"drawSilhouetteHighlighted",value:function(e,t){}},{key:"drawSilhouetteSelected",value:function(e,t){}},{key:"drawEdgesColorOpaque",value:function(e,t){}},{key:"drawEdgesColorTransparent",value:function(e,t){}},{key:"drawEdgesHighlighted",value:function(e,t){}},{key:"drawEdgesSelected",value:function(e,t){}},{key:"drawEdgesXRayed",value:function(e,t){}},{key:"drawOcclusion",value:function(e,t){}},{key:"drawShadow",value:function(e,t){}},{key:"setPickMatrices",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){}},{key:"drawPickDepths",value:function(e,t){}},{key:"drawSnapInit",value:function(e,t){}},{key:"drawSnap",value:function(e,t){}},{key:"drawPickNormals",value:function(e,t){}},{key:"destroy",value:function(){if(!this._destroyed){var e=this._state;this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}}]),e}(),qu=$.vec3(),Ju=$.vec3(),Zu=$.vec3();$.vec3();var $u=$.vec4(),ec=$.mat4(),tc=function(){function e(t,n){b(this,e),this._scene=t,this._withSAO=n,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate;if(this._program||(this._allocate(),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=qu;if(v){var y=$.transformPoint3(f,u,Ju);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],A=Oe(i.viewMatrix,I,ec),(d=Zu)[0]=i.eye[0]-I[0],d[1]=i.eye[1]-I[1],d[2]=i.eye[2]-I[2]}else A=i.viewMatrix,d=i.eye;if(s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform3fv(this._uCameraEyeRtc,d),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl,n=e._lightsState;if(this._program=new Dt(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);var r=this._program;this._uRenderPass=r.getLocation("renderPass"),this._uLightAmbient=r.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];for(var i=n.lights,a=0,s=i.length;a0,a=[];a.push("#version 300 es"),a.push("// TrianglesDataTextureColorRenderer vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("precision highp usampler2D;"),a.push("precision highp isampler2D;"),a.push("precision highp sampler2D;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("precision mediump usampler2D;"),a.push("precision mediump isampler2D;"),a.push("precision mediump sampler2D;"),a.push("#endif"),a.push("uniform int renderPass;"),a.push("uniform mat4 sceneModelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),a.push("uniform highp sampler2D uTexturePerObjectMatrix;"),a.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),a.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),a.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),a.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),a.push("uniform vec3 uCameraEyeRtc;"),a.push("vec3 positions[3];"),t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("out float isPerspective;")),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("uniform vec4 lightAmbient;");for(var s=0,o=r.lights.length;s> 3) & 4095;"),a.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),a.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),a.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),a.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),a.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),a.push("if (int(flags.x) != renderPass) {"),a.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),a.push(" return;"),a.push("} else {"),a.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),a.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),a.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),a.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),a.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),a.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),a.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),a.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),a.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),a.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),a.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),a.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),a.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),a.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),a.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),a.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),a.push("if (color.a == 0u) {"),a.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),a.push(" return;"),a.push("};"),a.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),a.push("vec3 position;"),a.push("position = positions[gl_VertexID % 3];"),a.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),a.push("if (solid != 1u) {"),a.push("if (isPerspectiveMatrix(projMatrix)) {"),a.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),a.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),a.push("position = positions[2 - (gl_VertexID % 3)];"),a.push("viewNormal = -viewNormal;"),a.push("}"),a.push("} else {"),a.push("if (viewNormal.z < 0.0) {"),a.push("position = positions[2 - (gl_VertexID % 3)];"),a.push("viewNormal = -viewNormal;"),a.push("}"),a.push("}"),a.push("}"),a.push("vec4 worldPosition = sceneModelMatrix * ((objectDecodeAndInstanceMatrix * vec4(position, 1.0))); "),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;");for(var l=0,u=r.lights.length;l0,r=[];if(r.push("#version 300 es"),r.push("// TrianglesDataTextureColorRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),n){r.push("in vec4 vWorldPosition;"),r.push("flat in uint vFlags2;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 0u;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):r.push(" outColor = vColor;"),r.push("}"),r}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),nc=new Float32Array([1,1,1]),rc=$.vec3(),ic=$.vec3(),ac=$.vec3();$.vec3();var sc=$.mat4(),oc=function(){function e(t,n){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate,A=i.viewMatrix;if(this._program||(this._allocate(),!this.errors)){var d,v;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),u||0!==c[0]||0!==c[1]||0!==c[2]){var h=rc;if(u){var I=ic;$.transformPoint3(f,u,I),h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=c[0],h[1]+=c[1],h[2]+=c[2],d=Oe(A,h,sc),(v=ac)[0]=i.eye[0]-h[0],v[1]=i.eye[1]-h[1],v[2]=i.eye[2]-h[2]}else d=A,v=i.eye;if(s.uniform3fv(this._uCameraEyeRtc,v),s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uWorldMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),n===es.SILHOUETTE_XRAYED){var y=r.xrayMaterial._state,m=y.fillColor,w=y.fillAlpha;s.uniform4f(this._uColor,m[0],m[1],m[2],w)}else if(n===es.SILHOUETTE_HIGHLIGHTED){var g=r.highlightMaterial._state,E=g.fillColor,T=g.fillAlpha;s.uniform4f(this._uColor,E[0],E[1],E[2],T)}else if(n===es.SILHOUETTE_SELECTED){var b=r.selectedMaterial._state,D=b.fillColor,P=b.fillAlpha;s.uniform4f(this._uColor,D[0],D[1],D[2],P)}else s.uniform4fv(this._uColor,nc);if(r.logarithmicDepthBufferEnabled){var C=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,C)}var _=r._sectionPlanesState.getNumAllocatedSectionPlanes(),R=r._sectionPlanesState.sectionPlanes.length;if(_>0)for(var B=r._sectionPlanesState.sectionPlanes,O=t.layerIndex*R,S=a.renderFlags,N=0;N<_;N++){var L=this._uSectionPlanes[N];if(L)if(N0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uColor=n.getLocation("color"),this._uWorldMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Triangles dataTexture silhouette vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.y) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("} else {"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags2 = flags2.r;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = color;"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),lc=new Float32Array([0,0,0,1]),uc=$.vec3(),cc=$.vec3();$.vec3();var fc=$.mat4(),pc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=r.position,f=r.rotationMatrix,p=r.rotationMatrixConjugate,A=a.viewMatrix;if(this._program||(this._allocate(t),!this.errors)){var d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=uc;if(v){var y=$.transformPoint3(f,u,cc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],d=Oe(A,I,fc)}else d=A;if(s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix),n===es.EDGES_XRAYED){var m=i.xrayMaterial._state,w=m.edgeColor,g=m.edgeAlpha;s.uniform4f(this._uColor,w[0],w[1],w[2],g)}else if(n===es.EDGES_HIGHLIGHTED){var E=i.highlightMaterial._state,T=E.edgeColor,b=E.edgeAlpha;s.uniform4f(this._uColor,T[0],T[1],T[2],b)}else if(n===es.EDGES_SELECTED){var D=i.selectedMaterial._state,P=D.edgeColor,C=D.edgeAlpha;s.uniform4f(this._uColor,P[0],P[1],P[2],C)}else s.uniform4fv(this._uColor,lc);var _=i._sectionPlanesState.getNumAllocatedSectionPlanes(),R=i._sectionPlanesState.sectionPlanes.length;if(_>0)for(var B=i._sectionPlanesState.sectionPlanes,O=t.layerIndex*R,S=r.renderFlags,N=0;N<_;N++){var L=this._uSectionPlanes[N];if(L)if(N0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),s.drawArrays(s.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),s.drawArrays(s.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),s.drawArrays(s.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uColor=n.getLocation("color"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uWorldMatrix=n.getLocation("worldMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// DTXTrianglesEdgesRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),n.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),n.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeIndex = gl_VertexID / 2;"),n.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.z) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),n.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),n.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),n.push("mat4 matrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(color.r, color.g, color.b, color.a);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// DTXTrianglesEdgesRenderer fragment shader"),e.logarithmicDepthBufferEnabled&&n.push("#extension GL_EXT_frag_depth : enable"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Ac=$.vec3(),dc=$.vec3(),vc=$.mat4(),hc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=r.position,f=r.rotationMatrix,p=r.rotationMatrixConjugate,A=a.viewMatrix;if(this._program||(this._allocate(),!this.errors)){var d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=Ac;if(v){var y=$.transformPoint3(f,u,dc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],d=Oe(A,I,vc)}else d=A;s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix);var m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),w=i._sectionPlanesState.sectionPlanes.length;if(m>0)for(var g=i._sectionPlanesState.sectionPlanes,E=t.layerIndex*w,T=r.renderFlags,b=0;b0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),s.drawArrays(s.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),s.drawArrays(s.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),s.drawArrays(s.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// TrianglesDataTextureEdgesColorRenderer"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled,n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform highp sampler2D uObjectPerObjectOffsets;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),n.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeIndex = gl_VertexID / 2;"),n.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.z) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),n.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),n.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vec4 rgb = vec4(color.rgba);"),n.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureEdgesColorRenderer"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Ic=$.vec3(),yc=$.vec3(),mc=$.vec3(),wc=$.mat4(),gc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate;c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==f[0]||0!==f[1]||0!==f[2],h=0!==p[0]||0!==p[1]||0!==p[2];if(v||h){var I=Ic;if(v){var y=$.transformPoint3(A,f,yc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=p[0],I[1]+=p[1],I[2]+=p[2],r=Oe(o.viewMatrix,I,wc),(i=mc)[0]=o.eye[0]-I[0],i[1]=o.eye[1]-I[1],i[2]=o.eye[2]-I[2]}else r=o.viewMatrix,i=o.eye;if(l.uniform2fv(this._uPickClipPos,e.pickClipPos),l.uniform2f(this._uDrawingBufferSize,l.drawingBufferWidth,l.drawingBufferHeight),l.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),l.uniform3fv(this._uCameraEyeRtc,i),l.uniform1i(this._uRenderPass,n),s.logarithmicDepthBufferEnabled){var m=2/(Math.log(o.project.far+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,m)}var w=s._sectionPlanesState.getNumAllocatedSectionPlanes(),g=s._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=s._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),l.drawArrays(l.TRIANGLES,0,u.numIndices8Bits)),u.numIndices16Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),l.drawArrays(l.TRIANGLES,0,u.numIndices16Bits)),u.numIndices32Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),l.drawArrays(l.TRIANGLES,0,u.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uPickClipPos=n.getLocation("pickClipPos"),this._uDrawingBufferSize=n.getLocation("drawingBufferSize"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry picking vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform bool pickInvisible;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("uniform vec2 pickClipPos;"),n.push("uniform vec2 drawingBufferSize;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("smooth out vec4 vWorldPosition;"),n.push("flat out uvec4 vFlags2;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.w) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("} else {"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uvec4 vFlags2;");for(var r=0;r 0.0);"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outPickColor = vPickColor; "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Ec=$.vec3(),Tc=$.vec3(),bc=$.vec3();$.vec3();var Dc=$.mat4(),Pc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate,v=e.pickViewMatrix||o.viewMatrix;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),f||0!==p[0]||0!==p[1]||0!==p[2]){var h=Ec;if(f){var I=Tc;$.transformPoint3(A,f,I),h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=p[0],h[1]+=p[1],h[2]+=p[2],r=Oe(v,h,Dc),(i=bc)[0]=o.eye[0]-h[0],i[1]=o.eye[1]-h[1],i[2]=o.eye[2]-h[2],e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else r=v,i=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(l.uniform3fv(this._uCameraEyeRtc,i),l.uniform1i(this._uRenderPass,n),l.uniform1i(this._uPickInvisible,e.pickInvisible),l.uniform2fv(this._uPickClipPos,e.pickClipPos),l.uniform2f(this._uDrawingBufferSize,l.drawingBufferWidth,l.drawingBufferHeight),l.uniform1f(this._uPickZNear,e.pickZNear),l.uniform1f(this._uPickZFar,e.pickZFar),l.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),s.logarithmicDepthBufferEnabled){var y=2/(Math.log(e.pickZFar+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,y)}var m=s._sectionPlanesState.getNumAllocatedSectionPlanes(),w=s._sectionPlanesState.sectionPlanes.length;if(m>0)for(var g=s._sectionPlanesState.sectionPlanes,E=t.layerIndex*w,T=a.renderFlags,b=0;b0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),l.drawArrays(l.TRIANGLES,0,u.numIndices8Bits)),u.numIndices16Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),l.drawArrays(l.TRIANGLES,0,u.numIndices16Bits)),u.numIndices32Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),l.drawArrays(l.TRIANGLES,0,u.numIndices32Bits)),e.drawElements++}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uPickClipPos=n.getLocation("pickClipPos"),this._uDrawingBufferSize=n.getLocation("drawingBufferSize"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Triangles dataTexture pick depth vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform bool pickInvisible;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("uniform vec2 pickClipPos;"),n.push("uniform vec2 drawingBufferSize;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.w) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("} else {"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0;r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outPackedDepth = packDepth(zNormalizedDepth); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Cc=$.vec3(),_c=$.vec3(),Rc=$.vec3(),Bc=$.vec3();$.vec3();var Oc=$.mat4(),Sc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate,v=t.aabb,h=e.pickViewMatrix||o.viewMatrix,I=Cc;I[0]=$.safeInv(v[3]-v[0])*$.MAX_INT,I[1]=$.safeInv(v[4]-v[1])*$.MAX_INT,I[2]=$.safeInv(v[5]-v[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(I[0]),e.snapPickCoordinateScale[1]=$.safeInv(I[1]),e.snapPickCoordinateScale[2]=$.safeInv(I[2]),c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var y=0!==f[0]||0!==f[1]||0!==f[2],m=0!==p[0]||0!==p[1]||0!==p[2];if(y||m){var w=_c;if(y){var g=$.transformPoint3(A,f,Rc);w[0]=g[0],w[1]=g[1],w[2]=g[2]}else w[0]=0,w[1]=0,w[2]=0;w[0]+=p[0],w[1]+=p[1],w[2]+=p[2],r=Oe(h,w,Oc),(i=Bc)[0]=o.eye[0]-w[0],i[1]=o.eye[1]-w[1],i[2]=o.eye[2]-w[2],e.snapPickOrigin[0]=w[0],e.snapPickOrigin[1]=w[1],e.snapPickOrigin[2]=w[2]}else r=h,i=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;l.uniform3fv(this._uCameraEyeRtc,i),l.uniform2fv(this.uVectorA,e.snapVectorA),l.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),l.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),l.uniform3fv(this._uCoordinateScaler,I),l.uniform1i(this._uRenderPass,n),l.uniform1i(this._uPickInvisible,e.pickInvisible),l.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);var E=2/(Math.log(e.pickZFar+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,E);var T=s._sectionPlanesState.getNumAllocatedSectionPlanes(),b=s._sectionPlanesState.sectionPlanes.length;if(T>0)for(var D=s._sectionPlanesState.sectionPlanes,P=t.layerIndex*b,C=a.renderFlags,_=0;_0&&(c.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),l.drawArrays(N,0,u.numEdgeIndices8Bits)),u.numEdgeIndices16Bits>0&&(c.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),l.drawArrays(N,0,u.numEdgeIndices16Bits)),u.numEdgeIndices32Bits>0&&(c.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),l.drawArrays(N,0,u.numEdgeIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry edges drawing vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),n.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 uSnapVectorA;"),n.push("uniform vec2 uSnapInvVectorAB;"),n.push("vec3 positions[3];"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),n.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vViewPosition;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int edgeIndex = gl_VertexID / 2;"),n.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("{"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),n.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),n.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vViewPosition = clipPos;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int uLayerNumber;"),n.push("uniform vec3 uCoordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Nc=$.vec3(),Lc=$.vec3(),xc=$.vec3(),Mc=$.vec3();$.vec3();var Fc=$.mat4(),Hc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate,v=t.aabb,h=e.pickViewMatrix||o.viewMatrix,I=Nc;I[0]=$.safeInv(v[3]-v[0])*$.MAX_INT,I[1]=$.safeInv(v[4]-v[1])*$.MAX_INT,I[2]=$.safeInv(v[5]-v[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(I[0]),e.snapPickCoordinateScale[1]=$.safeInv(I[1]),e.snapPickCoordinateScale[2]=$.safeInv(I[2]),c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var y=0!==f[0]||0!==f[1]||0!==f[2],m=0!==p[0]||0!==p[1]||0!==p[2];if(y||m){var w=Lc;if(y){var g=xc;$.transformPoint3(A,f,g),w[0]=g[0],w[1]=g[1],w[2]=g[2]}else w[0]=0,w[1]=0,w[2]=0;w[0]+=p[0],w[1]+=p[1],w[2]+=p[2],r=Oe(h,w,Fc),(i=Mc)[0]=o.eye[0]-w[0],i[1]=o.eye[1]-w[1],i[2]=o.eye[2]-w[2],e.snapPickOrigin[0]=w[0],e.snapPickOrigin[1]=w[1],e.snapPickOrigin[2]=w[2]}else r=h,i=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;l.uniform3fv(this._uCameraEyeRtc,i),l.uniform2fv(this._uVectorA,e.snapVectorA),l.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),l.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),l.uniform3fv(this._uCoordinateScaler,I),l.uniform1i(this._uRenderPass,n),l.uniform1i(this._uPickInvisible,e.pickInvisible),l.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);var E=2/(Math.log(e.pickZFar+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,E);var T=s._sectionPlanesState.getNumAllocatedSectionPlanes(),b=s._sectionPlanesState.sectionPlanes.length;if(T>0)for(var D=s._sectionPlanesState.sectionPlanes,P=t.layerIndex*b,C=a.renderFlags,_=0;_0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),l.drawArrays(l.TRIANGLES,0,u.numIndices8Bits)),u.numIndices16Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),l.drawArrays(l.TRIANGLES,0,u.numIndices16Bits)),u.numIndices32Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),l.drawArrays(l.TRIANGLES,0,u.numIndices32Bits)),e.drawElements++}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// DTXTrianglesSnapInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 uVectorAB;"),n.push("uniform vec2 uInverseVectorAB;"),n.push("vec3 positions[3];"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),n.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("flat out uint vFlags2;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("{"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push(" if (isPerspectiveMatrix(projMatrix)) {"),n.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" viewNormal = -viewNormal;"),n.push(" }"),n.push(" } else {"),n.push(" if (viewNormal.z < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" viewNormal = -viewNormal;"),n.push(" }"),n.push(" }"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vWorldPosition = worldPosition;"),t&&n.push("vFlags2 = flags2.r;"),n.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// DTXTrianglesSnapInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int uLayerNumber;"),n.push("uniform vec3 uCoordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Uc=$.vec3(),Gc=$.vec3(),kc=$.vec3();$.vec3();var jc=$.mat4(),Vc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=r.position,f=r.rotationMatrix,p=r.rotationMatrixConjugate,A=e.pickViewMatrix||a.viewMatrix;if(this._program||(this._allocate(t),!this.errors)){var d,v;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),u||0!==c[0]||0!==c[1]||0!==c[2]){var h=Uc;if(u){var I=Gc;$.transformPoint3(f,u,I),h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=c[0],h[1]+=c[1],h[2]+=c[2],d=Oe(A,h,jc),(v=kc)[0]=a.eye[0]-h[0],v[1]=a.eye[1]-h[1],v[2]=a.eye[2]-h[2]}else d=A,v=a.eye;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uWorldMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix);var y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),m=i._sectionPlanesState.sectionPlanes.length;if(y>0)for(var w=i._sectionPlanesState.sectionPlanes,g=t.layerIndex*m,E=r.renderFlags,T=0;T0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uWorldMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// TrianglesDataTextureOcclusionRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("if (solid != 1u) {"),n.push(" if (isPerspectiveMatrix(projMatrix)) {"),n.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" }"),n.push(" } else {"),n.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push(" if (viewNormal.z < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" }"),n.push(" }"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags2 = flags2.r;")),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0;r 0.0);"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Qc=$.vec3(),Wc=$.vec3(),zc=$.vec3();$.vec3();var Kc=$.mat4(),Yc=function(){function e(t){b(this,e),this._scene=t,this._allocate(),this._hash=this._getHash()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate;if(this._program||(this._allocate(),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=Qc;if(v){var y=$.transformPoint3(f,u,Wc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],A=Oe(i.viewMatrix,I,Kc),(d=zc)[0]=i.eye[0]-I[0],d[1]=i.eye[1]-I[1],d[2]=i.eye[2]-I[2]}else A=i.viewMatrix,d=i.eye;if(s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform3fv(this._uCameraEyeRtc,d),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPositionsDecodeMatrix=n.getLocation("objectDecodeAndInstanceMatrix"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Triangles dataTexture draw vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out highp vec2 vHighPrecisionZW;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("} else {"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags2 = flags2.r;")),n.push("gl_Position = clipPos;"),n.push("vHighPrecisionZW = gl_Position.zw;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in highp vec2 vHighPrecisionZW;"),n.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),n.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Xc=$.vec3(),qc=$.vec3(),Jc=$.vec3();$.vec3();var Zc=$.mat4(),$c=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=a.viewMatrix;if(this._program||(this._allocate(t),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));var v=0!==l[0]||0!==l[1]||0!==l[2],h=0!==u[0]||0!==u[1]||0!==u[2];if(v||h){var I=Xc;if(v){var y=qc;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],A=Oe(p,I,Zc),(d=Jc)[0]=a.eye[0]-I[0],d[1]=a.eye[1]-I[1],d[2]=a.eye[2]-I[2]}else A=p,d=a.eye;s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uWorldMatrix,!1,f),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix),s.uniformMatrix4fv(this._uViewNormalMatrix,!1,a.viewNormalMatrix),s.uniformMatrix4fv(this._uWorldNormalMatrix,!1,r.worldNormalMatrix);var m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),w=i._sectionPlanesState.sectionPlanes.length;if(m>0)for(var g=i._sectionPlanesState.sectionPlanes,E=t.layerIndex*w,T=r.renderFlags,b=0;b0,n=[];return n.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push("#extension GL_EXT_frag_depth : enable"),n.push("uniform int renderPass;"),n.push("attribute vec3 position;"),e.entityOffsetsEnabled&&n.push("attribute vec3 offset;"),n.push("attribute vec3 normal;"),n.push("attribute vec4 color;"),n.push("attribute vec4 flags;"),n.push("attribute vec4 flags2;"),n.push("uniform mat4 worldMatrix;"),n.push("uniform mat4 worldNormalMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform mat4 viewNormalMatrix;"),n.push("uniform mat4 objectDecodeAndInstanceMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("varying float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out vec4 vFlags2;")),n.push("out vec3 vViewNormal;"),n.push("void main(void) {"),n.push("if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2;")),n.push(" vViewNormal = viewNormal;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(vt.SUPPORTED_EXTENSIONS.EXT_frag_depth?n.push("vFragDepth = 1.0 + clipPos.w;"):(n.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),n.push("clipPos.z *= clipPos.w;")),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push("#extension GL_EXT_frag_depth : enable"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("in vec4 vFlags2;");for(var r=0;r 0.0);"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),ef=$.vec3(),tf=$.vec3(),nf=$.vec3();$.vec3(),$.vec4();var rf=$.mat4(),af=function(){function e(t,n){b(this,e),this._scene=t,this._withSAO=n,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate;if(this._program||(this._allocate(),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=ef;if(v){var y=$.transformPoint3(f,u,tf);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],A=Oe(i.viewMatrix,I,rf),(d=nf)[0]=i.eye[0]-I[0],d[1]=i.eye[1]-I[1],d[2]=i.eye[2]-I[2]}else A=i.viewMatrix,d=i.eye;if(s.uniform2fv(this._uPickClipPos,e.pickClipPos),s.uniform2f(this._uDrawingBufferSize,s.drawingBufferWidth,s.drawingBufferHeight),s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform3fv(this._uCameraEyeRtc,d),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uPickClipPos=n.getLocation("pickClipPos"),this._uDrawingBufferSize=n.getLocation("drawingBufferSize"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// trianglesDatatextureNormalsRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("uniform vec2 pickClipPos;"),n.push("uniform vec2 drawingBufferSize;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out vec4 vWorldPosition;"),t&&n.push("flat out uint vFlags2;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.w) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("} else {"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("vWorldPosition = worldPosition;"),t&&n.push("vFlags2 = flags2.r;"),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),t){n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(" outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),sf=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._silhouetteRenderer||(this._silhouetteRenderer=new oc(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new gc(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new Pc(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new af(this._scene)),this._snapRenderer||(this._snapRenderer=new Sc(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Hc(this._scene)),this._snapRenderer||(this._snapRenderer=new Sc(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new tc(this._scene,!1)),this._colorRenderer}},{key:"colorRendererWithSAO",get:function(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new tc(this._scene,!0)),this._colorRendererWithSAO}},{key:"colorQualityRendererWithSAO",get:function(){return this._colorQualityRendererWithSAO}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new oc(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new Yc(this._scene)),this._depthRenderer}},{key:"normalsRenderer",get:function(){return this._normalsRenderer||(this._normalsRenderer=new $c(this._scene)),this._normalsRenderer}},{key:"edgesRenderer",get:function(){return this._edgesRenderer||(this._edgesRenderer=new pc(this._scene)),this._edgesRenderer}},{key:"edgesColorRenderer",get:function(){return this._edgesColorRenderer||(this._edgesColorRenderer=new hc(this._scene)),this._edgesColorRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new gc(this._scene)),this._pickMeshRenderer}},{key:"pickNormalsRenderer",get:function(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new af(this._scene)),this._pickNormalsRenderer}},{key:"pickNormalsFlatRenderer",get:function(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new af(this._scene)),this._pickNormalsFlatRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Pc(this._scene)),this._pickDepthRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Sc(this._scene)),this._snapRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Hc(this._scene)),this._snapInitRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new Vc(this._scene)),this._occlusionRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}]),e}(),of={};var lf=P((function e(){b(this,e),this.positionsCompressed=[],this.lenPositionsCompressed=0,this.metallicRoughness=[],this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.edgeIndices8Bits=[],this.lenEdgeIndices8Bits=0,this.edgeIndices16Bits=[],this.lenEdgeIndices16Bits=0,this.edgeIndices32Bits=[],this.lenEdgeIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]})),uf=function(){function e(){b(this,e),this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}return P(e,[{key:"finalize",value:function(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}},{key:"bindCommonTextures",value:function(e,t,n,r,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,n,2),this.texturePerObjectColorsAndFlags.bindTexture(e,r,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}},{key:"bindTriangleIndicesTextures",value:function(e,t,n,r){this.indicesPortionIdsPerBitnessTextures[r].bindTexture(e,t,5),this.indicesPerBitnessTextures[r].bindTexture(e,n,6)}},{key:"bindEdgeIndicesTextures",value:function(e,t,n,r){this.edgeIndicesPortionIdsPerBitnessTextures[r].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[r].bindTexture(e,n,6)}}]),e}(),cf={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(cf,null,4));var e=0;Object.keys(cf).forEach((function(t){t.startsWith("size")&&(e+=cf[t])})),console.log("Total size ".concat(e," bytes (").concat((e/1e3/1e3).toFixed(2)," MB)")),console.log("Avg bytes / triangle: ".concat((e/cf.totalPolygons).toFixed(2)));var t={};Object.keys(cf).forEach((function(n){n.startsWith("size")&&(t[n]="".concat((cf[n]/e*100).toFixed(2)," % of total"))})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};var ff=function(){function e(){b(this,e)}return P(e,[{key:"disableBindedTextureFiltering",value:function(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}},{key:"createTextureForColorsAndFlags",value:function(e,t,n,r,i,a,s){var o=t.length;this.numPortions=o;var l=4096,u=Math.ceil(o/512);if(0===u)throw"texture height===0";var c=new Uint8Array(16384*u);cf.sizeDataColorsAndFlags+=c.byteLength,cf.numberOfTextures++;for(var f=0;f>24&255,r[f]>>16&255,r[f]>>8&255,255&r[f]],32*f+16),c.set([i[f]>>24&255,i[f]>>16&255,i[f]>>8&255,255&i[f]],32*f+20),c.set([a[f]>>24&255,a[f]>>16&255,a[f]>>8&255,255&a[f]],32*f+24),c.set([s[f]?1:0,0,0,0],32*f+28);var p=e.createTexture();return e.bindTexture(e.TEXTURE_2D,p),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,u),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,u,e.RGBA_INTEGER,e.UNSIGNED_BYTE,c,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,p,l,u,c)}},{key:"createTextureForObjectOffsets",value:function(e,t){var n=512,r=Math.ceil(t/n);if(0===r)throw"texture height===0";var i=new Float32Array(1536*r).fill(0);cf.sizeDataTextureOffsets+=i.byteLength,cf.numberOfTextures++;var a=e.createTexture();return e.bindTexture(e.TEXTURE_2D,a),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,n,r),e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,r,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,a,n,r,i)}},{key:"createTextureForInstancingMatrices",value:function(e,t){var n=t.length;if(0===n)throw"num instance matrices===0";var r=2048,i=Math.ceil(n/512),a=new Float32Array(8192*i);cf.numberOfTextures++;for(var s=0;s65536&&cf.cannotCreatePortion.because10BitsObjectId++;var n=this._numPortions+t<=65536,r=void 0!==e.geometryId&&null!==e.geometryId?"".concat(e.geometryId,"#").concat(0):"".concat(e.id,"#").concat(0);if(!this._bucketGeometries[r]){var i=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits),a=0,s=0;e.buckets.forEach((function(e){a+=e.positionsCompressed.length/3,s+=e.indices.length/3})),(this._state.numVertices+a>4096*Af||i+s>4096*Af)&&cf.cannotCreatePortion.becauseTextureSize++,n&&(n=this._state.numVertices+a<=4096*Af&&i+s<=4096*Af)}return n}},{key:"createPortion",value:function(e,t){var n=this;if(this._finalized)throw"Already finalized";var r=[];t.buckets.forEach((function(e,i){var a=void 0!==t.geometryId&&null!==t.geometryId?"".concat(t.geometryId,"#").concat(i):"".concat(t.id,"#").concat(i),s=n._bucketGeometries[a];s||(s=n._createBucketGeometry(t,e),n._bucketGeometries[a]=s);var o=n._createSubPortion(t,s,e);r.push(o)}));var i=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(r),this.model.numPortions++,this._meshes.push(e),i}},{key:"_createBucketGeometry",value:function(e,t){if(t.indices){var n=8*Math.ceil(t.indices.length/3/8)*3;cf.overheadSizeAlignementIndices+=2*(n-t.indices.length);var r=new Uint32Array(n);r.fill(0),r.set(t.indices),t.indices=r}if(t.edgeIndices){var i=8*Math.ceil(t.edgeIndices.length/2/8)*2;cf.overheadSizeAlignementEdgeIndices+=2*(i-t.edgeIndices.length);var a=new Uint32Array(i);a.fill(0),a.set(t.edgeIndices),t.edgeIndices=a}var s=t.positionsCompressed,o=t.indices,l=t.edgeIndices,u=this._buffer;u.positionsCompressed.push(s);var c,f=u.lenPositionsCompressed/3,p=s.length/3;u.lenPositionsCompressed+=s.length;var A,d,v=0;o&&(v=o.length/3,p<=256?(A=u.indices8Bits,c=u.lenIndices8Bits/3,u.lenIndices8Bits+=o.length):p<=65536?(A=u.indices16Bits,c=u.lenIndices16Bits/3,u.lenIndices16Bits+=o.length):(A=u.indices32Bits,c=u.lenIndices32Bits/3,u.lenIndices32Bits+=o.length),A.push(o));var h,I=0;l&&(I=l.length/2,p<=256?(h=u.edgeIndices8Bits,d=u.lenEdgeIndices8Bits/2,u.lenEdgeIndices8Bits+=l.length):p<=65536?(h=u.edgeIndices16Bits,d=u.lenEdgeIndices16Bits/2,u.lenEdgeIndices16Bits+=l.length):(h=u.edgeIndices32Bits,d=u.lenEdgeIndices32Bits/2,u.lenEdgeIndices32Bits+=l.length),h.push(l));return this._state.numVertices+=p,cf.numberOfGeometries++,{vertexBase:f,numVertices:p,numTriangles:v,numEdges:I,indicesBase:c,edgeIndicesBase:d}}},{key:"_createSubPortion",value:function(e,t,n,r){var i=e.color;e.metallic,e.roughness;var a,s,o=e.colors,l=e.opacity,u=e.meshMatrix,c=e.pickColor,f=this._buffer,p=this._state;f.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),f.perObjectInstancePositioningMatrices.push(u||yf),f.perObjectSolid.push(!!e.solid),o?f.perObjectColors.push([255*o[0],255*o[1],255*o[2],255]):i&&f.perObjectColors.push([i[0],i[1],i[2],l]),f.perObjectPickColors.push(c),f.perObjectVertexBases.push(t.vertexBase),a=t.numVertices<=256?p.numIndices8Bits:t.numVertices<=65536?p.numIndices16Bits:p.numIndices32Bits,f.perObjectIndexBaseOffsets.push(a/3-t.indicesBase),s=t.numVertices<=256?p.numEdgeIndices8Bits:t.numVertices<=65536?p.numEdgeIndices16Bits:p.numEdgeIndices32Bits,f.perObjectEdgeIndexBaseOffsets.push(s/2-t.edgeIndicesBase);var A=this._subPortions.length;if(t.numTriangles>0){var d,v=3*t.numTriangles;t.numVertices<=256?(d=f.perTriangleNumberPortionId8Bits,p.numIndices8Bits+=v,cf.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(d=f.perTriangleNumberPortionId16Bits,p.numIndices16Bits+=v,cf.totalPolygons16Bits+=t.numTriangles):(d=f.perTriangleNumberPortionId32Bits,p.numIndices32Bits+=v,cf.totalPolygons32Bits+=t.numTriangles),cf.totalPolygons+=t.numTriangles;for(var h=0;h0){var I,y=2*t.numEdges;t.numVertices<=256?(I=f.perEdgeNumberPortionId8Bits,p.numEdgeIndices8Bits+=y,cf.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(I=f.perEdgeNumberPortionId16Bits,p.numEdgeIndices16Bits+=y,cf.totalEdges16Bits+=t.numEdges):(I=f.perEdgeNumberPortionId32Bits,p.numEdgeIndices32Bits+=y,cf.totalEdges32Bits+=t.numEdges),cf.totalEdges+=t.numEdges;for(var m=0;m0&&(n.texturePerEdgeIdPortionIds8Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(r,i.perEdgeNumberPortionId8Bits)),i.perEdgeNumberPortionId16Bits.length>0&&(n.texturePerEdgeIdPortionIds16Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(r,i.perEdgeNumberPortionId16Bits)),i.perEdgeNumberPortionId32Bits.length>0&&(n.texturePerEdgeIdPortionIds32Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(r,i.perEdgeNumberPortionId32Bits)),i.lenIndices8Bits>0&&(n.texturePerPolygonIdIndices8Bits=this._dtxTextureFactory.createTextureFor8BitIndices(r,i.indices8Bits,i.lenIndices8Bits)),i.lenIndices16Bits>0&&(n.texturePerPolygonIdIndices16Bits=this._dtxTextureFactory.createTextureFor16BitIndices(r,i.indices16Bits,i.lenIndices16Bits)),i.lenIndices32Bits>0&&(n.texturePerPolygonIdIndices32Bits=this._dtxTextureFactory.createTextureFor32BitIndices(r,i.indices32Bits,i.lenIndices32Bits)),i.lenEdgeIndices8Bits>0&&(n.texturePerPolygonIdEdgeIndices8Bits=this._dtxTextureFactory.createTextureFor8BitsEdgeIndices(r,i.edgeIndices8Bits,i.lenEdgeIndices8Bits)),i.lenEdgeIndices16Bits>0&&(n.texturePerPolygonIdEdgeIndices16Bits=this._dtxTextureFactory.createTextureFor16BitsEdgeIndices(r,i.edgeIndices16Bits,i.lenEdgeIndices16Bits)),i.lenEdgeIndices32Bits>0&&(n.texturePerPolygonIdEdgeIndices32Bits=this._dtxTextureFactory.createTextureFor32BitsEdgeIndices(r,i.edgeIndices32Bits,i.lenEdgeIndices32Bits)),n.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(function(){e._deferredSetFlagsDirty&&e._uploadDeferredFlags(),e._numUpdatesInFrame=0}))}}},{key:"isEmpty",value:function(){return 0===this._numPortions}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,true),this._setFlags2(e,t,true)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags(),this._setDeferredFlags2()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}},{key:"_beginDeferredFlags",value:function(){this._deferredSetFlagsActive=!0}},{key:"_uploadDeferredFlags",value:function(){if(this._deferredSetFlagsActive=!1,this._deferredSetFlagsDirty){this._deferredSetFlagsDirty=!1;var e=this.model.scene.canvas.gl,t=this._dtxState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,vf)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._portionToSubPortionsMap[e],a=0,s=i.length;a3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=!!(t&Me),o=!!(t&ke),l=!!(t&je),u=!!(t&Ve),c=!!(t&Qe),f=!!(t&He),p=!!(t&Fe);i=!s||p||o?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!s||p?es.NOT_RENDERED:u?es.SILHOUETTE_SELECTED:l?es.SILHOUETTE_HIGHLIGHTED:o?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var A=0;A=!s||p?es.NOT_RENDERED:u?es.EDGES_SELECTED:l?es.EDGES_HIGHLIGHTED:o?es.EDGES_XRAYED:c?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED;var d=s&&!p&&f?es.PICK:es.NOT_RENDERED,v=this._dtxState,h=this.model.scene.canvas.gl;vf[0]=i,vf[1]=a,vf[2]=A,vf[3]=d,v.texturePerObjectColorsAndFlags._textureData.set(vf,32*e+8),this._deferredSetFlagsActive||r?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),h.bindTexture(h.TEXTURE_2D,v.texturePerObjectColorsAndFlags._texture),h.texSubImage2D(h.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,h.RGBA_INTEGER,h.UNSIGNED_BYTE,vf))}},{key:"_setDeferredFlags",value:function(){}},{key:"_setFlags2",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._portionToSubPortionsMap[e],i=0,a=r.length;i2&&void 0!==arguments[2]&&arguments[2];if(!this._finalized)throw"Not finalized";var r=t&Ue?255:0,i=this._dtxState,a=this.model.scene.canvas.gl;vf[0]=r,vf[1]=0,vf[2]=1,vf[3]=2,i.texturePerObjectColorsAndFlags._textureData.set(vf,32*e+12),this._deferredSetFlagsActive||n?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),a.bindTexture(a.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),a.texSubImage2D(a.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,a.RGBA_INTEGER,a.UNSIGNED_BYTE,vf))}},{key:"_setDeferredFlags2",value:function(){}},{key:"setOffset",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectOffsets._texture),r.texSubImage2D(r.TEXTURE_2D,0,0,e,1,1,r.RGB,r.FLOAT,hf))}},{key:"setMatrix",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectInstanceMatrices._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,r.RGBA,r.FLOAT,df))}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._renderers.colorRendererWithSAO&&this._renderers.colorRendererWithSAO.drawLayer(t,this,es.COLOR_OPAQUE):this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"_updateBackfaceCull",value:function(e,t){var n=this.model.backfaces||e.sectioned;if(t.backfaces!==n){var r=t.gl;n?r.disable(r.CULL_FACE):r.enable(r.CULL_FACE),t.backfaces=n}}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT))}},{key:"drawDepth",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.depthRenderer&&this._renderers.depthRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"drawNormals",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.normalsRenderer&&this._renderers.normalsRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"drawSilhouetteXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_XRAYED))}},{key:"drawSilhouetteHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_HIGHLIGHTED))}},{key:"drawSilhouetteSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_SELECTED))}},{key:"drawEdgesColorOpaque",value:function(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,es.EDGES_COLOR_OPAQUE)}},{key:"drawEdgesColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,es.EDGES_COLOR_TRANSPARENT)}},{key:"drawEdgesHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,es.EDGES_HIGHLIGHTED)}},{key:"drawEdgesSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,es.EDGES_SELECTED)}},{key:"drawEdgesXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,es.EDGES_XRAYED)}},{key:"drawOcclusion",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"drawShadow",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.shadowRenderer&&this._renderers.shadowRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"setPickMatrices",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,es.PICK))}},{key:"drawPickDepths",value:function(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,es.PICK))}},{key:"drawSnapInit",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,es.PICK))}},{key:"drawSnap",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,es.PICK))}},{key:"drawPickNormals",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickNormalsRenderer&&this._renderers.pickNormalsRenderer.drawLayer(t,this,es.PICK))}},{key:"destroy",value:function(){if(!this._destroyed){var e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}}]),e}(),wf=function(){function e(t){b(this,e),this.id=t.id,this.colorTexture=t.colorTexture,this.metallicRoughnessTexture=t.metallicRoughnessTexture,this.normalsTexture=t.normalsTexture,this.emissiveTexture=t.emissiveTexture,this.occlusionTexture=t.occlusionTexture}return P(e,[{key:"destroy",value:function(){}}]),e}(),gf=function(){function e(t){b(this,e),this.id=t.id,this.texture=t.texture}return P(e,[{key:"destroy",value:function(){this.texture&&(this.texture.destroy(),this.texture=null)}}]),e}(),Ef={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},Tf=function(){function e(t,n,r){b(this,e),this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=t,this.onProgress=n,this.onError=r}return P(e,[{key:"itemStart",value:function(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}},{key:"itemEnd",value:function(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}},{key:"itemError",value:function(e){void 0!==this.onError&&this.onError(e)}},{key:"resolveURL",value:function(e){return this.urlModifier?this.urlModifier(e):e}},{key:"setURLModifier",value:function(e){return this.urlModifier=e,this}},{key:"addHandler",value:function(e,t){return this.handlers.push(e,t),this}},{key:"removeHandler",value:function(e){var t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}},{key:"getHandler",value:function(e){for(var t=0,n=this.handlers.length;t0&&void 0!==arguments[0]?arguments[0]:4;b(this,e),this.pool=t,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}return P(e,[{key:"_initWorker",value:function(e){if(!this.workers[e]){var t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}},{key:"_getIdleWorker",value:function(){for(var e=0;e0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),Rf++}return this._transcoderPending}},{key:"transcode",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(i,a){var s=r;n._init().then((function(){return n._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:s},e)})).then((function(e){var n=e.data,r=n.mipmaps,s=(n.width,n.height,n.format),o=n.type,l=n.error,u=n.dfdTransferFn,c=n.dfdFlags;if("error"===o)return a(l);t.setCompressedData({mipmaps:r,props:{format:s,minFilter:1===r.length?1006:1008,magFilter:1===r.length?1006:1008,encoding:2===u?3001:3e3,premultiplyAlpha:!!(1&c)}}),i()}))}))}},{key:"destroy",value:function(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),Rf--}}]),e}();Bf.BasisFormat={ETC1S:0,UASTC_4x4:1},Bf.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Bf.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},Bf.BasisWorker=function(){var e,t,n,r=_EngineFormat,i=_TranscoderFormat,a=_BasisFormat;self.addEventListener("message",(function(s){var c,f=s.data;switch(f.type){case"init":e=f.config,c=f.transcoderBinary,t=new Promise((function(e){n={wasmBinary:c,onRuntimeInitialized:e},BASIS(n)})).then((function(){n.initializeBasis(),void 0===n.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((function(){try{for(var t=function(t){var s=new n.KTX2File(new Uint8Array(t));function c(){s.close(),s.delete()}if(!s.isValid())throw c(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");var f=s.isUASTC()?a.UASTC_4x4:a.ETC1S,p=s.getWidth(),A=s.getHeight(),d=s.getLevels(),v=s.getHasAlpha(),h=s.getDFDTransferFunc(),I=s.getDFDFlags(),y=function(t,n,s,c){for(var f,p,A=t===a.ETC1S?o:l,d=0;d=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var o=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(o&&l){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;b(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:P(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function o(e,t,n,r,i,a,s){try{var o=e[a](s),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,i)}function l(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,l,"next",e)}function l(e){o(a,r,i,s,l,"throw",e)}s(void 0)}))}}function u(e){return function(e){if(Array.isArray(e))return A(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=p(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],s=!0,o=!1;try{for(n=n.call(e);!(s=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);s=!0);}catch(e){o=!0,i=e}finally{try{s||null==n.return||n.return()}finally{if(o)throw i}}return a}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return A(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{};b(this,e),this._id=k.addItem(),this._context=null,this._enabled=!1,this._itemsCfg=[],this._rootMenu=null,this._menuList=[],this._menuMap={},this._itemList=[],this._itemMap={},this._shown=!1,this._nextId=0,this._eventSubs={},!1!==n.hideOnMouseDown&&(document.addEventListener("mousedown",(function(e){e.target.classList.contains("xeokit-context-menu-item")||t.hide()})),document.addEventListener("touchstart",this._canvasTouchStartHandler=function(e){e.target.classList.contains("xeokit-context-menu-item")||t.hide()})),n.items&&(this.items=n.items),this._hideOnAction=!1!==n.hideOnAction,this.context=n.context,this.enabled=!1!==n.enabled,this.hide()}return P(e,[{key:"on",value:function(e,t){var n=this._eventSubs[e];n||(n=[],this._eventSubs[e]=n),n.push(t)}},{key:"fire",value:function(e,t){var n=this._eventSubs[e];if(n)for(var r=0,i=n.length;r0,c=t._getNextId(),f=a.getTitle||function(){return a.title||""},p=a.doAction||a.callback||function(){},A=a.getEnabled||function(){return!0},d=a.getShown||function(){return!0},v=new Q(c,f,p,A,d);if(v.parentMenu=i,l.items.push(v),u){var h=e(s);v.subMenu=h,h.parentItem=v}t._itemList.push(v),t._itemMap[v.id]=v},c=0,f=o.length;c'),r.push("
    "),n)for(var i=0,a=n.length;i'+A+" [MORE]"):r.push('
  • '+A+"
  • ")}}r.push("
"),r.push("");var d=r.join("");document.body.insertAdjacentHTML("beforeend",d);var v=document.querySelector("."+e.id);e.menuElement=v,v.style["border-radius"]="4px",v.style.display="none",v.style["z-index"]=3e5,v.style.background="white",v.style.border="1px solid black",v.style["box-shadow"]="0 4px 5px 0 gray",v.oncontextmenu=function(e){e.preventDefault()};var h=this,I=null;if(n)for(var y=0,m=n.length;ywindow.innerWidth?h._showMenu(t.id,a.left-200,a.top-1):h._showMenu(t.id,a.right-5,a.top-1),I=t}}else I&&(h._hideMenu(I.id),I=null)})),i||(r.itemElement.addEventListener("click",(function(e){e.preventDefault(),h._context&&!1!==r.enabled&&(r.doAction&&r.doAction(h._context),t._hideOnAction?h.hide():(h._updateItemsTitles(),h._updateItemsEnabledStatus()))})),r.itemElement.addEventListener("mouseenter",(function(e){e.preventDefault(),!1!==r.enabled&&r.doHover&&r.doHover(h._context)})))},E=0,T=w.length;Ewindow.innerHeight&&(n=window.innerHeight-r),t+i>window.innerWidth&&(t=window.innerWidth-i),e.style.left=t+"px",e.style.top=n+"px"}},{key:"_hideMenuElement",value:function(e){e.style.display="none"}}]),e}(),z=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this.viewer=t,this.scene=this.viewer.scene,this._lensCursorDiv=document.createElement("div"),this.viewer.scene.canvas.canvas.parentNode.insertBefore(this._lensCursorDiv,this.viewer.scene.canvas.canvas),this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red",this._lensCursorDiv.style.borderRadius="20px",this._lensCursorDiv.style.width="10px",this._lensCursorDiv.style.height="10px",this._lensCursorDiv.style.margin="-200px -200px",this._lensCursorDiv.style.zIndex="100000",this._lensCursorDiv.style.position="absolute",this._lensCursorDiv.style.pointerEvents="none",this._lensContainer=document.createElement("div"),this._lensContainer.style.border="1px solid black",this._lensContainer.style.background="white",this._lensContainer.style.borderRadius="50%",this._lensContainer.style.width="300px",this._lensContainer.style.height="300px",this._lensContainer.style.marginTop="85px",this._lensContainer.style.marginLeft="25px",this._lensContainer.style.zIndex="15000",this._lensContainer.style.position="absolute",this._lensContainer.style.pointerEvents="none",this._lensContainer.style.visibility="hidden",this._lensCanvas=document.createElement("canvas"),this._lensCanvas.style.borderRadius="50%",this._lensCanvas.style.width="300px",this._lensCanvas.style.height="300px",this._lensCanvas.style.zIndex="15000",this._lensCanvas.style.pointerEvents="none",document.body.appendChild(this._lensContainer),this._lensContainer.appendChild(this._lensCanvas),this._lensCanvasContext=this._lensCanvas.getContext("2d"),this._canvasElement=this.viewer.scene.canvas.canvas,this._canvasPos=null,this._snappedCanvasPos=null,this._lensPosToggle=!0,this._zoomLevel=r.zoomLevel||2,this._active=!1!==r.active,this._visible=!1,this._snapped=!1,this._onViewerRendering=this.viewer.scene.on("rendering",(function(){n._active&&n._visible&&n.update()}))}return P(e,[{key:"update",value:function(){if(this._active&&this._visible&&this._canvasPos){var e=this._lensContainer.getBoundingClientRect(),t=this._canvasElement.getBoundingClientRect(),n=this._canvasPos[0]e.left&&this._canvasPos[1]e.top;this._lensContainer.style.marginLeft="25px",n&&(this._lensPosToggle?this._lensContainer.style.marginTop="".concat(t.bottom-t.top-this._lensCanvas.height-85,"px"):this._lensContainer.style.marginTop="85px",this._lensPosToggle=!this._lensPosToggle),this._lensCanvasContext.clearRect(0,0,this._lensCanvas.width,this._lensCanvas.height);var r=Math.max(this._lensCanvas.width,this._lensCanvas.height)/this._zoomLevel;this._lensCanvasContext.drawImage(this._canvasElement,this._canvasPos[0]-r/2,this._canvasPos[1]-r/2,r,r,0,0,this._lensCanvas.width,this._lensCanvas.height);var i=[(e.left+e.right)/2,(e.top+e.bottom)/2];if(this._snappedCanvasPos){var a=this._snappedCanvasPos[0]-this._canvasPos[0],s=this._snappedCanvasPos[1]-this._canvasPos[1];this._lensCursorDiv.style.marginLeft="".concat(i[0]+a*this._zoomLevel-10,"px"),this._lensCursorDiv.style.marginTop="".concat(i[1]+s*this._zoomLevel-10,"px")}else this._lensCursorDiv.style.marginLeft="".concat(i[0]-10,"px"),this._lensCursorDiv.style.marginTop="".concat(i[1]-10,"px")}}},{key:"zoomFactor",get:function(){return this._zoomFactor},set:function(e){this._zoomFactor=e,this.update()}},{key:"canvasPos",get:function(){return this._canvasPos},set:function(e){this._canvasPos=e,this.update()}},{key:"snappedCanvasPos",get:function(){return this._snappedCanvasPos},set:function(e){this._snappedCanvasPos=e,this.update()}},{key:"snapped",get:function(){return this._snapped},set:function(e){this._snapped=e,e?(this._lensCursorDiv.style.background="greenyellow",this._lensCursorDiv.style.border="2px solid green"):(this._lensCursorDiv.style.background="pink",this._lensCursorDiv.style.border="2px solid red")}},{key:"active",get:function(){return this._active},set:function(e){this._active=e,this._lensContainer.style.visibility=e&&this._visible?"visible":"hidden",e&&this._visible||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=e,this._lensContainer.style.visibility=e&&this._active?"visible":"hidden",e&&this._active||(this._lensCursorDiv.style.marginLeft="-100px",this._lensCursorDiv.style.marginTop="-100px"),this.update()}},{key:"destroy",value:function(){this._destroyed||(this.viewer.scene.off(this._onViewerRendering),this._lensContainer.removeChild(this._lensCanvas),document.body.removeChild(this._lensContainer),this._destroyed=!0)}}]),e}(),K=!0,Y=K?Float64Array:Float32Array,X=new Y(3),q=new Y(16),J=new Y(16),Z=new Y(4),$={setDoublePrecisionEnabled:function(e){Y=(K=e)?Float64Array:Float32Array},getDoublePrecisionEnabled:function(){return K},MIN_DOUBLE:-Number.MAX_SAFE_INTEGER,MAX_DOUBLE:Number.MAX_SAFE_INTEGER,MAX_INT:1e7,DEGTORAD:.0174532925,RADTODEG:57.295779513,unglobalizeObjectId:function(e,t){var n=t.indexOf("#");return n===e.length&&t.startsWith(e)?t.substring(n+1):t},globalizeObjectId:function(e,t){return e+"#"+t},safeInv:function(e){var t=1/e;return isNaN(t)||!isFinite(t)?1:t},vec2:function(e){return new Y(e||2)},vec3:function(e){return new Y(e||3)},vec4:function(e){return new Y(e||4)},mat3:function(e){return new Y(e||9)},mat3ToMat4:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Y(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=0,t[4]=e[3],t[5]=e[4],t[6]=e[5],t[7]=0,t[8]=e[6],t[9]=e[7],t[10]=e[8],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},mat4:function(e){return new Y(e||16)},mat4ToMat3:function(e,t){},doublesToFloats:function(e,t,n){for(var r=new Y(2),i=0,a=e.length;i>8&255]+e[t>>16&255]+e[t>>24&255],"-").concat(e[255&n]).concat(e[n>>8&255],"-").concat(e[n>>16&15|64]).concat(e[n>>24&255],"-").concat(e[63&r|128]).concat(e[r>>8&255],"-").concat(e[r>>16&255]).concat(e[r>>24&255]).concat(e[255&i]).concat(e[i>>8&255]).concat(e[i>>16&255]).concat(e[i>>24&255])}}(),clamp:function(e,t,n){return Math.max(t,Math.min(n,e))},fmod:function(e,t){if(e1?1:n,Math.acos(n)},vec3FromMat4Scale:function(){var e=new Y(3);return function(t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],n[0]=$.lenVec3(e),e[0]=t[4],e[1]=t[5],e[2]=t[6],n[1]=$.lenVec3(e),e[0]=t[8],e[1]=t[9],e[2]=t[10],n[2]=$.lenVec3(e),n}}(),vecToArray:function(){function e(e){return Math.round(1e5*e)/1e5}return function(t){for(var n=0,r=(t=Array.prototype.slice.call(t)).length;n0&&void 0!==arguments[0]?arguments[0]:new Y(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},identityMat3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Y(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},isIdentityMat4:function(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[3]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[7]&&0===e[8]&&0===e[9]&&1===e[10]&&0===e[11]&&0===e[12]&&0===e[13]&&0===e[14]&&1===e[15]},negateMat4:function(e,t){return t||(t=e),t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t[4]=-e[4],t[5]=-e[5],t[6]=-e[6],t[7]=-e[7],t[8]=-e[8],t[9]=-e[9],t[10]=-e[10],t[11]=-e[11],t[12]=-e[12],t[13]=-e[13],t[14]=-e[14],t[15]=-e[15],t},addMat4:function(e,t,n){return n||(n=e),n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n},addMat4Scalar:function(e,t,n){return n||(n=e),n[0]=e[0]+t,n[1]=e[1]+t,n[2]=e[2]+t,n[3]=e[3]+t,n[4]=e[4]+t,n[5]=e[5]+t,n[6]=e[6]+t,n[7]=e[7]+t,n[8]=e[8]+t,n[9]=e[9]+t,n[10]=e[10]+t,n[11]=e[11]+t,n[12]=e[12]+t,n[13]=e[13]+t,n[14]=e[14]+t,n[15]=e[15]+t,n},addScalarMat4:function(e,t,n){return $.addMat4Scalar(t,e,n)},subMat4:function(e,t,n){return n||(n=e),n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n},subMat4Scalar:function(e,t,n){return n||(n=e),n[0]=e[0]-t,n[1]=e[1]-t,n[2]=e[2]-t,n[3]=e[3]-t,n[4]=e[4]-t,n[5]=e[5]-t,n[6]=e[6]-t,n[7]=e[7]-t,n[8]=e[8]-t,n[9]=e[9]-t,n[10]=e[10]-t,n[11]=e[11]-t,n[12]=e[12]-t,n[13]=e[13]-t,n[14]=e[14]-t,n[15]=e[15]-t,n},subScalarMat4:function(e,t,n){return n||(n=t),n[0]=e-t[0],n[1]=e-t[1],n[2]=e-t[2],n[3]=e-t[3],n[4]=e-t[4],n[5]=e-t[5],n[6]=e-t[6],n[7]=e-t[7],n[8]=e-t[8],n[9]=e-t[9],n[10]=e-t[10],n[11]=e-t[11],n[12]=e-t[12],n[13]=e-t[13],n[14]=e-t[14],n[15]=e-t[15],n},mulMat4:function(e,t,n){n||(n=e);var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],c=e[7],f=e[8],p=e[9],A=e[10],d=e[11],v=e[12],h=e[13],I=e[14],y=e[15],m=t[0],w=t[1],g=t[2],E=t[3],T=t[4],b=t[5],D=t[6],P=t[7],C=t[8],_=t[9],R=t[10],B=t[11],O=t[12],S=t[13],N=t[14],L=t[15];return n[0]=m*r+w*o+g*f+E*v,n[1]=m*i+w*l+g*p+E*h,n[2]=m*a+w*u+g*A+E*I,n[3]=m*s+w*c+g*d+E*y,n[4]=T*r+b*o+D*f+P*v,n[5]=T*i+b*l+D*p+P*h,n[6]=T*a+b*u+D*A+P*I,n[7]=T*s+b*c+D*d+P*y,n[8]=C*r+_*o+R*f+B*v,n[9]=C*i+_*l+R*p+B*h,n[10]=C*a+_*u+R*A+B*I,n[11]=C*s+_*c+R*d+B*y,n[12]=O*r+S*o+N*f+L*v,n[13]=O*i+S*l+N*p+L*h,n[14]=O*a+S*u+N*A+L*I,n[15]=O*s+S*c+N*d+L*y,n},mulMat3:function(e,t,n){n||(n=new Y(9));var r=e[0],i=e[3],a=e[6],s=e[1],o=e[4],l=e[7],u=e[2],c=e[5],f=e[8],p=t[0],A=t[3],d=t[6],v=t[1],h=t[4],I=t[7],y=t[2],m=t[5],w=t[8];return n[0]=r*p+i*v+a*y,n[3]=r*A+i*h+a*m,n[6]=r*d+i*I+a*w,n[1]=s*p+o*v+l*y,n[4]=s*A+o*h+l*m,n[7]=s*d+o*I+l*w,n[2]=u*p+c*v+f*y,n[5]=u*A+c*h+f*m,n[8]=u*d+c*I+f*w,n},mulMat4Scalar:function(e,t,n){return n||(n=e),n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n},mulMat4v4:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=t[0],i=t[1],a=t[2],s=t[3];return n[0]=e[0]*r+e[4]*i+e[8]*a+e[12]*s,n[1]=e[1]*r+e[5]*i+e[9]*a+e[13]*s,n[2]=e[2]*r+e[6]*i+e[10]*a+e[14]*s,n[3]=e[3]*r+e[7]*i+e[11]*a+e[15]*s,n},transposeMat4:function(e,t){var n=e[4],r=e[14],i=e[8],a=e[13],s=e[12],o=e[9];if(!t||e===t){var l=e[1],u=e[2],c=e[3],f=e[6],p=e[7],A=e[11];return e[1]=n,e[2]=i,e[3]=s,e[4]=l,e[6]=o,e[7]=a,e[8]=u,e[9]=f,e[11]=r,e[12]=c,e[13]=p,e[14]=A,e}return t[0]=e[0],t[1]=n,t[2]=i,t[3]=s,t[4]=e[1],t[5]=e[5],t[6]=o,t[7]=a,t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=r,t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15],t},transposeMat3:function(e,t){if(t===e){var n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t},determinantMat4:function(e){var t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],f=e[10],p=e[11],A=e[12],d=e[13],v=e[14],h=e[15];return A*c*o*i-u*d*o*i-A*s*f*i+a*d*f*i+u*s*v*i-a*c*v*i-A*c*r*l+u*d*r*l+A*n*f*l-t*d*f*l-u*n*v*l+t*c*v*l+A*s*r*p-a*d*r*p-A*n*o*p+t*d*o*p+a*n*v*p-t*s*v*p-u*s*r*h+a*c*r*h+u*n*o*h-t*c*o*h-a*n*f*h+t*s*f*h},inverseMat4:function(e,t){t||(t=e);var n=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],c=e[8],f=e[9],p=e[10],A=e[11],d=e[12],v=e[13],h=e[14],I=e[15],y=n*o-r*s,m=n*l-i*s,w=n*u-a*s,g=r*l-i*o,E=r*u-a*o,T=i*u-a*l,b=c*v-f*d,D=c*h-p*d,P=c*I-A*d,C=f*h-p*v,_=f*I-A*v,R=p*I-A*h,B=1/(y*R-m*_+w*C+g*P-E*D+T*b);return t[0]=(o*R-l*_+u*C)*B,t[1]=(-r*R+i*_-a*C)*B,t[2]=(v*T-h*E+I*g)*B,t[3]=(-f*T+p*E-A*g)*B,t[4]=(-s*R+l*P-u*D)*B,t[5]=(n*R-i*P+a*D)*B,t[6]=(-d*T+h*w-I*m)*B,t[7]=(c*T-p*w+A*m)*B,t[8]=(s*_-o*P+u*b)*B,t[9]=(-n*_+r*P-a*b)*B,t[10]=(d*E-v*w+I*y)*B,t[11]=(-c*E+f*w-A*y)*B,t[12]=(-s*C+o*D-l*b)*B,t[13]=(n*C-r*D+i*b)*B,t[14]=(-d*g+v*m-h*y)*B,t[15]=(c*g-f*m+p*y)*B,t},traceMat4:function(e){return e[0]+e[5]+e[10]+e[15]},translationMat4v:function(e,t){var n=t||$.identityMat4();return n[12]=e[0],n[13]=e[1],n[14]=e[2],n},translationMat3v:function(e,t){var n=t||$.identityMat3();return n[6]=e[0],n[7]=e[1],n},translationMat4c:(H=new Y(3),function(e,t,n,r){return H[0]=e,H[1]=t,H[2]=n,$.translationMat4v(H,r)}),translationMat4s:function(e,t){return $.translationMat4c(e,e,e,t)},translateMat4v:function(e,t){return $.translateMat4c(e[0],e[1],e[2],t)},translateMat4c:function(e,t,n,r){var i=r[3];r[0]+=i*e,r[1]+=i*t,r[2]+=i*n;var a=r[7];r[4]+=a*e,r[5]+=a*t,r[6]+=a*n;var s=r[11];r[8]+=s*e,r[9]+=s*t,r[10]+=s*n;var o=r[15];return r[12]+=o*e,r[13]+=o*t,r[14]+=o*n,r},setMat4Translation:function(e,t,n){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=e[15],n},rotationMat4v:function(e,t,n){var r,i,a,s,o,l,u=$.normalizeVec4([t[0],t[1],t[2],0],[]),c=Math.sin(e),f=Math.cos(e),p=1-f,A=u[0],d=u[1],v=u[2];return r=A*d,i=d*v,a=v*A,s=A*c,o=d*c,l=v*c,(n=n||$.mat4())[0]=p*A*A+f,n[1]=p*r+l,n[2]=p*a-o,n[3]=0,n[4]=p*r-l,n[5]=p*d*d+f,n[6]=p*i+s,n[7]=0,n[8]=p*a+o,n[9]=p*i-s,n[10]=p*v*v+f,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n},rotationMat4c:function(e,t,n,r,i){return $.rotationMat4v(e,[t,n,r],i)},scalingMat4v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.identityMat4();return t[0]=e[0],t[5]=e[1],t[10]=e[2],t},scalingMat3v:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.identityMat3();return t[0]=e[0],t[4]=e[1],t},scalingMat4c:function(){var e=new Y(3);return function(t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,$.scalingMat4v(e,i)}}(),scaleMat4c:function(e,t,n,r){return r[0]*=e,r[4]*=t,r[8]*=n,r[1]*=e,r[5]*=t,r[9]*=n,r[2]*=e,r[6]*=t,r[10]*=n,r[3]*=e,r[7]*=t,r[11]*=n,r},scaleMat4v:function(e,t){var n=e[0],r=e[1],i=e[2];return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,t},scalingMat4s:function(e){return $.scalingMat4c(e,e,e)},rotationTranslationMat4:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.mat4(),r=e[0],i=e[1],a=e[2],s=e[3],o=r+r,l=i+i,u=a+a,c=r*o,f=r*l,p=r*u,A=i*l,d=i*u,v=a*u,h=s*o,I=s*l,y=s*u;return n[0]=1-(A+v),n[1]=f+y,n[2]=p-I,n[3]=0,n[4]=f-y,n[5]=1-(c+v),n[6]=d+h,n[7]=0,n[8]=p+I,n[9]=d-h,n[10]=1-(c+A),n[11]=0,n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=1,n},mat4ToEuler:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=$.clamp,i=e[0],a=e[4],s=e[8],o=e[1],l=e[5],u=e[9],c=e[2],f=e[6],p=e[10];return"XYZ"===t?(n[1]=Math.asin(r(s,-1,1)),Math.abs(s)<.99999?(n[0]=Math.atan2(-u,p),n[2]=Math.atan2(-a,i)):(n[0]=Math.atan2(f,l),n[2]=0)):"YXZ"===t?(n[0]=Math.asin(-r(u,-1,1)),Math.abs(u)<.99999?(n[1]=Math.atan2(s,p),n[2]=Math.atan2(o,l)):(n[1]=Math.atan2(-c,i),n[2]=0)):"ZXY"===t?(n[0]=Math.asin(r(f,-1,1)),Math.abs(f)<.99999?(n[1]=Math.atan2(-c,p),n[2]=Math.atan2(-a,l)):(n[1]=0,n[2]=Math.atan2(o,i))):"ZYX"===t?(n[1]=Math.asin(-r(c,-1,1)),Math.abs(c)<.99999?(n[0]=Math.atan2(f,p),n[2]=Math.atan2(o,i)):(n[0]=0,n[2]=Math.atan2(-a,l))):"YZX"===t?(n[2]=Math.asin(r(o,-1,1)),Math.abs(o)<.99999?(n[0]=Math.atan2(-u,l),n[1]=Math.atan2(-c,i)):(n[0]=0,n[1]=Math.atan2(s,p))):"XZY"===t&&(n[2]=Math.asin(-r(a,-1,1)),Math.abs(a)<.99999?(n[0]=Math.atan2(f,l),n[1]=Math.atan2(s,i)):(n[0]=Math.atan2(-u,p),n[1]=0)),n},composeMat4:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$.mat4();return $.quaternionToRotationMat4(t,r),$.scaleMat4v(n,r),$.translateMat4v(e,r),r},decomposeMat4:function(){var e=new Y(3),t=new Y(16);return function(n,r,i,a){e[0]=n[0],e[1]=n[1],e[2]=n[2];var s=$.lenVec3(e);e[0]=n[4],e[1]=n[5],e[2]=n[6];var o=$.lenVec3(e);e[8]=n[8],e[9]=n[9],e[10]=n[10];var l=$.lenVec3(e);$.determinantMat4(n)<0&&(s=-s),r[0]=n[12],r[1]=n[13],r[2]=n[14],t.set(n);var u=1/s,c=1/o,f=1/l;return t[0]*=u,t[1]*=u,t[2]*=u,t[4]*=c,t[5]*=c,t[6]*=c,t[8]*=f,t[9]*=f,t[10]*=f,$.mat4ToQuaternion(t,i),a[0]=s,a[1]=o,a[2]=l,this}}(),getColMat4:function(e,t){var n=4*t;return[e[n],e[n+1],e[n+2],e[n+3]]},setRowMat4:function(e,t,n){e[t]=n[0],e[t+4]=n[1],e[t+8]=n[2],e[t+12]=n[3]},lookAtMat4v:function(e,t,n,r){r||(r=$.mat4());var i,a,s,o,l,u,c,f,p,A,d=e[0],v=e[1],h=e[2],I=n[0],y=n[1],m=n[2],w=t[0],g=t[1],E=t[2];return d===w&&v===g&&h===E?$.identityMat4():(i=d-w,a=v-g,s=h-E,o=y*(s*=A=1/Math.sqrt(i*i+a*a+s*s))-m*(a*=A),l=m*(i*=A)-I*s,u=I*a-y*i,(A=Math.sqrt(o*o+l*l+u*u))?(o*=A=1/A,l*=A,u*=A):(o=0,l=0,u=0),c=a*u-s*l,f=s*o-i*u,p=i*l-a*o,(A=Math.sqrt(c*c+f*f+p*p))?(c*=A=1/A,f*=A,p*=A):(c=0,f=0,p=0),r[0]=o,r[1]=c,r[2]=i,r[3]=0,r[4]=l,r[5]=f,r[6]=a,r[7]=0,r[8]=u,r[9]=p,r[10]=s,r[11]=0,r[12]=-(o*d+l*v+u*h),r[13]=-(c*d+f*v+p*h),r[14]=-(i*d+a*v+s*h),r[15]=1,r)},lookAtMat4c:function(e,t,n,r,i,a,s,o,l){return $.lookAtMat4v([e,t,n],[r,i,a],[s,o,l],[])},orthoMat4c:function(e,t,n,r,i,a,s){s||(s=$.mat4());var o=t-e,l=r-n,u=a-i;return s[0]=2/o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2/l,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=-2/u,s[11]=0,s[12]=-(e+t)/o,s[13]=-(r+n)/l,s[14]=-(a+i)/u,s[15]=1,s},frustumMat4v:function(e,t,n){n||(n=$.mat4());var r=[e[0],e[1],e[2],0],i=[t[0],t[1],t[2],0];$.addVec4(i,r,q),$.subVec4(i,r,J);var a=2*r[2],s=J[0],o=J[1],l=J[2];return n[0]=a/s,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=a/o,n[6]=0,n[7]=0,n[8]=q[0]/s,n[9]=q[1]/o,n[10]=-q[2]/l,n[11]=-1,n[12]=0,n[13]=0,n[14]=-a*i[2]/l,n[15]=0,n},frustumMat4:function(e,t,n,r,i,a,s){s||(s=$.mat4());var o=t-e,l=r-n,u=a-i;return s[0]=2*i/o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=2*i/l,s[6]=0,s[7]=0,s[8]=(t+e)/o,s[9]=(r+n)/l,s[10]=-(a+i)/u,s[11]=-1,s[12]=0,s[13]=0,s[14]=-a*i*2/u,s[15]=0,s},perspectiveMat4:function(e,t,n,r,i){var a=[],s=[];return a[2]=n,s[2]=r,s[1]=a[2]*Math.tan(e/2),a[1]=-s[1],s[0]=s[1]*t,a[0]=-s[0],$.frustumMat4v(a,s,i)},compareMat4:function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]},transformPoint3:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec3(),r=t[0],i=t[1],a=t[2];return n[0]=e[0]*r+e[4]*i+e[8]*a+e[12],n[1]=e[1]*r+e[5]*i+e[9]*a+e[13],n[2]=e[2]*r+e[6]*i+e[10]*a+e[14],n},transformPoint4:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4();return n[0]=e[0]*t[0]+e[4]*t[1]+e[8]*t[2]+e[12]*t[3],n[1]=e[1]*t[0]+e[5]*t[1]+e[9]*t[2]+e[13]*t[3],n[2]=e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]*t[3],n[3]=e[3]*t[0]+e[7]*t[1]+e[11]*t[2]+e[15]*t[3],n},transformPoints3:function(e,t,n){for(var r,i,a,s,o,l=n||[],u=t.length,c=e[0],f=e[1],p=e[2],A=e[3],d=e[4],v=e[5],h=e[6],I=e[7],y=e[8],m=e[9],w=e[10],g=e[11],E=e[12],T=e[13],b=e[14],D=e[15],P=0;P2&&void 0!==arguments[2]?arguments[2]:t,o=t.length,l=e[0],u=e[1],c=e[2];e[3];var f=e[4],p=e[5],A=e[6];e[7];var d=e[8],v=e[9],h=e[10];e[11];var I=e[12],y=e[13],m=e[14];for(e[15],n=0;n2&&void 0!==arguments[2]?arguments[2]:t,o=t.length,l=e[0],u=e[1],c=e[2],f=e[3],p=e[4],A=e[5],d=e[6],v=e[7],h=e[8],I=e[9],y=e[10],m=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;n3&&void 0!==arguments[3]?arguments[3]:e,i=Math.cos(n),a=Math.sin(n),s=e[0]-t[0],o=e[1]-t[1];return r[0]=s*i-o*a+t[0],r[1]=s*a+o*i+t[1],e},rotateVec3X:function(e,t,n,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r},rotateVec3Y:function(e,t,n,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r},rotateVec3Z:function(e,t,n,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],r[0]=a[0]+t[0],r[1]=a[1]+t[1],r[2]=a[2]+t[2],r},projectVec4:function(e,t){var n=1/e[3];return(t=t||$.vec2())[0]=e[0]*n,t[1]=e[1]*n,t},unprojectVec3:(x=new Y(16),M=new Y(16),F=new Y(16),function(e,t,n,r){return this.transformVec3(this.mulMat4(this.inverseMat4(t,x),this.inverseMat4(n,M),F),e,r)}),lerpVec3:function(e,t,n,r,i,a){var s=a||$.vec3(),o=(e-t)/(n-t);return s[0]=r[0]+o*(i[0]-r[0]),s[1]=r[1]+o*(i[1]-r[1]),s[2]=r[2]+o*(i[2]-r[2]),s},lerpMat4:function(e,t,n,r,i,a){var s=a||$.mat4(),o=(e-t)/(n-t);return s[0]=r[0]+o*(i[0]-r[0]),s[1]=r[1]+o*(i[1]-r[1]),s[2]=r[2]+o*(i[2]-r[2]),s[3]=r[3]+o*(i[3]-r[3]),s[4]=r[4]+o*(i[4]-r[4]),s[5]=r[5]+o*(i[5]-r[5]),s[6]=r[6]+o*(i[6]-r[6]),s[7]=r[7]+o*(i[7]-r[7]),s[8]=r[8]+o*(i[8]-r[8]),s[9]=r[9]+o*(i[9]-r[9]),s[10]=r[10]+o*(i[10]-r[10]),s[11]=r[11]+o*(i[11]-r[11]),s[12]=r[12]+o*(i[12]-r[12]),s[13]=r[13]+o*(i[13]-r[13]),s[14]=r[14]+o*(i[14]-r[14]),s[15]=r[15]+o*(i[15]-r[15]),s},flatten:function(e){var t,n,r,i,a,s=[];for(t=0,n=e.length;t0&&void 0!==arguments[0]?arguments[0]:$.vec4();return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},eulerToQuaternion:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=e[0]*$.DEGTORAD/2,i=e[1]*$.DEGTORAD/2,a=e[2]*$.DEGTORAD/2,s=Math.cos(r),o=Math.cos(i),l=Math.cos(a),u=Math.sin(r),c=Math.sin(i),f=Math.sin(a);return"XYZ"===t?(n[0]=u*o*l+s*c*f,n[1]=s*c*l-u*o*f,n[2]=s*o*f+u*c*l,n[3]=s*o*l-u*c*f):"YXZ"===t?(n[0]=u*o*l+s*c*f,n[1]=s*c*l-u*o*f,n[2]=s*o*f-u*c*l,n[3]=s*o*l+u*c*f):"ZXY"===t?(n[0]=u*o*l-s*c*f,n[1]=s*c*l+u*o*f,n[2]=s*o*f+u*c*l,n[3]=s*o*l-u*c*f):"ZYX"===t?(n[0]=u*o*l-s*c*f,n[1]=s*c*l+u*o*f,n[2]=s*o*f-u*c*l,n[3]=s*o*l+u*c*f):"YZX"===t?(n[0]=u*o*l+s*c*f,n[1]=s*c*l+u*o*f,n[2]=s*o*f-u*c*l,n[3]=s*o*l-u*c*f):"XZY"===t&&(n[0]=u*o*l-s*c*f,n[1]=s*c*l-u*o*f,n[2]=s*o*f+u*c*l,n[3]=s*o*l+u*c*f),n},mat4ToQuaternion:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec4(),r=e[0],i=e[4],a=e[8],s=e[1],o=e[5],l=e[9],u=e[2],c=e[6],f=e[10],p=r+o+f;return p>0?(t=.5/Math.sqrt(p+1),n[3]=.25/t,n[0]=(c-l)*t,n[1]=(a-u)*t,n[2]=(s-i)*t):r>o&&r>f?(t=2*Math.sqrt(1+r-o-f),n[3]=(c-l)/t,n[0]=.25*t,n[1]=(i+s)/t,n[2]=(a+u)/t):o>f?(t=2*Math.sqrt(1+o-r-f),n[3]=(a-u)/t,n[0]=(i+s)/t,n[1]=.25*t,n[2]=(l+c)/t):(t=2*Math.sqrt(1+f-r-o),n[3]=(s-i)/t,n[0]=(a+u)/t,n[1]=(l+c)/t,n[2]=.25*t),n},vec3PairToQuaternion:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=Math.sqrt($.dotVec3(e,e)*$.dotVec3(t,t)),i=r+$.dotVec3(e,t);return i<1e-8*r?(i=0,Math.abs(e[0])>Math.abs(e[2])?(n[0]=-e[1],n[1]=e[0],n[2]=0):(n[0]=0,n[1]=-e[2],n[2]=e[1])):$.cross3Vec3(e,t,n),n[3]=i,$.normalizeQuaternion(n)},angleAxisToQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec4(),n=e[3]/2,r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t},quaternionToEuler:function(){var e=new Y(16);return function(t,n,r){return r=r||$.vec3(),$.quaternionToRotationMat4(t,e),$.mat4ToEuler(e,n,r),r}}(),mulQuaternions:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec4(),r=e[0],i=e[1],a=e[2],s=e[3],o=t[0],l=t[1],u=t[2],c=t[3];return n[0]=s*o+r*c+i*u-a*l,n[1]=s*l+i*c+a*o-r*u,n[2]=s*u+a*c+r*l-i*o,n[3]=s*c-r*o-i*l-a*u,n},vec3ApplyQuaternion:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:$.vec3(),r=t[0],i=t[1],a=t[2],s=e[0],o=e[1],l=e[2],u=e[3],c=u*r+o*a-l*i,f=u*i+l*r-s*a,p=u*a+s*i-o*r,A=-s*r-o*i-l*a;return n[0]=c*u+A*-s+f*-l-p*-o,n[1]=f*u+A*-o+p*-s-c*-l,n[2]=p*u+A*-l+c*-o-f*-s,n},quaternionToMat4:function(e,t){t=$.identityMat4(t);var n=e[0],r=e[1],i=e[2],a=e[3],s=2*n,o=2*r,l=2*i,u=s*a,c=o*a,f=l*a,p=s*n,A=o*n,d=l*n,v=o*r,h=l*r,I=l*i;return t[0]=1-(v+I),t[1]=A+f,t[2]=d-c,t[4]=A-f,t[5]=1-(p+I),t[6]=h+u,t[8]=d+c,t[9]=h-u,t[10]=1-(p+v),t},quaternionToRotationMat4:function(e,t){var n=e[0],r=e[1],i=e[2],a=e[3],s=n+n,o=r+r,l=i+i,u=n*s,c=n*o,f=n*l,p=r*o,A=r*l,d=i*l,v=a*s,h=a*o,I=a*l;return t[0]=1-(p+d),t[4]=c-I,t[8]=f+h,t[1]=c+I,t[5]=1-(u+d),t[9]=A-v,t[2]=f-h,t[6]=A+v,t[10]=1-(u+p),t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},normalizeQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=$.lenVec4([e[0],e[1],e[2],e[3]]);return t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n,t[3]=e[3]/n,t},conjugateQuaternion:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t},inverseQuaternion:function(e,t){return $.normalizeQuaternion($.conjugateQuaternion(e,t))},quaternionToAngleAxis:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec4(),n=(e=$.normalizeQuaternion(e,Z))[3],r=2*Math.acos(n),i=Math.sqrt(1-n*n);return i<.001?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=e[0]/i,t[1]=e[1]/i,t[2]=e[2]/i),t[3]=r,t},AABB3:function(e){return new Y(e||6)},AABB2:function(e){return new Y(e||4)},OBB3:function(e){return new Y(e||32)},OBB2:function(e){return new Y(e||16)},Sphere3:function(e,t,n,r){return new Y([e,t,n,r])},transformOBB3:function(e,t){var n,r,i,a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,o=t.length,l=e[0],u=e[1],c=e[2],f=e[3],p=e[4],A=e[5],d=e[6],v=e[7],h=e[8],I=e[9],y=e[10],m=e[11],w=e[12],g=e[13],E=e[14],T=e[15];for(n=0;no?s:o,a[1]+=l>u?l:u,a[2]+=c>f?c:f,Math.abs($.lenVec3(a))}}(),getAABB3Area:function(e){return(e[3]-e[0])*(e[4]-e[1])*(e[5]-e[2])},getAABB3Center:function(e,t){var n=t||$.vec3();return n[0]=(e[0]+e[3])/2,n[1]=(e[1]+e[4])/2,n[2]=(e[2]+e[5])/2,n},getAABB2Center:function(e,t){var n=t||$.vec2();return n[0]=(e[2]+e[0])/2,n[1]=(e[3]+e[1])/2,n},collapseAABB3:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:$.AABB3();return e[0]=$.MAX_DOUBLE,e[1]=$.MAX_DOUBLE,e[2]=$.MAX_DOUBLE,e[3]=$.MIN_DOUBLE,e[4]=$.MIN_DOUBLE,e[5]=$.MIN_DOUBLE,e},AABB3ToOBB3:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.OBB3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t[4]=e[3],t[5]=e[1],t[6]=e[2],t[7]=1,t[8]=e[3],t[9]=e[4],t[10]=e[2],t[11]=1,t[12]=e[0],t[13]=e[4],t[14]=e[2],t[15]=1,t[16]=e[0],t[17]=e[1],t[18]=e[5],t[19]=1,t[20]=e[3],t[21]=e[1],t[22]=e[5],t[23]=1,t[24]=e[3],t[25]=e[4],t[26]=e[5],t[27]=1,t[28]=e[0],t[29]=e[4],t[30]=e[5],t[31]=1,t},positions3ToAABB3:function(){var e=new Y(3);return function(t,n,r){n=n||$.AABB3();for(var i,a,s,o=$.MAX_DOUBLE,l=$.MAX_DOUBLE,u=$.MAX_DOUBLE,c=$.MIN_DOUBLE,f=$.MIN_DOUBLE,p=$.MIN_DOUBLE,A=0,d=t.length;Ac&&(c=i),a>f&&(f=a),s>p&&(p=s);return n[0]=o,n[1]=l,n[2]=u,n[3]=c,n[4]=f,n[5]=p,n}}(),OBB3ToAABB3:function(e){for(var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.AABB3(),a=$.MAX_DOUBLE,s=$.MAX_DOUBLE,o=$.MAX_DOUBLE,l=$.MIN_DOUBLE,u=$.MIN_DOUBLE,c=$.MIN_DOUBLE,f=0,p=e.length;fl&&(l=t),n>u&&(u=n),r>c&&(c=r);return i[0]=a,i[1]=s,i[2]=o,i[3]=l,i[4]=u,i[5]=c,i},points3ToAABB3:function(e){for(var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.AABB3(),a=$.MAX_DOUBLE,s=$.MAX_DOUBLE,o=$.MAX_DOUBLE,l=$.MIN_DOUBLE,u=$.MIN_DOUBLE,c=$.MIN_DOUBLE,f=0,p=e.length;fl&&(l=t),n>u&&(u=n),r>c&&(c=r);return i[0]=a,i[1]=s,i[2]=o,i[3]=l,i[4]=u,i[5]=c,i},points3ToSphere3:function(){var e=new Y(3);return function(t,n){n=n||$.vec4();var r,i=0,a=0,s=0,o=t.length;for(r=0;ru&&(u=l);return n[3]=u,n}}(),positions3ToSphere3:function(){var e=new Y(3),t=new Y(3);return function(n,r){r=r||$.vec4();var i,a=0,s=0,o=0,l=n.length,u=0;for(i=0;iu&&(u=c);return r[3]=u,r}}(),OBB3ToSphere3:function(){var e=new Y(3),t=new Y(3);return function(n,r){r=r||$.vec4();var i,a=0,s=0,o=0,l=n.length,u=l/4;for(i=0;if&&(f=c);return r[3]=f,r}}(),getSphere3Center:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3();return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},getPositionsCenter:function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3(),n=0,r=0,i=0,a=0,s=e.length;at[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]>t[2]&&(e[2]=t[2]),e[3]n&&(e[0]=n),e[1]>r&&(e[1]=r),e[2]>i&&(e[2]=i),e[3]0&&void 0!==arguments[0]?arguments[0]:$.AABB2();return e[0]=$.MAX_DOUBLE,e[1]=$.MAX_DOUBLE,e[2]=$.MIN_DOUBLE,e[3]=$.MIN_DOUBLE,e},point3AABB3Intersect:function(e,t){return e[0]>t[0]||e[3]t[1]||e[4]t[2]||e[5]0?(r=e[0]*n[0],i=e[0]*n[3]):(r=e[0]*n[3],i=e[0]*n[0]),e[1]>0?(r+=e[1]*n[1],i+=e[1]*n[4]):(r+=e[1]*n[4],i+=e[1]*n[1]),e[2]>0?(r+=e[2]*n[2],i+=e[2]*n[5]):(r+=e[2]*n[5],i+=e[2]*n[2]),r<=-t&&i<=-t?-1:r>=-t&&i>=-t?1:0},OBB3ToAABB2:function(e){for(var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.AABB2(),a=$.MAX_DOUBLE,s=$.MAX_DOUBLE,o=$.MIN_DOUBLE,l=$.MIN_DOUBLE,u=0,c=e.length;uo&&(o=t),n>l&&(l=n);return i[0]=a,i[1]=s,i[2]=o,i[3]=l,i},expandAABB2:function(e,t){return e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]3&&void 0!==arguments[3]?arguments[3]:e,i=.5*(e[0]+1),a=.5*(e[1]+1),s=.5*(e[2]+1),o=.5*(e[3]+1);return r[0]=Math.floor(i*t),r[1]=n-Math.floor(o*n),r[2]=Math.floor(s*t),r[3]=n-Math.floor(a*n),r},tangentQuadraticBezier:function(e,t,n,r){return 2*(1-e)*(n-t)+2*e*(r-n)},tangentQuadraticBezier3:function(e,t,n,r,i){return-3*t*(1-e)*(1-e)+3*n*(1-e)*(1-e)-6*e*n*(1-e)+6*e*r*(1-e)-3*e*e*r+3*e*e*i},tangentSpline:function(e){return 6*e*e-6*e+(3*e*e-4*e+1)+(-6*e*e+6*e)+(3*e*e-2*e)},catmullRomInterpolate:function(e,t,n,r,i){var a=.5*(n-e),s=.5*(r-t),o=i*i;return(2*t-2*n+a+s)*(i*o)+(-3*t+3*n-2*a-s)*o+a*i+t},b2p0:function(e,t){var n=1-e;return n*n*t},b2p1:function(e,t){return 2*(1-e)*e*t},b2p2:function(e,t){return e*e*t},b2:function(e,t,n,r){return this.b2p0(e,t)+this.b2p1(e,n)+this.b2p2(e,r)},b3p0:function(e,t){var n=1-e;return n*n*n*t},b3p1:function(e,t){var n=1-e;return 3*n*n*e*t},b3p2:function(e,t){return 3*(1-e)*e*e*t},b3p3:function(e,t){return e*e*e*t},b3:function(e,t,n,r,i){return this.b3p0(e,t)+this.b3p1(e,n)+this.b3p2(e,r)+this.b3p3(e,i)},triangleNormal:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:$.vec3(),i=t[0]-e[0],a=t[1]-e[1],s=t[2]-e[2],o=n[0]-e[0],l=n[1]-e[1],u=n[2]-e[2],c=a*u-s*l,f=s*o-i*u,p=i*l-a*o,A=Math.sqrt(c*c+f*f+p*p);return 0===A?(r[0]=0,r[1]=0,r[2]=0):(r[0]=c/A,r[1]=f/A,r[2]=p/A),r},rayTriangleIntersect:function(){var e=new Y(3),t=new Y(3),n=new Y(3),r=new Y(3),i=new Y(3);return function(a,s,o,l,u,c){c=c||$.vec3();var f=$.subVec3(l,o,e),p=$.subVec3(u,o,t),A=$.cross3Vec3(s,p,n),d=$.dotVec3(f,A);if(d<1e-6)return null;var v=$.subVec3(a,o,r),h=$.dotVec3(v,A);if(h<0||h>d)return null;var I=$.cross3Vec3(v,f,i),y=$.dotVec3(s,I);if(y<0||h+y>d)return null;var m=$.dotVec3(p,I)/d;return c[0]=a[0]+m*s[0],c[1]=a[1]+m*s[1],c[2]=a[2]+m*s[2],c}}(),rayPlaneIntersect:function(){var e=new Y(3),t=new Y(3),n=new Y(3),r=new Y(3);return function(i,a,s,o,l,u){u=u||$.vec3(),a=$.normalizeVec3(a,e);var c=$.subVec3(o,s,t),f=$.subVec3(l,s,n),p=$.cross3Vec3(c,f,r);$.normalizeVec3(p,p);var A=-$.dotVec3(s,p),d=-($.dotVec3(i,p)+A)/$.dotVec3(a,p);return u[0]=i[0]+d*a[0],u[1]=i[1]+d*a[1],u[2]=i[2]+d*a[2],u}}(),cartesianToBarycentric:function(){var e=new Y(3),t=new Y(3),n=new Y(3);return function(r,i,a,s,o){var l=$.subVec3(s,i,e),u=$.subVec3(a,i,t),c=$.subVec3(r,i,n),f=$.dotVec3(l,l),p=$.dotVec3(l,u),A=$.dotVec3(l,c),d=$.dotVec3(u,u),v=$.dotVec3(u,c),h=f*d-p*p;if(0===h)return null;var I=1/h,y=(d*A-p*v)*I,m=(f*v-p*A)*I;return o[0]=1-y-m,o[1]=m,o[2]=y,o}}(),barycentricInsideTriangle:function(e){var t=e[1],n=e[2];return n>=0&&t>=0&&n+t<1},barycentricToCartesian:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:$.vec3(),a=e[0],s=e[1],o=e[2];return i[0]=t[0]*a+n[0]*s+r[0]*o,i[1]=t[1]*a+n[1]*s+r[1]*o,i[2]=t[2]*a+n[2]*s+r[2]*o,i},mergeVertices:function(e,t,n,r){var i,a,s,o,l,u,c={},f=[],p=[],A=t?[]:null,d=n?[]:null,v=[],h=Math.pow(10,4),I=0;for(l=0,u=e.length;l>24&255,s=f>>16&255,a=f>>8&255,i=255&f,r=3*t[d],u[p++]=e[r],u[p++]=e[r+1],u[p++]=e[r+2],c[A++]=i,c[A++]=a,c[A++]=s,c[A++]=o,r=3*t[d+1],u[p++]=e[r],u[p++]=e[r+1],u[p++]=e[r+2],c[A++]=i,c[A++]=a,c[A++]=s,c[A++]=o,r=3*t[d+2],u[p++]=e[r],u[p++]=e[r+1],u[p++]=e[r+2],c[A++]=i,c[A++]=a,c[A++]=s,c[A++]=o,f++;return{positions:u,colors:c}},faceToVertexNormals:function(e,t){var n,r,i,a,s,o,l,u,c,f,p,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},d=A.smoothNormalsAngleThreshold||20,v={},h=[],I={},y=4,m=Math.pow(10,y);for(l=0,c=e.length;ll[3]&&(l[3]=i[p]),i[p+1]l[4]&&(l[4]=i[p+1]),i[p+2]l[5]&&(l[5]=i[p+2])}if(n.length<20||a>10)return u.triangles=n,u.leaf=!0,u;e[0]=l[3]-l[0],e[1]=l[4]-l[1],e[2]=l[5]-l[2];var A=0;e[1]>e[A]&&(A=1),e[2]>e[A]&&(A=2),u.splitDim=A;var d=(l[A]+l[A+3])/2,v=new Array(n.length),h=0,I=new Array(n.length),y=0;for(s=0,o=n.length;s2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;r2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;r=0?1:-1),r=(1-Math.abs(n))*(r>=0?1:-1));var a=Math.sqrt(n*n+r*r+i*i);return t[0]=n/a,t[1]=r/a,t[2]=i/a,t},octDecodeVec2s:function(e,t){for(var n=0,r=0,i=e.length;n=0?1:-1),s=(1-Math.abs(a))*(s>=0?1:-1));var l=Math.sqrt(a*a+s*s+o*o);t[r+0]=a/l,t[r+1]=s/l,t[r+2]=o/l,r+=3}return t}};$.buildEdgeIndices=function(){var e=[],t=[],n=[],r=[],i=[],a=0,s=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),u=$.vec3(),c=$.vec3(),f=$.vec3(),p=$.vec3(),A=$.vec3(),d=$.vec3(),v=$.vec3();return function(h,I,y,m){!function(i,a){var s,o,l,u,c,f,p={},A=Math.pow(10,4),d=0;for(c=0,f=i.length;cO)||(_=n[D.index1],R=n[D.index2],(!N&&_>65535||R>65535)&&(N=!0),B.push(_),B.push(R));return N?new Uint32Array(B):new Uint16Array(B)}}(),$.planeClipsPositions3=function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:3,i=0,a=n.length;i=this._maxTreeDepth)return e.entities=e.entities||[],void e.entities.push(t);if(e.left&&$.containsAABB3(e.left.aabb,r))this._insertEntity(e.left,t,n+1);else if(e.right&&$.containsAABB3(e.right.aabb,r))this._insertEntity(e.right,t,n+1);else{var i=e.aabb;ee[0]=i[3]-i[0],ee[1]=i[4]-i[1],ee[2]=i[5]-i[2];var a=0;if(ee[1]>ee[a]&&(a=1),ee[2]>ee[a]&&(a=2),!e.left){var s=i.slice();if(s[a+3]=(i[a]+i[a+3])/2,e.left={aabb:s},$.containsAABB3(s,r))return void this._insertEntity(e.left,t,n+1)}if(!e.right){var o=i.slice();if(o[a]=(i[a]+i[a+3])/2,e.right={aabb:o},$.containsAABB3(o,r))return void this._insertEntity(e.right,t,n+1)}e.entities=e.entities||[],e.entities.push(t)}}},{key:"destroy",value:function(){var e=this.viewer.scene;e.off(this._onModelLoaded),e.off(this._onModelUnloaded),this._root=null,this._needsRebuild=!0}}]),e}(),ne=function(){function e(){b(this,e),this._head=[],this._headLength=0,this._tail=[],this._index=0,this._length=0}return P(e,[{key:"length",get:function(){return this._length}},{key:"shift",value:function(){if(this._index>=this._headLength){var e=this._head;if(e.length=0,this._head=this._tail,this._tail=e,this._index=0,this._headLength=this._head.length,!this._headLength)return}var t=this._head[this._index];return this._index<0?delete this._head[this._index++]:this._head[this._index++]=void 0,this._length--,t}},{key:"push",value:function(e){return this._length++,this._tail.push(e),this}},{key:"unshift",value:function(e){return this._head[--this._index]=e,this._length++,this}}]),e}(),re={build:{version:"0.8"},client:{browser:navigator&&navigator.userAgent?navigator.userAgent:"n/a"},components:{scenes:0,models:0,meshes:0,objects:0},memory:{meshes:0,positions:0,colors:0,normals:0,uvs:0,indices:0,textures:0,transforms:0,materials:0,programs:0},frame:{frameCount:0,fps:0,useProgram:0,bindTexture:0,bindArray:0,drawElements:0,drawArrays:0,tasksRun:0,tasksScheduled:0}};var ie=[["0",10],["A",26],["a",26],["_",1],["$",1]].map((function(e){for(var t=[],n=e[0].charCodeAt(0),r=n+e[1],i=n;i1&&void 0!==arguments[1]?arguments[1]:null;fe.push(e),fe.push(t)},this.runTasks=function(){for(var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1,r=(new Date).getTime(),i=0;fe.length>0&&(n<0||r0&&oe>0){var t=1e3/oe;ve+=t,Ae.push(t),Ae.length>=30&&(ve-=Ae.shift()),re.frame.fps=Math.round(ve/Ae.length)}for(var n in he.scenes)he.scenes[n].compile();ye(e),de=e};new(function(){function e(t,n){b(this,e),E(this,"worker",null);var r=new Blob(["setInterval(() => postMessage(0), ".concat(n,");")]),i=URL.createObjectURL(r);this.worker=new Worker(i),this.worker.onmessage=t}return P(e,[{key:"stop",value:function(){this.worker.terminate()}}]),e}())(Ie,100);function ye(e){var t=he.runTasks(e+10),n=he.getNumTasks();re.frame.tasksRun=t,re.frame.tasksScheduled=n,re.frame.tasksBudget=10}!function e(){var t=Date.now();if(oe=t-de,de>0&&oe>0){var n=1e3/oe;ve+=n,Ae.push(n),Ae.length>=30&&(ve-=Ae.shift()),re.frame.fps=Math.round(ve/Ae.length)}ye(t),function(e){for(var t in pe.time=e,he.scenes)if(he.scenes.hasOwnProperty(t)){var n=he.scenes[t];pe.sceneId=t,pe.startTime=n.startTime,pe.deltaTime=null!=pe.prevTime?pe.time-pe.prevTime:0,n.fire("tick",pe,!0)}pe.prevTime=e}(t),function(){var e,t,n,r,i,a=he.scenes,s=!1;for(i in a)a.hasOwnProperty(i)&&(e=a[i],(t=ue[i])||(t=ue[i]={}),n=e.ticksPerOcclusionTest,t.ticksPerOcclusionTest!==n&&(t.ticksPerOcclusionTest=n,t.renderCountdown=n),--e.occlusionTestCountdown<=0&&(e.doOcclusionTest(),e.occlusionTestCountdown=n),r=e.ticksPerRender,t.ticksPerRender!==r&&(t.ticksPerRender=r,t.renderCountdown=r),0==--t.renderCountdown&&(e.render(s),t.renderCountdown=r))}(),void 0!==window.requestPostAnimationFrame?window.requestPostAnimationFrame(Ie):requestAnimationFrame(e)}();var me=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,e),this.scene=null,"Scene"===this.type)this.scene=this,this.viewer=n.viewer;else{if("Scene"===t.type)this.scene=t;else{if(!(t instanceof e))throw"Invalid param: owner must be a Component";this.scene=t.scene}this._owner=t}this._dontClear=!!n.dontClear,this._renderer=this.scene._renderer,this.meta=n.meta||{},this.id=n.id,this.destroyed=!1,this._attached={},this._attachments=null,this._subIdMap=null,this._subIdEvents=null,this._eventSubs=null,this._eventSubsNum=null,this._events=null,this._eventCallDepth=0,this._ownedComponents=null,this!==this.scene&&this.scene._addComponent(this),this._updateScheduled=!1,t&&t._own(this)}return P(e,[{key:"type",get:function(){return"Component"}},{key:"isComponent",get:function(){return!0}},{key:"glRedraw",value:function(){this._renderer&&(this._renderer.imageDirty(),this.castsShadow&&this._renderer.shadowsDirty())}},{key:"glResort",value:function(){this._renderer&&this._renderer.needStateSort()}},{key:"owner",get:function(){return this._owner}},{key:"isType",value:function(e){return this.type===e}},{key:"fire",value:function(e,t,n){this._events||(this._events={}),this._eventSubs||(this._eventSubs={},this._eventSubsNum={}),!0!==n&&(this._events[e]=t||!0);var r,i=this._eventSubs[e];if(i)for(var a in i)i.hasOwnProperty(a)&&(r=i[a],this._eventCallDepth++,this._eventCallDepth<300?r.callback.call(r.scope,t):this.error("fire: potential stack overflow from recursive event '"+e+"' - dropping this event"),this._eventCallDepth--)}},{key:"on",value:function(e,t,n){this._events||(this._events={}),this._subIdMap||(this._subIdMap=new G),this._subIdEvents||(this._subIdEvents={}),this._eventSubs||(this._eventSubs={}),this._eventSubsNum||(this._eventSubsNum={});var r=this._eventSubs[e];r?this._eventSubsNum[e]++:(r={},this._eventSubs[e]=r,this._eventSubsNum[e]=1);var i=this._subIdMap.addItem();r[i]={callback:t,scope:n||this},this._subIdEvents[i]=e;var a=this._events[e];return void 0!==a&&t.call(n||this,a),i}},{key:"off",value:function(e){if(null!=e&&this._subIdEvents){var t=this._subIdEvents[e];if(t){delete this._subIdEvents[e];var n=this._eventSubs[t];n&&(delete n[e],this._eventSubsNum[t]--),this._subIdMap.removeItem(e)}}}},{key:"once",value:function(e,t,n){var r=this,i=this.on(e,(function(e){r.off(i),t.call(n||this,e)}),n)}},{key:"hasSubs",value:function(e){return this._eventSubsNum&&this._eventSubsNum[e]>0}},{key:"log",value:function(e){e="[LOG]"+this._message(e),window.console.log(e),this.scene.fire("log",e)}},{key:"_message",value:function(e){return" ["+this.type+" "+le.inQuotes(this.id)+"]: "+e}},{key:"warn",value:function(e){e="[WARN]"+this._message(e),window.console.warn(e),this.scene.fire("warn",e)}},{key:"error",value:function(e){e="[ERROR]"+this._message(e),window.console.error(e),this.scene.fire("error",e)}},{key:"_attach",value:function(e){var t=e.name;if(t){var n=e.component,r=e.sceneDefault,i=e.sceneSingleton,a=e.type,s=e.on,o=!1!==e.recompiles;if(n&&(le.isNumeric(n)||le.isString(n))){var l=n;if(!(n=this.scene.components[l]))return void this.error("Component not found: "+le.inQuotes(l))}if(!n)if(!0===i){var u=this.scene.types[a];for(var c in u)if(u.hasOwnProperty){n=u[c];break}if(!n)return this.error("Scene has no default component for '"+t+"'"),null}else if(!0===r&&!(n=this.scene[t]))return this.error("Scene has no default component for '"+t+"'"),null;if(n){if(n.scene.id!==this.scene.id)return void this.error("Not in same scene: "+n.type+" "+le.inQuotes(n.id));if(a&&!n.isType(a))return void this.error("Expected a "+a+" type or subtype: "+n.type+" "+le.inQuotes(n.id))}this._attachments||(this._attachments={});var f,p,A,d=this._attached[t];if(d){if(n&&d.id===n.id)return;var v=this._attachments[d.id];for(p=0,A=(f=v.subs).length;p=0?1:0,this.testVertex[1]=this.normal[1]>=0?1:0,this.testVertex[2]=this.normal[2]>=0?1:0}}]),e}(),be=P((function e(){b(this,e),this.planes=[new Te,new Te,new Te,new Te,new Te,new Te]}));function De(e,t,n){var r=$.mulMat4(n,t,Ee),i=r[0],a=r[1],s=r[2],o=r[3],l=r[4],u=r[5],c=r[6],f=r[7],p=r[8],A=r[9],d=r[10],v=r[11],h=r[12],I=r[13],y=r[14],m=r[15];e.planes[0].set(o-i,f-l,v-p,m-h),e.planes[1].set(o+i,f+l,v+p,m+h),e.planes[2].set(o-a,f-u,v-A,m-I),e.planes[3].set(o+a,f+u,v+A,m+I),e.planes[4].set(o-s,f-c,v-d,m-y),e.planes[5].set(o+s,f+c,v+d,m+y)}function Pe(e,t){var n=be.INSIDE,r=we,i=ge;r[0]=t[0],r[1]=t[1],r[2]=t[2],i[0]=t[3],i[1]=t[4],i[2]=t[5];for(var a=[r,i],s=0;s<6;++s){var o=e.planes[s];if(o.normal[0]*a[o.testVertex[0]][0]+o.normal[1]*a[o.testVertex[1]][1]+o.normal[2]*a[o.testVertex[2]][2]+o.offset<0)return be.OUTSIDE;o.normal[0]*a[1-o.testVertex[0]][0]+o.normal[1]*a[1-o.testVertex[1]][1]+o.normal[2]*a[1-o.testVertex[2]][2]+o.offset<0&&(n=be.INTERSECT)}return n}be.INSIDE=0,be.INTERSECT=1,be.OUTSIDE=2;var Ce=function(e){h(n,me);var t=y(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(b(this,n),!r.viewer)throw"[MarqueePicker] Missing config: viewer";if(!r.objectsKdTree3)throw"[MarqueePicker] Missing config: objectsKdTree3";return(e=t.call(this,r.viewer.scene,r)).viewer=r.viewer,e._objectsKdTree3=r.objectsKdTree3,e._canvasMarqueeCorner1=$.vec2(),e._canvasMarqueeCorner2=$.vec2(),e._canvasMarquee=$.AABB2(),e._marqueeFrustum=new be,e._marqueeFrustumProjMat=$.mat4(),e._pickMode=!1,e._marqueeElement=document.createElement("div"),document.body.appendChild(e._marqueeElement),e._marqueeElement.style.position="absolute",e._marqueeElement.style["z-index"]="40000005",e._marqueeElement.style.width="8px",e._marqueeElement.style.height="8px",e._marqueeElement.style.visibility="hidden",e._marqueeElement.style.top="0px",e._marqueeElement.style.left="0px",e._marqueeElement.style["box-shadow"]="0 2px 5px 0 #182A3D;",e._marqueeElement.style.opacity=1,e._marqueeElement.style["pointer-events"]="none",e}return P(n,[{key:"setMarqueeCorner1",value:function(e){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(e),this._updateMarquee()}},{key:"setMarqueeCorner2",value:function(e){this._canvasMarqueeCorner2.set(e),this._updateMarquee()}},{key:"setMarquee",value:function(e,t){this._canvasMarqueeCorner1.set(e),this._canvasMarqueeCorner2.set(t),this._updateMarquee()}},{key:"setMarqueeVisible",value:function(e){this._marqueVisible=e,this._marqueeElement.style.visibility=e?"visible":"hidden"}},{key:"getMarqueeVisible",value:function(){return this._marqueVisible}},{key:"setPickMode",value:function(e){if(e!==n.PICK_MODE_INSIDE&&e!==n.PICK_MODE_INTERSECTS)throw"Illegal MarqueePicker pickMode: must be MarqueePicker.PICK_MODE_INSIDE or MarqueePicker.PICK_MODE_INTERSECTS";e!==this._pickMode&&(this._marqueeElement.style["background-image"]=e===n.PICK_MODE_INSIDE?"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4'/%3e%3c/svg%3e\")":"url(\"data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' rx='6' ry='6' stroke='%23333' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e\")",this._pickMode=e)}},{key:"getPickMode",value:function(){return this._pickMode}},{key:"clear",value:function(){this.fire("clear",{})}},{key:"pick",value:function(){var e=this;this._updateMarquee(),this._buildMarqueeFrustum();var t=[];return(this._canvasMarquee[2]-this._canvasMarquee[0]>3||this._canvasMarquee[3]-this._canvasMarquee[1]>3)&&function r(i){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:be.INTERSECT;if(a===be.INTERSECT&&(a=Pe(e._marqueeFrustum,i.aabb)),a!==be.OUTSIDE){if(i.entities)for(var s=i.entities,o=0,l=s.length;o3||n>3)&&f.pick()}})),document.addEventListener("mouseup",(function(e){r.getActive()&&0===e.button&&(clearTimeout(c),A&&(f.setMarqueeVisible(!1),A=!1,d=!1,v=!0,f.viewer.cameraControl.pointerEnabled=!0))}),!0),p.addEventListener("mousemove",(function(e){r.getActive()&&0===e.button&&d&&(clearTimeout(c),A&&(s=e.pageX,o=e.pageY,u=e.offsetX,f.setMarqueeVisible(!0),f.setMarqueeCorner2([s,o]),f.setPickMode(l0}},{key:"log",value:function(e){console.log("[xeokit plugin ".concat(this.id,"]: ").concat(e))}},{key:"warn",value:function(e){console.warn("[xeokit plugin ".concat(this.id,"]: ").concat(e))}},{key:"error",value:function(e){console.error("[xeokit plugin ".concat(this.id,"]: ").concat(e))}},{key:"send",value:function(e,t){}},{key:"destroy",value:function(){this.viewer.removePlugin(this)}}]),e}(),Be=$.vec3(),Oe=function(){var e=new Float64Array(16),t=new Float64Array(4),n=new Float64Array(4);return function(r,i,a){return a=a||e,t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=1,$.transformVec4(r,t,n),$.setMat4Translation(r,n,a),a.slice()}}();function Se(e,t,n){var r=Float32Array.from([e[0]])[0],i=e[0]-r,a=Float32Array.from([e[1]])[0],s=e[1]-a,o=Float32Array.from([e[2]])[0],l=e[2]-o;t[0]=r,t[1]=a,t[2]=o,n[0]=i,n[1]=s,n[2]=l}function Ne(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3,i=$.getPositionsCenter(e,Be),a=Math.round(i[0]/r)*r,s=Math.round(i[1]/r)*r,o=Math.round(i[2]/r)*r;n[0]=a,n[1]=s,n[2]=o;var l=0!==n[0]||0!==n[1]||0!==n[2];if(l)for(var u=0,c=e.length;u0?this.meshes[0]._colorize[3]/255:1},set:function(e){if(0!==this.meshes.length){var t=null!=e,n=this.meshes[0]._colorize[3],r=255;if(t){if(e<0?e=0:e>1&&(e=1),n===(r=Math.floor(255*e)))return}else if(n===(r=255))return;for(var i=0,a=this.meshes.length;i1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this._color=r.color||"black",this._highlightClass="viewer-ruler-wire-highlighted",this._wire=document.createElement("div"),this._wire.className+=this._wire.className?" viewer-ruler-wire":"viewer-ruler-wire",this._wireClickable=document.createElement("div"),this._wireClickable.className+=this._wireClickable.className?" viewer-ruler-wire-clickable":"viewer-ruler-wire-clickable",this._thickness=r.thickness||1,this._thicknessClickable=r.thicknessClickable||6,this._visible=!0,this._culled=!1;var i=this._wire,a=i.style;a.border="solid "+this._thickness+"px "+this._color,a.position="absolute",a["z-index"]=void 0===r.zIndex?"2000001":r.zIndex,a.width="0px",a.height="0px",a.visibility="visible",a.top="0px",a.left="0px",a["-webkit-transform-origin"]="0 0",a["-moz-transform-origin"]="0 0",a["-ms-transform-origin"]="0 0",a["-o-transform-origin"]="0 0",a["transform-origin"]="0 0",a["-webkit-transform"]="rotate(0deg)",a["-moz-transform"]="rotate(0deg)",a["-ms-transform"]="rotate(0deg)",a["-o-transform"]="rotate(0deg)",a.transform="rotate(0deg)",a.opacity=1,a["pointer-events"]="none",r.onContextMenu,t.appendChild(i);var s=this._wireClickable,o=s.style;o.border="solid "+this._thicknessClickable+"px "+this._color,o.position="absolute",o["z-index"]=void 0===r.zIndex?"2000002":r.zIndex+1,o.width="0px",o.height="0px",o.visibility="visible",o.top="0px",o.left="0px",o["-webkit-transform-origin"]="0 0",o["-moz-transform-origin"]="0 0",o["-ms-transform-origin"]="0 0",o["-o-transform-origin"]="0 0",o["transform-origin"]="0 0",o["-webkit-transform"]="rotate(0deg)",o["-moz-transform"]="rotate(0deg)",o["-ms-transform"]="rotate(0deg)",o["-o-transform"]="rotate(0deg)",o.transform="rotate(0deg)",o.opacity=0,o["pointer-events"]="none",r.onContextMenu,t.appendChild(s),r.onMouseOver&&s.addEventListener("mouseover",(function(e){r.onMouseOver(e,n)})),r.onMouseLeave&&s.addEventListener("mouseleave",(function(e){r.onMouseLeave(e,n)})),r.onMouseWheel&&s.addEventListener("wheel",(function(e){r.onMouseWheel(e,n)})),r.onMouseDown&&s.addEventListener("mousedown",(function(e){r.onMouseDown(e,n)})),r.onMouseUp&&s.addEventListener("mouseup",(function(e){r.onMouseUp(e,n)})),r.onMouseMove&&s.addEventListener("mousemove",(function(e){r.onMouseMove(e,n)})),r.onContextMenu&&s.addEventListener("contextmenu",(function(e){r.onContextMenu(e,n),e.preventDefault()})),this._x1=0,this._y1=0,this._x2=0,this._y2=0,this._update()}return P(e,[{key:"visible",get:function(){return"visible"===this._wire.style.visibility}},{key:"_update",value:function(){var e=Math.abs(Math.sqrt((this._x1-this._x2)*(this._x1-this._x2)+(this._y1-this._y2)*(this._y1-this._y2))),t=180*Math.atan2(this._y2-this._y1,this._x2-this._x1)/Math.PI,n=this._wire.style;n.width=Math.round(e)+"px",n.left=Math.round(this._x1)+"px",n.top=Math.round(this._y1)+"px",n["-webkit-transform"]="rotate("+t+"deg)",n["-moz-transform"]="rotate("+t+"deg)",n["-ms-transform"]="rotate("+t+"deg)",n["-o-transform"]="rotate("+t+"deg)",n.transform="rotate("+t+"deg)";var r=this._wireClickable.style;r.width=Math.round(e)+"px",r.left=Math.round(this._x1)+"px",r.top=Math.round(this._y1)+"px",r["-webkit-transform"]="rotate("+t+"deg)",r["-moz-transform"]="rotate("+t+"deg)",r["-ms-transform"]="rotate("+t+"deg)",r["-o-transform"]="rotate("+t+"deg)",r.transform="rotate("+t+"deg)"}},{key:"setStartAndEnd",value:function(e,t,n,r){this._x1=e,this._y1=t,this._x2=n,this._y2=r,this._update()}},{key:"setColor",value:function(e){this._color=e||"black",this._wire.style.border="solid "+this._thickness+"px "+this._color}},{key:"setOpacity",value:function(e){this._wire.style.opacity=e}},{key:"setVisible",value:function(e){this._visible!==e&&(this._visible=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setCulled",value:function(e){this._culled!==e&&(this._culled=!!e,this._wire.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setClickable",value:function(e){this._wireClickable.style["pointer-events"]=e?"all":"none"}},{key:"setHighlighted",value:function(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._wire.classList.add(this._highlightClass):this._wire.classList.remove(this._highlightClass))}},{key:"destroy",value:function(e){this._wire.parentElement&&this._wire.parentElement.removeChild(this._wire),this._wireClickable.parentElement&&this._wireClickable.parentElement.removeChild(this._wireClickable)}}]),e}(),Ze=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this._highlightClass="viewer-ruler-dot-highlighted",this._x=0,this._y=0,this._visible=!0,this._dot=document.createElement("div"),this._dot.className+=this._dot.className?" viewer-ruler-dot":"viewer-ruler-dot",this._dotClickable=document.createElement("div"),this._dotClickable.className+=this._dotClickable.className?" viewer-ruler-dot-clickable":"viewer-ruler-dot-clickable",this._visible=!0,this._culled=!1;var i=this._dot,a=i.style;a["border-radius"]="25px",a.border="solid 2px white",a.background="lightgreen",a.position="absolute",a["z-index"]=void 0===r.zIndex?"40000005":r.zIndex,a.width="8px",a.height="8px",a.visibility=!1!==r.visible?"visible":"hidden",a.top="0px",a.left="0px",a["box-shadow"]="0 2px 5px 0 #182A3D;",a.opacity=1,a["pointer-events"]="none",r.onContextMenu,t.appendChild(i);var s=this._dotClickable,o=s.style;o["border-radius"]="35px",o.border="solid 10px white",o.position="absolute",o["z-index"]=void 0===r.zIndex?"40000007":r.zIndex+1,o.width="8px",o.height="8px",o.visibility="visible",o.top="0px",o.left="0px",o.opacity=0,o["pointer-events"]="none",r.onContextMenu,t.appendChild(s),s.addEventListener("click",(function(e){t.dispatchEvent(new MouseEvent("mouseover",e))})),r.onMouseOver&&s.addEventListener("mouseover",(function(e){r.onMouseOver(e,n),t.dispatchEvent(new MouseEvent("mouseover",e))})),r.onMouseLeave&&s.addEventListener("mouseleave",(function(e){r.onMouseLeave(e,n)})),r.onMouseWheel&&s.addEventListener("wheel",(function(e){r.onMouseWheel(e,n)})),r.onMouseDown&&s.addEventListener("mousedown",(function(e){r.onMouseDown(e,n)})),r.onMouseUp&&s.addEventListener("mouseup",(function(e){r.onMouseUp(e,n)})),r.onMouseMove&&s.addEventListener("mousemove",(function(e){r.onMouseMove(e,n)})),r.onContextMenu&&s.addEventListener("contextmenu",(function(e){r.onContextMenu(e,n),e.preventDefault()})),this.setPos(r.x||0,r.y||0),this.setFillColor(r.fillColor),this.setBorderColor(r.borderColor)}return P(e,[{key:"setPos",value:function(e,t){this._x=e,this._y=t;var n=this._dot.style;n.left=Math.round(e)-4+"px",n.top=Math.round(t)-4+"px";var r=this._dotClickable.style;r.left=Math.round(e)-9+"px",r.top=Math.round(t)-9+"px"}},{key:"setFillColor",value:function(e){this._dot.style.background=e||"lightgreen"}},{key:"setBorderColor",value:function(e){this._dot.style.border="solid 2px"+(e||"black")}},{key:"setOpacity",value:function(e){this._dot.style.opacity=e}},{key:"setVisible",value:function(e){this._visible!==e&&(this._visible=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setCulled",value:function(e){this._culled!==e&&(this._culled=!!e,this._dot.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setClickable",value:function(e){this._dotClickable.style["pointer-events"]=e?"all":"none"}},{key:"setHighlighted",value:function(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._dot.classList.add(this._highlightClass):this._dot.classList.remove(this._highlightClass))}},{key:"destroy",value:function(){this.setVisible(!1),this._dot.parentElement&&this._dot.parentElement.removeChild(this._dot),this._dotClickable.parentElement&&this._dotClickable.parentElement.removeChild(this._dotClickable)}}]),e}(),$e=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,e),this._highlightClass="viewer-ruler-label-highlighted",this._prefix=r.prefix||"",this._x=0,this._y=0,this._visible=!0,this._culled=!1,this._label=document.createElement("div"),this._label.className+=this._label.className?" viewer-ruler-label":"viewer-ruler-label";var i=this._label,a=i.style;a["border-radius"]="5px",a.color="white",a.padding="4px",a.border="solid 1px",a.background="lightgreen",a.position="absolute",a["z-index"]=void 0===r.zIndex?"5000005":r.zIndex,a.width="auto",a.height="auto",a.visibility="visible",a.top="0px",a.left="0px",a["pointer-events"]="all",a.opacity=1,r.onContextMenu,i.innerText="",t.appendChild(i),this.setPos(r.x||0,r.y||0),this.setFillColor(r.fillColor),this.setBorderColor(r.fillColor),this.setText(r.text),r.onMouseOver&&i.addEventListener("mouseover",(function(e){r.onMouseOver(e,n),e.preventDefault()})),r.onMouseLeave&&i.addEventListener("mouseleave",(function(e){r.onMouseLeave(e,n),e.preventDefault()})),r.onMouseWheel&&i.addEventListener("wheel",(function(e){r.onMouseWheel(e,n)})),r.onMouseDown&&i.addEventListener("mousedown",(function(e){r.onMouseDown(e,n)})),r.onMouseUp&&i.addEventListener("mouseup",(function(e){r.onMouseUp(e,n)})),r.onMouseMove&&i.addEventListener("mousemove",(function(e){r.onMouseMove(e,n)})),r.onContextMenu&&i.addEventListener("contextmenu",(function(e){r.onContextMenu(e,n),e.preventDefault()}))}return P(e,[{key:"setPos",value:function(e,t){this._x=e,this._y=t;var n=this._label.style;n.left=Math.round(e)-20+"px",n.top=Math.round(t)-12+"px"}},{key:"setPosOnWire",value:function(e,t,n,r){var i=e+.5*(n-e),a=t+.5*(r-t),s=this._label.style;s.left=Math.round(i)-20+"px",s.top=Math.round(a)-12+"px"}},{key:"setPosBetweenWires",value:function(e,t,n,r,i,a){var s=(e+n+i)/3,o=(t+r+a)/3,l=this._label.style;l.left=Math.round(s)-20+"px",l.top=Math.round(o)-12+"px"}},{key:"setText",value:function(e){this._label.innerHTML=this._prefix+(e||"")}},{key:"setFillColor",value:function(e){this._fillColor=e||"lightgreen",this._label.style.background=this._fillColor}},{key:"setBorderColor",value:function(e){this._borderColor=e||"black",this._label.style.border="solid 1px "+this._borderColor}},{key:"setOpacity",value:function(e){this._label.style.opacity=e}},{key:"setVisible",value:function(e){this._visible!==e&&(this._visible=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setCulled",value:function(e){this._culled!==e&&(this._culled=!!e,this._label.style.visibility=this._visible&&!this._culled?"visible":"hidden")}},{key:"setHighlighted",value:function(e){this._highlighted!==e&&(this._highlighted=!!e,this._highlighted?this._label.classList.add(this._highlightClass):this._label.classList.remove(this._highlightClass))}},{key:"setClickable",value:function(e){this._label.style["pointer-events"]=e?"all":"none"}},{key:"destroy",value:function(){this._label.parentElement&&this._label.parentElement.removeChild(this._label)}}]),e}(),et=$.vec3(),tt=$.vec3(),nt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e.viewer.scene,i)).plugin=e,r._container=i.container,!r._container)throw"config missing: container";r._color=i.color||e.defaultColor;var a=r.plugin.viewer.scene;r._originMarker=new qe(a,i.origin),r._cornerMarker=new qe(a,i.corner),r._targetMarker=new qe(a,i.target),r._originWorld=$.vec3(),r._cornerWorld=$.vec3(),r._targetWorld=$.vec3(),r._wp=new Float64Array(12),r._vp=new Float64Array(12),r._pp=new Float64Array(12),r._cp=new Int16Array(6);var s=i.onMouseOver?function(e){i.onMouseOver(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,o=i.onMouseLeave?function(e){i.onMouseLeave(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,l=i.onContextMenu?function(e){i.onContextMenu(e,w(r))}:null,u=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))},c=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},f=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},p=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))};return r._originDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._cornerDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._targetDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._originWire=new Je(r._container,{color:r._color||"blue",thickness:1,zIndex:e.zIndex,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._targetWire=new Je(r._container,{color:r._color||"red",thickness:1,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._angleLabel=new $e(r._container,{fillColor:r._color||"#00BBFF",prefix:"",text:"",zIndex:e.zIndex+2,onMouseOver:s,onMouseLeave:o,onMouseWheel:u,onMouseDown:c,onMouseUp:f,onMouseMove:p,onContextMenu:l}),r._wpDirty=!1,r._vpDirty=!1,r._cpDirty=!1,r._visible=!1,r._originVisible=!1,r._cornerVisible=!1,r._targetVisible=!1,r._originWireVisible=!1,r._targetWireVisible=!1,r._angleVisible=!1,r._labelsVisible=!1,r._clickable=!1,r._originMarker.on("worldPos",(function(e){r._originWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._cornerMarker.on("worldPos",(function(e){r._cornerWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._targetMarker.on("worldPos",(function(e){r._targetWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._onViewMatrix=a.camera.on("viewMatrix",(function(){r._vpDirty=!0,r._needUpdate(0)})),r._onProjMatrix=a.camera.on("projMatrix",(function(){r._cpDirty=!0,r._needUpdate()})),r._onCanvasBoundary=a.canvas.on("boundary",(function(){r._cpDirty=!0,r._needUpdate(0)})),r._onSectionPlaneUpdated=a.on("sectionPlaneUpdated",(function(){r._sectionPlanesDirty=!0,r._needUpdate()})),r.approximate=i.approximate,r.visible=i.visible,r.originVisible=i.originVisible,r.cornerVisible=i.cornerVisible,r.targetVisible=i.targetVisible,r.originWireVisible=i.originWireVisible,r.targetWireVisible=i.targetWireVisible,r.angleVisible=i.angleVisible,r.labelsVisible=i.labelsVisible,r}return P(n,[{key:"_update",value:function(){if(this._visible){var e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._cornerWorld[0],this._wp[5]=this._cornerWorld[1],this._wp[6]=this._cornerWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._targetWorld[2],this._wp[11]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&($.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._angleLabel.setCulled(!0),this._originWire.setCulled(!0),this._targetWire.setCulled(!0),this._originDot.setCulled(!0),this._cornerDot.setCulled(!0),void this._targetDot.setCulled(!0);this._angleLabel.setCulled(!1),this._originWire.setCulled(!1),this._targetWire.setCulled(!1),this._originDot.setCulled(!1),this._cornerDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}if(this._cpDirty){var t=-.3,n=this._originMarker.viewPos[2],r=this._cornerMarker.viewPos[2],i=this._targetMarker.viewPos[2];if(n>t||r>t||i>t)return this._originDot.setVisible(!1),this._cornerDot.setVisible(!1),this._targetDot.setVisible(!1),this._originWire.setVisible(!1),this._targetWire.setVisible(!1),void this._angleLabel.setCulled(!0);$.transformPositions4(e.camera.project.matrix,this._vp,this._pp);for(var a=this._pp,s=this._cp,o=e.canvas.canvas.getBoundingClientRect(),l=this._container.getBoundingClientRect(),u=o.top-l.top,c=o.left-l.left,f=e.canvas.boundary,p=f[2],A=f[3],d=0,v=0,h=a.length;v1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e.viewer.scene)).pointerLens=i.pointerLens,r._active=!1,r._mouseState=0,r._currentAngleMeasurement=null,r._initMarkerDiv(),r._onMouseHoverSurface=null,r._onHoverNothing=null,r._onPickedNothing=null,r._onPickedSurface=null,r._onInputMouseDown=null,r._onInputMouseUp=null,r._snapping=!1!==i.snapping,r._attachPlugin(e,i),r}return P(n,[{key:"_initMarkerDiv",value:function(){var e=document.createElement("div");e.setAttribute("id","myMarkerDiv");var t=this.scene.canvas.canvas;t.parentNode.insertBefore(e,t),e.style.background="black",e.style.border="2px solid blue",e.style.borderRadius="10px",e.style.width="5px",e.style.height="5px",e.style.margin="-200px -200px",e.style.zIndex="100",e.style.position="absolute",e.style.pointerEvents="none",this.markerDiv=e}},{key:"_destroyMarkerDiv",value:function(){if(this._markerDiv){var e=document.getElementById("myMarkerDiv");e.parentNode.removeChild(e),this._markerDiv=null}}},{key:"_attachPlugin",value:function(e){this.angleMeasurementsPlugin=e,this.plugin=e}},{key:"active",get:function(){return this._active}},{key:"snapping",get:function(){return this._snapping},set:function(e){e!==this._snapping?(this._snapping=e,this.deactivate(),this.activate()):this._snapping=e}},{key:"activate",value:function(){var e=this;if(!this._active){this.markerDiv||this._initMarkerDiv(),this.angleMeasurementsPlugin;var t=this.scene;t.input;var n=t.canvas.canvas,r=this.angleMeasurementsPlugin.viewer.cameraControl,i=this.pointerLens,a=!1,s=null,o=0,l=0,u=$.vec3(),c=$.vec2();this._currentAngleMeasurement=null,this._onMouseHoverSurface=r.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",(function(t){t.snappedToVertex||t.snappedToEdge?(i&&(i.visible=!0,i.canvasPos=t.canvasPos,i.snappedCanvasPos=t.snappedCanvasPos||t.canvasPos,i.snapped=!0),e.markerDiv.style.background="greenyellow",e.markerDiv.style.border="2px solid green"):(i&&(i.visible=!0,i.canvasPos=t.canvasPos,i.snappedCanvasPos=t.canvasPos,i.snapped=!1),e.markerDiv.style.background="pink",e.markerDiv.style.border="2px solid red");var r=t.snappedCanvasPos||t.canvasPos;switch(a=!0,s=t.entity,u.set(t.worldPos),c.set(r),e._mouseState){case 0:var o=n.getBoundingClientRect(),l=window.pageXOffset||document.documentElement.scrollLeft,f=window.pageYOffset||document.documentElement.scrollTop,p=o.left+l,A=o.top+f;e.markerDiv.style.marginLeft="".concat(p+r[0]-5,"px"),e.markerDiv.style.marginTop="".concat(A+r[1]-5,"px");break;case 1:e._currentAngleMeasurement&&(e._currentAngleMeasurement.originWireVisible=!0,e._currentAngleMeasurement.targetWireVisible=!1,e._currentAngleMeasurement.cornerVisible=!0,e._currentAngleMeasurement.angleVisible=!1,e._currentAngleMeasurement.corner.worldPos=t.worldPos,e._currentAngleMeasurement.corner.entity=t.entity),e.markerDiv.style.marginLeft="-10000px",e.markerDiv.style.marginTop="-10000px",n.style.cursor="pointer";break;case 2:e._currentAngleMeasurement&&(e._currentAngleMeasurement.targetWireVisible=!0,e._currentAngleMeasurement.targetVisible=!0,e._currentAngleMeasurement.angleVisible=!0,e._currentAngleMeasurement.target.worldPos=t.worldPos,e._currentAngleMeasurement.target.entity=t.entity),e.markerDiv.style.marginLeft="-10000px",e.markerDiv.style.marginTop="-10000px",n.style.cursor="pointer"}})),n.addEventListener("mousedown",this._onMouseDown=function(e){1===e.which&&(o=e.clientX,l=e.clientY)}),n.addEventListener("mouseup",this._onMouseUp=function(t){if(1===t.which&&!(t.clientX>o+20||t.clientXl+20||t.clientY1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,"AngleMeasurements",e))._container=i.container||document.body,r._defaultControl=null,r._measurements={},r.defaultColor=void 0!==i.defaultColor?i.defaultColor:"#00BBFF",r.defaultLabelsVisible=!1!==i.defaultLabelsVisible,r.zIndex=i.zIndex||1e4,r._onMouseOver=function(e,t){r.fire("mouseOver",{plugin:w(r),angleMeasurement:t,measurement:t,event:e})},r._onMouseLeave=function(e,t){r.fire("mouseLeave",{plugin:w(r),angleMeasurement:t,measurement:t,event:e})},r._onContextMenu=function(e,t){r.fire("contextMenu",{plugin:w(r),angleMeasurement:t,measurement:t,event:e})},r}return P(n,[{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,t){}},{key:"control",get:function(){return this._defaultControl||(this._defaultControl=new it(this,{})),this._defaultControl}},{key:"measurements",get:function(){return this._measurements}},{key:"createMeasurement",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.viewer.scene.components[t.id]&&(this.error("Viewer scene component with this ID already exists: "+t.id),delete t.id);var n=t.origin,r=t.corner,i=t.target,a=new nt(this,{id:t.id,plugin:this,container:this._container,origin:{entity:n.entity,worldPos:n.worldPos},corner:{entity:r.entity,worldPos:r.worldPos},target:{entity:i.entity,worldPos:i.worldPos},visible:t.visible,originVisible:!0,originWireVisible:!0,cornerVisible:!0,targetWireVisible:!0,targetVisible:!0,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[a.id]=a,a.on("destroyed",(function(){delete e._measurements[a.id]})),a.clickable=!0,this.fire("measurementCreated",a),a}},{key:"destroyMeasurement",value:function(e){var t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("AngleMeasurement not found: "+e)}},{key:"setLabelsShown",value:function(e){for(var t=0,n=Object.entries(this.measurements);t

";le.isArray(t)&&(t=t.join("")),t=this._renderTemplate(t.trim());var n=document.createRange().createContextualFragment(t);this._marker=n.firstChild,this._container.appendChild(this._marker),this._marker.style.visibility=this._markerShown?"visible":"hidden",this._marker.addEventListener("click",(function(){e.plugin.fire("markerClicked",e)})),this._marker.addEventListener("mouseenter",(function(){e.plugin.fire("markerMouseEnter",e)})),this._marker.addEventListener("mouseleave",(function(){e.plugin.fire("markerMouseLeave",e)})),this._marker.addEventListener("wheel",(function(t){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",t))}))}if(!this._labelExternal){this._label&&(this._container.removeChild(this._label),this._label=null);var r=this._labelHTML||"

";le.isArray(r)&&(r=r.join("")),r=this._renderTemplate(r.trim());var i=document.createRange().createContextualFragment(r);this._label=i.firstChild,this._container.appendChild(this._label),this._label.style.visibility=this._markerShown&&this._labelShown?"visible":"hidden",this._label.addEventListener("wheel",(function(t){e.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",t))}))}}},{key:"_updatePosition",value:function(){var e=this.scene.canvas.boundary,t=e[0],n=e[1],r=this.canvasPos;this._marker.style.left=Math.floor(t+r[0])-12+"px",this._marker.style.top=Math.floor(n+r[1])-12+"px",this._marker.style["z-index"]=90005+Math.floor(this._viewPos[2])+1;this._label.style.left=20+Math.floor(t+r[0]+20)+"px",this._label.style.top=Math.floor(n+r[1]+-17)+"px",this._label.style["z-index"]=90005+Math.floor(this._viewPos[2])+1}},{key:"_renderTemplate",value:function(e){for(var t in this._values)if(this._values.hasOwnProperty(t)){var n=this._values[t];e=e.replace(new RegExp("{{"+t+"}}","g"),n)}return e}},{key:"setMarkerShown",value:function(e){e=!!e,this._markerShown!==e&&(this._markerShown=e,this._visibilityDirty=!0)}},{key:"getMarkerShown",value:function(){return this._markerShown}},{key:"setLabelShown",value:function(e){e=!!e,this._labelShown!==e&&(this._labelShown=e,this._visibilityDirty=!0)}},{key:"getLabelShown",value:function(){return this._labelShown}},{key:"setField",value:function(e,t){this._values[e]=t||"",this._htmlDirty=!0}},{key:"getField",value:function(e){return this._values[e]}},{key:"setValues",value:function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];this.setField(t,n)}}},{key:"getValues",value:function(){return this._values}},{key:"destroy",value:function(){this._marker&&(this._markerExternal?(this._marker.removeEventListener("click",this._onMouseClickedExternalMarker),this._marker.removeEventListener("mouseenter",this._onMouseEnterExternalMarker),this._marker.removeEventListener("mouseleave",this._onMouseLeaveExternalMarker),this._marker=null):this._marker.parentNode.removeChild(this._marker)),this._label&&(this._labelExternal||this._label.parentNode.removeChild(this._label),this._label=null),this.scene.off(this._onTick),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),ot=$.vec3(),lt=$.vec3(),ut=$.vec3(),ct=function(e){h(n,Re);var t=y(n);function n(e,r){var i;return b(this,n),(i=t.call(this,"Annotations",e))._labelHTML=r.labelHTML||"
",i._markerHTML=r.markerHTML||"
",i._container=r.container||document.body,i._values=r.values||{},i.annotations={},i.surfaceOffset=r.surfaceOffset,i}return P(n,[{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,t){if("clearAnnotations"===e)this.clear()}},{key:"surfaceOffset",get:function(){return this._surfaceOffset},set:function(e){null==e&&(e=.3),this._surfaceOffset=e}},{key:"createAnnotation",value:function(e){var t,n,r=this;if(this.viewer.scene.components[e.id]&&(this.error("Viewer component with this ID already exists: "+e.id),delete e.id),e.pickResult=e.pickResult||e.pickRecord,e.pickResult){var i=e.pickResult;if(i.worldPos&&i.worldNormal){var a=$.normalizeVec3(i.worldNormal,ot),s=$.mulVec3Scalar(a,this._surfaceOffset,lt);t=$.addVec3(i.worldPos,s,ut),n=i.entity}else this.error("Param 'pickResult' does not have both worldPos and worldNormal")}else t=e.worldPos,n=e.entity;var o=null;e.markerElementId&&((o=document.getElementById(e.markerElementId))||this.error("Can't find DOM element for 'markerElementId' value '"+e.markerElementId+"' - defaulting to internally-generated empty DIV"));var l=null;e.labelElementId&&((l=document.getElementById(e.labelElementId))||this.error("Can't find DOM element for 'labelElementId' value '"+e.labelElementId+"' - defaulting to internally-generated empty DIV"));var u=new st(this.viewer.scene,{id:e.id,plugin:this,entity:n,worldPos:t,container:this._container,markerElement:o,labelElement:l,markerHTML:e.markerHTML||this._markerHTML,labelHTML:e.labelHTML||this._labelHTML,occludable:e.occludable,values:le.apply(e.values,le.apply(this._values,{})),markerShown:e.markerShown,labelShown:e.labelShown,eye:e.eye,look:e.look,up:e.up,projection:e.projection,visible:!1!==e.visible});return this.annotations[u.id]=u,u.on("destroyed",(function(){delete r.annotations[u.id],r.fire("annotationDestroyed",u.id)})),this.fire("annotationCreated",u.id),u}},{key:"destroyAnnotation",value:function(e){var t=this.annotations[e];t?t.destroy():this.log("Annotation not found: "+e)}},{key:"clear",value:function(){for(var e=Object.keys(this.annotations),t=0,n=e.length;t1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._canvas=i.canvas,r._element=null,r._isCustom=!1,i.elementId&&(r._element=document.getElementById(i.elementId),r._element?r._adjustPosition():r.error("Can't find given Spinner HTML element: '"+i.elementId+"' - will automatically create default element")),r._element||r._createDefaultSpinner(),r.processes=0,r}return P(n,[{key:"type",get:function(){return"Spinner"}},{key:"_createDefaultSpinner",value:function(){this._injectDefaultCSS();var e=document.createElement("div"),t=e.style;t["z-index"]="9000",t.position="absolute",e.innerHTML='
',this._canvas.parentElement.appendChild(e),this._element=e,this._isCustom=!1,this._adjustPosition()}},{key:"_injectDefaultCSS",value:function(){var e="xeokit-spinner-css";if(!document.getElementById(e)){var t=document.createElement("style");t.innerHTML=".sk-fading-circle { background: transparent; margin: 20px auto; width: 50px; height:50px; position: relative; } .sk-fading-circle .sk-circle { width: 120%; height: 120%; position: absolute; left: 0; top: 0; } .sk-fading-circle .sk-circle:before { content: ''; display: block; margin: 0 auto; width: 15%; height: 15%; background-color: #ff8800; border-radius: 100%; -webkit-animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; animation: sk-circleFadeDelay 1.2s infinite ease-in-out both; } .sk-fading-circle .sk-circle2 { -webkit-transform: rotate(30deg); -ms-transform: rotate(30deg); transform: rotate(30deg); } .sk-fading-circle .sk-circle3 { -webkit-transform: rotate(60deg); -ms-transform: rotate(60deg); transform: rotate(60deg); } .sk-fading-circle .sk-circle4 { -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .sk-fading-circle .sk-circle5 { -webkit-transform: rotate(120deg); -ms-transform: rotate(120deg); transform: rotate(120deg); } .sk-fading-circle .sk-circle6 { -webkit-transform: rotate(150deg); -ms-transform: rotate(150deg); transform: rotate(150deg); } .sk-fading-circle .sk-circle7 { -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .sk-fading-circle .sk-circle8 { -webkit-transform: rotate(210deg); -ms-transform: rotate(210deg); transform: rotate(210deg); } .sk-fading-circle .sk-circle9 { -webkit-transform: rotate(240deg); -ms-transform: rotate(240deg); transform: rotate(240deg); } .sk-fading-circle .sk-circle10 { -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .sk-fading-circle .sk-circle11 { -webkit-transform: rotate(300deg); -ms-transform: rotate(300deg); transform: rotate(300deg); } .sk-fading-circle .sk-circle12 { -webkit-transform: rotate(330deg); -ms-transform: rotate(330deg); transform: rotate(330deg); } .sk-fading-circle .sk-circle2:before { -webkit-animation-delay: -1.1s; animation-delay: -1.1s; } .sk-fading-circle .sk-circle3:before { -webkit-animation-delay: -1s; animation-delay: -1s; } .sk-fading-circle .sk-circle4:before { -webkit-animation-delay: -0.9s; animation-delay: -0.9s; } .sk-fading-circle .sk-circle5:before { -webkit-animation-delay: -0.8s; animation-delay: -0.8s; } .sk-fading-circle .sk-circle6:before { -webkit-animation-delay: -0.7s; animation-delay: -0.7s; } .sk-fading-circle .sk-circle7:before { -webkit-animation-delay: -0.6s; animation-delay: -0.6s; } .sk-fading-circle .sk-circle8:before { -webkit-animation-delay: -0.5s; animation-delay: -0.5s; } .sk-fading-circle .sk-circle9:before { -webkit-animation-delay: -0.4s; animation-delay: -0.4s; } .sk-fading-circle .sk-circle10:before { -webkit-animation-delay: -0.3s; animation-delay: -0.3s; } .sk-fading-circle .sk-circle11:before { -webkit-animation-delay: -0.2s; animation-delay: -0.2s; } .sk-fading-circle .sk-circle12:before { -webkit-animation-delay: -0.1s; animation-delay: -0.1s; } @-webkit-keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } } @keyframes sk-circleFadeDelay { 0%, 39%, 100% { opacity: 0; } 40% { opacity: 1; } }",t.id=e,document.body.appendChild(t)}}},{key:"_adjustPosition",value:function(){if(!this._isCustom){var e=this._canvas,t=this._element,n=t.style;n.left=e.offsetLeft+.5*e.clientWidth-.5*t.clientWidth+"px",n.top=e.offsetTop+.5*e.clientHeight-.5*t.clientHeight+"px"}}},{key:"processes",get:function(){return this._processes},set:function(e){if(e=e||0,this._processes!==e&&!(e<0)){var t=this._processes;this._processes=e;var n=this._element;n&&(n.style.visibility=this._processes>0?"visible":"hidden"),this.fire("processes",this._processes),0===this._processes&&this._processes!==t&&this.fire("zeroProcesses",this._processes)}}},{key:"_destroy",value:function(){this._element&&!this._isCustom&&(this._element.parentNode.removeChild(this._element),this._element=null);var e=document.getElementById("xeokit-spinner-css");e&&e.parentNode.removeChild(e)}}]),n}(),pt=["webgl2","experimental-webgl","webkit-3d","moz-webgl","moz-glweb20"],At=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._backgroundColor=$.vec3([i.backgroundColor?i.backgroundColor[0]:1,i.backgroundColor?i.backgroundColor[1]:1,i.backgroundColor?i.backgroundColor[2]:1]),r._backgroundColorFromAmbientLight=!!i.backgroundColorFromAmbientLight,r.canvas=i.canvas,r.gl=null,r.webgl2=!1,r.transparent=!!i.transparent,r.contextAttr=i.contextAttr||{},r.contextAttr.alpha=r.transparent,r.contextAttr.preserveDrawingBuffer=!!r.contextAttr.preserveDrawingBuffer,r.contextAttr.stencil=!1,r.contextAttr.premultipliedAlpha=!!r.contextAttr.premultipliedAlpha,r.contextAttr.antialias=!1!==r.contextAttr.antialias,r.resolutionScale=i.resolutionScale,r.canvas.width=Math.round(r.canvas.clientWidth*r._resolutionScale),r.canvas.height=Math.round(r.canvas.clientHeight*r._resolutionScale),r.boundary=[r.canvas.offsetLeft,r.canvas.offsetTop,r.canvas.clientWidth,r.canvas.clientHeight],r._initWebGL(i);var a=w(r);r.canvas.addEventListener("webglcontextlost",r._webglcontextlostListener=function(e){console.time("webglcontextrestored"),a.scene._webglContextLost(),a.fire("webglcontextlost"),e.preventDefault()},!1),r.canvas.addEventListener("webglcontextrestored",r._webglcontextrestoredListener=function(e){a._initWebGL(),a.gl&&(a.scene._webglContextRestored(a.gl),a.fire("webglcontextrestored",a.gl),e.preventDefault()),console.timeEnd("webglcontextrestored")},!1);var s=!0,o=new ResizeObserver((function(e){var t,n=c(e);try{for(n.s();!(t=n.n()).done;){t.value.contentBoxSize&&(s=!0)}}catch(e){n.e(e)}finally{n.f()}}));return o.observe(r.canvas),r._tick=r.scene.on("tick",(function(){s&&(s=!1,a.canvas.width=Math.round(a.canvas.clientWidth*a._resolutionScale),a.canvas.height=Math.round(a.canvas.clientHeight*a._resolutionScale),a.boundary[0]=a.canvas.offsetLeft,a.boundary[1]=a.canvas.offsetTop,a.boundary[2]=a.canvas.clientWidth,a.boundary[3]=a.canvas.clientHeight,a.fire("boundary",a.boundary))})),r._spinner=new ft(r.scene,{canvas:r.canvas,elementId:i.spinnerElementId}),r}return P(n,[{key:"type",get:function(){return"Canvas"}},{key:"backgroundColorFromAmbientLight",get:function(){return this._backgroundColorFromAmbientLight},set:function(e){this._backgroundColorFromAmbientLight=!1!==e,this.glRedraw()}},{key:"backgroundColor",get:function(){return this._backgroundColor},set:function(e){e?(this._backgroundColor[0]=e[0],this._backgroundColor[1]=e[1],this._backgroundColor[2]=e[2]):(this._backgroundColor[0]=1,this._backgroundColor[1]=1,this._backgroundColor[2]=1),this.glRedraw()}},{key:"resolutionScale",get:function(){return this._resolutionScale},set:function(e){if((e=e||1)!==this._resolutionScale){this._resolutionScale=e;var t=this.canvas;t.width=Math.round(t.clientWidth*this._resolutionScale),t.height=Math.round(t.clientHeight*this._resolutionScale),this.glRedraw()}}},{key:"spinner",get:function(){return this._spinner}},{key:"_createCanvas",value:function(){var e="xeokit-canvas-"+$.createUUID(),t=document.getElementsByTagName("body")[0],n=document.createElement("div"),r=n.style;r.height="100%",r.width="100%",r.padding="0",r.margin="0",r.background="rgba(0,0,0,0);",r.float="left",r.left="0",r.top="0",r.position="absolute",r.opacity="1.0",r["z-index"]="-10000",n.innerHTML+='',t.appendChild(n),this.canvas=document.getElementById(e)}},{key:"_getElementXY",value:function(e){for(var t=0,n=0;e;)t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;return{x:t,y:n}}},{key:"_initWebGL",value:function(){if(!this.gl)for(var e=0;!this.gl&&e0?vt.FS_MAX_FLOAT_PRECISION="highp":It.getShaderPrecisionFormat(It.FRAGMENT_SHADER,It.MEDIUM_FLOAT).precision>0?vt.FS_MAX_FLOAT_PRECISION="mediump":vt.FS_MAX_FLOAT_PRECISION="lowp":vt.FS_MAX_FLOAT_PRECISION="mediump",vt.DEPTH_BUFFER_BITS=It.getParameter(It.DEPTH_BITS),vt.MAX_TEXTURE_SIZE=It.getParameter(It.MAX_TEXTURE_SIZE),vt.MAX_CUBE_MAP_SIZE=It.getParameter(It.MAX_CUBE_MAP_TEXTURE_SIZE),vt.MAX_RENDERBUFFER_SIZE=It.getParameter(It.MAX_RENDERBUFFER_SIZE),vt.MAX_TEXTURE_UNITS=It.getParameter(It.MAX_COMBINED_TEXTURE_IMAGE_UNITS),vt.MAX_TEXTURE_IMAGE_UNITS=It.getParameter(It.MAX_TEXTURE_IMAGE_UNITS),vt.MAX_VERTEX_ATTRIBS=It.getParameter(It.MAX_VERTEX_ATTRIBS),vt.MAX_VERTEX_UNIFORM_VECTORS=It.getParameter(It.MAX_VERTEX_UNIFORM_VECTORS),vt.MAX_FRAGMENT_UNIFORM_VECTORS=It.getParameter(It.MAX_FRAGMENT_UNIFORM_VECTORS),vt.MAX_VARYING_VECTORS=It.getParameter(It.MAX_VARYING_VECTORS),It.getSupportedExtensions().forEach((function(e){vt.SUPPORTED_EXTENSIONS[e]=!0})))}var yt=function(){function e(){b(this,e),this.entity=null,this.primitive=null,this.primIndex=-1,this.pickSurfacePrecision=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1,this._origin=new Float64Array([0,0,0]),this._direction=new Float64Array([0,0,0]),this._indices=new Int32Array(3),this._localPos=new Float64Array([0,0,0]),this._worldPos=new Float64Array([0,0,0]),this._viewPos=new Float64Array([0,0,0]),this._canvasPos=new Int16Array([0,0]),this._snappedCanvasPos=new Int16Array([0,0]),this._bary=new Float64Array([0,0,0]),this._worldNormal=new Float64Array([0,0,0]),this._uv=new Float64Array([0,0]),this.reset()}return P(e,[{key:"canvasPos",get:function(){return this._gotCanvasPos?this._canvasPos:null},set:function(e){e?(this._canvasPos[0]=e[0],this._canvasPos[1]=e[1],this._gotCanvasPos=!0):this._gotCanvasPos=!1}},{key:"origin",get:function(){return this._gotOrigin?this._origin:null},set:function(e){e?(this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this._gotOrigin=!0):this._gotOrigin=!1}},{key:"direction",get:function(){return this._gotDirection?this._direction:null},set:function(e){e?(this._direction[0]=e[0],this._direction[1]=e[1],this._direction[2]=e[2],this._gotDirection=!0):this._gotDirection=!1}},{key:"indices",get:function(){return this.entity&&this._gotIndices?this._indices:null},set:function(e){e?(this._indices[0]=e[0],this._indices[1]=e[1],this._indices[2]=e[2],this._gotIndices=!0):this._gotIndices=!1}},{key:"localPos",get:function(){return this.entity&&this._gotLocalPos?this._localPos:null},set:function(e){e?(this._localPos[0]=e[0],this._localPos[1]=e[1],this._localPos[2]=e[2],this._gotLocalPos=!0):this._gotLocalPos=!1}},{key:"snappedCanvasPos",get:function(){return this._gotSnappedCanvasPos?this._snappedCanvasPos:null},set:function(e){e?(this._snappedCanvasPos[0]=e[0],this._snappedCanvasPos[1]=e[1],this._gotSnappedCanvasPos=!0):this._gotSnappedCanvasPos=!1}},{key:"worldPos",get:function(){return this._gotWorldPos?this._worldPos:null},set:function(e){e?(this._worldPos[0]=e[0],this._worldPos[1]=e[1],this._worldPos[2]=e[2],this._gotWorldPos=!0):this._gotWorldPos=!1}},{key:"viewPos",get:function(){return this.entity&&this._gotViewPos?this._viewPos:null},set:function(e){e?(this._viewPos[0]=e[0],this._viewPos[1]=e[1],this._viewPos[2]=e[2],this._gotViewPos=!0):this._gotViewPos=!1}},{key:"bary",get:function(){return this.entity&&this._gotBary?this._bary:null},set:function(e){e?(this._bary[0]=e[0],this._bary[1]=e[1],this._bary[2]=e[2],this._gotBary=!0):this._gotBary=!1}},{key:"worldNormal",get:function(){return this.entity&&this._gotWorldNormal?this._worldNormal:null},set:function(e){e?(this._worldNormal[0]=e[0],this._worldNormal[1]=e[1],this._worldNormal[2]=e[2],this._gotWorldNormal=!0):this._gotWorldNormal=!1}},{key:"uv",get:function(){return this.entity&&this._gotUV?this._uv:null},set:function(e){e?(this._uv[0]=e[0],this._uv[1]=e[1],this._gotUV=!0):this._gotUV=!1}},{key:"reset",value:function(){this.entity=null,this.primIndex=-1,this.primitive=null,this.pickSurfacePrecision=!1,this._gotCanvasPos=!1,this._gotSnappedCanvasPos=!1,this._gotOrigin=!1,this._gotDirection=!1,this._gotIndices=!1,this._gotLocalPos=!1,this._gotWorldPos=!1,this._gotViewPos=!1,this._gotBary=!1,this._gotWorldNormal=!1,this._gotUV=!1,this.touchInput=!1,this.snappedToEdge=!1,this.snappedToVertex=!1}}]),e}(),mt=function(){function e(t,n,r){if(b(this,e),this.allocated=!1,this.compiled=!1,this.handle=t.createShader(n),this.handle){if(this.allocated=!0,t.shaderSource(this.handle,r),t.compileShader(this.handle),this.compiled=t.getShaderParameter(this.handle,t.COMPILE_STATUS),!this.compiled&&!t.isContextLost()){for(var i=r.split("\n"),a=[],s=0;s0&&"/"===t.charAt(n+1)&&(t=t.substring(0,n)),r.push(t);return r.join("\n")}function bt(e){console.error(e.join("\n"))}var Dt=function(){function e(t,n){b(this,e),this.id=Et.addItem({}),this.source=n,this.init(t)}return P(e,[{key:"init",value:function(e){if(this.gl=e,this.allocated=!1,this.compiled=!1,this.linked=!1,this.validated=!1,this.errors=null,this.uniforms={},this.samplers={},this.attributes={},this._vertexShader=new mt(e,e.VERTEX_SHADER,Tt(this.source.vertex)),this._fragmentShader=new mt(e,e.FRAGMENT_SHADER,Tt(this.source.fragment)),!this._vertexShader.allocated)return this.errors=["Vertex shader failed to allocate"].concat(this._vertexShader.errors),void bt(this.errors);if(!this._fragmentShader.allocated)return this.errors=["Fragment shader failed to allocate"].concat(this._fragmentShader.errors),void bt(this.errors);if(this.allocated=!0,!this._vertexShader.compiled)return this.errors=["Vertex shader failed to compile"].concat(this._vertexShader.errors),void bt(this.errors);if(!this._fragmentShader.compiled)return this.errors=["Fragment shader failed to compile"].concat(this._fragmentShader.errors),void bt(this.errors);var t,n,r,i,a;if(this.compiled=!0,this.handle=e.createProgram(),this.handle){if(e.attachShader(this.handle,this._vertexShader.handle),e.attachShader(this.handle,this._fragmentShader.handle),e.linkProgram(this.handle),this.linked=e.getProgramParameter(this.handle,e.LINK_STATUS),this.validated=!0,!this.linked||!this.validated)return this.errors=[],this.errors.push(""),this.errors.push(e.getProgramInfoLog(this.handle)),this.errors.push("\nVertex shader:\n"),this.errors=this.errors.concat(this.source.vertex),this.errors.push("\nFragment shader:\n"),this.errors=this.errors.concat(this.source.fragment),void bt(this.errors);var s=e.getProgramParameter(this.handle,e.ACTIVE_UNIFORMS);for(n=0;nthis.dataLength?e.slice(0,this.dataLength):e,this.usage),this._gl.bindBuffer(this.type,null),this.length=e.length,this.numItems=this.length/this.itemSize,this.allocated=!0)}},{key:"setData",value:function(e,t){this.allocated&&(e.length+(t||0)>this.length?(this.destroy(),this._allocate(e)):(this._gl.bindBuffer(this.type,this._handle),t||0===t?this._gl.bufferSubData(this.type,t*this.itemByteSize,e):this._gl.bufferData(this.type,e,this.usage),this._gl.bindBuffer(this.type,null)))}},{key:"bind",value:function(){this.allocated&&this._gl.bindBuffer(this.type,this._handle)}},{key:"unbind",value:function(){this.allocated&&this._gl.bindBuffer(this.type,null)}},{key:"destroy",value:function(){this.allocated&&(this._gl.deleteBuffer(this._handle),this._handle=null,this.allocated=!1)}}]),e}(),Ct=function(){function e(t,n){b(this,e),this.scene=t,this.aabb=$.AABB3(),this.origin=$.vec3(n),this.originHash=this.origin.join(),this.numMarkers=0,this.markers={},this.markerList=[],this.markerIndices={},this.positions=[],this.indices=[],this.positionsBuf=null,this.lenPositionsBuf=0,this.indicesBuf=null,this.sectionPlanesActive=[],this.culledBySectionPlanes=!1,this.occlusionTestList=[],this.lenOcclusionTestList=0,this.pixels=[],this.aabbDirty=!1,this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!1}return P(e,[{key:"addMarker",value:function(e){this.markers[e.id]=e,this.markerListDirty=!0,this.numMarkers++}},{key:"markerWorldPosUpdated",value:function(e){if(this.markers[e.id]){var t=this.markerIndices[e.id];this.positions[3*t+0]=e.worldPos[0],this.positions[3*t+1]=e.worldPos[1],this.positions[3*t+2]=e.worldPos[2],this.positionsDirty=!0}}},{key:"removeMarker",value:function(e){delete this.markers[e.id],this.markerListDirty=!0,this.numMarkers--}},{key:"update",value:function(){this.markerListDirty&&(this._buildMarkerList(),this.markerListDirty=!1,this.positionsDirty=!0,this.occlusionTestListDirty=!0),this.positionsDirty&&(this._buildPositions(),this.positionsDirty=!1,this.aabbDirty=!0,this.vbosDirty=!0),this.aabbDirty&&(this._buildAABB(),this.aabbDirty=!1),this.vbosDirty&&(this._buildVBOs(),this.vbosDirty=!1),this.occlusionTestListDirty&&this._buildOcclusionTestList(),this._updateActiveSectionPlanes()}},{key:"_buildMarkerList",value:function(){for(var e in this.numMarkers=0,this.markers)this.markers.hasOwnProperty(e)&&(this.markerList[this.numMarkers]=this.markers[e],this.markerIndices[e]=this.numMarkers,this.numMarkers++);this.markerList.length=this.numMarkers}},{key:"_buildPositions",value:function(){for(var e=0,t=0;t-t)o._setVisible(!1);else{var l=o.canvasPos,u=l[0],c=l[1];u+10<0||c+10<0||u-10>r||c-10>i?o._setVisible(!1):!o.entity||o.entity.visible?o.occludable?(this.occlusionTestList[this.lenOcclusionTestList++]=o,this.pixels[a++]=u,this.pixels[a++]=c):o._setVisible(!0):o._setVisible(!1)}}}},{key:"_updateActiveSectionPlanes",value:function(){var e=this.scene._sectionPlanesState.sectionPlanes,t=e.length;if(t>0)for(var n=0;n0,n=[];return n.push("#version 300 es"),n.push("// OcclusionTester vertex shader"),n.push("in vec3 position;"),n.push("uniform mat4 modelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&n.push("out vec4 vWorldPosition;"),n.push("void main(void) {"),n.push("vec4 worldPosition = vec4(position, 1.0); "),n.push(" vec4 viewPosition = viewMatrix * worldPosition;"),t&&n.push(" vWorldPosition = worldPosition;"),n.push(" vec4 clipPos = projMatrix * viewPosition;"),n.push(" gl_PointSize = 20.0;"),e.logarithmicDepthBufferEnabled?n.push("vFragDepth = 1.0 + clipPos.w;"):n.push("clipPos.z += -0.001;"),n.push(" gl_Position = clipPos;"),n.push("}"),n}},{key:"_buildFragmentShaderSource",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.sectionPlanes.length>0,r=[];if(r.push("#version 300 es"),r.push("// OcclusionTester fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;");for(var i=0;i 0.0) { discard; }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(1.0, 0.0, 0.0, 1.0); "),r.push("}"),r}},{key:"_buildProgram",value:function(){this._program&&this._program.destroy();var e=this._scene,t=e.canvas.gl,n=e._sectionPlanesState;if(this._program=new Dt(t,this._shaderSource),this._program.errors)this.errors=this._program.errors;else{var r=this._program;this._uViewMatrix=r.getLocation("viewMatrix"),this._uProjMatrix=r.getLocation("projMatrix"),this._uSectionPlanes=[];for(var i=0,a=n.sectionPlanes.length;i0)for(var p=r.sectionPlanes,A=0;A= ( 1.0 - EPSILON ) ) {\n \t\t\tcontinue;\n \t\t}\n\n \t\tfloat sampleViewZ = getViewZ( sampleDepth );\n \t\tvec3 sampleViewPosition = getViewPos( sampleUv, sampleDepth, sampleViewZ );\n \t\tocclusionSum += getOcclusion( centerViewPosition, centerViewNormal, sampleViewPosition );\n \t\tweightSum += 1.0;\n \t}\n\n \tif( weightSum == 0.0 ) discard;\n\n \treturn occlusionSum * ( uIntensity / weightSum );\n }\n\n out vec4 outColor;\n \n void main() {\n \n \tfloat centerDepth = getDepth( vUV );\n \t\n \tif( centerDepth >= ( 1.0 - EPSILON ) ) {\n \t\tdiscard;\n \t}\n\n \tfloat centerViewZ = getViewZ( centerDepth );\n \tvec3 viewPosition = getViewPos( vUV, centerDepth, centerViewZ );\n\n \tfloat ambientOcclusion = getAmbientOcclusion( viewPosition );\n \n \toutColor = packFloatToRGBA( 1.0- ambientOcclusion );\n }")]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);var r=new Float32Array([1,1,0,1,0,0,1,0]),i=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),a=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Pt(n,n.ARRAY_BUFFER,i,i.length,3,n.STATIC_DRAW),this._uvBuf=new Pt(n,n.ARRAY_BUFFER,r,r.length,2,n.STATIC_DRAW),this._indicesBuf=new Pt(n,n.ELEMENT_ARRAY_BUFFER,a,a.length,1,n.STATIC_DRAW),this._program.bind(),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uCameraProjectionMatrix=this._program.getLocation("uProjectMatrix"),this._uCameraInverseProjectionMatrix=this._program.getLocation("uInverseProjectMatrix"),this._uPerspective=this._program.getLocation("uPerspective"),this._uScale=this._program.getLocation("uScale"),this._uIntensity=this._program.getLocation("uIntensity"),this._uBias=this._program.getLocation("uBias"),this._uKernelRadius=this._program.getLocation("uKernelRadius"),this._uMinResolution=this._program.getLocation("uMinResolution"),this._uViewport=this._program.getLocation("uViewport"),this._uRandomSeed=this._program.getLocation("uRandomSeed"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV"),this._dirty=!1}}},{key:"destroy",value:function(){this._program&&(this._program.destroy(),this._program=null)}}]),e}(),Nt=new Float32Array(Ut(17,[0,1])),Lt=new Float32Array(Ut(17,[1,0])),xt=new Float32Array(function(e,t){for(var n=[],r=0;r<=e;r++)n.push(Ht(r,t));return n}(17,4)),Mt=new Float32Array(2),Ft=function(){function e(t){b(this,e),this._scene=t,this._program=null,this._programError=!1,this._aPosition=null,this._aUV=null,this._uDepthTexture="uDepthTexture",this._uOcclusionTexture="uOcclusionTexture",this._uViewport=null,this._uCameraNear=null,this._uCameraFar=null,this._uCameraProjectionMatrix=null,this._uCameraInverseProjectionMatrix=null,this._uvBuf=null,this._positionsBuf=null,this._indicesBuf=null,this.init()}return P(e,[{key:"init",value:function(){var e=this._scene.canvas.gl;if(this._program=new Dt(e,{vertex:["#version 300 es\n precision highp float;\n precision highp int;\n \n in vec3 aPosition;\n in vec2 aUV;\n uniform vec2 uViewport;\n out vec2 vUV;\n out vec2 vInvSize;\n void main () {\n vUV = aUV;\n vInvSize = 1.0 / uViewport;\n gl_Position = vec4(aPosition, 1.0);\n }"],fragment:["#version 300 es\n precision highp float;\n precision highp int;\n \n #define PI 3.14159265359\n #define PI2 6.28318530718\n #define EPSILON 1e-6\n\n #define KERNEL_RADIUS ".concat(16,"\n\n in vec2 vUV;\n in vec2 vInvSize;\n \n uniform sampler2D uDepthTexture;\n uniform sampler2D uOcclusionTexture; \n \n uniform float uCameraNear;\n uniform float uCameraFar; \n uniform float uDepthCutoff;\n\n uniform vec2 uSampleOffsets[ KERNEL_RADIUS + 1 ];\n uniform float uSampleWeights[ KERNEL_RADIUS + 1 ];\n\n const float unpackDownscale = 255. / 256.; \n\n const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\n const vec4 unpackFactors = unpackDownscale / vec4( packFactors, 1. ); \n\n const float packUpscale = 256. / 255.;\n \n const float shiftRights = 1. / 256.;\n \n float unpackRGBAToFloat( const in vec4 v ) {\n return dot( floor( v * 255.0 + 0.5 ) / 255.0, unpackFactors );\n } \n\n vec4 packFloatToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * packFactors ), v );\n r.yzw -= r.xyz * shiftRights; \n return r * packUpscale;\n }\n\n float viewZToOrthographicDepth( const in float viewZ) {\n return ( viewZ + uCameraNear ) / ( uCameraNear - uCameraFar );\n }\n \n float orthographicDepthToViewZ( const in float linearClipZ) {\n return linearClipZ * ( uCameraNear - uCameraFar ) - uCameraNear;\n }\n\n float viewZToPerspectiveDepth( const in float viewZ) {\n return (( uCameraNear + viewZ ) * uCameraFar ) / (( uCameraFar - uCameraNear ) * viewZ );\n }\n \n float perspectiveDepthToViewZ( const in float invClipZ) {\n return ( uCameraNear * uCameraFar ) / ( ( uCameraFar - uCameraNear ) * invClipZ - uCameraFar );\n }\n\n float getDepth( const in vec2 screenPosition ) {\n return vec4(texture(uDepthTexture, screenPosition)).r;\n }\n\n float getViewZ( const in float depth ) {\n return perspectiveDepthToViewZ( depth );\n }\n\n out vec4 outColor;\n \n void main() {\n \n float depth = getDepth( vUV );\n if( depth >= ( 1.0 - EPSILON ) ) {\n discard;\n }\n\n float centerViewZ = -getViewZ( depth );\n bool rBreak = false;\n bool lBreak = false;\n\n float weightSum = uSampleWeights[0];\n float occlusionSum = unpackRGBAToFloat(texture( uOcclusionTexture, vUV )) * weightSum;\n\n for( int i = 1; i <= KERNEL_RADIUS; i ++ ) {\n\n float sampleWeight = uSampleWeights[i];\n vec2 sampleUVOffset = uSampleOffsets[i] * vInvSize;\n\n vec2 sampleUV = vUV + sampleUVOffset;\n float viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n rBreak = true;\n }\n\n if( ! rBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n\n sampleUV = vUV - sampleUVOffset;\n viewZ = -getViewZ( getDepth( sampleUV ) );\n\n if( abs( viewZ - centerViewZ ) > uDepthCutoff ) {\n lBreak = true;\n }\n\n if( ! lBreak ) {\n occlusionSum += unpackRGBAToFloat(texture( uOcclusionTexture, sampleUV )) * sampleWeight;\n weightSum += sampleWeight;\n }\n }\n\n outColor = packFloatToRGBA(occlusionSum / weightSum);\n }")]}),this._program.errors)return console.error(this._program.errors.join("\n")),void(this._programError=!0);var t=new Float32Array([1,1,0,1,0,0,1,0]),n=new Float32Array([1,1,0,-1,1,0,-1,-1,0,1,-1,0]),r=new Uint32Array([0,1,2,0,2,3]);this._positionsBuf=new Pt(e,e.ARRAY_BUFFER,n,n.length,3,e.STATIC_DRAW),this._uvBuf=new Pt(e,e.ARRAY_BUFFER,t,t.length,2,e.STATIC_DRAW),this._indicesBuf=new Pt(e,e.ELEMENT_ARRAY_BUFFER,r,r.length,1,e.STATIC_DRAW),this._program.bind(),this._uViewport=this._program.getLocation("uViewport"),this._uCameraNear=this._program.getLocation("uCameraNear"),this._uCameraFar=this._program.getLocation("uCameraFar"),this._uDepthCutoff=this._program.getLocation("uDepthCutoff"),this._uSampleOffsets=e.getUniformLocation(this._program.handle,"uSampleOffsets"),this._uSampleWeights=e.getUniformLocation(this._program.handle,"uSampleWeights"),this._aPosition=this._program.getAttribute("aPosition"),this._aUV=this._program.getAttribute("aUV")}},{key:"render",value:function(e,t,n){var r=this;if(!this._programError){this._getInverseProjectMat||(this._getInverseProjectMat=function(){var e=!0;r._scene.camera.on("projMatrix",(function(){e=!0}));var t=$.mat4();return function(){return e&&$.inverseMat4(s.camera.projMatrix,t),t}}());var i=this._scene.canvas.gl,a=this._program,s=this._scene,o=i.drawingBufferWidth,l=i.drawingBufferHeight,u=s.camera.project._state,c=u.near,f=u.far;i.viewport(0,0,o,l),i.clearColor(0,0,0,1),i.enable(i.DEPTH_TEST),i.disable(i.BLEND),i.frontFace(i.CCW),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),a.bind(),Mt[0]=o,Mt[1]=l,i.uniform2fv(this._uViewport,Mt),i.uniform1f(this._uCameraNear,c),i.uniform1f(this._uCameraFar,f),i.uniform1f(this._uDepthCutoff,.01),0===n?i.uniform2fv(this._uSampleOffsets,Lt):i.uniform2fv(this._uSampleOffsets,Nt),i.uniform1fv(this._uSampleWeights,xt);var p=e.getDepthTexture(),A=t.getTexture();a.bindTexture(this._uDepthTexture,p,0),a.bindTexture(this._uOcclusionTexture,A,1),this._aUV.bindArrayBuffer(this._uvBuf),this._aPosition.bindArrayBuffer(this._positionsBuf),this._indicesBuf.bind(),i.drawElements(i.TRIANGLES,this._indicesBuf.numItems,this._indicesBuf.itemType,0)}}},{key:"destroy",value:function(){this._program.destroy()}}]),e}();function Ht(e,t){return Math.exp(-e*e/(t*t*2))/(Math.sqrt(2*Math.PI)*t)}function Ut(e,t){for(var n=[],r=0;r<=e;r++)n.push(t[0]*r),n.push(t[1]*r);return n}var Gt=function(){function e(t,n,r){b(this,e),r=r||{},this.gl=n,this.allocated=!1,this.canvas=t,this.buffer=null,this.bound=!1,this.size=r.size,this._hasDepthTexture=!!r.depthTexture}return P(e,[{key:"setSize",value:function(e){this.size=e}},{key:"webglContextRestored",value:function(e){this.gl=e,this.buffer=null,this.allocated=!1,this.bound=!1}},{key:"bind",value:function(){if(this._touch.apply(this,arguments),!this.bound){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.buffer.framebuf),this.bound=!0}}},{key:"createTexture",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=this.gl,i=r.createTexture();return r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),n?r.texStorage2D(r.TEXTURE_2D,1,n,e,t):r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null),i}},{key:"_touch",value:function(){var e,t,n=this,r=this.gl;if(this.size?(e=this.size[0],t=this.size[1]):(e=r.drawingBufferWidth,t=r.drawingBufferHeight),this.buffer){if(this.buffer.width===e&&this.buffer.height===t)return;this.buffer.textures.forEach((function(e){return r.deleteTexture(e)})),r.deleteFramebuffer(this.buffer.framebuf),r.deleteRenderbuffer(this.buffer.renderbuf)}for(var i,a=[],s=arguments.length,o=new Array(s),l=0;l0?a.push.apply(a,u(o.map((function(r){return n.createTexture(e,t,r)})))):a.push(this.createTexture(e,t)),this._hasDepthTexture&&(i=r.createTexture(),r.bindTexture(r.TEXTURE_2D,i),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texImage2D(r.TEXTURE_2D,0,r.DEPTH_COMPONENT32F,e,t,0,r.DEPTH_COMPONENT,r.FLOAT,null));var c=r.createRenderbuffer();r.bindRenderbuffer(r.RENDERBUFFER,c),r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_COMPONENT32F,e,t);var f=r.createFramebuffer();r.bindFramebuffer(r.FRAMEBUFFER,f);for(var p=0;p0&&r.drawBuffers(a.map((function(e,t){return r.COLOR_ATTACHMENT0+t}))),this._hasDepthTexture?r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,i,0):r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,c),r.bindTexture(r.TEXTURE_2D,null),r.bindRenderbuffer(r.RENDERBUFFER,null),r.bindFramebuffer(r.FRAMEBUFFER,null),r.bindFramebuffer(r.FRAMEBUFFER,f),!r.isFramebuffer(f))throw"Invalid framebuffer";r.bindFramebuffer(r.FRAMEBUFFER,null);var A=r.checkFramebufferStatus(r.FRAMEBUFFER);switch(A){case r.FRAMEBUFFER_COMPLETE:break;case r.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case r.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case r.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Incomplete framebuffer: FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case r.FRAMEBUFFER_UNSUPPORTED:throw"Incomplete framebuffer: FRAMEBUFFER_UNSUPPORTED";default:throw"Incomplete framebuffer: "+A}this.buffer={framebuf:f,renderbuf:c,texture:a[0],textures:a,depthTexture:i,width:e,height:t},this.bound=!1}},{key:"clear",value:function(){if(!this.bound)throw"Render buffer not bound";var e=this.gl;e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}},{key:"read",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:Uint8Array,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:4,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=e,l=this.buffer.height?this.buffer.height-t-1:this.gl.drawingBufferHeight-t,u=new i(a),c=this.gl;return c.readBuffer(c.COLOR_ATTACHMENT0+s),c.readPixels(o,l,1,1,n||c.RGBA,r||c.UNSIGNED_BYTE,u,0),u}},{key:"readArray",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Uint8Array,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:4,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=new n(this.buffer.width*this.buffer.height*r),s=this.gl;return s.readBuffer(s.COLOR_ATTACHMENT0+i),s.readPixels(0,0,this.buffer.width,this.buffer.height,e||s.RGBA,t||s.UNSIGNED_BYTE,a,0),a}},{key:"readImageAsCanvas",value:function(){var e=this.gl,t=this._getImageDataCache(),n=t.pixelData,r=t.canvas,i=t.imageData,a=t.context;e.readPixels(0,0,this.buffer.width,this.buffer.height,e.RGBA,e.UNSIGNED_BYTE,n);for(var s=this.buffer.width,o=this.buffer.height,l=o/2|0,u=4*s,c=new Uint8Array(4*s),f=0;f0&&void 0!==arguments[0]?arguments[0]:Uint8Array,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=this.buffer.width,r=this.buffer.height,i=this._imageDataCache;if(i&&(i.width===n&&i.height===r||(this._imageDataCache=null,i=null)),!i){var a=document.createElement("canvas"),s=a.getContext("2d");a.width=n,a.height=r,i={pixelData:new e(n*r*t),canvas:a,context:s,imageData:s.createImageData(n,r),width:n,height:r},this._imageDataCache=i}return i.context.resetTransform(),i}},{key:"unbind",value:function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,null),this.bound=!1}},{key:"getTexture",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this;return this._texture||(this._texture={renderBuffer:this,bind:function(n){return!(!t.buffer||!t.buffer.textures[e])&&(t.gl.activeTexture(t.gl["TEXTURE"+n]),t.gl.bindTexture(t.gl.TEXTURE_2D,t.buffer.textures[e]),!0)},unbind:function(n){t.buffer&&t.buffer.textures[e]&&(t.gl.activeTexture(t.gl["TEXTURE"+n]),t.gl.bindTexture(t.gl.TEXTURE_2D,null))}})}},{key:"hasDepthTexture",value:function(){return this._hasDepthTexture}},{key:"getDepthTexture",value:function(){if(!this._hasDepthTexture)return null;var e=this;return this._depthTexture||(this._dethTexture={renderBuffer:this,bind:function(t){return!(!e.buffer||!e.buffer.depthTexture)&&(e.gl.activeTexture(e.gl["TEXTURE"+t]),e.gl.bindTexture(e.gl.TEXTURE_2D,e.buffer.depthTexture),!0)},unbind:function(t){e.buffer&&e.buffer.depthTexture&&(e.gl.activeTexture(e.gl["TEXTURE"+t]),e.gl.bindTexture(e.gl.TEXTURE_2D,null))}})}},{key:"destroy",value:function(){if(this.allocated){var e=this.gl;this.buffer.textures.forEach((function(t){return e.deleteTexture(t)})),e.deleteTexture(this.buffer.depthTexture),e.deleteFramebuffer(this.buffer.framebuf),e.deleteRenderbuffer(this.buffer.renderbuf),this.allocated=!1,this.buffer=null,this.bound=!1}this._imageDataCache=null,this._texture=null,this._depthTexture=null}}]),e}(),kt=function(){function e(t){b(this,e),this.scene=t,this._renderBuffersBasic={},this._renderBuffersScaled={}}return P(e,[{key:"getRenderBuffer",value:function(e,t){var n=1===this.scene.canvas.resolutionScale?this._renderBuffersBasic:this._renderBuffersScaled,r=n[e];return r||(r=new Gt(this.scene.canvas.canvas,this.scene.canvas.gl,t),n[e]=r),r}},{key:"destroy",value:function(){for(var e in this._renderBuffersBasic)this._renderBuffersBasic[e].destroy();for(var t in this._renderBuffersScaled)this._renderBuffersScaled[t].destroy()}}]),e}();function jt(e,t){if(void 0===e._cachedExtensions&&(e._cachedExtensions={}),void 0!==e._cachedExtensions[t])return e._cachedExtensions[t];var n;switch(t){case"WEBGL_depth_texture":n=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":n=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":n=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":n=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:n=e.getExtension(t)}return e._cachedExtensions[t]=n,n}var Vt=function(e,t){t=t||{};var n=new dt(e),r=e.canvas.canvas,i=e.canvas.gl,a=!!t.transparent,s=t.alphaDepthMask,o=new G({}),l={},u={},c=!0,f=!0,p=!0,A=!0,d=!0,v=!0,h=!0,I=!0,y=new kt(e),m=!1,w=new St(e),g=new Ft(e);function E(){c&&(!function(){for(var e in l)if(l.hasOwnProperty(e)){var t=l[e],n=t.drawableMap,r=t.drawableListPreCull,i=0;for(var a in n)n.hasOwnProperty(a)&&(r[i++]=n[a]);r.length=i}}(),c=!1,f=!0),f&&(!function(){for(var e in l)if(l.hasOwnProperty(e)){var t=l[e];t.isStateSortable&&t.drawableListPreCull.sort(t.stateSortCompare)}}(),f=!1,p=!0),p&&function(){for(var e in l)if(l.hasOwnProperty(e)){for(var t=l[e],n=t.drawableListPreCull,r=t.drawableList,i=0,a=0,s=n.length;a0)for(n.withSAO=!0,O=0;O0)for(O=0;O0)for(O=0;O0)for(O=0;O0||Q>0||U>0||G>0){if(i.enable(i.CULL_FACE),i.enable(i.BLEND),a?(i.blendEquation(i.FUNC_ADD),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)):(i.blendEquation(i.FUNC_ADD),i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA)),n.backfaces=!1,s||i.depthMask(!1),(U>0||G>0)&&i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),G>0)for(O=0;O0)for(O=0;O0)for(O=0;O0)for(O=0;O0||z>0){if(n.lastProgramId=null,e.highlightMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),z>0)for(O=0;O0)for(O=0;O0||Y>0||W>0){if(n.lastProgramId=null,e.selectedMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),i.enable(i.BLEND),a?(i.blendEquation(i.FUNC_ADD),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)):i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),i.enable(i.CULL_FACE),Y>0)for(O=0;O0)for(O=0;O0||q>0){if(n.lastProgramId=null,e.selectedMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),q>0)for(O=0;O0)for(O=0;O0||Z>0){if(n.lastProgramId=null,e.selectedMaterial.glowThrough&&i.clear(i.DEPTH_BUFFER_BIT),i.enable(i.CULL_FACE),i.enable(i.BLEND),a?(i.blendEquation(i.FUNC_ADD),i.blendFuncSeparate(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA,i.ONE,i.ONE_MINUS_SRC_ALPHA)):i.blendFunc(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),Z>0)for(O=0;O0)for(O=0;O1&&void 0!==arguments[1]?arguments[1]:s;d.reset(),E();var v=null,h=null;for(var I in d.pickSurface=p.pickSurface,p.canvasPos?(u[0]=p.canvasPos[0],u[1]=p.canvasPos[1],v=e.camera.viewMatrix,h=e.camera.projMatrix,d.canvasPos=p.canvasPos):(p.matrix?(v=p.matrix,h=e.camera.projMatrix):(c.set(p.origin||[0,0,0]),f.set(p.direction||[0,0,1]),A=$.addVec3(c,f,t),i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),$.normalizeVec3(i),$.cross3Vec3(f,i,a),v=$.lookAtMat4v(c,A,a,n),h=e.camera.ortho.matrix,d.origin=c,d.direction=f),u[0]=.5*r.clientWidth,u[1]=.5*r.clientHeight),l)if(l.hasOwnProperty(I))for(var m=l[I].drawableList,w=0,g=m.length;w4&&void 0!==arguments[4]?arguments[4]:P;if(!a&&!s)return this.pick({canvasPos:t,pickSurface:!0});var c=e.canvas.resolutionScale;n.reset(),n.backfaces=!0,n.frontface=!0,n.pickZNear=e.camera.project.near,n.pickZFar=e.camera.project.far,r=r||30;var f=y.getRenderBuffer("uniquePickColors-aabs",{depthTexture:!0,size:[2*r+1,2*r+1]});n.snapVectorA=[B(t[0]*c,i.drawingBufferWidth),O(t[1]*c,i.drawingBufferHeight)],n.snapInvVectorAB=[i.drawingBufferWidth/(2*r),i.drawingBufferHeight/(2*r)],f.bind(i.RGBA32I,i.RGBA32I,i.RGBA8UI),i.viewport(0,0,f.size[0],f.size[1]),i.enable(i.DEPTH_TEST),i.frontFace(i.CCW),i.disable(i.CULL_FACE),i.depthMask(!0),i.disable(i.BLEND),i.depthFunc(i.LEQUAL),i.clear(i.DEPTH_BUFFER_BIT),i.clearBufferiv(i.COLOR,0,new Int32Array([0,0,0,0])),i.clearBufferiv(i.COLOR,1,new Int32Array([0,0,0,0])),i.clearBufferuiv(i.COLOR,2,new Uint32Array([0,0,0,0]));var p=e.camera.viewMatrix,A=e.camera.projMatrix;for(var d in l)if(l.hasOwnProperty(d))for(var v=l[d].drawableList,h=0,I=v.length;h0){var V=Math.floor(j/4),Q=f.size[0],W=V%Q-Math.floor(Q/2),z=Math.floor(V/Q)-Math.floor(Q/2),K=Math.sqrt(Math.pow(W,2)+Math.pow(z,2));k.push({x:W,y:z,dist:K,isVertex:a&&s?E[j+3]>g.length/2:a,result:[E[j+0],E[j+1],E[j+2],E[j+3]],normal:[T[j+0],T[j+1],T[j+2],T[j+3]],id:[b[j+0],b[j+1],b[j+2],b[j+3]]})}var Y=null,X=null,q=null,J=null;if(k.length>0){k.sort((function(e,t){return e.isVertex!==t.isVertex?e.isVertex?-1:1:e.dist-t.dist})),J=k[0].isVertex?"vertex":"edge";var Z=k[0].result,ee=k[0].normal,te=k[0].id,ne=g[Z[3]],re=ne.origin,ie=ne.coordinateScale;X=$.normalizeVec3([ee[0]/$.MAX_INT,ee[1]/$.MAX_INT,ee[2]/$.MAX_INT]),Y=[Z[0]*ie[0]+re[0],Z[1]*ie[1]+re[1],Z[2]*ie[2]+re[2]],q=o.items[te[0]+(te[1]<<8)+(te[2]<<16)+(te[3]<<24)]}if(null===D&&null==Y)return null;var ae=null;null!==Y&&(ae=e.camera.projectWorldPos(Y));var se=q&&q.delegatePickedEntity?q.delegatePickedEntity():q;return u.reset(),u.snappedToEdge="edge"===J,u.snappedToVertex="vertex"===J,u.worldPos=Y,u.worldNormal=X,u.entity=se,u.canvasPos=t,u.snappedCanvasPos=ae||t,u}),this.addMarker=function(t){this._occlusionTester=this._occlusionTester||new Bt(e,y),this._occlusionTester.addMarker(t),e.occlusionTestCountdown=0},this.markerWorldPosUpdated=function(e){this._occlusionTester.markerWorldPosUpdated(e)},this.removeMarker=function(e){this._occlusionTester.removeMarker(e)},this.doOcclusionTest=function(){if(this._occlusionTester&&this._occlusionTester.needOcclusionTest){for(var e in E(),this._occlusionTester.bindRenderBuf(),n.reset(),n.backfaces=!0,n.frontface=!0,i.viewport(0,0,i.drawingBufferWidth,i.drawingBufferHeight),i.clearColor(0,0,0,0),i.enable(i.DEPTH_TEST),i.disable(i.CULL_FACE),i.disable(i.BLEND),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),l)if(l.hasOwnProperty(e))for(var t=l[e].drawableList,r=0,a=t.length;r0&&void 0!==arguments[0]?arguments[0]:{},t=y.getRenderBuffer("snapshot");e.width&&e.height&&t.setSize([e.width,e.height]),t.bind(),t.clear(),m=!0},this.renderSnapshot=function(){m&&(y.getRenderBuffer("snapshot").clear(),this.render({force:!0,opaqueOnly:!1}),p=!0)},this.readSnapshot=function(e){return y.getRenderBuffer("snapshot").readImage(e)},this.readSnapshotAsCanvas=function(){return y.getRenderBuffer("snapshot").readImageAsCanvas()},this.endSnapshot=function(){m&&(y.getRenderBuffer("snapshot").unbind(),m=!1)},this.destroy=function(){l={},u={},y.destroy(),w.destroy(),g.destroy(),this._occlusionTester&&this._occlusionTester.destroy()}},Qt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).KEY_BACKSPACE=8,r.KEY_TAB=9,r.KEY_ENTER=13,r.KEY_SHIFT=16,r.KEY_CTRL=17,r.KEY_ALT=18,r.KEY_PAUSE_BREAK=19,r.KEY_CAPS_LOCK=20,r.KEY_ESCAPE=27,r.KEY_PAGE_UP=33,r.KEY_PAGE_DOWN=34,r.KEY_END=35,r.KEY_HOME=36,r.KEY_LEFT_ARROW=37,r.KEY_UP_ARROW=38,r.KEY_RIGHT_ARROW=39,r.KEY_DOWN_ARROW=40,r.KEY_INSERT=45,r.KEY_DELETE=46,r.KEY_NUM_0=48,r.KEY_NUM_1=49,r.KEY_NUM_2=50,r.KEY_NUM_3=51,r.KEY_NUM_4=52,r.KEY_NUM_5=53,r.KEY_NUM_6=54,r.KEY_NUM_7=55,r.KEY_NUM_8=56,r.KEY_NUM_9=57,r.KEY_A=65,r.KEY_B=66,r.KEY_C=67,r.KEY_D=68,r.KEY_E=69,r.KEY_F=70,r.KEY_G=71,r.KEY_H=72,r.KEY_I=73,r.KEY_J=74,r.KEY_K=75,r.KEY_L=76,r.KEY_M=77,r.KEY_N=78,r.KEY_O=79,r.KEY_P=80,r.KEY_Q=81,r.KEY_R=82,r.KEY_S=83,r.KEY_T=84,r.KEY_U=85,r.KEY_V=86,r.KEY_W=87,r.KEY_X=88,r.KEY_Y=89,r.KEY_Z=90,r.KEY_LEFT_WINDOW=91,r.KEY_RIGHT_WINDOW=92,r.KEY_SELECT_KEY=93,r.KEY_NUMPAD_0=96,r.KEY_NUMPAD_1=97,r.KEY_NUMPAD_2=98,r.KEY_NUMPAD_3=99,r.KEY_NUMPAD_4=100,r.KEY_NUMPAD_5=101,r.KEY_NUMPAD_6=102,r.KEY_NUMPAD_7=103,r.KEY_NUMPAD_8=104,r.KEY_NUMPAD_9=105,r.KEY_MULTIPLY=106,r.KEY_ADD=107,r.KEY_SUBTRACT=109,r.KEY_DECIMAL_POINT=110,r.KEY_DIVIDE=111,r.KEY_F1=112,r.KEY_F2=113,r.KEY_F3=114,r.KEY_F4=115,r.KEY_F5=116,r.KEY_F6=117,r.KEY_F7=118,r.KEY_F8=119,r.KEY_F9=120,r.KEY_F10=121,r.KEY_F11=122,r.KEY_F12=123,r.KEY_NUM_LOCK=144,r.KEY_SCROLL_LOCK=145,r.KEY_SEMI_COLON=186,r.KEY_EQUAL_SIGN=187,r.KEY_COMMA=188,r.KEY_DASH=189,r.KEY_PERIOD=190,r.KEY_FORWARD_SLASH=191,r.KEY_GRAVE_ACCENT=192,r.KEY_OPEN_BRACKET=219,r.KEY_BACK_SLASH=220,r.KEY_CLOSE_BRACKET=221,r.KEY_SINGLE_QUOTE=222,r.KEY_SPACE=32,r.element=i.element,r.altDown=!1,r.ctrlDown=!1,r.mouseDownLeft=!1,r.mouseDownMiddle=!1,r.mouseDownRight=!1,r.keyDown=[],r.enabled=!0,r.keyboardEnabled=!0,r.mouseover=!1,r.mouseCanvasPos=$.vec2(),r._keyboardEventsElement=i.keyboardEventsElement||document,r._bindEvents(),r}return P(n,[{key:"_bindEvents",value:function(){var e=this;if(!this._eventsBound){this._keyboardEventsElement.addEventListener("keydown",this._keyDownListener=function(t){e.enabled&&e.keyboardEnabled&&"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&(t.keyCode===e.KEY_CTRL?e.ctrlDown=!0:t.keyCode===e.KEY_ALT?e.altDown=!0:t.keyCode===e.KEY_SHIFT&&(e.shiftDown=!0),e.keyDown[t.keyCode]=!0,e.fire("keydown",t.keyCode,!0))},!1),this._keyboardEventsElement.addEventListener("keyup",this._keyUpListener=function(t){e.enabled&&e.keyboardEnabled&&"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&(t.keyCode===e.KEY_CTRL?e.ctrlDown=!1:t.keyCode===e.KEY_ALT?e.altDown=!1:t.keyCode===e.KEY_SHIFT&&(e.shiftDown=!1),e.keyDown[t.keyCode]=!1,e.fire("keyup",t.keyCode,!0))}),this.element.addEventListener("mouseenter",this._mouseEnterListener=function(t){e.enabled&&(e.mouseover=!0,e._getMouseCanvasPos(t),e.fire("mouseenter",e.mouseCanvasPos,!0))}),this.element.addEventListener("mouseleave",this._mouseLeaveListener=function(t){e.enabled&&(e.mouseover=!1,e._getMouseCanvasPos(t),e.fire("mouseleave",e.mouseCanvasPos,!0))}),this.element.addEventListener("mousedown",this._mouseDownListener=function(t){if(e.enabled){switch(t.which){case 1:e.mouseDownLeft=!0;break;case 2:e.mouseDownMiddle=!0;break;case 3:e.mouseDownRight=!0}e._getMouseCanvasPos(t),e.element.focus(),e.fire("mousedown",e.mouseCanvasPos,!0),e.mouseover&&t.preventDefault()}}),document.addEventListener("mouseup",this._mouseUpListener=function(t){if(e.enabled){switch(t.which){case 1:e.mouseDownLeft=!1;break;case 2:e.mouseDownMiddle=!1;break;case 3:e.mouseDownRight=!1}e.fire("mouseup",e.mouseCanvasPos,!0)}},!0),document.addEventListener("click",this._clickListener=function(t){if(e.enabled){switch(t.which){case 1:case 3:e.mouseDownLeft=!1,e.mouseDownRight=!1;break;case 2:e.mouseDownMiddle=!1}e._getMouseCanvasPos(t),e.fire("click",e.mouseCanvasPos,!0),e.mouseover&&t.preventDefault()}}),document.addEventListener("dblclick",this._dblClickListener=function(t){if(e.enabled){switch(t.which){case 1:case 3:e.mouseDownLeft=!1,e.mouseDownRight=!1;break;case 2:e.mouseDownMiddle=!1}e._getMouseCanvasPos(t),e.fire("dblclick",e.mouseCanvasPos,!0),e.mouseover&&t.preventDefault()}});var t=this.scene.tickify((function(){return e.fire("mousemove",e.mouseCanvasPos,!0)}));this.element.addEventListener("mousemove",this._mouseMoveListener=function(n){e.enabled&&(e._getMouseCanvasPos(n),t(),e.mouseover&&n.preventDefault())});var n=this.scene.tickify((function(t){e.fire("mousewheel",t,!0)}));this.element.addEventListener("wheel",this._mouseWheelListener=function(t,r){if(e.enabled){var i=Math.max(-1,Math.min(1,40*-t.deltaY));n(i)}},{passive:!0});var r,i;this.on("mousedown",(function(e){r=e[0],i=e[1]})),this.on("mouseup",(function(t){r>=t[0]-2&&r<=t[0]+2&&i>=t[1]-2&&i<=t[1]+2&&e.fire("mouseclicked",t,!0)})),this._eventsBound=!0}}},{key:"_unbindEvents",value:function(){this._eventsBound&&(this._keyboardEventsElement.removeEventListener("keydown",this._keyDownListener),this._keyboardEventsElement.removeEventListener("keyup",this._keyUpListener),this.element.removeEventListener("mouseenter",this._mouseEnterListener),this.element.removeEventListener("mouseleave",this._mouseLeaveListener),this.element.removeEventListener("mousedown",this._mouseDownListener),document.removeEventListener("mouseup",this._mouseDownListener),document.removeEventListener("click",this._clickListener),document.removeEventListener("dblclick",this._dblClickListener),this.element.removeEventListener("mousemove",this._mouseMoveListener),this.element.removeEventListener("wheel",this._mouseWheelListener),window.OrientationChangeEvent&&window.removeEventListener("orientationchange",this._orientationchangedListener),window.DeviceMotionEvent&&window.removeEventListener("devicemotion",this._deviceMotionListener),window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this._deviceOrientListener),this._eventsBound=!1)}},{key:"_getMouseCanvasPos",value:function(e){if(e){for(var t=e.target,n=0,r=0;t.offsetParent;)n+=t.offsetLeft,r+=t.offsetTop,t=t.offsetParent;this.mouseCanvasPos[0]=e.pageX-n,this.mouseCanvasPos[1]=e.pageY-r}else e=window.event,this.mouseCanvasPos[0]=e.x,this.mouseCanvasPos[1]=e.y}},{key:"setEnabled",value:function(e){this.enabled!==e&&this.fire("enabled",this.enabled=e)}},{key:"getEnabled",value:function(){return this.enabled}},{key:"setKeyboardEnabled",value:function(e){this.keyboardEnabled=e}},{key:"getKeyboardEnabled",value:function(){return this.keyboardEnabled}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._unbindEvents()}}]),n}(),Wt=new G({}),zt=function(){function e(t){for(var n in b(this,e),this.id=Wt.addItem({}),t)t.hasOwnProperty(n)&&(this[n]=t[n])}return P(e,[{key:"destroy",value:function(){Wt.removeItem(this.id)}}]),e}(),Kt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({boundary:[0,0,100,100]}),r.boundary=i.boundary,r.autoBoundary=i.autoBoundary,r}return P(n,[{key:"type",get:function(){return"Viewport"}},{key:"boundary",get:function(){return this._state.boundary},set:function(e){if(!this._autoBoundary){if(!e){var t=this.scene.canvas.boundary;e=[0,0,t[2],t[3]]}this._state.boundary=e,this.glRedraw(),this.fire("boundary",this._state.boundary)}}},{key:"autoBoundary",get:function(){return this._autoBoundary},set:function(e){(e=!!e)!==this._autoBoundary&&(this._autoBoundary=e,this._autoBoundary?this._onCanvasSize=this.scene.canvas.on("boundary",(function(e){var t=e[2],n=e[3];this._state.boundary=[0,0,t,n],this.glRedraw(),this.fire("boundary",this._state.boundary)}),this):this._onCanvasSize&&(this.scene.canvas.off(this._onCanvasSize),this._onCanvasSize=null),this.fire("autoBoundary",this._autoBoundary))}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Yt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4(),near:.1,far:1e4}),r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!0,r._fov=60,r._canvasResized=r.scene.canvas.on("boundary",r._needUpdate,w(r)),r.fov=i.fov,r.fovAxis=i.fovAxis,r.near=i.near,r.far=i.far,r}return P(n,[{key:"type",get:function(){return"Perspective"}},{key:"_update",value:function(){var e=this.scene.canvas.boundary,t=e[2]/e[3],n=this._fovAxis,r=this._fov;("x"===n||"min"===n&&t<1||"max"===n&&t>1)&&(r/=t),r=Math.min(r,120),$.perspectiveMat4(r*(Math.PI/180),t,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.camera._updateScheduled=!0,this.fire("matrix",this._state.matrix)}},{key:"fov",get:function(){return this._fov},set:function(e){(e=null!=e?e:60)!==this._fov&&(this._fov=e,this._needUpdate(0),this.fire("fov",this._fov))}},{key:"fovAxis",get:function(){return this._fovAxis},set:function(e){e=e||"min",this._fovAxis!==e&&("x"!==e&&"y"!==e&&"min"!==e&&(this.error("Unsupported value for 'fovAxis': "+e+" - defaulting to 'min'"),e="min"),this._fovAxis=e,this._needUpdate(0),this.fire("fovAxis",this._fovAxis))}},{key:"near",get:function(){return this._state.near},set:function(e){var t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}},{key:"far",get:function(){return this._state.far},set:function(e){var t=null!=e?e:1e4;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this.scene.canvas.off(this._canvasResized)}}]),n}(),Xt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4(),near:.1,far:1e4}),r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!0,r.scale=i.scale,r.near=i.near,r.far=i.far,r._onCanvasBoundary=r.scene.canvas.on("boundary",r._needUpdate,w(r)),r}return P(n,[{key:"type",get:function(){return"Ortho"}},{key:"_update",value:function(){var e,t,n,r,i=this.scene,a=.5*this._scale,s=i.canvas.boundary,o=s[2],l=s[3],u=o/l;o>l?(e=-a,t=a,n=a/u,r=-a/u):(e=-a*u,t=a*u,n=a,r=-a),$.orthoMat4c(e,t,r,n,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}},{key:"scale",get:function(){return this._scale},set:function(e){null==e&&(e=1),e<=0&&(e=.01),this._scale=e,this._needUpdate(0),this.fire("scale",this._scale)}},{key:"near",get:function(){return this._state.near},set:function(e){var t=null!=e?e:.1;this._state.near!==t&&(this._state.near=t,this._needUpdate(0),this.fire("near",this._state.near))}},{key:"far",get:function(){return this._state.far},set:function(e){var t=null!=e?e:1e4;this._state.far!==t&&(this._state.far=t,this._needUpdate(0),this.fire("far",this._state.far))}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this.scene.canvas.off(this._onCanvasBoundary)}}]),n}(),qt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4(),near:.1,far:1e4}),r._left=-1,r._right=1,r._bottom=-1,r._top=1,r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!0,r.left=i.left,r.right=i.right,r.bottom=i.bottom,r.top=i.top,r.near=i.near,r.far=i.far,r}return P(n,[{key:"type",get:function(){return"Frustum"}},{key:"_update",value:function(){$.frustumMat4(this._left,this._right,this._bottom,this._top,this._state.near,this._state.far,this._state.matrix),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}},{key:"left",get:function(){return this._left},set:function(e){this._left=null!=e?e:-1,this._needUpdate(0),this.fire("left",this._left)}},{key:"right",get:function(){return this._right},set:function(e){this._right=null!=e?e:1,this._needUpdate(0),this.fire("right",this._right)}},{key:"top",get:function(){return this._top},set:function(e){this._top=null!=e?e:1,this._needUpdate(0),this.fire("top",this._top)}},{key:"bottom",get:function(){return this._bottom},set:function(e){this._bottom=null!=e?e:-1,this._needUpdate(0),this.fire("bottom",this._bottom)}},{key:"near",get:function(){return this._state.near},set:function(e){this._state.near=null!=e?e:.1,this._needUpdate(0),this.fire("near",this._state.near)}},{key:"far",get:function(){return this._state.far},set:function(e){this._state.far=null!=e?e:1e4,this._needUpdate(0),this.fire("far",this._state.far)}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),Jt=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).camera=e,r._state=new zt({matrix:$.mat4(),inverseMatrix:$.mat4(),transposedMatrix:$.mat4()}),r._inverseMatrixDirty=!0,r._transposedMatrixDirty=!1,r.matrix=i.matrix,r}return P(n,[{key:"type",get:function(){return"CustomProjection"}},{key:"matrix",get:function(){return this._state.matrix},set:function(e){this._state.matrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._inverseMatrixDirty=!0,this._transposedMatrixDirty=!0,this.glRedraw(),this.fire("matrix",this._state.matrix)}},{key:"inverseMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._inverseMatrixDirty&&($.inverseMat4(this._state.matrix,this._state.inverseMatrix),this._inverseMatrixDirty=!1),this._state.inverseMatrix}},{key:"transposedMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._transposedMatrixDirty&&($.transposeMat4(this._state.matrix,this._state.transposedMatrix),this._transposedMatrixDirty=!1),this._state.transposedMatrix}},{key:"unproject",value:function(e,t,n,r,i){var a=this.scene.canvas.canvas,s=a.offsetWidth/2,o=a.offsetHeight/2;return n[0]=(e[0]-s)/s,n[1]=(e[1]-o)/o,n[2]=t,n[3]=1,$.mulMat4v4(this.inverseMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1,$.mulMat4v4(this.camera.inverseViewMatrix,r,i),i}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Zt=$.vec3(),$t=$.vec3(),en=$.vec3(),tn=$.vec3(),nn=$.vec3(),rn=$.vec3(),an=$.vec4(),sn=$.vec4(),on=$.vec4(),ln=$.mat4(),un=$.mat4(),cn=$.vec3(),fn=$.vec3(),pn=$.vec3(),An=$.vec3(),dn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({deviceMatrix:$.mat4(),hasDeviceMatrix:!1,matrix:$.mat4(),normalMatrix:$.mat4(),inverseMatrix:$.mat4()}),r._perspective=new Yt(w(r)),r._ortho=new Xt(w(r)),r._frustum=new qt(w(r)),r._customProjection=new Jt(w(r)),r._project=r._perspective,r._eye=$.vec3([0,0,10]),r._look=$.vec3([0,0,0]),r._up=$.vec3([0,1,0]),r._worldUp=$.vec3([0,1,0]),r._worldRight=$.vec3([1,0,0]),r._worldForward=$.vec3([0,0,-1]),r.deviceMatrix=i.deviceMatrix,r.eye=i.eye,r.look=i.look,r.up=i.up,r.worldAxis=i.worldAxis,r.gimbalLock=i.gimbalLock,r.constrainPitch=i.constrainPitch,r.projection=i.projection,r._perspective.on("matrix",(function(){"perspective"===r._projectionType&&r.fire("projMatrix",r._perspective.matrix)})),r._ortho.on("matrix",(function(){"ortho"===r._projectionType&&r.fire("projMatrix",r._ortho.matrix)})),r._frustum.on("matrix",(function(){"frustum"===r._projectionType&&r.fire("projMatrix",r._frustum.matrix)})),r._customProjection.on("matrix",(function(){"customProjection"===r._projectionType&&r.fire("projMatrix",r._customProjection.matrix)})),r}return P(n,[{key:"type",get:function(){return"Camera"}},{key:"_update",value:function(){var e,t=this._state;"ortho"===this.projection?($.subVec3(this._eye,this._look,cn),$.normalizeVec3(cn,fn),$.mulVec3Scalar(fn,1e3,pn),$.addVec3(this._look,pn,An),e=An):e=this._eye,t.hasDeviceMatrix?($.lookAtMat4v(e,this._look,this._up,un),$.mulMat4(t.deviceMatrix,un,t.matrix)):$.lookAtMat4v(e,this._look,this._up,t.matrix),$.inverseMat4(this._state.matrix,this._state.inverseMatrix),$.transposeMat4(this._state.inverseMatrix,this._state.normalMatrix),this.glRedraw(),this.fire("matrix",this._state.matrix),this.fire("viewMatrix",this._state.matrix)}},{key:"orbitYaw",value:function(e){var t=$.subVec3(this._eye,this._look,Zt);$.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,ln),t=$.transformPoint3(ln,t,$t),this.eye=$.addVec3(this._look,t,en),this.up=$.transformPoint3(ln,this._up,tn)}},{key:"orbitPitch",value:function(e){if(!(this._constrainPitch&&(e=$.dotVec3(this._up,this._worldUp)/$.DEGTORAD)<1)){var t=$.subVec3(this._eye,this._look,Zt),n=$.cross3Vec3($.normalizeVec3(t,$t),$.normalizeVec3(this._up,en));$.rotationMat4v(.0174532925*e,n,ln),t=$.transformPoint3(ln,t,tn),this.up=$.transformPoint3(ln,this._up,nn),this.eye=$.addVec3(t,this._look,rn)}}},{key:"yaw",value:function(e){var t=$.subVec3(this._look,this._eye,Zt);$.rotationMat4v(.0174532925*e,this._gimbalLock?this._worldUp:this._up,ln),t=$.transformPoint3(ln,t,$t),this.look=$.addVec3(t,this._eye,en),this._gimbalLock&&(this.up=$.transformPoint3(ln,this._up,tn))}},{key:"pitch",value:function(e){if(!(this._constrainPitch&&(e=$.dotVec3(this._up,this._worldUp)/$.DEGTORAD)<1)){var t=$.subVec3(this._look,this._eye,Zt),n=$.cross3Vec3($.normalizeVec3(t,$t),$.normalizeVec3(this._up,en));$.rotationMat4v(.0174532925*e,n,ln),this.up=$.transformPoint3(ln,this._up,rn),t=$.transformPoint3(ln,t,tn),this.look=$.addVec3(t,this._eye,nn)}}},{key:"pan",value:function(e){var t,n=$.subVec3(this._eye,this._look,Zt),r=[0,0,0];if(0!==e[0]){var i=$.cross3Vec3($.normalizeVec3(n,[]),$.normalizeVec3(this._up,$t));t=$.mulVec3Scalar(i,e[0]),r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]}0!==e[1]&&(t=$.mulVec3Scalar($.normalizeVec3(this._up,en),e[1]),r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]),0!==e[2]&&(t=$.mulVec3Scalar($.normalizeVec3(n,tn),e[2]),r[0]+=t[0],r[1]+=t[1],r[2]+=t[2]),this.eye=$.addVec3(this._eye,r,nn),this.look=$.addVec3(this._look,r,rn)}},{key:"zoom",value:function(e){var t=$.subVec3(this._eye,this._look,Zt),n=Math.abs($.lenVec3(t,$t)),r=Math.abs(n+e);if(!(r<.5)){var i=$.normalizeVec3(t,en);this.eye=$.addVec3(this._look,$.mulVec3Scalar(i,r),tn)}}},{key:"eye",get:function(){return this._eye},set:function(e){this._eye.set(e||[0,0,10]),this._needUpdate(0),this.fire("eye",this._eye)}},{key:"look",get:function(){return this._look},set:function(e){this._look.set(e||[0,0,0]),this._needUpdate(0),this.fire("look",this._look)}},{key:"up",get:function(){return this._up},set:function(e){this._up.set(e||[0,1,0]),this._needUpdate(0),this.fire("up",this._up)}},{key:"deviceMatrix",get:function(){return this._state.deviceMatrix},set:function(e){this._state.deviceMatrix.set(e||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),this._state.hasDeviceMatrix=!!e,this._needUpdate(0),this.fire("deviceMatrix",this._state.deviceMatrix)}},{key:"worldAxis",get:function(){return this._worldAxis},set:function(e){e=e||[1,0,0,0,1,0,0,0,1],this._worldAxis?this._worldAxis.set(e):this._worldAxis=$.vec3(e),this._worldRight[0]=this._worldAxis[0],this._worldRight[1]=this._worldAxis[1],this._worldRight[2]=this._worldAxis[2],this._worldUp[0]=this._worldAxis[3],this._worldUp[1]=this._worldAxis[4],this._worldUp[2]=this._worldAxis[5],this._worldForward[0]=this._worldAxis[6],this._worldForward[1]=this._worldAxis[7],this._worldForward[2]=this._worldAxis[8],this.fire("worldAxis",this._worldAxis)}},{key:"worldUp",get:function(){return this._worldUp}},{key:"xUp",get:function(){return this._worldUp[0]>this._worldUp[1]&&this._worldUp[0]>this._worldUp[2]}},{key:"yUp",get:function(){return this._worldUp[1]>this._worldUp[0]&&this._worldUp[1]>this._worldUp[2]}},{key:"zUp",get:function(){return this._worldUp[2]>this._worldUp[0]&&this._worldUp[2]>this._worldUp[1]}},{key:"worldRight",get:function(){return this._worldRight}},{key:"worldForward",get:function(){return this._worldForward}},{key:"gimbalLock",get:function(){return this._gimbalLock},set:function(e){this._gimbalLock=!1!==e,this.fire("gimbalLock",this._gimbalLock)}},{key:"constrainPitch",set:function(e){this._constrainPitch=!!e,this.fire("constrainPitch",this._constrainPitch)}},{key:"eyeLookDist",get:function(){return $.lenVec3($.subVec3(this._look,this._eye,Zt))}},{key:"matrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"viewMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.matrix}},{key:"normalMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}},{key:"viewNormalMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.normalMatrix}},{key:"inverseViewMatrix",get:function(){return this._updateScheduled&&this._doUpdate(),this._state.inverseMatrix}},{key:"projMatrix",get:function(){return this[this.projection].matrix}},{key:"perspective",get:function(){return this._perspective}},{key:"ortho",get:function(){return this._ortho}},{key:"frustum",get:function(){return this._frustum}},{key:"customProjection",get:function(){return this._customProjection}},{key:"projection",get:function(){return this._projectionType},set:function(e){e=e||"perspective",this._projectionType!==e&&("perspective"===e?this._project=this._perspective:"ortho"===e?this._project=this._ortho:"frustum"===e?this._project=this._frustum:"customProjection"===e?this._project=this._customProjection:(this.error("Unsupported value for 'projection': "+e+" defaulting to 'perspective'"),this._project=this._perspective,e="perspective"),this._project._update(),this._projectionType=e,this.glRedraw(),this._update(),this.fire("dirty"),this.fire("projection",this._projectionType),this.fire("projMatrix",this._project.matrix))}},{key:"project",get:function(){return this._project}},{key:"projectWorldPos",value:function(e){var t=an,n=sn,r=on;t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,$.mulMat4v4(this.viewMatrix,t,n),$.mulMat4v4(this.projMatrix,n,r),$.mulVec3Scalar(r,1/r[3]),r[3]=1,r[1]*=-1;var i=this.scene.canvas.canvas,a=i.offsetWidth/2,s=i.offsetHeight/2;return[r[0]*a+a,r[1]*s+s]}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),vn=function(e){h(n,me);var t=y(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),t.call(this,e,r)}return P(n,[{key:"type",get:function(){return"Light"}},{key:"isLight",get:function(){return!0}}]),n}(),hn=function(e){h(n,vn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._shadowRenderBuf=null,r._shadowViewMatrix=null,r._shadowProjMatrix=null,r._shadowViewMatrixDirty=!0,r._shadowProjMatrixDirty=!0;var a=r.scene.camera,s=r.scene.canvas;return r._onCameraViewMatrix=a.on("viewMatrix",(function(){r._shadowViewMatrixDirty=!0})),r._onCameraProjMatrix=a.on("projMatrix",(function(){r._shadowProjMatrixDirty=!0})),r._onCanvasBoundary=s.on("boundary",(function(){r._shadowProjMatrixDirty=!0})),r._state=new zt({type:"dir",dir:$.vec3([1,1,1]),color:$.vec3([.7,.7,.8]),intensity:1,space:i.space||"view",castsShadow:!1,getShadowViewMatrix:function(){if(r._shadowViewMatrixDirty){r._shadowViewMatrix||(r._shadowViewMatrix=$.identityMat4());var e=r.scene.camera,t=r._state.dir,n=e.look,i=[n[0]-t[0],n[1]-t[1],n[2]-t[2]];$.lookAtMat4v(i,n,[0,1,0],r._shadowViewMatrix),r._shadowViewMatrixDirty=!1}return r._shadowViewMatrix},getShadowProjMatrix:function(){return r._shadowProjMatrixDirty&&(r._shadowProjMatrix||(r._shadowProjMatrix=$.identityMat4()),$.orthoMat4c(-40,40,-40,40,-40,80,r._shadowProjMatrix),r._shadowProjMatrixDirty=!1),r._shadowProjMatrix},getShadowRenderBuf:function(){return r._shadowRenderBuf||(r._shadowRenderBuf=new Gt(r.scene.canvas.canvas,r.scene.canvas.gl,{size:[1024,1024]})),r._shadowRenderBuf}}),r.dir=i.dir,r.color=i.color,r.intensity=i.intensity,r.castsShadow=i.castsShadow,r.scene._lightCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"DirLight"}},{key:"dir",get:function(){return this._state.dir},set:function(e){this._state.dir.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}},{key:"color",get:function(){return this._state.color},set:function(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}},{key:"intensity",get:function(){return this._state.intensity},set:function(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}},{key:"castsShadow",get:function(){return this._state.castsShadow},set:function(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}},{key:"destroy",value:function(){var e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}]),n}(),In=function(e){h(n,vn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state={type:"ambient",color:$.vec3([.7,.7,.7]),intensity:1},r.color=i.color,r.intensity=i.intensity,r.scene._lightCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"AmbientLight"}},{key:"color",get:function(){return this._state.color},set:function(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}},{key:"intensity",get:function(){return this._state.intensity},set:function(e){this._state.intensity=void 0!==e?e:1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._lightDestroyed(this)}}]),n}(),yn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),r=t.call(this,e,i),re.memory.meshes++,r}return P(n,[{key:"type",get:function(){return"Geometry"}},{key:"isGeometry",get:function(){return!0}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),re.memory.meshes--}}]),n}(),mn=function(){var e=[],t=[],n=[],r=[],i=[],a=0,s=new Uint16Array(3),o=new Uint16Array(3),l=new Uint16Array(3),u=$.vec3(),c=$.vec3(),f=$.vec3(),p=$.vec3(),A=$.vec3(),d=$.vec3(),v=$.vec3();return function(h,I,y,m){!function(i,a){var s,o,l,u,c,f,p={},A=Math.pow(10,4),d=0;for(c=0,f=i.length;cO)||(_=n[D.index1],R=n[D.index2],(!N&&_>65535||R>65535)&&(N=!0),B.push(_),B.push(R));return N?new Uint32Array(B):new Uint16Array(B)}}();var wn=function(){var e=$.mat4(),t=$.mat4();return function(n,r){r=r||$.mat4();var i=n[0],a=n[1],s=n[2],o=n[3]-i,l=n[4]-a,u=n[5]-s,c=65535;return $.identityMat4(e),$.translationMat4v(n,e),$.identityMat4(t),$.scalingMat4v([o/c,l/c,u/c],t),$.mulMat4(e,t,r),r}}(),gn=function(){var e=$.mat4(),t=$.mat4();return function(n,r,i){var a,s=new Uint16Array(n.length),o=new Float32Array([i[0]!==r[0]?65535/(i[0]-r[0]):0,i[1]!==r[1]?65535/(i[1]-r[1]):0,i[2]!==r[2]?65535/(i[2]-r[2]):0]);for(a=0;a=0?1:-1),o=(1-Math.abs(i))*(a>=0?1:-1);i=s,a=o}return new Int8Array([Math[n](127.5*i+(i<0?-1:0)),Math[r](127.5*a+(a<0?-1:0))])}function bn(e){var t=e[0],n=e[1];t/=t<0?127:128,n/=n<0?127:128;var r=1-Math.abs(t)-Math.abs(n);r<0&&(t=(1-Math.abs(n))*(t>=0?1:-1),n=(1-Math.abs(t))*(n>=0?1:-1));var i=Math.sqrt(t*t+n*n+r*r);return[t/i,n/i,r/i]}function Dn(e,t,n){return e[t]*n[0]+e[t+1]*n[1]+e[t+2]*n[2]}var Pn={getPositionsBounds:function(e){var t,n,r=new Float32Array(3),i=new Float32Array(3);for(t=0;t<3;t++)r[t]=Number.MAX_VALUE,i[t]=-Number.MAX_VALUE;for(t=0;t2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;r2&&void 0!==arguments[2]?arguments[2]:e;return n[0]=e[0]*t[0]+t[12],n[1]=e[1]*t[5]+t[13],n[2]=e[2]*t[10]+t[14],n[3]=e[3]*t[0]+t[12],n[4]=e[4]*t[5]+t[13],n[5]=e[5]*t[10]+t[14],n},getUVBounds:function(e){var t,n,r=new Float32Array(2),i=new Float32Array(2);for(t=0;t<2;t++)r[t]=Number.MAX_VALUE,i[t]=-Number.MAX_VALUE;for(t=0;t2&&void 0!==arguments[2]?arguments[2]:new Float32Array(e.length),r=0,i=e.length;ri&&(n=t,i=r),(r=Dn(e,s,bn(t=Tn(e,s,"floor","ceil"))))>i&&(n=t,i=r),(r=Dn(e,s,bn(t=Tn(e,s,"ceil","ceil"))))>i&&(n=t,i=r),a[s]=n[0],a[s+1]=n[1];return a},decompressNormals:function(e,t){for(var n=0,r=0,i=e.length;n=0?1:-1),s=(1-Math.abs(a))*(s>=0?1:-1));var l=Math.sqrt(a*a+s*s+o*o);t[r+0]=a/l,t[r+1]=s/l,t[r+2]=o/l,r+=3}return t},decompressNormal:function(e,t){var n=e[0],r=e[1];n=(2*n+1)/255,r=(2*r+1)/255;var i=1-Math.abs(n)-Math.abs(r);i<0&&(n=(1-Math.abs(r))*(n>=0?1:-1),r=(1-Math.abs(n))*(r>=0?1:-1));var a=Math.sqrt(n*n+r*r+i*i);return t[0]=n/a,t[1]=r/a,t[2]=i/a,t}},Cn=re.memory,_n=$.AABB3(),Rn=function(e){h(n,yn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._state=new zt({compressGeometry:!!i.compressGeometry,primitive:null,primitiveName:null,positions:null,normals:null,colors:null,uv:null,indices:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),r._numTriangles=0,r._edgeThreshold=i.edgeThreshold||10,r._edgeIndicesBuf=null,r._pickTrianglePositionsBuf=null,r._pickTriangleColorsBuf=null,r._aabbDirty=!0,r._boundingSphere=!0,r._aabb=null,r._aabbDirty=!0,r._obb=null,r._obbDirty=!0;var a=r._state,s=r.scene.canvas.gl;switch(i.primitive=i.primitive||"triangles",i.primitive){case"points":a.primitive=s.POINTS,a.primitiveName=i.primitive;break;case"lines":a.primitive=s.LINES,a.primitiveName=i.primitive;break;case"line-loop":a.primitive=s.LINE_LOOP,a.primitiveName=i.primitive;break;case"line-strip":a.primitive=s.LINE_STRIP,a.primitiveName=i.primitive;break;case"triangles":a.primitive=s.TRIANGLES,a.primitiveName=i.primitive;break;case"triangle-strip":a.primitive=s.TRIANGLE_STRIP,a.primitiveName=i.primitive;break;case"triangle-fan":a.primitive=s.TRIANGLE_FAN,a.primitiveName=i.primitive;break;default:r.error("Unsupported value for 'primitive': '"+i.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),a.primitive=s.TRIANGLES,a.primitiveName=i.primitive}if(i.positions)if(r._state.compressGeometry){var o=Pn.getPositionsBounds(i.positions),l=Pn.compressPositions(i.positions,o.min,o.max);a.positions=l.quantized,a.positionsDecodeMatrix=l.decodeMatrix}else a.positions=i.positions.constructor===Float32Array?i.positions:new Float32Array(i.positions);if(i.colors&&(a.colors=i.colors.constructor===Float32Array?i.colors:new Float32Array(i.colors)),i.uv)if(r._state.compressGeometry){var u=Pn.getUVBounds(i.uv),c=Pn.compressUVs(i.uv,u.min,u.max);a.uv=c.quantized,a.uvDecodeMatrix=c.decodeMatrix}else a.uv=i.uv.constructor===Float32Array?i.uv:new Float32Array(i.uv);return i.normals&&(r._state.compressGeometry?a.normals=Pn.compressNormals(i.normals):a.normals=i.normals.constructor===Float32Array?i.normals:new Float32Array(i.normals)),i.indices&&(a.indices=i.indices.constructor===Uint32Array||i.indices.constructor===Uint16Array?i.indices:new Uint32Array(i.indices),"triangles"===r._state.primitiveName&&(r._numTriangles=i.indices.length/3)),r._buildHash(),Cn.meshes++,r._buildVBOs(),r}return P(n,[{key:"type",get:function(){return"ReadableGeometry"}},{key:"isReadableGeometry",get:function(){return!0}},{key:"_buildVBOs",value:function(){var e=this._state,t=this.scene.canvas.gl;if(e.indices&&(e.indicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,e.indices,e.indices.length,1,t.STATIC_DRAW),Cn.indices+=e.indicesBuf.numItems),e.positions&&(e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,e.positions,e.positions.length,3,t.STATIC_DRAW),Cn.positions+=e.positionsBuf.numItems),e.normals){var n=e.compressGeometry;e.normalsBuf=new Pt(t,t.ARRAY_BUFFER,e.normals,e.normals.length,3,t.STATIC_DRAW,n),Cn.normals+=e.normalsBuf.numItems}e.colors&&(e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,e.colors,e.colors.length,4,t.STATIC_DRAW),Cn.colors+=e.colorsBuf.numItems),e.uv&&(e.uvBuf=new Pt(t,t.ARRAY_BUFFER,e.uv,e.uv.length,2,t.STATIC_DRAW),Cn.uvs+=e.uvBuf.numItems)}},{key:"_buildHash",value:function(){var e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positions&&t.push("p"),e.colors&&t.push("c"),(e.normals||e.autoVertexNormals)&&t.push("n"),e.uv&&t.push("u"),e.compressGeometry&&t.push("cp"),t.push(";"),e.hash=t.join("")}},{key:"_getEdgeIndices",value:function(){return this._edgeIndicesBuf||this._buildEdgeIndices(),this._edgeIndicesBuf}},{key:"_getPickTrianglePositions",value:function(){return this._pickTrianglePositionsBuf||this._buildPickTriangleVBOs(),this._pickTrianglePositionsBuf}},{key:"_getPickTriangleColors",value:function(){return this._pickTriangleColorsBuf||this._buildPickTriangleVBOs(),this._pickTriangleColorsBuf}},{key:"_buildEdgeIndices",value:function(){var e=this._state;if(e.positions&&e.indices){var t=this.scene.canvas.gl,n=mn(e.positions,e.indices,e.positionsDecodeMatrix,this._edgeThreshold);this._edgeIndicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,n,n.length,1,t.STATIC_DRAW),Cn.indices+=this._edgeIndicesBuf.numItems}}},{key:"_buildPickTriangleVBOs",value:function(){var e=this._state;if(e.positions&&e.indices){var t=this.scene.canvas.gl,n=$.buildPickTriangles(e.positions,e.indices,e.compressGeometry),r=n.positions,i=n.colors;this._pickTrianglePositionsBuf=new Pt(t,t.ARRAY_BUFFER,r,r.length,3,t.STATIC_DRAW),this._pickTriangleColorsBuf=new Pt(t,t.ARRAY_BUFFER,i,i.length,4,t.STATIC_DRAW,!0),Cn.positions+=this._pickTrianglePositionsBuf.numItems,Cn.colors+=this._pickTriangleColorsBuf.numItems}}},{key:"_buildPickVertexVBOs",value:function(){}},{key:"_webglContextLost",value:function(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextLost()}},{key:"_webglContextRestored",value:function(){this._sceneVertexBufs&&this._sceneVertexBufs.webglContextRestored(),this._buildVBOs(),this._edgeIndicesBuf=null,this._pickVertexPositionsBuf=null,this._pickTrianglePositionsBuf=null,this._pickTriangleColorsBuf=null,this._pickVertexPositionsBuf=null,this._pickVertexColorsBuf=null}},{key:"primitive",get:function(){return this._state.primitiveName}},{key:"compressGeometry",get:function(){return this._state.compressGeometry}},{key:"positions",get:function(){return this._state.positions?this._state.compressGeometry?(this._decompressedPositions||(this._decompressedPositions=new Float32Array(this._state.positions.length),Pn.decompressPositions(this._state.positions,this._state.positionsDecodeMatrix,this._decompressedPositions)),this._decompressedPositions):this._state.positions:null},set:function(e){var t=this._state,n=t.positions;if(n)if(n.length===e.length){if(this._state.compressGeometry){var r=Pn.getPositionsBounds(e),i=Pn.compressPositions(e,r.min,r.max);e=i.quantized,t.positionsDecodeMatrix=i.decodeMatrix}n.set(e),t.positionsBuf&&t.positionsBuf.setData(n),this._setAABBDirty(),this.glRedraw()}else this.error("can't update geometry positions - new positions are wrong length");else this.error("can't update geometry positions - geometry has no positions")}},{key:"normals",get:function(){if(this._state.normals){if(!this._state.compressGeometry)return this._state.normals;if(!this._decompressedNormals){var e=this._state.normals.length,t=e+e/2;this._decompressedNormals=new Float32Array(t),Pn.decompressNormals(this._state.normals,this._decompressedNormals)}return this._decompressedNormals}},set:function(e){if(this._state.compressGeometry)this.error("can't update geometry normals - quantized geometry is immutable");else{var t=this._state,n=t.normals;n?n.length===e.length?(n.set(e),t.normalsBuf&&t.normalsBuf.setData(n),this.glRedraw()):this.error("can't update geometry normals - new normals are wrong length"):this.error("can't update geometry normals - geometry has no normals")}}},{key:"uv",get:function(){return this._state.uv?this._state.compressGeometry?(this._decompressedUV||(this._decompressedUV=new Float32Array(this._state.uv.length),Pn.decompressUVs(this._state.uv,this._state.uvDecodeMatrix,this._decompressedUV)),this._decompressedUV):this._state.uv:null},set:function(e){if(this._state.compressGeometry)this.error("can't update geometry UVs - quantized geometry is immutable");else{var t=this._state,n=t.uv;n?n.length===e.length?(n.set(e),t.uvBuf&&t.uvBuf.setData(n),this.glRedraw()):this.error("can't update geometry UVs - new UVs are wrong length"):this.error("can't update geometry UVs - geometry has no UVs")}}},{key:"colors",get:function(){return this._state.colors},set:function(e){if(this._state.compressGeometry)this.error("can't update geometry colors - quantized geometry is immutable");else{var t=this._state,n=t.colors;n?n.length===e.length?(n.set(e),t.colorsBuf&&t.colorsBuf.setData(n),this.glRedraw()):this.error("can't update geometry colors - new colors are wrong length"):this.error("can't update geometry colors - geometry has no colors")}}},{key:"indices",get:function(){return this._state.indices}},{key:"aabb",get:function(){return this._aabbDirty&&(this._aabb||(this._aabb=$.AABB3()),$.positions3ToAABB3(this._state.positions,this._aabb,this._state.positionsDecodeMatrix),this._aabbDirty=!1),this._aabb}},{key:"obb",get:function(){return this._obbDirty&&(this._obb||(this._obb=$.OBB3()),$.positions3ToAABB3(this._state.positions,_n,this._state.positionsDecodeMatrix),$.AABB3ToOBB3(_n,this._obb),this._obbDirty=!1),this._obb}},{key:"numTriangles",get:function(){return this._numTriangles}},{key:"_setAABBDirty",value:function(){this._aabbDirty||(this._aabbDirty=!0,this._aabbDirty=!0,this._obbDirty=!0)}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this);var e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),this._pickTrianglePositionsBuf&&this._pickTrianglePositionsBuf.destroy(),this._pickTriangleColorsBuf&&this._pickTriangleColorsBuf.destroy(),this._pickVertexPositionsBuf&&this._pickVertexPositionsBuf.destroy(),this._pickVertexColorsBuf&&this._pickVertexColorsBuf.destroy(),e.destroy(),Cn.meshes--}}]),n}();function Bn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var n=e.ySize||1;n<0&&(console.error("negative ySize not allowed - will invert"),n*=-1);var r=e.zSize||1;r<0&&(console.error("negative zSize not allowed - will invert"),r*=-1);var i=e.center,a=i?i[0]:0,s=i?i[1]:0,o=i?i[2]:0,l=-t+a,u=-n+s,c=-r+o,f=t+a,p=n+s,A=r+o;return le.apply(e,{positions:[f,p,A,l,p,A,l,u,A,f,u,A,f,p,A,f,u,A,f,u,c,f,p,c,f,p,A,f,p,c,l,p,c,l,p,A,l,p,A,l,p,c,l,u,c,l,u,A,l,u,c,f,u,c,f,u,A,l,u,A,f,u,c,l,u,c,l,p,c,f,p,c],normals:[0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,-1,0,0,-1,0,0,-1,0,0,-1],uv:[1,0,0,0,0,1,1,1,0,0,0,1,1,1,1,0,1,1,1,0,0,0,0,1,1,0,0,0,0,1,1,1,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]})}var On=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),r=t.call(this,e,i),re.memory.materials++,r}return P(n,[{key:"type",get:function(){return"Material"}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),re.memory.materials--}}]),n}(),Sn={opaque:0,mask:1,blend:2},Nn=["opaque","mask","blend"],Ln=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"PhongMaterial",ambient:$.vec3([1,1,1]),diffuse:$.vec3([1,1,1]),specular:$.vec3([1,1,1]),emissive:$.vec3([0,0,0]),alpha:null,shininess:null,reflectivity:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),r.ambient=i.ambient,r.diffuse=i.diffuse,r.specular=i.specular,r.emissive=i.emissive,r.alpha=i.alpha,r.shininess=i.shininess,r.reflectivity=i.reflectivity,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,i.ambientMap&&(r._ambientMap=r._checkComponent("Texture",i.ambientMap)),i.diffuseMap&&(r._diffuseMap=r._checkComponent("Texture",i.diffuseMap)),i.specularMap&&(r._specularMap=r._checkComponent("Texture",i.specularMap)),i.emissiveMap&&(r._emissiveMap=r._checkComponent("Texture",i.emissiveMap)),i.alphaMap&&(r._alphaMap=r._checkComponent("Texture",i.alphaMap)),i.reflectivityMap&&(r._reflectivityMap=r._checkComponent("Texture",i.reflectivityMap)),i.normalMap&&(r._normalMap=r._checkComponent("Texture",i.normalMap)),i.occlusionMap&&(r._occlusionMap=r._checkComponent("Texture",i.occlusionMap)),i.diffuseFresnel&&(r._diffuseFresnel=r._checkComponent("Fresnel",i.diffuseFresnel)),i.specularFresnel&&(r._specularFresnel=r._checkComponent("Fresnel",i.specularFresnel)),i.emissiveFresnel&&(r._emissiveFresnel=r._checkComponent("Fresnel",i.emissiveFresnel)),i.alphaFresnel&&(r._alphaFresnel=r._checkComponent("Fresnel",i.alphaFresnel)),i.reflectivityFresnel&&(r._reflectivityFresnel=r._checkComponent("Fresnel",i.reflectivityFresnel)),r.alphaMode=i.alphaMode,r.alphaCutoff=i.alphaCutoff,r.backfaces=i.backfaces,r.frontface=i.frontface,r._makeHash(),r}return P(n,[{key:"type",get:function(){return"PhongMaterial"}},{key:"_makeHash",value:function(){var e=this._state,t=["/p"];this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._ambientMap&&(t.push("/am"),this._ambientMap.hasMatrix&&t.push("/mat"),t.push("/"+this._ambientMap.encoding)),this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat"),t.push("/"+this._emissiveMap.encoding)),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),this._reflectivityMap&&(t.push("/rm"),this._reflectivityMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._diffuseFresnel&&t.push("/df"),this._specularFresnel&&t.push("/sf"),this._emissiveFresnel&&t.push("/ef"),this._alphaFresnel&&t.push("/of"),this._reflectivityFresnel&&t.push("/rf"),t.push(";"),e.hash=t.join("")}},{key:"ambient",get:function(){return this._state.ambient},set:function(e){var t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"diffuse",get:function(){return this._state.diffuse},set:function(e){var t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"specular",get:function(){return this._state.specular},set:function(e){var t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}},{key:"shininess",get:function(){return this._state.shininess},set:function(e){this._state.shininess=void 0!==e?e:80,this.glRedraw()}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"reflectivity",get:function(){return this._state.reflectivity},set:function(e){this._state.reflectivity=void 0!==e?e:1,this.glRedraw()}},{key:"normalMap",get:function(){return this._normalMap}},{key:"ambientMap",get:function(){return this._ambientMap}},{key:"diffuseMap",get:function(){return this._diffuseMap}},{key:"specularMap",get:function(){return this._specularMap}},{key:"emissiveMap",get:function(){return this._emissiveMap}},{key:"alphaMap",get:function(){return this._alphaMap}},{key:"reflectivityMap",get:function(){return this._reflectivityMap}},{key:"occlusionMap",get:function(){return this._occlusionMap}},{key:"diffuseFresnel",get:function(){return this._diffuseFresnel}},{key:"specularFresnel",get:function(){return this._specularFresnel}},{key:"emissiveFresnel",get:function(){return this._emissiveFresnel}},{key:"alphaFresnel",get:function(){return this._alphaFresnel}},{key:"reflectivityFresnel",get:function(){return this._reflectivityFresnel}},{key:"alphaMode",get:function(){return Nn[this._state.alphaMode]},set:function(e){var t=Sn[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" - defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}},{key:"alphaCutoff",get:function(){return this._state.alphaCutoff},set:function(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),xn={default:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultWhiteBG:{fill:!0,fillColor:[1,1,1],fillAlpha:.6,edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.2,.2,.2],edgeAlpha:.5,edgeWidth:1},defaultDarkBG:{fill:!0,fillColor:[.4,.4,.4],fillAlpha:.2,edges:!0,edgeColor:[.5,.5,.5],edgeAlpha:.5,edgeWidth:1},phosphorous:{fill:!0,fillColor:[0,0,0],fillAlpha:.4,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:2},sunset:{fill:!0,fillColor:[.9,.9,.6],fillAlpha:.2,edges:!0,edgeColor:[.9,.9,.9],edgeAlpha:.5,edgeWidth:1},vectorscope:{fill:!0,fillColor:[0,0,0],fillAlpha:.7,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:2},battlezone:{fill:!0,fillColor:[0,0,0],fillAlpha:1,edges:!0,edgeColor:[.2,1,.2],edgeAlpha:1,edgeWidth:3},sepia:{fill:!0,fillColor:[.970588207244873,.7965892553329468,.6660899519920349],fillAlpha:.4,edges:!0,edgeColor:[.529411792755127,.4577854573726654,.4100345969200134],edgeAlpha:1,edgeWidth:1},yellowHighlight:{fill:!0,fillColor:[1,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},greenSelected:{fill:!0,fillColor:[0,1,0],fillAlpha:.5,edges:!0,edgeColor:[1,1,1],edgeAlpha:1,edgeWidth:1},gamegrid:{fill:!0,fillColor:[.2,.2,.7],fillAlpha:.9,edges:!0,edgeColor:[.4,.4,1.6],edgeAlpha:.8,edgeWidth:3}},Mn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"EmphasisMaterial",fill:null,fillColor:null,fillAlpha:null,edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null,backfaces:!0,glowThrough:!0}),r._preset="default",i.preset?(r.preset=i.preset,void 0!==i.fill&&(r.fill=i.fill),i.fillColor&&(r.fillColor=i.fillColor),void 0!==i.fillAlpha&&(r.fillAlpha=i.fillAlpha),void 0!==i.edges&&(r.edges=i.edges),i.edgeColor&&(r.edgeColor=i.edgeColor),void 0!==i.edgeAlpha&&(r.edgeAlpha=i.edgeAlpha),void 0!==i.edgeWidth&&(r.edgeWidth=i.edgeWidth),void 0!==i.backfaces&&(r.backfaces=i.backfaces),void 0!==i.glowThrough&&(r.glowThrough=i.glowThrough)):(r.fill=i.fill,r.fillColor=i.fillColor,r.fillAlpha=i.fillAlpha,r.edges=i.edges,r.edgeColor=i.edgeColor,r.edgeAlpha=i.edgeAlpha,r.edgeWidth=i.edgeWidth,r.backfaces=i.backfaces,r.glowThrough=i.glowThrough),r}return P(n,[{key:"type",get:function(){return"EmphasisMaterial"}},{key:"presets",get:function(){return xn}},{key:"fill",get:function(){return this._state.fill},set:function(e){e=!1!==e,this._state.fill!==e&&(this._state.fill=e,this.glRedraw())}},{key:"fillColor",get:function(){return this._state.fillColor},set:function(e){var t=this._state.fillColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.fillColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.4,t[1]=.4,t[2]=.4),this.glRedraw()}},{key:"fillAlpha",get:function(){return this._state.fillAlpha},set:function(e){e=null!=e?e:.2,this._state.fillAlpha!==e&&(this._state.fillAlpha=e,this.glRedraw())}},{key:"edges",get:function(){return this._state.edges},set:function(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}},{key:"edgeColor",get:function(){return this._state.edgeColor},set:function(e){var t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"edgeAlpha",get:function(){return this._state.edgeAlpha},set:function(e){e=null!=e?e:.5,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}},{key:"edgeWidth",get:function(){return this._state.edgeWidth},set:function(e){this._state.edgeWidth=e||1,this.glRedraw()}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"glowThrough",get:function(){return this._state.glowThrough},set:function(e){e=!1!==e,this._state.glowThrough!==e&&(this._state.glowThrough=e,this.glRedraw())}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=xn[e];t?(this.fill=t.fill,this.fillColor=t.fillColor,this.fillAlpha=t.fillAlpha,this.edges=t.edges,this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this.glowThrough=t.glowThrough,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(xn).join(", "))}}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Fn={default:{edgeColor:[0,0,0],edgeAlpha:1,edgeWidth:1},defaultWhiteBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultLightBG:{edgeColor:[.2,.2,.2],edgeAlpha:1,edgeWidth:1},defaultDarkBG:{edgeColor:[.5,.5,.5],edgeAlpha:1,edgeWidth:1}},Hn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"EdgeMaterial",edges:null,edgeColor:null,edgeAlpha:null,edgeWidth:null}),r._preset="default",i.preset?(r.preset=i.preset,i.edgeColor&&(r.edgeColor=i.edgeColor),void 0!==i.edgeAlpha&&(r.edgeAlpha=i.edgeAlpha),void 0!==i.edgeWidth&&(r.edgeWidth=i.edgeWidth)):(r.edgeColor=i.edgeColor,r.edgeAlpha=i.edgeAlpha,r.edgeWidth=i.edgeWidth),r.edges=!1!==i.edges,r}return P(n,[{key:"type",get:function(){return"EdgeMaterial"}},{key:"presets",get:function(){return Fn}},{key:"edges",get:function(){return this._state.edges},set:function(e){e=!1!==e,this._state.edges!==e&&(this._state.edges=e,this.glRedraw())}},{key:"edgeColor",get:function(){return this._state.edgeColor},set:function(e){var t=this._state.edgeColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.edgeColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"edgeAlpha",get:function(){return this._state.edgeAlpha},set:function(e){e=null!=e?e:1,this._state.edgeAlpha!==e&&(this._state.edgeAlpha=e,this.glRedraw())}},{key:"edgeWidth",get:function(){return this._state.edgeWidth},set:function(e){this._state.edgeWidth=e||1,this.glRedraw()}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=Fn[e];t?(this.edgeColor=t.edgeColor,this.edgeAlpha=t.edgeAlpha,this.edgeWidth=t.edgeWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Fn).join(", "))}}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Un={meters:{abbrev:"m"},metres:{abbrev:"m"},centimeters:{abbrev:"cm"},centimetres:{abbrev:"cm"},millimeters:{abbrev:"mm"},millimetres:{abbrev:"mm"},yards:{abbrev:"yd"},feet:{abbrev:"ft"},inches:{abbrev:"in"}},Gn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._units="meters",r._scale=1,r._origin=$.vec3([0,0,0]),r.units=i.units,r.scale=i.scale,r.origin=i.origin,r}return P(n,[{key:"unitsInfo",get:function(){return Un}},{key:"units",get:function(){return this._units},set:function(e){e||(e="meters"),Un[e]||(this.error("Unsupported value for 'units': "+e+" defaulting to 'meters'"),e="meters"),this._units=e,this.fire("units",this._units)}},{key:"scale",get:function(){return this._scale},set:function(e){(e=e||1)<=0?this.error("scale value should be larger than zero"):(this._scale=e,this.fire("scale",this._scale))}},{key:"origin",get:function(){return this._origin},set:function(e){if(!e)return this._origin[0]=0,this._origin[1]=0,void(this._origin[2]=0);this._origin[0]=e[0],this._origin[1]=e[1],this._origin[2]=e[2],this.fire("origin",this._origin)}},{key:"worldToRealPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3(3);t[0]=this._origin[0]+this._scale*e[0],t[1]=this._origin[1]+this._scale*e[1],t[2]=this._origin[2]+this._scale*e[2]}},{key:"realToWorldPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$.vec3(3);return t[0]=(e[0]-this._origin[0])/this._scale,t[1]=(e[1]-this._origin[1])/this._scale,t[2]=(e[2]-this._origin[2])/this._scale,t}}]),n}(),kn=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._supported=vt.SUPPORTED_EXTENSIONS.OES_standard_derivatives,r.enabled=i.enabled,r.kernelRadius=i.kernelRadius,r.intensity=i.intensity,r.bias=i.bias,r.scale=i.scale,r.minResolution=i.minResolution,r.numSamples=i.numSamples,r.blur=i.blur,r.blendCutoff=i.blendCutoff,r.blendFactor=i.blendFactor,r}return P(n,[{key:"supported",get:function(){return this._supported}},{key:"enabled",get:function(){return this._enabled},set:function(e){e=!!e,this._enabled!==e&&(this._enabled=e,this.glRedraw())}},{key:"possible",get:function(){if(!this._supported)return!1;if(!this._enabled)return!1;var e=this.scene.camera.projection;return"customProjection"!==e&&"frustum"!==e}},{key:"active",get:function(){return this._active}},{key:"kernelRadius",get:function(){return this._kernelRadius},set:function(e){null==e&&(e=100),this._kernelRadius!==e&&(this._kernelRadius=e,this.glRedraw())}},{key:"intensity",get:function(){return this._intensity},set:function(e){null==e&&(e=.15),this._intensity!==e&&(this._intensity=e,this.glRedraw())}},{key:"bias",get:function(){return this._bias},set:function(e){null==e&&(e=.5),this._bias!==e&&(this._bias=e,this.glRedraw())}},{key:"scale",get:function(){return this._scale},set:function(e){null==e&&(e=1),this._scale!==e&&(this._scale=e,this.glRedraw())}},{key:"minResolution",get:function(){return this._minResolution},set:function(e){null==e&&(e=0),this._minResolution!==e&&(this._minResolution=e,this.glRedraw())}},{key:"numSamples",get:function(){return this._numSamples},set:function(e){null==e&&(e=10),this._numSamples!==e&&(this._numSamples=e,this.glRedraw())}},{key:"blur",get:function(){return this._blur},set:function(e){e=!1!==e,this._blur!==e&&(this._blur=e,this.glRedraw())}},{key:"blendCutoff",get:function(){return this._blendCutoff},set:function(e){null==e&&(e=.3),this._blendCutoff!==e&&(this._blendCutoff=e,this.glRedraw())}},{key:"blendFactor",get:function(){return this._blendFactor},set:function(e){null==e&&(e=1),this._blendFactor!==e&&(this._blendFactor=e,this.glRedraw())}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this)}}]),n}(),jn={default:{pointSize:4,roundPoints:!0,perspectivePoints:!0},square:{pointSize:4,roundPoints:!1,perspectivePoints:!0},round:{pointSize:4,roundPoints:!0,perspectivePoints:!0}},Vn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"PointsMaterial",pointSize:null,roundPoints:null,perspectivePoints:null,minPerspectivePointSize:null,maxPerspectivePointSize:null,filterIntensity:null,minIntensity:null,maxIntensity:null}),i.preset?(r.preset=i.preset,void 0!==i.pointSize&&(r.pointSize=i.pointSize),void 0!==i.roundPoints&&(r.roundPoints=i.roundPoints),void 0!==i.perspectivePoints&&(r.perspectivePoints=i.perspectivePoints),void 0!==i.minPerspectivePointSize&&(r.minPerspectivePointSize=i.minPerspectivePointSize),void 0!==i.maxPerspectivePointSize&&(r.maxPerspectivePointSize=i.minPerspectivePointSize)):(r._preset="default",r.pointSize=i.pointSize,r.roundPoints=i.roundPoints,r.perspectivePoints=i.perspectivePoints,r.minPerspectivePointSize=i.minPerspectivePointSize,r.maxPerspectivePointSize=i.maxPerspectivePointSize),r.filterIntensity=i.filterIntensity,r.minIntensity=i.minIntensity,r.maxIntensity=i.maxIntensity,r}return P(n,[{key:"type",get:function(){return"PointsMaterial"}},{key:"presets",get:function(){return jn}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||2,this.glRedraw()}},{key:"roundPoints",get:function(){return this._state.roundPoints},set:function(e){e=!1!==e,this._state.roundPoints!==e&&(this._state.roundPoints=e,this.scene._needRecompile=!0,this.glRedraw())}},{key:"perspectivePoints",get:function(){return this._state.perspectivePoints},set:function(e){e=!1!==e,this._state.perspectivePoints!==e&&(this._state.perspectivePoints=e,this.scene._needRecompile=!0,this.glRedraw())}},{key:"minPerspectivePointSize",get:function(){return this._state.minPerspectivePointSize},set:function(e){this._state.minPerspectivePointSize=e||1,this.scene._needRecompile=!0,this.glRedraw()}},{key:"maxPerspectivePointSize",get:function(){return this._state.maxPerspectivePointSize},set:function(e){this._state.maxPerspectivePointSize=e||6,this.scene._needRecompile=!0,this.glRedraw()}},{key:"filterIntensity",get:function(){return this._state.filterIntensity},set:function(e){e=!1!==e,this._state.filterIntensity!==e&&(this._state.filterIntensity=e,this.scene._needRecompile=!0,this.glRedraw())}},{key:"minIntensity",get:function(){return this._state.minIntensity},set:function(e){this._state.minIntensity=null!=e?e:0,this.glRedraw()}},{key:"maxIntensity",get:function(){return this._state.maxIntensity},set:function(e){this._state.maxIntensity=null!=e?e:1,this.glRedraw()}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=jn[e];t?(this.pointSize=t.pointSize,this.roundPoints=t.roundPoints,this.perspectivePoints=t.perspectivePoints,this.minPerspectivePointSize=t.minPerspectivePointSize,this.maxPerspectivePointSize=t.maxPerspectivePointSize,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(jn).join(", "))}}},{key:"hash",get:function(){return[this.pointSize,this.roundPoints,this.perspectivePoints,this.minPerspectivePointSize,this.maxPerspectivePointSize,this.filterIntensity].join(";")}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Qn={default:{lineWidth:1},thick:{lineWidth:2},thicker:{lineWidth:4}},Wn=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"LinesMaterial",lineWidth:null}),i.preset?(r.preset=i.preset,void 0!==i.lineWidth&&(r.lineWidth=i.lineWidth)):(r._preset="default",r.lineWidth=i.lineWidth),r}return P(n,[{key:"type",get:function(){return"LinesMaterial"}},{key:"presets",get:function(){return Qn}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"preset",get:function(){return this._preset},set:function(e){if(e=e||"default",this._preset!==e){var t=Qn[e];t?(this.lineWidth=t.lineWidth,this._preset=e):this.error("unsupported preset: '"+e+"' - supported values are "+Object.keys(Qn).join(", "))}}},{key:"hash",get:function(){return[""+this.lineWidth].join(";")}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}();function zn(e,t){for(var n,r,i={},a=0,s=t.length;a1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),r=t.call(this,null,i);var a=i.canvasElement||document.getElementById(i.canvasId);if(!(a instanceof HTMLCanvasElement))throw"Mandatory config expected: valid canvasId or canvasElement";r._tickifiedFunctions={};var s=!!i.transparent,o=!!i.alphaDepthMask;return r._aabbDirty=!0,r.viewer=e,r.occlusionTestCountdown=0,r.loading=0,r.startTime=(new Date).getTime(),r.models={},r.objects={},r._numObjects=0,r.visibleObjects={},r._numVisibleObjects=0,r.xrayedObjects={},r._numXRayedObjects=0,r.highlightedObjects={},r._numHighlightedObjects=0,r.selectedObjects={},r._numSelectedObjects=0,r.colorizedObjects={},r._numColorizedObjects=0,r.opacityObjects={},r._numOpacityObjects=0,r.offsetObjects={},r._numOffsetObjects=0,r._modelIds=null,r._objectIds=null,r._visibleObjectIds=null,r._xrayedObjectIds=null,r._highlightedObjectIds=null,r._selectedObjectIds=null,r._colorizedObjectIds=null,r._opacityObjectIds=null,r._offsetObjectIds=null,r._collidables={},r._compilables={},r._needRecompile=!1,r.types={},r.components={},r.sectionPlanes={},r.lights={},r.lightMaps={},r.reflectionMaps={},r.bitmaps={},r.lineSets={},r.realWorldOffset=i.realWorldOffset||new Float64Array([0,0,0]),r.canvas=new At(w(r),{dontClear:!0,canvas:a,spinnerElementId:i.spinnerElementId,transparent:s,webgl2:!1!==i.webgl2,contextAttr:i.contextAttr||{},backgroundColor:i.backgroundColor,backgroundColorFromAmbientLight:i.backgroundColorFromAmbientLight,premultipliedAlpha:i.premultipliedAlpha}),r.canvas.on("boundary",(function(){r.glRedraw()})),r.canvas.on("webglContextFailed",(function(){alert("xeokit failed to find WebGL!")})),r._renderer=new Vt(w(r),{transparent:s,alphaDepthMask:o}),r._sectionPlanesState=new function(){this.sectionPlanes=[],this.clippingCaps=!1,this._numCachedSectionPlanes=0;var e=null;this.getHash=function(){if(e)return e;var t=this.getNumAllocatedSectionPlanes();if(this.sectionPlanes,0===t)return this.hash=";";for(var n=[],r=0,i=t;rthis._numCachedSectionPlanes?e:this._numCachedSectionPlanes}},r._sectionPlanesState.setNumCachedSectionPlanes(i.numCachedSectionPlanes||0),r._lightsState=new function(){var e=$.vec4([0,0,0,0]),t=$.vec4();this.lights=[],this.reflectionMaps=[],this.lightMaps=[];var n=null,r=null;this.getHash=function(){if(n)return n;for(var e,t=[],r=this.lights,i=0,a=r.length;i0&&t.push("/lm"),this.reflectionMaps.length>0&&t.push("/rm"),t.push(";"),n=t.join("")},this.addLight=function(e){this.lights.push(e),r=null,n=null},this.removeLight=function(e){for(var t=0,i=this.lights.length;t1&&void 0!==arguments[1])||arguments[1];e.visible?(this.visibleObjects[e.id]=e,this._numVisibleObjects++):(delete this.visibleObjects[e.id],this._numVisibleObjects--),this._visibleObjectIds=null,t&&this.fire("objectVisibility",e,!0)}},{key:"_deRegisterVisibleObject",value:function(e){delete this.visibleObjects[e.id],this._numVisibleObjects--,this._visibleObjectIds=null}},{key:"_objectXRayedUpdated",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.xrayed?(this.xrayedObjects[e.id]=e,this._numXRayedObjects++):(delete this.xrayedObjects[e.id],this._numXRayedObjects--),this._xrayedObjectIds=null,t&&this.fire("objectXRayed",e,!0)}},{key:"_deRegisterXRayedObject",value:function(e){delete this.xrayedObjects[e.id],this._numXRayedObjects--,this._xrayedObjectIds=null}},{key:"_objectHighlightedUpdated",value:function(e){e.highlighted?(this.highlightedObjects[e.id]=e,this._numHighlightedObjects++):(delete this.highlightedObjects[e.id],this._numHighlightedObjects--),this._highlightedObjectIds=null}},{key:"_deRegisterHighlightedObject",value:function(e){delete this.highlightedObjects[e.id],this._numHighlightedObjects--,this._highlightedObjectIds=null}},{key:"_objectSelectedUpdated",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.selected?(this.selectedObjects[e.id]=e,this._numSelectedObjects++):(delete this.selectedObjects[e.id],this._numSelectedObjects--),this._selectedObjectIds=null,t&&this.fire("objectSelected",e,!0)}},{key:"_deRegisterSelectedObject",value:function(e){delete this.selectedObjects[e.id],this._numSelectedObjects--,this._selectedObjectIds=null}},{key:"_objectColorizeUpdated",value:function(e,t){t?(this.colorizedObjects[e.id]=e,this._numColorizedObjects++):(delete this.colorizedObjects[e.id],this._numColorizedObjects--),this._colorizedObjectIds=null}},{key:"_deRegisterColorizedObject",value:function(e){delete this.colorizedObjects[e.id],this._numColorizedObjects--,this._colorizedObjectIds=null}},{key:"_objectOpacityUpdated",value:function(e,t){t?(this.opacityObjects[e.id]=e,this._numOpacityObjects++):(delete this.opacityObjects[e.id],this._numOpacityObjects--),this._opacityObjectIds=null}},{key:"_deRegisterOpacityObject",value:function(e){delete this.opacityObjects[e.id],this._numOpacityObjects--,this._opacityObjectIds=null}},{key:"_objectOffsetUpdated",value:function(e,t){!t||0===t[0]&&0===t[1]&&0===t[2]?(this.offsetObjects[e.id]=e,this._numOffsetObjects++):(delete this.offsetObjects[e.id],this._numOffsetObjects--),this._offsetObjectIds=null}},{key:"_deRegisterOffsetObject",value:function(e){delete this.offsetObjects[e.id],this._numOffsetObjects--,this._offsetObjectIds=null}},{key:"_webglContextLost",value:function(){for(var e in this.canvas.spinner.processes++,this.components)if(this.components.hasOwnProperty(e)){var t=this.components[e];t._webglContextLost&&t._webglContextLost()}this._renderer.webglContextLost()}},{key:"_webglContextRestored",value:function(){var e=this.canvas.gl;for(var t in this.components)if(this.components.hasOwnProperty(t)){var n=this.components[t];n._webglContextRestored&&n._webglContextRestored(e)}this._renderer.webglContextRestored(e),this.canvas.spinner.processes--}},{key:"capabilities",get:function(){return this._renderer.capabilities}},{key:"entityOffsetsEnabled",get:function(){return this._entityOffsetsEnabled}},{key:"pickSurfacePrecisionEnabled",get:function(){return!1}},{key:"logarithmicDepthBufferEnabled",get:function(){return this._logarithmicDepthBufferEnabled}},{key:"numCachedSectionPlanes",get:function(){return this._sectionPlanesState.getNumCachedSectionPlanes()},set:function(e){e=e||0,this._sectionPlanesState.getNumCachedSectionPlanes()!==e&&(this._sectionPlanesState.setNumCachedSectionPlanes(e),this._needRecompile=!0,this.glRedraw())}},{key:"pbrEnabled",get:function(){return this._pbrEnabled},set:function(e){this._pbrEnabled=!!e,this.glRedraw()}},{key:"dtxEnabled",get:function(){return this._dtxEnabled},set:function(e){e=!!e,this._dtxEnabled!==e&&(this._dtxEnabled=e)}},{key:"colorTextureEnabled",get:function(){return this._colorTextureEnabled},set:function(e){this._colorTextureEnabled=!!e,this.glRedraw()}},{key:"doOcclusionTest",value:function(){this._needRecompile&&(this._recompile(),this._needRecompile=!1),this._renderer.doOcclusionTest()}},{key:"render",value:function(e){e&&he.runTasks();var t={sceneId:null,pass:0};if(this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),e||this._renderer.needsRender()){t.sceneId=this.id;var n,r,i=this._passes,a=this._clearEachPass;for(n=0;na&&(a=e[3]),e[4]>s&&(s=e[4]),e[5]>o&&(o=e[5]),u=!0}u||(n=-100,r=-100,i=-100,a=100,s=100,o=100),this._aabb[0]=n,this._aabb[1]=r,this._aabb[2]=i,this._aabb[3]=a,this._aabb[4]=s,this._aabb[5]=o,this._aabbDirty=!1}return this._aabb}},{key:"_setAABBDirty",value:function(){this._aabbDirty=!0,this.fire("boundary")}},{key:"pick",value:function(e,t){if(0===this.canvas.boundary[2]||0===this.canvas.boundary[3])return this.error("Picking not allowed while canvas has zero width or height"),null;(e=e||{}).pickSurface=e.pickSurface||e.rayPick,e.canvasPos||e.matrix||e.origin&&e.direction||this.warn("picking without canvasPos, matrix, or ray origin and direction");var n=e.includeEntities||e.include;n&&(e.includeEntityIds=zn(this,n));var r=e.excludeEntities||e.exclude;return r&&(e.excludeEntityIds=zn(this,r)),this._needRecompile&&(this._recompile(),this._renderer.imageDirty(),this._needRecompile=!1),(t=e.snapToEdge||e.snapToVertex?this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge,t):this._renderer.pick(e,t))&&t.entity&&t.entity.fire&&t.entity.fire("picked",t),t}},{key:"snapPick",value:function(e){return void 0===this._warnSnapPickDeprecated&&(this._warnSnapPickDeprecated=!0,this.warn("Scene.snapPick() is deprecated since v2.4.2 - use Scene.pick() instead")),this._renderer.snapPick(e.canvasPos,e.snapRadius||30,e.snapToVertex,e.snapToEdge)}},{key:"clear",value:function(){var e;for(var t in this.components)this.components.hasOwnProperty(t)&&((e=this.components[t])._dontClear||e.destroy())}},{key:"clearLights",value:function(){for(var e=Object.keys(this.lights),t=0,n=e.length;ts&&(s=t[3]),t[4]>o&&(o=t[4]),t[5]>l&&(l=t[5]),n=!0}})),n){var u=$.AABB3();return u[0]=r,u[1]=i,u[2]=a,u[3]=s,u[4]=o,u[5]=l,u}return this.aabb}},{key:"setObjectsVisible",value:function(e,t){return this.withObjects(e,(function(e){var n=e.visible!==t;return e.visible=t,n}))}},{key:"setObjectsCollidable",value:function(e,t){return this.withObjects(e,(function(e){var n=e.collidable!==t;return e.collidable=t,n}))}},{key:"setObjectsCulled",value:function(e,t){return this.withObjects(e,(function(e){var n=e.culled!==t;return e.culled=t,n}))}},{key:"setObjectsSelected",value:function(e,t){return this.withObjects(e,(function(e){var n=e.selected!==t;return e.selected=t,n}))}},{key:"setObjectsHighlighted",value:function(e,t){return this.withObjects(e,(function(e){var n=e.highlighted!==t;return e.highlighted=t,n}))}},{key:"setObjectsXRayed",value:function(e,t){return this.withObjects(e,(function(e){var n=e.xrayed!==t;return e.xrayed=t,n}))}},{key:"setObjectsEdges",value:function(e,t){return this.withObjects(e,(function(e){var n=e.edges!==t;return e.edges=t,n}))}},{key:"setObjectsColorized",value:function(e,t){return this.withObjects(e,(function(e){e.colorize=t}))}},{key:"setObjectsOpacity",value:function(e,t){return this.withObjects(e,(function(e){var n=e.opacity!==t;return e.opacity=t,n}))}},{key:"setObjectsPickable",value:function(e,t){return this.withObjects(e,(function(e){var n=e.pickable!==t;return e.pickable=t,n}))}},{key:"setObjectsOffset",value:function(e,t){this.withObjects(e,(function(e){e.offset=t}))}},{key:"withObjects",value:function(e,t){le.isString(e)&&(e=[e]);for(var n=!1,r=0,i=e.length;rr&&(r=i,e.apply(void 0,u(n)))}));return this._tickifiedFunctions[t]={tickSubId:s,wrapperFunc:a},a}},{key:"destroy",value:function(){for(var e in d(g(n.prototype),"destroy",this).call(this),this.components)this.components.hasOwnProperty(e)&&this.components[e].destroy();this.canvas.gl=null,this.components=null,this.models=null,this.objects=null,this.visibleObjects=null,this.xrayedObjects=null,this.highlightedObjects=null,this.selectedObjects=null,this.colorizedObjects=null,this.opacityObjects=null,this.sectionPlanes=null,this.lights=null,this.lightMaps=null,this.reflectionMaps=null,this._objectIds=null,this._visibleObjectIds=null,this._xrayedObjectIds=null,this._highlightedObjectIds=null,this._selectedObjectIds=null,this._colorizedObjectIds=null,this.types=null,this.components=null,this.canvas=null,this._renderer=null,this.input=null,this._viewport=null,this._camera=null}}]),n}(),Yn=1e3,Xn=1001,qn=1002,Jn=1003,Zn=1004,$n=1004,er=1005,tr=1005,nr=1006,rr=1007,ir=1007,ar=1008,sr=1008,or=1009,lr=1010,ur=1011,cr=1012,fr=1013,pr=1014,Ar=1015,dr=1016,vr=1017,hr=1018,Ir=1020,yr=1021,mr=1022,wr=1023,gr=1024,Er=1025,Tr=1026,br=1027,Dr=1028,Pr=1029,Cr=1030,_r=1031,Rr=1033,Br=33776,Or=33777,Sr=33778,Nr=33779,Lr=35840,xr=35841,Mr=35842,Fr=35843,Hr=36196,Ur=37492,Gr=37496,kr=37808,jr=37809,Vr=37810,Qr=37811,Wr=37812,zr=37813,Kr=37814,Yr=37815,Xr=37816,qr=37817,Jr=37818,Zr=37819,$r=37820,ei=37821,ti=36492,ni=3e3,ri=3001,ii=1e4,ai=10001,si=10002,oi=10003,li=function(e){"LambertMaterial"===e._material._state.type?(this.vertex=function(e){var t=e.scene,n=e.scene._sectionPlanesState,r=e.scene._lightsState,i=e._geometry._state,a=e._state.billboard,s=e._state.stationary,o=n.getNumAllocatedSectionPlanes()>0,l=!!i.compressGeometry,u=[];u.push("#version 300 es"),u.push("// Lambertian drawing vertex shader"),u.push("in vec3 position;"),u.push("uniform mat4 modelMatrix;"),u.push("uniform mat4 viewMatrix;"),u.push("uniform mat4 projMatrix;"),u.push("uniform vec4 colorize;"),u.push("uniform vec3 offset;"),l&&u.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(u.push("uniform float logDepthBufFC;"),u.push("out float vFragDepth;"),u.push("bool isPerspectiveMatrix(mat4 m) {"),u.push(" return (m[2][3] == - 1.0);"),u.push("}"),u.push("out float isPerspective;"));o&&u.push("out vec4 vWorldPosition;");if(u.push("uniform vec4 lightAmbient;"),u.push("uniform vec4 materialColor;"),u.push("uniform vec3 materialEmissive;"),i.normalsBuf){u.push("in vec3 normal;"),u.push("uniform mat4 modelNormalMatrix;"),u.push("uniform mat4 viewNormalMatrix;");for(var c=0,f=r.lights.length;c= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),u.push(" }"),u.push(" return normalize(v);"),u.push("}"))}u.push("out vec4 vColor;"),"points"===i.primitiveName&&u.push("uniform float pointSize;");"spherical"!==a&&"cylindrical"!==a||(u.push("void billboard(inout mat4 mat) {"),u.push(" mat[0][0] = 1.0;"),u.push(" mat[0][1] = 0.0;"),u.push(" mat[0][2] = 0.0;"),"spherical"===a&&(u.push(" mat[1][0] = 0.0;"),u.push(" mat[1][1] = 1.0;"),u.push(" mat[1][2] = 0.0;")),u.push(" mat[2][0] = 0.0;"),u.push(" mat[2][1] = 0.0;"),u.push(" mat[2][2] =1.0;"),u.push("}"));u.push("void main(void) {"),u.push("vec4 localPosition = vec4(position, 1.0); "),u.push("vec4 worldPosition;"),l&&u.push("localPosition = positionsDecodeMatrix * localPosition;");i.normalsBuf&&(l?u.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):u.push("vec4 localNormal = vec4(normal, 0.0); "),u.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),u.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));u.push("mat4 viewMatrix2 = viewMatrix;"),u.push("mat4 modelMatrix2 = modelMatrix;"),s&&u.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===a||"cylindrical"===a?(u.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),u.push("billboard(modelMatrix2);"),u.push("billboard(viewMatrix2);"),u.push("billboard(modelViewMatrix);"),i.normalsBuf&&(u.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),u.push("billboard(modelNormalMatrix2);"),u.push("billboard(viewNormalMatrix2);"),u.push("billboard(modelViewNormalMatrix);")),u.push("worldPosition = modelMatrix2 * localPosition;"),u.push("worldPosition.xyz = worldPosition.xyz + offset;"),u.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(u.push("worldPosition = modelMatrix2 * localPosition;"),u.push("worldPosition.xyz = worldPosition.xyz + offset;"),u.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));i.normalsBuf&&u.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(u.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),u.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),u.push("float lambertian = 1.0;"),i.normalsBuf)for(var A=0,d=r.lights.length;A0,a=t.gammaOutput,s=[];s.push("#version 300 es"),s.push("// Lambertian drawing fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),t.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;"));if(i){s.push("in vec4 vWorldPosition;"),s.push("uniform bool clippable;");for(var o=0,l=n.getNumAllocatedSectionPlanes();o 0.0) { discard; }"),s.push("}")}"points"===r.primitiveName&&(s.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),s.push("float r = dot(cxy, cxy);"),s.push("if (r > 1.0) {"),s.push(" discard;"),s.push("}"));t.logarithmicDepthBufferEnabled&&s.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");a?s.push("outColor = linearToGamma(vColor, gammaFactor);"):s.push("outColor = vColor;");return s.push("}"),s}(e)):(this.vertex=function(e){var t=e.scene;e._material;var n,r=e._state,i=t._sectionPlanesState,a=e._geometry._state,s=t._lightsState,o=r.billboard,l=r.background,u=r.stationary,c=function(e){if(!e._geometry._state.uvBuf)return!1;var t=e._material;return!!(t._ambientMap||t._occlusionMap||t._baseColorMap||t._diffuseMap||t._alphaMap||t._specularMap||t._glossinessMap||t._specularGlossinessMap||t._emissiveMap||t._metallicMap||t._roughnessMap||t._metallicRoughnessMap||t._reflectivityMap||t._normalMap)}(e),f=fi(e),p=i.getNumAllocatedSectionPlanes()>0,A=ci(e),d=!!a.compressGeometry,v=[];v.push("#version 300 es"),v.push("// Drawing vertex shader"),v.push("in vec3 position;"),d&&v.push("uniform mat4 positionsDecodeMatrix;");v.push("uniform mat4 modelMatrix;"),v.push("uniform mat4 viewMatrix;"),v.push("uniform mat4 projMatrix;"),v.push("out vec3 vViewPosition;"),v.push("uniform vec3 offset;"),p&&v.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(v.push("uniform float logDepthBufFC;"),v.push("out float vFragDepth;"),v.push("bool isPerspectiveMatrix(mat4 m) {"),v.push(" return (m[2][3] == - 1.0);"),v.push("}"),v.push("out float isPerspective;"));s.lightMaps.length>0&&v.push("out vec3 vWorldNormal;");if(f){v.push("in vec3 normal;"),v.push("uniform mat4 modelNormalMatrix;"),v.push("uniform mat4 viewNormalMatrix;"),v.push("out vec3 vViewNormal;");for(var h=0,I=s.lights.length;h= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),v.push(" }"),v.push(" return normalize(v);"),v.push("}"))}c&&(v.push("in vec2 uv;"),v.push("out vec2 vUV;"),d&&v.push("uniform mat3 uvDecodeMatrix;"));a.colors&&(v.push("in vec4 color;"),v.push("out vec4 vColor;"));"points"===a.primitiveName&&v.push("uniform float pointSize;");"spherical"!==o&&"cylindrical"!==o||(v.push("void billboard(inout mat4 mat) {"),v.push(" mat[0][0] = 1.0;"),v.push(" mat[0][1] = 0.0;"),v.push(" mat[0][2] = 0.0;"),"spherical"===o&&(v.push(" mat[1][0] = 0.0;"),v.push(" mat[1][1] = 1.0;"),v.push(" mat[1][2] = 0.0;")),v.push(" mat[2][0] = 0.0;"),v.push(" mat[2][1] = 0.0;"),v.push(" mat[2][2] =1.0;"),v.push("}"));if(A){v.push("const mat4 texUnitConverter = mat4(0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.5, 0.0, 0.5, 0.5, 0.5, 1.0);");for(var y=0,m=s.lights.length;y0&&v.push("vWorldNormal = worldNormal;"),v.push("vViewNormal = normalize((viewNormalMatrix2 * vec4(worldNormal, 1.0)).xyz);"),v.push("vec3 tmpVec3;"),v.push("float lightDist;");for(var w=0,g=s.lights.length;w0,l=fi(e),u=r.uvBuf,c="PhongMaterial"===s.type,f="MetallicMaterial"===s.type,p="SpecularMaterial"===s.type,A=ci(e);t.gammaInput;var d=t.gammaOutput,v=[];v.push("#version 300 es"),v.push("// Drawing fragment shader"),v.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),v.push("precision highp float;"),v.push("precision highp int;"),v.push("#else"),v.push("precision mediump float;"),v.push("precision mediump int;"),v.push("#endif"),t.logarithmicDepthBufferEnabled&&(v.push("in float isPerspective;"),v.push("uniform float logDepthBufFC;"),v.push("in float vFragDepth;"));A&&(v.push("float unpackDepth (vec4 color) {"),v.push(" const vec4 bitShift = vec4(1.0, 1.0/256.0, 1.0/(256.0 * 256.0), 1.0/(256.0*256.0*256.0));"),v.push(" return dot(color, bitShift);"),v.push("}"));v.push("uniform float gammaFactor;"),v.push("vec4 linearToLinear( in vec4 value ) {"),v.push(" return value;"),v.push("}"),v.push("vec4 sRGBToLinear( in vec4 value ) {"),v.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),v.push("}"),v.push("vec4 gammaToLinear( in vec4 value) {"),v.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),v.push("}"),d&&(v.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),v.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),v.push("}"));if(o){v.push("in vec4 vWorldPosition;"),v.push("uniform bool clippable;");for(var h=0;h0&&(v.push("uniform samplerCube lightMap;"),v.push("uniform mat4 viewNormalMatrix;")),a.reflectionMaps.length>0&&v.push("uniform samplerCube reflectionMap;"),(a.lightMaps.length>0||a.reflectionMaps.length>0)&&v.push("uniform mat4 viewMatrix;"),v.push("#define PI 3.14159265359"),v.push("#define RECIPROCAL_PI 0.31830988618"),v.push("#define RECIPROCAL_PI2 0.15915494"),v.push("#define EPSILON 1e-6"),v.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),v.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),v.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),v.push("}"),v.push("struct IncidentLight {"),v.push(" vec3 color;"),v.push(" vec3 direction;"),v.push("};"),v.push("struct ReflectedLight {"),v.push(" vec3 diffuse;"),v.push(" vec3 specular;"),v.push("};"),v.push("struct Geometry {"),v.push(" vec3 position;"),v.push(" vec3 viewNormal;"),v.push(" vec3 worldNormal;"),v.push(" vec3 viewEyeDir;"),v.push("};"),v.push("struct Material {"),v.push(" vec3 diffuseColor;"),v.push(" float specularRoughness;"),v.push(" vec3 specularColor;"),v.push(" float shine;"),v.push("};"),c&&((a.lightMaps.length>0||a.reflectionMaps.length>0)&&(v.push("void computePhongLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.lightMaps.length>0&&(v.push(" vec3 irradiance = "+ui[a.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),v.push(" irradiance *= PI;"),v.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),a.reflectionMaps.length>0&&(v.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),v.push(" vec3 radiance = texture(reflectionMap, reflectVec).rgb * 0.2;"),v.push(" radiance *= PI;"),v.push(" reflectedLight.specular += radiance;")),v.push("}")),v.push("void computePhongLighting(const in IncidentLight directLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),v.push(" float dotNL = saturate(dot(geometry.viewNormal, directLight.direction));"),v.push(" vec3 irradiance = dotNL * directLight.color * PI;"),v.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.specular += directLight.color * material.specularColor * pow(max(dot(reflect(-directLight.direction, -geometry.viewNormal), geometry.viewEyeDir), 0.0), material.shine);"),v.push("}")),(f||p)&&(v.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),v.push(" float r = ggxRoughness + 0.0001;"),v.push(" return (2.0 / (r * r) - 2.0);"),v.push("}"),v.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),v.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),v.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),v.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),v.push("}"),a.reflectionMaps.length>0&&(v.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),v.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),v.push(" vec3 envMapColor = "+ui[a.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),v.push(" return envMapColor;"),v.push("}")),v.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),v.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),v.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),v.push("}"),v.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),v.push(" float a2 = ( alpha * alpha );"),v.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),v.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),v.push(" return 1.0 / ( gl * gv );"),v.push("}"),v.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),v.push(" float a2 = ( alpha * alpha );"),v.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),v.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),v.push(" return 0.5 / max( gv + gl, EPSILON );"),v.push("}"),v.push("float D_GGX(const in float alpha, const in float dotNH) {"),v.push(" float a2 = ( alpha * alpha );"),v.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),v.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),v.push("}"),v.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),v.push(" float alpha = ( roughness * roughness );"),v.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),v.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),v.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),v.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),v.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),v.push(" vec3 F = F_Schlick( specularColor, dotLH );"),v.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),v.push(" float D = D_GGX( alpha, dotNH );"),v.push(" return F * (G * D);"),v.push("}"),v.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),v.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),v.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),v.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),v.push(" vec4 r = roughness * c0 + c1;"),v.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),v.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),v.push(" return specularColor * AB.x + AB.y;"),v.push("}"),(a.lightMaps.length>0||a.reflectionMaps.length>0)&&(v.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),a.lightMaps.length>0&&(v.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),v.push(" irradiance *= PI;"),v.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),a.reflectionMaps.length>0&&(v.push(" vec3 reflectVec = reflect(-geometry.viewEyeDir, geometry.viewNormal);"),v.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),v.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),v.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),v.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),v.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),v.push("}")),v.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),v.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),v.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),v.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),v.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),v.push("}")));v.push("in vec3 vViewPosition;"),r.colors&&v.push("in vec4 vColor;");u&&(l&&n._normalMap||n._ambientMap||n._baseColorMap||n._diffuseMap||n._emissiveMap||n._metallicMap||n._roughnessMap||n._metallicRoughnessMap||n._specularMap||n._glossinessMap||n._specularGlossinessMap||n._occlusionMap||n._alphaMap)&&v.push("in vec2 vUV;");l&&(a.lightMaps.length>0&&v.push("in vec3 vWorldNormal;"),v.push("in vec3 vViewNormal;"));s.ambient&&v.push("uniform vec3 materialAmbient;");s.baseColor&&v.push("uniform vec3 materialBaseColor;");void 0!==s.alpha&&null!==s.alpha&&v.push("uniform vec4 materialAlphaModeCutoff;");s.emissive&&v.push("uniform vec3 materialEmissive;");s.diffuse&&v.push("uniform vec3 materialDiffuse;");void 0!==s.glossiness&&null!==s.glossiness&&v.push("uniform float materialGlossiness;");void 0!==s.shininess&&null!==s.shininess&&v.push("uniform float materialShininess;");s.specular&&v.push("uniform vec3 materialSpecular;");void 0!==s.metallic&&null!==s.metallic&&v.push("uniform float materialMetallic;");void 0!==s.roughness&&null!==s.roughness&&v.push("uniform float materialRoughness;");void 0!==s.specularF0&&null!==s.specularF0&&v.push("uniform float materialSpecularF0;");u&&n._ambientMap&&(v.push("uniform sampler2D ambientMap;"),n._ambientMap._state.matrix&&v.push("uniform mat4 ambientMapMatrix;"));u&&n._baseColorMap&&(v.push("uniform sampler2D baseColorMap;"),n._baseColorMap._state.matrix&&v.push("uniform mat4 baseColorMapMatrix;"));u&&n._diffuseMap&&(v.push("uniform sampler2D diffuseMap;"),n._diffuseMap._state.matrix&&v.push("uniform mat4 diffuseMapMatrix;"));u&&n._emissiveMap&&(v.push("uniform sampler2D emissiveMap;"),n._emissiveMap._state.matrix&&v.push("uniform mat4 emissiveMapMatrix;"));l&&u&&n._metallicMap&&(v.push("uniform sampler2D metallicMap;"),n._metallicMap._state.matrix&&v.push("uniform mat4 metallicMapMatrix;"));l&&u&&n._roughnessMap&&(v.push("uniform sampler2D roughnessMap;"),n._roughnessMap._state.matrix&&v.push("uniform mat4 roughnessMapMatrix;"));l&&u&&n._metallicRoughnessMap&&(v.push("uniform sampler2D metallicRoughnessMap;"),n._metallicRoughnessMap._state.matrix&&v.push("uniform mat4 metallicRoughnessMapMatrix;"));l&&n._normalMap&&(v.push("uniform sampler2D normalMap;"),n._normalMap._state.matrix&&v.push("uniform mat4 normalMapMatrix;"),v.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),v.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),v.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),v.push(" vec2 st0 = dFdx( uv.st );"),v.push(" vec2 st1 = dFdy( uv.st );"),v.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),v.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),v.push(" vec3 N = normalize( surf_norm );"),v.push(" vec3 mapN = texture( normalMap, uv ).xyz * 2.0 - 1.0;"),v.push(" mat3 tsn = mat3( S, T, N );"),v.push(" return normalize( tsn * mapN );"),v.push("}"));u&&n._occlusionMap&&(v.push("uniform sampler2D occlusionMap;"),n._occlusionMap._state.matrix&&v.push("uniform mat4 occlusionMapMatrix;"));u&&n._alphaMap&&(v.push("uniform sampler2D alphaMap;"),n._alphaMap._state.matrix&&v.push("uniform mat4 alphaMapMatrix;"));l&&u&&n._specularMap&&(v.push("uniform sampler2D specularMap;"),n._specularMap._state.matrix&&v.push("uniform mat4 specularMapMatrix;"));l&&u&&n._glossinessMap&&(v.push("uniform sampler2D glossinessMap;"),n._glossinessMap._state.matrix&&v.push("uniform mat4 glossinessMapMatrix;"));l&&u&&n._specularGlossinessMap&&(v.push("uniform sampler2D materialSpecularGlossinessMap;"),n._specularGlossinessMap._state.matrix&&v.push("uniform mat4 materialSpecularGlossinessMapMatrix;"));l&&(n._diffuseFresnel||n._specularFresnel||n._alphaFresnel||n._emissiveFresnel||n._reflectivityFresnel)&&(v.push("float fresnel(vec3 eyeDir, vec3 normal, float edgeBias, float centerBias, float power) {"),v.push(" float fr = abs(dot(eyeDir, normal));"),v.push(" float finalFr = clamp((fr - edgeBias) / (centerBias - edgeBias), 0.0, 1.0);"),v.push(" return pow(finalFr, power);"),v.push("}"),n._diffuseFresnel&&(v.push("uniform float diffuseFresnelCenterBias;"),v.push("uniform float diffuseFresnelEdgeBias;"),v.push("uniform float diffuseFresnelPower;"),v.push("uniform vec3 diffuseFresnelCenterColor;"),v.push("uniform vec3 diffuseFresnelEdgeColor;")),n._specularFresnel&&(v.push("uniform float specularFresnelCenterBias;"),v.push("uniform float specularFresnelEdgeBias;"),v.push("uniform float specularFresnelPower;"),v.push("uniform vec3 specularFresnelCenterColor;"),v.push("uniform vec3 specularFresnelEdgeColor;")),n._alphaFresnel&&(v.push("uniform float alphaFresnelCenterBias;"),v.push("uniform float alphaFresnelEdgeBias;"),v.push("uniform float alphaFresnelPower;"),v.push("uniform vec3 alphaFresnelCenterColor;"),v.push("uniform vec3 alphaFresnelEdgeColor;")),n._reflectivityFresnel&&(v.push("uniform float materialSpecularF0FresnelCenterBias;"),v.push("uniform float materialSpecularF0FresnelEdgeBias;"),v.push("uniform float materialSpecularF0FresnelPower;"),v.push("uniform vec3 materialSpecularF0FresnelCenterColor;"),v.push("uniform vec3 materialSpecularF0FresnelEdgeColor;")),n._emissiveFresnel&&(v.push("uniform float emissiveFresnelCenterBias;"),v.push("uniform float emissiveFresnelEdgeBias;"),v.push("uniform float emissiveFresnelPower;"),v.push("uniform vec3 emissiveFresnelCenterColor;"),v.push("uniform vec3 emissiveFresnelEdgeColor;")));if(v.push("uniform vec4 lightAmbient;"),l)for(var I=0,y=a.lights.length;I 0.0) { discard; }"),v.push("}")}"points"===r.primitiveName&&(v.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),v.push("float r = dot(cxy, cxy);"),v.push("if (r > 1.0) {"),v.push(" discard;"),v.push("}"));v.push("float occlusion = 1.0;"),s.ambient?v.push("vec3 ambientColor = materialAmbient;"):v.push("vec3 ambientColor = vec3(1.0, 1.0, 1.0);");s.diffuse?v.push("vec3 diffuseColor = materialDiffuse;"):s.baseColor?v.push("vec3 diffuseColor = materialBaseColor;"):v.push("vec3 diffuseColor = vec3(1.0, 1.0, 1.0);");r.colors&&v.push("diffuseColor *= vColor.rgb;");s.emissive?v.push("vec3 emissiveColor = materialEmissive;"):v.push("vec3 emissiveColor = vec3(0.0, 0.0, 0.0);");s.specular?v.push("vec3 specular = materialSpecular;"):v.push("vec3 specular = vec3(1.0, 1.0, 1.0);");void 0!==s.alpha?v.push("float alpha = materialAlphaModeCutoff[0];"):v.push("float alpha = 1.0;");r.colors&&v.push("alpha *= vColor.a;");void 0!==s.glossiness?v.push("float glossiness = materialGlossiness;"):v.push("float glossiness = 1.0;");void 0!==s.metallic?v.push("float metallic = materialMetallic;"):v.push("float metallic = 1.0;");void 0!==s.roughness?v.push("float roughness = materialRoughness;"):v.push("float roughness = 1.0;");void 0!==s.specularF0?v.push("float specularF0 = materialSpecularF0;"):v.push("float specularF0 = 1.0;");u&&(l&&n._normalMap||n._ambientMap||n._baseColorMap||n._diffuseMap||n._occlusionMap||n._emissiveMap||n._metallicMap||n._roughnessMap||n._metallicRoughnessMap||n._specularMap||n._glossinessMap||n._specularGlossinessMap||n._alphaMap)&&(v.push("vec4 texturePos = vec4(vUV.s, vUV.t, 1.0, 1.0);"),v.push("vec2 textureCoord;"));u&&n._ambientMap&&(n._ambientMap._state.matrix?v.push("textureCoord = (ambientMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 ambientTexel = texture(ambientMap, textureCoord).rgb;"),v.push("ambientTexel = "+ui[n._ambientMap._state.encoding]+"(ambientTexel);"),v.push("ambientColor *= ambientTexel.rgb;"));u&&n._diffuseMap&&(n._diffuseMap._state.matrix?v.push("textureCoord = (diffuseMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 diffuseTexel = texture(diffuseMap, textureCoord);"),v.push("diffuseTexel = "+ui[n._diffuseMap._state.encoding]+"(diffuseTexel);"),v.push("diffuseColor *= diffuseTexel.rgb;"),v.push("alpha *= diffuseTexel.a;"));u&&n._baseColorMap&&(n._baseColorMap._state.matrix?v.push("textureCoord = (baseColorMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 baseColorTexel = texture(baseColorMap, textureCoord);"),v.push("baseColorTexel = "+ui[n._baseColorMap._state.encoding]+"(baseColorTexel);"),v.push("diffuseColor *= baseColorTexel.rgb;"),v.push("alpha *= baseColorTexel.a;"));u&&n._emissiveMap&&(n._emissiveMap._state.matrix?v.push("textureCoord = (emissiveMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 emissiveTexel = texture(emissiveMap, textureCoord);"),v.push("emissiveTexel = "+ui[n._emissiveMap._state.encoding]+"(emissiveTexel);"),v.push("emissiveColor = emissiveTexel.rgb;"));u&&n._alphaMap&&(n._alphaMap._state.matrix?v.push("textureCoord = (alphaMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("alpha *= texture(alphaMap, textureCoord).r;"));u&&n._occlusionMap&&(n._occlusionMap._state.matrix?v.push("textureCoord = (occlusionMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("occlusion *= texture(occlusionMap, textureCoord).r;"));if(l&&(a.lights.length>0||a.lightMaps.length>0||a.reflectionMaps.length>0)){u&&n._normalMap?(n._normalMap._state.matrix?v.push("textureCoord = (normalMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition, normalize(vViewNormal), textureCoord );")):v.push("vec3 viewNormal = normalize(vViewNormal);"),u&&n._specularMap&&(n._specularMap._state.matrix?v.push("textureCoord = (specularMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("specular *= texture(specularMap, textureCoord).rgb;")),u&&n._glossinessMap&&(n._glossinessMap._state.matrix?v.push("textureCoord = (glossinessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("glossiness *= texture(glossinessMap, textureCoord).r;")),u&&n._specularGlossinessMap&&(n._specularGlossinessMap._state.matrix?v.push("textureCoord = (materialSpecularGlossinessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec4 specGlossRGB = texture(materialSpecularGlossinessMap, textureCoord).rgba;"),v.push("specular *= specGlossRGB.rgb;"),v.push("glossiness *= specGlossRGB.a;")),u&&n._metallicMap&&(n._metallicMap._state.matrix?v.push("textureCoord = (metallicMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("metallic *= texture(metallicMap, textureCoord).r;")),u&&n._roughnessMap&&(n._roughnessMap._state.matrix?v.push("textureCoord = (roughnessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("roughness *= texture(roughnessMap, textureCoord).r;")),u&&n._metallicRoughnessMap&&(n._metallicRoughnessMap._state.matrix?v.push("textureCoord = (metallicRoughnessMapMatrix * texturePos).xy;"):v.push("textureCoord = texturePos.xy;"),v.push("vec3 metalRoughRGB = texture(metallicRoughnessMap, textureCoord).rgb;"),v.push("metallic *= metalRoughRGB.b;"),v.push("roughness *= metalRoughRGB.g;")),v.push("vec3 viewEyeDir = normalize(-vViewPosition);"),n._diffuseFresnel&&(v.push("float diffuseFresnel = fresnel(viewEyeDir, viewNormal, diffuseFresnelEdgeBias, diffuseFresnelCenterBias, diffuseFresnelPower);"),v.push("diffuseColor *= mix(diffuseFresnelEdgeColor, diffuseFresnelCenterColor, diffuseFresnel);")),n._specularFresnel&&(v.push("float specularFresnel = fresnel(viewEyeDir, viewNormal, specularFresnelEdgeBias, specularFresnelCenterBias, specularFresnelPower);"),v.push("specular *= mix(specularFresnelEdgeColor, specularFresnelCenterColor, specularFresnel);")),n._alphaFresnel&&(v.push("float alphaFresnel = fresnel(viewEyeDir, viewNormal, alphaFresnelEdgeBias, alphaFresnelCenterBias, alphaFresnelPower);"),v.push("alpha *= mix(alphaFresnelEdgeColor.r, alphaFresnelCenterColor.r, alphaFresnel);")),n._emissiveFresnel&&(v.push("float emissiveFresnel = fresnel(viewEyeDir, viewNormal, emissiveFresnelEdgeBias, emissiveFresnelCenterBias, emissiveFresnelPower);"),v.push("emissiveColor *= mix(emissiveFresnelEdgeColor, emissiveFresnelCenterColor, emissiveFresnel);")),v.push("if (materialAlphaModeCutoff[1] == 1.0 && alpha < materialAlphaModeCutoff[2]) {"),v.push(" discard;"),v.push("}"),v.push("IncidentLight light;"),v.push("Material material;"),v.push("Geometry geometry;"),v.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),v.push("vec3 viewLightDir;"),c&&(v.push("material.diffuseColor = diffuseColor;"),v.push("material.specularColor = specular;"),v.push("material.shine = materialShininess;")),p&&(v.push("float oneMinusSpecularStrength = 1.0 - max(max(specular.r, specular.g ),specular.b);"),v.push("material.diffuseColor = diffuseColor * oneMinusSpecularStrength;"),v.push("material.specularRoughness = clamp( 1.0 - glossiness, 0.04, 1.0 );"),v.push("material.specularColor = specular;")),f&&(v.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),v.push("material.diffuseColor = diffuseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),v.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),v.push("material.specularColor = mix(vec3(dielectricSpecular), diffuseColor, metallic);")),v.push("geometry.position = vViewPosition;"),a.lightMaps.length>0&&v.push("geometry.worldNormal = normalize(vWorldNormal);"),v.push("geometry.viewNormal = viewNormal;"),v.push("geometry.viewEyeDir = viewEyeDir;"),c&&(a.lightMaps.length>0||a.reflectionMaps.length>0)&&v.push("computePhongLightMapping(geometry, material, reflectedLight);"),(p||f)&&(a.lightMaps.length>0||a.reflectionMaps.length>0)&&v.push("computePBRLightMapping(geometry, material, reflectedLight);"),v.push("float shadow = 1.0;"),v.push("float shadowAcneRemover = 0.007;"),v.push("vec3 fragmentDepth;"),v.push("float texelSize = 1.0 / 1024.0;"),v.push("float amountInLight = 0.0;"),v.push("vec3 shadowCoord;"),v.push("vec4 rgbaDepth;"),v.push("float depth;");for(var E=0,T=a.lights.length;E0)for(var v=r._sectionPlanesState.sectionPlanes,h=t.renderFlags,I=0;I0&&(this._uLightMap="lightMap"),i.reflectionMaps.length>0&&(this._uReflectionMap="reflectionMap"),this._uSectionPlanes=[];for(c=0,f=a.sectionPlanes.length;c0&&a.lightMaps[0].texture&&this._uLightMap&&(o.bindTexture(this._uLightMap,a.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%n,e.bindTexture++),a.reflectionMaps.length>0&&a.reflectionMaps[0].texture&&this._uReflectionMap&&(o.bindTexture(this._uReflectionMap,a.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%n,e.bindTexture++),this._uGammaFactor&&i.uniform1f(this._uGammaFactor,r.gammaFactor),this._baseTextureUnit=e.textureUnit};var hi=P((function e(t){b(this,e),this.vertex=function(e){var t=e.scene,n=t._lightsState,r=function(e){var t=e._geometry._state.primitiveName;if((e._geometry._state.autoVertexNormals||e._geometry._state.normalsBuf)&&("triangles"===t||"triangle-strip"===t||"triangle-fan"===t))return!0;return!1}(e),i=t._sectionPlanesState.getNumAllocatedSectionPlanes()>0,a=!!e._geometry._state.compressGeometry,s=e._state.billboard,o=e._state.stationary,l=[];l.push("#version 300 es"),l.push("// EmphasisFillShaderSource vertex shader"),l.push("in vec3 position;"),l.push("uniform mat4 modelMatrix;"),l.push("uniform mat4 viewMatrix;"),l.push("uniform mat4 projMatrix;"),l.push("uniform vec4 colorize;"),l.push("uniform vec3 offset;"),a&&l.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(l.push("uniform float logDepthBufFC;"),l.push("out float vFragDepth;"),l.push("bool isPerspectiveMatrix(mat4 m) {"),l.push(" return (m[2][3] == - 1.0);"),l.push("}"),l.push("out float isPerspective;"));i&&l.push("out vec4 vWorldPosition;");if(l.push("uniform vec4 lightAmbient;"),l.push("uniform vec4 fillColor;"),r){l.push("in vec3 normal;"),l.push("uniform mat4 modelNormalMatrix;"),l.push("uniform mat4 viewNormalMatrix;");for(var u=0,c=n.lights.length;u= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),l.push(" }"),l.push(" return normalize(v);"),l.push("}"))}l.push("out vec4 vColor;"),("spherical"===s||"cylindrical"===s)&&(l.push("void billboard(inout mat4 mat) {"),l.push(" mat[0][0] = 1.0;"),l.push(" mat[0][1] = 0.0;"),l.push(" mat[0][2] = 0.0;"),"spherical"===s&&(l.push(" mat[1][0] = 0.0;"),l.push(" mat[1][1] = 1.0;"),l.push(" mat[1][2] = 0.0;")),l.push(" mat[2][0] = 0.0;"),l.push(" mat[2][1] = 0.0;"),l.push(" mat[2][2] =1.0;"),l.push("}"));l.push("void main(void) {"),l.push("vec4 localPosition = vec4(position, 1.0); "),l.push("vec4 worldPosition;"),a&&l.push("localPosition = positionsDecodeMatrix * localPosition;");r&&(a?l.push("vec4 localNormal = vec4(octDecode(normal.xy), 0.0); "):l.push("vec4 localNormal = vec4(normal, 0.0); "),l.push("mat4 modelNormalMatrix2 = modelNormalMatrix;"),l.push("mat4 viewNormalMatrix2 = viewNormalMatrix;"));l.push("mat4 viewMatrix2 = viewMatrix;"),l.push("mat4 modelMatrix2 = modelMatrix;"),o&&l.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===s||"cylindrical"===s?(l.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),l.push("billboard(modelMatrix2);"),l.push("billboard(viewMatrix2);"),l.push("billboard(modelViewMatrix);"),r&&(l.push("mat4 modelViewNormalMatrix = viewNormalMatrix2 * modelNormalMatrix2;"),l.push("billboard(modelNormalMatrix2);"),l.push("billboard(viewNormalMatrix2);"),l.push("billboard(modelViewNormalMatrix);")),l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(l.push("worldPosition = modelMatrix2 * localPosition;"),l.push("worldPosition.xyz = worldPosition.xyz + offset;"),l.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));r&&l.push("vec3 viewNormal = normalize((viewNormalMatrix2 * modelNormalMatrix2 * localNormal).xyz);");if(l.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),l.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),l.push("float lambertian = 1.0;"),r)for(var p=0,A=n.lights.length;p0,a=[];a.push("#version 300 es"),a.push("// Lambertian drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));r&&(a.push("uniform float gammaFactor;"),a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(var s=0,o=n.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),a.push("}")}"points"===e._geometry._state.primitiveName&&(a.push("vec2 cxy = 2.0 * gl_PointCoord - 1.0;"),a.push("float r = dot(cxy, cxy);"),a.push("if (r > 1.0) {"),a.push(" discard;"),a.push("}"));t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(t)}));var Ii=new G({}),yi=$.vec3(),mi=function(e,t){this.id=Ii.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new hi(t),this._allocate(t)},wi={};mi.get=function(e){var t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.normalsBuf?"n":"",e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";"),n=wi[t];return n||(n=new mi(t,e),wi[t]=n,re.memory.programs++),n._useCount++,n},mi.prototype.put=function(){0==--this._useCount&&(Ii.removeItem(this.id),this._program&&this._program.destroy(),delete wi[this._hash],re.memory.programs--)},mi.prototype.webglContextRestored=function(){this._program=null},mi.prototype.drawMesh=function(e,t,n){this._program||this._allocate(t);var r=this._scene,i=r.camera,a=r.canvas.gl,s=0===n?t._xrayMaterial._state:1===n?t._highlightMaterial._state:t._selectedMaterial._state,o=t._state,l=t._geometry._state,u=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),a.uniformMatrix4fv(this._uViewMatrix,!1,u?e.getRTCViewMatrix(o.originHash,u):i.viewMatrix),a.uniformMatrix4fv(this._uViewNormalMatrix,!1,i.viewNormalMatrix),o.clippable){var c=r._sectionPlanesState.getNumAllocatedSectionPlanes(),f=r._sectionPlanesState.sectionPlanes.length;if(c>0)for(var p=r._sectionPlanesState.sectionPlanes,A=t.renderFlags,d=0;d0,r=!!e._geometry._state.compressGeometry,i=e._state.billboard,a=e._state.stationary,s=[];s.push("#version 300 es"),s.push("// Edges drawing vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform vec4 edgeColor;"),s.push("uniform vec3 offset;"),r&&s.push("uniform mat4 positionsDecodeMatrix;");t.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"));n&&s.push("out vec4 vWorldPosition;");s.push("out vec4 vColor;"),("spherical"===i||"cylindrical"===i)&&(s.push("void billboard(inout mat4 mat) {"),s.push(" mat[0][0] = 1.0;"),s.push(" mat[0][1] = 0.0;"),s.push(" mat[0][2] = 0.0;"),"spherical"===i&&(s.push(" mat[1][0] = 0.0;"),s.push(" mat[1][1] = 1.0;"),s.push(" mat[1][2] = 0.0;")),s.push(" mat[2][0] = 0.0;"),s.push(" mat[2][1] = 0.0;"),s.push(" mat[2][2] =1.0;"),s.push("}"));s.push("void main(void) {"),s.push("vec4 localPosition = vec4(position, 1.0); "),s.push("vec4 worldPosition;"),r&&s.push("localPosition = positionsDecodeMatrix * localPosition;");s.push("mat4 viewMatrix2 = viewMatrix;"),s.push("mat4 modelMatrix2 = modelMatrix;"),a&&s.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(s.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),s.push("billboard(modelMatrix2);"),s.push("billboard(viewMatrix2);"),s.push("billboard(modelViewMatrix);"),s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));s.push("vColor = edgeColor;"),n&&s.push("vWorldPosition = worldPosition;");s.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return s.push("gl_Position = clipPos;"),s.push("}"),s}(t),this.fragment=function(e){var t=e.scene,n=e.scene._sectionPlanesState,r=e.scene.gammaOutput,i=n.getNumAllocatedSectionPlanes()>0,a=[];a.push("#version 300 es"),a.push("// Edges drawing fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),t.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;"));r&&(a.push("uniform float gammaFactor;"),a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}"));if(i){a.push("in vec4 vWorldPosition;"),a.push("uniform bool clippable;");for(var s=0,o=n.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),a.push("}")}t.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");r?a.push("outColor = linearToGamma(vColor, gammaFactor);"):a.push("outColor = vColor;");return a.push("}"),a}(t)}));var Ei=new G({}),Ti=$.vec3(),bi=function(e,t){this.id=Ei.addItem({}),this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new gi(t),this._allocate(t)},Di={};bi.get=function(e){var t=[e.scene.id,e.scene.gammaOutput?"go":"",e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";"),n=Di[t];return n||(n=new bi(t,e),Di[t]=n,re.memory.programs++),n._useCount++,n},bi.prototype.put=function(){0==--this._useCount&&(Ei.removeItem(this.id),this._program&&this._program.destroy(),delete Di[this._hash],re.memory.programs--)},bi.prototype.webglContextRestored=function(){this._program=null},bi.prototype.drawMesh=function(e,t,n){this._program||this._allocate(t);var r,i,a=this._scene,s=a.camera,o=a.canvas.gl,l=t._state,u=t._geometry,c=u._state,f=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),o.uniformMatrix4fv(this._uViewMatrix,!1,f?e.getRTCViewMatrix(l.originHash,f):s.viewMatrix),l.clippable){var p=a._sectionPlanesState.getNumAllocatedSectionPlanes(),A=a._sectionPlanesState.sectionPlanes.length;if(p>0)for(var d=a._sectionPlanesState.sectionPlanes,v=t.renderFlags,h=0;h0,r=!!e._geometry._state.compressGeometry,i=e._state.billboard,a=e._state.stationary,s=[];s.push("#version 300 es"),s.push("// Mesh picking vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("out vec4 vViewPosition;"),s.push("uniform vec3 offset;"),r&&s.push("uniform mat4 positionsDecodeMatrix;");n&&s.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(s.push("void billboard(inout mat4 mat) {"),s.push(" mat[0][0] = 1.0;"),s.push(" mat[0][1] = 0.0;"),s.push(" mat[0][2] = 0.0;"),"spherical"===i&&(s.push(" mat[1][0] = 0.0;"),s.push(" mat[1][1] = 1.0;"),s.push(" mat[1][2] = 0.0;")),s.push(" mat[2][0] = 0.0;"),s.push(" mat[2][1] = 0.0;"),s.push(" mat[2][2] =1.0;"),s.push("}"));s.push("uniform vec2 pickClipPos;"),s.push("vec4 remapClipPos(vec4 clipPos) {"),s.push(" clipPos.xy /= clipPos.w;"),s.push(" clipPos.xy -= pickClipPos;"),s.push(" clipPos.xy *= clipPos.w;"),s.push(" return clipPos;"),s.push("}"),s.push("void main(void) {"),s.push("vec4 localPosition = vec4(position, 1.0); "),r&&s.push("localPosition = positionsDecodeMatrix * localPosition;");s.push("mat4 viewMatrix2 = viewMatrix;"),s.push("mat4 modelMatrix2 = modelMatrix;"),a&&s.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"!==i&&"cylindrical"!==i||(s.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),s.push("billboard(modelMatrix2);"),s.push("billboard(viewMatrix2);"));s.push(" vec4 worldPosition = modelMatrix2 * localPosition;"),s.push(" worldPosition.xyz = worldPosition.xyz + offset;"),s.push(" vec4 viewPosition = viewMatrix2 * worldPosition;"),n&&s.push(" vWorldPosition = worldPosition;");s.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return s.push("gl_Position = remapClipPos(clipPos);"),s.push("}"),s}(t),this.fragment=function(e){var t=e.scene,n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(i.push("uniform vec4 pickColor;"),r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = pickColor; "),i.push("}"),i}(t)}));var Ci=$.vec3(),_i=function(e,t){this._hash=e,this._shaderSource=new Pi(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Ri={};_i.get=function(e){var t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";"),n=Ri[t];if(!n){if((n=new _i(t,e)).errors)return console.log(n.errors.join("\n")),null;Ri[t]=n,re.memory.programs++}return n._useCount++,n},_i.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ri[this._hash],re.memory.programs--)},_i.prototype.webglContextRestored=function(){this._program=null},_i.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene,r=n.canvas.gl,i=t._state,a=t._material._state,s=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCPickViewMatrix(i.originHash,o):e.pickViewMatrix),i.clippable){var l=n._sectionPlanesState.getNumAllocatedSectionPlanes(),u=n._sectionPlanesState.sectionPlanes.length;if(l>0)for(var c=n._sectionPlanesState.sectionPlanes,f=t.renderFlags,p=0;p>24&255,g=m>>16&255,E=m>>8&255,T=255&m;r.uniform4f(this._uPickColor,T/255,E/255,g/255,w/255),r.uniform2fv(this._uPickClipPos,e.pickClipPos),s.indicesBuf?(r.drawElements(s.primitive,s.indicesBuf.numItems,s.indicesBuf.itemType,0),e.drawElements++):s.positions&&r.drawArrays(r.TRIANGLES,0,s.positions.numItems)},_i.prototype._allocate=function(e){var t=e.scene,n=t.canvas.gl;if(this._program=new Dt(n,this._shaderSource),this._program.errors)this.errors=this._program.errors;else{var r=this._program;this._uPositionsDecodeMatrix=r.getLocation("positionsDecodeMatrix"),this._uModelMatrix=r.getLocation("modelMatrix"),this._uViewMatrix=r.getLocation("viewMatrix"),this._uProjMatrix=r.getLocation("projMatrix"),this._uSectionPlanes=[];for(var i=0,a=t._sectionPlanesState.sectionPlanes.length;i0,r=!!e._geometry._state.compressGeometry,i=[];i.push("#version 300 es"),i.push("// Surface picking vertex shader"),i.push("in vec3 position;"),i.push("in vec4 color;"),i.push("uniform mat4 modelMatrix;"),i.push("uniform mat4 viewMatrix;"),i.push("uniform mat4 projMatrix;"),i.push("uniform vec3 offset;"),n&&(i.push("uniform bool clippable;"),i.push("out vec4 vWorldPosition;"));t.logarithmicDepthBufferEnabled&&(i.push("uniform float logDepthBufFC;"),i.push("out float vFragDepth;"),i.push("bool isPerspectiveMatrix(mat4 m) {"),i.push(" return (m[2][3] == - 1.0);"),i.push("}"),i.push("out float isPerspective;"));i.push("uniform vec2 pickClipPos;"),i.push("vec4 remapClipPos(vec4 clipPos) {"),i.push(" clipPos.xy /= clipPos.w;"),i.push(" clipPos.xy -= pickClipPos;"),i.push(" clipPos.xy *= clipPos.w;"),i.push(" return clipPos;"),i.push("}"),i.push("out vec4 vColor;"),r&&i.push("uniform mat4 positionsDecodeMatrix;");i.push("void main(void) {"),i.push("vec4 localPosition = vec4(position, 1.0); "),r&&i.push("localPosition = positionsDecodeMatrix * localPosition;");i.push(" vec4 worldPosition = modelMatrix * localPosition; "),i.push(" worldPosition.xyz = worldPosition.xyz + offset;"),i.push(" vec4 viewPosition = viewMatrix * worldPosition;"),n&&i.push(" vWorldPosition = worldPosition;");i.push(" vColor = color;"),i.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(i.push("vFragDepth = 1.0 + clipPos.w;"),i.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return i.push("gl_Position = remapClipPos(clipPos);"),i.push("}"),i}(t),this.fragment=function(e){var t=e.scene,n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Surface picking fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),i.push("in vec4 vColor;"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push(" outColor = vColor;"),i.push("}"),i}(t)}));var Oi=$.vec3(),Si=function(e,t){this._hash=e,this._scene=t.scene,this._useCount=0,this._shaderSource=new Bi(t),this._allocate(t)},Ni={};Si.get=function(e){var t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.compressGeometry?"cp":"",e._state.hash].join(";"),n=Ni[t];if(!n){if((n=new Si(t,e)).errors)return console.log(n.errors.join("\n")),null;Ni[t]=n,re.memory.programs++}return n._useCount++,n},Si.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Ni[this._hash],re.memory.programs--)},Si.prototype.webglContextRestored=function(){this._program=null},Si.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene,r=n.canvas.gl,i=t._state,a=t._material._state,s=t._geometry,o=t._geometry._state,l=t.origin,u=a.backfaces,c=a.frontface,f=n.camera.project,p=s._getPickTrianglePositions(),A=s._getPickTriangleColors();if(this._program.bind(),e.useProgram++,n.logarithmicDepthBufferEnabled){var d=2/(Math.log(f.far+1)/Math.LN2);r.uniform1f(this._uLogDepthBufFC,d)}if(r.uniformMatrix4fv(this._uViewMatrix,!1,l?e.getRTCPickViewMatrix(i.originHash,l):e.pickViewMatrix),i.clippable){var v=n._sectionPlanesState.getNumAllocatedSectionPlanes(),h=n._sectionPlanesState.sectionPlanes.length;if(v>0)for(var I=n._sectionPlanesState.sectionPlanes,y=t.renderFlags,m=0;m0,r=!!e._geometry._state.compressGeometry,i=e._state.billboard,a=e._state.stationary,s=[];s.push("#version 300 es"),s.push("// Mesh occlusion vertex shader"),s.push("in vec3 position;"),s.push("uniform mat4 modelMatrix;"),s.push("uniform mat4 viewMatrix;"),s.push("uniform mat4 projMatrix;"),s.push("uniform vec3 offset;"),r&&s.push("uniform mat4 positionsDecodeMatrix;");n&&s.push("out vec4 vWorldPosition;");t.logarithmicDepthBufferEnabled&&(s.push("uniform float logDepthBufFC;"),s.push("out float vFragDepth;"),s.push("bool isPerspectiveMatrix(mat4 m) {"),s.push(" return (m[2][3] == - 1.0);"),s.push("}"),s.push("out float isPerspective;"));"spherical"!==i&&"cylindrical"!==i||(s.push("void billboard(inout mat4 mat) {"),s.push(" mat[0][0] = 1.0;"),s.push(" mat[0][1] = 0.0;"),s.push(" mat[0][2] = 0.0;"),"spherical"===i&&(s.push(" mat[1][0] = 0.0;"),s.push(" mat[1][1] = 1.0;"),s.push(" mat[1][2] = 0.0;")),s.push(" mat[2][0] = 0.0;"),s.push(" mat[2][1] = 0.0;"),s.push(" mat[2][2] =1.0;"),s.push("}"));s.push("void main(void) {"),s.push("vec4 localPosition = vec4(position, 1.0); "),s.push("vec4 worldPosition;"),r&&s.push("localPosition = positionsDecodeMatrix * localPosition;");s.push("mat4 viewMatrix2 = viewMatrix;"),s.push("mat4 modelMatrix2 = modelMatrix;"),a&&s.push("viewMatrix2[3][0] = viewMatrix2[3][1] = viewMatrix2[3][2] = 0.0;");"spherical"===i||"cylindrical"===i?(s.push("mat4 modelViewMatrix = viewMatrix2 * modelMatrix2;"),s.push("billboard(modelMatrix2);"),s.push("billboard(viewMatrix2);"),s.push("billboard(modelViewMatrix);"),s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = modelViewMatrix * localPosition;")):(s.push("worldPosition = modelMatrix2 * localPosition;"),s.push("worldPosition.xyz = worldPosition.xyz + offset;"),s.push("vec4 viewPosition = viewMatrix2 * worldPosition; "));n&&s.push(" vWorldPosition = worldPosition;");s.push("vec4 clipPos = projMatrix * viewPosition;"),t.logarithmicDepthBufferEnabled&&(s.push("vFragDepth = 1.0 + clipPos.w;"),s.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"));return s.push("gl_Position = clipPos;"),s.push("}"),s}(t),this.fragment=function(e){var t=e.scene,n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];i.push("#version 300 es"),i.push("// Mesh occlusion fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),t.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;"));if(r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}i.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),t.logarithmicDepthBufferEnabled&&i.push("gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");return i.push("}"),i}(t)}));var xi=$.vec3(),Mi=function(e,t){this._hash=e,this._shaderSource=new Li(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Fi={};Mi.get=function(e){var t=[e.scene.canvas.canvas.id,e.scene._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.occlusionHash].join(";"),n=Fi[t];if(!n){if((n=new Mi(t,e)).errors)return console.log(n.errors.join("\n")),null;Fi[t]=n,re.memory.programs++}return n._useCount++,n},Mi.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Fi[this._hash],re.memory.programs--)},Mi.prototype.webglContextRestored=function(){this._program=null},Mi.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene,r=n.canvas.gl,i=t._material._state,a=t._state,s=t._geometry._state,o=t.origin;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),i.id!==this._lastMaterialId){var l=i.backfaces;e.backfaces!==l&&(l?r.disable(r.CULL_FACE):r.enable(r.CULL_FACE),e.backfaces=l);var u=i.frontface;e.frontface!==u&&(u?r.frontFace(r.CCW):r.frontFace(r.CW),e.frontface=u),this._lastMaterialId=i.id}var c=n.camera;if(r.uniformMatrix4fv(this._uViewMatrix,!1,o?e.getRTCViewMatrix(a.originHash,o):c.viewMatrix),a.clippable){var f=n._sectionPlanesState.getNumAllocatedSectionPlanes(),p=n._sectionPlanesState.sectionPlanes.length;if(f>0)for(var A=n._sectionPlanesState.sectionPlanes,d=t.renderFlags,v=0;v0,n=!!e._geometry._state.compressGeometry,r=[];r.push("// Mesh shadow vertex shader"),r.push("in vec3 position;"),r.push("uniform mat4 modelMatrix;"),r.push("uniform mat4 shadowViewMatrix;"),r.push("uniform mat4 shadowProjMatrix;"),r.push("uniform vec3 offset;"),n&&r.push("uniform mat4 positionsDecodeMatrix;");t&&r.push("out vec4 vWorldPosition;");r.push("void main(void) {"),r.push("vec4 localPosition = vec4(position, 1.0); "),r.push("vec4 worldPosition;"),n&&r.push("localPosition = positionsDecodeMatrix * localPosition;");r.push("worldPosition = modelMatrix * localPosition;"),r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&r.push("vWorldPosition = worldPosition;");return r.push(" gl_Position = shadowProjMatrix * viewPosition;"),r.push("}"),r}(t),this.fragment=function(e){var t=e.scene;t.canvas.gl;var n=t._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("// Mesh shadow fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),r){i.push("uniform bool clippable;"),i.push("in vec4 vWorldPosition;");for(var a=0;a 0.0) { discard; }"),i.push("}")}return i.push("outColor = encodeFloat(gl_FragCoord.z);"),i.push("}"),i}(t)}));var Ui=function(e,t){this._hash=e,this._shaderSource=new Hi(t),this._scene=t.scene,this._useCount=0,this._allocate(t)},Gi={};Ui.get=function(e){var t=e.scene,n=[t.canvas.canvas.id,t._sectionPlanesState.getHash(),e._geometry._state.hash,e._state.hash].join(";"),r=Gi[n];if(!r){if((r=new Ui(n,e)).errors)return console.log(r.errors.join("\n")),null;Gi[n]=r,re.memory.programs++}return r._useCount++,r},Ui.prototype.put=function(){0==--this._useCount&&(this._program&&this._program.destroy(),delete Gi[this._hash],re.memory.programs--)},Ui.prototype.webglContextRestored=function(){this._program=null},Ui.prototype.drawMesh=function(e,t){this._program||this._allocate(t);var n=this._scene.canvas.gl,r=t._material._state,i=t._geometry._state;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),r.id!==this._lastMaterialId){var a=r.backfaces;e.backfaces!==a&&(a?n.disable(n.CULL_FACE):n.enable(n.CULL_FACE),e.backfaces=a);var s=r.frontface;e.frontface!==s&&(s?n.frontFace(n.CCW):n.frontFace(n.CW),e.frontface=s),e.lineWidth!==r.lineWidth&&(n.lineWidth(r.lineWidth),e.lineWidth=r.lineWidth),this._uPointSize&&n.uniform1i(this._uPointSize,r.pointSize),this._lastMaterialId=r.id}if(n.uniformMatrix4fv(this._uModelMatrix,n.FALSE,t.worldMatrix),i.combineGeometry){var o=t.vertexBufs;o.id!==this._lastVertexBufsId&&(o.positionsBuf&&this._aPosition&&(this._aPosition.bindArrayBuffer(o.positionsBuf,o.compressGeometry?n.UNSIGNED_SHORT:n.FLOAT),e.bindArray++),this._lastVertexBufsId=o.id)}this._uClippable&&n.uniform1i(this._uClippable,t._state.clippable),n.uniform3fv(this._uOffset,t._state.offset),i.id!==this._lastGeometryId&&(this._uPositionsDecodeMatrix&&n.uniformMatrix4fv(this._uPositionsDecodeMatrix,!1,i.positionsDecodeMatrix),i.combineGeometry?i.indicesBufCombined&&(i.indicesBufCombined.bind(),e.bindArray++):(this._aPosition&&(this._aPosition.bindArrayBuffer(i.positionsBuf,i.compressGeometry?n.UNSIGNED_SHORT:n.FLOAT),e.bindArray++),i.indicesBuf&&(i.indicesBuf.bind(),e.bindArray++)),this._lastGeometryId=i.id),i.combineGeometry?i.indicesBufCombined&&(n.drawElements(i.primitive,i.indicesBufCombined.numItems,i.indicesBufCombined.itemType,0),e.drawElements++):i.indicesBuf?(n.drawElements(i.primitive,i.indicesBuf.numItems,i.indicesBuf.itemType,0),e.drawElements++):i.positions&&(n.drawArrays(n.TRIANGLES,0,i.positions.numItems),e.drawArrays++)},Ui.prototype._allocate=function(e){var t=e.scene,n=t.canvas.gl;if(this._program=new Dt(n,this._shaderSource),this._scene=t,this._useCount=0,this._program.errors)this.errors=this._program.errors;else{var r=this._program;this._uPositionsDecodeMatrix=r.getLocation("positionsDecodeMatrix"),this._uModelMatrix=r.getLocation("modelMatrix"),this._uShadowViewMatrix=r.getLocation("shadowViewMatrix"),this._uShadowProjMatrix=r.getLocation("shadowProjMatrix"),this._uSectionPlanes={};for(var i=0,a=t._sectionPlanesState.sectionPlanes.length;i0)for(var i,a,s,o=0,l=this._uSectionPlanes.length;o1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i)).originalSystemId=i.originalSystemId||r.id,r.renderFlags=new ki,r._state=new zt({visible:!0,culled:!1,pickable:null,clippable:null,collidable:null,occluder:!1!==i.occluder,castsShadow:null,receivesShadow:null,xrayed:!1,highlighted:!1,selected:!1,edges:!1,stationary:!!i.stationary,background:!!i.background,billboard:r._checkBillboard(i.billboard),layer:null,colorize:null,pickID:r.scene._renderer.getPickID(w(r)),drawHash:"",pickHash:"",offset:$.vec3(),origin:null,originHash:null}),r._drawRenderer=null,r._shadowRenderer=null,r._emphasisFillRenderer=null,r._emphasisEdgesRenderer=null,r._pickMeshRenderer=null,r._pickTriangleRenderer=null,r._occlusionRenderer=null,r._geometry=i.geometry?r._checkComponent2(["ReadableGeometry","VBOGeometry"],i.geometry):r.scene.geometry,r._material=i.material?r._checkComponent2(["PhongMaterial","MetallicMaterial","SpecularMaterial","LambertMaterial"],i.material):r.scene.material,r._xrayMaterial=i.xrayMaterial?r._checkComponent("EmphasisMaterial",i.xrayMaterial):r.scene.xrayMaterial,r._highlightMaterial=i.highlightMaterial?r._checkComponent("EmphasisMaterial",i.highlightMaterial):r.scene.highlightMaterial,r._selectedMaterial=i.selectedMaterial?r._checkComponent("EmphasisMaterial",i.selectedMaterial):r.scene.selectedMaterial,r._edgeMaterial=i.edgeMaterial?r._checkComponent("EdgeMaterial",i.edgeMaterial):r.scene.edgeMaterial,r._parentNode=null,r._aabb=null,r._aabbDirty=!0,r._numTriangles=r._geometry?r._geometry.numTriangles:0,r.scene._aabbDirty=!0,r._scale=$.vec3(),r._quaternion=$.identityQuaternion(),r._rotation=$.vec3(),r._position=$.vec3(),r._worldMatrix=$.identityMat4(),r._worldNormalMatrix=$.identityMat4(),r._localMatrixDirty=!0,r._worldMatrixDirty=!0,r._worldNormalMatrixDirty=!0;var a=i.origin||i.rtcCenter;if(a&&(r._state.origin=$.vec3(a),r._state.originHash=a.join()),i.matrix?r.matrix=i.matrix:(r.scale=i.scale,r.position=i.position,i.quaternion||(r.rotation=i.rotation)),r._isObject=i.isObject,r._isObject&&r.scene._registerObject(w(r)),r._isModel=i.isModel,r._isModel&&r.scene._registerModel(w(r)),r.visible=i.visible,r.culled=i.culled,r.pickable=i.pickable,r.clippable=i.clippable,r.collidable=i.collidable,r.castsShadow=i.castsShadow,r.receivesShadow=i.receivesShadow,r.xrayed=i.xrayed,r.highlighted=i.highlighted,r.selected=i.selected,r.edges=i.edges,r.layer=i.layer,r.colorize=i.colorize,r.opacity=i.opacity,r.offset=i.offset,i.parentId){var s=r.scene.components[i.parentId];s?s.isNode?s.addChild(w(r)):r.error("Parent is not a Node: '"+i.parentId+"'"):r.error("Parent not found: '"+i.parentId+"'"),r._parentNode=s}else i.parent&&(i.parent.isNode||r.error("Parent is not a Node"),i.parent.addChild(w(r)),r._parentNode=i.parent);return r.compile(),r}return P(n,[{key:"type",get:function(){return"Mesh"}},{key:"isMesh",get:function(){return!0}},{key:"parent",get:function(){return this._parentNode}},{key:"geometry",get:function(){return this._geometry}},{key:"material",get:function(){return this._material}},{key:"position",get:function(){return this._position},set:function(e){this._position.set(e||[0,0,0]),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"rotation",get:function(){return this._rotation},set:function(e){this._rotation.set(e||[0,0,0]),$.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"quaternion",get:function(){return this._quaternion},set:function(e){this._quaternion.set(e||[0,0,0,1]),$.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"scale",get:function(){return this._scale},set:function(e){this._scale.set(e||[1,1,1]),this._setLocalMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"matrix",get:function(){return this._localMatrixDirty&&(this.__localMatrix||(this.__localMatrix=$.identityMat4()),$.composeMat4(this._position,this._quaternion,this._scale,this.__localMatrix),this._localMatrixDirty=!1),this.__localMatrix},set:function(e){this.__localMatrix||(this.__localMatrix=$.identityMat4()),this.__localMatrix.set(e||Ji),$.decomposeMat4(this.__localMatrix,this._position,this._quaternion,this._scale),this._localMatrixDirty=!1,this._setWorldMatrixDirty(),this._setAABBDirty(),this.glRedraw()}},{key:"worldMatrix",get:function(){return this._worldMatrixDirty&&this._buildWorldMatrix(),this._worldMatrix}},{key:"worldNormalMatrix",get:function(){return this._worldNormalMatrixDirty&&this._buildWorldNormalMatrix(),this._worldNormalMatrix}},{key:"isEntity",get:function(){return!0}},{key:"isModel",get:function(){return this._isModel}},{key:"isObject",get:function(){return this._isObject}},{key:"aabb",get:function(){return this._aabbDirty&&this._updateAABB(),this._aabb}},{key:"origin",get:function(){return this._state.origin},set:function(e){e?(this._state.origin||(this._state.origin=$.vec3()),this._state.origin.set(e),this._state.originHash=e.join(),this._setAABBDirty(),this.scene._aabbDirty=!0):this._state.origin&&(this._state.origin=null,this._state.originHash=null,this._setAABBDirty(),this.scene._aabbDirty=!0)}},{key:"rtcCenter",get:function(){return this.origin},set:function(e){this.origin=e}},{key:"numTriangles",get:function(){return this._numTriangles}},{key:"visible",get:function(){return this._state.visible},set:function(e){e=!1!==e,this._state.visible=e,this._isObject&&this.scene._objectVisibilityUpdated(this,e),this.glRedraw()}},{key:"xrayed",get:function(){return this._state.xrayed},set:function(e){e=!!e,this._state.xrayed!==e&&(this._state.xrayed=e,this._isObject&&this.scene._objectXRayedUpdated(this,e),this.glRedraw())}},{key:"highlighted",get:function(){return this._state.highlighted},set:function(e){(e=!!e)!==this._state.highlighted&&(this._state.highlighted=e,this._isObject&&this.scene._objectHighlightedUpdated(this,e),this.glRedraw())}},{key:"selected",get:function(){return this._state.selected},set:function(e){(e=!!e)!==this._state.selected&&(this._state.selected=e,this._isObject&&this.scene._objectSelectedUpdated(this,e),this.glRedraw())}},{key:"edges",get:function(){return this._state.edges},set:function(e){(e=!!e)!==this._state.edges&&(this._state.edges=e,this.glRedraw())}},{key:"culled",get:function(){return this._state.culled},set:function(e){this._state.culled=!!e,this.glRedraw()}},{key:"clippable",get:function(){return this._state.clippable},set:function(e){e=!1!==e,this._state.clippable!==e&&(this._state.clippable=e,this.glRedraw())}},{key:"collidable",get:function(){return this._state.collidable},set:function(e){(e=!1!==e)!==this._state.collidable&&(this._state.collidable=e,this._setAABBDirty(),this.scene._aabbDirty=!0)}},{key:"pickable",get:function(){return this._state.pickable},set:function(e){e=!1!==e,this._state.pickable!==e&&(this._state.pickable=e)}},{key:"castsShadow",get:function(){return this._state.castsShadow},set:function(e){(e=!1!==e)!==this._state.castsShadow&&(this._state.castsShadow=e,this.glRedraw())}},{key:"receivesShadow",get:function(){return this._state.receivesShadow},set:function(e){(e=!1!==e)!==this._state.receivesShadow&&(this._state.receivesShadow=e,this._state.hash=e?"/mod/rs;":"/mod;",this.fire("dirty",this))}},{key:"saoEnabled",get:function(){return!1}},{key:"colorize",get:function(){return this._state.colorize},set:function(e){var t=this._state.colorize;t||((t=this._state.colorize=new Float32Array(4))[3]=1),e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1);var n=!!e;this.scene._objectColorizeUpdated(this,n),this.glRedraw()}},{key:"opacity",get:function(){return this._state.colorize[3]},set:function(e){var t=this._state.colorize;t||((t=this._state.colorize=new Float32Array(4))[0]=1,t[1]=1,t[2]=1);var n=null!=e;t[3]=n?e:1,this.scene._objectOpacityUpdated(this,n),this.glRedraw()}},{key:"transparent",get:function(){return 2===this._material.alphaMode||this._state.colorize[3]<1}},{key:"layer",get:function(){return this._state.layer},set:function(e){e=e||0,(e=Math.round(e))!==this._state.layer&&(this._state.layer=e,this._renderer.needStateSort())}},{key:"stationary",get:function(){return this._state.stationary}},{key:"billboard",get:function(){return this._state.billboard}},{key:"offset",get:function(){return this._state.offset},set:function(e){this._state.offset.set(e||[0,0,0]),this._setAABBDirty(),this.glRedraw()}},{key:"isDrawable",get:function(){return!0}},{key:"isStateSortable",get:function(){return!0}},{key:"xrayMaterial",get:function(){return this._xrayMaterial}},{key:"highlightMaterial",get:function(){return this._highlightMaterial}},{key:"selectedMaterial",get:function(){return this._selectedMaterial}},{key:"edgeMaterial",get:function(){return this._edgeMaterial}},{key:"_checkBillboard",value:function(e){return"spherical"!==(e=e||"none")&&"cylindrical"!==e&&"none"!==e&&(this.error("Unsupported value for 'billboard': "+e+" - accepted values are 'spherical', 'cylindrical' and 'none' - defaulting to 'none'."),e="none"),e}},{key:"compile",value:function(){var e=this._makeDrawHash();this._state.drawHash!==e&&(this._state.drawHash=e,this._putDrawRenderers(),this._drawRenderer=di.get(this),this._emphasisFillRenderer=mi.get(this),this._emphasisEdgesRenderer=bi.get(this));var t=this._makePickHash();if(this._state.pickHash!==t&&(this._state.pickHash=t,this._putPickRenderers(),this._pickMeshRenderer=_i.get(this)),this._state.occluder){var n=this._makeOcclusionHash();this._state.occlusionHash!==n&&(this._state.occlusionHash=n,this._putOcclusionRenderer(),this._occlusionRenderer=Mi.get(this))}}},{key:"_setLocalMatrixDirty",value:function(){this._localMatrixDirty=!0,this._setWorldMatrixDirty()}},{key:"_setWorldMatrixDirty",value:function(){this._worldMatrixDirty=!0,this._worldNormalMatrixDirty=!0}},{key:"_buildWorldMatrix",value:function(){var e=this.matrix;if(this._parentNode)$.mulMat4(this._parentNode.worldMatrix,e,this._worldMatrix);else for(var t=0,n=e.length;t0)for(var n=0;n-1){var x=B.geometry._state,M=B.scene,F=M.camera,H=M.canvas;if("triangles"===x.primitiveName){N.primitive="triangle";var U,G,k,j=L,V=x.indices,Q=x.positions;if(V){var W=V[j+0],z=V[j+1],K=V[j+2];a[0]=W,a[1]=z,a[2]=K,N.indices=a,U=3*W,G=3*z,k=3*K}else k=(G=(U=3*j)+3)+3;if(n[0]=Q[U+0],n[1]=Q[U+1],n[2]=Q[U+2],r[0]=Q[G+0],r[1]=Q[G+1],r[2]=Q[G+2],i[0]=Q[k+0],i[1]=Q[k+1],i[2]=Q[k+2],x.compressGeometry){var Y=x.positionsDecodeMatrix;Y&&(Pn.decompressPosition(n,Y,n),Pn.decompressPosition(r,Y,r),Pn.decompressPosition(i,Y,i))}N.canvasPos?$.canvasPosToLocalRay(H.canvas,B.origin?Oe(O,B.origin):O,S,B.worldMatrix,N.canvasPos,e,t):N.origin&&N.direction&&$.worldRayToLocalRay(B.worldMatrix,N.origin,N.direction,e,t),$.normalizeVec3(t),$.rayPlaneIntersect(e,t,n,r,i,s),N.localPos=s,N.position=s,h[0]=s[0],h[1]=s[1],h[2]=s[2],h[3]=1,$.transformVec4(B.worldMatrix,h,I),o[0]=I[0],o[1]=I[1],o[2]=I[2],N.canvasPos&&B.origin&&(o[0]+=B.origin[0],o[1]+=B.origin[1],o[2]+=B.origin[2]),N.worldPos=o,$.transformVec4(F.matrix,I,y),l[0]=y[0],l[1]=y[1],l[2]=y[2],N.viewPos=l,$.cartesianToBarycentric(s,n,r,i,u),N.bary=u;var X=x.normals;if(X){if(x.compressGeometry){var q=3*W,J=3*z,Z=3*K;Pn.decompressNormal(X.subarray(q,q+2),c),Pn.decompressNormal(X.subarray(J,J+2),f),Pn.decompressNormal(X.subarray(Z,Z+2),p)}else c[0]=X[U],c[1]=X[U+1],c[2]=X[U+2],f[0]=X[G],f[1]=X[G+1],f[2]=X[G+2],p[0]=X[k],p[1]=X[k+1],p[2]=X[k+2];var ee=$.addVec3($.addVec3($.mulVec3Scalar(c,u[0],m),$.mulVec3Scalar(f,u[1],w),g),$.mulVec3Scalar(p,u[2],E),T);N.worldNormal=$.normalizeVec3($.transformVec3(B.worldNormalMatrix,ee,b))}var te=x.uv;if(te){if(A[0]=te[2*W],A[1]=te[2*W+1],d[0]=te[2*z],d[1]=te[2*z+1],v[0]=te[2*K],v[1]=te[2*K+1],x.compressGeometry){var ne=x.uvDecodeMatrix;ne&&(Pn.decompressUV(A,ne,A),Pn.decompressUV(d,ne,d),Pn.decompressUV(v,ne,v))}N.uv=$.addVec3($.addVec3($.mulVec2Scalar(A,u[0],D),$.mulVec2Scalar(d,u[1],P),C),$.mulVec2Scalar(v,u[2],_),R)}}}}}();function ea(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.radiusTop||1;t<0&&(console.error("negative radiusTop not allowed - will invert"),t*=-1);var n=e.radiusBottom||1;n<0&&(console.error("negative radiusBottom not allowed - will invert"),n*=-1);var r=e.height||1;r<0&&(console.error("negative height not allowed - will invert"),r*=-1);var i=e.radialSegments||32;i<0&&(console.error("negative radialSegments not allowed - will invert"),i*=-1),i<3&&(i=3);var a=e.heightSegments||1;a<0&&(console.error("negative heightSegments not allowed - will invert"),a*=-1),a<1&&(a=1);var s,o,l,u,c,f,p,A,d,v,h,I=!!e.openEnded,y=e.center,m=y?y[0]:0,w=y?y[1]:0,g=y?y[2]:0,E=r/2,T=r/a,b=2*Math.PI/i,D=1/i,P=(t-n)/a,C=[],_=[],R=[],B=[],O=(90-180*Math.atan(r/(n-t))/Math.PI)/90;for(s=0;s<=a;s++)for(c=t-s*P,f=E-s*T,o=0;o<=i;o++)l=Math.sin(o*b),u=Math.cos(o*b),_.push(c*l),_.push(O),_.push(c*u),R.push(o*D),R.push(1*s/a),C.push(c*l+m),C.push(f+w),C.push(c*u+g);for(s=0;s0){for(d=C.length/3,_.push(0),_.push(1),_.push(0),R.push(.5),R.push(.5),C.push(0+m),C.push(E+w),C.push(0+g),o=0;o<=i;o++)l=Math.sin(o*b),u=Math.cos(o*b),v=.5*Math.sin(o*b)+.5,h=.5*Math.cos(o*b)+.5,_.push(t*l),_.push(1),_.push(t*u),R.push(v),R.push(h),C.push(t*l+m),C.push(E+w),C.push(t*u+g);for(o=0;o0){for(d=C.length/3,_.push(0),_.push(-1),_.push(0),R.push(.5),R.push(.5),C.push(0+m),C.push(0-E+w),C.push(0+g),o=0;o<=i;o++)l=Math.sin(o*b),u=Math.cos(o*b),v=.5*Math.sin(o*b)+.5,h=.5*Math.cos(o*b)+.5,_.push(n*l),_.push(-1),_.push(n*u),R.push(v),R.push(h),C.push(n*l+m),C.push(0-E+w),C.push(n*u+g);for(o=0;o0&&void 0!==arguments[0]?arguments[0]:{},t=e.lod||1,n=e.center?e.center[0]:0,r=e.center?e.center[1]:0,i=e.center?e.center[2]:0,a=e.radius||1;a<0&&(console.error("negative radius not allowed - will invert"),a*=-1);var s=e.heightSegments||18;s<0&&(console.error("negative heightSegments not allowed - will invert"),s*=-1),(s=Math.floor(t*s))<18&&(s=18);var o=e.widthSegments||18;o<0&&(console.error("negative widthSegments not allowed - will invert"),o*=-1),(o=Math.floor(t*o))<18&&(o=18);var l,u,c,f,p,A,d,v,h,I,y,m,w,g,E=[],T=[],b=[],D=[];for(l=0;l<=s;l++)for(c=l*Math.PI/s,f=Math.sin(c),p=Math.cos(c),u=0;u<=o;u++)A=2*u*Math.PI/o,d=Math.sin(A),v=Math.cos(A)*f,h=p,I=d*f,y=1-u/o,m=l/s,T.push(v),T.push(h),T.push(I),b.push(y),b.push(m),E.push(n+a*v),E.push(r+a*h),E.push(i+a*I);for(l=0;l":{width:24,points:[[4,18],[20,9],[4,0]]},"?":{width:18,points:[[3,16],[3,17],[4,19],[5,20],[7,21],[11,21],[13,20],[14,19],[15,17],[15,15],[14,13],[13,12],[9,10],[9,7],[-1,-1],[9,2],[8,1],[9,0],[10,1],[9,2]]},"@":{width:27,points:[[18,13],[17,15],[15,16],[12,16],[10,15],[9,14],[8,11],[8,8],[9,6],[11,5],[14,5],[16,6],[17,8],[-1,-1],[12,16],[10,14],[9,11],[9,8],[10,6],[11,5],[-1,-1],[18,16],[17,8],[17,6],[19,5],[21,5],[23,7],[24,10],[24,12],[23,15],[22,17],[20,19],[18,20],[15,21],[12,21],[9,20],[7,19],[5,17],[4,15],[3,12],[3,9],[4,6],[5,4],[7,2],[9,1],[12,0],[15,0],[18,1],[20,2],[21,3],[-1,-1],[19,16],[18,8],[18,6],[19,5]]},A:{width:18,points:[[9,21],[1,0],[-1,-1],[9,21],[17,0],[-1,-1],[4,7],[14,7]]},B:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[-1,-1],[4,11],[13,11],[16,10],[17,9],[18,7],[18,4],[17,2],[16,1],[13,0],[4,0]]},C:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5]]},D:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[11,21],[14,20],[16,18],[17,16],[18,13],[18,8],[17,5],[16,3],[14,1],[11,0],[4,0]]},E:{width:19,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11],[-1,-1],[4,0],[17,0]]},F:{width:18,points:[[4,21],[4,0],[-1,-1],[4,21],[17,21],[-1,-1],[4,11],[12,11]]},G:{width:21,points:[[18,16],[17,18],[15,20],[13,21],[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[18,8],[-1,-1],[13,8],[18,8]]},H:{width:22,points:[[4,21],[4,0],[-1,-1],[18,21],[18,0],[-1,-1],[4,11],[18,11]]},I:{width:8,points:[[4,21],[4,0]]},J:{width:16,points:[[12,21],[12,5],[11,2],[10,1],[8,0],[6,0],[4,1],[3,2],[2,5],[2,7]]},K:{width:21,points:[[4,21],[4,0],[-1,-1],[18,21],[4,7],[-1,-1],[9,12],[18,0]]},L:{width:17,points:[[4,21],[4,0],[-1,-1],[4,0],[16,0]]},M:{width:24,points:[[4,21],[4,0],[-1,-1],[4,21],[12,0],[-1,-1],[20,21],[12,0],[-1,-1],[20,21],[20,0]]},N:{width:22,points:[[4,21],[4,0],[-1,-1],[4,21],[18,0],[-1,-1],[18,21],[18,0]]},O:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21]]},P:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,14],[17,12],[16,11],[13,10],[4,10]]},Q:{width:22,points:[[9,21],[7,20],[5,18],[4,16],[3,13],[3,8],[4,5],[5,3],[7,1],[9,0],[13,0],[15,1],[17,3],[18,5],[19,8],[19,13],[18,16],[17,18],[15,20],[13,21],[9,21],[-1,-1],[12,4],[18,-2]]},R:{width:21,points:[[4,21],[4,0],[-1,-1],[4,21],[13,21],[16,20],[17,19],[18,17],[18,15],[17,13],[16,12],[13,11],[4,11],[-1,-1],[11,11],[18,0]]},S:{width:20,points:[[17,18],[15,20],[12,21],[8,21],[5,20],[3,18],[3,16],[4,14],[5,13],[7,12],[13,10],[15,9],[16,8],[17,6],[17,3],[15,1],[12,0],[8,0],[5,1],[3,3]]},T:{width:16,points:[[8,21],[8,0],[-1,-1],[1,21],[15,21]]},U:{width:22,points:[[4,21],[4,6],[5,3],[7,1],[10,0],[12,0],[15,1],[17,3],[18,6],[18,21]]},V:{width:18,points:[[1,21],[9,0],[-1,-1],[17,21],[9,0]]},W:{width:24,points:[[2,21],[7,0],[-1,-1],[12,21],[7,0],[-1,-1],[12,21],[17,0],[-1,-1],[22,21],[17,0]]},X:{width:20,points:[[3,21],[17,0],[-1,-1],[17,21],[3,0]]},Y:{width:18,points:[[1,21],[9,11],[9,0],[-1,-1],[17,21],[9,11]]},Z:{width:20,points:[[17,21],[3,0],[-1,-1],[3,21],[17,21],[-1,-1],[3,0],[17,0]]},"[":{width:14,points:[[4,25],[4,-7],[-1,-1],[5,25],[5,-7],[-1,-1],[4,25],[11,25],[-1,-1],[4,-7],[11,-7]]},"\\":{width:14,points:[[0,21],[14,-3]]},"]":{width:14,points:[[9,25],[9,-7],[-1,-1],[10,25],[10,-7],[-1,-1],[3,25],[10,25],[-1,-1],[3,-7],[10,-7]]},"^":{width:16,points:[[6,15],[8,18],[10,15],[-1,-1],[3,12],[8,17],[13,12],[-1,-1],[8,17],[8,0]]},_:{width:16,points:[[0,-2],[16,-2]]},"`":{width:10,points:[[6,21],[5,20],[4,18],[4,16],[5,15],[6,16],[5,17]]},a:{width:19,points:[[15,14],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},b:{width:19,points:[[4,21],[4,0],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},c:{width:18,points:[[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},d:{width:19,points:[[15,21],[15,0],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},e:{width:18,points:[[3,8],[15,8],[15,10],[14,12],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},f:{width:12,points:[[10,21],[8,21],[6,20],[5,17],[5,0],[-1,-1],[2,14],[9,14]]},g:{width:19,points:[[15,14],[15,-2],[14,-5],[13,-6],[11,-7],[8,-7],[6,-6],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},h:{width:19,points:[[4,21],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},i:{width:8,points:[[3,21],[4,20],[5,21],[4,22],[3,21],[-1,-1],[4,14],[4,0]]},j:{width:10,points:[[5,21],[6,20],[7,21],[6,22],[5,21],[-1,-1],[6,14],[6,-3],[5,-6],[3,-7],[1,-7]]},k:{width:17,points:[[4,21],[4,0],[-1,-1],[14,14],[4,4],[-1,-1],[8,8],[15,0]]},l:{width:8,points:[[4,21],[4,0]]},m:{width:30,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0],[-1,-1],[15,10],[18,13],[20,14],[23,14],[25,13],[26,10],[26,0]]},n:{width:19,points:[[4,14],[4,0],[-1,-1],[4,10],[7,13],[9,14],[12,14],[14,13],[15,10],[15,0]]},o:{width:19,points:[[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3],[16,6],[16,8],[15,11],[13,13],[11,14],[8,14]]},p:{width:19,points:[[4,14],[4,-7],[-1,-1],[4,11],[6,13],[8,14],[11,14],[13,13],[15,11],[16,8],[16,6],[15,3],[13,1],[11,0],[8,0],[6,1],[4,3]]},q:{width:19,points:[[15,14],[15,-7],[-1,-1],[15,11],[13,13],[11,14],[8,14],[6,13],[4,11],[3,8],[3,6],[4,3],[6,1],[8,0],[11,0],[13,1],[15,3]]},r:{width:13,points:[[4,14],[4,0],[-1,-1],[4,8],[5,11],[7,13],[9,14],[12,14]]},s:{width:17,points:[[14,11],[13,13],[10,14],[7,14],[4,13],[3,11],[4,9],[6,8],[11,7],[13,6],[14,4],[14,3],[13,1],[10,0],[7,0],[4,1],[3,3]]},t:{width:12,points:[[5,21],[5,4],[6,1],[8,0],[10,0],[-1,-1],[2,14],[9,14]]},u:{width:19,points:[[4,14],[4,4],[5,1],[7,0],[10,0],[12,1],[15,4],[-1,-1],[15,14],[15,0]]},v:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0]]},w:{width:22,points:[[3,14],[7,0],[-1,-1],[11,14],[7,0],[-1,-1],[11,14],[15,0],[-1,-1],[19,14],[15,0]]},x:{width:17,points:[[3,14],[14,0],[-1,-1],[14,14],[3,0]]},y:{width:16,points:[[2,14],[8,0],[-1,-1],[14,14],[8,0],[6,-4],[4,-6],[2,-7],[1,-7]]},z:{width:17,points:[[14,14],[3,0],[-1,-1],[3,14],[14,14],[-1,-1],[3,0],[14,0]]},"{":{width:14,points:[[9,25],[7,24],[6,23],[5,21],[5,19],[6,17],[7,16],[8,14],[8,12],[6,10],[-1,-1],[7,24],[6,22],[6,20],[7,18],[8,17],[9,15],[9,13],[8,11],[4,9],[8,7],[9,5],[9,3],[8,1],[7,0],[6,-2],[6,-4],[7,-6],[-1,-1],[6,8],[8,6],[8,4],[7,2],[6,1],[5,-1],[5,-3],[6,-5],[7,-6],[9,-7]]},"|":{width:8,points:[[4,25],[4,-7]]},"}":{width:14,points:[[5,25],[7,24],[8,23],[9,21],[9,19],[8,17],[7,16],[6,14],[6,12],[8,10],[-1,-1],[7,24],[8,22],[8,20],[7,18],[6,17],[5,15],[5,13],[6,11],[10,9],[6,7],[5,5],[5,3],[6,1],[7,0],[8,-2],[8,-4],[7,-6],[-1,-1],[8,8],[6,6],[6,4],[7,2],[8,1],[9,-1],[9,-3],[8,-5],[7,-6],[5,-7]]},"~":{width:24,points:[[3,6],[3,8],[4,11],[6,12],[8,12],[10,11],[14,8],[16,7],[18,7],[20,8],[21,10],[-1,-1],[3,8],[4,10],[6,11],[8,11],[10,10],[14,7],[16,6],[18,6],[20,7],[21,10],[21,12]]}};function ra(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.origin||[0,0,0],n=t[0],r=t[1],i=t[2],a=e.size||1,s=[],o=[],l=e.text;le.isNumeric(l)&&(l=""+l);for(var u,c,f,p,A,d,v,h,I,y=(l||"").split("\n"),m=0,w=0,g=.04,E=0;E1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({active:!0,pos:$.vec3(),dir:$.vec3(),dist:0}),r.active=i.active,r.pos=i.pos,r.dir=i.dir,r.scene._sectionPlaneCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"SectionPlane"}},{key:"active",get:function(){return this._state.active},set:function(e){this._state.active=!1!==e,this.glRedraw(),this.fire("active",this._state.active)}},{key:"pos",get:function(){return this._state.pos},set:function(e){this._state.pos.set(e||[0,0,0]),this._state.dist=-$.dotVec3(this._state.pos,this._state.dir),this.fire("pos",this._state.pos),this.scene.fire("sectionPlaneUpdated",this)}},{key:"dir",get:function(){return this._state.dir},set:function(e){this._state.dir.set(e||[0,0,-1]),this._state.dist=-$.dotVec3(this._state.pos,this._state.dir),this.glRedraw(),this.fire("dir",this._state.dir),this.scene.fire("sectionPlaneUpdated",this)}},{key:"dist",get:function(){return this._state.dist}},{key:"flipDir",value:function(){var e=this._state.dir;e[0]*=-1,e[1]*=-1,e[2]*=-1,this._state.dist=-$.dotVec3(this._state.pos,this._state.dir),this.fire("dir",this._state.dir),this.glRedraw()}},{key:"destroy",value:function(){this._state.destroy(),this.scene._sectionPlaneDestroyed(this),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),sa=$.vec4(4),oa=$.vec4(),la=$.vec4(),ua=$.vec3([1,0,0]),ca=$.vec3([0,1,0]),fa=$.vec3([0,0,1]),pa=$.vec3(3),Aa=$.vec3(3),da=$.identityMat4(),va=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e,i))._parentNode=null,r._children=[],r._aabb=null,r._aabbDirty=!0,r.scene._aabbDirty=!0,r._numTriangles=0,r._scale=$.vec3(),r._quaternion=$.identityQuaternion(),r._rotation=$.vec3(),r._position=$.vec3(),r._offset=$.vec3(),r._localMatrix=$.identityMat4(),r._worldMatrix=$.identityMat4(),r._localMatrixDirty=!0,r._worldMatrixDirty=!0,i.matrix?r.matrix=i.matrix:(r.scale=i.scale,r.position=i.position,i.quaternion||(r.rotation=i.rotation)),r._isModel=i.isModel,r._isModel&&r.scene._registerModel(w(r)),r._isObject=i.isObject,r._isObject&&r.scene._registerObject(w(r)),r.origin=i.origin,r.visible=i.visible,r.culled=i.culled,r.pickable=i.pickable,r.clippable=i.clippable,r.collidable=i.collidable,r.castsShadow=i.castsShadow,r.receivesShadow=i.receivesShadow,r.xrayed=i.xrayed,r.highlighted=i.highlighted,r.selected=i.selected,r.edges=i.edges,r.colorize=i.colorize,r.opacity=i.opacity,r.offset=i.offset,i.children)for(var a=i.children,s=0,o=a.length;s1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"LambertMaterial",ambient:$.vec3([1,1,1]),color:$.vec3([1,1,1]),emissive:$.vec3([0,0,0]),alpha:null,alphaMode:0,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:"/lam;"}),r.ambient=i.ambient,r.color=i.color,r.emissive=i.emissive,r.alpha=i.alpha,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,r.backfaces=i.backfaces,r.frontface=i.frontface,r}return P(n,[{key:"type",get:function(){return"LambertMaterial"}},{key:"ambient",get:function(){return this._state.ambient},set:function(e){var t=this._state.ambient;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.ambient=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=.2,t[1]=.2,t[2]=.2),this.glRedraw()}},{key:"color",get:function(){return this._state.color},set:function(e){var t=this._state.color;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.color=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this._state.alphaMode=e<1?2:0,this.glRedraw())}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Ia={opaque:0,mask:1,blend:2},ya=["opaque","mask","blend"],ma=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"MetallicMaterial",baseColor:$.vec4([1,1,1]),emissive:$.vec4([0,0,0]),metallic:null,roughness:null,specularF0:null,alpha:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),r.baseColor=i.baseColor,r.metallic=i.metallic,r.roughness=i.roughness,r.specularF0=i.specularF0,r.emissive=i.emissive,r.alpha=i.alpha,i.baseColorMap&&(r._baseColorMap=r._checkComponent("Texture",i.baseColorMap)),i.metallicMap&&(r._metallicMap=r._checkComponent("Texture",i.metallicMap)),i.roughnessMap&&(r._roughnessMap=r._checkComponent("Texture",i.roughnessMap)),i.metallicRoughnessMap&&(r._metallicRoughnessMap=r._checkComponent("Texture",i.metallicRoughnessMap)),i.emissiveMap&&(r._emissiveMap=r._checkComponent("Texture",i.emissiveMap)),i.occlusionMap&&(r._occlusionMap=r._checkComponent("Texture",i.occlusionMap)),i.alphaMap&&(r._alphaMap=r._checkComponent("Texture",i.alphaMap)),i.normalMap&&(r._normalMap=r._checkComponent("Texture",i.normalMap)),r.alphaMode=i.alphaMode,r.alphaCutoff=i.alphaCutoff,r.backfaces=i.backfaces,r.frontface=i.frontface,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,r._makeHash(),r}return P(n,[{key:"type",get:function(){return"MetallicMaterial"}},{key:"_makeHash",value:function(){var e=this._state,t=["/met"];this._baseColorMap&&(t.push("/bm"),this._baseColorMap._state.hasMatrix&&t.push("/mat"),t.push("/"+this._baseColorMap._state.encoding)),this._metallicMap&&(t.push("/mm"),this._metallicMap._state.hasMatrix&&t.push("/mat")),this._roughnessMap&&(t.push("/rm"),this._roughnessMap._state.hasMatrix&&t.push("/mat")),this._metallicRoughnessMap&&(t.push("/mrm"),this._metallicRoughnessMap._state.hasMatrix&&t.push("/mat")),this._emissiveMap&&(t.push("/em"),this._emissiveMap._state.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap._state.hasMatrix&&t.push("/mat")),this._alphaMap&&(t.push("/am"),this._alphaMap._state.hasMatrix&&t.push("/mat")),this._normalMap&&(t.push("/nm"),this._normalMap._state.hasMatrix&&t.push("/mat")),t.push(";"),e.hash=t.join("")}},{key:"baseColor",get:function(){return this._state.baseColor},set:function(e){var t=this._state.baseColor;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.baseColor=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"baseColorMap",get:function(){return this._baseColorMap}},{key:"metallic",get:function(){return this._state.metallic},set:function(e){e=null!=e?e:1,this._state.metallic!==e&&(this._state.metallic=e,this.glRedraw())}},{key:"metallicMap",get:function(){return this._attached.metallicMap}},{key:"roughness",get:function(){return this._state.roughness},set:function(e){e=null!=e?e:1,this._state.roughness!==e&&(this._state.roughness=e,this.glRedraw())}},{key:"roughnessMap",get:function(){return this._attached.roughnessMap}},{key:"metallicRoughnessMap",get:function(){return this._attached.metallicRoughnessMap}},{key:"specularF0",get:function(){return this._state.specularF0},set:function(e){e=null!=e?e:0,this._state.specularF0!==e&&(this._state.specularF0=e,this.glRedraw())}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"emissiveMap",get:function(){return this._attached.emissiveMap}},{key:"occlusionMap",get:function(){return this._attached.occlusionMap}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}},{key:"alphaMap",get:function(){return this._attached.alphaMap}},{key:"normalMap",get:function(){return this._attached.normalMap}},{key:"alphaMode",get:function(){return ya[this._state.alphaMode]},set:function(e){var t=Ia[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}},{key:"alphaCutoff",get:function(){return this._state.alphaCutoff},set:function(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),wa={opaque:0,mask:1,blend:2},ga=["opaque","mask","blend"],Ea=function(e){h(n,On);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({type:"SpecularMaterial",diffuse:$.vec3([1,1,1]),emissive:$.vec3([0,0,0]),specular:$.vec3([1,1,1]),glossiness:null,specularF0:null,alpha:null,alphaMode:null,alphaCutoff:null,lineWidth:null,pointSize:null,backfaces:null,frontface:null,hash:null}),r.diffuse=i.diffuse,r.specular=i.specular,r.glossiness=i.glossiness,r.specularF0=i.specularF0,r.emissive=i.emissive,r.alpha=i.alpha,i.diffuseMap&&(r._diffuseMap=r._checkComponent("Texture",i.diffuseMap)),i.emissiveMap&&(r._emissiveMap=r._checkComponent("Texture",i.emissiveMap)),i.specularMap&&(r._specularMap=r._checkComponent("Texture",i.specularMap)),i.glossinessMap&&(r._glossinessMap=r._checkComponent("Texture",i.glossinessMap)),i.specularGlossinessMap&&(r._specularGlossinessMap=r._checkComponent("Texture",i.specularGlossinessMap)),i.occlusionMap&&(r._occlusionMap=r._checkComponent("Texture",i.occlusionMap)),i.alphaMap&&(r._alphaMap=r._checkComponent("Texture",i.alphaMap)),i.normalMap&&(r._normalMap=r._checkComponent("Texture",i.normalMap)),r.alphaMode=i.alphaMode,r.alphaCutoff=i.alphaCutoff,r.backfaces=i.backfaces,r.frontface=i.frontface,r.lineWidth=i.lineWidth,r.pointSize=i.pointSize,r._makeHash(),r}return P(n,[{key:"type",get:function(){return"SpecularMaterial"}},{key:"_makeHash",value:function(){var e=this._state,t=["/spe"];this._diffuseMap&&(t.push("/dm"),this._diffuseMap.hasMatrix&&t.push("/mat"),t.push("/"+this._diffuseMap.encoding)),this._emissiveMap&&(t.push("/em"),this._emissiveMap.hasMatrix&&t.push("/mat")),this._glossinessMap&&(t.push("/gm"),this._glossinessMap.hasMatrix&&t.push("/mat")),this._specularMap&&(t.push("/sm"),this._specularMap.hasMatrix&&t.push("/mat")),this._specularGlossinessMap&&(t.push("/sgm"),this._specularGlossinessMap.hasMatrix&&t.push("/mat")),this._occlusionMap&&(t.push("/ocm"),this._occlusionMap.hasMatrix&&t.push("/mat")),this._normalMap&&(t.push("/nm"),this._normalMap.hasMatrix&&t.push("/mat")),this._alphaMap&&(t.push("/opm"),this._alphaMap.hasMatrix&&t.push("/mat")),t.push(";"),e.hash=t.join("")}},{key:"diffuse",get:function(){return this._state.diffuse},set:function(e){var t=this._state.diffuse;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.diffuse=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"diffuseMap",get:function(){return this._diffuseMap}},{key:"specular",get:function(){return this._state.specular},set:function(e){var t=this._state.specular;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.specular=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=1,t[1]=1,t[2]=1),this.glRedraw()}},{key:"specularMap",get:function(){return this._specularMap}},{key:"specularGlossinessMap",get:function(){return this._specularGlossinessMap}},{key:"glossiness",get:function(){return this._state.glossiness},set:function(e){e=null!=e?e:1,this._state.glossiness!==e&&(this._state.glossiness=e,this.glRedraw())}},{key:"glossinessMap",get:function(){return this._glossinessMap}},{key:"specularF0",get:function(){return this._state.specularF0},set:function(e){e=null!=e?e:0,this._state.specularF0!==e&&(this._state.specularF0=e,this.glRedraw())}},{key:"emissive",get:function(){return this._state.emissive},set:function(e){var t=this._state.emissive;if(t){if(e&&t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2])return}else t=this._state.emissive=new Float32Array(3);e?(t[0]=e[0],t[1]=e[1],t[2]=e[2]):(t[0]=0,t[1]=0,t[2]=0),this.glRedraw()}},{key:"emissiveMap",get:function(){return this._emissiveMap}},{key:"alpha",get:function(){return this._state.alpha},set:function(e){e=null!=e?e:1,this._state.alpha!==e&&(this._state.alpha=e,this.glRedraw())}},{key:"alphaMap",get:function(){return this._alphaMap}},{key:"normalMap",get:function(){return this._normalMap}},{key:"occlusionMap",get:function(){return this._occlusionMap}},{key:"alphaMode",get:function(){return ga[this._state.alphaMode]},set:function(e){var t=wa[e=e||"opaque"];void 0===t&&(this.error("Unsupported value for 'alphaMode': "+e+" defaulting to 'opaque'"),t="opaque"),this._state.alphaMode!==t&&(this._state.alphaMode=t,this.glRedraw())}},{key:"alphaCutoff",get:function(){return this._state.alphaCutoff},set:function(e){null==e&&(e=.5),this._state.alphaCutoff!==e&&(this._state.alphaCutoff=e)}},{key:"backfaces",get:function(){return this._state.backfaces},set:function(e){e=!!e,this._state.backfaces!==e&&(this._state.backfaces=e,this.glRedraw())}},{key:"frontface",get:function(){return this._state.frontface?"ccw":"cw"},set:function(e){e="cw"!==e,this._state.frontface!==e&&(this._state.frontface=e,this.glRedraw())}},{key:"lineWidth",get:function(){return this._state.lineWidth},set:function(e){this._state.lineWidth=e||1,this.glRedraw()}},{key:"pointSize",get:function(){return this._state.pointSize},set:function(e){this._state.pointSize=e||1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}();function Ta(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=t;if(1009===i)return e.UNSIGNED_BYTE;if(1017===i)return e.UNSIGNED_SHORT_4_4_4_4;if(1018===i)return e.UNSIGNED_SHORT_5_5_5_1;if(1010===i)return e.BYTE;if(1011===i)return e.SHORT;if(1012===i)return e.UNSIGNED_SHORT;if(1013===i)return e.INT;if(1014===i)return e.UNSIGNED_INT;if(1015===i)return e.FLOAT;if(1016===i)return e.HALF_FLOAT;if(1021===i)return e.ALPHA;if(1023===i)return e.RGBA;if(1024===i)return e.LUMINANCE;if(1025===i)return e.LUMINANCE_ALPHA;if(1026===i)return e.DEPTH_COMPONENT;if(1027===i)return e.DEPTH_STENCIL;if(1028===i)return e.RED;if(1022===i)return e.RGBA;if(1029===i)return e.RED_INTEGER;if(1030===i)return e.RG;if(1031===i)return e.RG_INTEGER;if(1033===i)return e.RGBA_INTEGER;if(33776===i||33777===i||33778===i||33779===i)if(3001===r){var a=jt(e,"WEBGL_compressed_texture_s3tc_srgb");if(null===a)return null;if(33776===i)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===i)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===i)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(33779===i)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(null===(n=jt(e,"WEBGL_compressed_texture_s3tc")))return null;if(33776===i)return n.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===i)return n.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===i)return n.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===i)return n.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===i||35841===i||35842===i||35843===i){var s=jt(e,"WEBGL_compressed_texture_pvrtc");if(null===s)return null;if(35840===i)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===i)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===i)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===i)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===i){var o=jt(e,"WEBGL_compressed_texture_etc1");return null!==o?o.COMPRESSED_RGB_ETC1_WEBGL:null}if(37492===i||37496===i){var l=jt(e,"WEBGL_compressed_texture_etc");if(null===l)return null;if(37492===i)return 3001===r?l.COMPRESSED_SRGB8_ETC2:l.COMPRESSED_RGB8_ETC2;if(37496===i)return 3001===r?l.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:l.COMPRESSED_RGBA8_ETC2_EAC}if(37808===i||37809===i||37810===i||37811===i||37812===i||37813===i||37814===i||37815===i||37816===i||37817===i||37818===i||37819===i||37820===i||37821===i){var u=jt(e,"WEBGL_compressed_texture_astc");if(null===u)return null;if(37808===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:u.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:u.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:u.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:u.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:u.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:u.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:u.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:u.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:u.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:u.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:u.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:u.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:u.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===i)return 3001===r?u.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:u.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===i){var c=jt(e,"EXT_texture_compression_bptc");if(null===c)return null;if(36492===i)return 3001===r?c.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:c.COMPRESSED_RGBA_BPTC_UNORM_EXT}return 1020===i?e.UNSIGNED_INT_24_8:1e3===i?e.REPEAT:1001===i?e.CLAMP_TO_EDGE:1004===i||1005===i?e.NEAREST_MIPMAP_LINEAR:1007===i?e.LINEAR_MIPMAP_NEAREST:1008===i?e.LINEAR_MIPMAP_LINEAR:1003===i?e.NEAREST:1006===i?e.LINEAR:null}var ba=new Uint8Array([0,0,0,1]),Da=function(){function e(t){var n=t.gl,r=t.target,i=t.format,a=t.type,s=t.wrapS,o=t.wrapT,l=t.wrapR,u=t.encoding,c=t.preloadColor,f=t.premultiplyAlpha,p=t.flipY;b(this,e),this.gl=n,this.target=r||n.TEXTURE_2D,this.format=i||1023,this.type=a||1009,this.internalFormat=null,this.premultiplyAlpha=!!f,this.flipY=!!p,this.unpackAlignment=4,this.wrapS=s||1e3,this.wrapT=o||1e3,this.wrapR=l||1e3,this.encoding=u||3001,this.texture=n.createTexture(),c&&this.setPreloadColor(c),this.allocated=!0}return P(e,[{key:"setPreloadColor",value:function(e){e?(ba[0]=Math.floor(255*e[0]),ba[1]=Math.floor(255*e[1]),ba[2]=Math.floor(255*e[2]),ba[3]=Math.floor(255*(void 0!==e[3]?e[3]:1))):(ba[0]=0,ba[1]=0,ba[2]=0,ba[3]=255);var t=this.gl;if(t.bindTexture(this.target,this.texture),this.target===t.TEXTURE_CUBE_MAP)for(var n=[t.TEXTURE_CUBE_MAP_POSITIVE_X,t.TEXTURE_CUBE_MAP_NEGATIVE_X,t.TEXTURE_CUBE_MAP_POSITIVE_Y,t.TEXTURE_CUBE_MAP_NEGATIVE_Y,t.TEXTURE_CUBE_MAP_POSITIVE_Z,t.TEXTURE_CUBE_MAP_NEGATIVE_Z],r=0,i=n.length;r1&&void 0!==arguments[1]?arguments[1]:{},n=this.gl;void 0!==t.format&&(this.format=t.format),void 0!==t.internalFormat&&(this.internalFormat=t.internalFormat),void 0!==t.encoding&&(this.encoding=t.encoding),void 0!==t.type&&(this.type=t.type),void 0!==t.flipY&&(this.flipY=t.flipY),void 0!==t.premultiplyAlpha&&(this.premultiplyAlpha=t.premultiplyAlpha),void 0!==t.unpackAlignment&&(this.unpackAlignment=t.unpackAlignment),void 0!==t.minFilter&&(this.minFilter=t.minFilter),void 0!==t.magFilter&&(this.magFilter=t.magFilter),void 0!==t.wrapS&&(this.wrapS=t.wrapS),void 0!==t.wrapT&&(this.wrapT=t.wrapT),void 0!==t.wrapR&&(this.wrapR=t.wrapR);var r=!1;n.bindTexture(this.target,this.texture);var i=n.getParameter(n.UNPACK_FLIP_Y_WEBGL);n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,this.flipY);var a=n.getParameter(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL);n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha);var s=n.getParameter(n.UNPACK_ALIGNMENT);n.pixelStorei(n.UNPACK_ALIGNMENT,this.unpackAlignment);var o=n.getParameter(n.UNPACK_COLORSPACE_CONVERSION_WEBGL);n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,n.NONE);var l=Ta(n,this.minFilter);n.texParameteri(this.target,n.TEXTURE_MIN_FILTER,l),l!==n.NEAREST_MIPMAP_NEAREST&&l!==n.LINEAR_MIPMAP_NEAREST&&l!==n.NEAREST_MIPMAP_LINEAR&&l!==n.LINEAR_MIPMAP_LINEAR||(r=!0);var u=Ta(n,this.magFilter);u&&n.texParameteri(this.target,n.TEXTURE_MAG_FILTER,u);var c=Ta(n,this.wrapS);c&&n.texParameteri(this.target,n.TEXTURE_WRAP_S,c);var f=Ta(n,this.wrapT);f&&n.texParameteri(this.target,n.TEXTURE_WRAP_T,f);var p=Ta(n,this.format,this.encoding),A=Ta(n,this.type),d=Pa(n,this.internalFormat,p,A,this.encoding,!1);if(this.target===n.TEXTURE_CUBE_MAP){if(le.isArray(e))for(var v=e,h=[n.TEXTURE_CUBE_MAP_POSITIVE_X,n.TEXTURE_CUBE_MAP_NEGATIVE_X,n.TEXTURE_CUBE_MAP_POSITIVE_Y,n.TEXTURE_CUBE_MAP_NEGATIVE_Y,n.TEXTURE_CUBE_MAP_POSITIVE_Z,n.TEXTURE_CUBE_MAP_NEGATIVE_Z],I=0,y=h.length;I1;i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,this.flipY),i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),i.pixelStorei(i.UNPACK_ALIGNMENT,this.unpackAlignment),i.pixelStorei(i.UNPACK_COLORSPACE_CONVERSION_WEBGL,i.NONE);var o=Ta(i,this.wrapS);o&&i.texParameteri(this.target,i.TEXTURE_WRAP_S,o);var l=Ta(i,this.wrapT);if(l&&i.texParameteri(this.target,i.TEXTURE_WRAP_T,l),this.type===i.TEXTURE_3D||this.type===i.TEXTURE_2D_ARRAY){var u=Ta(i,this.wrapR);u&&i.texParameteri(this.target,i.TEXTURE_WRAP_R,u),i.texParameteri(this.type,i.TEXTURE_WRAP_R,u)}s?(i.texParameteri(this.target,i.TEXTURE_MIN_FILTER,Ca(i,this.minFilter)),i.texParameteri(this.target,i.TEXTURE_MAG_FILTER,Ca(i,this.magFilter))):(i.texParameteri(this.target,i.TEXTURE_MIN_FILTER,Ta(i,this.minFilter)),i.texParameteri(this.target,i.TEXTURE_MAG_FILTER,Ta(i,this.magFilter)));var c=Ta(i,this.format,this.encoding),f=Ta(i,this.type),p=Pa(i,this.internalFormat,c,f,this.encoding,!1);i.texStorage2D(i.TEXTURE_2D,a,p,t[0].width,t[0].height);for(var A=0,d=t.length;A5&&void 0!==arguments[5]&&arguments[5];if(null!==t){if(void 0!==e[t])return e[t];console.warn("Attempt to use non-existing WebGL internal format '"+t+"'")}var s=n;return n===e.RED&&(r===e.FLOAT&&(s=e.R32F),r===e.HALF_FLOAT&&(s=e.R16F),r===e.UNSIGNED_BYTE&&(s=e.R8)),n===e.RG&&(r===e.FLOAT&&(s=e.RG32F),r===e.HALF_FLOAT&&(s=e.RG16F),r===e.UNSIGNED_BYTE&&(s=e.RG8)),n===e.RGBA&&(r===e.FLOAT&&(s=e.RGBA32F),r===e.HALF_FLOAT&&(s=e.RGBA16F),r===e.UNSIGNED_BYTE&&(s=3001===i&&!1===a?e.SRGB8_ALPHA8:e.RGBA8),r===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),r===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)),s!==e.R16F&&s!==e.R32F&&s!==e.RG16F&&s!==e.RG32F&&s!==e.RGBA16F&&s!==e.RGBA32F||jt(e,"EXT_color_buffer_float"),s}function Ca(e,t){return 1003===t||1004===t||1005===t?e.NEAREST:e.LINEAR}function _a(e){if(!Ra(e.width)||!Ra(e.height)){var t=document.createElement("canvas");t.width=Ba(e.width),t.height=Ba(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}function Ra(e){return 0==(e&e-1)}function Ba(e){--e;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1}var Oa=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({texture:new Da({gl:r.scene.canvas.gl}),matrix:$.identityMat4(),hasMatrix:i.translate&&(0!==i.translate[0]||0!==i.translate[1])||!!i.rotate||i.scale&&(0!==i.scale[0]||0!==i.scale[1]),minFilter:r._checkMinFilter(i.minFilter),magFilter:r._checkMagFilter(i.magFilter),wrapS:r._checkWrapS(i.wrapS),wrapT:r._checkWrapT(i.wrapT),flipY:r._checkFlipY(i.flipY),encoding:r._checkEncoding(i.encoding)}),r._src=null,r._image=null,r._translate=$.vec2([0,0]),r._scale=$.vec2([1,1]),r._rotate=$.vec2([0,0]),r._matrixDirty=!1,r.translate=i.translate,r.scale=i.scale,r.rotate=i.rotate,i.src?r.src=i.src:i.image&&(r.image=i.image),re.memory.textures++,r}return P(n,[{key:"type",get:function(){return"Texture"}},{key:"_checkMinFilter",value:function(e){return 1006!==(e=e||1008)&&1007!==e&&1008!==e&&1005!==e&&1004!==e&&(this.error("Unsupported value for 'minFilter' - supported values are LinearFilter, LinearMipMapNearestFilter, NearestMipMapNearestFilter, NearestMipMapLinearFilter and LinearMipMapLinearFilter. Defaulting to LinearMipMapLinearFilter."),e=1008),e}},{key:"_checkMagFilter",value:function(e){return 1006!==(e=e||1006)&&1003!==e&&(this.error("Unsupported value for 'magFilter' - supported values are LinearFilter and NearestFilter. Defaulting to LinearFilter."),e=1006),e}},{key:"_checkWrapS",value:function(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapS' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}},{key:"_checkWrapT",value:function(e){return 1001!==(e=e||1e3)&&1002!==e&&1e3!==e&&(this.error("Unsupported value for 'wrapT' - supported values are ClampToEdgeWrapping, MirroredRepeatWrapping and RepeatWrapping. Defaulting to RepeatWrapping."),e=1e3),e}},{key:"_checkFlipY",value:function(e){return!!e}},{key:"_checkEncoding",value:function(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}},{key:"_webglContextRestored",value:function(){this._state.texture=new Da({gl:this.scene.canvas.gl}),this._image?this.image=this._image:this._src&&(this.src=this._src)}},{key:"_update",value:function(){var e,t,n=this._state;this._matrixDirty&&(0===this._translate[0]&&0===this._translate[1]||(e=$.translationMat4v([this._translate[0],this._translate[1],0],this._state.matrix)),1===this._scale[0]&&1===this._scale[1]||(t=$.scalingMat4v([this._scale[0],this._scale[1],1]),e=e?$.mulMat4(e,t):t),0!==this._rotate&&(t=$.rotationMat4v(.0174532925*this._rotate,[0,0,1]),e=e?$.mulMat4(e,t):t),e&&(n.matrix=e),this._matrixDirty=!1);this.glRedraw()}},{key:"image",get:function(){return this._image},set:function(e){this._image=_a(e),this._image.crossOrigin="Anonymous",this._state.texture.setImage(this._image,this._state),this._src=null,this.glRedraw()}},{key:"src",get:function(){return this._src},set:function(e){this.scene.loading++,this.scene.canvas.spinner.processes++;var t=this,n=new Image;n.onload=function(){n=_a(n),t._state.texture.setImage(n,t._state),t.scene.loading--,t.glRedraw(),t.scene.canvas.spinner.processes--},n.src=e,this._src=e,this._image=null}},{key:"translate",get:function(){return this._translate},set:function(e){this._translate.set(e||[0,0]),this._matrixDirty=!0,this._needUpdate()}},{key:"scale",get:function(){return this._scale},set:function(e){this._scale.set(e||[1,1]),this._matrixDirty=!0,this._needUpdate()}},{key:"rotate",get:function(){return this._rotate},set:function(e){e=e||0,this._rotate!==e&&(this._rotate=e,this._matrixDirty=!0,this._needUpdate())}},{key:"minFilter",get:function(){return this._state.minFilter}},{key:"magFilter",get:function(){return this._state.magFilter}},{key:"wrapS",get:function(){return this._state.wrapS}},{key:"wrapT",get:function(){return this._state.wrapT}},{key:"flipY",get:function(){return this._state.flipY}},{key:"encoding",get:function(){return this._state.encoding}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.texture&&this._state.texture.destroy(),this._state.destroy(),re.memory.textures--}}]),n}(),Sa=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._state=new zt({edgeColor:$.vec3([0,0,0]),centerColor:$.vec3([1,1,1]),edgeBias:0,centerBias:1,power:1}),r.edgeColor=i.edgeColor,r.centerColor=i.centerColor,r.edgeBias=i.edgeBias,r.centerBias=i.centerBias,r.power=i.power,r}return P(n,[{key:"type",get:function(){return"Fresnel"}},{key:"edgeColor",get:function(){return this._state.edgeColor},set:function(e){this._state.edgeColor.set(e||[0,0,0]),this.glRedraw()}},{key:"centerColor",get:function(){return this._state.centerColor},set:function(e){this._state.centerColor.set(e||[1,1,1]),this.glRedraw()}},{key:"edgeBias",get:function(){return this._state.edgeBias},set:function(e){this._state.edgeBias=e||0,this.glRedraw()}},{key:"centerBias",get:function(){return this._state.centerBias},set:function(e){this._state.centerBias=null!=e?e:1,this.glRedraw()}},{key:"power",get:function(){return this._state.power},set:function(e){this._state.power=null!=e?e:1,this.glRedraw()}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this._state.destroy()}}]),n}(),Na=re.memory,La=$.AABB3(),xa=function(e){h(n,yn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i))._state=new zt({compressGeometry:!0,primitive:null,primitiveName:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,positionsBuf:null,normalsBuf:null,colorsbuf:null,uvBuf:null,indicesBuf:null,hash:""}),r._numTriangles=0,r._edgeThreshold=i.edgeThreshold||10,r._aabb=null,r._obb=$.OBB3();var a,s=r._state,o=r.scene.canvas.gl;switch(i.primitive=i.primitive||"triangles",i.primitive){case"points":s.primitive=o.POINTS,s.primitiveName=i.primitive;break;case"lines":s.primitive=o.LINES,s.primitiveName=i.primitive;break;case"line-loop":s.primitive=o.LINE_LOOP,s.primitiveName=i.primitive;break;case"line-strip":s.primitive=o.LINE_STRIP,s.primitiveName=i.primitive;break;case"triangles":s.primitive=o.TRIANGLES,s.primitiveName=i.primitive;break;case"triangle-strip":s.primitive=o.TRIANGLE_STRIP,s.primitiveName=i.primitive;break;case"triangle-fan":s.primitive=o.TRIANGLE_FAN,s.primitiveName=i.primitive;break;default:r.error("Unsupported value for 'primitive': '"+i.primitive+"' - supported values are 'points', 'lines', 'line-loop', 'line-strip', 'triangles', 'triangle-strip' and 'triangle-fan'. Defaulting to 'triangles'."),s.primitive=o.TRIANGLES,s.primitiveName=i.primitive}if(!i.positions)return r.error("Config expected: positions"),m(r);if(!i.indices)return r.error("Config expected: indices"),m(r);var l=i.positionsDecodeMatrix;if(l);else{var u=Pn.getPositionsBounds(i.positions),c=Pn.compressPositions(i.positions,u.min,u.max);a=c.quantized,s.positionsDecodeMatrix=c.decodeMatrix,s.positionsBuf=new Pt(o,o.ARRAY_BUFFER,a,a.length,3,o.STATIC_DRAW),Na.positions+=s.positionsBuf.numItems,$.positions3ToAABB3(i.positions,r._aabb),$.positions3ToAABB3(a,La,s.positionsDecodeMatrix),$.AABB3ToOBB3(La,r._obb)}if(i.colors){var f=i.colors.constructor===Float32Array?i.colors:new Float32Array(i.colors);s.colorsBuf=new Pt(o,o.ARRAY_BUFFER,f,f.length,4,o.STATIC_DRAW),Na.colors+=s.colorsBuf.numItems}if(i.uv){var p=Pn.getUVBounds(i.uv),A=Pn.compressUVs(i.uv,p.min,p.max),d=A.quantized;s.uvDecodeMatrix=A.decodeMatrix,s.uvBuf=new Pt(o,o.ARRAY_BUFFER,d,d.length,2,o.STATIC_DRAW),Na.uvs+=s.uvBuf.numItems}if(i.normals){var v=Pn.compressNormals(i.normals),h=s.compressGeometry;s.normalsBuf=new Pt(o,o.ARRAY_BUFFER,v,v.length,3,o.STATIC_DRAW,h),Na.normals+=s.normalsBuf.numItems}var I=i.indices.constructor===Uint32Array||i.indices.constructor===Uint16Array?i.indices:new Uint32Array(i.indices);s.indicesBuf=new Pt(o,o.ELEMENT_ARRAY_BUFFER,I,I.length,1,o.STATIC_DRAW),Na.indices+=s.indicesBuf.numItems;var y=mn(a,I,s.positionsDecodeMatrix,r._edgeThreshold);return r._edgeIndicesBuf=new Pt(o,o.ELEMENT_ARRAY_BUFFER,y,y.length,1,o.STATIC_DRAW),"triangles"===r._state.primitiveName&&(r._numTriangles=i.indices.length/3),r._buildHash(),Na.meshes++,r}return P(n,[{key:"type",get:function(){return"VBOGeometry"}},{key:"isVBOGeometry",get:function(){return!0}},{key:"_buildHash",value:function(){var e=this._state,t=["/g"];t.push("/"+e.primitive+";"),e.positionsBuf&&t.push("p"),e.colorsBuf&&t.push("c"),(e.normalsBuf||e.autoVertexNormals)&&t.push("n"),e.uvBuf&&t.push("u"),t.push("cp"),t.push(";"),e.hash=t.join("")}},{key:"_getEdgeIndices",value:function(){return this._edgeIndicesBuf}},{key:"primitive",get:function(){return this._state.primitiveName}},{key:"aabb",get:function(){return this._aabb}},{key:"obb",get:function(){return this._obb}},{key:"numTriangles",get:function(){return this._numTriangles}},{key:"_getState",value:function(){return this._state}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this);var e=this._state;e.indicesBuf&&e.indicesBuf.destroy(),e.positionsBuf&&e.positionsBuf.destroy(),e.normalsBuf&&e.normalsBuf.destroy(),e.uvBuf&&e.uvBuf.destroy(),e.colorsBuf&&e.colorsBuf.destroy(),this._edgeIndicesBuf&&this._edgeIndicesBuf.destroy(),e.destroy(),Na.meshes--}}]),n}(),Ma={};function Fa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){t.src||(console.error("load3DSGeometry: Parameter expected: src"),r());var i=e.canvas.spinner;i.processes++,le.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("load3DSGeometry: no data loaded"),i.processes--,r());var a=Ma.parse.from3DS(e).edit.objects[0].mesh,s=a.vertices,o=a.uvt,l=a.indices;i.processes--,n(le.apply(t,{primitive:"triangles",positions:s,normals:null,uv:o,indices:l}))}),(function(e){console.error("load3DSGeometry: "+e),i.processes--,r()}))}))}function Ha(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise((function(n,r){t.src||(console.error("loadOBJGeometry: Parameter expected: src"),r());var i=e.canvas.spinner;i.processes++,le.loadArraybuffer(t.src,(function(e){e.byteLength||(console.error("loadOBJGeometry: no data loaded"),i.processes--,r());for(var a=Ma.parse.fromOBJ(e),s=Ma.edit.unwrap(a.i_verts,a.c_verts,3),o=Ma.edit.unwrap(a.i_norms,a.c_norms,3),l=Ma.edit.unwrap(a.i_uvt,a.c_uvt,2),u=new Int32Array(a.i_verts.length),c=0;c0?o:null,autoNormals:0===o.length,uv:l,indices:u}))}),(function(e){console.error("loadOBJGeometry: "+e),i.processes--,r()}))}))}function Ua(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var n=e.ySize||1;n<0&&(console.error("negative ySize not allowed - will invert"),n*=-1);var r=e.zSize||1;r<0&&(console.error("negative zSize not allowed - will invert"),r*=-1);var i=e.center,a=i?i[0]:0,s=i?i[1]:0,o=i?i[2]:0,l=-t+a,u=-n+s,c=-r+o,f=t+a,p=n+s,A=r+o;return le.apply(e,{primitive:"lines",positions:[l,u,c,l,u,A,l,p,c,l,p,A,f,u,c,f,u,A,f,p,c,f,p,A],indices:[0,1,1,3,3,2,2,0,4,5,5,7,7,6,6,4,0,4,1,5,2,6,3,7]})}function Ga(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ua({id:e.id,center:[(e.aabb[0]+e.aabb[3])/2,(e.aabb[1]+e.aabb[4])/2,(e.aabb[2]+e.aabb[5])/2],xSize:Math.abs(e.aabb[3]-e.aabb[0])/2,ySize:Math.abs(e.aabb[4]-e.aabb[1])/2,zSize:Math.abs(e.aabb[5]-e.aabb[2])/2})}function ka(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.size||1;t<0&&(console.error("negative size not allowed - will invert"),t*=-1);var n=e.divisions||1;n<0&&(console.error("negative divisions not allowed - will invert"),n*=-1),n<1&&(n=1);for(var r=(t=t||10)/(n=n||10),i=t/2,a=[],s=[],o=0,l=0,u=-i;l<=n;l++,u+=r)a.push(-i),a.push(0),a.push(u),a.push(i),a.push(0),a.push(u),a.push(u),a.push(0),a.push(-i),a.push(u),a.push(0),a.push(i),s.push(o++),s.push(o++),s.push(o++),s.push(o++);return le.apply(e,{primitive:"lines",positions:a,indices:s})}function ja(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.xSize||1;t<0&&(console.error("negative xSize not allowed - will invert"),t*=-1);var n=e.zSize||1;n<0&&(console.error("negative zSize not allowed - will invert"),n*=-1);var r=e.xSegments||1;r<0&&(console.error("negative xSegments not allowed - will invert"),r*=-1),r<1&&(r=1);var i=e.xSegments||1;i<0&&(console.error("negative zSegments not allowed - will invert"),i*=-1),i<1&&(i=1);var a,s,o,l,u,c,f,p=e.center,A=p?p[0]:0,d=p?p[1]:0,v=p?p[2]:0,h=t/2,I=n/2,y=Math.floor(r)||1,m=Math.floor(i)||1,w=y+1,g=m+1,E=t/y,T=n/m,b=new Float32Array(w*g*3),D=new Float32Array(w*g*3),P=new Float32Array(w*g*2),C=0,_=0;for(a=0;a65535?Uint32Array:Uint16Array)(y*m*6);for(a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=e.radius||1;t<0&&(console.error("negative radius not allowed - will invert"),t*=-1),t*=.5;var n=e.tube||.3;n<0&&(console.error("negative tube not allowed - will invert"),n*=-1);var r=e.radialSegments||32;r<0&&(console.error("negative radialSegments not allowed - will invert"),r*=-1),r<4&&(r=4);var i=e.tubeSegments||24;i<0&&(console.error("negative tubeSegments not allowed - will invert"),i*=-1),i<4&&(i=4);var a=e.arc||2*Math.PI;a<0&&(console.warn("negative arc not allowed - will invert"),a*=-1),a>360&&(a=360);var s,o,l,u,c,f,p,A,d,v,h,I,y=e.center,m=y?y[0]:0,w=y?y[1]:0,g=y?y[2]:0,E=[],T=[],b=[],D=[];for(A=0;A<=i;A++)for(p=0;p<=r;p++)s=p/r*a,o=.785398+A/i*Math.PI*2,m=t*Math.cos(s),w=t*Math.sin(s),l=(t+n*Math.cos(o))*Math.cos(s),u=(t+n*Math.cos(o))*Math.sin(s),c=n*Math.sin(o),E.push(l+m),E.push(u+w),E.push(c+g),b.push(1-p/r),b.push(A/i),f=$.normalizeVec3($.subVec3([l,u,c],[m,w,g],[]),[]),T.push(f[0]),T.push(f[1]),T.push(f[2]);for(A=1;A<=i;A++)for(p=1;p<=r;p++)d=(r+1)*A+p-1,v=(r+1)*(A-1)+p-1,h=(r+1)*(A-1)+p,I=(r+1)*A+p,D.push(d),D.push(v),D.push(h),D.push(h),D.push(I),D.push(d);return le.apply(e,{positions:E,normals:T,uv:b,indices:D})}function Qa(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.points.length%3!=0)throw"Size of points array for given polyline should be divisible by 3";var t=e.points.length/3;if(t<2)throw"There should be at least 2 points to create a polyline";for(var n=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.curve.getPoints(e.divisions).map((function(e){return u(e)})).flat();return Qa({id:e.id,points:t})}Ma.load=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(e){t(e.target.response)},n.send()},Ma.save=function(e,t){var n="data:application/octet-stream;base64,"+btoa(Ma.parse._buffToStr(e));window.location.href=n},Ma.clone=function(e){return JSON.parse(JSON.stringify(e))},Ma.bin={},Ma.bin.f=new Float32Array(1),Ma.bin.fb=new Uint8Array(Ma.bin.f.buffer),Ma.bin.rf=function(e,t){for(var n=Ma.bin.f,r=Ma.bin.fb,i=0;i<4;i++)r[i]=e[t+i];return n[0]},Ma.bin.rsl=function(e,t){return e[t]|e[t+1]<<8},Ma.bin.ril=function(e,t){return e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24},Ma.bin.rASCII0=function(e,t){for(var n="";0!=e[t];)n+=String.fromCharCode(e[t++]);return n},Ma.bin.wf=function(e,t,n){new Float32Array(e.buffer,t,1)[0]=n},Ma.bin.wsl=function(e,t,n){e[t]=n,e[t+1]=n>>8},Ma.bin.wil=function(e,t,n){e[t]=n,e[t+1]=n>>8,e[t+2]=n>>16,e[t+3]},Ma.parse={},Ma.parse._buffToStr=function(e){for(var t=new Uint8Array(e),n="",r=0;ri&&(i=l),ua&&(a=u),cs&&(s=c)}return{min:{x:t,y:n,z:r},max:{x:i,y:a,z:s}}};var za=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._type=i.type||(i.src?i.src.split(".").pop():null)||"jpg",r._pos=$.vec3(i.pos||[0,0,0]),r._up=$.vec3(i.up||[0,1,0]),r._normal=$.vec3(i.normal||[0,0,1]),r._height=i.height||1,r._origin=$.vec3(),r._rtcPos=$.vec3(),r._imageSize=$.vec2(),r._texture=new Oa(w(r),{flipY:!0}),r._image=new Image,"jpg"!==r._type&&"png"!==r._type&&(r.error('Unsupported type - defaulting to "jpg"'),r._type="jpg"),r._node=new va(w(r),{matrix:$.inverseMat4($.lookAtMat4v(r._pos,$.subVec3(r._pos,r._normal,$.mat4()),r._up,$.mat4())),children:[r._bitmapMesh=new Zi(w(r),{scale:[1,1,1],rotation:[-90,0,0],collidable:i.collidable,pickable:i.pickable,opacity:i.opacity,clippable:i.clippable,geometry:new Rn(w(r),ja({center:[0,0,0],xSize:1,zSize:1,xSegments:2,zSegments:2})),material:new Ln(w(r),{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:r._texture,emissiveMap:r._texture,backfaces:!0})})]}),i.image?r.image=i.image:i.src?r.src=i.src:i.imageData&&(r.imageData=i.imageData),r.scene._bitmapCreated(w(r)),r}return P(n,[{key:"visible",get:function(){return this._bitmapMesh.visible},set:function(e){this._bitmapMesh.visible=e}},{key:"image",get:function(){return this._image},set:function(e){this._image=e,this._image&&(this._texture.image=this._image,this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updateBitmapMeshScale())}},{key:"src",get:function(){return this._image.src},set:function(e){var t=this;if(e)switch(this._image.onload=function(){t._texture.image=t._image,t._imageSize[0]=t._image.width,t._imageSize[1]=t._image.height,t._updateBitmapMeshScale()},this._image.src=e,e.split(".").pop()){case"jpeg":case"jpg":this._type="jpg";break;case"png":this._type="png"}}},{key:"imageData",get:function(){var e=document.createElement("canvas"),t=e.getContext("2d");return e.width=this._image.width,e.height=this._image.height,t.drawImage(this._image,0,0),e.toDataURL("jpg"===this._type?"image/jpeg":"image/png")},set:function(e){var t=this;this._image.onload=function(){t._texture.image=image,t._imageSize[0]=image.width,t._imageSize[1]=image.height,t._updateBitmapMeshScale()},this._image.src=e}},{key:"type",get:function(){return this._type},set:function(e){"png"===(e=e||"jpg")&&"jpg"===e||(this.error("Unsupported value for `type` - supported types are `jpg` and `png` - defaulting to `jpg`"),e="jpg"),this._type=e}},{key:"pos",get:function(){return this._pos}},{key:"normal",get:function(){return this._normal}},{key:"up",get:function(){return this._up}},{key:"height",get:function(){return this._height},set:function(e){this._height=null==e?1:e,this._image&&this._updateBitmapMeshScale()}},{key:"collidable",get:function(){return this._bitmapMesh.collidable},set:function(e){this._bitmapMesh.collidable=!1!==e}},{key:"clippable",get:function(){return this._bitmapMesh.clippable},set:function(e){this._bitmapMesh.clippable=!1!==e}},{key:"pickable",get:function(){return this._bitmapMesh.pickable},set:function(e){this._bitmapMesh.pickable=!1!==e}},{key:"opacity",get:function(){return this._bitmapMesh.opacity},set:function(e){this._bitmapMesh.opacity=e}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._bitmapDestroyed(this)}},{key:"_updateBitmapMeshScale",value:function(){var e=this._imageSize[1]/this._imageSize[0];this._bitmapMesh.scale=[this._height/e,1,this._height]}}]),n}(),Ka=$.OBB3(),Ya=$.OBB3(),Xa=$.OBB3(),qa=function(){function e(t,n,r,i,a,s){var o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0;b(this,e),this.model=t,this.object=null,this.parent=null,this.transform=a,this.textureSet=s,this._matrixDirty=!1,this._matrixUpdateScheduled=!1,this.id=n,this.obb=null,this._aabbLocal=null,this._aabbWorld=$.AABB3(),this._aabbWorldDirty=!1,this.layer=o,this.portionId=l,this._color=new Uint8Array([r[0],r[1],r[2],i]),this._colorize=new Uint8Array([r[0],r[1],r[2],i]),this._colorizing=!1,this._transparent=i<255,this.numTriangles=0,this.origin=null,this.entity=null,a&&a._addMesh(this)}return P(e,[{key:"_sceneModelDirty",value:function(){this._aabbWorldDirty=!0,this.layer.aabbDirty=!0}},{key:"_transformDirty",value:function(){this._matrixDirty||this._matrixUpdateScheduled||(this.model._meshMatrixDirty(this),this._matrixDirty=!0,this._matrixUpdateScheduled=!0),this._aabbWorldDirty=!0,this.layer.aabbDirty=!0,this.entity&&this.entity._transformDirty()}},{key:"_updateMatrix",value:function(){this.transform&&this._matrixDirty&&this.layer.setMatrix(this.portionId,this.transform.worldMatrix),this._matrixDirty=!1,this._matrixUpdateScheduled=!1}},{key:"_finalize",value:function(e){this.layer.initFlags(this.portionId,e,this._transparent)}},{key:"_finalize2",value:function(){this.layer.flushInitFlags&&this.layer.flushInitFlags()}},{key:"_setVisible",value:function(e){this.layer.setVisible(this.portionId,e,this._transparent)}},{key:"_setColor",value:function(e){this._color[0]=e[0],this._color[1]=e[1],this._color[2]=e[2],this._colorizing||this.layer.setColor(this.portionId,this._color,!1)}},{key:"_setColorize",value:function(e){e?(this._colorize[0]=e[0],this._colorize[1]=e[1],this._colorize[2]=e[2],this.layer.setColor(this.portionId,this._colorize,false),this._colorizing=!0):(this.layer.setColor(this.portionId,this._color,false),this._colorizing=!1)}},{key:"_setOpacity",value:function(e,t){var n=e<255,r=this._transparent!==n;this._color[3]=e,this._colorize[3]=e,this._transparent=n,this._colorizing?this.layer.setColor(this.portionId,this._colorize):this.layer.setColor(this.portionId,this._color),r&&this.layer.setTransparent(this.portionId,t,n)}},{key:"_setOffset",value:function(e){this.layer.setOffset(this.portionId,e)}},{key:"_setHighlighted",value:function(e){this.layer.setHighlighted(this.portionId,e,this._transparent)}},{key:"_setXRayed",value:function(e){this.layer.setXRayed(this.portionId,e,this._transparent)}},{key:"_setSelected",value:function(e){this.layer.setSelected(this.portionId,e,this._transparent)}},{key:"_setEdges",value:function(e){this.layer.setEdges(this.portionId,e,this._transparent)}},{key:"_setClippable",value:function(e){this.layer.setClippable(this.portionId,e,this._transparent)}},{key:"_setCollidable",value:function(e){this.layer.setCollidable(this.portionId,e)}},{key:"_setPickable",value:function(e){this.layer.setPickable(this.portionId,e,this._transparent)}},{key:"_setCulled",value:function(e){this.layer.setCulled(this.portionId,e,this._transparent)}},{key:"canPickTriangle",value:function(){return!1}},{key:"drawPickTriangles",value:function(e,t){}},{key:"pickTriangleSurface",value:function(e){}},{key:"precisionRayPickSurface",value:function(e,t,n,r){return!!this.layer.precisionRayPickSurface&&this.layer.precisionRayPickSurface(this.portionId,e,t,n,r)}},{key:"canPickWorldPos",value:function(){return!0}},{key:"drawPickDepths",value:function(e){this.model.drawPickDepths(e)}},{key:"drawPickNormals",value:function(e){this.model.drawPickNormals(e)}},{key:"delegatePickedEntity",value:function(){return this.parent}},{key:"getEachVertex",value:function(e){this.layer.getEachVertex(this.portionId,e)}},{key:"aabb",get:function(){if(this._aabbWorldDirty){if($.AABB3ToOBB3(this._aabbLocal,Ka),this.transform?($.transformOBB3(this.transform.worldMatrix,Ka,Ya),$.transformOBB3(this.model.worldMatrix,Ya,Xa),$.OBB3ToAABB3(Xa,this._aabbWorld)):($.transformOBB3(this.model.worldMatrix,Ka,Ya),$.OBB3ToAABB3(Ya,this._aabbWorld)),this.origin){var e=this.origin;this._aabbWorld[0]+=e[0],this._aabbWorld[1]+=e[1],this._aabbWorld[2]+=e[2],this._aabbWorld[3]+=e[0],this._aabbWorld[4]+=e[1],this._aabbWorld[5]+=e[2]}this._aabbWorldDirty=!1}return this._aabbWorld},set:function(e){this._aabbLocal=e}},{key:"_destroy",value:function(){this.model.scene._renderer.putPickID(this.pickId)}}]),e}(),Ja=new(function(){function e(){b(this,e),this._uint8Arrays={},this._float32Arrays={}}return P(e,[{key:"_clear",value:function(){this._uint8Arrays={},this._float32Arrays={}}},{key:"getUInt8Array",value:function(e){var t=this._uint8Arrays[e];return t||(t=new Uint8Array(e),this._uint8Arrays[e]=t),t}},{key:"getFloat32Array",value:function(e){var t=this._float32Arrays[e];return t||(t=new Float32Array(e),this._float32Arrays[e]=t),t}}]),e}()),Za=0;function $a(){return Za++,Ja}var es={NOT_RENDERED:0,COLOR_OPAQUE:1,COLOR_TRANSPARENT:2,SILHOUETTE_HIGHLIGHTED:3,SILHOUETTE_SELECTED:4,SILHOUETTE_XRAYED:5,EDGES_COLOR_OPAQUE:6,EDGES_COLOR_TRANSPARENT:7,EDGES_HIGHLIGHTED:8,EDGES_SELECTED:9,EDGES_XRAYED:10,PICK:11},ts=new Float32Array([1,1,1,1]),ns=new Float32Array([0,0,0,1]),rs=$.vec4(),is=$.vec3(),as=$.vec3(),ss=$.mat4(),os=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.instancing,a=void 0!==i&&i,s=r.edges,o=void 0!==s&&s;b(this,e),this._scene=t,this._withSAO=n,this._instancing=a,this._edges=o,this._hash=this._getHash(),this._matricesUniformBlockBufferBindingPoint=0,this._matricesUniformBlockBuffer=this._scene.canvas.gl.createBuffer(),this._matricesUniformBlockBufferData=new Float32Array(96),this._vaoCache=new WeakMap,this._allocate()}return P(e,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"_buildShader",value:function(){return{vertex:this._buildVertexShader(),fragment:this._buildFragmentShader()}}},{key:"_buildVertexShader",value:function(){return[""]}},{key:"_buildFragmentShader",value:function(){return[""]}},{key:"_addMatricesUniformBlockLines",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.push("uniform Matrices {"),e.push(" mat4 worldMatrix;"),e.push(" mat4 viewMatrix;"),e.push(" mat4 projMatrix;"),e.push(" mat4 positionsDecodeMatrix;"),t&&(e.push(" mat4 worldNormalMatrix;"),e.push(" mat4 viewNormalMatrix;")),e.push("};"),e}},{key:"_addRemapClipPosLines",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.push("uniform vec2 drawingBufferSize;"),e.push("uniform vec2 pickClipPos;"),e.push("vec4 remapClipPos(vec4 clipPos) {"),e.push(" clipPos.xy /= clipPos.w;"),1===t?e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"):e.push(" clipPos.xy = (clipPos.xy - pickClipPos) * (drawingBufferSize / float(".concat(t,"));")),e.push(" clipPos.xy *= clipPos.w;"),e.push(" return clipPos;"),e.push("}"),e}},{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"setSectionPlanesStateUniforms",value:function(e){var t=this._scene,n=t.canvas.gl,r=e.model,i=e.layerIndex,a=t._sectionPlanesState.getNumAllocatedSectionPlanes(),s=t._sectionPlanesState.sectionPlanes.length;if(a>0)for(var o=t._sectionPlanesState.sectionPlanes,l=i*s,u=r.renderFlags,c=0;c0&&(this._uReflectionMap="reflectionMap"),n.lightMaps.length>0&&(this._uLightMap="lightMap"),this._uSectionPlanes=[];for(var o=0,l=e._sectionPlanesState.getNumAllocatedSectionPlanes();o3&&void 0!==arguments[3]?arguments[3]:{},i=r.colorUniform,a=void 0!==i&&i,s=r.incrementDrawState,o=void 0!==s&&s,l=vt.MAX_TEXTURE_IMAGE_UNITS,u=this._scene,c=u.canvas.gl,f=t._state,p=t.model,A=f.textureSet,d=f.origin,v=f.positionsDecodeMatrix,h=u._lightsState,I=u.pointsMaterial,y=p.scene.camera,m=y.viewNormalMatrix,w=y.project,g=e.pickViewMatrix||y.viewMatrix,E=p.position,T=p.rotationMatrix,b=p.rotationMatrixConjugate,D=p.worldNormalMatrix;if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e)),this._vaoCache.has(t)?c.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(f));var P=0,C=16;this._matricesUniformBlockBufferData.set(b,0);var _=0!==d[0]||0!==d[1]||0!==d[2],R=0!==E[0]||0!==E[1]||0!==E[2];if(_||R){var B=is;if(_){var O=$.transformPoint3(T,d,as);B[0]=O[0],B[1]=O[1],B[2]=O[2]}else B[0]=0,B[1]=0,B[2]=0;B[0]+=E[0],B[1]+=E[1],B[2]+=E[2],this._matricesUniformBlockBufferData.set(Oe(g,B,ss),P+=C)}else this._matricesUniformBlockBufferData.set(g,P+=C);if(this._matricesUniformBlockBufferData.set(e.pickProjMatrix||w.matrix,P+=C),this._matricesUniformBlockBufferData.set(v,P+=C),this._matricesUniformBlockBufferData.set(D,P+=C),this._matricesUniformBlockBufferData.set(m,P+=C),c.bindBuffer(c.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),c.bufferData(c.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,c.DYNAMIC_DRAW),c.bindBufferBase(c.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer),c.uniform1i(this._uRenderPass,n),this.setSectionPlanesStateUniforms(t),u.logarithmicDepthBufferEnabled){if(this._uLogDepthBufFC){var S=2/(Math.log(e.pickZFar+1)/Math.LN2);c.uniform1f(this._uLogDepthBufFC,S)}this._uZFar&&c.uniform1f(this._uZFar,u.camera.project.far)}if(this._uPickInvisible&&c.uniform1i(this._uPickInvisible,e.pickInvisible),this._uPickZNear&&c.uniform1f(this._uPickZNear,e.pickZNear),this._uPickZFar&&c.uniform1f(this._uPickZFar,e.pickZFar),this._uPickClipPos&&c.uniform2fv(this._uPickClipPos,e.pickClipPos),this._uDrawingBufferSize&&c.uniform2f(this._uDrawingBufferSize,c.drawingBufferWidth,c.drawingBufferHeight),this._uUVDecodeMatrix&&c.uniformMatrix3fv(this._uUVDecodeMatrix,!1,f.uvDecodeMatrix),this._uIntensityRange&&I.filterIntensity&&c.uniform2f(this._uIntensityRange,I.minIntensity,I.maxIntensity),this._uPointSize&&c.uniform1f(this._uPointSize,I.pointSize),this._uNearPlaneHeight){var N="ortho"===u.camera.projection?1:c.drawingBufferHeight/(2*Math.tan(.5*u.camera.perspective.fov*Math.PI/180));c.uniform1f(this._uNearPlaneHeight,N)}if(A){var L=A.colorTexture,x=A.metallicRoughnessTexture,M=A.emissiveTexture,F=A.normalsTexture,H=A.occlusionTexture;this._uColorMap&&L&&(this._program.bindTexture(this._uColorMap,L.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uMetallicRoughMap&&x&&(this._program.bindTexture(this._uMetallicRoughMap,x.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uEmissiveMap&&M&&(this._program.bindTexture(this._uEmissiveMap,M.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uNormalMap&&F&&(this._program.bindTexture(this._uNormalMap,F.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l),this._uAOMap&&H&&(this._program.bindTexture(this._uAOMap,H.texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l)}if(h.reflectionMaps.length>0&&h.reflectionMaps[0].texture&&this._uReflectionMap&&(this._program.bindTexture(this._uReflectionMap,h.reflectionMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l,e.bindTexture++),h.lightMaps.length>0&&h.lightMaps[0].texture&&this._uLightMap&&(this._program.bindTexture(this._uLightMap,h.lightMaps[0].texture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l,e.bindTexture++),this._withSAO){var U=u.sao,G=U.possible;if(G){var k=c.drawingBufferWidth,j=c.drawingBufferHeight;rs[0]=k,rs[1]=j,rs[2]=U.blendCutoff,rs[3]=U.blendFactor,c.uniform4fv(this._uSAOParams,rs),this._program.bindTexture(this._uOcclusionTexture,e.occlusionTexture,e.textureUnit),e.textureUnit=(e.textureUnit+1)%l,e.bindTexture++}}if(a){var V=this._edges?"edgeColor":"fillColor",Q=this._edges?"edgeAlpha":"fillAlpha";if(n===es["".concat(this._edges?"EDGES":"SILHOUETTE","_XRAYED")]){var W=u.xrayMaterial._state,z=W[V],K=W[Q];c.uniform4f(this._uColor,z[0],z[1],z[2],K)}else if(n===es["".concat(this._edges?"EDGES":"SILHOUETTE","_HIGHLIGHTED")]){var Y=u.highlightMaterial._state,X=Y[V],q=Y[Q];c.uniform4f(this._uColor,X[0],X[1],X[2],q)}else if(n===es["".concat(this._edges?"EDGES":"SILHOUETTE","_SELECTED")]){var J=u.selectedMaterial._state,Z=J[V],ee=J[Q];c.uniform4f(this._uColor,Z[0],Z[1],Z[2],ee)}else c.uniform4fv(this._uColor,this._edges?ns:ts)}this._draw({state:f,frameCtx:e,incrementDrawState:o}),c.bindVertexArray(null)}}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null,re.memory.programs--}}]),e}(),ls=function(e){h(n,os);var t=y(n);function n(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.edges,s=void 0!==a&&a;return b(this,n),t.call(this,e,r,{instancing:!1,edges:s})}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;if(this._edges)t.drawElements(t.LINES,n.edgeIndicesBuf.numItems,n.edgeIndicesBuf.itemType,0);else{var a=r.pickElementsCount||n.indicesBuf.numItems,s=r.pickElementsOffset?r.pickElementsOffset*n.indicesBuf.itemByteSize:0;t.drawElements(t.TRIANGLES,a,n.indicesBuf.itemType,s),i&&r.drawElements++}}}]),n}(),us=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e,t=this._scene,n=t._sectionPlanesState,r=t._lightsState,i=n.getNumAllocatedSectionPlanes()>0,a=[];a.push("#version 300 es"),a.push("// Triangles batching draw vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec3 normal;"),a.push("in vec4 color;"),a.push("in float flags;"),t.entityOffsetsEnabled&&a.push("in vec3 offset;"),this._addMatricesUniformBlockLines(a,!0),t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("uniform vec4 lightAmbient;");for(var s=0,o=r.lights.length;s= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),i&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;")),a.push("out vec4 vColor;"),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),t.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),a.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;");for(var l=0,u=r.lights.length;l0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching draw fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):r.push(" outColor = vColor;"),r.push("}"),r}}]),n}(),cs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching flat-shading draw vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._lightsState,n=e._sectionPlanesState,r=n.getNumAllocatedSectionPlanes()>0,i=[];if(i.push("#version 300 es"),i.push("// Triangles batching flat-shading draw fragment shader"),i.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),i.push("precision highp float;"),i.push("precision highp int;"),i.push("#else"),i.push("precision mediump float;"),i.push("precision mediump int;"),i.push("#endif"),e.logarithmicDepthBufferEnabled&&(i.push("in float isPerspective;"),i.push("uniform float logDepthBufFC;"),i.push("in float vFragDepth;")),this._withSAO&&(i.push("uniform sampler2D uOcclusionTexture;"),i.push("uniform vec4 uSAOParams;"),i.push("const float packUpscale = 256. / 255.;"),i.push("const float unpackDownScale = 255. / 256.;"),i.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),i.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),i.push("float unpackRGBToFloat( const in vec4 v ) {"),i.push(" return dot( v, unPackFactors );"),i.push("}")),r){i.push("in vec4 vWorldPosition;"),i.push("in float vFlags;");for(var a=0,s=n.getNumAllocatedSectionPlanes();a> 16 & 0xF) == 1;"),i.push(" if (clippable) {"),i.push(" float dist = 0.0;");for(var c=0,f=n.getNumAllocatedSectionPlanes();c 0.0) { "),i.push(" discard;"),i.push(" }"),i.push("}")}i.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),i.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),i.push("float lambertian = 1.0;"),i.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),i.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),i.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(var p=0,A=t.lights.length;p0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, color.a ));"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Triangles batching silhouette fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return n.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("outColor = vColor;"),a.push("}"),a}}]),n}(),ps=function(e){h(n,ls);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!1,edges:!0})}return P(n)}(),As=function(e){h(n,ps);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("uniform vec4 color;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(color.r, color.g, color.b, color.a);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// EdgesEmphasisRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),ds=function(e){h(n,ps);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!1})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry edges drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry edges drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),vs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry picking vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),this._addRemapClipPosLines(n),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vPickColor; "),r.push("}"),r}}]),n}(),hs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching pick depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),this._addRemapClipPosLines(n),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching pick depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),Is=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching pick normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec3 normal;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vWorldNormal;"),n.push("out vec4 outColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec3 worldNormal = octDecode(normal.xy); "),n.push(" vWorldNormal = worldNormal;"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching pick normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outNormal = ivec4(vWorldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),ys=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching occlusion vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles batching occlusion fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}]),n}(),ms=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec2 vHighPrecisionZW;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vHighPrecisionZW = gl_Position.zw;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching depth fragment shader"),r.push("precision highp float;"),r.push("precision highp int;"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),r.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),r.push("}"),r}}]),n}(),ws=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec3 normal;"),n.push("in vec4 color;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n,!0),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vViewNormal;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewNormal = viewNormal;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),gs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry shadow vertex shader"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 outColor;"),n.push("void main(void) {"),n.push(" int colorFlag = int(flags) & 0xF;"),n.push(" bool visible = (colorFlag > 0);"),n.push(" bool transparent = ((float(color.a) / 255.0) < 1.0);"),n.push(" if (!visible || transparent) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry shadow fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" outColor = encodeFloat( gl_FragCoord.z); "),n.push("}"),n}}]),n}(),Es=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=e._lightsState,r=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,a=[];return a.push("#version 300 es"),a.push("// Triangles batching quality draw vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("precision highp usampler2D;"),a.push("precision highp isampler2D;"),a.push("precision highp sampler2D;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("precision mediump usampler2D;"),a.push("precision mediump isampler2D;"),a.push("precision mediump sampler2D;"),a.push("#endif"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec3 normal;"),a.push("in vec4 color;"),a.push("in vec2 uv;"),a.push("in vec2 metallicRoughness;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),this._addMatricesUniformBlockLines(a,!0),a.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("vec3 octDecode(vec2 oct) {"),a.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),a.push(" if (v.z < 0.0) {"),a.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),a.push("out vec4 vViewPosition;"),a.push("out vec3 vViewNormal;"),a.push("out vec4 vColor;"),a.push("out vec2 vUV;"),a.push("out vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("out vec3 vWorldNormal;"),r&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;"),i&&a.push("out vec4 vClipPosition;")),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&a.push("worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),a.push("vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),a.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),a.push("vFragDepth = 1.0 + clipPos.w;")),r&&(a.push("vWorldPosition = worldPosition;"),a.push("vFlags = flags;"),i&&a.push("vClipPosition = clipPos;")),a.push("vViewPosition = viewPosition;"),a.push("vViewNormal = viewNormal;"),a.push("vColor = color;"),a.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),a.push("vMetallicRoughness = metallicRoughness;"),n.lightMaps.length>0&&a.push("vWorldNormal = worldNormal.xyz;"),a.push("gl_Position = clipPos;"),a.push("}"),a.push("}"),a}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e.gammaOutput,n=e._sectionPlanesState,r=e._lightsState,i=n.getNumAllocatedSectionPlanes()>0,a=n.clippingCaps,s=[];s.push("#version 300 es"),s.push("// Triangles batching quality draw fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform sampler2D uColorMap;"),s.push("uniform sampler2D uMetallicRoughMap;"),s.push("uniform sampler2D uEmissiveMap;"),s.push("uniform sampler2D uNormalMap;"),s.push("uniform sampler2D uAOMap;"),s.push("in vec4 vViewPosition;"),s.push("in vec3 vViewNormal;"),s.push("in vec4 vColor;"),s.push("in vec2 vUV;"),s.push("in vec2 vMetallicRoughness;"),r.lightMaps.length>0&&s.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(s,!0),r.reflectionMaps.length>0&&s.push("uniform samplerCube reflectionMap;"),r.lightMaps.length>0&&s.push("uniform samplerCube lightMap;"),s.push("uniform vec4 lightAmbient;");for(var o=0,l=r.lights.length;o0&&(s.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),s.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),s.push(" vec3 envMapColor = sRGBToLinear(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),s.push(" return envMapColor;"),s.push("}")),s.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),s.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),s.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),s.push("}"),s.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" return 1.0 / ( gl * gv );"),s.push("}"),s.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" return 0.5 / max( gv + gl, EPSILON );"),s.push("}"),s.push("float D_GGX(const in float alpha, const in float dotNH) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),s.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float alpha = ( roughness * roughness );"),s.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),s.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),s.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),s.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),s.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),s.push(" vec3 F = F_Schlick( specularColor, dotLH );"),s.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),s.push(" float D = D_GGX( alpha, dotNH );"),s.push(" return F * (G * D);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),s.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),s.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),s.push(" vec4 r = roughness * c0 + c1;"),s.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),s.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),s.push(" return specularColor * AB.x + AB.y;"),s.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(s.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(s.push(" vec3 irradiance = sRGBToLinear(texture(lightMap, geometry.worldNormal)).rgb;"),s.push(" irradiance *= PI;"),s.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(s.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),s.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),s.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),s.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),s.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),s.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),s.push("}")),s.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),s.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),s.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),s.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),s.push("}"),s.push("out vec4 outColor;"),s.push("void main(void) {"),i){s.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var p=0,A=n.getNumAllocatedSectionPlanes();p (0.002 * vClipPosition.w)) {"),s.push(" discard;"),s.push(" }"),s.push(" if (dist > 0.0) { "),s.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" return;"),s.push("}")):(s.push(" if (dist > 0.0) { "),s.push(" discard;"),s.push(" }")),s.push("}")}s.push("IncidentLight light;"),s.push("Material material;"),s.push("Geometry geometry;"),s.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),s.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),s.push("float opacity = float(vColor.a) / 255.0;"),s.push("vec3 baseColor = rgb;"),s.push("float specularF0 = 1.0;"),s.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),s.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),s.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),s.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),s.push("baseColor *= colorTexel.rgb;"),s.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),s.push("metallic *= metalRoughTexel.b;"),s.push("roughness *= metalRoughTexel.g;"),s.push("vec3 viewNormal = perturbNormal2Arb(vViewPosition.xyz, normalize(vViewNormal), vUV );"),s.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),s.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),s.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),s.push("geometry.position = vViewPosition.xyz;"),s.push("geometry.viewNormal = -normalize(viewNormal);"),s.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),r.lightMaps.length>0&&s.push("geometry.worldNormal = normalize(vWorldNormal);"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&s.push("computePBRLightMapping(geometry, material, reflectedLight);");for(var d=0,v=r.lights.length;d0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching pick flat normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Triangles batching pick flat normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("in vec4 vWorldPosition;"),n){r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),r.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),r.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),r.push(" outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),bs=function(e){h(n,ls);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Triangles batching color texture vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in vec2 uv;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),n.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("out vec2 vUV;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e.gammaOutput,n=e._lightsState,r=e._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Triangles batching color texture fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),e.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),a.push("uniform sampler2D uColorMap;"),this._withSAO&&(a.push("uniform sampler2D uOcclusionTexture;"),a.push("uniform vec4 uSAOParams;"),a.push("const float packUpscale = 256. / 255.;"),a.push("const float unpackDownScale = 255. / 256.;"),a.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),a.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),a.push("float unpackRGBToFloat( const in vec4 v ) {"),a.push(" return dot( v, unPackFactors );"),a.push("}")),a.push("uniform float gammaFactor;"),a.push("vec4 linearToLinear( in vec4 value ) {"),a.push(" return value;"),a.push("}"),a.push("vec4 sRGBToLinear( in vec4 value ) {"),a.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),a.push("}"),a.push("vec4 gammaToLinear( in vec4 value) {"),a.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),a.push("}"),t&&(a.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),a.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),a.push("}")),i){a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;");for(var s=0,o=r.getNumAllocatedSectionPlanes();s> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;");for(var f=0,p=r.getNumAllocatedSectionPlanes();f 0.0) { "),a.push(" discard;"),a.push(" }"),a.push("}")}a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;"),a.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),a.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),a.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );");for(var A=0,d=n.lights.length;A0,n=[];return n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Os=$.vec3(),Ss=$.vec3(),Ns=$.vec3(),Ls=$.vec3(),xs=$.mat4(),Ms=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=Os;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=Ss;if(l){var y=Ns;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,xs),(v=Ls)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),s.drawElements(s.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0),o.edgeIndicesBuf.unbind()):s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;var n=[];return n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Fs=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._silhouetteRenderer||(this._silhouetteRenderer=new fs(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new vs(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new hs(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Bs(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Ms(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new us(this._scene,!1)),this._colorRenderer}},{key:"colorRendererWithSAO",get:function(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new us(this._scene,!0)),this._colorRendererWithSAO}},{key:"flatColorRenderer",get:function(){return this._flatColorRenderer||(this._flatColorRenderer=new cs(this._scene,!1)),this._flatColorRenderer}},{key:"flatColorRendererWithSAO",get:function(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new cs(this._scene,!0)),this._flatColorRendererWithSAO}},{key:"colorTextureRenderer",get:function(){return this._colorTextureRenderer||(this._colorTextureRenderer=new bs(this._scene,!1)),this._colorTextureRenderer}},{key:"colorTextureRendererWithSAO",get:function(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new bs(this._scene,!0)),this._colorTextureRendererWithSAO}},{key:"pbrRenderer",get:function(){return this._pbrRenderer||(this._pbrRenderer=new Es(this._scene,!1)),this._pbrRenderer}},{key:"pbrRendererWithSAO",get:function(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new Es(this._scene,!0)),this._pbrRendererWithSAO}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new fs(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new ms(this._scene)),this._depthRenderer}},{key:"normalsRenderer",get:function(){return this._normalsRenderer||(this._normalsRenderer=new ws(this._scene)),this._normalsRenderer}},{key:"edgesRenderer",get:function(){return this._edgesRenderer||(this._edgesRenderer=new As(this._scene)),this._edgesRenderer}},{key:"edgesColorRenderer",get:function(){return this._edgesColorRenderer||(this._edgesColorRenderer=new ds(this._scene)),this._edgesColorRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new vs(this._scene)),this._pickMeshRenderer}},{key:"pickNormalsRenderer",get:function(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Is(this._scene)),this._pickNormalsRenderer}},{key:"pickNormalsFlatRenderer",get:function(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new Ts(this._scene)),this._pickNormalsFlatRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new hs(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new ys(this._scene)),this._occlusionRenderer}},{key:"shadowRenderer",get:function(){return this._shadowRenderer||(this._shadowRenderer=new gs(this._scene)),this._shadowRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Ms(this._scene)),this._snapRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Bs(this._scene)),this._snapInitRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Hs={};var Us=65536,Gs=5e6,ks=function(){function e(){b(this,e)}return P(e,[{key:"doublePrecisionEnabled",get:function(){return $.getDoublePrecisionEnabled()},set:function(e){$.setDoublePrecisionEnabled(e)}},{key:"maxDataTextureHeight",get:function(){return Us},set:function(e){(e=1024*Math.ceil(e/1024))>4096?e=4096:e<1024&&(e=1024),Us=e}},{key:"maxGeometryBatchSize",get:function(){return Gs},set:function(e){e<1e5?e=1e5:e>5e6&&(e=5e6),Gs=e}}]),e}(),js=new ks,Vs=P((function e(){b(this,e),this.maxVerts=js.maxGeometryBatchSize,this.maxIndices=3*js.maxGeometryBatchSize,this.positions=[],this.colors=[],this.uv=[],this.metallicRoughness=[],this.normals=[],this.pickColors=[],this.offsets=[],this.indices=[],this.edgeIndices=[]})),Qs=$.mat4(),Ws=$.mat4();function zs(e,t,n){for(var r=e.length,i=new Uint16Array(r),a=t[0],s=t[1],o=t[2],l=t[3]-a,u=t[4]-s,c=t[5]-o,f=65525,p=f/l,A=f/u,d=f/c,v=function(e){return e>=0?e:0},h=0;h=0?1:-1),s=(1-Math.abs(r))*(i>=0?1:-1),r=a,i=s}return new Int8Array([Math[t](127.5*r+(r<0?-1:0)),Math[n](127.5*i+(i<0?-1:0))])}function Xs(e){var t=e[0],n=e[1];t/=t<0?127:128,n/=n<0?127:128;var r=1-Math.abs(t)-Math.abs(n);r<0&&(t=(1-Math.abs(n))*(t>=0?1:-1),n=(1-Math.abs(t))*(n>=0?1:-1));var i=Math.sqrt(t*t+n*n+r*r);return[t/i,n/i,r/i]}var qs=$.mat4(),Js=$.mat4(),Zs=$.vec4([0,0,0,1]),$s=$.vec3(),eo=$.vec3(),to=$.vec3(),no=$.vec3(),ro=$.vec3(),io=$.vec3(),ao=$.vec3(),so=function(){function e(t){var n,r,i;b(this,e),console.info("Creating VBOBatchingTrianglesLayer"),this.model=t.model,this.sortId="TrianglesBatchingLayer"+(t.solid?"-solid":"-surface")+(t.autoNormals?"-autonormals":"-normals")+(t.textureSet&&t.textureSet.colorTexture?"-colorTexture":"")+(t.textureSet&&t.textureSet.metallicRoughnessTexture?"-metallicRoughnessTexture":""),this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Hs[r])||(i=new Fs(n),Hs[r]=i,i._compile(),i.eagerCreateRenders(),n.on("compile",(function(){i._compile(),i.eagerCreateRenders()})),n.on("destroyed",(function(){delete Hs[r],i._destroy()}))),i),this._buffer=new Vs(t.maxGeometryBatchSize),this._scratchMemory=t.scratchMemory,this._state=new zt({origin:$.vec3(),positionsBuf:null,offsetsBuf:null,normalsBuf:null,colorsBuf:null,uvBuf:null,metallicRoughnessBuf:null,flagsBuf:null,indicesBuf:null,edgeIndicesBuf:null,positionsDecodeMatrix:null,uvDecodeMatrix:null,textureSet:t.textureSet,pbrSupported:!1}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=$.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,t.positionsDecodeMatrix&&(this._state.positionsDecodeMatrix=$.mat4(t.positionsDecodeMatrix)),t.uvDecodeMatrix?(this._state.uvDecodeMatrix=$.mat3(t.uvDecodeMatrix),this._preCompressedUVsExpected=!0):this._preCompressedUVsExpected=!1,t.origin&&this._state.origin.set(t.origin),this.solid=!!t.solid}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0)for(var P=0,C=s.length;P0){var _=qs;I?$.inverseMat4($.transposeMat4(I,Js),_):$.identityMat4(_,_),function(e,t,n,r,i){function a(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}var s,o,l,u,c,f=new Float32Array([0,0,0,0]),p=new Float32Array([0,0,0,0]);for(c=0;cu&&(o=s,u=l),(l=a(p,Xs(s=Ys(p,"floor","ceil"))))>u&&(o=s,u=l),(l=a(p,Xs(s=Ys(p,"ceil","ceil"))))>u&&(o=s,u=l),r[i+c+0]=o[0],r[i+c+1]=o[1],r[i+c+2]=0}(_,a,a.length,w.normals,w.normals.length)}if(u)for(var R=0,B=u.length;R0)for(var k=0,j=o.length;k0)for(var V=0,Q=l.length;V0){var r=this._state.positionsDecodeMatrix?new Uint16Array(n.positions):zs(n.positions,this._modelAABB,this._state.positionsDecodeMatrix=$.mat4());if(e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,r,r.length,3,t.STATIC_DRAW),this.model.scene.pickSurfacePrecisionEnabled)for(var i=0,a=this._portions.length;i0){var u=new Int8Array(n.normals);e.normalsBuf=new Pt(t,t.ARRAY_BUFFER,u,n.normals.length,3,t.STATIC_DRAW,!0)}if(n.colors.length>0){var c=new Uint8Array(n.colors);e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,c,n.colors.length,4,t.DYNAMIC_DRAW,!1)}if(n.uv.length>0)if(e.uvDecodeMatrix){e.uvBuf=new Pt(t,t.ARRAY_BUFFER,n.uv,n.uv.length,2,t.STATIC_DRAW,!1)}else{var f=Pn.getUVBounds(n.uv),p=Pn.compressUVs(n.uv,f.min,f.max),A=p.quantized;e.uvDecodeMatrix=$.mat3(p.decodeMatrix),e.uvBuf=new Pt(t,t.ARRAY_BUFFER,A,A.length,2,t.STATIC_DRAW,!1)}if(n.metallicRoughness.length>0){var d=new Uint8Array(n.metallicRoughness);e.metallicRoughnessBuf=new Pt(t,t.ARRAY_BUFFER,d,n.metallicRoughness.length,2,t.STATIC_DRAW,!1)}if(n.positions.length>0){var v=n.positions.length/3,h=new Float32Array(v);e.flagsBuf=new Pt(t,t.ARRAY_BUFFER,h,h.length,1,t.DYNAMIC_DRAW,!1)}if(n.pickColors.length>0){var I=new Uint8Array(n.pickColors);e.pickColorsBuf=new Pt(t,t.ARRAY_BUFFER,I,n.pickColors.length,4,t.STATIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&n.offsets.length>0){var y=new Float32Array(n.offsets);e.offsetsBuf=new Pt(t,t.ARRAY_BUFFER,y,n.offsets.length,3,t.DYNAMIC_DRAW)}if(n.indices.length>0){var m=new Uint32Array(n.indices);e.indicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,m,n.indices.length,1,t.STATIC_DRAW)}if(n.edgeIndices.length>0){var w=new Uint32Array(n.edgeIndices);e.edgeIndicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,w,n.edgeIndices.length,1,t.STATIC_DRAW)}this._state.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&e.textureSet&&e.textureSet.colorTexture&&e.textureSet.metallicRoughnessTexture),this._state.colorTextureSupported=!!e.uvBuf&&!!e.textureSet&&!!e.textureSet.colorTexture,this._buffer=null,this._finalized=!0}}},{key:"isEmpty",value:function(){return!this._state.indicesBuf}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,!0)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";for(var n=e,r=this._portions[n],i=4*r.vertsBaseIndex,a=4*r.numVerts,s=this._scratchMemory.getUInt8Array(a),o=t[0],l=t[1],u=t[2],c=t[3],f=0;f3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=e,o=this._portions[s],l=o.vertsBaseIndex,u=o.numVerts,c=l,f=u,p=!!(t&Me),A=!!(t&ke),d=!!(t&je),v=!!(t&Ve),h=!!(t&Qe),I=!!(t&He),y=!!(t&Fe);i=!p||y||A||d&&!this.model.scene.highlightMaterial.glowThrough||v&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!p||y?es.NOT_RENDERED:v?es.SILHOUETTE_SELECTED:d?es.SILHOUETTE_HIGHLIGHTED:A?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var m=0;m=!p||y?es.NOT_RENDERED:v?es.EDGES_SELECTED:d?es.EDGES_HIGHLIGHTED:A?es.EDGES_XRAYED:h?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED;var w=p&&!y&&I?es.PICK:es.NOT_RENDERED,g=t&Ue?1:0;if(r){this._deferredFlagValues||(this._deferredFlagValues=new Float32Array(this._numVerts));for(var E=c,T=c+f;EI)&&(I=b,r.set(y),i&&$.triangleNormal(A,d,v,i),h=!0)}}return h&&i&&($.transformVec3(this.model.worldNormalMatrix,i,i),$.normalizeVec3(i)),h}},{key:"destroy",value:function(){var e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.normalsBuf&&(e.normalsBuf.destroy(),e.normalsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.indicesBuf&&(e.indicesBuf.destroy(),e.indicessBuf=null),e.edgeIndicesBuf&&(e.edgeIndicesBuf.destroy(),e.edgeIndicessBuf=null),e.destroy()}}]),e}(),oo=function(e){h(n,os);var t=y(n);function n(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.edges,s=void 0!==a&&a;return b(this,n),t.call(this,e,r,{instancing:!0,edges:s})}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;this._edges?t.drawElementsInstanced(t.LINES,n.edgeIndicesBuf.numItems,n.edgeIndicesBuf.itemType,0,n.numInstances):(t.drawElementsInstanced(t.TRIANGLES,n.indicesBuf.numItems,n.indicesBuf.itemType,0,n.numInstances),i&&r.drawElements++)}}]),n}(),lo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e,t,n,r=this._scene,i=r._sectionPlanesState,a=r._lightsState,s=i.getNumAllocatedSectionPlanes()>0,o=[];for(o.push("#version 300 es"),o.push("// Instancing geometry drawing vertex shader"),o.push("uniform int renderPass;"),o.push("in vec3 position;"),o.push("in vec2 normal;"),o.push("in vec4 color;"),o.push("in float flags;"),r.entityOffsetsEnabled&&o.push("in vec3 offset;"),o.push("in vec4 modelMatrixCol0;"),o.push("in vec4 modelMatrixCol1;"),o.push("in vec4 modelMatrixCol2;"),o.push("in vec4 modelNormalMatrixCol0;"),o.push("in vec4 modelNormalMatrixCol1;"),o.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(o,!0),r.logarithmicDepthBufferEnabled&&(o.push("uniform float logDepthBufFC;"),o.push("out float vFragDepth;"),o.push("bool isPerspectiveMatrix(mat4 m) {"),o.push(" return (m[2][3] == - 1.0);"),o.push("}"),o.push("out float isPerspective;")),o.push("uniform vec4 lightAmbient;"),e=0,t=a.lights.length;e= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),o.push(" }"),o.push(" return normalize(v);"),o.push("}"),s&&(o.push("out vec4 vWorldPosition;"),o.push("out float vFlags;")),o.push("out vec4 vColor;"),o.push("void main(void) {"),o.push("int colorFlag = int(flags) & 0xF;"),o.push("if (colorFlag != renderPass) {"),o.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),o.push("} else {"),o.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),o.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),r.entityOffsetsEnabled&&o.push("worldPosition.xyz = worldPosition.xyz + offset;"),o.push("vec4 viewPosition = viewMatrix * worldPosition; "),o.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),o.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 0.0);"),o.push("vec3 viewNormal = normalize(vec4(viewNormalMatrix * worldNormal).xyz);"),o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),e=0,t=a.lights.length;e0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):r.push(" outColor = vColor;"),r.push("}"),r}}]),n}(),uo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry flat-shading drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=n._lightsState,a=r.getNumAllocatedSectionPlanes()>0,s=[];if(s.push("#version 300 es"),s.push("// Instancing geometry flat-shading drawing fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),n.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),this._withSAO&&(s.push("uniform sampler2D uOcclusionTexture;"),s.push("uniform vec4 uSAOParams;"),s.push("const float packUpscale = 256. / 255.;"),s.push("const float unpackDownScale = 255. / 256.;"),s.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),s.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),s.push("float unpackRGBToFloat( const in vec4 v ) {"),s.push(" return dot( v, unPackFactors );"),s.push("}")),a){s.push("in vec4 vWorldPosition;"),s.push("in float vFlags;");for(var o=0,l=r.getNumAllocatedSectionPlanes();o> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var c=0,f=r.getNumAllocatedSectionPlanes();c 0.0) { "),s.push(" discard;"),s.push(" }"),s.push("}")}for(s.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),s.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),s.push("float lambertian = 1.0;"),s.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),s.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),s.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),e=0,t=i.lights.length;e0,n=[];return n.push("#version 300 es"),n.push("// Instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 color;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 silhouetteColor;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing fill fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),fo=function(e){h(n,oo);var t=y(n);function n(e,r){return b(this,n),t.call(this,e,r,{instancing:!0,edges:!0})}return P(n)}(),po=function(e){h(n,fo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// EdgesEmphasisRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("uniform vec4 color;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(color.r, color.g, color.b, color.a);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// EdgesEmphasisRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),Ao=function(e){h(n,fo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!1})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// EdgesColorRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeFlag = int(flags) >> 8 & 0xF;"),n.push("if (edgeFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(float(color.r*0.5) / 255.0, float(color.g*0.5) / 255.0, float(color.b*0.5) / 255.0, float(color.a) / 255.0);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// EdgesColorRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),vo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry picking vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 pickColor;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry picking fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vPickColor; "),r.push("}"),r}}]),n}(),ho=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry depth vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push(" vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),Io=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec2 normal;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("in vec4 modelNormalMatrixCol0;"),n.push("in vec4 modelNormalMatrixCol1;"),n.push("in vec4 modelNormalMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vWorldNormal;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 worldNormal = vec3(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2));"),n.push(" vWorldNormal = worldNormal;"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outNormal = ivec4(vWorldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),yo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// TrianglesInstancingOcclusionRenderer vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesInstancingOcclusionRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}}]),n}(),mo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry depth drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec2 vHighPrecisionZW;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vHighPrecisionZW = gl_Position.zw;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Instancing geometry depth drawing fragment shader"),a.push("precision highp float;"),a.push("precision highp int;"),n.logarithmicDepthBufferEnabled&&(a.push("in float isPerspective;"),a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return n.logarithmicDepthBufferEnabled&&a.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),a.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),a.push("}"),a}}]),n}(),wo=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry normals drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec3 normal;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n,!0),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec3 vViewNormal;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push(" vViewNormal = viewNormal;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),go=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry shadow drawing vertex shader"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(n),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("bool visible = (colorFlag > 0);"),n.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),n.push("if (!visible || transparent) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),Eo={3e3:"linearToLinear",3001:"sRGBToLinear"},To=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=e._lightsState,r=t.getNumAllocatedSectionPlanes()>0,i=t.clippingCaps,a=[];return a.push("#version 300 es"),a.push("// Instancing geometry quality drawing vertex shader"),a.push("uniform int renderPass;"),a.push("in vec3 position;"),a.push("in vec3 normal;"),a.push("in vec4 color;"),a.push("in vec2 uv;"),a.push("in vec2 metallicRoughness;"),a.push("in float flags;"),e.entityOffsetsEnabled&&a.push("in vec3 offset;"),a.push("in vec4 modelMatrixCol0;"),a.push("in vec4 modelMatrixCol1;"),a.push("in vec4 modelMatrixCol2;"),a.push("in vec4 modelNormalMatrixCol0;"),a.push("in vec4 modelNormalMatrixCol1;"),a.push("in vec4 modelNormalMatrixCol2;"),this._addMatricesUniformBlockLines(a,!0),a.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("out float isPerspective;")),a.push("vec3 octDecode(vec2 oct) {"),a.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),a.push(" if (v.z < 0.0) {"),a.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),a.push(" }"),a.push(" return normalize(v);"),a.push("}"),a.push("out vec4 vViewPosition;"),a.push("out vec3 vViewNormal;"),a.push("out vec4 vColor;"),a.push("out vec2 vUV;"),a.push("out vec2 vMetallicRoughness;"),n.lightMaps.length>0&&a.push("out vec3 vWorldNormal;"),r&&(a.push("out vec4 vWorldPosition;"),a.push("out float vFlags;"),i&&a.push("out vec4 vClipPosition;")),a.push("void main(void) {"),a.push("int colorFlag = int(flags) & 0xF;"),a.push("if (colorFlag != renderPass) {"),a.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),a.push("} else {"),a.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),a.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&a.push(" worldPosition.xyz = worldPosition.xyz + offset;"),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec4 modelNormal = vec4(octDecode(normal.xy), 0.0); "),a.push("vec4 worldNormal = worldNormalMatrix * vec4(dot(modelNormal, modelNormalMatrixCol0), dot(modelNormal, modelNormalMatrixCol1), dot(modelNormal, modelNormalMatrixCol2), 1.0);"),a.push("vec3 viewNormal = vec4(viewNormalMatrix * worldNormal).xyz;"),a.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(a.push("vFragDepth = 1.0 + clipPos.w;"),a.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),r&&(a.push("vWorldPosition = worldPosition;"),a.push("vFlags = flags;"),i&&a.push("vClipPosition = clipPos;")),a.push("vViewPosition = viewPosition;"),a.push("vViewNormal = viewNormal;"),a.push("vColor = color;"),a.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),a.push("vMetallicRoughness = metallicRoughness;"),n.lightMaps.length>0&&a.push("vWorldNormal = worldNormal.xyz;"),a.push("gl_Position = clipPos;"),a.push("}"),a.push("}"),a}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e.gammaOutput,n=e._sectionPlanesState,r=e._lightsState,i=n.getNumAllocatedSectionPlanes()>0,a=n.clippingCaps,s=[];s.push("#version 300 es"),s.push("// Instancing geometry quality drawing fragment shader"),s.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),s.push("precision highp float;"),s.push("precision highp int;"),s.push("#else"),s.push("precision mediump float;"),s.push("precision mediump int;"),s.push("#endif"),e.logarithmicDepthBufferEnabled&&(s.push("in float isPerspective;"),s.push("uniform float logDepthBufFC;"),s.push("in float vFragDepth;")),s.push("uniform sampler2D uColorMap;"),s.push("uniform sampler2D uMetallicRoughMap;"),s.push("uniform sampler2D uEmissiveMap;"),s.push("uniform sampler2D uNormalMap;"),this._withSAO&&(s.push("uniform sampler2D uOcclusionTexture;"),s.push("uniform vec4 uSAOParams;"),s.push("const float packUpscale = 256. / 255.;"),s.push("const float unpackDownScale = 255. / 256.;"),s.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),s.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),s.push("float unpackRGBToFloat( const in vec4 v ) {"),s.push(" return dot( v, unPackFactors );"),s.push("}")),r.reflectionMaps.length>0&&s.push("uniform samplerCube reflectionMap;"),r.lightMaps.length>0&&s.push("uniform samplerCube lightMap;"),s.push("uniform vec4 lightAmbient;");for(var o=0,l=r.lights.length;o0&&s.push("in vec3 vWorldNormal;"),this._addMatricesUniformBlockLines(s,!0),s.push("#define PI 3.14159265359"),s.push("#define RECIPROCAL_PI 0.31830988618"),s.push("#define RECIPROCAL_PI2 0.15915494"),s.push("#define EPSILON 1e-6"),s.push("#define saturate(a) clamp( a, 0.0, 1.0 )"),s.push("vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {"),s.push(" vec3 texel = texture( uNormalMap, uv ).xyz;"),s.push(" if (texel.r == 0.0 && texel.g == 0.0 && texel.b == 0.0) {"),s.push(" return normalize(surf_norm );"),s.push(" }"),s.push(" vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );"),s.push(" vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );"),s.push(" vec2 st0 = dFdx( uv.st );"),s.push(" vec2 st1 = dFdy( uv.st );"),s.push(" vec3 S = normalize( q0 * st1.t - q1 * st0.t );"),s.push(" vec3 T = normalize( -q0 * st1.s + q1 * st0.s );"),s.push(" vec3 N = normalize( surf_norm );"),s.push(" vec3 mapN = texel.xyz * 2.0 - 1.0;"),s.push(" mat3 tsn = mat3( S, T, N );"),s.push(" return normalize( tsn * mapN );"),s.push("}"),s.push("vec3 inverseTransformDirection(in vec3 dir, in mat4 matrix) {"),s.push(" return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );"),s.push("}"),s.push("struct IncidentLight {"),s.push(" vec3 color;"),s.push(" vec3 direction;"),s.push("};"),s.push("struct ReflectedLight {"),s.push(" vec3 diffuse;"),s.push(" vec3 specular;"),s.push("};"),s.push("struct Geometry {"),s.push(" vec3 position;"),s.push(" vec3 viewNormal;"),s.push(" vec3 worldNormal;"),s.push(" vec3 viewEyeDir;"),s.push("};"),s.push("struct Material {"),s.push(" vec3 diffuseColor;"),s.push(" float specularRoughness;"),s.push(" vec3 specularColor;"),s.push(" float shine;"),s.push("};"),s.push("float GGXRoughnessToBlinnExponent(const in float ggxRoughness) {"),s.push(" float r = ggxRoughness + 0.0001;"),s.push(" return (2.0 / (r * r) - 2.0);"),s.push("}"),s.push("float getSpecularMIPLevel(const in float blinnShininessExponent, const in int maxMIPLevel) {"),s.push(" float maxMIPLevelScalar = float( maxMIPLevel );"),s.push(" float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( ( blinnShininessExponent * blinnShininessExponent ) + 1.0 );"),s.push(" return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );"),s.push("}"),r.reflectionMaps.length>0&&(s.push("vec3 getLightProbeIndirectRadiance(const in vec3 reflectVec, const in float blinnShininessExponent, const in int maxMIPLevel) {"),s.push(" float mipLevel = 0.5 * getSpecularMIPLevel(blinnShininessExponent, maxMIPLevel);"),s.push(" vec3 envMapColor = "+Eo[r.reflectionMaps[0].encoding]+"(texture(reflectionMap, reflectVec, mipLevel)).rgb;"),s.push(" return envMapColor;"),s.push("}")),s.push("vec3 F_Schlick(const in vec3 specularColor, const in float dotLH) {"),s.push(" float fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );"),s.push(" return ( 1.0 - specularColor ) * fresnel + specularColor;"),s.push("}"),s.push("float G_GGX_Smith(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" return 1.0 / ( gl * gv );"),s.push("}"),s.push("float G_GGX_SmithCorrelated(const in float alpha, const in float dotNL, const in float dotNV) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * ( dotNV * dotNV ) );"),s.push(" float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * ( dotNL * dotNL ) );"),s.push(" return 0.5 / max( gv + gl, EPSILON );"),s.push("}"),s.push("float D_GGX(const in float alpha, const in float dotNH) {"),s.push(" float a2 = ( alpha * alpha );"),s.push(" float denom = ( dotNH * dotNH) * ( a2 - 1.0 ) + 1.0;"),s.push(" return RECIPROCAL_PI * a2 / ( denom * denom);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX(const in IncidentLight incidentLight, const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float alpha = ( roughness * roughness );"),s.push(" vec3 halfDir = normalize( incidentLight.direction + geometry.viewEyeDir );"),s.push(" float dotNL = saturate( dot( geometry.viewNormal, incidentLight.direction ) );"),s.push(" float dotNV = saturate( dot( geometry.viewNormal, geometry.viewEyeDir ) );"),s.push(" float dotNH = saturate( dot( geometry.viewNormal, halfDir ) );"),s.push(" float dotLH = saturate( dot( incidentLight.direction, halfDir ) );"),s.push(" vec3 F = F_Schlick( specularColor, dotLH );"),s.push(" float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );"),s.push(" float D = D_GGX( alpha, dotNH );"),s.push(" return F * (G * D);"),s.push("}"),s.push("vec3 BRDF_Specular_GGX_Environment(const in Geometry geometry, const in vec3 specularColor, const in float roughness) {"),s.push(" float dotNV = saturate(dot(geometry.viewNormal, geometry.viewEyeDir));"),s.push(" const vec4 c0 = vec4( -1, -0.0275, -0.572, 0.022);"),s.push(" const vec4 c1 = vec4( 1, 0.0425, 1.04, -0.04);"),s.push(" vec4 r = roughness * c0 + c1;"),s.push(" float a004 = min(r.x * r.x, exp2(-9.28 * dotNV)) * r.x + r.y;"),s.push(" vec2 AB = vec2(-1.04, 1.04) * a004 + r.zw;"),s.push(" return specularColor * AB.x + AB.y;"),s.push("}"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&(s.push("void computePBRLightMapping(const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),r.lightMaps.length>0&&(s.push(" vec3 irradiance = "+Eo[r.lightMaps[0].encoding]+"(texture(lightMap, geometry.worldNormal)).rgb;"),s.push(" irradiance *= PI;"),s.push(" vec3 diffuseBRDFContrib = (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.diffuse += irradiance * diffuseBRDFContrib;")),r.reflectionMaps.length>0&&(s.push(" vec3 reflectVec = reflect(geometry.viewEyeDir, geometry.viewNormal);"),s.push(" reflectVec = inverseTransformDirection(reflectVec, viewMatrix);"),s.push(" float blinnExpFromRoughness = GGXRoughnessToBlinnExponent(material.specularRoughness);"),s.push(" vec3 radiance = getLightProbeIndirectRadiance(reflectVec, blinnExpFromRoughness, 8);"),s.push(" vec3 specularBRDFContrib = BRDF_Specular_GGX_Environment(geometry, material.specularColor, material.specularRoughness);"),s.push(" reflectedLight.specular += radiance * specularBRDFContrib;")),s.push("}")),s.push("void computePBRLighting(const in IncidentLight incidentLight, const in Geometry geometry, const in Material material, inout ReflectedLight reflectedLight) {"),s.push(" float dotNL = saturate(dot(geometry.viewNormal, incidentLight.direction));"),s.push(" vec3 irradiance = dotNL * incidentLight.color * PI;"),s.push(" reflectedLight.diffuse += irradiance * (RECIPROCAL_PI * material.diffuseColor);"),s.push(" reflectedLight.specular += irradiance * BRDF_Specular_GGX(incidentLight, geometry, material.specularColor, material.specularRoughness);"),s.push("}"),s.push("out vec4 outColor;"),s.push("void main(void) {"),i){s.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),s.push(" if (clippable) {"),s.push(" float dist = 0.0;");for(var p=0,A=n.getNumAllocatedSectionPlanes();p (0.002 * vClipPosition.w)) {"),s.push(" discard;"),s.push(" }"),s.push(" if (dist > 0.0) { "),s.push(" outColor=vec4(1.0, 0.0, 0.0, 1.0);"),e.logarithmicDepthBufferEnabled&&s.push(" gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),s.push(" return;"),s.push("}")):(s.push(" if (dist > 0.0) { "),s.push(" discard;"),s.push(" }")),s.push("}")}s.push("IncidentLight light;"),s.push("Material material;"),s.push("Geometry geometry;"),s.push("ReflectedLight reflectedLight = ReflectedLight(vec3(0.0,0.0,0.0), vec3(0.0,0.0,0.0));"),s.push("vec3 rgb = (vec3(float(vColor.r) / 255.0, float(vColor.g) / 255.0, float(vColor.b) / 255.0));"),s.push("float opacity = float(vColor.a) / 255.0;"),s.push("vec3 baseColor = rgb;"),s.push("float specularF0 = 1.0;"),s.push("float metallic = float(vMetallicRoughness.r) / 255.0;"),s.push("float roughness = float(vMetallicRoughness.g) / 255.0;"),s.push("float dielectricSpecular = 0.16 * specularF0 * specularF0;"),s.push("vec4 colorTexel = sRGBToLinear(texture(uColorMap, vUV));"),s.push("baseColor *= colorTexel.rgb;"),s.push("vec3 metalRoughTexel = texture(uMetallicRoughMap, vUV).rgb;"),s.push("metallic *= metalRoughTexel.b;"),s.push("roughness *= metalRoughTexel.g;"),s.push("vec3 viewNormal = perturbNormal2Arb( vViewPosition.xyz, normalize(vViewNormal), vUV );"),s.push("material.diffuseColor = baseColor * (1.0 - dielectricSpecular) * (1.0 - metallic);"),s.push("material.specularRoughness = clamp(roughness, 0.04, 1.0);"),s.push("material.specularColor = mix(vec3(dielectricSpecular), baseColor, metallic);"),s.push("geometry.position = vViewPosition.xyz;"),s.push("geometry.viewNormal = -normalize(viewNormal);"),s.push("geometry.viewEyeDir = normalize(vViewPosition.xyz);"),r.lightMaps.length>0&&s.push("geometry.worldNormal = normalize(vWorldNormal);"),(r.lightMaps.length>0||r.reflectionMaps.length>0)&&s.push("computePBRLightMapping(geometry, material, reflectedLight);");for(var d=0,v=r.lights.length;d0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry normals vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),this._addRemapClipPosLines(n,3),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&n.push("out float vFlags;"),n.push("out vec4 vWorldPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&n.push("vFlags = flags;"),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Batched geometry normals fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("in vec4 vWorldPosition;"),n){r.push("in float vFlags;");for(var i=0;i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),r.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),r.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),r.push(" outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),r.push("}"),r}}]),n}(),Do=function(e){h(n,oo);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){var e=this._scene;return[e.gammaOutput,e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry drawing vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in vec2 uv;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),n.push("uniform mat3 uvDecodeMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vViewPosition;"),n.push("out vec4 vColor;"),n.push("out vec2 vUV;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vViewPosition = viewPosition;"),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),n.push("vUV = (uvDecodeMatrix * vec3(uv, 1.0)).xy;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n.gammaOutput,i=n._sectionPlanesState,a=n._lightsState,s=i.getNumAllocatedSectionPlanes()>0,o=[];if(o.push("#version 300 es"),o.push("// Instancing geometry drawing fragment shader"),o.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),o.push("precision highp float;"),o.push("precision highp int;"),o.push("#else"),o.push("precision mediump float;"),o.push("precision mediump int;"),o.push("#endif"),n.logarithmicDepthBufferEnabled&&(o.push("in float isPerspective;"),o.push("uniform float logDepthBufFC;"),o.push("in float vFragDepth;")),o.push("uniform sampler2D uColorMap;"),this._withSAO&&(o.push("uniform sampler2D uOcclusionTexture;"),o.push("uniform vec4 uSAOParams;"),o.push("const float packUpscale = 256. / 255.;"),o.push("const float unpackDownScale = 255. / 256.;"),o.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),o.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),o.push("float unpackRGBToFloat( const in vec4 v ) {"),o.push(" return dot( v, unPackFactors );"),o.push("}")),o.push("uniform float gammaFactor;"),o.push("vec4 linearToLinear( in vec4 value ) {"),o.push(" return value;"),o.push("}"),o.push("vec4 sRGBToLinear( in vec4 value ) {"),o.push(" return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.w );"),o.push("}"),o.push("vec4 gammaToLinear( in vec4 value) {"),o.push(" return vec4( pow( value.xyz, vec3( gammaFactor ) ), value.w );"),o.push("}"),r&&(o.push("vec4 linearToGamma( in vec4 value, in float gammaFactor ) {"),o.push(" return vec4( pow( value.xyz, vec3( 1.0 / gammaFactor ) ), value.w );"),o.push("}")),s){o.push("in vec4 vWorldPosition;"),o.push("in float vFlags;");for(var l=0,u=i.getNumAllocatedSectionPlanes();l> 16 & 0xF) == 1;"),o.push(" if (clippable) {"),o.push(" float dist = 0.0;");for(var f=0,p=i.getNumAllocatedSectionPlanes();f 0.0) { "),o.push(" discard;"),o.push(" }"),o.push("}")}for(o.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),o.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),o.push("float lambertian = 1.0;"),o.push("vec3 xTangent = dFdx( vViewPosition.xyz );"),o.push("vec3 yTangent = dFdy( vViewPosition.xyz );"),o.push("vec3 viewNormal = normalize( cross( xTangent, yTangent ) );"),e=0,t=a.lights.length;e0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),So=$.vec3(),No=$.vec3(),Lo=$.vec3(),xo=$.vec3(),Mo=$.mat4(),Fo=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=So;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=No;if(l){var y=$.transformPoint3(c,l,Lo);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,Mo),(v=xo)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),s.vertexAttribDivisor(this._aModelMatrixCol0.location,1),s.vertexAttribDivisor(this._aModelMatrixCol1.location,1),s.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),s.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.edgeIndicesBuf.bind(),s.drawElementsInstanced(s.LINES,o.edgeIndicesBuf.numItems,o.edgeIndicesBuf.itemType,0,o.numInstances),o.edgeIndicesBuf.unbind()):s.drawArraysInstanced(s.POINTS,0,o.positionsBuf.numItems,o.numInstances),s.vertexAttribDivisor(this._aModelMatrixCol0.location,0),s.vertexAttribDivisor(this._aModelMatrixCol1.location,0),s.vertexAttribDivisor(this._aModelMatrixCol2.location,0),s.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&s.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Ho=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._pbrRenderer&&!this._pbrRenderer.getValid()&&(this._pbrRenderer.destroy(),this._pbrRenderer=null),this._pbrRendererWithSAO&&!this._pbrRendererWithSAO.getValid()&&(this._pbrRendererWithSAO.destroy(),this._pbrRendererWithSAO=null),this._colorTextureRenderer&&!this._colorTextureRenderer.getValid()&&(this._colorTextureRenderer.destroy(),this._colorTextureRenderer=null),this._colorTextureRendererWithSAO&&!this._colorTextureRendererWithSAO.getValid()&&(this._colorTextureRendererWithSAO.destroy(),this._colorTextureRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._silhouetteRenderer||(this._silhouetteRenderer=new co(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new vo(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new ho(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Oo(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Fo(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new lo(this._scene,!1)),this._colorRenderer}},{key:"colorRendererWithSAO",get:function(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new lo(this._scene,!0)),this._colorRendererWithSAO}},{key:"flatColorRenderer",get:function(){return this._flatColorRenderer||(this._flatColorRenderer=new uo(this._scene,!1)),this._flatColorRenderer}},{key:"flatColorRendererWithSAO",get:function(){return this._flatColorRendererWithSAO||(this._flatColorRendererWithSAO=new uo(this._scene,!0)),this._flatColorRendererWithSAO}},{key:"pbrRenderer",get:function(){return this._pbrRenderer||(this._pbrRenderer=new To(this._scene,!1)),this._pbrRenderer}},{key:"pbrRendererWithSAO",get:function(){return this._pbrRendererWithSAO||(this._pbrRendererWithSAO=new To(this._scene,!0)),this._pbrRendererWithSAO}},{key:"colorTextureRenderer",get:function(){return this._colorTextureRenderer||(this._colorTextureRenderer=new Do(this._scene,!1)),this._colorTextureRenderer}},{key:"colorTextureRendererWithSAO",get:function(){return this._colorTextureRendererWithSAO||(this._colorTextureRendererWithSAO=new Do(this._scene,!0)),this._colorTextureRendererWithSAO}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new co(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new mo(this._scene)),this._depthRenderer}},{key:"normalsRenderer",get:function(){return this._normalsRenderer||(this._normalsRenderer=new wo(this._scene)),this._normalsRenderer}},{key:"edgesRenderer",get:function(){return this._edgesRenderer||(this._edgesRenderer=new po(this._scene)),this._edgesRenderer}},{key:"edgesColorRenderer",get:function(){return this._edgesColorRenderer||(this._edgesColorRenderer=new Ao(this._scene)),this._edgesColorRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new vo(this._scene)),this._pickMeshRenderer}},{key:"pickNormalsRenderer",get:function(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new Io(this._scene)),this._pickNormalsRenderer}},{key:"pickNormalsFlatRenderer",get:function(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new bo(this._scene)),this._pickNormalsFlatRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new ho(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new yo(this._scene)),this._occlusionRenderer}},{key:"shadowRenderer",get:function(){return this._shadowRenderer||(this._shadowRenderer=new go(this._scene)),this._shadowRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Oo(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Fo(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._pbrRenderer&&this._pbrRenderer.destroy(),this._pbrRendererWithSAO&&this._pbrRendererWithSAO.destroy(),this._colorTextureRenderer&&this._colorTextureRenderer.destroy(),this._colorTextureRendererWithSAO&&this._colorTextureRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Uo={};var Go=new Uint8Array(4),ko=new Float32Array(1),jo=$.vec4([0,0,0,1]),Vo=new Float32Array(3),Qo=$.vec3(),Wo=$.vec3(),zo=$.vec3(),Ko=$.vec3(),Yo=$.vec3(),Xo=$.vec3(),qo=$.vec3(),Jo=new Float32Array(4),Zo=function(){function e(t){var n,r,i;b(this,e),console.info("Creating VBOInstancingTrianglesLayer"),this.model=t.model,this.sortId="TrianglesInstancingLayer"+(t.solid?"-solid":"-surface")+(t.normals?"-normals":"-autoNormals"),this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Uo[r])||(i=new Ho(n),Uo[r]=i,i._compile(),i.eagerCreateRenders(),n.on("compile",(function(){i._compile(),i.eagerCreateRenders()})),n.on("destroyed",(function(){delete Uo[r],i._destroy()}))),i),this._aabb=$.collapseAABB3(),this._state=new zt({numInstances:0,obb:$.OBB3(),origin:$.vec3(),geometry:t.geometry,textureSet:t.textureSet,pbrSupported:!1,positionsDecodeMatrix:t.geometry.positionsDecodeMatrix,colorsBuf:null,metallicRoughnessBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,modelNormalMatrixCol0Buf:null,modelNormalMatrixCol1Buf:null,modelNormalMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=t.geometry.numIndices,this._colors=[],this._metallicRoughness=[],this._pickColors=[],this._offsets=[],this._modelMatrix=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,t.origin&&this._state.origin.set(t.origin),this._finalized=!1,this.solid=!!t.solid,this.numIndices=t.geometry.numIndices}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0){e.colorsBuf=new Pt(r,r.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,r.DYNAMIC_DRAW,!1),this._colors=[]}if(this._metallicRoughness.length>0){var s=new Uint8Array(this._metallicRoughness);e.metallicRoughnessBuf=new Pt(r,r.ARRAY_BUFFER,s,this._metallicRoughness.length,2,r.STATIC_DRAW,!1)}if(a>0){e.flagsBuf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(a),a,1,r.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){e.offsetsBuf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,r.DYNAMIC_DRAW,!1),this._offsets=[]}if(t.positionsCompressed&&t.positionsCompressed.length>0){e.positionsBuf=new Pt(r,r.ARRAY_BUFFER,t.positionsCompressed,t.positionsCompressed.length,3,r.STATIC_DRAW,!1),e.positionsDecodeMatrix=$.mat4(t.positionsDecodeMatrix)}if(t.colorsCompressed&&t.colorsCompressed.length>0){var o=new Uint8Array(t.colorsCompressed);e.colorsBuf=new Pt(r,r.ARRAY_BUFFER,o,o.length,4,r.STATIC_DRAW,!1)}if(t.uvCompressed&&t.uvCompressed.length>0){var l=t.uvCompressed;e.uvDecodeMatrix=t.uvDecodeMatrix,e.uvBuf=new Pt(r,r.ARRAY_BUFFER,l,l.length,2,r.STATIC_DRAW,!1)}if(t.indices&&t.indices.length>0&&(e.indicesBuf=new Pt(r,r.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.indices),t.indices.length,1,r.STATIC_DRAW),e.numIndices=t.indices.length),"triangles"!==t.primitive&&"solid"!==t.primitive&&"surface"!==t.primitive||(e.edgeIndicesBuf=new Pt(r,r.ELEMENT_ARRAY_BUFFER,new Uint32Array(t.edgeIndices),t.edgeIndices.length,1,r.STATIC_DRAW)),this._modelMatrixCol0.length>0){var u=!1;e.modelMatrixCol0Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,r.STATIC_DRAW,u),e.modelMatrixCol1Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,r.STATIC_DRAW,u),e.modelMatrixCol2Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,r.STATIC_DRAW,u),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],e.normalsBuf&&(e.modelNormalMatrixCol0Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol0),this._modelNormalMatrixCol0.length,4,r.STATIC_DRAW,u),e.modelNormalMatrixCol1Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol1),this._modelNormalMatrixCol1.length,4,r.STATIC_DRAW,u),e.modelNormalMatrixCol2Buf=new Pt(r,r.ARRAY_BUFFER,new Float32Array(this._modelNormalMatrixCol2),this._modelNormalMatrixCol2.length,4,r.STATIC_DRAW,u),this._modelNormalMatrixCol0=[],this._modelNormalMatrixCol1=[],this._modelNormalMatrixCol2=[])}if(this._pickColors.length>0){e.pickColorsBuf=new Pt(r,r.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,r.STATIC_DRAW,!1),this._pickColors=[]}e.pbrSupported=!!(e.metallicRoughnessBuf&&e.uvBuf&&e.normalsBuf&&n&&n.colorTexture&&n.metallicRoughnessTexture),e.colorTextureSupported=!!e.uvBuf&&!!n&&!!n.colorTexture,this._state.geometry=null,this._finalized=!0}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";Go[0]=t[0],Go[1]=t[1],Go[2]=t[2],Go[3]=t[3],this._state.colorsBuf&&this._state.colorsBuf.setData(Go,4*e)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){if(!this._finalized)throw"Not finalized";var r=!!(t&Me),i=!!(t&ke),a=!!(t&je),s=!!(t&Ve),o=!!(t&Qe),l=!!(t&He),u=!!(t&Fe),c=0;c|=!r||u||i||a&&!this.model.scene.highlightMaterial.glowThrough||s&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,c|=(!r||u?es.NOT_RENDERED:s?es.SILHOUETTE_SELECTED:a?es.SILHOUETTE_HIGHLIGHTED:i?es.SILHOUETTE_XRAYED:es.NOT_RENDERED)<<4,c|=(!r||u?es.NOT_RENDERED:s?es.EDGES_SELECTED:a?es.EDGES_HIGHLIGHTED:i?es.EDGES_XRAYED:o?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED)<<8,c|=(r&&!u&&l?es.PICK:es.NOT_RENDERED)<<12,c|=(t&Ue?1:0)<<16,ko[0]=c,this._state.flagsBuf&&this._state.flagsBuf.setData(ko,e)}},{key:"setOffset",value:function(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(Vo[0]=t[0],Vo[1]=t[1],Vo[2]=t[2],this._state.offsetsBuf&&this._state.offsetsBuf.setData(Vo,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}},{key:"getEachVertex",value:function(e,t){if(!this.model.scene.pickSurfacePrecisionEnabled)return!1;var n=this._state,r=n.geometry,i=this._portions[e];if(i)for(var a=r.quantizedPositions,s=n.origin,o=i.offset,l=s[0]+o[0],u=s[1]+o[1],c=s[2]+o[2],f=jo,p=i.matrix,A=this.model.sceneModelMatrix,d=n.positionsDecodeMatrix,v=0,h=a.length;vy)&&(y=P,r.set(m),i&&$.triangleNormal(d,v,h,i),I=!0)}}return I&&i&&($.transformVec3(o.normalMatrix,i,i),$.transformVec3(this.model.worldNormalMatrix,i,i),$.normalizeVec3(i)),I}},{key:"destroy",value:function(){var e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.modelNormalMatrixCol0Buf&&(e.modelNormalMatrixCol0Buf.destroy(),e.modelNormalMatrixCol0Buf=null),e.modelNormalMatrixCol1Buf&&(e.modelNormalMatrixCol1Buf.destroy(),e.modelNormalMatrixCol1Buf=null),e.modelNormalMatrixCol2Buf&&(e.modelNormalMatrixCol2Buf.destroy(),e.modelNormalMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy(),this._state=null}}]),e}(),$o=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;t.drawElements(t.LINES,n.indicesBuf.numItems,n.indicesBuf.itemType,0),i&&r.drawElements++}}]),n}(),el=function(e){h(n,$o);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Lines batching color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push("worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines batching color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),tl=function(e){h(n,$o);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Lines batching silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines batching silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}]),n}(),nl=$.vec3(),rl=$.vec3(),il=$.vec3(),al=$.vec3(),sl=$.mat4(),ol=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=nl;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=rl;if(l){var y=il;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,sl),(v=al)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),o.indicesBuf.bind(),s.drawElements(s.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBO SnapBatchingDepthBufInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),ll=$.vec3(),ul=$.vec3(),cl=$.vec3(),fl=$.vec3(),pl=$.mat4(),Al=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=ll;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=ul;if(l){var y=cl;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,pl),(v=fl)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),"edge"===e.snapMode?(o.indicesBuf.bind(),s.drawElements(s.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0),o.indicesBuf.unbind()):s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;var n=[];return n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapBatchingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),dl=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new el(this._scene,!1)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new tl(this._scene)),this._silhouetteRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new ol(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Al(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),vl={};var hl=P((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e6;b(this,e),t>5e6&&(t=5e6),this.maxVerts=t,this.maxIndices=3*t,this.positions=[],this.colors=[],this.offsets=[],this.indices=[]})),Il=function(){function e(t){var n,r,i;b(this,e),console.info("Creating VBOBatchingLinesLayer"),this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=vl[r])||(i=new dl(n),vl[r]=i,i._compile(),n.on("compile",(function(){i._compile()})),n.on("destroyed",(function(){delete vl[r],i._destroy()}))),i),this.model=t.model,this._buffer=new hl(t.maxGeometryBatchSize),this._scratchMemory=t.scratchMemory,this._state=new zt({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,indicesBuf:null,positionsDecodeMatrix:$.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=$.collapseAABB3(),this._portions=[],this._meshes=[],this._numVerts=0,this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,t.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(t.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,t.origin&&(this._state.origin=$.vec3(t.origin))}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){var r=new Uint16Array(n.positions);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,r,n.positions.length,3,t.STATIC_DRAW)}else{var i=zs(new Float32Array(n.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,i,n.positions.length,3,t.STATIC_DRAW)}if(n.colors.length>0){var a=new Uint8Array(n.colors);e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,a,n.colors.length,4,t.DYNAMIC_DRAW,!1)}if(n.colors.length>0){var s=n.colors.length/4,o=new Float32Array(s);e.flagsBuf=new Pt(t,t.ARRAY_BUFFER,o,o.length,1,t.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&n.offsets.length>0){var l=new Float32Array(n.offsets);e.offsetsBuf=new Pt(t,t.ARRAY_BUFFER,l,n.offsets.length,3,t.DYNAMIC_DRAW)}if(n.indices.length>0){var u=new Uint32Array(n.indices);e.indicesBuf=new Pt(t,t.ELEMENT_ARRAY_BUFFER,u,n.indices.length,1,t.STATIC_DRAW)}this._buffer=null,this._finalized=!0}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,!0)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";for(var n=2*e,r=4*this._portions[n],i=4*this._portions[n+1],a=this._scratchMemory.getUInt8Array(i),s=t[0],o=t[1],l=t[2],u=t[3],c=0;c3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=2*e,o=this._portions[s],l=this._portions[s+1],u=o,c=l,f=!!(t&Me),p=!!(t&ke),A=!!(t&je),d=!!(t&Ve),v=!!(t&He),h=!!(t&Fe);i=!f||h||p||A&&!this.model.scene.highlightMaterial.glowThrough||d&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!f||h?es.NOT_RENDERED:d?es.SILHOUETTE_SELECTED:A?es.SILHOUETTE_HIGHLIGHTED:p?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var I=f&&!h&&v?es.PICK:es.NOT_RENDERED,y=t&Ue?1:0;if(r){this._deferredFlagValues||(this._deferredFlagValues=new Float32Array(this._numVerts));for(var m=u,w=u+c;m0,n=[];return n.push("#version 300 es"),n.push("// Lines instancing color vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),n.push("in vec4 color;"),n.push("in float flags;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 lightAmbient;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("if (colorFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, float(color.a) / 255.0);"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Lines instancing color fragment shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return this._withSAO?(a.push(" float viewportWidth = uSAOParams[0];"),a.push(" float viewportHeight = uSAOParams[1];"),a.push(" float blendCutoff = uSAOParams[2];"),a.push(" float blendFactor = uSAOParams[3];"),a.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),a.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBAToDepth(texture(uOcclusionTexture, uv))) * blendFactor;"),a.push(" outColor = vec4(vColor.rgb * ambient, vColor.a);")):a.push(" outColor = vColor;"),n.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("}"),a}}]),n}(),wl=function(e){h(n,yl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Lines instancing silhouette vertex shader"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(n),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;")),n.push("uniform vec4 color;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),n.push("if (silhouetteFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Lines instancing silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = color;"),r.push("}"),r}}]),n}(),gl=$.vec3(),El=$.vec3(),Tl=$.vec3();$.vec3();var bl=$.mat4(),Dl=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.canvas.gl,s=i.camera,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||s.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=gl;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=El;if(l){var I=$.transformPoint3(c,l,Tl);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,bl),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,v),a.uniform1i(this._uRenderPass,n),a.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(s.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1)),o.indicesBuf.bind(),a.drawElementsInstanced(a.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind(),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Pl=$.vec3(),Cl=$.vec3(),_l=$.vec3();$.vec3();var Rl=$.mat4(),Bl=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=Pl;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=Cl;if(l){var I=$.transformPoint3(c,l,_l);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,Rl),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,v),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),s.vertexAttribDivisor(this._aModelMatrixCol0.location,1),s.vertexAttribDivisor(this._aModelMatrixCol1.location,1),s.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),s.vertexAttribDivisor(this._aFlags.location,1),"edge"===e.snapMode?(o.indicesBuf.bind(),s.drawElementsInstanced(s.LINES,o.indicesBuf.numItems,o.indicesBuf.itemType,0,o.numInstances),o.indicesBuf.unbind()):s.drawArraysInstanced(s.POINTS,0,o.positionsBuf.numItems,o.numInstances),s.vertexAttribDivisor(this._aModelMatrixCol0.location,0),s.vertexAttribDivisor(this._aModelMatrixCol1.location,0),s.vertexAttribDivisor(this._aModelMatrixCol2.location,0),s.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&s.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),Ol=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._snapInitRenderer||(this._snapInitRenderer=new Dl(this._scene,!1)),this._snapRenderer||(this._snapRenderer=new Bl(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new ml(this._scene)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new wl(this._scene)),this._silhouetteRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Dl(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Bl(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Sl={};var Nl=new Uint8Array(4),Ll=new Float32Array(1),xl=new Float32Array(3),Ml=new Float32Array(4),Fl=function(){function e(t){var n,r,i;b(this,e),console.info("VBOInstancingLinesLayer"),this.model=t.model,this.material=t.material,this.sortId="LinesInstancingLayer",this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Sl[r])||(i=new Ol(n),Sl[r]=i,i._compile(),n.on("compile",(function(){i._compile()})),n.on("destroyed",(function(){delete Sl[r],i._destroy()}))),i),this._aabb=$.collapseAABB3(),this._state=new zt({obb:$.OBB3(),numInstances:0,origin:null,geometry:t.geometry,positionsDecodeMatrix:t.geometry.positionsDecodeMatrix,positionsBuf:null,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=t.geometry.numIndices,this._colors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,t.origin&&(this._state.origin=$.vec3(t.origin)),this._finalized=!1}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0){this._state.colorsBuf=new Pt(e,e.ARRAY_BUFFER,new Uint8Array(this._colors),this._colors.length,4,e.DYNAMIC_DRAW,!1),this._colors=[]}if(i>0){this._state.flagsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(i),i,1,e.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){this._state.offsetsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,!1),this._offsets=[]}if(n.colorsCompressed&&n.colorsCompressed.length>0){var a=new Uint8Array(n.colorsCompressed);t.colorsBuf=new Pt(e,e.ARRAY_BUFFER,a,a.length,4,e.STATIC_DRAW,!1)}if(n.positionsCompressed&&n.positionsCompressed.length>0){t.positionsBuf=new Pt(e,e.ARRAY_BUFFER,n.positionsCompressed,n.positionsCompressed.length,3,e.STATIC_DRAW,!1),t.positionsDecodeMatrix=$.mat4(n.positionsDecodeMatrix)}if(n.indices&&n.indices.length>0&&(t.indicesBuf=new Pt(e,e.ELEMENT_ARRAY_BUFFER,new Uint32Array(n.indices),n.indices.length,1,e.STATIC_DRAW),t.numIndices=n.indices.length),this._modelMatrixCol0.length>0){var s=!1;this._state.modelMatrixCol0Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,s),this._state.modelMatrixCol1Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,s),this._state.modelMatrixCol2Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,s),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}this._state.geometry=null,this._finalized=!0}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";Nl[0]=t[0],Nl[1]=t[1],Nl[2]=t[2],Nl[3]=t[3],this._state.colorsBuf.setData(Nl,4*e,4)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){if(!this._finalized)throw"Not finalized";var r=!!(t&Me),i=!!(t&ke),a=!!(t&je),s=!!(t&Ve),o=!!(t&Qe),l=!!(t&He),u=!!(t&Fe),c=0;c|=!r||u||i||a&&!this.model.scene.highlightMaterial.glowThrough||s&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,c|=(!r||u?es.NOT_RENDERED:s?es.SILHOUETTE_SELECTED:a?es.SILHOUETTE_HIGHLIGHTED:i?es.SILHOUETTE_XRAYED:es.NOT_RENDERED)<<4,c|=(!r||u?es.NOT_RENDERED:s?es.EDGES_SELECTED:a?es.EDGES_HIGHLIGHTED:i?es.EDGES_XRAYED:o?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED)<<8,c|=(r&&!u&&l?es.PICK:es.NOT_RENDERED)<<12,c|=(t&Ue?255:0)<<16,Ll[0]=c,this._state.flagsBuf.setData(Ll,e)}},{key:"setOffset",value:function(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(xl[0]=t[0],xl[1]=t[1],xl[2]=t[2],this._state.offsetsBuf.setData(xl,3*e,3)):this.model.error("Entity#offset not enabled for this Viewer")}},{key:"setMatrix",value:function(e,t){if(!this._finalized)throw"Not finalized";var n=4*e;Ml[0]=t[0],Ml[1]=t[4],Ml[2]=t[8],Ml[3]=t[12],this._state.modelMatrixCol0Buf.setData(Ml,n),Ml[0]=t[1],Ml[1]=t[5],Ml[2]=t[9],Ml[3]=t[13],this._state.modelMatrixCol1Buf.setData(Ml,n),Ml[0]=t[2],Ml[1]=t[6],Ml[2]=t[10],Ml[3]=t[14],this._state.modelMatrixCol2Buf.setData(Ml,n)}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT)}},{key:"drawDepth",value:function(e,t){}},{key:"drawNormals",value:function(e,t){}},{key:"drawSilhouetteXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_XRAYED)}},{key:"drawSilhouetteHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_HIGHLIGHTED)}},{key:"drawSilhouetteSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_SELECTED)}},{key:"drawEdgesColorOpaque",value:function(e,t){}},{key:"drawEdgesColorTransparent",value:function(e,t){}},{key:"drawEdgesXRayed",value:function(e,t){}},{key:"drawEdgesHighlighted",value:function(e,t){}},{key:"drawEdgesSelected",value:function(e,t){}},{key:"drawSnapInit",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,es.PICK)}},{key:"drawSnap",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,es.PICK)}},{key:"drawOcclusion",value:function(e,t){}},{key:"drawShadow",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){}},{key:"drawPickDepths",value:function(e,t){}},{key:"drawPickNormals",value:function(e,t){}},{key:"destroy",value:function(){var e=this._state;e.positionsBuf&&(e.positionsBuf.destroy(),e.positionsBuf=null),e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.destroy()}}]),e}(),Hl=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_draw",value:function(e){var t=this._scene.canvas.gl,n=e.state,r=e.frameCtx,i=e.incrementDrawState;t.drawArrays(t.POINTS,0,n.positionsBuf.numItems),i&&r.drawArrays++}}]),n}(),Ul=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{incrementDrawState:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial,r=[];return r.push("#version 300 es"),r.push("// Points batching color vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),n.filterIntensity&&r.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),n.filterIntensity&&(r.push("float intensity = float(color.a) / 255.0;"),r.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {")),r.push("vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push("worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),n.filterIntensity&&r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),Gl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batching silhouette vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),this._addMatricesUniformBlockLines(r),r.push("uniform vec4 color;"),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),r.push("if (silhouetteFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Points batching silhouette vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e 1.0) {"),a.push(" discard;"),a.push(" }")),i){for(a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return n.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("outColor = color;"),a.push("}"),a}}]),n}(),kl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batching pick mesh vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 pickColor;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vPickColor;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push(" } else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),r.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = remapClipPos(clipPos);"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("gl_PointSize += 10.0;"),r.push(" }"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching pick mesh vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vPickColor; "),r.push("}"),r}}]),n}(),jl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batched pick depth vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vViewPosition;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push(" } else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vViewPosition = viewPosition;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = remapClipPos(clipPos);"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("gl_PointSize += 10.0;"),r.push(" }"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batched pick depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),Vl=function(e){h(n,Hl);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points batching occlusion vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push(" } else {"),r.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push(" gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push(" }"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points batching occlusion fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push(" }")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),r.push("}"),r}}]),n}(),Ql=$.vec3(),Wl=$.vec3(),zl=$.vec3(),Kl=$.vec3(),Yl=$.mat4(),Xl=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=Ql;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=Wl;if(l){var y=zl;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,Yl),(v=Kl)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),ql=$.vec3(),Jl=$.vec3(),Zl=$.vec3(),$l=$.vec3(),eu=$.mat4(),tu=function(e){h(n,os);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v,h=ql;if(h[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,h[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,h[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(h[0]),e.snapPickCoordinateScale[1]=$.safeInv(h[1]),e.snapPickCoordinateScale[2]=$.safeInv(h[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var I=Jl;if(l){var y=Zl;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],d=Oe(A,I,eu),(v=$l)[0]=a.eye[0]-I[0],v[1]=a.eye[1]-I[1],v[2]=a.eye[2]-I[2],e.snapPickOrigin[0]=I[0],e.snapPickOrigin[1]=I[1],e.snapPickOrigin[2]=I[2]}else d=A,v=a.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,h),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var m=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,m+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,m+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,m+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var w=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,w),this.setSectionPlanesStateUniforms(t),s.drawArrays(s.POINTS,0,o.positionsBuf.numItems)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this._uCameraEyeRtc=e.getLocation("uCameraEyeRtc"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0;e.pointsMaterial._state;var n=[];return n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (positionsDecodeMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// VBOBatchingPointsSnapRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),nu=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new Ul(this._scene)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new Gl(this._scene)),this._silhouetteRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new kl(this._scene)),this._pickMeshRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new jl(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new Vl(this._scene)),this._occlusionRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Xl(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new tu(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),ru={};var iu=P((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:5e6;b(this,e),t>5e6&&(t=5e6),this.maxVerts=t,this.maxIndices=3*t,this.positions=[],this.colors=[],this.intensities=[],this.pickColors=[],this.offsets=[]})),au=function(){function e(t){b(this,e),console.info("Creating VBOBatchingPointsLayer"),this.model=t.model,this.sortId="PointsBatchingLayer",this.layerIndex=t.layerIndex,this._renderers=function(e){var t=e.id,n=ru[t];return n||(n=new nu(e),ru[t]=n,n._compile(),e.on("compile",(function(){n._compile()})),e.on("destroyed",(function(){delete ru[t],n._destroy()}))),n}(t.model.scene),this._buffer=new iu(t.maxGeometryBatchSize),this._scratchMemory=t.scratchMemory,this._state=new zt({positionsBuf:null,offsetsBuf:null,colorsBuf:null,flagsBuf:null,positionsDecodeMatrix:$.mat4(),origin:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numSelectedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numClippableLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this._modelAABB=$.collapseAABB3(),this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1,t.positionsDecodeMatrix?(this._state.positionsDecodeMatrix.set(t.positionsDecodeMatrix),this._preCompressedPositionsExpected=!0):this._preCompressedPositionsExpected=!1,t.origin&&(this._state.origin=$.vec3(t.origin))}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0)if(this._preCompressedPositionsExpected){var r=new Uint16Array(n.positions);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,r,n.positions.length,3,t.STATIC_DRAW)}else{var i=zs(new Float32Array(n.positions),this._modelAABB,e.positionsDecodeMatrix);e.positionsBuf=new Pt(t,t.ARRAY_BUFFER,i,n.positions.length,3,t.STATIC_DRAW)}if(n.colors.length>0){var a=new Uint8Array(n.colors);e.colorsBuf=new Pt(t,t.ARRAY_BUFFER,a,n.colors.length,4,t.STATIC_DRAW,!1)}if(n.positions.length>0){var s=n.positions.length/3,o=new Float32Array(s);e.flagsBuf=new Pt(t,t.ARRAY_BUFFER,o,o.length,1,t.DYNAMIC_DRAW,!1)}if(n.pickColors.length>0){var l=new Uint8Array(n.pickColors);e.pickColorsBuf=new Pt(t,t.ARRAY_BUFFER,l,n.pickColors.length,4,t.STATIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&n.offsets.length>0){var u=new Float32Array(n.offsets);e.offsetsBuf=new Pt(t,t.ARRAY_BUFFER,u,n.offsets.length,3,t.DYNAMIC_DRAW)}this._buffer=null,this._finalized=!0}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized"}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";for(var n=2*e,r=4*this._portions[n],i=4*this._portions[n+1],a=this._scratchMemory.getUInt8Array(i),s=t[0],o=t[1],l=t[2],u=0;u0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing color vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),r.push("in vec4 color;"),r.push("in float flags;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),n.filterIntensity&&r.push("uniform vec2 intensityRange;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),n.filterIntensity&&(r.push("float intensity = float(color.a) / 255.0;"),r.push("if (intensity < intensityRange[0] || intensity > intensityRange[1]) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {")),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),r.push("vColor = vec4(float(color.r) / 255.0, float(color.g) / 255.0, float(color.b) / 255.0, 1.0);"),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),n.filterIntensity&&r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing color fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vColor;"),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),lu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"drawLayer",value:function(e,t,r){d(g(n.prototype),"drawLayer",this).call(this,e,t,r,{colorUniform:!0})}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing silhouette vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 color;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),r.push("uniform vec4 silhouetteColor;"),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vColor;"),r.push("void main(void) {"),r.push("int silhouetteFlag = int(flags) >> 4 & 0xF;"),r.push("if (silhouetteFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push("vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push("worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing silhouette fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vColor;"),r.push("}"),r}}]),n}(),uu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing pick mesh vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 pickColor;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vPickColor;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),r.push(" vPickColor = vec4(float(pickColor.r) / 255.0, float(pickColor.g) / 255.0, float(pickColor.b) / 255.0, float(pickColor.a) / 255.0);"),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),r.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing pick mesh fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("outColor = vPickColor; "),r.push("}"),r}}]),n}(),cu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing pick depth vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),r.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(r),this._addRemapClipPosLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("out vec4 vViewPosition;"),r.push("void main(void) {"),r.push("int pickFlag = int(flags) >> 12 & 0xF;"),r.push("if (pickFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push(" vFlags = flags;")),r.push(" vViewPosition = viewPosition;"),r.push("vec4 clipPos = projMatrix * viewPosition;"),r.push("gl_Position = remapClipPos(clipPos);"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = remapClipPos(clipPos);"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing pick depth fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),r.push("uniform float pickZNear;"),r.push("uniform float pickZFar;"),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),r.push(" outColor = packDepth(zNormalizedDepth); "),r.push("}"),r}}]),n}(),fu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing occlusion vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in vec4 color;"),r.push("in float flags;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push(" vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Points instancing occlusion vertex shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0;i 1.0) {"),r.push(" discard;"),r.push(" }")),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),r.push("}")}return r.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push("}"),r}}]),n}(),pu=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()+this._scene.pointsMaterial.hash}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=e.pointsMaterial._state,r=[];return r.push("#version 300 es"),r.push("// Points instancing depth vertex shader"),r.push("uniform int renderPass;"),r.push("in vec3 position;"),e.entityOffsetsEnabled&&r.push("in vec3 offset;"),r.push("in float flags;"),r.push("in vec4 modelMatrixCol0;"),r.push("in vec4 modelMatrixCol1;"),r.push("in vec4 modelMatrixCol2;"),this._addMatricesUniformBlockLines(r),r.push("uniform float pointSize;"),n.perspectivePoints&&r.push("uniform float nearPlaneHeight;"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("out float vFragDepth;")),t&&(r.push("out vec4 vWorldPosition;"),r.push("out float vFlags;")),r.push("void main(void) {"),r.push("int colorFlag = int(flags) & 0xF;"),r.push("if (colorFlag != renderPass) {"),r.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),r.push("} else {"),r.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),r.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&r.push(" worldPosition.xyz = worldPosition.xyz + offset;"),r.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(r.push("vWorldPosition = worldPosition;"),r.push("vFlags = flags;")),r.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&r.push("vFragDepth = 1.0 + clipPos.w;"),r.push("gl_Position = clipPos;"),n.perspectivePoints?(r.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;"),r.push("gl_PointSize = max(gl_PointSize, "+Math.floor(n.minPerspectivePointSize)+".0);"),r.push("gl_PointSize = min(gl_PointSize, "+Math.floor(n.maxPerspectivePointSize)+".0);")):r.push("gl_PointSize = pointSize;"),r.push("}"),r.push("}"),r}},{key:"_buildFragmentShader",value:function(){var e,t,n=this._scene,r=n._sectionPlanesState,i=r.getNumAllocatedSectionPlanes()>0,a=[];if(a.push("#version 300 es"),a.push("// Points instancing depth vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("#endif"),n.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("in float vFragDepth;")),i)for(a.push("in vec4 vWorldPosition;"),a.push("in float vFlags;"),e=0,t=r.getNumAllocatedSectionPlanes();e 1.0) {"),a.push(" discard;"),a.push(" }")),i){for(a.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),a.push(" if (clippable) {"),a.push(" float dist = 0.0;"),e=0,t=r.getNumAllocatedSectionPlanes();e 0.0) { discard; }"),a.push("}")}return a.push(" outColor = packDepthToRGBA( gl_FragCoord.z); "),n.logarithmicDepthBufferEnabled&&a.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),a.push("}"),a}}]),n}(),Au=function(e){h(n,su);var t=y(n);function n(){return b(this,n),t.apply(this,arguments)}return P(n,[{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// Instancing geometry shadow drawing vertex shader"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in vec4 color;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform mat4 shadowViewMatrix;"),n.push("uniform mat4 shadowProjMatrix;"),this._addMatricesUniformBlockLines(n),n.push("uniform float pointSize;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("void main(void) {"),n.push("int colorFlag = int(flags) & 0xF;"),n.push("bool visible = (colorFlag > 0);"),n.push("bool transparent = ((float(color.a) / 255.0) < 1.0);"),n.push("if (!visible || transparent) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = shadowViewMatrix * worldPosition; "),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags = flags;")),n.push(" gl_Position = shadowProjMatrix * viewPosition;"),n.push("}"),n.push("gl_PointSize = pointSize;"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// Instancing geometry depth drawing fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("in float vFlags;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 1.0) {"),r.push(" discard;"),r.push(" }"),n){r.push(" bool clippable = (int(vFlags) >> 16 & 0xF) == 1;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { discard; }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),r.push("}"),r}}]),n}(),du=$.vec3(),vu=$.vec3(),hu=$.vec3();$.vec3();var Iu=$.mat4(),yu=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.canvas.gl,s=i.camera,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||s.viewMatrix;this._vaoCache.has(t)?a.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=du;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=vu;if(l){var I=$.transformPoint3(c,l,hu);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,Iu),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;a.uniform2fv(this.uVectorA,e.snapVectorA),a.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),a.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),a.uniform3fv(this._uCoordinateScaler,v),a.uniform1i(this._uRenderPass,n),a.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(s.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),a.bindBuffer(a.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),a.bufferData(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,a.DYNAMIC_DRAW),a.bindBufferBase(a.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);a.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),a.vertexAttribDivisor(this._aModelMatrixCol0.location,1),a.vertexAttribDivisor(this._aModelMatrixCol1.location,1),a.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags&&(this._aFlags.bindArrayBuffer(o.flagsBuf),a.vertexAttribDivisor(this._aFlags.location,1)),a.drawArraysInstanced(a.POINTS,0,o.positionsBuf.numItems,o.numInstances),a.vertexAttribDivisor(this._aModelMatrixCol0.location,0),a.vertexAttribDivisor(this._aModelMatrixCol1.location,0),a.vertexAttribDivisor(this._aModelMatrixCol2.location,0),this._aFlags&&a.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&a.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthBufInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec4 pickColor;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("out float vFlags;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vWorldPosition = worldPosition;"),t&&n.push(" vFlags = flags;"),n.push("vPickColor = pickColor;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Points instancing pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, -layerNumber);"),n.push("outNormal = ivec4(1.0, 1.0, 1.0, 1.0);"),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),mu=$.vec3(),wu=$.vec3(),gu=$.vec3();$.vec3();var Eu=$.mat4(),Tu=function(e){h(n,os);var t=y(n);function n(e){return b(this,n),t.call(this,e,!1,{instancing:!0})}return P(n,[{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=t.aabb,A=e.pickViewMatrix||a.viewMatrix;this._vaoCache.has(t)?s.bindVertexArray(this._vaoCache.get(t)):this._vaoCache.set(t,this._makeVAO(o));var d,v=mu;if(v[0]=$.safeInv(p[3]-p[0])*$.MAX_INT,v[1]=$.safeInv(p[4]-p[1])*$.MAX_INT,v[2]=$.safeInv(p[5]-p[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(v[0]),e.snapPickCoordinateScale[1]=$.safeInv(v[1]),e.snapPickCoordinateScale[2]=$.safeInv(v[2]),l||0!==u[0]||0!==u[1]||0!==u[2]){var h=wu;if(l){var I=$.transformPoint3(c,l,gu);h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=u[0],h[1]+=u[1],h[2]+=u[2],d=Oe(A,h,Eu),e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else d=A,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;s.uniform2fv(this.uVectorA,e.snapVectorA),s.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),s.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),s.uniform3fv(this._uCoordinateScaler,v),s.uniform1i(this._uRenderPass,n),s.uniform1i(this._uPickInvisible,e.pickInvisible);var y=0;this._matricesUniformBlockBufferData.set(f,0),this._matricesUniformBlockBufferData.set(d,y+=16),this._matricesUniformBlockBufferData.set(a.projMatrix,y+=16),this._matricesUniformBlockBufferData.set(o.positionsDecodeMatrix,y+=16),s.bindBuffer(s.UNIFORM_BUFFER,this._matricesUniformBlockBuffer),s.bufferData(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferData,s.DYNAMIC_DRAW),s.bindBufferBase(s.UNIFORM_BUFFER,this._matricesUniformBlockBufferBindingPoint,this._matricesUniformBlockBuffer);var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m),this.setSectionPlanesStateUniforms(t),this._aModelMatrixCol0.bindArrayBuffer(o.modelMatrixCol0Buf),this._aModelMatrixCol1.bindArrayBuffer(o.modelMatrixCol1Buf),this._aModelMatrixCol2.bindArrayBuffer(o.modelMatrixCol2Buf),s.vertexAttribDivisor(this._aModelMatrixCol0.location,1),s.vertexAttribDivisor(this._aModelMatrixCol1.location,1),s.vertexAttribDivisor(this._aModelMatrixCol2.location,1),this._aFlags.bindArrayBuffer(o.flagsBuf),s.vertexAttribDivisor(this._aFlags.location,1),s.drawArraysInstanced(s.POINTS,0,o.positionsBuf.numItems,o.numInstances),s.vertexAttribDivisor(this._aModelMatrixCol0.location,0),s.vertexAttribDivisor(this._aModelMatrixCol1.location,0),s.vertexAttribDivisor(this._aModelMatrixCol2.location,0),s.vertexAttribDivisor(this._aFlags.location,0),this._aOffset&&s.vertexAttribDivisor(this._aOffset.location,0)}}},{key:"_allocate",value:function(){d(g(n.prototype),"_allocate",this).call(this);var e=this._program;this._uLogDepthBufFC=e.getLocation("logDepthBufFC"),this.uVectorA=e.getLocation("snapVectorA"),this.uInverseVectorAB=e.getLocation("snapInvVectorAB"),this._uLayerNumber=e.getLocation("layerNumber"),this._uCoordinateScaler=e.getLocation("coordinateScaler")}},{key:"_bindProgram",value:function(){this._program.bind()}},{key:"_buildVertexShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];return n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("in vec3 position;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("in float flags;"),n.push("in vec4 modelMatrixCol0;"),n.push("in vec4 modelMatrixCol1;"),n.push("in vec4 modelMatrixCol2;"),n.push("uniform bool pickInvisible;"),this._addMatricesUniformBlockLines(n),n.push("uniform vec2 snapVectorA;"),n.push("uniform vec2 snapInvVectorAB;"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - snapVectorA.x) * snapInvVectorAB.x;"),n.push(" float y = (clipPos.y - snapVectorA.y) * snapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out float vFlags;")),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int pickFlag = int(flags) >> 12 & 0xF;"),n.push("if (pickFlag != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push("} else {"),n.push(" vec4 worldPosition = positionsDecodeMatrix * vec4(position, 1.0); "),n.push(" worldPosition = worldMatrix * vec4(dot(worldPosition, modelMatrixCol0), dot(worldPosition, modelMatrixCol1), dot(worldPosition, modelMatrixCol2), 1.0);"),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags = flags;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// SnapInstancingDepthRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int layerNumber;"),n.push("uniform vec3 coordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("in float vFlags;");for(var r=0;r> 16 & 0xF) == 1;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push("}")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz*coordinateScaler.xyz, layerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),n}(),bu=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null),this._shadowRenderer&&!this._shadowRenderer.getValid()&&(this._shadowRenderer.destroy(),this._shadowRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null)}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new ou(this._scene,!1)),this._colorRenderer}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new lu(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new pu(this._scene)),this._depthRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new uu(this._scene)),this._pickMeshRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new cu(this._scene)),this._pickDepthRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new fu(this._scene)),this._occlusionRenderer}},{key:"shadowRenderer",get:function(){return this._shadowRenderer||(this._shadowRenderer=new Au(this._scene)),this._shadowRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new yu(this._scene,!1)),this._snapInitRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Tu(this._scene)),this._snapRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy(),this._shadowRenderer&&this._shadowRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy()}}]),e}(),Du={};var Pu=new Uint8Array(4),Cu=new Float32Array(1),_u=new Float32Array(3),Ru=new Float32Array(4),Bu=function(){function e(t){var n,r,i;b(this,e),console.info("VBOInstancingPointsLayer"),this.model=t.model,this.material=t.material,this.sortId="PointsInstancingLayer",this.layerIndex=t.layerIndex,this._renderers=(n=t.model.scene,r=n.id,(i=Du[r])||(i=new bu(n),Du[r]=i,i._compile(),n.on("compile",(function(){i._compile()})),n.on("destroyed",(function(){delete Du[r],i._destroy()}))),i),this._aabb=$.collapseAABB3(),this._state=new zt({obb:$.OBB3(),numInstances:0,origin:t.origin?$.vec3(t.origin):null,geometry:t.geometry,positionsDecodeMatrix:t.geometry.positionsDecodeMatrix,colorsBuf:null,flagsBuf:null,offsetsBuf:null,modelMatrixCol0Buf:null,modelMatrixCol1Buf:null,modelMatrixCol2Buf:null,pickColorsBuf:null}),this._numPortions=0,this._numVisibleLayerPortions=0,this._numTransparentLayerPortions=0,this._numXRayedLayerPortions=0,this._numHighlightedLayerPortions=0,this._numSelectedLayerPortions=0,this._numClippableLayerPortions=0,this._numEdgesLayerPortions=0,this._numPickableLayerPortions=0,this._numCulledLayerPortions=0,this.numIndices=t.geometry.numIndices,this._pickColors=[],this._offsets=[],this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[],this._portions=[],this._meshes=[],this._aabb=$.collapseAABB3(),this.aabbDirty=!0,this._finalized=!1}return P(e,[{key:"aabb",get:function(){if(this.aabbDirty){$.collapseAABB3(this._aabb);for(var e=0,t=this._meshes.length;e0){n.flagsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(t),t,1,e.DYNAMIC_DRAW,!1)}if(this.model.scene.entityOffsetsEnabled&&this._offsets.length>0){n.offsetsBuf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._offsets),this._offsets.length,3,e.DYNAMIC_DRAW,!1),this._offsets=[]}if(r.positionsCompressed&&r.positionsCompressed.length>0){n.positionsBuf=new Pt(e,e.ARRAY_BUFFER,r.positionsCompressed,r.positionsCompressed.length,3,e.STATIC_DRAW,!1),n.positionsDecodeMatrix=$.mat4(r.positionsDecodeMatrix)}if(r.colorsCompressed&&r.colorsCompressed.length>0){var i=new Uint8Array(r.colorsCompressed);n.colorsBuf=new Pt(e,e.ARRAY_BUFFER,i,i.length,4,e.STATIC_DRAW,!1)}if(this._modelMatrixCol0.length>0){var a=!1;n.modelMatrixCol0Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol0),this._modelMatrixCol0.length,4,e.STATIC_DRAW,a),n.modelMatrixCol1Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol1),this._modelMatrixCol1.length,4,e.STATIC_DRAW,a),n.modelMatrixCol2Buf=new Pt(e,e.ARRAY_BUFFER,new Float32Array(this._modelMatrixCol2),this._modelMatrixCol2.length,4,e.STATIC_DRAW,a),this._modelMatrixCol0=[],this._modelMatrixCol1=[],this._modelMatrixCol2=[]}if(this._pickColors.length>0){n.pickColorsBuf=new Pt(e,e.ARRAY_BUFFER,new Uint8Array(this._pickColors),this._pickColors.length,4,e.STATIC_DRAW,!1),this._pickColors=[]}n.geometry=null,this._finalized=!0}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++),this._setFlags(e,t,n)}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags(e,t)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions--,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){if(!this._finalized)throw"Not finalized";Pu[0]=t[0],Pu[1]=t[1],Pu[2]=t[2],this._state.colorsBuf.setData(Pu,3*e)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){if(!this._finalized)throw"Not finalized";var r=!!(t&Me),i=!!(t&ke),a=!!(t&je),s=!!(t&Ve),o=!!(t&Qe),l=!!(t&He),u=!!(t&Fe),c=0;c|=!r||u||i||a&&!this.model.scene.highlightMaterial.glowThrough||s&&!this.model.scene.selectedMaterial.glowThrough?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,c|=(!r||u?es.NOT_RENDERED:s?es.SILHOUETTE_SELECTED:a?es.SILHOUETTE_HIGHLIGHTED:i?es.SILHOUETTE_XRAYED:es.NOT_RENDERED)<<4,c|=(!r||u?es.NOT_RENDERED:s?es.EDGES_SELECTED:a?es.EDGES_HIGHLIGHTED:i?es.EDGES_XRAYED:o?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED)<<8,c|=(r&&!u&&l?es.PICK:es.NOT_RENDERED)<<12,c|=(t&Ue?255:0)<<16,Cu[0]=c,this._state.flagsBuf.setData(Cu,e)}},{key:"setOffset",value:function(e,t){if(!this._finalized)throw"Not finalized";this.model.scene.entityOffsetsEnabled?(_u[0]=t[0],_u[1]=t[1],_u[2]=t[2],this._state.offsetsBuf.setData(_u,3*e)):this.model.error("Entity#offset not enabled for this Viewer")}},{key:"setMatrix",value:function(e,t){if(!this._finalized)throw"Not finalized";var n=4*e;Ru[0]=t[0],Ru[1]=t[4],Ru[2]=t[8],Ru[3]=t[12],this._state.modelMatrixCol0Buf.setData(Ru,n),Ru[0]=t[1],Ru[1]=t[5],Ru[2]=t[9],Ru[3]=t[13],this._state.modelMatrixCol1Buf.setData(Ru,n),Ru[0]=t[2],Ru[1]=t[6],Ru[2]=t[10],Ru[3]=t[14],this._state.modelMatrixCol2Buf.setData(Ru,n)}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT)}},{key:"drawDepth",value:function(e,t){}},{key:"drawNormals",value:function(e,t){}},{key:"drawSilhouetteXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_XRAYED)}},{key:"drawSilhouetteHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_HIGHLIGHTED)}},{key:"drawSilhouetteSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_SELECTED)}},{key:"drawEdgesColorOpaque",value:function(e,t){}},{key:"drawEdgesColorTransparent",value:function(e,t){}},{key:"drawEdgesHighlighted",value:function(e,t){}},{key:"drawEdgesSelected",value:function(e,t){}},{key:"drawEdgesXRayed",value:function(e,t){}},{key:"drawOcclusion",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawShadow",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,es.PICK)}},{key:"drawPickDepths",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,es.PICK)}},{key:"drawPickNormals",value:function(e,t){}},{key:"drawSnapInit",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,es.PICK)}},{key:"drawSnap",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,es.PICK)}},{key:"destroy",value:function(){var e=this._state;e.colorsBuf&&(e.colorsBuf.destroy(),e.colorsBuf=null),e.flagsBuf&&(e.flagsBuf.destroy(),e.flagsBuf=null),e.offsetsBuf&&(e.offsetsBuf.destroy(),e.offsetsBuf=null),e.modelMatrixCol0Buf&&(e.modelMatrixCol0Buf.destroy(),e.modelMatrixCol0Buf=null),e.modelMatrixCol1Buf&&(e.modelMatrixCol1Buf.destroy(),e.modelMatrixCol1Buf=null),e.modelMatrixCol2Buf&&(e.modelMatrixCol2Buf.destroy(),e.modelMatrixCol2Buf=null),e.pickColorsBuf&&(e.pickColorsBuf.destroy(),e.pickColorsBuf=null),e.destroy()}}]),e}(),Ou=$.vec3(),Su=$.vec3(),Nu=$.mat4(),Lu=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate,A=i.viewMatrix;if(this._program||(this._allocate(),!this.errors)){var d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uPerObjectDecodeMatrix,this._uPerVertexPosition,this.uPerObjectColorAndFlags,this._uPerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=Ou;if(v){var y=$.transformPoint3(f,u,Su);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],d=Oe(A,I,Nu)}else d=A;if(s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,8),s.drawArrays(s.LINES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,16),s.drawArrays(s.LINES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindLineIndicesTextures(this._program,this._uPerLineObject,this._uPerLineIndices,32),s.drawArrays(s.LINES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// LinesDataTextureColorRenderer"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled,n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uPerObjectDecodeMatrix;"),n.push("uniform highp sampler2D uPerObjectMatrix;"),n.push("uniform lowp usampler2D uPerObjectColorAndFlags;"),n.push("uniform mediump usampler2D uPerVertexPosition;"),n.push("uniform highp usampler2D uPerLineIndices;"),n.push("uniform mediump usampler2D uPerLineObject;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push(" int lineIndex = gl_VertexID / 2;"),n.push(" int h_packed_object_id_index = (lineIndex >> 3) & 4095;"),n.push(" int v_packed_object_id_index = (lineIndex >> 3) >> 12;"),n.push(" int objectIndex = int(texelFetch(uPerLineObject, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push(" ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push(" if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push(" } else {"),n.push(" ivec4 packedVertexBase = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push(" ivec4 packedLineIndexBaseOffset = ivec4(texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push(" int lineIndexBaseOffset = (packedLineIndexBaseOffset.r << 24) + (packedLineIndexBaseOffset.g << 16) + (packedLineIndexBaseOffset.b << 8) + packedLineIndexBaseOffset.a;"),n.push(" int h_index = (lineIndex - lineIndexBaseOffset) & 4095;"),n.push(" int v_index = (lineIndex - lineIndexBaseOffset) >> 12;"),n.push(" ivec3 vertexIndices = ivec3(texelFetch(uPerLineIndices, ivec2(h_index, v_index), 0));"),n.push(" ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push(" int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push(" int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push(" mat4 objectInstanceMatrix = mat4 (texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push(" mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uPerObjectDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push(" uvec4 flags = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push(" uvec4 flags2 = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push(" vec3 position = vec3(texelFetch(uPerVertexPosition, ivec2(indexPositionH, indexPositionV), 0));"),n.push(" uvec4 color = texelFetch (uPerObjectColorAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push(" if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push(" };"),n.push(" vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push(" vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push(" vFragDepth = 1.0 + clipPos.w;"),n.push(" isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push(" gl_Position = clipPos;"),n.push(" vec4 rgb = vec4(color.rgba);"),n.push(" vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState,n=t.getNumAllocatedSectionPlanes()>0,r=[];if(r.push("#version 300 es"),r.push("// LinesDataTextureColorRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),n){r.push("in vec4 vWorldPosition;"),r.push("flat in uint vFlags2;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 0u;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),r.push(" outColor = vColor;"),r.push("}"),r}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),xu=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null)}},{key:"eagerCreateRenders",value:function(){}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new Lu(this._scene,!1)),this._colorRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy()}}]),e}(),Mu={};var Fu=P((function e(){b(this,e),this.positionsCompressed=[],this.lenPositionsCompressed=0,this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perLineNumberPortionId8Bits=[],this.perLineNumberPortionId16Bits=[],this.perLineNumberPortionId32Bits=[]})),Hu=function(){function e(){b(this,e),this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerLineIdPortionIds8Bits=null,this.texturePerLineIdPortionIds16Bits=null,this.texturePerLineIdPortionIds32Bits=null,this.texturePerLineIdIndices8Bits=null,this.texturePerLineIdIndices16Bits=null,this.texturePerLineIdIndices32Bits=null,this.textureModelMatrices=null}return P(e,[{key:"finalize",value:function(){this.indicesPerBitnessTextures={8:this.texturePerLineIdIndices8Bits,16:this.texturePerLineIdIndices16Bits,32:this.texturePerLineIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerLineIdPortionIds8Bits,16:this.texturePerLineIdPortionIds16Bits,32:this.texturePerLineIdPortionIds32Bits}}},{key:"bindCommonTextures",value:function(e,t,n,r,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,n,2),this.texturePerObjectColorsAndFlags.bindTexture(e,r,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}},{key:"bindLineIndicesTextures",value:function(e,t,n,r){this.indicesPortionIdsPerBitnessTextures[r].bindTexture(e,t,5),this.indicesPerBitnessTextures[r].bindTexture(e,n,6)}}]),e}(),Uu=function(){function e(t,n,r,i){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;b(this,e),this._gl=t,this._texture=n,this._textureWidth=r,this._textureHeight=i,this._textureData=a}return P(e,[{key:"bindTexture",value:function(e,t,n){return e.bindTexture(t,this,n)}},{key:"bind",value:function(e){return this._gl.activeTexture(this._gl["TEXTURE"+e]),this._gl.bindTexture(this._gl.TEXTURE_2D,this._texture),!0}},{key:"unbind",value:function(e){}}]),e}(),Gu={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalLines:0,totalLines8Bits:0,totalLines16Bits:0,totalLines32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(Gu,null,4));var e=0;Object.keys(Gu).forEach((function(t){t.startsWith("size")&&(e+=Gu[t])})),console.log("Total size ".concat(e," bytes (").concat((e/1e3/1e3).toFixed(2)," MB)")),console.log("Avg bytes / triangle: ".concat((e/Gu.totalLines).toFixed(2)));var t={};Object.keys(Gu).forEach((function(n){n.startsWith("size")&&(t[n]="".concat((Gu[n]/e*100).toFixed(2)," % of total"))})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};var ku=function(){function e(){b(this,e)}return P(e,[{key:"disableBindedTextureFiltering",value:function(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}},{key:"generateTextureForColorsAndFlags",value:function(e,t,n,r,i){var a=t.length;this.numPortions=a;var s=4096,o=Math.ceil(a/512);if(0===o)throw"texture height===0";var l=new Uint8Array(16384*o);Gu.sizeDataColorsAndFlags+=l.byteLength,Gu.numberOfTextures++;for(var u=0;u>24&255,r[u]>>16&255,r[u]>>8&255,255&r[u]],32*u+16),l.set([i[u]>>24&255,i[u]>>16&255,i[u]>>8&255,255&i[u]],32*u+20);var c=e.createTexture();return e.bindTexture(e.TEXTURE_2D,c),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,s,o),e.texSubImage2D(e.TEXTURE_2D,0,0,0,s,o,e.RGBA_INTEGER,e.UNSIGNED_BYTE,l,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,c,s,o,l)}},{key:"generateTextureForObjectOffsets",value:function(e,t){var n=512,r=Math.ceil(t/n);if(0===r)throw"texture height===0";var i=new Float32Array(1536*r).fill(0);Gu.sizeDataTextureOffsets+=i.byteLength,Gu.numberOfTextures++;var a=e.createTexture();return e.bindTexture(e.TEXTURE_2D,a),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,n,r),e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,r,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,a,n,r,i)}},{key:"generateTextureForInstancingMatrices",value:function(e,t){var n=t.length;if(0===n)throw"num instance matrices===0";var r=2048,i=Math.ceil(n/512),a=new Float32Array(8192*i);Gu.numberOfTextures++;for(var s=0;s65536&&Gu.cannotCreatePortion.because10BitsObjectId++;var n=this._numPortions+t<=65536,r=void 0!==e.geometryId&&null!==e.geometryId?"".concat(e.geometryId,"#").concat(0):"".concat(e.id,"#").concat(0);if(!this._bucketGeometries[r]){var i=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits),a=0,s=0;e.buckets.forEach((function(e){a+=e.positionsCompressed.length/3,s+=e.indices.length/2})),(this._state.numVertices+a>4096*Vu||i+s>4096*Vu)&&Gu.cannotCreatePortion.becauseTextureSize++,n&&(n=this._state.numVertices+a<=4096*Vu&&i+s<=4096*Vu)}return n}},{key:"createPortion",value:function(e,t){var n=this;if(this._finalized)throw"Already finalized";var r=[];t.buckets.forEach((function(e,i){var a=void 0!==t.geometryId&&null!==t.geometryId?"".concat(t.geometryId,"#").concat(i):"".concat(t.id,"#").concat(i),s=n._bucketGeometries[a];s||(s=n._createBucketGeometry(t,e),n._bucketGeometries[a]=s);var o=n._createSubPortion(t,s,e);r.push(o)}));var i=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(r),this.model.numPortions++,this._meshes.push(e),i}},{key:"_createBucketGeometry",value:function(e,t){if(t.indices){var n=8*Math.ceil(t.indices.length/2/8)*2;Gu.overheadSizeAlignementIndices+=2*(n-t.indices.length);var r=new Uint32Array(n);r.fill(0),r.set(t.indices),t.indices=r}var i=t.positionsCompressed,a=t.indices,s=this._buffer;s.positionsCompressed.push(i);var o,l=s.lenPositionsCompressed/3,u=i.length/3;s.lenPositionsCompressed+=i.length;var c,f=0;a&&(f=a.length/2,u<=256?(c=s.indices8Bits,o=s.lenIndices8Bits/2,s.lenIndices8Bits+=a.length):u<=65536?(c=s.indices16Bits,o=s.lenIndices16Bits/2,s.lenIndices16Bits+=a.length):(c=s.indices32Bits,o=s.lenIndices32Bits/2,s.lenIndices32Bits+=a.length),c.push(a));return this._state.numVertices+=u,Gu.numberOfGeometries++,{vertexBase:l,numVertices:u,numLines:f,indicesBase:o}}},{key:"_createSubPortion",value:function(e,t){var n,r=e.color,i=e.colors,a=e.opacity,s=e.meshMatrix,o=e.pickColor,l=this._buffer,u=this._state;l.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),l.perObjectInstancePositioningMatrices.push(s||Yu),l.perObjectSolid.push(!!e.solid),i?l.perObjectColors.push([255*i[0],255*i[1],255*i[2],255]):r&&l.perObjectColors.push([r[0],r[1],r[2],a]),l.perObjectPickColors.push(o),l.perObjectVertexBases.push(t.vertexBase),n=t.numVertices<=256?u.numIndices8Bits:t.numVertices<=65536?u.numIndices16Bits:u.numIndices32Bits,l.perObjectIndexBaseOffsets.push(n/2-t.indicesBase);var c=this._subPortions.length;if(t.numLines>0){var f,p=2*t.numLines;t.numVertices<=256?(f=l.perLineNumberPortionId8Bits,u.numIndices8Bits+=p,Gu.totalLines8Bits+=t.numLines):t.numVertices<=65536?(f=l.perLineNumberPortionId16Bits,u.numIndices16Bits+=p,Gu.totalLines16Bits+=t.numLines):(f=l.perLineNumberPortionId32Bits,u.numIndices32Bits+=p,Gu.totalLines32Bits+=t.numLines),Gu.totalLines+=t.numLines;for(var A=0;A0&&(n.texturePerLineIdIndices8Bits=this._dataTextureGenerator.generateTextureFor8BitIndices(r,i.indices8Bits,i.lenIndices8Bits)),i.lenIndices16Bits>0&&(n.texturePerLineIdIndices16Bits=this._dataTextureGenerator.generateTextureFor16BitIndices(r,i.indices16Bits,i.lenIndices16Bits)),i.lenIndices32Bits>0&&(n.texturePerLineIdIndices32Bits=this._dataTextureGenerator.generateTextureFor32BitIndices(r,i.indices32Bits,i.lenIndices32Bits)),n.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(function(){e._deferredSetFlagsDirty&&e._uploadDeferredFlags(),e._numUpdatesInFrame=0}))}}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,true),this._setFlags2(e,t,true)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags(),this._setDeferredFlags2()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}},{key:"_beginDeferredFlags",value:function(){this._deferredSetFlagsActive=!0}},{key:"_uploadDeferredFlags",value:function(){if(this._deferredSetFlagsActive=!1,this._deferredSetFlagsDirty){this._deferredSetFlagsDirty=!1;var e=this.model.scene.canvas.gl,t=this._dataTextureState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,Wu))}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._portionToSubPortionsMap[e],a=0,s=i.length;a3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=!!(t&Me),o=!!(t&ke),l=!!(t&je),u=!!(t&Ve),c=!!(t&He),f=!!(t&Fe);i=!s||f||o?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!s||f?es.NOT_RENDERED:u?es.SILHOUETTE_SELECTED:l?es.SILHOUETTE_HIGHLIGHTED:o?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var p=s&&!f&&c?es.PICK:es.NOT_RENDERED,A=this._dataTextureState,d=this.model.scene.canvas.gl;Wu[0]=i,Wu[1]=a,Wu[3]=p,A.texturePerObjectColorsAndFlags._textureData.set(Wu,32*e+8),this._deferredSetFlagsActive||r?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),d.bindTexture(d.TEXTURE_2D,A.texturePerObjectColorsAndFlags._texture),d.texSubImage2D(d.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,d.RGBA_INTEGER,d.UNSIGNED_BYTE,Wu))}},{key:"_setDeferredFlags",value:function(){}},{key:"_setFlags2",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._portionToSubPortionsMap[e],i=0,a=r.length;i2&&void 0!==arguments[2]&&arguments[2];if(!this._finalized)throw"Not finalized";var r=t&Ue?255:0,i=this._dataTextureState,a=this.model.scene.canvas.gl;Wu[0]=r,Wu[1]=0,Wu[2]=1,Wu[3]=2,i.texturePerObjectColorsAndFlags._textureData.set(Wu,32*e+12),this._deferredSetFlagsActive||n?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),a.bindTexture(a.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),a.texSubImage2D(a.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,a.RGBA_INTEGER,a.UNSIGNED_BYTE,Wu))}},{key:"_setDeferredFlags2",value:function(){}},{key:"setOffset",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectOffsets._texture),r.texSubImage2D(r.TEXTURE_2D,0,0,e,1,1,r.RGB,r.FLOAT,zu))}},{key:"setMatrix",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectInstanceMatrices._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,r.RGBA,r.FLOAT,Qu))}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE)}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT)}},{key:"drawDepth",value:function(e,t){}},{key:"drawNormals",value:function(e,t){}},{key:"drawSilhouetteXRayed",value:function(e,t){}},{key:"drawSilhouetteHighlighted",value:function(e,t){}},{key:"drawSilhouetteSelected",value:function(e,t){}},{key:"drawEdgesColorOpaque",value:function(e,t){}},{key:"drawEdgesColorTransparent",value:function(e,t){}},{key:"drawEdgesHighlighted",value:function(e,t){}},{key:"drawEdgesSelected",value:function(e,t){}},{key:"drawEdgesXRayed",value:function(e,t){}},{key:"drawOcclusion",value:function(e,t){}},{key:"drawShadow",value:function(e,t){}},{key:"setPickMatrices",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){}},{key:"drawPickDepths",value:function(e,t){}},{key:"drawSnapInit",value:function(e,t){}},{key:"drawSnap",value:function(e,t){}},{key:"drawPickNormals",value:function(e,t){}},{key:"destroy",value:function(){if(!this._destroyed){var e=this._state;this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}}]),e}(),qu=$.vec3(),Ju=$.vec3(),Zu=$.vec3();$.vec3();var $u=$.vec4(),ec=$.mat4(),tc=function(){function e(t,n){b(this,e),this._scene=t,this._withSAO=n,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate;if(this._program||(this._allocate(),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=qu;if(v){var y=$.transformPoint3(f,u,Ju);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],A=Oe(i.viewMatrix,I,ec),(d=Zu)[0]=i.eye[0]-I[0],d[1]=i.eye[1]-I[1],d[2]=i.eye[2]-I[2]}else A=i.viewMatrix,d=i.eye;if(s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform3fv(this._uCameraEyeRtc,d),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl,n=e._lightsState;if(this._program=new Dt(t,this._buildShader()),this._program.errors)return this.errors=this._program.errors,void console.error(this.errors);var r=this._program;this._uRenderPass=r.getLocation("renderPass"),this._uLightAmbient=r.getLocation("lightAmbient"),this._uLightColor=[],this._uLightDir=[],this._uLightPos=[],this._uLightAttenuation=[];for(var i=n.lights,a=0,s=i.length;a0,a=[];a.push("#version 300 es"),a.push("// TrianglesDataTextureColorRenderer vertex shader"),a.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),a.push("precision highp float;"),a.push("precision highp int;"),a.push("precision highp usampler2D;"),a.push("precision highp isampler2D;"),a.push("precision highp sampler2D;"),a.push("#else"),a.push("precision mediump float;"),a.push("precision mediump int;"),a.push("precision mediump usampler2D;"),a.push("precision mediump isampler2D;"),a.push("precision mediump sampler2D;"),a.push("#endif"),a.push("uniform int renderPass;"),a.push("uniform mat4 sceneModelMatrix;"),a.push("uniform mat4 viewMatrix;"),a.push("uniform mat4 projMatrix;"),a.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),a.push("uniform highp sampler2D uTexturePerObjectMatrix;"),a.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),a.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),a.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),a.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),a.push("uniform vec3 uCameraEyeRtc;"),a.push("vec3 positions[3];"),t.logarithmicDepthBufferEnabled&&(a.push("uniform float logDepthBufFC;"),a.push("out float vFragDepth;"),a.push("out float isPerspective;")),a.push("bool isPerspectiveMatrix(mat4 m) {"),a.push(" return (m[2][3] == - 1.0);"),a.push("}"),a.push("uniform vec4 lightAmbient;");for(var s=0,o=r.lights.length;s> 3) & 4095;"),a.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),a.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),a.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),a.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),a.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),a.push("if (int(flags.x) != renderPass) {"),a.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),a.push(" return;"),a.push("} else {"),a.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),a.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),a.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),a.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),a.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),a.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),a.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),a.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),a.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),a.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),a.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),a.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),a.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),a.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),a.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),a.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),a.push("if (color.a == 0u) {"),a.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),a.push(" return;"),a.push("};"),a.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),a.push("vec3 position;"),a.push("position = positions[gl_VertexID % 3];"),a.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),a.push("if (solid != 1u) {"),a.push("if (isPerspectiveMatrix(projMatrix)) {"),a.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),a.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),a.push("position = positions[2 - (gl_VertexID % 3)];"),a.push("viewNormal = -viewNormal;"),a.push("}"),a.push("} else {"),a.push("if (viewNormal.z < 0.0) {"),a.push("position = positions[2 - (gl_VertexID % 3)];"),a.push("viewNormal = -viewNormal;"),a.push("}"),a.push("}"),a.push("}"),a.push("vec4 worldPosition = sceneModelMatrix * ((objectDecodeAndInstanceMatrix * vec4(position, 1.0))); "),a.push("vec4 viewPosition = viewMatrix * worldPosition; "),a.push("vec3 reflectedColor = vec3(0.0, 0.0, 0.0);"),a.push("vec3 viewLightDir = vec3(0.0, 0.0, -1.0);"),a.push("float lambertian = 1.0;");for(var l=0,u=r.lights.length;l0,r=[];if(r.push("#version 300 es"),r.push("// TrianglesDataTextureColorRenderer fragment shader"),r.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),r.push("precision highp float;"),r.push("precision highp int;"),r.push("#else"),r.push("precision mediump float;"),r.push("precision mediump int;"),r.push("#endif"),e.logarithmicDepthBufferEnabled&&(r.push("in float isPerspective;"),r.push("uniform float logDepthBufFC;"),r.push("in float vFragDepth;")),this._withSAO&&(r.push("uniform sampler2D uOcclusionTexture;"),r.push("uniform vec4 uSAOParams;"),r.push("const float packUpscale = 256. / 255.;"),r.push("const float unpackDownScale = 255. / 256.;"),r.push("const vec3 packFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );"),r.push("const vec4 unPackFactors = unpackDownScale / vec4( packFactors, 1. );"),r.push("float unpackRGBToFloat( const in vec4 v ) {"),r.push(" return dot( v, unPackFactors );"),r.push("}")),n){r.push("in vec4 vWorldPosition;"),r.push("flat in uint vFlags2;");for(var i=0,a=t.getNumAllocatedSectionPlanes();i 0u;"),r.push(" if (clippable) {"),r.push(" float dist = 0.0;");for(var s=0,o=t.getNumAllocatedSectionPlanes();s 0.0) { "),r.push(" discard;"),r.push(" }"),r.push("}")}return e.logarithmicDepthBufferEnabled&&r.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),this._withSAO?(r.push(" float viewportWidth = uSAOParams[0];"),r.push(" float viewportHeight = uSAOParams[1];"),r.push(" float blendCutoff = uSAOParams[2];"),r.push(" float blendFactor = uSAOParams[3];"),r.push(" vec2 uv = vec2(gl_FragCoord.x / viewportWidth, gl_FragCoord.y / viewportHeight);"),r.push(" float ambient = smoothstep(blendCutoff, 1.0, unpackRGBToFloat(texture(uOcclusionTexture, uv))) * blendFactor;"),r.push(" outColor = vec4(vColor.rgb * ambient, 1.0);")):r.push(" outColor = vColor;"),r.push("}"),r}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),nc=new Float32Array([1,1,1]),rc=$.vec3(),ic=$.vec3(),ac=$.vec3();$.vec3();var sc=$.mat4(),oc=function(){function e(t,n){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate,A=i.viewMatrix;if(this._program||(this._allocate(),!this.errors)){var d,v;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),u||0!==c[0]||0!==c[1]||0!==c[2]){var h=rc;if(u){var I=ic;$.transformPoint3(f,u,I),h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=c[0],h[1]+=c[1],h[2]+=c[2],d=Oe(A,h,sc),(v=ac)[0]=i.eye[0]-h[0],v[1]=i.eye[1]-h[1],v[2]=i.eye[2]-h[2]}else d=A,v=i.eye;if(s.uniform3fv(this._uCameraEyeRtc,v),s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uWorldMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),n===es.SILHOUETTE_XRAYED){var y=r.xrayMaterial._state,m=y.fillColor,w=y.fillAlpha;s.uniform4f(this._uColor,m[0],m[1],m[2],w)}else if(n===es.SILHOUETTE_HIGHLIGHTED){var g=r.highlightMaterial._state,E=g.fillColor,T=g.fillAlpha;s.uniform4f(this._uColor,E[0],E[1],E[2],T)}else if(n===es.SILHOUETTE_SELECTED){var b=r.selectedMaterial._state,D=b.fillColor,P=b.fillAlpha;s.uniform4f(this._uColor,D[0],D[1],D[2],P)}else s.uniform4fv(this._uColor,nc);if(r.logarithmicDepthBufferEnabled){var C=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,C)}var _=r._sectionPlanesState.getNumAllocatedSectionPlanes(),R=r._sectionPlanesState.sectionPlanes.length;if(_>0)for(var B=r._sectionPlanesState.sectionPlanes,O=t.layerIndex*R,S=a.renderFlags,N=0;N<_;N++){var L=this._uSectionPlanes[N];if(L)if(N0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uColor=n.getLocation("color"),this._uWorldMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Triangles dataTexture silhouette vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.y) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("} else {"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags2 = flags2.r;")),n.push("gl_Position = clipPos;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = color;"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),lc=new Float32Array([0,0,0,1]),uc=$.vec3(),cc=$.vec3();$.vec3();var fc=$.mat4(),pc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=r.position,f=r.rotationMatrix,p=r.rotationMatrixConjugate,A=a.viewMatrix;if(this._program||(this._allocate(t),!this.errors)){var d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=uc;if(v){var y=$.transformPoint3(f,u,cc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],d=Oe(A,I,fc)}else d=A;if(s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix),n===es.EDGES_XRAYED){var m=i.xrayMaterial._state,w=m.edgeColor,g=m.edgeAlpha;s.uniform4f(this._uColor,w[0],w[1],w[2],g)}else if(n===es.EDGES_HIGHLIGHTED){var E=i.highlightMaterial._state,T=E.edgeColor,b=E.edgeAlpha;s.uniform4f(this._uColor,T[0],T[1],T[2],b)}else if(n===es.EDGES_SELECTED){var D=i.selectedMaterial._state,P=D.edgeColor,C=D.edgeAlpha;s.uniform4f(this._uColor,P[0],P[1],P[2],C)}else s.uniform4fv(this._uColor,lc);var _=i._sectionPlanesState.getNumAllocatedSectionPlanes(),R=i._sectionPlanesState.sectionPlanes.length;if(_>0)for(var B=i._sectionPlanesState.sectionPlanes,O=t.layerIndex*R,S=r.renderFlags,N=0;N<_;N++){var L=this._uSectionPlanes[N];if(L)if(N0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),s.drawArrays(s.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),s.drawArrays(s.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),s.drawArrays(s.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uColor=n.getLocation("color"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uWorldMatrix=n.getLocation("worldMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// DTXTrianglesEdgesRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),n.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),n.push("uniform vec4 color;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeIndex = gl_VertexID / 2;"),n.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.z) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),n.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),n.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),n.push("mat4 matrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vColor = vec4(color.r, color.g, color.b, color.a);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// DTXTrianglesEdgesRenderer fragment shader"),e.logarithmicDepthBufferEnabled&&n.push("#extension GL_EXT_frag_depth : enable"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Ac=$.vec3(),dc=$.vec3(),vc=$.mat4(),hc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=r.position,f=r.rotationMatrix,p=r.rotationMatrixConjugate,A=a.viewMatrix;if(this._program||(this._allocate(),!this.errors)){var d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=Ac;if(v){var y=$.transformPoint3(f,u,dc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],d=Oe(A,I,vc)}else d=A;s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix);var m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),w=i._sectionPlanesState.sectionPlanes.length;if(m>0)for(var g=i._sectionPlanesState.sectionPlanes,E=t.layerIndex*w,T=r.renderFlags,b=0;b0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),s.drawArrays(s.LINES,0,o.numEdgeIndices8Bits)),o.numEdgeIndices16Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),s.drawArrays(s.LINES,0,o.numEdgeIndices16Bits)),o.numEdgeIndices32Bits>0&&(l.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),s.drawArrays(s.LINES,0,o.numEdgeIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// TrianglesDataTextureEdgesColorRenderer"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled,n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform highp sampler2D uObjectPerObjectOffsets;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),n.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;")),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vColor;"),n.push("void main(void) {"),n.push("int edgeIndex = gl_VertexID / 2;"),n.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.z) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),n.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),n.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push("vec4 rgb = vec4(color.rgba);"),n.push("vColor = vec4(float(rgb.r*0.5) / 255.0, float(rgb.g*0.5) / 255.0, float(rgb.b*0.5) / 255.0, float(rgb.a) / 255.0);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureEdgesColorRenderer"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { discard; }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outColor = vColor;"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Ic=$.vec3(),yc=$.vec3(),mc=$.vec3(),wc=$.mat4(),gc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(t),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e));var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate;c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==f[0]||0!==f[1]||0!==f[2],h=0!==p[0]||0!==p[1]||0!==p[2];if(v||h){var I=Ic;if(v){var y=$.transformPoint3(A,f,yc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=p[0],I[1]+=p[1],I[2]+=p[2],r=Oe(o.viewMatrix,I,wc),(i=mc)[0]=o.eye[0]-I[0],i[1]=o.eye[1]-I[1],i[2]=o.eye[2]-I[2]}else r=o.viewMatrix,i=o.eye;if(l.uniform2fv(this._uPickClipPos,e.pickClipPos),l.uniform2f(this._uDrawingBufferSize,l.drawingBufferWidth,l.drawingBufferHeight),l.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),l.uniform3fv(this._uCameraEyeRtc,i),l.uniform1i(this._uRenderPass,n),s.logarithmicDepthBufferEnabled){var m=2/(Math.log(o.project.far+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,m)}var w=s._sectionPlanesState.getNumAllocatedSectionPlanes(),g=s._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=s._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),l.drawArrays(l.TRIANGLES,0,u.numIndices8Bits)),u.numIndices16Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),l.drawArrays(l.TRIANGLES,0,u.numIndices16Bits)),u.numIndices32Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),l.drawArrays(l.TRIANGLES,0,u.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uPickClipPos=n.getLocation("pickClipPos"),this._uDrawingBufferSize=n.getLocation("drawingBufferSize"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry picking vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform bool pickInvisible;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("uniform vec2 pickClipPos;"),n.push("uniform vec2 drawingBufferSize;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("smooth out vec4 vWorldPosition;"),n.push("flat out uvec4 vFlags2;")),n.push("out vec4 vPickColor;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.w) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0)) / 255.0;"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("} else {"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2;")),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry picking fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uvec4 vFlags2;");for(var r=0;r 0.0);"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" outPickColor = vPickColor; "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Ec=$.vec3(),Tc=$.vec3(),bc=$.vec3();$.vec3();var Dc=$.mat4(),Pc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate,v=e.pickViewMatrix||o.viewMatrix;if(this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),f||0!==p[0]||0!==p[1]||0!==p[2]){var h=Ec;if(f){var I=Tc;$.transformPoint3(A,f,I),h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=p[0],h[1]+=p[1],h[2]+=p[2],r=Oe(v,h,Dc),(i=bc)[0]=o.eye[0]-h[0],i[1]=o.eye[1]-h[1],i[2]=o.eye[2]-h[2],e.snapPickOrigin[0]=h[0],e.snapPickOrigin[1]=h[1],e.snapPickOrigin[2]=h[2]}else r=v,i=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;if(l.uniform3fv(this._uCameraEyeRtc,i),l.uniform1i(this._uRenderPass,n),l.uniform1i(this._uPickInvisible,e.pickInvisible),l.uniform2fv(this._uPickClipPos,e.pickClipPos),l.uniform2f(this._uDrawingBufferSize,l.drawingBufferWidth,l.drawingBufferHeight),l.uniform1f(this._uPickZNear,e.pickZNear),l.uniform1f(this._uPickZFar,e.pickZFar),l.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix),s.logarithmicDepthBufferEnabled){var y=2/(Math.log(e.pickZFar+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,y)}var m=s._sectionPlanesState.getNumAllocatedSectionPlanes(),w=s._sectionPlanesState.sectionPlanes.length;if(m>0)for(var g=s._sectionPlanesState.sectionPlanes,E=t.layerIndex*w,T=a.renderFlags,b=0;b0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),l.drawArrays(l.TRIANGLES,0,u.numIndices8Bits)),u.numIndices16Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),l.drawArrays(l.TRIANGLES,0,u.numIndices16Bits)),u.numIndices32Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),l.drawArrays(l.TRIANGLES,0,u.numIndices32Bits)),e.drawElements++}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uPickClipPos=n.getLocation("pickClipPos"),this._uDrawingBufferSize=n.getLocation("drawingBufferSize"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Triangles dataTexture pick depth vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform bool pickInvisible;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("uniform vec2 pickClipPos;"),n.push("uniform vec2 drawingBufferSize;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vViewPosition;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.w) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("} else {"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = remapClipPos(clipPos);"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("uniform float pickZNear;"),n.push("uniform float pickZFar;"),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0;r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(r=0;r 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" float zNormalizedDepth = abs((pickZNear + vViewPosition.z) / (pickZFar - pickZNear));"),n.push(" outPackedDepth = packDepth(zNormalizedDepth); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Cc=$.vec3(),_c=$.vec3(),Rc=$.vec3(),Bc=$.vec3();$.vec3();var Oc=$.mat4(),Sc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){if(this._program||(this._allocate(),!this.errors)){e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate,v=t.aabb,h=e.pickViewMatrix||o.viewMatrix,I=Cc;I[0]=$.safeInv(v[3]-v[0])*$.MAX_INT,I[1]=$.safeInv(v[4]-v[1])*$.MAX_INT,I[2]=$.safeInv(v[5]-v[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(I[0]),e.snapPickCoordinateScale[1]=$.safeInv(I[1]),e.snapPickCoordinateScale[2]=$.safeInv(I[2]),c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var y=0!==f[0]||0!==f[1]||0!==f[2],m=0!==p[0]||0!==p[1]||0!==p[2];if(y||m){var w=_c;if(y){var g=$.transformPoint3(A,f,Rc);w[0]=g[0],w[1]=g[1],w[2]=g[2]}else w[0]=0,w[1]=0,w[2]=0;w[0]+=p[0],w[1]+=p[1],w[2]+=p[2],r=Oe(h,w,Oc),(i=Bc)[0]=o.eye[0]-w[0],i[1]=o.eye[1]-w[1],i[2]=o.eye[2]-w[2],e.snapPickOrigin[0]=w[0],e.snapPickOrigin[1]=w[1],e.snapPickOrigin[2]=w[2]}else r=h,i=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;l.uniform3fv(this._uCameraEyeRtc,i),l.uniform2fv(this.uVectorA,e.snapVectorA),l.uniform2fv(this.uInverseVectorAB,e.snapInvVectorAB),l.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),l.uniform3fv(this._uCoordinateScaler,I),l.uniform1i(this._uRenderPass,n),l.uniform1i(this._uPickInvisible,e.pickInvisible),l.uniformMatrix4fv(this._uSceneModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);var E=2/(Math.log(e.pickZFar+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,E);var T=s._sectionPlanesState.getNumAllocatedSectionPlanes(),b=s._sectionPlanesState.sectionPlanes.length;if(T>0)for(var D=s._sectionPlanesState.sectionPlanes,P=t.layerIndex*b,C=a.renderFlags,_=0;_0&&(c.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,8),l.drawArrays(N,0,u.numEdgeIndices8Bits)),u.numEdgeIndices16Bits>0&&(c.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,16),l.drawArrays(N,0,u.numEdgeIndices16Bits)),u.numEdgeIndices32Bits>0&&(c.bindEdgeIndicesTextures(this._program,this._uTexturePerEdgeIdPortionIds,this._uTexturePerPolygonIdEdgeIndices,32),l.drawArrays(N,0,u.numEdgeIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Batched geometry edges drawing vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdEdgeIndices;"),n.push("uniform mediump usampler2D uTexturePerEdgeIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 uSnapVectorA;"),n.push("uniform vec2 uSnapInvVectorAB;"),n.push("vec3 positions[3];"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out float isPerspective;"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - uSnapVectorA.x) * uSnapInvVectorAB.x;"),n.push(" float y = (clipPos.y - uSnapVectorA.y) * uSnapInvVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("out vec4 vViewPosition;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int edgeIndex = gl_VertexID / 2;"),n.push("int h_packed_object_id_index = (edgeIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (edgeIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerEdgeIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("{"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedEdgeIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+6, objectIndexCoords.y), 0));"),n.push("int edgeIndexBaseOffset = (packedEdgeIndexBaseOffset.r << 24) + (packedEdgeIndexBaseOffset.g << 16) + (packedEdgeIndexBaseOffset.b << 8) + packedEdgeIndexBaseOffset.a;"),n.push("int h_index = (edgeIndex - edgeIndexBaseOffset) & 4095;"),n.push("int v_index = (edgeIndex - edgeIndexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdEdgeIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("int indexPositionH = uniqueVertexIndexes[gl_VertexID % 2] & 4095;"),n.push("int indexPositionV = uniqueVertexIndexes[gl_VertexID % 2] >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("vec3 position = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH, indexPositionV), 0));"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2.r;")),n.push("vViewPosition = viewPosition;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vViewPosition = clipPos;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push("gl_PointSize = 1.0;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture pick depth fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int uLayerNumber;"),n.push("uniform vec3 uCoordinateScaler;"),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),n.push(" }")}return n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, uLayerNumber);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Nc=$.vec3(),Lc=$.vec3(),xc=$.vec3(),Mc=$.vec3();$.vec3();var Fc=$.mat4(),Hc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){this._program||this._allocate(),e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram());var r,i,a=t.model,s=a.scene,o=s.camera,l=s.canvas.gl,u=t._state,c=u.textureState,f=t._state.origin,p=a.position,A=a.rotationMatrix,d=a.rotationMatrixConjugate,v=t.aabb,h=e.pickViewMatrix||o.viewMatrix,I=Nc;I[0]=$.safeInv(v[3]-v[0])*$.MAX_INT,I[1]=$.safeInv(v[4]-v[1])*$.MAX_INT,I[2]=$.safeInv(v[5]-v[2])*$.MAX_INT,e.snapPickCoordinateScale[0]=$.safeInv(I[0]),e.snapPickCoordinateScale[1]=$.safeInv(I[1]),e.snapPickCoordinateScale[2]=$.safeInv(I[2]),c.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var y=0!==f[0]||0!==f[1]||0!==f[2],m=0!==p[0]||0!==p[1]||0!==p[2];if(y||m){var w=Lc;if(y){var g=xc;$.transformPoint3(A,f,g),w[0]=g[0],w[1]=g[1],w[2]=g[2]}else w[0]=0,w[1]=0,w[2]=0;w[0]+=p[0],w[1]+=p[1],w[2]+=p[2],r=Oe(h,w,Fc),(i=Mc)[0]=o.eye[0]-w[0],i[1]=o.eye[1]-w[1],i[2]=o.eye[2]-w[2],e.snapPickOrigin[0]=w[0],e.snapPickOrigin[1]=w[1],e.snapPickOrigin[2]=w[2]}else r=h,i=o.eye,e.snapPickOrigin[0]=0,e.snapPickOrigin[1]=0,e.snapPickOrigin[2]=0;l.uniform3fv(this._uCameraEyeRtc,i),l.uniform2fv(this._uVectorA,e.snapVectorA),l.uniform2fv(this._uInverseVectorAB,e.snapInvVectorAB),l.uniform1i(this._uLayerNumber,e.snapPickLayerNumber),l.uniform3fv(this._uCoordinateScaler,I),l.uniform1i(this._uRenderPass,n),l.uniform1i(this._uPickInvisible,e.pickInvisible),l.uniformMatrix4fv(this._uSceneWorldModelMatrix,!1,d),l.uniformMatrix4fv(this._uViewMatrix,!1,r),l.uniformMatrix4fv(this._uProjMatrix,!1,o.projMatrix);var E=2/(Math.log(e.pickZFar+1)/Math.LN2);l.uniform1f(this._uLogDepthBufFC,E);var T=s._sectionPlanesState.getNumAllocatedSectionPlanes(),b=s._sectionPlanesState.sectionPlanes.length;if(T>0)for(var D=s._sectionPlanesState.sectionPlanes,P=t.layerIndex*b,C=a.renderFlags,_=0;_0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),l.drawArrays(l.TRIANGLES,0,u.numIndices8Bits)),u.numIndices16Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),l.drawArrays(l.TRIANGLES,0,u.numIndices16Bits)),u.numIndices32Bits>0&&(c.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),l.drawArrays(l.TRIANGLES,0,u.numIndices32Bits)),e.drawElements++}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uSceneWorldModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// DTXTrianglesSnapInitRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("uniform vec2 uVectorAB;"),n.push("uniform vec2 uInverseVectorAB;"),n.push("vec3 positions[3];"),n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("vec2 remapClipPos(vec2 clipPos) {"),n.push(" float x = (clipPos.x - uVectorAB.x) * uInverseVectorAB.x;"),n.push(" float y = (clipPos.y - uVectorAB.y) * uInverseVectorAB.y;"),n.push(" return vec2(x, y);"),n.push("}"),n.push("flat out vec4 vPickColor;"),n.push("out vec4 vWorldPosition;"),t&&n.push("flat out uint vFlags2;"),n.push("out highp vec3 relativeToOriginPosition;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("{"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push(" if (isPerspectiveMatrix(projMatrix)) {"),n.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" viewNormal = -viewNormal;"),n.push(" }"),n.push(" } else {"),n.push(" if (viewNormal.z < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" viewNormal = -viewNormal;"),n.push(" }"),n.push(" }"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("relativeToOriginPosition = worldPosition.xyz;"),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vWorldPosition = worldPosition;"),t&&n.push("vFlags2 = flags2.r;"),n.push("vPickColor = vec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+1, objectIndexCoords.y), 0));"),n.push("vec4 clipPos = projMatrix * viewPosition;"),n.push("float tmp = clipPos.w;"),n.push("clipPos.xyzw /= tmp;"),n.push("clipPos.xy = remapClipPos(clipPos.xy);"),n.push("clipPos.xyzw *= tmp;"),n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));"),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// DTXTrianglesSnapInitRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;"),n.push("uniform int uLayerNumber;"),n.push("uniform vec3 uCoordinateScaler;"),n.push("in vec4 vWorldPosition;"),n.push("flat in vec4 vPickColor;"),t){n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0;a 0.0) { discard; }"),n.push(" }")}return n.push(" float dx = dFdx(vFragDepth);"),n.push(" float dy = dFdy(vFragDepth);"),n.push(" float diff = sqrt(dx*dx+dy*dy);"),n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth + diff ) * logDepthBufFC * 0.5;"),n.push("outCoords = ivec4(relativeToOriginPosition.xyz * uCoordinateScaler.xyz, - uLayerNumber);"),n.push("vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push("vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push("vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push("outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("outPickColor = uvec4(vPickColor);"),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Uc=$.vec3(),Gc=$.vec3(),kc=$.vec3();$.vec3();var jc=$.mat4(),Vc=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=r.position,f=r.rotationMatrix,p=r.rotationMatrixConjugate,A=e.pickViewMatrix||a.viewMatrix;if(this._program||(this._allocate(t),!this.errors)){var d,v;if(e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram()),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix),u||0!==c[0]||0!==c[1]||0!==c[2]){var h=Uc;if(u){var I=Gc;$.transformPoint3(f,u,I),h[0]=I[0],h[1]=I[1],h[2]=I[2]}else h[0]=0,h[1]=0,h[2]=0;h[0]+=c[0],h[1]+=c[1],h[2]+=c[2],d=Oe(A,h,jc),(v=kc)[0]=a.eye[0]-h[0],v[1]=a.eye[1]-h[1],v[2]=a.eye[2]-h[2]}else d=A,v=a.eye;s.uniform3fv(this._uCameraEyeRtc,v),s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uWorldMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,d),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix);var y=i._sectionPlanesState.getNumAllocatedSectionPlanes(),m=i._sectionPlanesState.sectionPlanes.length;if(y>0)for(var w=i._sectionPlanesState.sectionPlanes,g=t.layerIndex*m,E=r.renderFlags,T=0;T0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uWorldMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// TrianglesDataTextureOcclusionRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("if (solid != 1u) {"),n.push(" if (isPerspectiveMatrix(projMatrix)) {"),n.push(" vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push(" if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" }"),n.push(" } else {"),n.push(" vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push(" if (viewNormal.z < 0.0) {"),n.push(" position = positions[2 - (gl_VertexID % 3)];"),n.push(" }"),n.push(" }"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags2 = flags2.r;")),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene._sectionPlanesState,t=e.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTextureColorRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0;r 0.0);"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return n.push(" outColor = vec4(0.0, 0.0, 1.0, 1.0); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Qc=$.vec3(),Wc=$.vec3(),zc=$.vec3();$.vec3();var Kc=$.mat4(),Yc=function(){function e(t){b(this,e),this._scene=t,this._allocate(),this._hash=this._getHash()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate;if(this._program||(this._allocate(),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=Qc;if(v){var y=$.transformPoint3(f,u,Wc);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],A=Oe(i.viewMatrix,I,Kc),(d=zc)[0]=i.eye[0]-I[0],d[1]=i.eye[1]-I[1],d[2]=i.eye[2]-I[2]}else A=i.viewMatrix,d=i.eye;if(s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform3fv(this._uCameraEyeRtc,d),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPositionsDecodeMatrix=n.getLocation("objectDecodeAndInstanceMatrix"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// Triangles dataTexture draw vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out highp vec2 vHighPrecisionZW;"),t&&(n.push("out vec4 vWorldPosition;"),n.push("flat out uint vFlags2;")),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("} else {"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),t&&(n.push("vWorldPosition = worldPosition;"),n.push("vFlags2 = flags2.r;")),n.push("gl_Position = clipPos;"),n.push("vHighPrecisionZW = gl_Position.zw;"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Triangles dataTexture draw fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),n.push("in highp vec2 vHighPrecisionZW;"),n.push("out vec4 outColor;"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push("float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;"),n.push(" outColor = vec4(vec3(1.0 - fragCoordZ), 1.0); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),Xc=$.vec3(),qc=$.vec3(),Jc=$.vec3();$.vec3();var Zc=$.mat4(),$c=function(){function e(t){b(this,e),this._scene=t,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){return this._scene._sectionPlanesState.getHash()}},{key:"drawLayer",value:function(e,t,n){var r=t.model,i=r.scene,a=i.camera,s=i.canvas.gl,o=t._state,l=t._state.origin,u=r.position,c=r.rotationMatrix,f=r.rotationMatrixConjugate,p=a.viewMatrix;if(this._program||(this._allocate(t),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(t));var v=0!==l[0]||0!==l[1]||0!==l[2],h=0!==u[0]||0!==u[1]||0!==u[2];if(v||h){var I=Xc;if(v){var y=qc;$.transformPoint3(c,l,y),I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=u[0],I[1]+=u[1],I[2]+=u[2],A=Oe(p,I,Zc),(d=Jc)[0]=a.eye[0]-I[0],d[1]=a.eye[1]-I[1],d[2]=a.eye[2]-I[2]}else A=p,d=a.eye;s.uniform1i(this._uRenderPass,n),s.uniformMatrix4fv(this._uWorldMatrix,!1,f),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,a.projMatrix),s.uniformMatrix4fv(this._uViewNormalMatrix,!1,a.viewNormalMatrix),s.uniformMatrix4fv(this._uWorldNormalMatrix,!1,r.worldNormalMatrix);var m=i._sectionPlanesState.getNumAllocatedSectionPlanes(),w=i._sectionPlanesState.sectionPlanes.length;if(m>0)for(var g=i._sectionPlanesState.sectionPlanes,E=t.layerIndex*w,T=r.renderFlags,b=0;b0,n=[];return n.push("// Batched geometry normals vertex shader"),e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push("#extension GL_EXT_frag_depth : enable"),n.push("uniform int renderPass;"),n.push("attribute vec3 position;"),e.entityOffsetsEnabled&&n.push("attribute vec3 offset;"),n.push("attribute vec3 normal;"),n.push("attribute vec4 color;"),n.push("attribute vec4 flags;"),n.push("attribute vec4 flags2;"),n.push("uniform mat4 worldMatrix;"),n.push("uniform mat4 worldNormalMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform mat4 viewNormalMatrix;"),n.push("uniform mat4 objectDecodeAndInstanceMatrix;"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push("out float vFragDepth;"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("varying float isPerspective;")),n.push("vec3 octDecode(vec2 oct) {"),n.push(" vec3 v = vec3(oct.xy, 1.0 - abs(oct.x) - abs(oct.y));"),n.push(" if (v.z < 0.0) {"),n.push(" v.xy = (1.0 - abs(v.yx)) * vec2(v.x >= 0.0 ? 1.0 : -1.0, v.y >= 0.0 ? 1.0 : -1.0);"),n.push(" }"),n.push(" return normalize(v);"),n.push("}"),t&&(n.push("out vec4 vWorldPosition;"),n.push("out vec4 vFlags2;")),n.push("out vec3 vViewNormal;"),n.push("void main(void) {"),n.push("if (int(flags.x) != renderPass) {"),n.push(" gl_Position = vec4(0.0, 0.0, 0.0, 0.0);"),n.push(" } else {"),n.push(" vec4 worldPosition = worldMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),e.entityOffsetsEnabled&&n.push(" worldPosition.xyz = worldPosition.xyz + offset;"),n.push(" vec4 viewPosition = viewMatrix * worldPosition; "),n.push(" vec4 worldNormal = worldNormalMatrix * vec4(octDecode(normal.xy), 0.0); "),n.push(" vec3 viewNormal = normalize((viewNormalMatrix * worldNormal).xyz);"),t&&(n.push(" vWorldPosition = worldPosition;"),n.push(" vFlags2 = flags2;")),n.push(" vViewNormal = viewNormal;"),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(vt.SUPPORTED_EXTENSIONS.EXT_frag_depth?n.push("vFragDepth = 1.0 + clipPos.w;"):(n.push("clipPos.z = log2( max( 1e-6, clipPos.w + 1.0 ) ) * logDepthBufFC - 1.0;"),n.push("clipPos.z *= clipPos.w;")),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("gl_Position = clipPos;"),n.push(" }"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// Batched geometry normals fragment shader"),e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push("#extension GL_EXT_frag_depth : enable"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),t){n.push("in vec4 vWorldPosition;"),n.push("in vec4 vFlags2;");for(var r=0;r 0.0);"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var i=0;i 0.0) { discard; }"),n.push(" }")}return e.logarithmicDepthBufferEnabled&&vt.SUPPORTED_EXTENSIONS.EXT_frag_depth&&n.push(" gl_FragDepthEXT = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" gl_FragColor = vec4(packNormalToRGB(vViewNormal), 1.0); "),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),ef=$.vec3(),tf=$.vec3(),nf=$.vec3();$.vec3(),$.vec4();var rf=$.mat4(),af=function(){function e(t,n){b(this,e),this._scene=t,this._withSAO=n,this._hash=this._getHash(),this._allocate()}return P(e,[{key:"getValid",value:function(){return this._hash===this._getHash()}},{key:"_getHash",value:function(){var e=this._scene;return[e._lightsState.getHash(),e._sectionPlanesState.getHash(),this._withSAO?"sao":"nosao"].join(";")}},{key:"drawLayer",value:function(e,t,n){var r=this._scene,i=r.camera,a=t.model,s=r.canvas.gl,o=t._state,l=o.textureState,u=t._state.origin,c=a.position,f=a.rotationMatrix,p=a.rotationMatrixConjugate;if(this._program||(this._allocate(),!this.errors)){var A,d;e.lastProgramId!==this._program.id&&(e.lastProgramId=this._program.id,this._bindProgram(e,o)),l.bindCommonTextures(this._program,this.uTexturePerObjectPositionsDecodeMatrix,this._uTexturePerVertexIdCoordinates,this.uTexturePerObjectColorsAndFlags,this._uTexturePerObjectMatrix);var v=0!==u[0]||0!==u[1]||0!==u[2],h=0!==c[0]||0!==c[1]||0!==c[2];if(v||h){var I=ef;if(v){var y=$.transformPoint3(f,u,tf);I[0]=y[0],I[1]=y[1],I[2]=y[2]}else I[0]=0,I[1]=0,I[2]=0;I[0]+=c[0],I[1]+=c[1],I[2]+=c[2],A=Oe(i.viewMatrix,I,rf),(d=nf)[0]=i.eye[0]-I[0],d[1]=i.eye[1]-I[1],d[2]=i.eye[2]-I[2]}else A=i.viewMatrix,d=i.eye;if(s.uniform2fv(this._uPickClipPos,e.pickClipPos),s.uniform2f(this._uDrawingBufferSize,s.drawingBufferWidth,s.drawingBufferHeight),s.uniformMatrix4fv(this._uSceneModelMatrix,!1,p),s.uniformMatrix4fv(this._uViewMatrix,!1,A),s.uniformMatrix4fv(this._uProjMatrix,!1,i.projMatrix),s.uniform3fv(this._uCameraEyeRtc,d),s.uniform1i(this._uRenderPass,n),r.logarithmicDepthBufferEnabled){var m=2/(Math.log(e.pickZFar+1)/Math.LN2);s.uniform1f(this._uLogDepthBufFC,m)}var w=r._sectionPlanesState.getNumAllocatedSectionPlanes(),g=r._sectionPlanesState.sectionPlanes.length;if(w>0)for(var E=r._sectionPlanesState.sectionPlanes,T=t.layerIndex*g,b=a.renderFlags,D=0;D0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,8),s.drawArrays(s.TRIANGLES,0,o.numIndices8Bits)),o.numIndices16Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,16),s.drawArrays(s.TRIANGLES,0,o.numIndices16Bits)),o.numIndices32Bits>0&&(l.bindTriangleIndicesTextures(this._program,this._uTexturePerPolygonIdPortionIds,this._uTexturePerPolygonIdIndices,32),s.drawArrays(s.TRIANGLES,0,o.numIndices32Bits)),e.drawElements++}}},{key:"_allocate",value:function(){var e=this._scene,t=e.canvas.gl;if(this._program=new Dt(t,this._buildShader()),this._program.errors)this.errors=this._program.errors;else{var n=this._program;this._uRenderPass=n.getLocation("renderPass"),this._uPickInvisible=n.getLocation("pickInvisible"),this._uPickClipPos=n.getLocation("pickClipPos"),this._uDrawingBufferSize=n.getLocation("drawingBufferSize"),this._uSceneModelMatrix=n.getLocation("sceneModelMatrix"),this._uViewMatrix=n.getLocation("viewMatrix"),this._uProjMatrix=n.getLocation("projMatrix"),this._uSectionPlanes=[];for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r0,n=[];return n.push("#version 300 es"),n.push("// trianglesDatatextureNormalsRenderer vertex shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("precision highp usampler2D;"),n.push("precision highp isampler2D;"),n.push("precision highp sampler2D;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("precision mediump usampler2D;"),n.push("precision mediump isampler2D;"),n.push("precision mediump sampler2D;"),n.push("#endif"),n.push("uniform int renderPass;"),e.entityOffsetsEnabled&&n.push("in vec3 offset;"),n.push("uniform mat4 sceneModelMatrix;"),n.push("uniform mat4 viewMatrix;"),n.push("uniform mat4 projMatrix;"),n.push("uniform highp sampler2D uObjectPerObjectPositionsDecodeMatrix;"),n.push("uniform lowp usampler2D uObjectPerObjectColorsAndFlags;"),n.push("uniform highp sampler2D uTexturePerObjectMatrix;"),n.push("uniform mediump usampler2D uTexturePerVertexIdCoordinates;"),n.push("uniform highp usampler2D uTexturePerPolygonIdIndices;"),n.push("uniform mediump usampler2D uTexturePerPolygonIdPortionIds;"),n.push("uniform vec3 uCameraEyeRtc;"),n.push("vec3 positions[3];"),e.logarithmicDepthBufferEnabled&&(n.push("uniform float logDepthBufFC;"),n.push("out float vFragDepth;"),n.push("out float isPerspective;")),n.push("uniform vec2 pickClipPos;"),n.push("uniform vec2 drawingBufferSize;"),n.push("vec4 remapClipPos(vec4 clipPos) {"),n.push(" clipPos.xy /= clipPos.w;"),n.push(" clipPos.xy = (clipPos.xy - pickClipPos) * drawingBufferSize;"),n.push(" clipPos.xy *= clipPos.w;"),n.push(" return clipPos;"),n.push("}"),n.push("bool isPerspectiveMatrix(mat4 m) {"),n.push(" return (m[2][3] == - 1.0);"),n.push("}"),n.push("out vec4 vWorldPosition;"),t&&n.push("flat out uint vFlags2;"),n.push("void main(void) {"),n.push("int polygonIndex = gl_VertexID / 3;"),n.push("int h_packed_object_id_index = (polygonIndex >> 3) & 4095;"),n.push("int v_packed_object_id_index = (polygonIndex >> 3) >> 12;"),n.push("int objectIndex = int(texelFetch(uTexturePerPolygonIdPortionIds, ivec2(h_packed_object_id_index, v_packed_object_id_index), 0).r);"),n.push("ivec2 objectIndexCoords = ivec2(objectIndex % 512, objectIndex / 512);"),n.push("uvec4 flags = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+2, objectIndexCoords.y), 0);"),n.push("uvec4 flags2 = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+3, objectIndexCoords.y), 0);"),n.push("if (int(flags.w) != renderPass) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("} else {"),n.push("ivec4 packedVertexBase = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+4, objectIndexCoords.y), 0));"),n.push("ivec4 packedIndexBaseOffset = ivec4(texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+5, objectIndexCoords.y), 0));"),n.push("int indexBaseOffset = (packedIndexBaseOffset.r << 24) + (packedIndexBaseOffset.g << 16) + (packedIndexBaseOffset.b << 8) + packedIndexBaseOffset.a;"),n.push("int h_index = (polygonIndex - indexBaseOffset) & 4095;"),n.push("int v_index = (polygonIndex - indexBaseOffset) >> 12;"),n.push("ivec3 vertexIndices = ivec3(texelFetch(uTexturePerPolygonIdIndices, ivec2(h_index, v_index), 0));"),n.push("ivec3 uniqueVertexIndexes = vertexIndices + (packedVertexBase.r << 24) + (packedVertexBase.g << 16) + (packedVertexBase.b << 8) + packedVertexBase.a;"),n.push("ivec3 indexPositionH = uniqueVertexIndexes & 4095;"),n.push("ivec3 indexPositionV = uniqueVertexIndexes >> 12;"),n.push("mat4 objectInstanceMatrix = mat4 (texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uTexturePerObjectMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("mat4 objectDecodeAndInstanceMatrix = objectInstanceMatrix * mat4 (texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+0, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+1, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+2, objectIndexCoords.y), 0), texelFetch (uObjectPerObjectPositionsDecodeMatrix, ivec2(objectIndexCoords.x*4+3, objectIndexCoords.y), 0));"),n.push("uint solid = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+7, objectIndexCoords.y), 0).r;"),n.push("positions[0] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.r, indexPositionV.r), 0));"),n.push("positions[1] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.g, indexPositionV.g), 0));"),n.push("positions[2] = vec3(texelFetch(uTexturePerVertexIdCoordinates, ivec2(indexPositionH.b, indexPositionV.b), 0));"),n.push("uvec4 color = texelFetch (uObjectPerObjectColorsAndFlags, ivec2(objectIndexCoords.x*8+0, objectIndexCoords.y), 0);"),n.push("if (color.a == 0u) {"),n.push(" gl_Position = vec4(3.0, 3.0, 3.0, 1.0);"),n.push(" return;"),n.push("};"),n.push("vec3 normal = normalize(cross(positions[2] - positions[0], positions[1] - positions[0]));"),n.push("vec3 position;"),n.push("position = positions[gl_VertexID % 3];"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (solid != 1u) {"),n.push("if (isPerspectiveMatrix(projMatrix)) {"),n.push("vec3 uCameraEyeRtcInQuantizedSpace = (inverse(sceneModelMatrix * objectDecodeAndInstanceMatrix) * vec4(uCameraEyeRtc, 1)).xyz;"),n.push("if (dot(position.xyz - uCameraEyeRtcInQuantizedSpace, normal) < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("viewNormal = -viewNormal;"),n.push("}"),n.push("} else {"),n.push("vec3 viewNormal = -normalize((transpose(inverse(viewMatrix*objectDecodeAndInstanceMatrix)) * vec4(normal,1)).xyz);"),n.push("if (viewNormal.z < 0.0) {"),n.push("position = positions[2 - (gl_VertexID % 3)];"),n.push("}"),n.push("}"),n.push("}"),n.push("vec4 worldPosition = sceneModelMatrix * (objectDecodeAndInstanceMatrix * vec4(position, 1.0)); "),n.push("vec4 viewPosition = viewMatrix * worldPosition; "),n.push("vec4 clipPos = projMatrix * viewPosition;"),e.logarithmicDepthBufferEnabled&&(n.push("vFragDepth = 1.0 + clipPos.w;"),n.push("isPerspective = float (isPerspectiveMatrix(projMatrix));")),n.push("vWorldPosition = worldPosition;"),t&&n.push("vFlags2 = flags2.r;"),n.push("gl_Position = remapClipPos(clipPos);"),n.push("}"),n.push("}"),n}},{key:"_buildFragmentShader",value:function(){var e=this._scene,t=e._sectionPlanesState.getNumAllocatedSectionPlanes()>0,n=[];if(n.push("#version 300 es"),n.push("// TrianglesDataTexturePickNormalsRenderer fragment shader"),n.push("#ifdef GL_FRAGMENT_PRECISION_HIGH"),n.push("precision highp float;"),n.push("precision highp int;"),n.push("#else"),n.push("precision mediump float;"),n.push("precision mediump int;"),n.push("#endif"),e.logarithmicDepthBufferEnabled&&(n.push("in float isPerspective;"),n.push("uniform float logDepthBufFC;"),n.push("in float vFragDepth;")),n.push("in vec4 vWorldPosition;"),t){n.push("flat in uint vFlags2;");for(var r=0,i=e._sectionPlanesState.getNumAllocatedSectionPlanes();r 0u;"),n.push(" if (clippable) {"),n.push(" float dist = 0.0;");for(var a=0,s=e._sectionPlanesState.getNumAllocatedSectionPlanes();a 0.0) { "),n.push(" discard;"),n.push(" }"),n.push("}")}return e.logarithmicDepthBufferEnabled&&n.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;"),n.push(" vec3 xTangent = dFdx( vWorldPosition.xyz );"),n.push(" vec3 yTangent = dFdy( vWorldPosition.xyz );"),n.push(" vec3 worldNormal = normalize( cross( xTangent, yTangent ) );"),n.push(" outNormal = ivec4(worldNormal * float(".concat($.MAX_INT,"), 1.0);")),n.push("}"),n}},{key:"webglContextRestored",value:function(){this._program=null}},{key:"destroy",value:function(){this._program&&this._program.destroy(),this._program=null}}]),e}(),sf=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"_compile",value:function(){this._colorRenderer&&!this._colorRenderer.getValid()&&(this._colorRenderer.destroy(),this._colorRenderer=null),this._colorRendererWithSAO&&!this._colorRendererWithSAO.getValid()&&(this._colorRendererWithSAO.destroy(),this._colorRendererWithSAO=null),this._flatColorRenderer&&!this._flatColorRenderer.getValid()&&(this._flatColorRenderer.destroy(),this._flatColorRenderer=null),this._flatColorRendererWithSAO&&!this._flatColorRendererWithSAO.getValid()&&(this._flatColorRendererWithSAO.destroy(),this._flatColorRendererWithSAO=null),this._colorQualityRendererWithSAO&&!this._colorQualityRendererWithSAO.getValid()&&(this._colorQualityRendererWithSAO.destroy(),this._colorQualityRendererWithSAO=null),this._depthRenderer&&!this._depthRenderer.getValid()&&(this._depthRenderer.destroy(),this._depthRenderer=null),this._normalsRenderer&&!this._normalsRenderer.getValid()&&(this._normalsRenderer.destroy(),this._normalsRenderer=null),this._silhouetteRenderer&&!this._silhouetteRenderer.getValid()&&(this._silhouetteRenderer.destroy(),this._silhouetteRenderer=null),this._edgesRenderer&&!this._edgesRenderer.getValid()&&(this._edgesRenderer.destroy(),this._edgesRenderer=null),this._edgesColorRenderer&&!this._edgesColorRenderer.getValid()&&(this._edgesColorRenderer.destroy(),this._edgesColorRenderer=null),this._pickMeshRenderer&&!this._pickMeshRenderer.getValid()&&(this._pickMeshRenderer.destroy(),this._pickMeshRenderer=null),this._pickDepthRenderer&&!this._pickDepthRenderer.getValid()&&(this._pickDepthRenderer.destroy(),this._pickDepthRenderer=null),this._snapRenderer&&!this._snapRenderer.getValid()&&(this._snapRenderer.destroy(),this._snapRenderer=null),this._snapInitRenderer&&!this._snapInitRenderer.getValid()&&(this._snapInitRenderer.destroy(),this._snapInitRenderer=null),this._pickNormalsRenderer&&!1===this._pickNormalsRenderer.getValid()&&(this._pickNormalsRenderer.destroy(),this._pickNormalsRenderer=null),this._pickNormalsFlatRenderer&&!1===this._pickNormalsFlatRenderer.getValid()&&(this._pickNormalsFlatRenderer.destroy(),this._pickNormalsFlatRenderer=null),this._occlusionRenderer&&!1===this._occlusionRenderer.getValid()&&(this._occlusionRenderer.destroy(),this._occlusionRenderer=null)}},{key:"eagerCreateRenders",value:function(){this._silhouetteRenderer||(this._silhouetteRenderer=new oc(this._scene)),this._pickMeshRenderer||(this._pickMeshRenderer=new gc(this._scene)),this._pickDepthRenderer||(this._pickDepthRenderer=new Pc(this._scene)),this._pickNormalsRenderer||(this._pickNormalsRenderer=new af(this._scene)),this._snapRenderer||(this._snapRenderer=new Sc(this._scene)),this._snapInitRenderer||(this._snapInitRenderer=new Hc(this._scene)),this._snapRenderer||(this._snapRenderer=new Sc(this._scene))}},{key:"colorRenderer",get:function(){return this._colorRenderer||(this._colorRenderer=new tc(this._scene,!1)),this._colorRenderer}},{key:"colorRendererWithSAO",get:function(){return this._colorRendererWithSAO||(this._colorRendererWithSAO=new tc(this._scene,!0)),this._colorRendererWithSAO}},{key:"colorQualityRendererWithSAO",get:function(){return this._colorQualityRendererWithSAO}},{key:"silhouetteRenderer",get:function(){return this._silhouetteRenderer||(this._silhouetteRenderer=new oc(this._scene)),this._silhouetteRenderer}},{key:"depthRenderer",get:function(){return this._depthRenderer||(this._depthRenderer=new Yc(this._scene)),this._depthRenderer}},{key:"normalsRenderer",get:function(){return this._normalsRenderer||(this._normalsRenderer=new $c(this._scene)),this._normalsRenderer}},{key:"edgesRenderer",get:function(){return this._edgesRenderer||(this._edgesRenderer=new pc(this._scene)),this._edgesRenderer}},{key:"edgesColorRenderer",get:function(){return this._edgesColorRenderer||(this._edgesColorRenderer=new hc(this._scene)),this._edgesColorRenderer}},{key:"pickMeshRenderer",get:function(){return this._pickMeshRenderer||(this._pickMeshRenderer=new gc(this._scene)),this._pickMeshRenderer}},{key:"pickNormalsRenderer",get:function(){return this._pickNormalsRenderer||(this._pickNormalsRenderer=new af(this._scene)),this._pickNormalsRenderer}},{key:"pickNormalsFlatRenderer",get:function(){return this._pickNormalsFlatRenderer||(this._pickNormalsFlatRenderer=new af(this._scene)),this._pickNormalsFlatRenderer}},{key:"pickDepthRenderer",get:function(){return this._pickDepthRenderer||(this._pickDepthRenderer=new Pc(this._scene)),this._pickDepthRenderer}},{key:"snapRenderer",get:function(){return this._snapRenderer||(this._snapRenderer=new Sc(this._scene)),this._snapRenderer}},{key:"snapInitRenderer",get:function(){return this._snapInitRenderer||(this._snapInitRenderer=new Hc(this._scene)),this._snapInitRenderer}},{key:"occlusionRenderer",get:function(){return this._occlusionRenderer||(this._occlusionRenderer=new Vc(this._scene)),this._occlusionRenderer}},{key:"_destroy",value:function(){this._colorRenderer&&this._colorRenderer.destroy(),this._colorRendererWithSAO&&this._colorRendererWithSAO.destroy(),this._flatColorRenderer&&this._flatColorRenderer.destroy(),this._flatColorRendererWithSAO&&this._flatColorRendererWithSAO.destroy(),this._colorQualityRendererWithSAO&&this._colorQualityRendererWithSAO.destroy(),this._depthRenderer&&this._depthRenderer.destroy(),this._normalsRenderer&&this._normalsRenderer.destroy(),this._silhouetteRenderer&&this._silhouetteRenderer.destroy(),this._edgesRenderer&&this._edgesRenderer.destroy(),this._edgesColorRenderer&&this._edgesColorRenderer.destroy(),this._pickMeshRenderer&&this._pickMeshRenderer.destroy(),this._pickDepthRenderer&&this._pickDepthRenderer.destroy(),this._snapRenderer&&this._snapRenderer.destroy(),this._snapInitRenderer&&this._snapInitRenderer.destroy(),this._pickNormalsRenderer&&this._pickNormalsRenderer.destroy(),this._pickNormalsFlatRenderer&&this._pickNormalsFlatRenderer.destroy(),this._occlusionRenderer&&this._occlusionRenderer.destroy()}}]),e}(),of={};var lf=P((function e(){b(this,e),this.positionsCompressed=[],this.lenPositionsCompressed=0,this.metallicRoughness=[],this.indices8Bits=[],this.lenIndices8Bits=0,this.indices16Bits=[],this.lenIndices16Bits=0,this.indices32Bits=[],this.lenIndices32Bits=0,this.edgeIndices8Bits=[],this.lenEdgeIndices8Bits=0,this.edgeIndices16Bits=[],this.lenEdgeIndices16Bits=0,this.edgeIndices32Bits=[],this.lenEdgeIndices32Bits=0,this.perObjectColors=[],this.perObjectPickColors=[],this.perObjectSolid=[],this.perObjectOffsets=[],this.perObjectPositionsDecodeMatrices=[],this.perObjectInstancePositioningMatrices=[],this.perObjectVertexBases=[],this.perObjectIndexBaseOffsets=[],this.perObjectEdgeIndexBaseOffsets=[],this.perTriangleNumberPortionId8Bits=[],this.perTriangleNumberPortionId16Bits=[],this.perTriangleNumberPortionId32Bits=[],this.perEdgeNumberPortionId8Bits=[],this.perEdgeNumberPortionId16Bits=[],this.perEdgeNumberPortionId32Bits=[]})),uf=function(){function e(){b(this,e),this.texturePerObjectColorsAndFlags=null,this.texturePerObjectOffsets=null,this.texturePerObjectInstanceMatrices=null,this.texturePerObjectPositionsDecodeMatrix=null,this.texturePerVertexIdCoordinates=null,this.texturePerPolygonIdPortionIds8Bits=null,this.texturePerPolygonIdPortionIds16Bits=null,this.texturePerPolygonIdPortionIds32Bits=null,this.texturePerEdgeIdPortionIds8Bits=null,this.texturePerEdgeIdPortionIds16Bits=null,this.texturePerEdgeIdPortionIds32Bits=null,this.texturePerPolygonIdIndices8Bits=null,this.texturePerPolygonIdIndices16Bits=null,this.texturePerPolygonIdIndices32Bits=null,this.texturePerPolygonIdEdgeIndices8Bits=null,this.texturePerPolygonIdEdgeIndices16Bits=null,this.texturePerPolygonIdEdgeIndices32Bits=null,this.textureModelMatrices=null}return P(e,[{key:"finalize",value:function(){this.indicesPerBitnessTextures={8:this.texturePerPolygonIdIndices8Bits,16:this.texturePerPolygonIdIndices16Bits,32:this.texturePerPolygonIdIndices32Bits},this.indicesPortionIdsPerBitnessTextures={8:this.texturePerPolygonIdPortionIds8Bits,16:this.texturePerPolygonIdPortionIds16Bits,32:this.texturePerPolygonIdPortionIds32Bits},this.edgeIndicesPerBitnessTextures={8:this.texturePerPolygonIdEdgeIndices8Bits,16:this.texturePerPolygonIdEdgeIndices16Bits,32:this.texturePerPolygonIdEdgeIndices32Bits},this.edgeIndicesPortionIdsPerBitnessTextures={8:this.texturePerEdgeIdPortionIds8Bits,16:this.texturePerEdgeIdPortionIds16Bits,32:this.texturePerEdgeIdPortionIds32Bits}}},{key:"bindCommonTextures",value:function(e,t,n,r,i){this.texturePerObjectPositionsDecodeMatrix.bindTexture(e,t,1),this.texturePerVertexIdCoordinates.bindTexture(e,n,2),this.texturePerObjectColorsAndFlags.bindTexture(e,r,3),this.texturePerObjectInstanceMatrices.bindTexture(e,i,4)}},{key:"bindTriangleIndicesTextures",value:function(e,t,n,r){this.indicesPortionIdsPerBitnessTextures[r].bindTexture(e,t,5),this.indicesPerBitnessTextures[r].bindTexture(e,n,6)}},{key:"bindEdgeIndicesTextures",value:function(e,t,n,r){this.edgeIndicesPortionIdsPerBitnessTextures[r].bindTexture(e,t,5),this.edgeIndicesPerBitnessTextures[r].bindTexture(e,n,6)}}]),e}(),cf={sizeDataColorsAndFlags:0,sizeDataPositionDecodeMatrices:0,sizeDataTextureOffsets:0,sizeDataTexturePositions:0,sizeDataTextureIndices:0,sizeDataTextureEdgeIndices:0,sizeDataTexturePortionIds:0,numberOfGeometries:0,numberOfPortions:0,numberOfLayers:0,numberOfTextures:0,totalPolygons:0,totalPolygons8Bits:0,totalPolygons16Bits:0,totalPolygons32Bits:0,totalEdges:0,totalEdges8Bits:0,totalEdges16Bits:0,totalEdges32Bits:0,cannotCreatePortion:{because10BitsObjectId:0,becauseTextureSize:0},overheadSizeAlignementIndices:0,overheadSizeAlignementEdgeIndices:0};window.printDataTextureRamStats=function(){console.log(JSON.stringify(cf,null,4));var e=0;Object.keys(cf).forEach((function(t){t.startsWith("size")&&(e+=cf[t])})),console.log("Total size ".concat(e," bytes (").concat((e/1e3/1e3).toFixed(2)," MB)")),console.log("Avg bytes / triangle: ".concat((e/cf.totalPolygons).toFixed(2)));var t={};Object.keys(cf).forEach((function(n){n.startsWith("size")&&(t[n]="".concat((cf[n]/e*100).toFixed(2)," % of total"))})),console.log(JSON.stringify({percentualRamUsage:t},null,4))};var ff=function(){function e(){b(this,e)}return P(e,[{key:"disableBindedTextureFiltering",value:function(e){e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)}},{key:"createTextureForColorsAndFlags",value:function(e,t,n,r,i,a,s){var o=t.length;this.numPortions=o;var l=4096,u=Math.ceil(o/512);if(0===u)throw"texture height===0";var c=new Uint8Array(16384*u);cf.sizeDataColorsAndFlags+=c.byteLength,cf.numberOfTextures++;for(var f=0;f>24&255,r[f]>>16&255,r[f]>>8&255,255&r[f]],32*f+16),c.set([i[f]>>24&255,i[f]>>16&255,i[f]>>8&255,255&i[f]],32*f+20),c.set([a[f]>>24&255,a[f]>>16&255,a[f]>>8&255,255&a[f]],32*f+24),c.set([s[f]?1:0,0,0,0],32*f+28);var p=e.createTexture();return e.bindTexture(e.TEXTURE_2D,p),e.texStorage2D(e.TEXTURE_2D,1,e.RGBA8UI,l,u),e.texSubImage2D(e.TEXTURE_2D,0,0,0,l,u,e.RGBA_INTEGER,e.UNSIGNED_BYTE,c,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,p,l,u,c)}},{key:"createTextureForObjectOffsets",value:function(e,t){var n=512,r=Math.ceil(t/n);if(0===r)throw"texture height===0";var i=new Float32Array(1536*r).fill(0);cf.sizeDataTextureOffsets+=i.byteLength,cf.numberOfTextures++;var a=e.createTexture();return e.bindTexture(e.TEXTURE_2D,a),e.texStorage2D(e.TEXTURE_2D,1,e.RGB32F,n,r),e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,r,e.RGB,e.FLOAT,i,0),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.bindTexture(e.TEXTURE_2D,null),new Uu(e,a,n,r,i)}},{key:"createTextureForInstancingMatrices",value:function(e,t){var n=t.length;if(0===n)throw"num instance matrices===0";var r=2048,i=Math.ceil(n/512),a=new Float32Array(8192*i);cf.numberOfTextures++;for(var s=0;s65536&&cf.cannotCreatePortion.because10BitsObjectId++;var n=this._numPortions+t<=65536,r=void 0!==e.geometryId&&null!==e.geometryId?"".concat(e.geometryId,"#").concat(0):"".concat(e.id,"#").concat(0);if(!this._bucketGeometries[r]){var i=Math.max(this._state.numIndices8Bits,this._state.numIndices16Bits,this._state.numIndices32Bits),a=0,s=0;e.buckets.forEach((function(e){a+=e.positionsCompressed.length/3,s+=e.indices.length/3})),(this._state.numVertices+a>4096*Af||i+s>4096*Af)&&cf.cannotCreatePortion.becauseTextureSize++,n&&(n=this._state.numVertices+a<=4096*Af&&i+s<=4096*Af)}return n}},{key:"createPortion",value:function(e,t){var n=this;if(this._finalized)throw"Already finalized";var r=[];t.buckets.forEach((function(e,i){var a=void 0!==t.geometryId&&null!==t.geometryId?"".concat(t.geometryId,"#").concat(i):"".concat(t.id,"#").concat(i),s=n._bucketGeometries[a];s||(s=n._createBucketGeometry(t,e),n._bucketGeometries[a]=s);var o=n._createSubPortion(t,s,e);r.push(o)}));var i=this._portionToSubPortionsMap.length;return this._portionToSubPortionsMap.push(r),this.model.numPortions++,this._meshes.push(e),i}},{key:"_createBucketGeometry",value:function(e,t){if(t.indices){var n=8*Math.ceil(t.indices.length/3/8)*3;cf.overheadSizeAlignementIndices+=2*(n-t.indices.length);var r=new Uint32Array(n);r.fill(0),r.set(t.indices),t.indices=r}if(t.edgeIndices){var i=8*Math.ceil(t.edgeIndices.length/2/8)*2;cf.overheadSizeAlignementEdgeIndices+=2*(i-t.edgeIndices.length);var a=new Uint32Array(i);a.fill(0),a.set(t.edgeIndices),t.edgeIndices=a}var s=t.positionsCompressed,o=t.indices,l=t.edgeIndices,u=this._buffer;u.positionsCompressed.push(s);var c,f=u.lenPositionsCompressed/3,p=s.length/3;u.lenPositionsCompressed+=s.length;var A,d,v=0;o&&(v=o.length/3,p<=256?(A=u.indices8Bits,c=u.lenIndices8Bits/3,u.lenIndices8Bits+=o.length):p<=65536?(A=u.indices16Bits,c=u.lenIndices16Bits/3,u.lenIndices16Bits+=o.length):(A=u.indices32Bits,c=u.lenIndices32Bits/3,u.lenIndices32Bits+=o.length),A.push(o));var h,I=0;l&&(I=l.length/2,p<=256?(h=u.edgeIndices8Bits,d=u.lenEdgeIndices8Bits/2,u.lenEdgeIndices8Bits+=l.length):p<=65536?(h=u.edgeIndices16Bits,d=u.lenEdgeIndices16Bits/2,u.lenEdgeIndices16Bits+=l.length):(h=u.edgeIndices32Bits,d=u.lenEdgeIndices32Bits/2,u.lenEdgeIndices32Bits+=l.length),h.push(l));return this._state.numVertices+=p,cf.numberOfGeometries++,{vertexBase:f,numVertices:p,numTriangles:v,numEdges:I,indicesBase:c,edgeIndicesBase:d}}},{key:"_createSubPortion",value:function(e,t,n,r){var i=e.color;e.metallic,e.roughness;var a,s,o=e.colors,l=e.opacity,u=e.meshMatrix,c=e.pickColor,f=this._buffer,p=this._state;f.perObjectPositionsDecodeMatrices.push(e.positionsDecodeMatrix),f.perObjectInstancePositioningMatrices.push(u||yf),f.perObjectSolid.push(!!e.solid),o?f.perObjectColors.push([255*o[0],255*o[1],255*o[2],255]):i&&f.perObjectColors.push([i[0],i[1],i[2],l]),f.perObjectPickColors.push(c),f.perObjectVertexBases.push(t.vertexBase),a=t.numVertices<=256?p.numIndices8Bits:t.numVertices<=65536?p.numIndices16Bits:p.numIndices32Bits,f.perObjectIndexBaseOffsets.push(a/3-t.indicesBase),s=t.numVertices<=256?p.numEdgeIndices8Bits:t.numVertices<=65536?p.numEdgeIndices16Bits:p.numEdgeIndices32Bits,f.perObjectEdgeIndexBaseOffsets.push(s/2-t.edgeIndicesBase);var A=this._subPortions.length;if(t.numTriangles>0){var d,v=3*t.numTriangles;t.numVertices<=256?(d=f.perTriangleNumberPortionId8Bits,p.numIndices8Bits+=v,cf.totalPolygons8Bits+=t.numTriangles):t.numVertices<=65536?(d=f.perTriangleNumberPortionId16Bits,p.numIndices16Bits+=v,cf.totalPolygons16Bits+=t.numTriangles):(d=f.perTriangleNumberPortionId32Bits,p.numIndices32Bits+=v,cf.totalPolygons32Bits+=t.numTriangles),cf.totalPolygons+=t.numTriangles;for(var h=0;h0){var I,y=2*t.numEdges;t.numVertices<=256?(I=f.perEdgeNumberPortionId8Bits,p.numEdgeIndices8Bits+=y,cf.totalEdges8Bits+=t.numEdges):t.numVertices<=65536?(I=f.perEdgeNumberPortionId16Bits,p.numEdgeIndices16Bits+=y,cf.totalEdges16Bits+=t.numEdges):(I=f.perEdgeNumberPortionId32Bits,p.numEdgeIndices32Bits+=y,cf.totalEdges32Bits+=t.numEdges),cf.totalEdges+=t.numEdges;for(var m=0;m0&&(n.texturePerEdgeIdPortionIds8Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(r,i.perEdgeNumberPortionId8Bits)),i.perEdgeNumberPortionId16Bits.length>0&&(n.texturePerEdgeIdPortionIds16Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(r,i.perEdgeNumberPortionId16Bits)),i.perEdgeNumberPortionId32Bits.length>0&&(n.texturePerEdgeIdPortionIds32Bits=this._dtxTextureFactory.createTextureForPackedPortionIds(r,i.perEdgeNumberPortionId32Bits)),i.lenIndices8Bits>0&&(n.texturePerPolygonIdIndices8Bits=this._dtxTextureFactory.createTextureFor8BitIndices(r,i.indices8Bits,i.lenIndices8Bits)),i.lenIndices16Bits>0&&(n.texturePerPolygonIdIndices16Bits=this._dtxTextureFactory.createTextureFor16BitIndices(r,i.indices16Bits,i.lenIndices16Bits)),i.lenIndices32Bits>0&&(n.texturePerPolygonIdIndices32Bits=this._dtxTextureFactory.createTextureFor32BitIndices(r,i.indices32Bits,i.lenIndices32Bits)),i.lenEdgeIndices8Bits>0&&(n.texturePerPolygonIdEdgeIndices8Bits=this._dtxTextureFactory.createTextureFor8BitsEdgeIndices(r,i.edgeIndices8Bits,i.lenEdgeIndices8Bits)),i.lenEdgeIndices16Bits>0&&(n.texturePerPolygonIdEdgeIndices16Bits=this._dtxTextureFactory.createTextureFor16BitsEdgeIndices(r,i.edgeIndices16Bits,i.lenEdgeIndices16Bits)),i.lenEdgeIndices32Bits>0&&(n.texturePerPolygonIdEdgeIndices32Bits=this._dtxTextureFactory.createTextureFor32BitsEdgeIndices(r,i.edgeIndices32Bits,i.lenEdgeIndices32Bits)),n.finalize(),this._buffer=null,this._bucketGeometries={},this._finalized=!0,this._deferredSetFlagsDirty=!1,this._onSceneRendering=this.model.scene.on("rendering",(function(){e._deferredSetFlagsDirty&&e._uploadDeferredFlags(),e._numUpdatesInFrame=0}))}}},{key:"isEmpty",value:function(){return 0===this._numPortions}},{key:"initFlags",value:function(e,t,n){t&Me&&(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++),t&je&&(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++),t&ke&&(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++),t&Ve&&(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++),t&Ue&&(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++),t&Qe&&(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++),t&He&&(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++),t&Fe&&(this._numCulledLayerPortions++,this.model.numCulledLayerPortions++),n&&(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++);this._setFlags(e,t,n,true),this._setFlags2(e,t,true)}},{key:"flushInitFlags",value:function(){this._setDeferredFlags(),this._setDeferredFlags2()}},{key:"setVisible",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Me?(this._numVisibleLayerPortions++,this.model.numVisibleLayerPortions++):(this._numVisibleLayerPortions--,this.model.numVisibleLayerPortions--),this._setFlags(e,t,n)}},{key:"setHighlighted",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&je?(this._numHighlightedLayerPortions++,this.model.numHighlightedLayerPortions++):(this._numHighlightedLayerPortions--,this.model.numHighlightedLayerPortions--),this._setFlags(e,t,n)}},{key:"setXRayed",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&ke?(this._numXRayedLayerPortions++,this.model.numXRayedLayerPortions++):(this._numXRayedLayerPortions--,this.model.numXRayedLayerPortions--),this._setFlags(e,t,n)}},{key:"setSelected",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Ve?(this._numSelectedLayerPortions++,this.model.numSelectedLayerPortions++):(this._numSelectedLayerPortions--,this.model.numSelectedLayerPortions--),this._setFlags(e,t,n)}},{key:"setEdges",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Qe?(this._numEdgesLayerPortions++,this.model.numEdgesLayerPortions++):(this._numEdgesLayerPortions--,this.model.numEdgesLayerPortions--),this._setFlags(e,t,n)}},{key:"setClippable",value:function(e,t){if(!this._finalized)throw"Not finalized";t&Ue?(this._numClippableLayerPortions++,this.model.numClippableLayerPortions++):(this._numClippableLayerPortions--,this.model.numClippableLayerPortions--),this._setFlags2(e,t)}},{key:"_beginDeferredFlags",value:function(){this._deferredSetFlagsActive=!0}},{key:"_uploadDeferredFlags",value:function(){if(this._deferredSetFlagsActive=!1,this._deferredSetFlagsDirty){this._deferredSetFlagsDirty=!1;var e=this.model.scene.canvas.gl,t=this._dtxState;e.bindTexture(e.TEXTURE_2D,t.texturePerObjectColorsAndFlags._texture),e.texSubImage2D(e.TEXTURE_2D,0,0,0,t.texturePerObjectColorsAndFlags._textureWidth,t.texturePerObjectColorsAndFlags._textureHeight,e.RGBA_INTEGER,e.UNSIGNED_BYTE,t.texturePerObjectColorsAndFlags._textureData)}}},{key:"setCulled",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&Fe?(this._numCulledLayerPortions+=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions++):(this._numCulledLayerPortions-=this._portionToSubPortionsMap[e].length,this.model.numCulledLayerPortions--),this._setFlags(e,t,n)}},{key:"setCollidable",value:function(e,t){if(!this._finalized)throw"Not finalized"}},{key:"setPickable",value:function(e,t,n){if(!this._finalized)throw"Not finalized";t&He?(this._numPickableLayerPortions++,this.model.numPickableLayerPortions++):(this._numPickableLayerPortions--,this.model.numPickableLayerPortions--),this._setFlags(e,t,n)}},{key:"setColor",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),console.info("_subPortionSetColor write through"),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectColorsAndFlags._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*8,Math.floor(e/512),1,1,r.RGBA_INTEGER,r.UNSIGNED_BYTE,vf)}},{key:"setTransparent",value:function(e,t,n){n?(this._numTransparentLayerPortions++,this.model.numTransparentLayerPortions++):(this._numTransparentLayerPortions--,this.model.numTransparentLayerPortions--),this._setFlags(e,t,n)}},{key:"_setFlags",value:function(e,t,n){for(var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=this._portionToSubPortionsMap[e],a=0,s=i.length;a3&&void 0!==arguments[3]&&arguments[3];if(!this._finalized)throw"Not finalized";var i,a,s=!!(t&Me),o=!!(t&ke),l=!!(t&je),u=!!(t&Ve),c=!!(t&Qe),f=!!(t&He),p=!!(t&Fe);i=!s||p||o?es.NOT_RENDERED:n?es.COLOR_TRANSPARENT:es.COLOR_OPAQUE,a=!s||p?es.NOT_RENDERED:u?es.SILHOUETTE_SELECTED:l?es.SILHOUETTE_HIGHLIGHTED:o?es.SILHOUETTE_XRAYED:es.NOT_RENDERED;var A=0;A=!s||p?es.NOT_RENDERED:u?es.EDGES_SELECTED:l?es.EDGES_HIGHLIGHTED:o?es.EDGES_XRAYED:c?n?es.EDGES_COLOR_TRANSPARENT:es.EDGES_COLOR_OPAQUE:es.NOT_RENDERED;var d=s&&!p&&f?es.PICK:es.NOT_RENDERED,v=this._dtxState,h=this.model.scene.canvas.gl;vf[0]=i,vf[1]=a,vf[2]=A,vf[3]=d,v.texturePerObjectColorsAndFlags._textureData.set(vf,32*e+8),this._deferredSetFlagsActive||r?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),h.bindTexture(h.TEXTURE_2D,v.texturePerObjectColorsAndFlags._texture),h.texSubImage2D(h.TEXTURE_2D,0,e%512*8+2,Math.floor(e/512),1,1,h.RGBA_INTEGER,h.UNSIGNED_BYTE,vf))}},{key:"_setDeferredFlags",value:function(){}},{key:"_setFlags2",value:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=this._portionToSubPortionsMap[e],i=0,a=r.length;i2&&void 0!==arguments[2]&&arguments[2];if(!this._finalized)throw"Not finalized";var r=t&Ue?255:0,i=this._dtxState,a=this.model.scene.canvas.gl;vf[0]=r,vf[1]=0,vf[2]=1,vf[3]=2,i.texturePerObjectColorsAndFlags._textureData.set(vf,32*e+12),this._deferredSetFlagsActive||n?this._deferredSetFlagsDirty=!0:(++this._numUpdatesInFrame>=10&&this._beginDeferredFlags(),a.bindTexture(a.TEXTURE_2D,i.texturePerObjectColorsAndFlags._texture),a.texSubImage2D(a.TEXTURE_2D,0,e%512*8+3,Math.floor(e/512),1,1,a.RGBA_INTEGER,a.UNSIGNED_BYTE,vf))}},{key:"_setDeferredFlags2",value:function(){}},{key:"setOffset",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectOffsets._texture),r.texSubImage2D(r.TEXTURE_2D,0,0,e,1,1,r.RGB,r.FLOAT,hf))}},{key:"setMatrix",value:function(e,t){for(var n=this._portionToSubPortionsMap[e],r=0,i=n.length;r=10&&this._beginDeferredFlags(),r.bindTexture(r.TEXTURE_2D,n.texturePerObjectInstanceMatrices._texture),r.texSubImage2D(r.TEXTURE_2D,0,e%512*4,Math.floor(e/512),4,1,r.RGBA,r.FLOAT,df))}},{key:"drawColorOpaque",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),t.withSAO&&this.model.saoEnabled?this._renderers.colorRendererWithSAO&&this._renderers.colorRendererWithSAO.drawLayer(t,this,es.COLOR_OPAQUE):this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"_updateBackfaceCull",value:function(e,t){var n=this.model.backfaces||e.sectioned;if(t.backfaces!==n){var r=t.gl;n?r.disable(r.CULL_FACE):r.enable(r.CULL_FACE),t.backfaces=n}}},{key:"drawColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numTransparentLayerPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.colorRenderer&&this._renderers.colorRenderer.drawLayer(t,this,es.COLOR_TRANSPARENT))}},{key:"drawDepth",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.depthRenderer&&this._renderers.depthRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"drawNormals",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&this._numTransparentLayerPortions!==this._numPortions&&this._numXRayedLayerPortions!==this._numPortions&&(this._updateBackfaceCull(e,t),this._renderers.normalsRenderer&&this._renderers.normalsRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"drawSilhouetteXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_XRAYED))}},{key:"drawSilhouetteHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_HIGHLIGHTED))}},{key:"drawSilhouetteSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.silhouetteRenderer&&this._renderers.silhouetteRenderer.drawLayer(t,this,es.SILHOUETTE_SELECTED))}},{key:"drawEdgesColorOpaque",value:function(e,t){this.model.scene.logarithmicDepthBufferEnabled?this.model.scene._loggedWarning||(console.log("Edge enhancement for SceneModel data texture layers currently disabled with logarithmic depth buffer"),this.model.scene._loggedWarning=!0):this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,es.EDGES_COLOR_OPAQUE)}},{key:"drawEdgesColorTransparent",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numEdgesLayerPortions&&0!==this._numTransparentLayerPortions&&this._renderers.edgesColorRenderer&&this._renderers.edgesColorRenderer.drawLayer(t,this,es.EDGES_COLOR_TRANSPARENT)}},{key:"drawEdgesHighlighted",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numHighlightedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,es.EDGES_HIGHLIGHTED)}},{key:"drawEdgesSelected",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numSelectedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,es.EDGES_SELECTED)}},{key:"drawEdgesXRayed",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&0!==this._numXRayedLayerPortions&&this._renderers.edgesRenderer&&this._renderers.edgesRenderer.drawLayer(t,this,es.EDGES_XRAYED)}},{key:"drawOcclusion",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.occlusionRenderer&&this._renderers.occlusionRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"drawShadow",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.shadowRenderer&&this._renderers.shadowRenderer.drawLayer(t,this,es.COLOR_OPAQUE))}},{key:"setPickMatrices",value:function(e,t){}},{key:"drawPickMesh",value:function(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickMeshRenderer&&this._renderers.pickMeshRenderer.drawLayer(t,this,es.PICK))}},{key:"drawPickDepths",value:function(e,t){0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickDepthRenderer&&this._renderers.pickDepthRenderer.drawLayer(t,this,es.PICK))}},{key:"drawSnapInit",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapInitRenderer&&this._renderers.snapInitRenderer.drawLayer(t,this,es.PICK))}},{key:"drawSnap",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.snapRenderer&&this._renderers.snapRenderer.drawLayer(t,this,es.PICK))}},{key:"drawPickNormals",value:function(e,t){this._numCulledLayerPortions!==this._numPortions&&0!==this._numVisibleLayerPortions&&(this._updateBackfaceCull(e,t),this._renderers.pickNormalsRenderer&&this._renderers.pickNormalsRenderer.drawLayer(t,this,es.PICK))}},{key:"destroy",value:function(){if(!this._destroyed){var e=this._state;e.metallicRoughnessBuf&&(e.metallicRoughnessBuf.destroy(),e.metallicRoughnessBuf=null),this.model.scene.off(this._onSceneRendering),e.destroy(),this._destroyed=!0}}}]),e}(),wf=function(){function e(t){b(this,e),this.id=t.id,this.colorTexture=t.colorTexture,this.metallicRoughnessTexture=t.metallicRoughnessTexture,this.normalsTexture=t.normalsTexture,this.emissiveTexture=t.emissiveTexture,this.occlusionTexture=t.occlusionTexture}return P(e,[{key:"destroy",value:function(){}}]),e}(),gf=function(){function e(t){b(this,e),this.id=t.id,this.texture=t.texture}return P(e,[{key:"destroy",value:function(){this.texture&&(this.texture.destroy(),this.texture=null)}}]),e}(),Ef={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},Tf=function(){function e(t,n,r){b(this,e),this.isLoading=!1,this.itemsLoaded=0,this.itemsTotal=0,this.urlModifier=void 0,this.handlers=[],this.onStart=void 0,this.onLoad=t,this.onProgress=n,this.onError=r}return P(e,[{key:"itemStart",value:function(e){this.itemsTotal++,!1===this.isLoading&&void 0!==this.onStart&&this.onStart(e,this.itemsLoaded,this.itemsTotal),this.isLoading=!0}},{key:"itemEnd",value:function(e){this.itemsLoaded++,void 0!==this.onProgress&&this.onProgress(e,this.itemsLoaded,this.itemsTotal),this.itemsLoaded===this.itemsTotal&&(this.isLoading=!1,void 0!==this.onLoad&&this.onLoad())}},{key:"itemError",value:function(e){void 0!==this.onError&&this.onError(e)}},{key:"resolveURL",value:function(e){return this.urlModifier?this.urlModifier(e):e}},{key:"setURLModifier",value:function(e){return this.urlModifier=e,this}},{key:"addHandler",value:function(e,t){return this.handlers.push(e,t),this}},{key:"removeHandler",value:function(e){var t=this.handlers.indexOf(e);return-1!==t&&this.handlers.splice(t,2),this}},{key:"getHandler",value:function(e){for(var t=0,n=this.handlers.length;t0&&void 0!==arguments[0]?arguments[0]:4;b(this,e),this.pool=t,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}return P(e,[{key:"_initWorker",value:function(e){if(!this.workers[e]){var t=this.workerCreator();t.addEventListener("message",this._onMessage.bind(this,e)),this.workers[e]=t}}},{key:"_getIdleWorker",value:function(){for(var e=0;e0&&console.warn("KTX2TextureTranscoder: Multiple active KTX2TextureTranscoder may cause performance issues. Use a single KTX2TextureTranscoder instance, or call .dispose() on old instances."),Rf++}return this._transcoderPending}},{key:"transcode",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return new Promise((function(i,a){var s=r;n._init().then((function(){return n._workerPool.postMessage({type:"transcode",buffers:e,taskConfig:s},e)})).then((function(e){var n=e.data,r=n.mipmaps,s=(n.width,n.height,n.format),o=n.type,l=n.error,u=n.dfdTransferFn,c=n.dfdFlags;if("error"===o)return a(l);t.setCompressedData({mipmaps:r,props:{format:s,minFilter:1===r.length?1006:1008,magFilter:1===r.length?1006:1008,encoding:2===u?3001:3e3,premultiplyAlpha:!!(1&c)}}),i()}))}))}},{key:"destroy",value:function(){URL.revokeObjectURL(this._workerSourceURL),this._workerPool.destroy(),Rf--}}]),e}();Bf.BasisFormat={ETC1S:0,UASTC_4x4:1},Bf.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Bf.EngineFormat={RGBAFormat:1023,RGBA_ASTC_4x4_Format:37808,RGBA_BPTC_Format:36492,RGBA_ETC2_EAC_Format:37496,RGBA_PVRTC_4BPPV1_Format:35842,RGBA_S3TC_DXT5_Format:33779,RGB_ETC1_Format:36196,RGB_ETC2_Format:37492,RGB_PVRTC_4BPPV1_Format:35840,RGB_S3TC_DXT1_Format:33776},Bf.BasisWorker=function(){var e,t,n,r=_EngineFormat,i=_TranscoderFormat,a=_BasisFormat;self.addEventListener("message",(function(s){var c,f=s.data;switch(f.type){case"init":e=f.config,c=f.transcoderBinary,t=new Promise((function(e){n={wasmBinary:c,onRuntimeInitialized:e},BASIS(n)})).then((function(){n.initializeBasis(),void 0===n.KTX2File&&console.warn("KTX2TextureTranscoder: Please update Basis Universal transcoder.")}));break;case"transcode":t.then((function(){try{for(var t=function(t){var s=new n.KTX2File(new Uint8Array(t));function c(){s.close(),s.delete()}if(!s.isValid())throw c(),new Error("KTX2TextureTranscoder: Invalid or unsupported .ktx2 file");var f=s.isUASTC()?a.UASTC_4x4:a.ETC1S,p=s.getWidth(),A=s.getHeight(),d=s.getLevels(),v=s.getHasAlpha(),h=s.getDFDTransferFunc(),I=s.getDFDFlags(),y=function(t,n,s,c){for(var f,p,A=t===a.ETC1S?o:l,d=0;d>t;n.sort(Hf);for(var o=new Int32Array(e.length),l=0,u=n.length;le[i+1]){var s=e[i];e[i]=e[i+1],e[i+1]=s}Gf=new Int32Array(e),t.sort(kf);for(var o=new Int32Array(e.length),l=0,u=t.length;l0)for(var r=n._meshes,i=0,a=r.length;i0)for(var s=this._meshes,o=0,l=s.length;o1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._dtxEnabled=r.scene.dtxEnabled&&!1!==i.dtxEnabled,r._enableVertexWelding=!1,r._enableIndexBucketing=!1,r._vboBatchingLayerScratchMemory=$a(),r._textureTranscoder=i.textureTranscoder||Sf(r.scene.viewer),r._maxGeometryBatchSize=i.maxGeometryBatchSize,r._aabb=$.collapseAABB3(),r._aabbDirty=!0,r._quantizationRanges={},r._vboInstancingLayers={},r._vboBatchingLayers={},r._dtxLayers={},r.layerList=[],r._entityList=[],r._geometries={},r._dtxBuckets={},r._textures={},r._textureSets={},r._transforms={},r._meshes={},r._entities={},r._scheduledMeshes={},r._meshesCfgsBeforeMeshCreation={},r.renderFlags=new ki,r.numGeometries=0,r.numPortions=0,r.numVisibleLayerPortions=0,r.numTransparentLayerPortions=0,r.numXRayedLayerPortions=0,r.numHighlightedLayerPortions=0,r.numSelectedLayerPortions=0,r.numEdgesLayerPortions=0,r.numPickableLayerPortions=0,r.numClippableLayerPortions=0,r.numCulledLayerPortions=0,r.numEntities=0,r._numTriangles=0,r._numLines=0,r._numPoints=0,r._edgeThreshold=i.edgeThreshold||10,r._origin=$.vec3(i.origin||[0,0,0]),r._position=$.vec3(i.position||[0,0,0]),r._rotation=$.vec3(i.rotation||[0,0,0]),r._quaternion=$.vec4(i.quaternion||[0,0,0,1]),r._conjugateQuaternion=$.vec4(i.quaternion||[0,0,0,1]),i.rotation&&$.eulerToQuaternion(r._rotation,"XYZ",r._quaternion),r._scale=$.vec3(i.scale||[1,1,1]),r._worldRotationMatrix=$.mat4(),r._worldRotationMatrixConjugate=$.mat4(),r._matrix=$.mat4(),r._matrixDirty=!0,r._rebuildMatrices(),r._worldNormalMatrix=$.mat4(),$.inverseMat4(r._matrix,r._worldNormalMatrix),$.transposeMat4(r._worldNormalMatrix),(i.matrix||i.position||i.rotation||i.scale||i.quaternion)&&(r._viewMatrix=$.mat4(),r._viewNormalMatrix=$.mat4(),r._viewMatrixDirty=!0,r._matrixNonIdentity=!0),r._opacity=1,r._colorize=[1,1,1],r._saoEnabled=!1!==i.saoEnabled,r._pbrEnabled=!1!==i.pbrEnabled,r._colorTextureEnabled=!1!==i.colorTextureEnabled,r._isModel=i.isModel,r._isModel&&r.scene._registerModel(w(r)),r._onCameraViewMatrix=r.scene.camera.on("matrix",(function(){r._viewMatrixDirty=!0})),r._meshesWithDirtyMatrices=[],r._numMeshesWithDirtyMatrices=0,r._onTick=r.scene.on("tick",(function(){for(;r._numMeshesWithDirtyMatrices>0;)r._meshesWithDirtyMatrices[--r._numMeshesWithDirtyMatrices]._updateMatrix()})),r._createDefaultTextureSet(),r.visible=i.visible,r.culled=i.culled,r.pickable=i.pickable,r.clippable=i.clippable,r.collidable=i.collidable,r.castsShadow=i.castsShadow,r.receivesShadow=i.receivesShadow,r.xrayed=i.xrayed,r.highlighted=i.highlighted,r.selected=i.selected,r.edges=i.edges,r.colorize=i.colorize,r.opacity=i.opacity,r.backfaces=i.backfaces,r}return P(n,[{key:"_meshMatrixDirty",value:function(e){this._meshesWithDirtyMatrices[this._numMeshesWithDirtyMatrices++]=e}},{key:"_createDefaultTextureSet",value:function(){var e=new gf({id:"defaultColorTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new gf({id:"defaultMetalRoughTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),n=new gf({id:"defaultNormalsTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),r=new gf({id:"defaultEmissiveTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),i=new gf({id:"defaultOcclusionTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=n,this._textures.defaultEmissiveTexture=r,this._textures.defaultOcclusionTexture=i,this._textureSets.defaultTextureSet=new wf({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:n,emissiveTexture:r,occlusionTexture:i})}},{key:"isPerformanceModel",get:function(){return!0}},{key:"transforms",get:function(){return this._transforms}},{key:"textures",get:function(){return this._textures}},{key:"textureSets",get:function(){return this._textureSets}},{key:"meshes",get:function(){return this._meshes}},{key:"objects",get:function(){return this._entities}},{key:"origin",get:function(){return this._origin}},{key:"position",get:function(){return this._position},set:function(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"rotation",get:function(){return this._rotation},set:function(e){this._rotation.set(e||[0,0,0]),$.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"quaternion",get:function(){return this._quaternion},set:function(e){this._quaternion.set(e||[0,0,0,1]),$.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"scale",get:function(){return this._scale},set:function(e){}},{key:"matrix",get:function(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix},set:function(e){this._matrix.set(e||ip),$.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),$.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),$.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),$.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"rotationMatrix",get:function(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}},{key:"_rebuildMatrices",value:function(){this._matrixDirty&&($.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),$.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),$.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),$.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}},{key:"rotationMatrixConjugate",get:function(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}},{key:"_setWorldMatrixDirty",value:function(){this._matrixDirty=!0,this._aabbDirty=!0}},{key:"_transformDirty",value:function(){this._matrixDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0}},{key:"_sceneModelDirty",value:function(){this.scene._aabbDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0,this._matrixDirty=!0;for(var e=0,t=this._entityList.length;e0},set:function(e){e=!1!==e,this._visible=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._xrayed=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._highlighted=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._selected=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._edges=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!1!==e,this._pickable=e;for(var t=0,n=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){for(var o=e.colors,l=new Uint8Array(o.length),u=0,c=o.length;u>24&255,i=n>>16&255,a=n>>8&255,s=255&n;switch(e.pickColor=new Uint8Array([s,a,i,r]),e.solid="solid"===e.primitive,t.origin=$.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e),t.aabb=e.aabb;break;case 1:t.layer=this._getVBOBatchingLayer(e),t.aabb=e.aabb;break;case 0:t.layer=this._getVBOInstancingLayer(e),t.aabb=e.aabb}return e.transform&&(e.meshMatrix=e.transform.worldMatrix),t.portionId=t.layer.createPortion(t,e),t}},{key:"_getNumPrimitives",value:function(e){var t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(var n=0,r=e.buckets.length;n>>0).toString(16)}},{key:"_getVBOInstancingLayer",value:function(e){var t=this,n=e.origin,r=e.textureSetId||"-",i=e.geometryId,a="".concat(Math.round(n[0]),".").concat(Math.round(n[1]),".").concat(Math.round(n[2]),".").concat(r,".").concat(i),s=this._vboInstancingLayers[a];if(s)return s;for(var o=e.textureSet,l=e.geometry;!s;)switch(l.primitive){case"triangles":case"surface":s=new Zo({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0,solid:!1});break;case"solid":s=new Zo({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0,solid:!0});break;case"lines":s=new Fl({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0});break;case"points":s=new Bu({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0})}return this._vboInstancingLayers[a]=s,this.layerList.push(s),s}},{key:"createEntity",value:function(e){if(void 0===e.id?e.id=$.createUUID():this.scene.components[e.id]&&(this.error("Scene already has a Component with this ID: ".concat(e.id," - will assign random ID")),e.id=$.createUUID()),void 0!==e.meshIds){var t=0;this._visible&&!1!==e.visible&&(t|=Me),this._pickable&&!1!==e.pickable&&(t|=He),this._culled&&!1!==e.culled&&(t|=Fe),this._clippable&&!1!==e.clippable&&(t|=Ue),this._collidable&&!1!==e.collidable&&(t|=Ge),this._edges&&!1!==e.edges&&(t|=Qe),this._xrayed&&!1!==e.xrayed&&(t|=ke),this._highlighted&&!1!==e.highlighted&&(t|=je),this._selected&&!1!==e.selected&&(t|=Ve),e.flags=t,this._createEntity(e)}else this.error("Config missing: meshIds")}},{key:"_createEntity",value:function(e){for(var t=[],n=0,r=e.meshIds.length;nt.sortId?1:0}));for(var s=0,o=this.layerList.length;s0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}},{key:"_updateRenderFlagsVisibleLayers",value:function(){var e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(var t=0,n=this.layerList.length;t0)for(var a=0;a0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){var t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0)this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0));if(this.numSelectedLayerPortions>0){var n=this.scene.selectedMaterial._state;n.fill&&(n.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),n.edges&&(n.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){var r=this.scene.highlightMaterial._state;r.fill&&(r.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),r.edges&&(r.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}}},{key:"drawColorOpaque",value:function(e){for(var t=this.renderFlags,n=0,r=t.visibleLayers.length;n2&&void 0!==arguments[2]&&arguments[2],r=e.positionsCompressed||[],i=Uf(e.indices||[],t),a=jf(e.edgeIndices||[]);function s(e,t){if(e>t){var n=e;e=t,t=n}function r(n,r){return n!==e?e-n:r!==t?t-r:0}for(var i=0,s=(a.length>>1)-1;i<=s;){var o=s+i>>1,l=r(a[2*o],a[2*o+1]);if(l>0)i=o+1;else{if(!(l<0))return o;s=o-1}}return-i-1}var o=new Int32Array(a.length/2);o.fill(0);var l=r.length/3;if(l>8*(1<p.maxNumPositions&&(p=f()),p.bucketNumber>8)return[e];-1===u[h]&&(u[h]=p.numPositions++,p.positionsCompressed.push(r[3*h]),p.positionsCompressed.push(r[3*h+1]),p.positionsCompressed.push(r[3*h+2])),-1===u[I]&&(u[I]=p.numPositions++,p.positionsCompressed.push(r[3*I]),p.positionsCompressed.push(r[3*I+1]),p.positionsCompressed.push(r[3*I+2])),-1===u[y]&&(u[y]=p.numPositions++,p.positionsCompressed.push(r[3*y]),p.positionsCompressed.push(r[3*y+1]),p.positionsCompressed.push(r[3*y+2])),p.indices.push(u[h]),p.indices.push(u[I]),p.indices.push(u[y]);var m=void 0;(m=s(h,I))>=0&&0===o[m]&&(o[m]=1,p.edgeIndices.push(u[a[2*m]]),p.edgeIndices.push(u[a[2*m+1]])),(m=s(h,y))>=0&&0===o[m]&&(o[m]=1,p.edgeIndices.push(u[a[2*m]]),p.edgeIndices.push(u[a[2*m+1]])),(m=s(I,y))>=0&&0===o[m]&&(o[m]=1,p.edgeIndices.push(u[a[2*m]]),p.edgeIndices.push(u[a[2*m+1]]))}var w=t/8*2,g=t/8,E=2*r.length+(i.length+a.length)*w,T=0;return r.length,c.forEach((function(e){T+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*g,e.positionsCompressed.length})),T>E?[e]:(n&&Vf(c,e),c)}({positionsCompressed:r,indices:i,edgeIndices:a},r.length/3>65536?16:8):s=[{positionsCompressed:r,indices:i,edgeIndices:a}];return s}var lp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e,i))._positions=i.positions||[],i.indices)r._indices=i.indices;else{r._indices=[];for(var a=0,s=r._positions.length/3-1;a1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,"BCFViewpoints",e,i)).originatingSystem=i.originatingSystem||"xeokit.io",r.authoringTool=i.authoringTool||"xeokit.io",r}return P(n,[{key:"getViewpoint",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.viewer.scene,r=n.camera,i=n.realWorldOffset,a=!0===t.reverseClippingPlanes,s={},o=$.normalizeVec3($.subVec3(r.look,r.eye,$.vec3())),l=r.eye,u=r.up;r.yUp&&(o=hp(o),l=hp(l),u=hp(u));var c=dp($.addVec3(l,i));"ortho"===r.projection?s.orthogonal_camera={camera_view_point:c,camera_direction:dp(o),camera_up_vector:dp(u),view_to_world_scale:r.ortho.scale}:s.perspective_camera={camera_view_point:c,camera_direction:dp(o),camera_up_vector:dp(u),field_of_view:r.perspective.fov};var p=n.sectionPlanes;for(var A in p)if(p.hasOwnProperty(A)){var d=p[A];if(!d.active)continue;var v=d.pos,h=void 0;h=a?$.negateVec3(d.dir,$.vec3()):d.dir,r.yUp&&(v=hp(v),h=hp(h)),$.addVec3(v,i),v=dp(v),h=dp(h),s.clipping_planes||(s.clipping_planes=[]),s.clipping_planes.push({location:v,direction:h})}var I=n.lineSets;for(var y in I)if(I.hasOwnProperty(y)){var m=I[y];s.lines||(s.lines=[]);for(var w=m.positions,g=m.indices,E=0,T=g.length/2;E1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=this.viewer,i=r.scene,a=i.camera,s=!1!==n.rayCast,o=!1!==n.immediate,l=!1!==n.reset,u=i.realWorldOffset,c=!0===n.reverseClippingPlanes;if(i.clearSectionPlanes(),e.clipping_planes&&e.clipping_planes.length>0&&e.clipping_planes.forEach((function(e){var t=vp(e.location,up),n=vp(e.direction,up);c&&$.negateVec3(n),$.subVec3(t,u),a.yUp&&(t=Ip(t),n=Ip(n)),new aa(i,{pos:t,dir:n})})),i.clearLines(),e.lines&&e.lines.length>0){var f=[],p=[],A=0;e.lines.forEach((function(e){e.start_point&&e.end_point&&(f.push(e.start_point.x),f.push(e.start_point.y),f.push(e.start_point.z),f.push(e.end_point.x),f.push(e.end_point.y),f.push(e.end_point.z),p.push(A++),p.push(A++))})),new lp(i,{positions:f,indices:p,clippable:!1,collidable:!0})}if(i.clearBitmaps(),e.bitmaps&&e.bitmaps.length>0&&e.bitmaps.forEach((function(e){var t=e.bitmap_type||"jpg",n=e.bitmap_data,r=vp(e.location,cp),s=vp(e.normal,fp),o=vp(e.up,pp),l=e.height||1;t&&n&&r&&s&&o&&(a.yUp&&(r=Ip(r),s=Ip(s),o=Ip(o)),new za(i,{src:n,type:t,pos:r,normal:s,up:o,clippable:!1,collidable:!0,height:l}))})),l&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsHighlighted(i.highlightedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(i.setObjectsVisible(i.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.visible=!1}))}))):(i.setObjectsVisible(i.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.visible=!0}))})));var d=e.components.visibility.view_setup_hints;d&&(!1===d.spaces_visible&&i.setObjectsVisible(r.metaScene.getObjectIDsByType("IfcSpace"),!0),void 0!==d.spaces_translucent&&i.setObjectsXRayed(r.metaScene.getObjectIDsByType("IfcSpace"),!0),d.space_boundaries_visible,!1===d.openings_visible&&i.setObjectsVisible(r.metaScene.getObjectIDsByType("IfcOpening"),!0),d.space_boundaries_translucent,void 0!==d.openings_translucent&&i.setObjectsXRayed(r.metaScene.getObjectIDsByType("IfcOpening"),!0))}e.components.selection&&(i.setObjectsSelected(i.selectedObjectIds,!1),e.components.selection.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.selected=!0}))}))),e.components.translucency&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),e.components.translucency.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.xrayed=!0}))}))),e.components.coloring&&e.components.coloring.forEach((function(e){var r=e.color,i=0,a=!1;8===r.length&&((i=parseInt(r.substring(0,2),16)/256)<=1&&i>=.95&&(i=1),r=r.substring(2),a=!0);var s=[parseInt(r.substring(0,2),16)/256,parseInt(r.substring(2,4),16)/256,parseInt(r.substring(4,6),16)/256];e.components.map((function(e){return t._withBCFComponent(n,e,(function(e){e.colorize=s,a&&(e.opacity=i)}))}))}))}if(e.perspective_camera||e.orthogonal_camera){var v,h,I,y;if(e.perspective_camera?(v=vp(e.perspective_camera.camera_view_point,up),h=vp(e.perspective_camera.camera_direction,up),I=vp(e.perspective_camera.camera_up_vector,up),a.perspective.fov=e.perspective_camera.field_of_view,y="perspective"):(v=vp(e.orthogonal_camera.camera_view_point,up),h=vp(e.orthogonal_camera.camera_direction,up),I=vp(e.orthogonal_camera.camera_up_vector,up),a.ortho.scale=e.orthogonal_camera.view_to_world_scale,y="ortho"),$.subVec3(v,u),a.yUp&&(v=Ip(v),h=Ip(h),I=Ip(I)),s){var m=i.pick({pickSurface:!0,origin:v,direction:h});h=m?m.worldPos:$.addVec3(v,h,up)}else h=$.addVec3(v,h,up);o?(a.eye=v,a.look=h,a.up=I,a.projection=y):r.cameraFlight.flyTo({eye:v,look:h,up:I,duration:n.duration,projection:y})}}}},{key:"_withBCFComponent",value:function(e,t,n){var r=this.viewer,i=r.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){var a=t.authoring_tool_id,s=i.objects[a];if(s)return void n(s);if(e.updateCompositeObjects)if(r.metaScene.metaObjects[a])return void i.withObjects(r.metaScene.getObjectIDsInSubtree(a),n)}if(t.ifc_guid){var o=t.ifc_guid,l=i.objects[o];if(l)return void n(l);if(e.updateCompositeObjects)if(r.metaScene.metaObjects[o])return void i.withObjects(r.metaScene.getObjectIDsInSubtree(o),n);Object.keys(i.models).forEach((function(t){var a=$.globalizeObjectId(t,o),s=i.objects[a];s?n(s):e.updateCompositeObjects&&r.metaScene.metaObjects[a]&&i.withObjects(r.metaScene.getObjectIDsInSubtree(a),n)}))}}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this)}}]),n}();function dp(e){return{x:e[0],y:e[1],z:e[2]}}function vp(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function hp(e){return new Float64Array([e[0],-e[2],e[1]])}function Ip(e){return new Float64Array([e[0],e[2],-e[1]])}function yp(e){var t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0")}var mp=$.vec3(),wp=function(e,t,n,r){var i=e-n,a=t-r;return Math.sqrt(i*i+a*a)},gp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e.viewer.scene,i)).plugin=e,r._container=i.container,!r._container)throw"config missing: container";r._eventSubs={};var a=r.plugin.viewer.scene;r._originMarker=new qe(a,i.origin),r._targetMarker=new qe(a,i.target),r._originWorld=$.vec3(),r._targetWorld=$.vec3(),r._wp=new Float64Array(24),r._vp=new Float64Array(24),r._pp=new Float64Array(24),r._cp=new Float64Array(8),r._xAxisLabelCulled=!1,r._yAxisLabelCulled=!1,r._zAxisLabelCulled=!1,r._color=i.color||r.plugin.defaultColor;var s=i.onMouseOver?function(e){i.onMouseOver(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,o=i.onMouseLeave?function(e){i.onMouseLeave(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,l=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},u=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},c=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))},f=i.onContextMenu?function(e){i.onContextMenu(e,w(r))}:null,p=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))};return r._originDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._targetDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._lengthWire=new Je(r._container,{color:r._color,thickness:2,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._xAxisWire=new Je(r._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._yAxisWire=new Je(r._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._zAxisWire=new Je(r._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._lengthLabel=new $e(r._container,{fillColor:r._color,prefix:"",text:"",zIndex:void 0!==e.zIndex?e.zIndex+4:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._xAxisLabel=new $e(r._container,{fillColor:"red",prefix:"X",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._yAxisLabel=new $e(r._container,{fillColor:"green",prefix:"Y",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._zAxisLabel=new $e(r._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._wpDirty=!1,r._vpDirty=!1,r._cpDirty=!1,r._sectionPlanesDirty=!0,r._visible=!1,r._originVisible=!1,r._targetVisible=!1,r._wireVisible=!1,r._axisVisible=!1,r._xAxisVisible=!1,r._yAxisVisible=!1,r._zAxisVisible=!1,r._axisEnabled=!0,r._labelsVisible=!1,r._labelsOnWires=!1,r._clickable=!1,r._originMarker.on("worldPos",(function(e){r._originWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._targetMarker.on("worldPos",(function(e){r._targetWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._onViewMatrix=a.camera.on("viewMatrix",(function(){r._vpDirty=!0,r._needUpdate(0)})),r._onProjMatrix=a.camera.on("projMatrix",(function(){r._cpDirty=!0,r._needUpdate()})),r._onCanvasBoundary=a.canvas.on("boundary",(function(){r._cpDirty=!0,r._needUpdate(0)})),r._onMetricsUnits=a.metrics.on("units",(function(){r._cpDirty=!0,r._needUpdate()})),r._onMetricsScale=a.metrics.on("scale",(function(){r._cpDirty=!0,r._needUpdate()})),r._onMetricsOrigin=a.metrics.on("origin",(function(){r._cpDirty=!0,r._needUpdate()})),r._onSectionPlaneUpdated=a.on("sectionPlaneUpdated",(function(){r._sectionPlanesDirty=!0,r._needUpdate()})),r.approximate=i.approximate,r.visible=i.visible,r.originVisible=i.originVisible,r.targetVisible=i.targetVisible,r.wireVisible=i.wireVisible,r.axisVisible=i.axisVisible,r.xAxisVisible=i.xAxisVisible,r.yAxisVisible=i.yAxisVisible,r.zAxisVisible=i.zAxisVisible,r.labelsVisible=i.labelsVisible,r.labelsOnWires=i.labelsOnWires,r}return P(n,[{key:"_update",value:function(){if(this._visible){var e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._targetWorld[0],this._wp[5]=this._originWorld[1],this._wp[6]=this._originWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._originWorld[2],this._wp[11]=1,this._wp[12]=this._targetWorld[0],this._wp[13]=this._targetWorld[1],this._wp[14]=this._targetWorld[2],this._wp[15]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&($.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vp[15]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setCulled(!0),this._yAxisWire.setCulled(!0),this._zAxisWire.setCulled(!0),this._lengthWire.setCulled(!0),this._originDot.setCulled(!0),void this._targetDot.setCulled(!0);this._xAxisLabel.setCulled(!1),this._yAxisLabel.setCulled(!1),this._zAxisLabel.setCulled(!1),this._lengthLabel.setCulled(!1),this._xAxisWire.setCulled(!1),this._yAxisWire.setCulled(!1),this._zAxisWire.setCulled(!1),this._lengthWire.setCulled(!1),this._originDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}var t=this._originMarker.viewPos[2],n=this._targetMarker.viewPos[2];if(t>-.3||n>-.3)return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setVisible(!1),this._yAxisWire.setVisible(!1),this._zAxisWire.setVisible(!1),this._lengthWire.setVisible(!1),this._originDot.setVisible(!1),void this._targetDot.setVisible(!1);if(this._cpDirty){$.transformPositions4(e.camera.project.matrix,this._vp,this._pp);for(var r=this._pp,i=this._cp,a=e.canvas.canvas.getBoundingClientRect(),s=this._container.getBoundingClientRect(),o=a.top-s.top,l=a.left-s.left,u=e.canvas.boundary,c=u[2],f=u[3],p=0,A=this.plugin.viewer.scene.metrics,d=A.scale,v=A.units,h=A.unitsInfo[v].abbrev,I=0,y=r.length;I1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e.viewer.scene)).pointerLens=i.pointerLens,r._active=!1,r._currentDistanceMeasurement=null,r._currentDistanceMeasurementInitState={wireVisible:null,axisVisible:null,xAxisVisible:null,yaxisVisible:null,zAxisVisible:null,targetVisible:null},r._initMarkerDiv(),r._onCameraControlHoverSnapOrSurface=null,r._onCameraControlHoverSnapOrSurfaceOff=null,r._onMouseDown=null,r._onMouseUp=null,r._onCanvasTouchStart=null,r._onCanvasTouchEnd=null,r._snapping=!1!==i.snapping,r._mouseState=0,r._attachPlugin(e,i),r}return P(n,[{key:"_initMarkerDiv",value:function(){var e=document.createElement("div");e.setAttribute("id","myMarkerDiv");var t=this.scene.canvas.canvas;t.parentNode.insertBefore(e,t),e.style.background="black",e.style.border="2px solid blue",e.style.borderRadius="10px",e.style.width="5px",e.style.height="5px",e.style.margin="-200px -200px",e.style.zIndex="100",e.style.position="absolute",e.style.pointerEvents="none",this._markerDiv=e}},{key:"_destroyMarkerDiv",value:function(){if(this._markerDiv){var e=document.getElementById("myMarkerDiv");e.parentNode.removeChild(e),this._markerDiv=null}}},{key:"_attachPlugin",value:function(e){this.distanceMeasurementsPlugin=e,this.plugin=e}},{key:"active",get:function(){return this._active}},{key:"snapping",get:function(){return this._snapping},set:function(e){e!==this._snapping?(this._snapping=e,this.deactivate(),this.activate()):this._snapping=e}},{key:"activate",value:function(){var e=this;if(!this._active){this._markerDiv||this._initMarkerDiv(),this.fire("activated",!0);var t=this.distanceMeasurementsPlugin,n=this.scene,r=t.viewer.cameraControl,i=n.canvas.canvas;n.input;var a,s,o=!1,l=$.vec3(),u=$.vec2(),c=null;this._mouseState=0,this._onCameraControlHoverSnapOrSurface=r.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",(function(t){var n=t.snappedCanvasPos||t.canvasPos;if(o=!0,l.set(t.worldPos),u.set(t.canvasPos),0===e._mouseState){var r=i.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,f=r.left+a,p=r.top+s;e._markerDiv.style.marginLeft="".concat(f+n[0]-5,"px"),e._markerDiv.style.marginTop="".concat(p+n[1]-5,"px"),e._markerDiv.style.background="pink",t.snappedToVertex||t.snappedToEdge?(e.pointerLens&&(e.pointerLens.visible=!0,e.pointerLens.canvasPos=t.canvasPos,e.pointerLens.snappedCanvasPos=t.snappedCanvasPos||t.canvasPos,e.pointerLens.snapped=!0),e._markerDiv.style.background="greenyellow",e._markerDiv.style.border="2px solid green"):(e.pointerLens&&(e.pointerLens.visible=!0,e.pointerLens.canvasPos=t.canvasPos,e.pointerLens.snappedCanvasPos=t.canvasPos,e.pointerLens.snapped=!1),e._markerDiv.style.background="pink",e._markerDiv.style.border="2px solid red"),c=t.entity}else e._markerDiv.style.marginLeft="-10000px",e._markerDiv.style.marginTop="-10000px";i.style.cursor="pointer",e._currentDistanceMeasurement&&(e._currentDistanceMeasurement.wireVisible=e._currentDistanceMeasurementInitState.wireVisible,e._currentDistanceMeasurement.axisVisible=e._currentDistanceMeasurementInitState.axisVisible&&e.distanceMeasurementsPlugin.defaultAxisVisible,e._currentDistanceMeasurement.xAxisVisible=e._currentDistanceMeasurementInitState.xAxisVisible&&e.distanceMeasurementsPlugin.defaultXAxisVisible,e._currentDistanceMeasurement.yAxisVisible=e._currentDistanceMeasurementInitState.yAxisVisible&&e.distanceMeasurementsPlugin.defaultYAxisVisible,e._currentDistanceMeasurement.zAxisVisible=e._currentDistanceMeasurementInitState.zAxisVisible&&e.distanceMeasurementsPlugin.defaultZAxisVisible,e._currentDistanceMeasurement.targetVisible=e._currentDistanceMeasurementInitState.targetVisible,e._currentDistanceMeasurement.target.worldPos=l.slice(),e._markerDiv.style.marginLeft="-10000px",e._markerDiv.style.marginTop="-10000px")})),i.addEventListener("mousedown",this._onMouseDown=function(e){1===e.which&&(a=e.clientX,s=e.clientY)}),i.addEventListener("mouseup",this._onMouseUp=function(n){1===n.which&&(n.clientX>a+20||n.clientXs+20||n.clientY1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,"DistanceMeasurements",e))._pointerLens=i.pointerLens,r._container=i.container||document.body,r._defaultControl=null,r._measurements={},r.labelMinAxisLength=i.labelMinAxisLength,r.defaultVisible=!1!==i.defaultVisible,r.defaultOriginVisible=!1!==i.defaultOriginVisible,r.defaultTargetVisible=!1!==i.defaultTargetVisible,r.defaultWireVisible=!1!==i.defaultWireVisible,r.defaultLabelsVisible=!1!==i.defaultLabelsVisible,r.defaultAxisVisible=!1!==i.defaultAxisVisible,r.defaultXAxisVisible=!1!==i.defaultXAxisVisible,r.defaultYAxisVisible=!1!==i.defaultYAxisVisible,r.defaultZAxisVisible=!1!==i.defaultZAxisVisible,r.defaultColor=void 0!==i.defaultColor?i.defaultColor:"#00BBFF",r.zIndex=i.zIndex||1e4,r.defaultLabelsOnWires=!1!==i.defaultLabelsOnWires,r._onMouseOver=function(e,t){r.fire("mouseOver",{plugin:w(r),distanceMeasurement:t,measurement:t,event:e})},r._onMouseLeave=function(e,t){r.fire("mouseLeave",{plugin:w(r),distanceMeasurement:t,measurement:t,event:e})},r._onContextMenu=function(e,t){r.fire("contextMenu",{plugin:w(r),distanceMeasurement:t,measurement:t,event:e})},r}return P(n,[{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,t){}},{key:"pointerLens",get:function(){return this._pointerLens}},{key:"control",get:function(){return this._defaultControl||(this._defaultControl=new Tp(this,{})),this._defaultControl}},{key:"measurements",get:function(){return this._measurements}},{key:"labelMinAxisLength",get:function(){return this._labelMinAxisLength},set:function(e){e<1&&(this.error("labelMinAxisLength must be >= 1; defaulting to 25"),e=25),this._labelMinAxisLength=e||25}},{key:"createMeasurement",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.viewer.scene.components[t.id]&&(this.error("Viewer scene component with this ID already exists: "+t.id),delete t.id);var n=t.origin,r=t.target,i=new gp(this,{id:t.id,plugin:this,container:this._container,origin:{entity:n.entity,worldPos:n.worldPos},target:{entity:r.entity,worldPos:r.worldPos},visible:t.visible,wireVisible:t.wireVisible,axisVisible:!1!==t.axisVisible&&!1!==this.defaultAxisVisible,xAxisVisible:!1!==t.xAxisVisible&&!1!==this.defaultXAxisVisible,yAxisVisible:!1!==t.yAxisVisible&&!1!==this.defaultYAxisVisible,zAxisVisible:!1!==t.zAxisVisible&&!1!==this.defaultZAxisVisible,labelsVisible:!1!==t.labelsVisible&&!1!==this.defaultLabelsVisible,originVisible:t.originVisible,targetVisible:t.targetVisible,color:t.color,labelsOnWires:!1!==t.labelsOnWires&&!1!==this.defaultLabelsOnWires,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[i.id]=i,i.on("destroyed",(function(){delete e._measurements[i.id]})),this.fire("measurementCreated",i),i}},{key:"destroyMeasurement",value:function(e){var t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("DistanceMeasurement not found: "+e)}},{key:"setLabelsShown",value:function(e){for(var t=0,n=Object.entries(this.measurements);t1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,"FastNav",e))._hideColorTexture=!1!==i.hideColorTexture,r._hidePBR=!1!==i.hidePBR,r._hideSAO=!1!==i.hideSAO,r._hideEdges=!1!==i.hideEdges,r._hideTransparentObjects=!!i.hideTransparentObjects,r._scaleCanvasResolution=!!i.scaleCanvasResolution,r._scaleCanvasResolutionFactor=i.scaleCanvasResolutionFactor||.6,r._delayBeforeRestore=!1!==i.delayBeforeRestore,r._delayBeforeRestoreSeconds=i.delayBeforeRestoreSeconds||.5;var a=1e3*r._delayBeforeRestoreSeconds,s=!1,o=function(){a=1e3*r._delayBeforeRestoreSeconds,s||(e.scene._renderer.setColorTextureEnabled(!r._hideColorTexture),e.scene._renderer.setPBREnabled(!r._hidePBR),e.scene._renderer.setSAOEnabled(!r._hideSAO),e.scene._renderer.setTransparentEnabled(!r._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!r._hideEdges),r._scaleCanvasResolution?e.scene.canvas.resolutionScale=r._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,s=!0)},l=function(){e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),s=!1};r._onCanvasBoundary=e.scene.canvas.on("boundary",o),r._onCameraMatrix=e.scene.camera.on("matrix",o),r._onSceneTick=e.scene.on("tick",(function(e){s&&(a-=e.deltaTime,(!r._delayBeforeRestore||a<=0)&&l())}));var u=!1;return r._onSceneMouseDown=e.scene.input.on("mousedown",(function(){u=!0})),r._onSceneMouseUp=e.scene.input.on("mouseup",(function(){u=!1})),r._onSceneMouseMove=e.scene.input.on("mousemove",(function(){u&&o()})),r}return P(n,[{key:"hideColorTexture",get:function(){return this._hideColorTexture},set:function(e){this._hideColorTexture=e}},{key:"hidePBR",get:function(){return this._hidePBR},set:function(e){this._hidePBR=e}},{key:"hideSAO",get:function(){return this._hideSAO},set:function(e){this._hideSAO=e}},{key:"hideEdges",get:function(){return this._hideEdges},set:function(e){this._hideEdges=e}},{key:"hideTransparentObjects",get:function(){return this._hideTransparentObjects},set:function(e){this._hideTransparentObjects=!1!==e}},{key:"scaleCanvasResolution",get:function(){return this._scaleCanvasResolution},set:function(e){this._scaleCanvasResolution=e}},{key:"scaleCanvasResolutionFactor",get:function(){return this._scaleCanvasResolutionFactor},set:function(e){this._scaleCanvasResolutionFactor=e||.6}},{key:"delayBeforeRestore",get:function(){return this._delayBeforeRestore},set:function(e){this._delayBeforeRestore=e}},{key:"delayBeforeRestoreSeconds",get:function(){return this._delayBeforeRestoreSeconds},set:function(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}},{key:"send",value:function(e,t){}},{key:"destroy",value:function(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),Pp=function(){function e(){b(this,e)}return P(e,[{key:"getMetaModel",value:function(e,t,n){le.loadJSON(e,(function(e){t(e)}),(function(e){n(e)}))}},{key:"getGLTF",value:function(e,t,n){le.loadArraybuffer(e,(function(e){t(e)}),(function(e){n(e)}))}},{key:"getGLB",value:function(e,t,n){le.loadArraybuffer(e,(function(e){t(e)}),(function(e){n(e)}))}},{key:"getArrayBuffer",value:function(e,t,n,r){!function(e,t,n,r){var i=function(){};n=n||i,r=r||i;var a=/^data:(.*?)(;base64)?,(.*)$/,s=t.match(a);if(s){var o=!!s[2],l=s[3];l=window.decodeURIComponent(l),o&&(l=window.atob(l));try{for(var u=new ArrayBuffer(l.length),c=new Uint8Array(u),f=0;f0&&void 0!==arguments[0]?arguments[0]:{};b(this,e),this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=t.messages,this.locale=t.locale}return P(e,[{key:"messages",set:function(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}},{key:"loadMessages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this._messages[t]=e[t];this.messages=this._messages}},{key:"clearMessages",value:function(){this.messages={}}},{key:"locales",get:function(){return this._locales}},{key:"locale",get:function(){return this._locale},set:function(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}},{key:"translate",value:function(e,t){var n=this._messages[this._locale];if(!n)return null;var r=_p(e,n);return r?t?Rp(r,t):r:null}},{key:"translatePlurals",value:function(e,t,n){var r=this._messages[this._locale];if(!r)return null;var i=_p(e,r);return(i=0===(t=parseInt(""+t,10))?i.zero:t>1?i.other:i.one)?(i=Rp(i,[t]),n&&(i=Rp(i,n)),i):null}},{key:"fire",value:function(e,t,n){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==n&&(this._events[e]=t||!0);var r=this._eventSubs[e];if(r)for(var i in r){if(r.hasOwnProperty(i))r[i].callback(t)}}},{key:"on",value:function(e,t){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new G),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});var n=this._eventSubs[e];n||(n={},this._eventSubs[e]=n);var r=this._eventSubIDMap.addItem();n[r]={callback:t},this._eventSubEvents[r]=e;var i=this._events[e];return void 0!==i&&t(i),r}},{key:"off",value:function(e){if(null!=e&&this._eventSubEvents){var t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];var n=this._eventSubs[t];n&&delete n[e],this._eventSubIDMap.removeItem(e)}}}}]),e}();function _p(e,t){if(t[e])return t[e];for(var n=e.split("."),r=t,i=0,a=n.length;r&&i1&&void 0!==arguments[1]?arguments[1]:[];return e.replace(/\{\{|\}\}|\{(\d+)\}/g,(function(e,n){return"{{"===e?"{":"}}"===e?"}":t[n]}))}var Bp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).t=i.t,r}return P(n,[{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"tangent",get:function(){return this.getTangent(this._t)}},{key:"length",get:function(){var e=this._getLengths();return e[e.length-1]}},{key:"getTangent",value:function(e){var t=1e-4;void 0===e&&(e=this._t);var n=e-t,r=e+t;n<0&&(n=0),r>1&&(r=1);var i=this.getPoint(n),a=this.getPoint(r),s=$.subVec3(a,i,[]);return $.normalizeVec3(s,[])}},{key:"getPointAt",value:function(e){var t=this.getUToTMapping(e);return this.getPoint(t)}},{key:"getPoints",value:function(e){e||(e=5);var t,n=[];for(t=0;t<=e;t++)n.push(this.getPoint(t/e));return n}},{key:"_getLengths",value:function(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),a=0;for(r.push(0),n=1;n<=e;n++)t=this.getPoint(n/e),a+=$.lenVec3($.subVec3(t,i,[])),r.push(a),i=t;return this.cacheArcLengths=r,r}},{key:"_updateArcLengths",value:function(){this.needsUpdate=!0,this._getLengths()}},{key:"getUToTMapping",value:function(e,t){var n,r=this._getLengths(),i=0,a=r.length;n=t||e*r[a-1];for(var s,o=0,l=a-1;o<=l;)if((s=r[i=Math.floor(o+(l-o)/2)]-n)<0)o=i+1;else{if(!(s>0)){l=i;break}l=i-1}if(r[i=l]===n)return i/(a-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(a-1)}}]),n}(),Op=function(e){h(n,Bp);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).points=i.points,r.t=i.t,r}return P(n,[{key:"points",get:function(){return this._points},set:function(e){this._points=e||[]}},{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"getPoint",value:function(e){var t=this.points;if(!(t.length<3)){var n=(t.length-1)*e,r=Math.floor(n),i=n-r,a=t[0===r?r:r-1],s=t[r],o=t[r>t.length-2?t.length-1:r+1],l=t[r>t.length-3?t.length-1:r+2],u=$.vec3();return u[0]=$.catmullRomInterpolate(a[0],s[0],o[0],l[0],i),u[1]=$.catmullRomInterpolate(a[1],s[1],o[1],l[1],i),u[2]=$.catmullRomInterpolate(a[2],s[2],o[2],l[2],i),u}this.error("Can't sample point from SplineCurve - not enough points on curve - returning [0,0,0].")}},{key:"getJSON",value:function(){return{points:points,t:this._t}}}]),n}(),Sp=$.vec3(),Np=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._frames=[],r._eyeCurve=new Op(w(r)),r._lookCurve=new Op(w(r)),r._upCurve=new Op(w(r)),i.frames&&(r.addFrames(i.frames),r.smoothFrameTimes(1)),r}return P(n,[{key:"type",get:function(){return"CameraPath"}},{key:"frames",get:function(){return this._frames}},{key:"eyeCurve",get:function(){return this._eyeCurve}},{key:"lookCurve",get:function(){return this._lookCurve}},{key:"upCurve",get:function(){return this._upCurve}},{key:"saveFrame",value:function(e){var t=this.scene.camera;this.addFrame(e,t.eye,t.look,t.up)}},{key:"addFrame",value:function(e,t,n,r){var i={t:e,eye:t.slice(0),look:n.slice(0),up:r.slice(0)};this._frames.push(i),this._eyeCurve.points.push(i.eye),this._lookCurve.points.push(i.look),this._upCurve.points.push(i.up)}},{key:"addFrames",value:function(e){for(var t,n=0,r=e.length;n1?1:e,t.eye=this._eyeCurve.getPoint(e,Sp),t.look=this._lookCurve.getPoint(e,Sp),t.up=this._upCurve.getPoint(e,Sp)}},{key:"sampleFrame",value:function(e,t,n,r){e=e<0?0:e>1?1:e,this._eyeCurve.getPoint(e,t),this._lookCurve.getPoint(e,n),this._upCurve.getPoint(e,r)}},{key:"smoothFrameTimes",value:function(e){if(0!==this._frames.length){var t=$.vec3(),n=0;this._frames[0].t=0;for(var r=[],i=1,a=this._frames.length;i1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._look1=$.vec3(),r._eye1=$.vec3(),r._up1=$.vec3(),r._look2=$.vec3(),r._eye2=$.vec3(),r._up2=$.vec3(),r._orthoScale1=1,r._orthoScale2=1,r._flying=!1,r._flyEyeLookUp=!1,r._flyingEye=!1,r._flyingLook=!1,r._callback=null,r._callbackScope=null,r._time1=null,r._time2=null,r.easing=!1!==i.easing,r.duration=i.duration,r.fit=i.fit,r.fitFOV=i.fitFOV,r.trail=i.trail,r}return P(n,[{key:"type",get:function(){return"CameraFlightAnimation"}},{key:"flyTo",value:function(e,t,n){e=e||this.scene,this._flying&&this.stop(),this._flying=!1,this._flyingEye=!1,this._flyingLook=!1,this._flyingEyeLookUp=!1,this._callback=t,this._callbackScope=n;var r,i,a,s,o,l=this.scene.camera,u=!!e.projection&&e.projection!==l.projection;if(this._eye1[0]=l.eye[0],this._eye1[1]=l.eye[1],this._eye1[2]=l.eye[2],this._look1[0]=l.look[0],this._look1[1]=l.look[1],this._look1[2]=l.look[2],this._up1[0]=l.up[0],this._up1[1]=l.up[1],this._up1[2]=l.up[2],this._orthoScale1=l.ortho.scale,this._orthoScale2=e.orthoScale||this._orthoScale1,e.aabb)r=e.aabb;else if(6===e.length)r=e;else if(e.eye&&e.look||e.up)i=e.eye,a=e.look,s=e.up;else if(e.eye)i=e.eye;else if(e.look)a=e.look;else{var c=e;if((le.isNumeric(c)||le.isString(c))&&(o=c,!(c=this.scene.components[o])))return this.error("Component not found: "+le.inQuotes(o)),void(t&&(n?t.call(n):t()));u||(r=c.aabb||this.scene.aabb)}var f=e.poi;if(r){if(r[3]=1;e>1&&(e=1);var r=this.easing?n._ease(e,0,1,1):e,i=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?($.subVec3(i.eye,i.look,Hp),i.eye=$.lerpVec3(r,0,1,this._eye1,this._eye2,Mp),i.look=$.subVec3(Mp,Hp,xp)):this._flyingLook&&(i.look=$.lerpVec3(r,0,1,this._look1,this._look2,xp),i.up=$.lerpVec3(r,0,1,this._up1,this._up2,Fp)):this._flyingEyeLookUp&&(i.eye=$.lerpVec3(r,0,1,this._eye1,this._eye2,Mp),i.look=$.lerpVec3(r,0,1,this._look1,this._look2,xp),i.up=$.lerpVec3(r,0,1,this._up1,this._up2,Fp)),this._projection2){var a="ortho"===this._projection2?n._easeOutExpo(e,0,1,1):n._easeInCubic(e,0,1,1);i.customProjection.matrix=$.lerpMat4(a,0,1,this._projMatrix1,this._projMatrix2)}else i.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return i.ortho.scale=this._orthoScale2,void this.stop();he.scheduleTask(this._update,this)}}},{key:"stop",value:function(){if(this._flying){this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);var e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}}},{key:"cancel",value:function(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}},{key:"duration",get:function(){return this._duration/1e3},set:function(e){this._duration=e?1e3*e:500,this.stop()}},{key:"fit",get:function(){return this._fit},set:function(e){this._fit=!1!==e}},{key:"fitFOV",get:function(){return this._fitFOV},set:function(e){this._fitFOV=e||45}},{key:"trail",get:function(){return this._trail},set:function(e){this._trail=!!e}},{key:"destroy",value:function(){this.stop(),d(g(n.prototype),"destroy",this).call(this)}}],[{key:"_ease",value:function(e,t,n,r){return-n*(e/=r)*(e-2)+t}},{key:"_easeInCubic",value:function(e,t,n,r){return n*(e/=r)*e*e+t}},{key:"_easeOutExpo",value:function(e,t,n,r){return n*(1-Math.pow(2,-10*e/r))+t}}]),n}(),Gp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._cameraFlightAnimation=new Up(w(r)),r._t=0,r.state=n.SCRUBBING,r._playingFromT=0,r._playingToT=0,r._playingRate=i.playingRate||1,r._playingDir=1,r._lastTime=null,r.cameraPath=i.cameraPath,r._tick=r.scene.on("tick",r._updateT,w(r)),r}return P(n,[{key:"type",get:function(){return"CameraPathAnimation"}},{key:"_updateT",value:function(){var e=this._cameraPath;if(e){var t,r,i=performance.now(),a=this._lastTime?.001*(i-this._lastTime):0;if(this._lastTime=i,0!==a)switch(this.state){case n.SCRUBBING:return;case n.PLAYING:if(this._t+=this._playingRate*a,0===(t=this._cameraPath.frames.length)||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=n.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case n.PLAYING_TO:r=this._t+this._playingRate*a*this._playingDir,(this._playingDir<0&&r<=this._playingToT||this._playingDir>0&&r>=this._playingToT)&&(r=this._playingToT,this.state=n.SCRUBBING,this.fire("stopped")),this._t=r,e.loadFrame(this._t)}}}},{key:"_ease",value:function(e,t,n,r){return-n*(e/=r)*(e-2)+t}},{key:"cameraPath",get:function(){return this._cameraPath},set:function(e){this._cameraPath=e}},{key:"rate",get:function(){return this._playingRate},set:function(e){this._playingRate=e}},{key:"play",value:function(){this._cameraPath&&(this._lastTime=null,this.state=n.PLAYING)}},{key:"playToT",value:function(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=n.PLAYING_TO)}},{key:"playToFrame",value:function(e){var t=this._cameraPath;if(t){var n=t.frames[e];n?this.playToT(n.t):this.error("playToFrame - frame index out of range: "+e)}}},{key:"flyToFrame",value:function(e,t){var r=this._cameraPath;if(r){var i=r.frames[e];i?(this.state=n.SCRUBBING,this._cameraFlightAnimation.flyTo(i,t)):this.error("flyToFrame - frame index out of range: "+e)}}},{key:"scrubToT",value:function(e){var t=this._cameraPath;t&&(this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=n.SCRUBBING))}},{key:"scrubToFrame",value:function(e){var t=this._cameraPath;t&&(this.scene.camera&&(t.frames[e]?(t.loadFrame(this._t),this.state=n.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)))}},{key:"stop",value:function(){this.state=n.SCRUBBING,this.fire("stopped")}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene.off(this._tick)}}]),n}();Gp.STOPPED=0,Gp.SCRUBBING=1,Gp.PLAYING=2,Gp.PLAYING_TO=3;var kp=$.vec3(),jp=$.vec3();$.vec3();var Vp=$.vec3([0,-1,0]),Qp=$.vec4([0,0,0,1]),Wp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._src=null,r._image=null,r._pos=$.vec3(),r._origin=$.vec3(),r._rtcPos=$.vec3(),r._dir=$.vec3(),r._size=1,r._imageSize=$.vec2(),r._texture=new Oa(w(r)),r._plane=new Zi(w(r),{geometry:new Rn(w(r),ja({center:[0,0,0],xSize:1,zSize:1,xSegments:10,zSegments:10})),material:new Ln(w(r),{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:r._texture,emissiveMap:r._texture,backfaces:!0}),clippable:i.clippable}),r._grid=new Zi(w(r),{geometry:new Rn(w(r),ka({size:1,divisions:10})),material:new Ln(w(r),{diffuse:[0,0,0],ambient:[0,0,0],emissive:[.2,.8,.2]}),position:[0,.001,0],clippable:i.clippable}),r._node=new va(w(r),{rotation:[0,0,0],position:[0,0,0],scale:[1,1,1],clippable:!1,children:[r._plane,r._grid]}),r._gridVisible=!1,r.visible=!0,r.gridVisible=i.gridVisible,r.position=i.position,r.rotation=i.rotation,r.dir=i.dir,r.size=i.size,r.collidable=i.collidable,r.clippable=i.clippable,r.pickable=i.pickable,r.opacity=i.opacity,i.image?r.image=i.image:r.src=i.src,r}return P(n,[{key:"visible",get:function(){return this._plane.visible},set:function(e){this._plane.visible=e,this._grid.visible=this._gridVisible&&e}},{key:"gridVisible",get:function(){return this._gridVisible},set:function(e){e=!1!==e,this._gridVisible=e,this._grid.visible=this._gridVisible&&this.visible}},{key:"image",get:function(){return this._image},set:function(e){this._image=e,this._image&&(this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage(),this._src=null,this._texture.image=this._image)}},{key:"src",get:function(){return this._src},set:function(e){var t=this;if(this._src=e,this._src){this._image=null;var n=new Image;n.onload=function(){t._texture.image=n,t._imageSize[0]=n.width,t._imageSize[1]=n.height,t._updatePlaneSizeFromImage()},n.src=this._src}}},{key:"position",get:function(){return this._pos},set:function(e){this._pos.set(e||[0,0,0]),Se(this._pos,this._origin,this._rtcPos),this._node.origin=this._origin,this._node.position=this._rtcPos}},{key:"rotation",get:function(){return this._node.rotation},set:function(e){this._node.rotation=e}},{key:"size",get:function(){return this._size},set:function(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}},{key:"dir",get:function(){return this._dir},set:function(e){if(this._dir.set(e||[0,0,-1]),e){var t=this.scene.center,n=[-this._dir[0],-this._dir[1],-this._dir[2]];$.subVec3(t,this.position,kp);var r=-$.dotVec3(n,kp);$.normalizeVec3(n),$.mulVec3Scalar(n,r,jp),$.vec3PairToQuaternion(Vp,e,Qp),this._node.quaternion=Qp}}},{key:"collidable",get:function(){return this._node.collidable},set:function(e){this._node.collidable=!1!==e}},{key:"clippable",get:function(){return this._node.clippable},set:function(e){this._node.clippable=!1!==e}},{key:"pickable",get:function(){return this._node.pickable},set:function(e){this._node.pickable=!1!==e}},{key:"opacity",get:function(){return this._node.opacity},set:function(e){this._node.opacity=e}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this)}},{key:"_updatePlaneSizeFromImage",value:function(){var e=this._size,t=this._imageSize[0],n=this._imageSize[1];if(t>n){var r=n/t;this._node.scale=[e,1,e*r]}else{var i=t/n;this._node.scale=[e*i,1,e]}}}]),n}(),zp=function(e){h(n,vn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n);var a=w(r=t.call(this,e,i));r._shadowRenderBuf=null,r._shadowViewMatrix=null,r._shadowProjMatrix=null,r._shadowViewMatrixDirty=!0,r._shadowProjMatrixDirty=!0;var s=r.scene.camera,o=r.scene.canvas;return r._onCameraViewMatrix=s.on("viewMatrix",(function(){r._shadowViewMatrixDirty=!0})),r._onCameraProjMatrix=s.on("projMatrix",(function(){r._shadowProjMatrixDirty=!0})),r._onCanvasBoundary=o.on("boundary",(function(){r._shadowProjMatrixDirty=!0})),r._state=new zt({type:"point",pos:$.vec3([1,1,1]),color:$.vec3([.7,.7,.8]),intensity:1,attenuation:[0,0,0],space:i.space||"view",castsShadow:!1,getShadowViewMatrix:function(){if(a._shadowViewMatrixDirty){a._shadowViewMatrix||(a._shadowViewMatrix=$.identityMat4());var e=a._state.pos,t=s.look,n=s.up;$.lookAtMat4v(e,t,n,a._shadowViewMatrix),a._shadowViewMatrixDirty=!1}return a._shadowViewMatrix},getShadowProjMatrix:function(){if(a._shadowProjMatrixDirty){a._shadowProjMatrix||(a._shadowProjMatrix=$.identityMat4());var e=a.scene.canvas.canvas;$.perspectiveMat4(Math.PI/180*70,e.clientWidth/e.clientHeight,.1,500,a._shadowProjMatrix),a._shadowProjMatrixDirty=!1}return a._shadowProjMatrix},getShadowRenderBuf:function(){return a._shadowRenderBuf||(a._shadowRenderBuf=new Gt(a.scene.canvas.canvas,a.scene.canvas.gl,{size:[1024,1024]})),a._shadowRenderBuf}}),r.pos=i.pos,r.color=i.color,r.intensity=i.intensity,r.constantAttenuation=i.constantAttenuation,r.linearAttenuation=i.linearAttenuation,r.quadraticAttenuation=i.quadraticAttenuation,r.castsShadow=i.castsShadow,r.scene._lightCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"PointLight"}},{key:"pos",get:function(){return this._state.pos},set:function(e){this._state.pos.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}},{key:"color",get:function(){return this._state.color},set:function(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}},{key:"intensity",get:function(){return this._state.intensity},set:function(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}},{key:"constantAttenuation",get:function(){return this._state.attenuation[0]},set:function(e){this._state.attenuation[0]=e||0,this.glRedraw()}},{key:"linearAttenuation",get:function(){return this._state.attenuation[1]},set:function(e){this._state.attenuation[1]=e||0,this.glRedraw()}},{key:"quadraticAttenuation",get:function(){return this._state.attenuation[2]},set:function(e){this._state.attenuation[2]=e||0,this.glRedraw()}},{key:"castsShadow",get:function(){return this._state.castsShadow},set:function(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}},{key:"destroy",value:function(){var e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}]),n}();function Kp(e){return 0==(e&e-1)}function Yp(e){--e;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1}var Xp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n);var a=(r=t.call(this,e,i)).scene.canvas.gl;return r._state=new zt({texture:new Da({gl:a,target:a.TEXTURE_CUBE_MAP}),flipY:r._checkFlipY(i.minFilter),encoding:r._checkEncoding(i.encoding),minFilter:1008,magFilter:1006,wrapS:1001,wrapT:1001,mipmaps:!0}),r._src=i.src,r._images=[],r._loadSrc(i.src),re.memory.textures++,r}return P(n,[{key:"type",get:function(){return"CubeTexture"}},{key:"_checkFlipY",value:function(e){return!!e}},{key:"_checkEncoding",value:function(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}},{key:"_webglContextRestored",value:function(){this.scene.canvas.gl,this._state.texture=null,this._src&&this._loadSrc(this._src)}},{key:"_loadSrc",value:function(e){var t=this,n=this.scene.canvas.gl;this._images=[];for(var r=!1,i=0,a=function(a){var s,o,l=new Image;l.onload=(s=l,o=a,function(){if(!r&&(s=function(e){if(!Kp(e.width)||!Kp(e.height)){var t=document.createElement("canvas");t.width=Yp(e.width),t.height=Yp(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}(s),t._images[o]=s,6==++i)){var e=t._state.texture;e||(e=new Da({gl:n,target:n.TEXTURE_CUBE_MAP}),t._state.texture=e),e.setImage(t._images,t._state),t.fire("loaded",t._src,!1),t.glRedraw()}}),l.onerror=function(){r=!0},l.src=e[a]},s=0;s1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).scene._lightsState.addReflectionMap(r._state),r.scene._reflectionMapCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"ReflectionMap"}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._reflectionMapDestroyed(this)}}]),n}(),Jp=function(e){h(n,Xp);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).scene._lightMapCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"LightMap"}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._lightMapDestroyed(this)}}]),n}(),Zp=function(e){h(n,qe);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,{entity:i.entity,occludable:i.occludable,worldPos:i.worldPos}))._occluded=!1,r._visible=!0,r._src=null,r._image=null,r._pos=$.vec3(),r._origin=$.vec3(),r._rtcPos=$.vec3(),r._dir=$.vec3(),r._size=1,r._imageSize=$.vec2(),r._texture=new Oa(w(r),{src:i.src}),r._geometry=new Rn(w(r),{primitive:"triangles",positions:[3,3,0,-3,3,0,-3,-3,0,3,-3,0],normals:[-1,0,0,-1,0,0,-1,0,0,-1,0,0],uv:[1,-1,0,-1,0,0,1,0],indices:[0,1,2,0,2,3]}),r._mesh=new Zi(w(r),{geometry:r._geometry,material:new Ln(w(r),{ambient:[.9,.3,.9],shininess:30,diffuseMap:r._texture,backfaces:!0}),scale:[1,1,1],position:i.worldPos,rotation:[90,0,0],billboard:"spherical",occluder:!1}),r.visible=!0,r.collidable=i.collidable,r.clippable=i.clippable,r.pickable=i.pickable,r.opacity=i.opacity,r.size=i.size,i.image?r.image=i.image:r.src=i.src,r}return P(n,[{key:"_setVisible",value:function(e){this._occluded=!e,this._mesh.visible=this._visible&&!this._occluded,d(g(n.prototype),"_setVisible",this).call(this,e)}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=null==e||e,this._mesh.visible=this._visible&&!this._occluded}},{key:"image",get:function(){return this._image},set:function(e){this._image=e,this._image&&(this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updatePlaneSizeFromImage(),this._src=null,this._texture.image=this._image)}},{key:"src",get:function(){return this._src},set:function(e){var t=this;if(this._src=e,this._src){this._image=null;var n=new Image;n.onload=function(){t._texture.image=n,t._imageSize[0]=n.width,t._imageSize[1]=n.height,t._updatePlaneSizeFromImage()},n.src=this._src}}},{key:"size",get:function(){return this._size},set:function(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}},{key:"collidable",get:function(){return this._mesh.collidable},set:function(e){this._mesh.collidable=!1!==e}},{key:"clippable",get:function(){return this._mesh.clippable},set:function(e){this._mesh.clippable=!1!==e}},{key:"pickable",get:function(){return this._mesh.pickable},set:function(e){this._mesh.pickable=!1!==e}},{key:"opacity",get:function(){return this._mesh.opacity},set:function(e){this._mesh.opacity=e}},{key:"_updatePlaneSizeFromImage",value:function(){var e=.5*this._size,t=this._imageSize[0],n=this._imageSize[1],r=n/t;this._geometry.positions=t>n?[e,e*r,0,-e,e*r,0,-e,-e*r,0,e,-e*r,0]:[e/r,e,0,-e/r,e,0,-e/r,-e,0,e/r,-e,0]}}]),n}(),$p=function(){function e(t){b(this,e),this._eye=$.vec3(),this._look=$.vec3(),this._up=$.vec3(),this._projection={},t&&this.saveCamera(t)}return P(e,[{key:"saveCamera",value:function(e){var t=e.camera,n=t.project;switch(this._eye.set(t.eye),this._look.set(t.look),this._up.set(t.up),t.projection){case"perspective":this._projection={projection:"perspective",fov:n.fov,fovAxis:n.fovAxis,near:n.near,far:n.far};break;case"ortho":this._projection={projection:"ortho",scale:n.scale,near:n.near,far:n.far};break;case"frustum":this._projection={projection:"frustum",left:n.left,right:n.right,top:n.top,bottom:n.bottom,near:n.near,far:n.far};break;case"custom":this._projection={projection:"custom",matrix:n.matrix.slice()}}}},{key:"restoreCamera",value:function(e,t){var n=e.camera,r=this._projection;function i(){switch(r.type){case"perspective":n.perspective.fov=r.fov,n.perspective.fovAxis=r.fovAxis,n.perspective.near=r.near,n.perspective.far=r.far;break;case"ortho":n.ortho.scale=r.scale,n.ortho.near=r.near,n.ortho.far=r.far;break;case"frustum":n.frustum.left=r.left,n.frustum.right=r.right,n.frustum.top=r.top,n.frustum.bottom=r.bottom,n.frustum.near=r.near,n.frustum.far=r.far;break;case"custom":n.customProjection.matrix=r.matrix}}t?e.viewer.cameraFlight.flyTo({eye:this._eye,look:this._look,up:this._up,orthoScale:r.scale,projection:r.projection},(function(){i(),t()})):(n.eye=this._eye,n.look=this._look,n.up=this._up,i(),n.projection=r.projection)}}]),e}(),eA=$.vec3(),tA=function(){function e(t){if(b(this,e),this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,t){var n=t.metaScene.scene;this.saveObjects(n,t)}}return P(e,[{key:"saveObjects",value:function(e,t,n){this.numObjects=0,this._mask=n?le.apply(n,{}):null;for(var r=!n||n.visible,i=!n||n.edges,a=!n||n.xrayed,s=!n||n.highlighted,o=!n||n.selected,l=!n||n.clippable,u=!n||n.pickable,c=!n||n.colorize,f=!n||n.opacity,p=t.metaObjects,A=e.objects,d=0,v=p.length;d1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).v0=i.v0,r.v1=i.v1,r.v2=i.v2,r.v3=i.v3,r.t=i.t,r}return P(n,[{key:"v0",get:function(){return this._v0},set:function(e){this._v0=e||$.vec3([0,0,0])}},{key:"v1",get:function(){return this._v1},set:function(e){this._v1=e||$.vec3([0,0,0])}},{key:"v2",get:function(){return this._v2},set:function(e){this._v2=e||$.vec3([0,0,0])}},{key:"v3",get:function(){return this._v3},set:function(e){this.fire("v3",this._v3=e||$.vec3([0,0,0]))}},{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"getPoint",value:function(e){var t=$.vec3();return t[0]=$.b3(e,this._v0[0],this._v1[0],this._v2[0],this._v3[0]),t[1]=$.b3(e,this._v0[1],this._v1[1],this._v2[1],this._v3[1]),t[2]=$.b3(e,this._v0[2],this._v1[2],this._v2[2],this._v3[2]),t}},{key:"getJSON",value:function(){return{v0:this._v0,v1:this._v1,v2:this._v2,v3:this._v3,t:this._t}}}]),n}(),aA=function(e){h(n,Bp);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._cachedLengths=[],r._dirty=!0,r._curves=[],r._t=0,r._dirtySubs=[],r._destroyedSubs=[],r.curves=i.curves||[],r.t=i.t,r}return P(n,[{key:"addCurve",value:function(e){this._curves.push(e),this._dirty=!0}},{key:"curves",get:function(){return this._curves},set:function(e){var t,n,r;for(e=e||[],n=0,r=this._curves.length;n1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"length",get:function(){var e=this._getCurveLengths();return e[e.length-1]}},{key:"getPoint",value:function(e){for(var t,n=e*this.length,r=this._getCurveLengths(),i=0;i=n){var a=1-(r[i]-n)/(t=this._curves[i]).length;return t.getPointAt(a)}i++}return null}},{key:"_getCurveLengths",value:function(){if(!this._dirty)return this._cachedLengths;var e,t=[],n=0,r=this._curves.length;for(e=0;e1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).v0=i.v0,r.v1=i.v1,r.v2=i.v2,r.t=i.t,r}return P(n,[{key:"v0",get:function(){return this._v0},set:function(e){this._v0=e||$.vec3([0,0,0])}},{key:"v1",get:function(){return this._v1},set:function(e){this._v1=e||$.vec3([0,0,0])}},{key:"v2",get:function(){return this._v2},set:function(e){this._v2=e||$.vec3([0,0,0])}},{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"getPoint",value:function(e){var t=$.vec3();return t[0]=$.b2(e,this._v0[0],this._v1[0],this._v2[0]),t[1]=$.b2(e,this._v0[1],this._v1[1],this._v2[1]),t[2]=$.b2(e,this._v0[2],this._v1[2],this._v2[2]),t}},{key:"getJSON",value:function(){return{v0:this._v0,v1:this._v1,v2:this._v2,t:this._t}}}]),n}(),oA=function(e){h(n,sp);var t=y(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),t.call(this,e,r)}return P(n)}(),lA=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._skyboxMesh=new Zi(w(r),{geometry:new Rn(w(r),{primitive:"triangles",positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),background:!0,scale:[2e3,2e3,2e3],rotation:[0,-90,0],material:new Ln(w(r),{ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],emissive:[1,1,1],emissiveMap:new Oa(w(r),{src:i.src,flipY:!0,wrapS:"clampToEdge",wrapT:"clampToEdge",encoding:i.encoding||"sRGB"}),backfaces:!0}),visible:!1,pickable:!1,clippable:!1,collidable:!1}),r.size=i.size,r.active=i.active,r}return P(n,[{key:"size",get:function(){return this._size},set:function(e){this._size=e||1e3,this._skyboxMesh.scale=[this._size,this._size,this._size]}},{key:"active",get:function(){return this._skyboxMesh.visible},set:function(e){this._skyboxMesh.visible=e}}]),n}(),uA=function(){function e(){b(this,e)}return P(e,[{key:"transcode",value:function(e,t){}},{key:"destroy",value:function(){}}]),e}(),cA=$.vec4(),fA=$.vec4(),pA=$.vec3(),AA=$.vec3(),dA=$.vec3(),vA=$.vec4(),hA=$.vec4(),IA=$.vec4(),yA=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"dollyToCanvasPos",value:function(e,t,n){var r=!1,i=this._scene.camera;if(e){var a=$.subVec3(e,i.eye,pA);r=$.lenVec3(a)0&&void 0!==arguments[0]?arguments[0]:{};this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);var t=e.color||[1,0,0];this._pivotSphereMaterial=new Ln(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}},{key:"disablePivotSphere",value:function(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}},{key:"startPivot",value:function(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;var e=this._scene.camera,t=$.lookAtMat4v(e.eye,e.look,e.worldUp);$.transformPoint3(t,this.getPivotPos(),this._cameraOffset);var n=this.getPivotPos();this._cameraOffset[2]+=$.distVec3(e.eye,n),t=$.inverseMat4(t);var r=$.transformVec3(t,this._cameraOffset),i=$.vec3();if($.subVec3(e.eye,n,i),$.addVec3(i,r),e.zUp){var a=i[1];i[1]=i[2],i[2]=a}this._radius=$.lenVec3(i),this._polar=Math.acos(i[1]/this._radius),this._azimuth=Math.atan2(i[0],i[2]),this._pivoting=!0}},{key:"_cameraLookingDownwards",value:function(){var e=this._scene.camera,t=$.normalizeVec3($.subVec3(e.look,e.eye,mA)),n=$.cross3Vec3(t,e.worldUp,wA);return $.sqLenVec3(n)<=1e-4}},{key:"getPivoting",value:function(){return this._pivoting}},{key:"setPivotPos",value:function(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}},{key:"setCanvasPivotPos",value:function(e){var t=this._scene.camera,n=Math.abs($.distVec3(this._scene.center,t.eye)),r=t.project.transposedMatrix,i=r.subarray(8,12),a=r.subarray(12),s=[0,0,-1,1],o=$.dotVec4(s,i)/$.dotVec4(s,a),l=EA;t.project.unproject(e,o,TA,bA,l);var u=$.normalizeVec3($.subVec3(l,t.eye,mA)),c=$.addVec3(t.eye,$.mulVec3Scalar(u,n,wA),gA);this.setPivotPos(c)}},{key:"getPivotPos",value:function(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}},{key:"continuePivot",value:function(e,t){if(this._pivoting&&(0!==e||0!==t)){var n=this._scene.camera,r=-e,i=-t;1===n.worldUp[2]&&(r=-r),this._azimuth+=.01*-r,this._polar+=.01*i,this._polar=$.clamp(this._polar,.001,Math.PI-.001);var a=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===n.worldUp[2]){var s=a[1];a[1]=a[2],a[2]=s}var o=$.lenVec3($.subVec3(n.look,n.eye,$.vec3())),l=this.getPivotPos();$.addVec3(a,l);var u=$.lookAtMat4v(a,l,n.worldUp);u=$.inverseMat4(u);var c=$.transformVec3(u,this._cameraOffset);u[12]-=c[0],u[13]-=c[1],u[14]-=c[2];var f=[u[8],u[9],u[10]];n.eye=[u[12],u[13],u[14]],$.subVec3(n.eye,$.mulVec3Scalar(f,o),n.look),n.up=[u[4],u[5],u[6]],this.showPivot()}}},{key:"showPivot",value:function(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}},{key:"hidePivot",value:function(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}},{key:"endPivot",value:function(){this._pivoting=!1}},{key:"destroy",value:function(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}]),e}(),PA=function(){function e(t,n){b(this,e),this._scene=t.scene,this._cameraControl=t,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=n,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=$.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._lastHash=null,this._needFireEvents=0}return P(e,[{key:"update",value:function(){if(this._configs.pointerEnabled&&(this.schedulePickEntity||this.schedulePickSurface)){var e="".concat(~~this.pickCursorPos[0],"-").concat(~~this.pickCursorPos[1],"-").concat(this.scheduleSnapOrPick,"-").concat(this.schedulePickSurface,"-").concat(this.schedulePickEntity);if(this._lastHash!==e){this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1;var t=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){var n=this._scene.pick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});n&&(n.snappedToEdge||n.snappedToVertex)?(this.snapPickResult=n,this.snappedOrPicked=!0,this._needFireEvents++):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){var r=this.pickResult.canvasPos;if(r[0]===this.pickCursorPos[0]&&r[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents+=t?1:0,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){var i=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(i[0]===this.pickCursorPos[0]&&i[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents++):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents++)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents++)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}}}},{key:"fireEvents",value:function(){if(0!==this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,pointerPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){var e=new yt;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.worldPos,e.canvasPos=this.pickCursorPos,e.snappedCanvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){var t=this.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=t)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=0}}}]),e}(),CA=$.vec2(),_A=function(){function e(t,n,r,i,a){b(this,e),this._scene=t;var s,o,l,u=n.pickController,c=0,f=0,p=0,A=0,d=!1,v=$.vec3(),h=!0,I=this._scene.canvas.canvas,y=[];function m(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];I.style.cursor="move",w(),e&&g()}function w(){c=i.pointerCanvasPos[0],f=i.pointerCanvasPos[1],p=i.pointerCanvasPos[0],A=i.pointerCanvasPos[1]}function g(){u.pickCursorPos=i.pointerCanvasPos,u.schedulePickSurface=!0,u.update(),u.picked&&u.pickedSurface&&u.pickResult&&u.pickResult.worldPos?(d=!0,v.set(u.pickResult.worldPos)):d=!1}document.addEventListener("keydown",this._documentKeyDownHandler=function(e){if(r.active&&r.pointerEnabled&&t.input.keyboardEnabled){var n=e.keyCode;y[n]=!0}}),document.addEventListener("keyup",this._documentKeyUpHandler=function(e){if(r.active&&r.pointerEnabled&&t.input.keyboardEnabled){var n=e.keyCode;y[n]=!1}}),I.addEventListener("mousedown",this._mouseDownHandler=function(e){if(r.active&&r.pointerEnabled)switch(e.which){case 1:y[t.input.KEY_SHIFT]||r.planView?(s=!0,m()):(s=!0,m(!1));break;case 2:o=!0,m();break;case 3:l=!0,r.panRightClick&&m()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=function(){if(r.active&&r.pointerEnabled&&(s||o||l)){var e=t.canvas.boundary,n=e[2],u=e[3],p=i.pointerCanvasPos[0],A=i.pointerCanvasPos[1];if(y[t.input.KEY_SHIFT]||r.planView||!r.panRightClick&&o||r.panRightClick&&l){var h=p-c,I=A-f,m=t.camera;if("perspective"===m.projection){var w=Math.abs(d?$.lenVec3($.subVec3(v,t.camera.eye,[])):t.camera.eyeLookDist)*Math.tan(m.perspective.fov/2*Math.PI/180);a.panDeltaX+=1.5*h*w/u,a.panDeltaY+=1.5*I*w/u}else a.panDeltaX+=.5*m.ortho.scale*(h/u),a.panDeltaY+=.5*m.ortho.scale*(I/u)}else!s||o||l||r.planView||(r.firstPerson?(a.rotateDeltaY-=(p-c)/n*r.dragRotationRate/2,a.rotateDeltaX+=(A-f)/u*(r.dragRotationRate/4)):(a.rotateDeltaY-=(p-c)/n*(1.5*r.dragRotationRate),a.rotateDeltaX+=(A-f)/u*(1.5*r.dragRotationRate)));c=p,f=A}}),I.addEventListener("mousemove",this._canvasMouseMoveHandler=function(e){r.active&&r.pointerEnabled&&i.mouseover&&(h=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=function(e){if(r.active&&r.pointerEnabled)switch(e.which){case 1:case 2:case 3:s=!1,o=!1,l=!1}}),I.addEventListener("mouseup",this._mouseUpHandler=function(e){if(r.active&&r.pointerEnabled){if(3===e.which){!function(e,t){if(e){for(var n=e.target,r=0,i=0,a=0,s=0;n.offsetParent;)r+=n.offsetLeft,i+=n.offsetTop,a+=n.scrollLeft,s+=n.scrollTop,n=n.offsetParent;t[0]=e.pageX+a-r,t[1]=e.pageY+s-i}else e=window.event,t[0]=e.x,t[1]=e.y}(e,CA);var t=CA[0],i=CA[1];Math.abs(t-p)<3&&Math.abs(i-A)<3&&n.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:CA,event:e},!0)}I.style.removeProperty("cursor")}}),I.addEventListener("mouseenter",this._mouseEnterHandler=function(){r.active&&r.pointerEnabled});var E=1/60,T=null;I.addEventListener("wheel",this._mouseWheelHandler=function(e){if(r.active&&r.pointerEnabled){var t=performance.now()/1e3,n=null!==T?t-T:0;T=t,n>.05&&(n=.05),n0?n.cameraFlight.flyTo(LA,(function(){n.pivotController.getPivoting()&&r.followPointer&&n.pivotController.showPivot()})):(n.cameraFlight.jumpTo(LA),n.pivotController.getPivoting()&&r.followPointer&&n.pivotController.showPivot())}}}))}return P(e,[{key:"reset",value:function(){}},{key:"destroy",value:function(){this._scene.input.off(this._onSceneKeyDown)}}]),e}(),MA=function(){function e(t,n,r,i,a){var s=this;b(this,e),this._scene=t;var o=n.pickController,l=n.pivotController,u=n.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;var c=!1,f=!1,p=this._scene.canvas.canvas,A=function(e){var r;e&&e.worldPos&&(r=e.worldPos);var i=e&&e.entity?e.entity.aabb:t.aabb;if(r){var a=t.camera;$.subVec3(a.eye,a.look,[]),n.cameraFlight.flyTo({aabb:i})}else n.cameraFlight.flyTo({aabb:i})},d=t.tickify(this._canvasMouseMoveHandler=function(e){if(r.active&&r.pointerEnabled&&!c&&!f){var n=u.hasSubs("hover"),a=u.hasSubs("hoverEnter"),l=u.hasSubs("hoverOut"),p=u.hasSubs("hoverOff"),A=u.hasSubs("hoverSurface"),d=u.hasSubs("hoverSnapOrSurface");if(n||a||l||p||A||d)if(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=A,o.scheduleSnapOrPick=d,o.update(),o.pickResult){if(o.pickResult.entity){var v=o.pickResult.entity.id;s._lastPickedEntityId!==v&&(void 0!==s._lastPickedEntityId&&u.fire("hoverOut",{entity:t.objects[s._lastPickedEntityId]},!0),u.fire("hoverEnter",o.pickResult,!0),s._lastPickedEntityId=v)}u.fire("hover",o.pickResult,!0),(o.pickResult.worldPos||o.pickResult.snappedWorldPos)&&u.fire("hoverSurface",o.pickResult,!0)}else void 0!==s._lastPickedEntityId&&(u.fire("hoverOut",{entity:t.objects[s._lastPickedEntityId]},!0),s._lastPickedEntityId=void 0),u.fire("hoverOff",{canvasPos:o.pickCursorPos},!0)}});p.addEventListener("mousemove",d),p.addEventListener("mousedown",this._canvasMouseDownHandler=function(e){if(1===e.which&&(c=!0),3===e.which&&(f=!0),1===e.which&&r.active&&r.pointerEnabled&&(i.mouseDownClientX=e.clientX,i.mouseDownClientY=e.clientY,i.mouseDownCursorX=i.pointerCanvasPos[0],i.mouseDownCursorY=i.pointerCanvasPos[1],!r.firstPerson&&r.followPointer&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),1===e.which))){var n=o.pickResult;n&&n.worldPos?(l.setPivotPos(n.worldPos),l.startPivot()):(r.smartPivot?l.setCanvasPivotPos(i.pointerCanvasPos):l.setPivotPos(t.camera.look),l.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=function(e){1===e.which&&(c=!1),3===e.which&&(f=!1),l.getPivoting()&&l.endPivot()}),p.addEventListener("mouseup",this._canvasMouseUpHandler=function(e){if(r.active&&r.pointerEnabled&&(1===e.which&&(l.hidePivot(),!(Math.abs(e.clientX-i.mouseDownClientX)>3||Math.abs(e.clientY-i.mouseDownClientY)>3)))){var a=u.hasSubs("picked"),c=u.hasSubs("pickedNothing"),f=u.hasSubs("pickedSurface"),p=u.hasSubs("doublePicked"),d=u.hasSubs("doublePickedSurface"),v=u.hasSubs("doublePickedNothing");if(!(r.doublePickFlyTo||p||d||v))return(a||c||f)&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=f,o.update(),o.pickResult?(u.fire("picked",o.pickResult,!0),o.pickedSurface&&u.fire("pickedSurface",o.pickResult,!0)):u.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0)),void(s._clicks=0);if(s._clicks++,1===s._clicks){o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=r.doublePickFlyTo,o.schedulePickSurface=f,o.update();var h=o.pickResult,I=o.pickedSurface;s._timeout=setTimeout((function(){h?(u.fire("picked",h,!0),I&&(u.fire("pickedSurface",h,!0),!r.firstPerson&&r.followPointer&&(n.pivotController.setPivotPos(h.worldPos),n.pivotController.startPivot()&&n.pivotController.showPivot()))):u.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0),s._clicks=0}),r.doubleClickTimeFrame)}else{if(null!==s._timeout&&(window.clearTimeout(s._timeout),s._timeout=null),o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=r.doublePickFlyTo||p||d,o.schedulePickSurface=o.schedulePickEntity&&d,o.update(),o.pickResult){if(u.fire("doublePicked",o.pickResult,!0),o.pickedSurface&&u.fire("doublePickedSurface",o.pickResult,!0),r.doublePickFlyTo&&(A(o.pickResult),!r.firstPerson&&r.followPointer)){var y=o.pickResult.entity.aabb,m=$.getAABB3Center(y);n.pivotController.setPivotPos(m),n.pivotController.startPivot()&&n.pivotController.showPivot()}}else if(u.fire("doublePickedNothing",{canvasPos:i.pointerCanvasPos},!0),r.doublePickFlyTo&&(A(),!r.firstPerson&&r.followPointer)){var w=t.aabb,g=$.getAABB3Center(w);n.pivotController.setPivotPos(g),n.pivotController.startPivot()&&n.pivotController.showPivot()}s._clicks=0}}},!1)}return P(e,[{key:"reset",value:function(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}},{key:"destroy",value:function(){var e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}]),e}(),FA=function(){function e(t,n,r,i,a){b(this,e),this._scene=t;var s=t.input,o=[],l=t.canvas.canvas,u=!0;this._onSceneMouseMove=s.on("mousemove",(function(){u=!0})),this._onSceneKeyDown=s.on("keydown",(function(e){r.active&&r.pointerEnabled&&t.input.keyboardEnabled&&i.mouseover&&(o[e]=!0,e===s.KEY_SHIFT&&(l.style.cursor="move"))})),this._onSceneKeyUp=s.on("keyup",(function(e){r.active&&r.pointerEnabled&&t.input.keyboardEnabled&&(o[e]=!1,e===s.KEY_SHIFT&&(l.style.cursor=null),n.pivotController.getPivoting()&&n.pivotController.endPivot())})),this._onTick=t.on("tick",(function(e){if(r.active&&r.pointerEnabled&&t.input.keyboardEnabled&&i.mouseover){var l=n.cameraControl,c=e.deltaTime/1e3;if(!r.planView){var f=l._isKeyDownForAction(l.ROTATE_Y_POS,o),p=l._isKeyDownForAction(l.ROTATE_Y_NEG,o),A=l._isKeyDownForAction(l.ROTATE_X_POS,o),d=l._isKeyDownForAction(l.ROTATE_X_NEG,o),v=c*r.keyboardRotationRate;(f||p||A||d)&&(!r.firstPerson&&r.followPointer&&n.pivotController.startPivot(),f?a.rotateDeltaY+=v:p&&(a.rotateDeltaY-=v),A?a.rotateDeltaX+=v:d&&(a.rotateDeltaX-=v),!r.firstPerson&&r.followPointer&&n.pivotController.startPivot())}if(!o[s.KEY_CTRL]&&!o[s.KEY_ALT]){var h=l._isKeyDownForAction(l.DOLLY_BACKWARDS,o),I=l._isKeyDownForAction(l.DOLLY_FORWARDS,o);if(h||I){var y=c*r.keyboardDollyRate;!r.firstPerson&&r.followPointer&&n.pivotController.startPivot(),I?a.dollyDelta-=y:h&&(a.dollyDelta+=y),u&&(i.followPointerDirty=!0,u=!1)}}var m=l._isKeyDownForAction(l.PAN_FORWARDS,o),w=l._isKeyDownForAction(l.PAN_BACKWARDS,o),g=l._isKeyDownForAction(l.PAN_LEFT,o),E=l._isKeyDownForAction(l.PAN_RIGHT,o),T=l._isKeyDownForAction(l.PAN_UP,o),b=l._isKeyDownForAction(l.PAN_DOWN,o),D=(o[s.KEY_ALT]?.3:1)*c*r.keyboardPanRate;(m||w||g||E||T||b)&&(!r.firstPerson&&r.followPointer&&n.pivotController.startPivot(),b?a.panDeltaY+=D:T&&(a.panDeltaY+=-D),E?a.panDeltaX+=-D:g&&(a.panDeltaX+=D),w?a.panDeltaZ+=D:m&&(a.panDeltaZ+=-D))}}))}return P(e,[{key:"reset",value:function(){}},{key:"destroy",value:function(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}]),e}(),HA=$.vec3(),UA=function(){function e(t,n,r,i,a){b(this,e),this._scene=t;var s=t.camera,o=n.pickController,l=n.pivotController,u=n.panController,c=1,f=1,p=null;this._onTick=t.on("tick",(function(){if(r.active&&r.pointerEnabled){var e="default";if(Math.abs(a.dollyDelta)<.001&&(a.dollyDelta=0),Math.abs(a.rotateDeltaX)<.001&&(a.rotateDeltaX=0),Math.abs(a.rotateDeltaY)<.001&&(a.rotateDeltaY=0),0===a.rotateDeltaX&&0===a.rotateDeltaY||(a.dollyDelta=0),r.followPointer&&--c<=0&&(c=1,0!==a.dollyDelta)){if(0===a.rotateDeltaY&&0===a.rotateDeltaX&&r.followPointer&&i.followPointerDirty&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),o.pickResult&&o.pickResult.worldPos?p=o.pickResult.worldPos:(f=1,p=null),i.followPointerDirty=!1),p){var n=Math.abs($.lenVec3($.subVec3(p,t.camera.eye,HA)));f=n/r.dollyProximityThreshold}fr.longTapRadius||Math.abs(I)>r.longTapRadius)&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),r.planView){var y=t.camera;if("perspective"===y.projection){var m=Math.abs(t.camera.eyeLookDist)*Math.tan(y.perspective.fov/2*Math.PI/180);a.panDeltaX+=h*m/l*r.touchPanRate,a.panDeltaY+=I*m/l*r.touchPanRate}else a.panDeltaX+=.5*y.ortho.scale*(h/l)*r.touchPanRate,a.panDeltaY+=.5*y.ortho.scale*(I/l)*r.touchPanRate}else a.rotateDeltaY-=h/o*(1*r.dragRotationRate),a.rotateDeltaX+=I/l*(1.5*r.dragRotationRate)}else if(2===d){var w=A[0],g=A[1];jA(w,u),jA(g,c);var E=$.geometricMeanVec2(p[0],p[1]),T=$.geometricMeanVec2(u,c),b=$.vec2();$.subVec2(E,T,b);var D=b[0],P=b[1],C=t.camera,_=$.distVec2([w.pageX,w.pageY],[g.pageX,g.pageY]),R=($.distVec2(p[0],p[1])-_)*r.touchDollyRate;if(a.dollyDelta=R,Math.abs(R)<1)if("perspective"===C.projection){var B=s.pickResult?s.pickResult.worldPos:t.center,O=Math.abs($.lenVec3($.subVec3(B,t.camera.eye,[])))*Math.tan(C.perspective.fov/2*Math.PI/180);a.panDeltaX-=D*O/l*r.touchPanRate,a.panDeltaY-=P*O/l*r.touchPanRate}else a.panDeltaX-=.5*C.ortho.scale*(D/l)*r.touchPanRate,a.panDeltaY-=.5*C.ortho.scale*(P/l)*r.touchPanRate;i.pointerCanvasPos=T}for(var S=0;S-1&&t-f<150&&(p>-1&&f-p<325?(QA(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=s,o.update(),o.pickResult?(o.pickResult.touchInput=!0,l.fire("doublePicked",o.pickResult),o.pickedSurface&&l.fire("doublePickedSurface",o.pickResult),r.doublePickFlyTo&&d(o.pickResult)):(l.fire("doublePickedNothing"),r.doublePickFlyTo&&d()),p=-1):$.distVec2(u[0],c)<4&&(QA(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=s,o.update(),o.pickResult?(o.pickResult.touchInput=!0,l.fire("picked",o.pickResult),o.pickedSurface&&l.fire("pickedSurface",o.pickResult)):l.fire("pickedNothing"),p=t),f=-1),u.length=n.length;for(var A=0,v=n.length;A1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i)).PAN_LEFT=0,r.PAN_RIGHT=1,r.PAN_UP=2,r.PAN_DOWN=3,r.PAN_FORWARDS=4,r.PAN_BACKWARDS=5,r.ROTATE_X_POS=6,r.ROTATE_X_NEG=7,r.ROTATE_Y_POS=8,r.ROTATE_Y_NEG=9,r.DOLLY_FORWARDS=10,r.DOLLY_BACKWARDS=11,r.AXIS_VIEW_RIGHT=12,r.AXIS_VIEW_BACK=13,r.AXIS_VIEW_LEFT=14,r.AXIS_VIEW_FRONT=15,r.AXIS_VIEW_TOP=16,r.AXIS_VIEW_BOTTOM=17,r._keyMap={},r.scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},r._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},r._states={pointerCanvasPos:$.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:$.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},r._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};var a=r.scene;return r._controllers={cameraControl:w(r),pickController:new PA(w(r),r._configs),pivotController:new DA(a,r._configs),panController:new yA(a),cameraFlight:new Up(w(r),{duration:.5})},r._handlers=[new GA(r.scene,r._controllers,r._configs,r._states,r._updates),new VA(r.scene,r._controllers,r._configs,r._states,r._updates),new _A(r.scene,r._controllers,r._configs,r._states,r._updates),new xA(r.scene,r._controllers,r._configs,r._states,r._updates),new MA(r.scene,r._controllers,r._configs,r._states,r._updates),new WA(r.scene,r._controllers,r._configs,r._states,r._updates),new FA(r.scene,r._controllers,r._configs,r._states,r._updates)],r._cameraUpdater=new UA(r.scene,r._controllers,r._configs,r._states,r._updates),r.navMode=i.navMode,i.planView&&(r.planView=i.planView),r.constrainVertical=i.constrainVertical,i.keyboardLayout?r.keyboardLayout=i.keyboardLayout:r.keyMap=i.keyMap,r.doublePickFlyTo=i.doublePickFlyTo,r.panRightClick=i.panRightClick,r.active=i.active,r.followPointer=i.followPointer,r.rotationInertia=i.rotationInertia,r.keyboardPanRate=i.keyboardPanRate,r.touchPanRate=i.touchPanRate,r.keyboardRotationRate=i.keyboardRotationRate,r.dragRotationRate=i.dragRotationRate,r.touchDollyRate=i.touchDollyRate,r.dollyInertia=i.dollyInertia,r.dollyProximityThreshold=i.dollyProximityThreshold,r.dollyMinSpeed=i.dollyMinSpeed,r.panInertia=i.panInertia,r.pointerEnabled=!0,r.keyboardDollyRate=i.keyboardDollyRate,r.mouseWheelDollyRate=i.mouseWheelDollyRate,r}return P(n,[{key:"keyMap",get:function(){return this._keyMap},set:function(e){if(e=e||"qwerty",le.isString(e)){var t=this.scene.input,n={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":n[this.PAN_LEFT]=[t.KEY_A],n[this.PAN_RIGHT]=[t.KEY_D],n[this.PAN_UP]=[t.KEY_Z],n[this.PAN_DOWN]=[t.KEY_X],n[this.PAN_BACKWARDS]=[],n[this.PAN_FORWARDS]=[],n[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],n[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],n[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],n[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],n[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],n[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],n[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],n[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],n[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],n[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],n[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],n[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":n[this.PAN_LEFT]=[t.KEY_Q],n[this.PAN_RIGHT]=[t.KEY_D],n[this.PAN_UP]=[t.KEY_W],n[this.PAN_DOWN]=[t.KEY_X],n[this.PAN_BACKWARDS]=[],n[this.PAN_FORWARDS]=[],n[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],n[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],n[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],n[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],n[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],n[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],n[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],n[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],n[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],n[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],n[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],n[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=n}else{var r=e;this._keyMap=r}}},{key:"_isKeyDownForAction",value:function(e,t){var n=this._keyMap[e];if(!n)return!1;t||(t=this.scene.input.keyDown);for(var r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};this._controllers.pivotController.enablePivotSphere(e)}},{key:"disablePivotSphere",value:function(){this._controllers.pivotController.disablePivotSphere()}},{key:"smartPivot",get:function(){return this._configs.smartPivot},set:function(e){this._configs.smartPivot=!1!==e}},{key:"doubleClickTimeFrame",get:function(){return this._configs.doubleClickTimeFrame},set:function(e){this._configs.doubleClickTimeFrame=null!=e?e:250}},{key:"destroy",value:function(){this._destroyHandlers(),this._destroyControllers(),this._cameraUpdater.destroy(),d(g(n.prototype),"destroy",this).call(this)}},{key:"_destroyHandlers",value:function(){for(var e=0,t=this._handlers.length;e1&&void 0!==arguments[1]?arguments[1]:{};if(this.finalized)throw"MetaScene already finalized - can't add more data";this._globalizeIDs(e,t);var n=this.metaScene,r=e.properties;if(e.propertySets)for(var i=0,a=e.propertySets.length;i0?ZA(t):null,s=n&&n.length>0?ZA(n):null;return function e(t){if(t){var n=!0;(s&&s[t.type]||a&&!a[t.type])&&(n=!1),n&&r.push(t.id);var i=t.children;if(i)for(var o=0,l=i.length;o>t;n.sort(Hf);for(var o=new Int32Array(e.length),l=0,u=n.length;le[i+1]){var s=e[i];e[i]=e[i+1],e[i+1]=s}Gf=new Int32Array(e),t.sort(kf);for(var o=new Int32Array(e.length),l=0,u=t.length;l0)for(var r=n._meshes,i=0,a=r.length;i0)for(var s=this._meshes,o=0,l=s.length;o1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._dtxEnabled=r.scene.dtxEnabled&&!1!==i.dtxEnabled,r._enableVertexWelding=!1,r._enableIndexBucketing=!1,r._vboBatchingLayerScratchMemory=$a(),r._textureTranscoder=i.textureTranscoder||Sf(r.scene.viewer),r._maxGeometryBatchSize=i.maxGeometryBatchSize,r._aabb=$.collapseAABB3(),r._aabbDirty=!0,r._quantizationRanges={},r._vboInstancingLayers={},r._vboBatchingLayers={},r._dtxLayers={},r.layerList=[],r._entityList=[],r._geometries={},r._dtxBuckets={},r._textures={},r._textureSets={},r._transforms={},r._meshes={},r._entities={},r._scheduledMeshes={},r._meshesCfgsBeforeMeshCreation={},r.renderFlags=new ki,r.numGeometries=0,r.numPortions=0,r.numVisibleLayerPortions=0,r.numTransparentLayerPortions=0,r.numXRayedLayerPortions=0,r.numHighlightedLayerPortions=0,r.numSelectedLayerPortions=0,r.numEdgesLayerPortions=0,r.numPickableLayerPortions=0,r.numClippableLayerPortions=0,r.numCulledLayerPortions=0,r.numEntities=0,r._numTriangles=0,r._numLines=0,r._numPoints=0,r._edgeThreshold=i.edgeThreshold||10,r._origin=$.vec3(i.origin||[0,0,0]),r._position=$.vec3(i.position||[0,0,0]),r._rotation=$.vec3(i.rotation||[0,0,0]),r._quaternion=$.vec4(i.quaternion||[0,0,0,1]),r._conjugateQuaternion=$.vec4(i.quaternion||[0,0,0,1]),i.rotation&&$.eulerToQuaternion(r._rotation,"XYZ",r._quaternion),r._scale=$.vec3(i.scale||[1,1,1]),r._worldRotationMatrix=$.mat4(),r._worldRotationMatrixConjugate=$.mat4(),r._matrix=$.mat4(),r._matrixDirty=!0,r._rebuildMatrices(),r._worldNormalMatrix=$.mat4(),$.inverseMat4(r._matrix,r._worldNormalMatrix),$.transposeMat4(r._worldNormalMatrix),(i.matrix||i.position||i.rotation||i.scale||i.quaternion)&&(r._viewMatrix=$.mat4(),r._viewNormalMatrix=$.mat4(),r._viewMatrixDirty=!0,r._matrixNonIdentity=!0),r._opacity=1,r._colorize=[1,1,1],r._saoEnabled=!1!==i.saoEnabled,r._pbrEnabled=!1!==i.pbrEnabled,r._colorTextureEnabled=!1!==i.colorTextureEnabled,r._isModel=i.isModel,r._isModel&&r.scene._registerModel(w(r)),r._onCameraViewMatrix=r.scene.camera.on("matrix",(function(){r._viewMatrixDirty=!0})),r._meshesWithDirtyMatrices=[],r._numMeshesWithDirtyMatrices=0,r._onTick=r.scene.on("tick",(function(){for(;r._numMeshesWithDirtyMatrices>0;)r._meshesWithDirtyMatrices[--r._numMeshesWithDirtyMatrices]._updateMatrix()})),r._createDefaultTextureSet(),r.visible=i.visible,r.culled=i.culled,r.pickable=i.pickable,r.clippable=i.clippable,r.collidable=i.collidable,r.castsShadow=i.castsShadow,r.receivesShadow=i.receivesShadow,r.xrayed=i.xrayed,r.highlighted=i.highlighted,r.selected=i.selected,r.edges=i.edges,r.colorize=i.colorize,r.opacity=i.opacity,r.backfaces=i.backfaces,r}return P(n,[{key:"_meshMatrixDirty",value:function(e){this._meshesWithDirtyMatrices[this._numMeshesWithDirtyMatrices++]=e}},{key:"_createDefaultTextureSet",value:function(){var e=new gf({id:"defaultColorTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})}),t=new gf({id:"defaultMetalRoughTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[0,1,1,1]})}),n=new gf({id:"defaultNormalsTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[0,0,0,0]})}),r=new gf({id:"defaultEmissiveTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[0,0,0,1]})}),i=new gf({id:"defaultOcclusionTexture",texture:new Da({gl:this.scene.canvas.gl,preloadColor:[1,1,1,1]})});this._textures.defaultColorTexture=e,this._textures.defaultMetalRoughTexture=t,this._textures.defaultNormalsTexture=n,this._textures.defaultEmissiveTexture=r,this._textures.defaultOcclusionTexture=i,this._textureSets.defaultTextureSet=new wf({id:"defaultTextureSet",model:this,colorTexture:e,metallicRoughnessTexture:t,normalsTexture:n,emissiveTexture:r,occlusionTexture:i})}},{key:"isPerformanceModel",get:function(){return!0}},{key:"transforms",get:function(){return this._transforms}},{key:"textures",get:function(){return this._textures}},{key:"textureSets",get:function(){return this._textureSets}},{key:"meshes",get:function(){return this._meshes}},{key:"objects",get:function(){return this._entities}},{key:"origin",get:function(){return this._origin}},{key:"position",get:function(){return this._position},set:function(e){this._position.set(e||[0,0,0]),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"rotation",get:function(){return this._rotation},set:function(e){this._rotation.set(e||[0,0,0]),$.eulerToQuaternion(this._rotation,"XYZ",this._quaternion),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"quaternion",get:function(){return this._quaternion},set:function(e){this._quaternion.set(e||[0,0,0,1]),$.quaternionToEuler(this._quaternion,"XYZ",this._rotation),this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"scale",get:function(){return this._scale},set:function(e){}},{key:"matrix",get:function(){return this._matrixDirty&&this._rebuildMatrices(),this._matrix},set:function(e){this._matrix.set(e||ip),$.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),$.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),$.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),$.translateMat4v(this._position,this._matrix),this._matrixDirty=!1,this._setWorldMatrixDirty(),this._sceneModelDirty(),this.glRedraw()}},{key:"rotationMatrix",get:function(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrix}},{key:"_rebuildMatrices",value:function(){this._matrixDirty&&($.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrix),$.conjugateQuaternion(this._quaternion,this._conjugateQuaternion),$.quaternionToRotationMat4(this._quaternion,this._worldRotationMatrixConjugate),this._matrix.set(this._worldRotationMatrix),$.translateMat4v(this._position,this._matrix),this._matrixDirty=!1)}},{key:"rotationMatrixConjugate",get:function(){return this._matrixDirty&&this._rebuildMatrices(),this._worldRotationMatrixConjugate}},{key:"_setWorldMatrixDirty",value:function(){this._matrixDirty=!0,this._aabbDirty=!0}},{key:"_transformDirty",value:function(){this._matrixDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0}},{key:"_sceneModelDirty",value:function(){this.scene._aabbDirty=!0,this._aabbDirty=!0,this.scene._aabbDirty=!0,this._matrixDirty=!0;for(var e=0,t=this._entityList.length;e0},set:function(e){e=!1!==e,this._visible=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._xrayed=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._highlighted=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._selected=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!!e,this._edges=e;for(var t=0,n=this._entityList.length;t0},set:function(e){e=!1!==e,this._pickable=e;for(var t=0,n=this._entityList.length;t0)e.colorsCompressed=new Uint8Array(e.colorsCompressed);else if(e.colors&&e.colors.length>0){for(var l=e.colors,u=new Uint8Array(l.length),c=0,f=l.length;c>24&255,i=n>>16&255,a=n>>8&255,s=255&n;switch(e.pickColor=new Uint8Array([s,a,i,r]),e.solid="solid"===e.primitive,t.origin=$.vec3(e.origin),e.type){case 2:t.layer=this._getDTXLayer(e),t.aabb=e.aabb;break;case 1:t.layer=this._getVBOBatchingLayer(e),t.aabb=e.aabb;break;case 0:t.layer=this._getVBOInstancingLayer(e),t.aabb=e.aabb}return e.transform&&(e.meshMatrix=e.transform.worldMatrix),t.portionId=t.layer.createPortion(t,e),t}},{key:"_getNumPrimitives",value:function(e){var t=0;switch(e.geometry?e.geometry.primitive:e.primitive){case"triangles":case"solid":case"surface":switch(e.type){case 2:for(var n=0,r=e.buckets.length;n>>0).toString(16)}},{key:"_getVBOInstancingLayer",value:function(e){var t=this,n=e.origin,r=e.textureSetId||"-",i=e.geometryId,a="".concat(Math.round(n[0]),".").concat(Math.round(n[1]),".").concat(Math.round(n[2]),".").concat(r,".").concat(i),s=this._vboInstancingLayers[a];if(s)return s;for(var o=e.textureSet,l=e.geometry;!s;)switch(l.primitive){case"triangles":case"surface":s=new Zo({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0,solid:!1});break;case"solid":s=new Zo({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0,solid:!0});break;case"lines":s=new Fl({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0});break;case"points":s=new Bu({model:t,textureSet:o,geometry:l,origin:n,layerIndex:0})}return this._vboInstancingLayers[a]=s,this.layerList.push(s),s}},{key:"createEntity",value:function(e){if(void 0===e.id?e.id=$.createUUID():this.scene.components[e.id]&&(this.error("Scene already has a Component with this ID: ".concat(e.id," - will assign random ID")),e.id=$.createUUID()),void 0!==e.meshIds){var t=0;this._visible&&!1!==e.visible&&(t|=Me),this._pickable&&!1!==e.pickable&&(t|=He),this._culled&&!1!==e.culled&&(t|=Fe),this._clippable&&!1!==e.clippable&&(t|=Ue),this._collidable&&!1!==e.collidable&&(t|=Ge),this._edges&&!1!==e.edges&&(t|=Qe),this._xrayed&&!1!==e.xrayed&&(t|=ke),this._highlighted&&!1!==e.highlighted&&(t|=je),this._selected&&!1!==e.selected&&(t|=Ve),e.flags=t,this._createEntity(e)}else this.error("Config missing: meshIds")}},{key:"_createEntity",value:function(e){for(var t=[],n=0,r=e.meshIds.length;nt.sortId?1:0}));for(var s=0,o=this.layerList.length;s0&&0===this.renderFlags.numVisibleLayers?this.renderFlags.culled=!0:this._updateRenderFlags()}},{key:"_updateRenderFlagsVisibleLayers",value:function(){var e=this.renderFlags;e.numLayers=this.layerList.length,e.numVisibleLayers=0;for(var t=0,n=this.layerList.length;t0)for(var a=0;a0&&(e.colorTransparent=!0),this.numXRayedLayerPortions>0){var t=this.scene.xrayMaterial._state;t.fill&&(t.fillAlpha<1?e.xrayedSilhouetteTransparent=!0:e.xrayedSilhouetteOpaque=!0),t.edges&&(t.edgeAlpha<1?e.xrayedEdgesTransparent=!0:e.xrayedEdgesOpaque=!0)}if(this.numEdgesLayerPortions>0)this.scene.edgeMaterial._state.edges&&(e.edgesOpaque=this.numTransparentLayerPortions0&&(e.edgesTransparent=!0));if(this.numSelectedLayerPortions>0){var n=this.scene.selectedMaterial._state;n.fill&&(n.fillAlpha<1?e.selectedSilhouetteTransparent=!0:e.selectedSilhouetteOpaque=!0),n.edges&&(n.edgeAlpha<1?e.selectedEdgesTransparent=!0:e.selectedEdgesOpaque=!0)}if(this.numHighlightedLayerPortions>0){var r=this.scene.highlightMaterial._state;r.fill&&(r.fillAlpha<1?e.highlightedSilhouetteTransparent=!0:e.highlightedSilhouetteOpaque=!0),r.edges&&(r.edgeAlpha<1?e.highlightedEdgesTransparent=!0:e.highlightedEdgesOpaque=!0)}}}},{key:"drawColorOpaque",value:function(e){for(var t=this.renderFlags,n=0,r=t.visibleLayers.length;n2&&void 0!==arguments[2]&&arguments[2],r=e.positionsCompressed||[],i=Uf(e.indices||[],t),a=jf(e.edgeIndices||[]);function s(e,t){if(e>t){var n=e;e=t,t=n}function r(n,r){return n!==e?e-n:r!==t?t-r:0}for(var i=0,s=(a.length>>1)-1;i<=s;){var o=s+i>>1,l=r(a[2*o],a[2*o+1]);if(l>0)i=o+1;else{if(!(l<0))return o;s=o-1}}return-i-1}var o=new Int32Array(a.length/2);o.fill(0);var l=r.length/3;if(l>8*(1<p.maxNumPositions&&(p=f()),p.bucketNumber>8)return[e];-1===u[h]&&(u[h]=p.numPositions++,p.positionsCompressed.push(r[3*h]),p.positionsCompressed.push(r[3*h+1]),p.positionsCompressed.push(r[3*h+2])),-1===u[I]&&(u[I]=p.numPositions++,p.positionsCompressed.push(r[3*I]),p.positionsCompressed.push(r[3*I+1]),p.positionsCompressed.push(r[3*I+2])),-1===u[y]&&(u[y]=p.numPositions++,p.positionsCompressed.push(r[3*y]),p.positionsCompressed.push(r[3*y+1]),p.positionsCompressed.push(r[3*y+2])),p.indices.push(u[h]),p.indices.push(u[I]),p.indices.push(u[y]);var m=void 0;(m=s(h,I))>=0&&0===o[m]&&(o[m]=1,p.edgeIndices.push(u[a[2*m]]),p.edgeIndices.push(u[a[2*m+1]])),(m=s(h,y))>=0&&0===o[m]&&(o[m]=1,p.edgeIndices.push(u[a[2*m]]),p.edgeIndices.push(u[a[2*m+1]])),(m=s(I,y))>=0&&0===o[m]&&(o[m]=1,p.edgeIndices.push(u[a[2*m]]),p.edgeIndices.push(u[a[2*m+1]]))}var w=t/8*2,g=t/8,E=2*r.length+(i.length+a.length)*w,T=0;return r.length,c.forEach((function(e){T+=2*e.positionsCompressed.length+(e.indices.length+e.edgeIndices.length)*g,e.positionsCompressed.length})),T>E?[e]:(n&&Vf(c,e),c)}({positionsCompressed:r,indices:i,edgeIndices:a},r.length/3>65536?16:8):s=[{positionsCompressed:r,indices:i,edgeIndices:a}];return s}var lp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e,i))._positions=i.positions||[],i.indices)r._indices=i.indices;else{r._indices=[];for(var a=0,s=r._positions.length/3-1;a1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,"BCFViewpoints",e,i)).originatingSystem=i.originatingSystem||"xeokit.io",r.authoringTool=i.authoringTool||"xeokit.io",r}return P(n,[{key:"getViewpoint",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.viewer.scene,r=n.camera,i=n.realWorldOffset,a=!0===t.reverseClippingPlanes,s={},o=$.normalizeVec3($.subVec3(r.look,r.eye,$.vec3())),l=r.eye,u=r.up;r.yUp&&(o=hp(o),l=hp(l),u=hp(u));var c=dp($.addVec3(l,i));"ortho"===r.projection?s.orthogonal_camera={camera_view_point:c,camera_direction:dp(o),camera_up_vector:dp(u),view_to_world_scale:r.ortho.scale}:s.perspective_camera={camera_view_point:c,camera_direction:dp(o),camera_up_vector:dp(u),field_of_view:r.perspective.fov};var p=n.sectionPlanes;for(var A in p)if(p.hasOwnProperty(A)){var d=p[A];if(!d.active)continue;var v=d.pos,h=void 0;h=a?$.negateVec3(d.dir,$.vec3()):d.dir,r.yUp&&(v=hp(v),h=hp(h)),$.addVec3(v,i),v=dp(v),h=dp(h),s.clipping_planes||(s.clipping_planes=[]),s.clipping_planes.push({location:v,direction:h})}var I=n.lineSets;for(var y in I)if(I.hasOwnProperty(y)){var m=I[y];s.lines||(s.lines=[]);for(var w=m.positions,g=m.indices,E=0,T=g.length/2;E1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=this.viewer,i=r.scene,a=i.camera,s=!1!==n.rayCast,o=!1!==n.immediate,l=!1!==n.reset,u=i.realWorldOffset,c=!0===n.reverseClippingPlanes;if(i.clearSectionPlanes(),e.clipping_planes&&e.clipping_planes.length>0&&e.clipping_planes.forEach((function(e){var t=vp(e.location,up),n=vp(e.direction,up);c&&$.negateVec3(n),$.subVec3(t,u),a.yUp&&(t=Ip(t),n=Ip(n)),new aa(i,{pos:t,dir:n})})),i.clearLines(),e.lines&&e.lines.length>0){var f=[],p=[],A=0;e.lines.forEach((function(e){e.start_point&&e.end_point&&(f.push(e.start_point.x),f.push(e.start_point.y),f.push(e.start_point.z),f.push(e.end_point.x),f.push(e.end_point.y),f.push(e.end_point.z),p.push(A++),p.push(A++))})),new lp(i,{positions:f,indices:p,clippable:!1,collidable:!0})}if(i.clearBitmaps(),e.bitmaps&&e.bitmaps.length>0&&e.bitmaps.forEach((function(e){var t=e.bitmap_type||"jpg",n=e.bitmap_data,r=vp(e.location,cp),s=vp(e.normal,fp),o=vp(e.up,pp),l=e.height||1;t&&n&&r&&s&&o&&(a.yUp&&(r=Ip(r),s=Ip(s),o=Ip(o)),new za(i,{src:n,type:t,pos:r,normal:s,up:o,clippable:!1,collidable:!0,height:l}))})),l&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),i.setObjectsHighlighted(i.highlightedObjectIds,!1),i.setObjectsSelected(i.selectedObjectIds,!1)),e.components){if(e.components.visibility){e.components.visibility.default_visibility?(i.setObjectsVisible(i.objectIds,!0),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.visible=!1}))}))):(i.setObjectsVisible(i.objectIds,!1),e.components.visibility.exceptions&&e.components.visibility.exceptions.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.visible=!0}))})));var d=e.components.visibility.view_setup_hints;d&&(!1===d.spaces_visible&&i.setObjectsVisible(r.metaScene.getObjectIDsByType("IfcSpace"),!0),void 0!==d.spaces_translucent&&i.setObjectsXRayed(r.metaScene.getObjectIDsByType("IfcSpace"),!0),d.space_boundaries_visible,!1===d.openings_visible&&i.setObjectsVisible(r.metaScene.getObjectIDsByType("IfcOpening"),!0),d.space_boundaries_translucent,void 0!==d.openings_translucent&&i.setObjectsXRayed(r.metaScene.getObjectIDsByType("IfcOpening"),!0))}e.components.selection&&(i.setObjectsSelected(i.selectedObjectIds,!1),e.components.selection.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.selected=!0}))}))),e.components.translucency&&(i.setObjectsXRayed(i.xrayedObjectIds,!1),e.components.translucency.forEach((function(e){return t._withBCFComponent(n,e,(function(e){return e.xrayed=!0}))}))),e.components.coloring&&e.components.coloring.forEach((function(e){var r=e.color,i=0,a=!1;8===r.length&&((i=parseInt(r.substring(0,2),16)/256)<=1&&i>=.95&&(i=1),r=r.substring(2),a=!0);var s=[parseInt(r.substring(0,2),16)/256,parseInt(r.substring(2,4),16)/256,parseInt(r.substring(4,6),16)/256];e.components.map((function(e){return t._withBCFComponent(n,e,(function(e){e.colorize=s,a&&(e.opacity=i)}))}))}))}if(e.perspective_camera||e.orthogonal_camera){var v,h,I,y;if(e.perspective_camera?(v=vp(e.perspective_camera.camera_view_point,up),h=vp(e.perspective_camera.camera_direction,up),I=vp(e.perspective_camera.camera_up_vector,up),a.perspective.fov=e.perspective_camera.field_of_view,y="perspective"):(v=vp(e.orthogonal_camera.camera_view_point,up),h=vp(e.orthogonal_camera.camera_direction,up),I=vp(e.orthogonal_camera.camera_up_vector,up),a.ortho.scale=e.orthogonal_camera.view_to_world_scale,y="ortho"),$.subVec3(v,u),a.yUp&&(v=Ip(v),h=Ip(h),I=Ip(I)),s){var m=i.pick({pickSurface:!0,origin:v,direction:h});h=m?m.worldPos:$.addVec3(v,h,up)}else h=$.addVec3(v,h,up);o?(a.eye=v,a.look=h,a.up=I,a.projection=y):r.cameraFlight.flyTo({eye:v,look:h,up:I,duration:n.duration,projection:y})}}}},{key:"_withBCFComponent",value:function(e,t,n){var r=this.viewer,i=r.scene;if(t.authoring_tool_id&&t.originating_system===this.originatingSystem){var a=t.authoring_tool_id,s=i.objects[a];if(s)return void n(s);if(e.updateCompositeObjects)if(r.metaScene.metaObjects[a])return void i.withObjects(r.metaScene.getObjectIDsInSubtree(a),n)}if(t.ifc_guid){var o=t.ifc_guid,l=i.objects[o];if(l)return void n(l);if(e.updateCompositeObjects)if(r.metaScene.metaObjects[o])return void i.withObjects(r.metaScene.getObjectIDsInSubtree(o),n);Object.keys(i.models).forEach((function(t){var a=$.globalizeObjectId(t,o),s=i.objects[a];s?n(s):e.updateCompositeObjects&&r.metaScene.metaObjects[a]&&i.withObjects(r.metaScene.getObjectIDsInSubtree(a),n)}))}}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this)}}]),n}();function dp(e){return{x:e[0],y:e[1],z:e[2]}}function vp(e,t){return(t=new Float64Array(3))[0]=e.x,t[1]=e.y,t[2]=e.z,t}function hp(e){return new Float64Array([e[0],-e[2],e[1]])}function Ip(e){return new Float64Array([e[0],e[2],-e[1]])}function yp(e){var t="";return t+=Math.round(255*e[0]).toString(16).padStart(2,"0"),t+=Math.round(255*e[1]).toString(16).padStart(2,"0"),t+=Math.round(255*e[2]).toString(16).padStart(2,"0")}var mp=$.vec3(),wp=function(e,t,n,r){var i=e-n,a=t-r;return Math.sqrt(i*i+a*a)},gp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b(this,n),(r=t.call(this,e.viewer.scene,i)).plugin=e,r._container=i.container,!r._container)throw"config missing: container";r._eventSubs={};var a=r.plugin.viewer.scene;r._originMarker=new qe(a,i.origin),r._targetMarker=new qe(a,i.target),r._originWorld=$.vec3(),r._targetWorld=$.vec3(),r._wp=new Float64Array(24),r._vp=new Float64Array(24),r._pp=new Float64Array(24),r._cp=new Float64Array(8),r._xAxisLabelCulled=!1,r._yAxisLabelCulled=!1,r._zAxisLabelCulled=!1,r._color=i.color||r.plugin.defaultColor;var s=i.onMouseOver?function(e){i.onMouseOver(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseover",e))}:null,o=i.onMouseLeave?function(e){i.onMouseLeave(e,w(r)),r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseleave",e))}:null,l=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousedown",e))},u=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mouseup",e))},c=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new MouseEvent("mousemove",e))},f=i.onContextMenu?function(e){i.onContextMenu(e,w(r))}:null,p=function(e){r.plugin.viewer.scene.canvas.canvas.dispatchEvent(new WheelEvent("wheel",e))};return r._originDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._targetDot=new Ze(r._container,{fillColor:r._color,zIndex:void 0!==e.zIndex?e.zIndex+2:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._lengthWire=new Je(r._container,{color:r._color,thickness:2,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._xAxisWire=new Je(r._container,{color:"#FF0000",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._yAxisWire=new Je(r._container,{color:"green",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._zAxisWire=new Je(r._container,{color:"blue",thickness:1,thicknessClickable:6,zIndex:void 0!==e.zIndex?e.zIndex+1:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._lengthLabel=new $e(r._container,{fillColor:r._color,prefix:"",text:"",zIndex:void 0!==e.zIndex?e.zIndex+4:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._xAxisLabel=new $e(r._container,{fillColor:"red",prefix:"X",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._yAxisLabel=new $e(r._container,{fillColor:"green",prefix:"Y",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._zAxisLabel=new $e(r._container,{fillColor:"blue",prefix:"Z",text:"",zIndex:void 0!==e.zIndex?e.zIndex+3:void 0,onMouseOver:s,onMouseLeave:o,onMouseWheel:p,onMouseDown:l,onMouseUp:u,onMouseMove:c,onContextMenu:f}),r._wpDirty=!1,r._vpDirty=!1,r._cpDirty=!1,r._sectionPlanesDirty=!0,r._visible=!1,r._originVisible=!1,r._targetVisible=!1,r._wireVisible=!1,r._axisVisible=!1,r._xAxisVisible=!1,r._yAxisVisible=!1,r._zAxisVisible=!1,r._axisEnabled=!0,r._labelsVisible=!1,r._labelsOnWires=!1,r._clickable=!1,r._originMarker.on("worldPos",(function(e){r._originWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._targetMarker.on("worldPos",(function(e){r._targetWorld.set(e||[0,0,0]),r._wpDirty=!0,r._needUpdate(0)})),r._onViewMatrix=a.camera.on("viewMatrix",(function(){r._vpDirty=!0,r._needUpdate(0)})),r._onProjMatrix=a.camera.on("projMatrix",(function(){r._cpDirty=!0,r._needUpdate()})),r._onCanvasBoundary=a.canvas.on("boundary",(function(){r._cpDirty=!0,r._needUpdate(0)})),r._onMetricsUnits=a.metrics.on("units",(function(){r._cpDirty=!0,r._needUpdate()})),r._onMetricsScale=a.metrics.on("scale",(function(){r._cpDirty=!0,r._needUpdate()})),r._onMetricsOrigin=a.metrics.on("origin",(function(){r._cpDirty=!0,r._needUpdate()})),r._onSectionPlaneUpdated=a.on("sectionPlaneUpdated",(function(){r._sectionPlanesDirty=!0,r._needUpdate()})),r.approximate=i.approximate,r.visible=i.visible,r.originVisible=i.originVisible,r.targetVisible=i.targetVisible,r.wireVisible=i.wireVisible,r.axisVisible=i.axisVisible,r.xAxisVisible=i.xAxisVisible,r.yAxisVisible=i.yAxisVisible,r.zAxisVisible=i.zAxisVisible,r.labelsVisible=i.labelsVisible,r.labelsOnWires=i.labelsOnWires,r}return P(n,[{key:"_update",value:function(){if(this._visible){var e=this.plugin.viewer.scene;if(this._wpDirty&&(this._wp[0]=this._originWorld[0],this._wp[1]=this._originWorld[1],this._wp[2]=this._originWorld[2],this._wp[3]=1,this._wp[4]=this._targetWorld[0],this._wp[5]=this._originWorld[1],this._wp[6]=this._originWorld[2],this._wp[7]=1,this._wp[8]=this._targetWorld[0],this._wp[9]=this._targetWorld[1],this._wp[10]=this._originWorld[2],this._wp[11]=1,this._wp[12]=this._targetWorld[0],this._wp[13]=this._targetWorld[1],this._wp[14]=this._targetWorld[2],this._wp[15]=1,this._wpDirty=!1,this._vpDirty=!0),this._vpDirty&&($.transformPositions4(e.camera.viewMatrix,this._wp,this._vp),this._vp[3]=1,this._vp[7]=1,this._vp[11]=1,this._vp[15]=1,this._vpDirty=!1,this._cpDirty=!0),this._sectionPlanesDirty){if(this._isSliced(this._wp))return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setCulled(!0),this._yAxisWire.setCulled(!0),this._zAxisWire.setCulled(!0),this._lengthWire.setCulled(!0),this._originDot.setCulled(!0),void this._targetDot.setCulled(!0);this._xAxisLabel.setCulled(!1),this._yAxisLabel.setCulled(!1),this._zAxisLabel.setCulled(!1),this._lengthLabel.setCulled(!1),this._xAxisWire.setCulled(!1),this._yAxisWire.setCulled(!1),this._zAxisWire.setCulled(!1),this._lengthWire.setCulled(!1),this._originDot.setCulled(!1),this._targetDot.setCulled(!1),this._sectionPlanesDirty=!0}var t=this._originMarker.viewPos[2],n=this._targetMarker.viewPos[2];if(t>-.3||n>-.3)return this._xAxisLabel.setCulled(!0),this._yAxisLabel.setCulled(!0),this._zAxisLabel.setCulled(!0),this._lengthLabel.setCulled(!0),this._xAxisWire.setVisible(!1),this._yAxisWire.setVisible(!1),this._zAxisWire.setVisible(!1),this._lengthWire.setVisible(!1),this._originDot.setVisible(!1),void this._targetDot.setVisible(!1);if(this._cpDirty){$.transformPositions4(e.camera.project.matrix,this._vp,this._pp);for(var r=this._pp,i=this._cp,a=e.canvas.canvas.getBoundingClientRect(),s=this._container.getBoundingClientRect(),o=a.top-s.top,l=a.left-s.left,u=e.canvas.boundary,c=u[2],f=u[3],p=0,A=this.plugin.viewer.scene.metrics,d=A.scale,v=A.units,h=A.unitsInfo[v].abbrev,I=0,y=r.length;I1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e.viewer.scene)).pointerLens=i.pointerLens,r._active=!1,r._currentDistanceMeasurement=null,r._currentDistanceMeasurementInitState={wireVisible:null,axisVisible:null,xAxisVisible:null,yaxisVisible:null,zAxisVisible:null,targetVisible:null},r._initMarkerDiv(),r._onCameraControlHoverSnapOrSurface=null,r._onCameraControlHoverSnapOrSurfaceOff=null,r._onMouseDown=null,r._onMouseUp=null,r._onCanvasTouchStart=null,r._onCanvasTouchEnd=null,r._snapping=!1!==i.snapping,r._mouseState=0,r._attachPlugin(e,i),r}return P(n,[{key:"_initMarkerDiv",value:function(){var e=document.createElement("div");e.setAttribute("id","myMarkerDiv");var t=this.scene.canvas.canvas;t.parentNode.insertBefore(e,t),e.style.background="black",e.style.border="2px solid blue",e.style.borderRadius="10px",e.style.width="5px",e.style.height="5px",e.style.margin="-200px -200px",e.style.zIndex="100",e.style.position="absolute",e.style.pointerEvents="none",this._markerDiv=e}},{key:"_destroyMarkerDiv",value:function(){if(this._markerDiv){var e=document.getElementById("myMarkerDiv");e.parentNode.removeChild(e),this._markerDiv=null}}},{key:"_attachPlugin",value:function(e){this.distanceMeasurementsPlugin=e,this.plugin=e}},{key:"active",get:function(){return this._active}},{key:"snapping",get:function(){return this._snapping},set:function(e){e!==this._snapping?(this._snapping=e,this.deactivate(),this.activate()):this._snapping=e}},{key:"activate",value:function(){var e=this;if(!this._active){this._markerDiv||this._initMarkerDiv(),this.fire("activated",!0);var t=this.distanceMeasurementsPlugin,n=this.scene,r=t.viewer.cameraControl,i=n.canvas.canvas;n.input;var a,s,o=!1,l=$.vec3(),u=$.vec2(),c=null;this._mouseState=0,this._onCameraControlHoverSnapOrSurface=r.on(this._snapping?"hoverSnapOrSurface":"hoverSurface",(function(t){var n=t.snappedCanvasPos||t.canvasPos;if(o=!0,l.set(t.worldPos),u.set(t.canvasPos),0===e._mouseState){var r=i.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,s=window.pageYOffset||document.documentElement.scrollTop,f=r.left+a,p=r.top+s;e._markerDiv.style.marginLeft="".concat(f+n[0]-5,"px"),e._markerDiv.style.marginTop="".concat(p+n[1]-5,"px"),e._markerDiv.style.background="pink",t.snappedToVertex||t.snappedToEdge?(e.pointerLens&&(e.pointerLens.visible=!0,e.pointerLens.canvasPos=t.canvasPos,e.pointerLens.snappedCanvasPos=t.snappedCanvasPos||t.canvasPos,e.pointerLens.snapped=!0),e._markerDiv.style.background="greenyellow",e._markerDiv.style.border="2px solid green"):(e.pointerLens&&(e.pointerLens.visible=!0,e.pointerLens.canvasPos=t.canvasPos,e.pointerLens.snappedCanvasPos=t.canvasPos,e.pointerLens.snapped=!1),e._markerDiv.style.background="pink",e._markerDiv.style.border="2px solid red"),c=t.entity}else e._markerDiv.style.marginLeft="-10000px",e._markerDiv.style.marginTop="-10000px";i.style.cursor="pointer",e._currentDistanceMeasurement&&(e._currentDistanceMeasurement.wireVisible=e._currentDistanceMeasurementInitState.wireVisible,e._currentDistanceMeasurement.axisVisible=e._currentDistanceMeasurementInitState.axisVisible&&e.distanceMeasurementsPlugin.defaultAxisVisible,e._currentDistanceMeasurement.xAxisVisible=e._currentDistanceMeasurementInitState.xAxisVisible&&e.distanceMeasurementsPlugin.defaultXAxisVisible,e._currentDistanceMeasurement.yAxisVisible=e._currentDistanceMeasurementInitState.yAxisVisible&&e.distanceMeasurementsPlugin.defaultYAxisVisible,e._currentDistanceMeasurement.zAxisVisible=e._currentDistanceMeasurementInitState.zAxisVisible&&e.distanceMeasurementsPlugin.defaultZAxisVisible,e._currentDistanceMeasurement.targetVisible=e._currentDistanceMeasurementInitState.targetVisible,e._currentDistanceMeasurement.target.worldPos=l.slice(),e._markerDiv.style.marginLeft="-10000px",e._markerDiv.style.marginTop="-10000px")})),i.addEventListener("mousedown",this._onMouseDown=function(e){1===e.which&&(a=e.clientX,s=e.clientY)}),i.addEventListener("mouseup",this._onMouseUp=function(n){1===n.which&&(n.clientX>a+20||n.clientXs+20||n.clientY1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,"DistanceMeasurements",e))._pointerLens=i.pointerLens,r._container=i.container||document.body,r._defaultControl=null,r._measurements={},r.labelMinAxisLength=i.labelMinAxisLength,r.defaultVisible=!1!==i.defaultVisible,r.defaultOriginVisible=!1!==i.defaultOriginVisible,r.defaultTargetVisible=!1!==i.defaultTargetVisible,r.defaultWireVisible=!1!==i.defaultWireVisible,r.defaultLabelsVisible=!1!==i.defaultLabelsVisible,r.defaultAxisVisible=!1!==i.defaultAxisVisible,r.defaultXAxisVisible=!1!==i.defaultXAxisVisible,r.defaultYAxisVisible=!1!==i.defaultYAxisVisible,r.defaultZAxisVisible=!1!==i.defaultZAxisVisible,r.defaultColor=void 0!==i.defaultColor?i.defaultColor:"#00BBFF",r.zIndex=i.zIndex||1e4,r.defaultLabelsOnWires=!1!==i.defaultLabelsOnWires,r._onMouseOver=function(e,t){r.fire("mouseOver",{plugin:w(r),distanceMeasurement:t,measurement:t,event:e})},r._onMouseLeave=function(e,t){r.fire("mouseLeave",{plugin:w(r),distanceMeasurement:t,measurement:t,event:e})},r._onContextMenu=function(e,t){r.fire("contextMenu",{plugin:w(r),distanceMeasurement:t,measurement:t,event:e})},r}return P(n,[{key:"getContainerElement",value:function(){return this._container}},{key:"send",value:function(e,t){}},{key:"pointerLens",get:function(){return this._pointerLens}},{key:"control",get:function(){return this._defaultControl||(this._defaultControl=new Tp(this,{})),this._defaultControl}},{key:"measurements",get:function(){return this._measurements}},{key:"labelMinAxisLength",get:function(){return this._labelMinAxisLength},set:function(e){e<1&&(this.error("labelMinAxisLength must be >= 1; defaulting to 25"),e=25),this._labelMinAxisLength=e||25}},{key:"createMeasurement",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.viewer.scene.components[t.id]&&(this.error("Viewer scene component with this ID already exists: "+t.id),delete t.id);var n=t.origin,r=t.target,i=new gp(this,{id:t.id,plugin:this,container:this._container,origin:{entity:n.entity,worldPos:n.worldPos},target:{entity:r.entity,worldPos:r.worldPos},visible:t.visible,wireVisible:t.wireVisible,axisVisible:!1!==t.axisVisible&&!1!==this.defaultAxisVisible,xAxisVisible:!1!==t.xAxisVisible&&!1!==this.defaultXAxisVisible,yAxisVisible:!1!==t.yAxisVisible&&!1!==this.defaultYAxisVisible,zAxisVisible:!1!==t.zAxisVisible&&!1!==this.defaultZAxisVisible,labelsVisible:!1!==t.labelsVisible&&!1!==this.defaultLabelsVisible,originVisible:t.originVisible,targetVisible:t.targetVisible,color:t.color,labelsOnWires:!1!==t.labelsOnWires&&!1!==this.defaultLabelsOnWires,onMouseOver:this._onMouseOver,onMouseLeave:this._onMouseLeave,onContextMenu:this._onContextMenu});return this._measurements[i.id]=i,i.on("destroyed",(function(){delete e._measurements[i.id]})),this.fire("measurementCreated",i),i}},{key:"destroyMeasurement",value:function(e){var t=this._measurements[e];t?(t.destroy(),this.fire("measurementDestroyed",t)):this.log("DistanceMeasurement not found: "+e)}},{key:"setLabelsShown",value:function(e){for(var t=0,n=Object.entries(this.measurements);t1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,"FastNav",e))._hideColorTexture=!1!==i.hideColorTexture,r._hidePBR=!1!==i.hidePBR,r._hideSAO=!1!==i.hideSAO,r._hideEdges=!1!==i.hideEdges,r._hideTransparentObjects=!!i.hideTransparentObjects,r._scaleCanvasResolution=!!i.scaleCanvasResolution,r._scaleCanvasResolutionFactor=i.scaleCanvasResolutionFactor||.6,r._delayBeforeRestore=!1!==i.delayBeforeRestore,r._delayBeforeRestoreSeconds=i.delayBeforeRestoreSeconds||.5;var a=1e3*r._delayBeforeRestoreSeconds,s=!1,o=function(){a=1e3*r._delayBeforeRestoreSeconds,s||(e.scene._renderer.setColorTextureEnabled(!r._hideColorTexture),e.scene._renderer.setPBREnabled(!r._hidePBR),e.scene._renderer.setSAOEnabled(!r._hideSAO),e.scene._renderer.setTransparentEnabled(!r._hideTransparentObjects),e.scene._renderer.setEdgesEnabled(!r._hideEdges),r._scaleCanvasResolution?e.scene.canvas.resolutionScale=r._scaleCanvasResolutionFactor:e.scene.canvas.resolutionScale=1,s=!0)},l=function(){e.scene.canvas.resolutionScale=1,e.scene._renderer.setEdgesEnabled(!0),e.scene._renderer.setColorTextureEnabled(!0),e.scene._renderer.setPBREnabled(!0),e.scene._renderer.setSAOEnabled(!0),e.scene._renderer.setTransparentEnabled(!0),s=!1};r._onCanvasBoundary=e.scene.canvas.on("boundary",o),r._onCameraMatrix=e.scene.camera.on("matrix",o),r._onSceneTick=e.scene.on("tick",(function(e){s&&(a-=e.deltaTime,(!r._delayBeforeRestore||a<=0)&&l())}));var u=!1;return r._onSceneMouseDown=e.scene.input.on("mousedown",(function(){u=!0})),r._onSceneMouseUp=e.scene.input.on("mouseup",(function(){u=!1})),r._onSceneMouseMove=e.scene.input.on("mousemove",(function(){u&&o()})),r}return P(n,[{key:"hideColorTexture",get:function(){return this._hideColorTexture},set:function(e){this._hideColorTexture=e}},{key:"hidePBR",get:function(){return this._hidePBR},set:function(e){this._hidePBR=e}},{key:"hideSAO",get:function(){return this._hideSAO},set:function(e){this._hideSAO=e}},{key:"hideEdges",get:function(){return this._hideEdges},set:function(e){this._hideEdges=e}},{key:"hideTransparentObjects",get:function(){return this._hideTransparentObjects},set:function(e){this._hideTransparentObjects=!1!==e}},{key:"scaleCanvasResolution",get:function(){return this._scaleCanvasResolution},set:function(e){this._scaleCanvasResolution=e}},{key:"scaleCanvasResolutionFactor",get:function(){return this._scaleCanvasResolutionFactor},set:function(e){this._scaleCanvasResolutionFactor=e||.6}},{key:"delayBeforeRestore",get:function(){return this._delayBeforeRestore},set:function(e){this._delayBeforeRestore=e}},{key:"delayBeforeRestoreSeconds",get:function(){return this._delayBeforeRestoreSeconds},set:function(e){this._delayBeforeRestoreSeconds=null!=e?e:.5}},{key:"send",value:function(e,t){}},{key:"destroy",value:function(){this.viewer.scene.camera.off(this._onCameraMatrix),this.viewer.scene.canvas.off(this._onCanvasBoundary),this.viewer.scene.input.off(this._onSceneMouseDown),this.viewer.scene.input.off(this._onSceneMouseUp),this.viewer.scene.input.off(this._onSceneMouseMove),this.viewer.scene.off(this._onSceneTick),d(g(n.prototype),"destroy",this).call(this)}}]),n}(),Pp=function(){function e(){b(this,e)}return P(e,[{key:"getMetaModel",value:function(e,t,n){le.loadJSON(e,(function(e){t(e)}),(function(e){n(e)}))}},{key:"getGLTF",value:function(e,t,n){le.loadArraybuffer(e,(function(e){t(e)}),(function(e){n(e)}))}},{key:"getGLB",value:function(e,t,n){le.loadArraybuffer(e,(function(e){t(e)}),(function(e){n(e)}))}},{key:"getArrayBuffer",value:function(e,t,n,r){!function(e,t,n,r){var i=function(){};n=n||i,r=r||i;var a=/^data:(.*?)(;base64)?,(.*)$/,s=t.match(a);if(s){var o=!!s[2],l=s[3];l=window.decodeURIComponent(l),o&&(l=window.atob(l));try{for(var u=new ArrayBuffer(l.length),c=new Uint8Array(u),f=0;f0&&void 0!==arguments[0]?arguments[0]:{};b(this,e),this._eventSubIDMap=null,this._eventSubEvents=null,this._eventSubs=null,this._events=null,this._locale="en",this._messages={},this._locales=[],this._locale="en",this.messages=t.messages,this.locale=t.locale}return P(e,[{key:"messages",set:function(e){this._messages=e||{},this._locales=Object.keys(this._messages),this.fire("updated",this)}},{key:"loadMessages",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};for(var t in e)this._messages[t]=e[t];this.messages=this._messages}},{key:"clearMessages",value:function(){this.messages={}}},{key:"locales",get:function(){return this._locales}},{key:"locale",get:function(){return this._locale},set:function(e){e=e||"de",this._locale!==e&&(this._locale=e,this.fire("updated",e))}},{key:"translate",value:function(e,t){var n=this._messages[this._locale];if(!n)return null;var r=_p(e,n);return r?t?Rp(r,t):r:null}},{key:"translatePlurals",value:function(e,t,n){var r=this._messages[this._locale];if(!r)return null;var i=_p(e,r);return(i=0===(t=parseInt(""+t,10))?i.zero:t>1?i.other:i.one)?(i=Rp(i,[t]),n&&(i=Rp(i,n)),i):null}},{key:"fire",value:function(e,t,n){this._events||(this._events={}),this._eventSubs||(this._eventSubs={}),!0!==n&&(this._events[e]=t||!0);var r=this._eventSubs[e];if(r)for(var i in r){if(r.hasOwnProperty(i))r[i].callback(t)}}},{key:"on",value:function(e,t){this._events||(this._events={}),this._eventSubIDMap||(this._eventSubIDMap=new G),this._eventSubEvents||(this._eventSubEvents={}),this._eventSubs||(this._eventSubs={});var n=this._eventSubs[e];n||(n={},this._eventSubs[e]=n);var r=this._eventSubIDMap.addItem();n[r]={callback:t},this._eventSubEvents[r]=e;var i=this._events[e];return void 0!==i&&t(i),r}},{key:"off",value:function(e){if(null!=e&&this._eventSubEvents){var t=this._eventSubEvents[e];if(t){delete this._eventSubEvents[e];var n=this._eventSubs[t];n&&delete n[e],this._eventSubIDMap.removeItem(e)}}}}]),e}();function _p(e,t){if(t[e])return t[e];for(var n=e.split("."),r=t,i=0,a=n.length;r&&i1&&void 0!==arguments[1]?arguments[1]:[];return e.replace(/\{\{|\}\}|\{(\d+)\}/g,(function(e,n){return"{{"===e?"{":"}}"===e?"}":t[n]}))}var Bp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).t=i.t,r}return P(n,[{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"tangent",get:function(){return this.getTangent(this._t)}},{key:"length",get:function(){var e=this._getLengths();return e[e.length-1]}},{key:"getTangent",value:function(e){var t=1e-4;void 0===e&&(e=this._t);var n=e-t,r=e+t;n<0&&(n=0),r>1&&(r=1);var i=this.getPoint(n),a=this.getPoint(r),s=$.subVec3(a,i,[]);return $.normalizeVec3(s,[])}},{key:"getPointAt",value:function(e){var t=this.getUToTMapping(e);return this.getPoint(t)}},{key:"getPoints",value:function(e){e||(e=5);var t,n=[];for(t=0;t<=e;t++)n.push(this.getPoint(t/e));return n}},{key:"_getLengths",value:function(e){if(e||(e=this.__arcLengthDivisions?this.__arcLengthDivisions:200),this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var t,n,r=[],i=this.getPoint(0),a=0;for(r.push(0),n=1;n<=e;n++)t=this.getPoint(n/e),a+=$.lenVec3($.subVec3(t,i,[])),r.push(a),i=t;return this.cacheArcLengths=r,r}},{key:"_updateArcLengths",value:function(){this.needsUpdate=!0,this._getLengths()}},{key:"getUToTMapping",value:function(e,t){var n,r=this._getLengths(),i=0,a=r.length;n=t||e*r[a-1];for(var s,o=0,l=a-1;o<=l;)if((s=r[i=Math.floor(o+(l-o)/2)]-n)<0)o=i+1;else{if(!(s>0)){l=i;break}l=i-1}if(r[i=l]===n)return i/(a-1);var u=r[i];return(i+(n-u)/(r[i+1]-u))/(a-1)}}]),n}(),Op=function(e){h(n,Bp);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).points=i.points,r.t=i.t,r}return P(n,[{key:"points",get:function(){return this._points},set:function(e){this._points=e||[]}},{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"getPoint",value:function(e){var t=this.points;if(!(t.length<3)){var n=(t.length-1)*e,r=Math.floor(n),i=n-r,a=t[0===r?r:r-1],s=t[r],o=t[r>t.length-2?t.length-1:r+1],l=t[r>t.length-3?t.length-1:r+2],u=$.vec3();return u[0]=$.catmullRomInterpolate(a[0],s[0],o[0],l[0],i),u[1]=$.catmullRomInterpolate(a[1],s[1],o[1],l[1],i),u[2]=$.catmullRomInterpolate(a[2],s[2],o[2],l[2],i),u}this.error("Can't sample point from SplineCurve - not enough points on curve - returning [0,0,0].")}},{key:"getJSON",value:function(){return{points:points,t:this._t}}}]),n}(),Sp=$.vec3(),Np=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._frames=[],r._eyeCurve=new Op(w(r)),r._lookCurve=new Op(w(r)),r._upCurve=new Op(w(r)),i.frames&&(r.addFrames(i.frames),r.smoothFrameTimes(1)),r}return P(n,[{key:"type",get:function(){return"CameraPath"}},{key:"frames",get:function(){return this._frames}},{key:"eyeCurve",get:function(){return this._eyeCurve}},{key:"lookCurve",get:function(){return this._lookCurve}},{key:"upCurve",get:function(){return this._upCurve}},{key:"saveFrame",value:function(e){var t=this.scene.camera;this.addFrame(e,t.eye,t.look,t.up)}},{key:"addFrame",value:function(e,t,n,r){var i={t:e,eye:t.slice(0),look:n.slice(0),up:r.slice(0)};this._frames.push(i),this._eyeCurve.points.push(i.eye),this._lookCurve.points.push(i.look),this._upCurve.points.push(i.up)}},{key:"addFrames",value:function(e){for(var t,n=0,r=e.length;n1?1:e,t.eye=this._eyeCurve.getPoint(e,Sp),t.look=this._lookCurve.getPoint(e,Sp),t.up=this._upCurve.getPoint(e,Sp)}},{key:"sampleFrame",value:function(e,t,n,r){e=e<0?0:e>1?1:e,this._eyeCurve.getPoint(e,t),this._lookCurve.getPoint(e,n),this._upCurve.getPoint(e,r)}},{key:"smoothFrameTimes",value:function(e){if(0!==this._frames.length){var t=$.vec3(),n=0;this._frames[0].t=0;for(var r=[],i=1,a=this._frames.length;i1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._look1=$.vec3(),r._eye1=$.vec3(),r._up1=$.vec3(),r._look2=$.vec3(),r._eye2=$.vec3(),r._up2=$.vec3(),r._orthoScale1=1,r._orthoScale2=1,r._flying=!1,r._flyEyeLookUp=!1,r._flyingEye=!1,r._flyingLook=!1,r._callback=null,r._callbackScope=null,r._time1=null,r._time2=null,r.easing=!1!==i.easing,r.duration=i.duration,r.fit=i.fit,r.fitFOV=i.fitFOV,r.trail=i.trail,r}return P(n,[{key:"type",get:function(){return"CameraFlightAnimation"}},{key:"flyTo",value:function(e,t,n){e=e||this.scene,this._flying&&this.stop(),this._flying=!1,this._flyingEye=!1,this._flyingLook=!1,this._flyingEyeLookUp=!1,this._callback=t,this._callbackScope=n;var r,i,a,s,o,l=this.scene.camera,u=!!e.projection&&e.projection!==l.projection;if(this._eye1[0]=l.eye[0],this._eye1[1]=l.eye[1],this._eye1[2]=l.eye[2],this._look1[0]=l.look[0],this._look1[1]=l.look[1],this._look1[2]=l.look[2],this._up1[0]=l.up[0],this._up1[1]=l.up[1],this._up1[2]=l.up[2],this._orthoScale1=l.ortho.scale,this._orthoScale2=e.orthoScale||this._orthoScale1,e.aabb)r=e.aabb;else if(6===e.length)r=e;else if(e.eye&&e.look||e.up)i=e.eye,a=e.look,s=e.up;else if(e.eye)i=e.eye;else if(e.look)a=e.look;else{var c=e;if((le.isNumeric(c)||le.isString(c))&&(o=c,!(c=this.scene.components[o])))return this.error("Component not found: "+le.inQuotes(o)),void(t&&(n?t.call(n):t()));u||(r=c.aabb||this.scene.aabb)}var f=e.poi;if(r){if(r[3]=1;e>1&&(e=1);var r=this.easing?n._ease(e,0,1,1):e,i=this.scene.camera;if(this._flyingEye||this._flyingLook?this._flyingEye?($.subVec3(i.eye,i.look,Hp),i.eye=$.lerpVec3(r,0,1,this._eye1,this._eye2,Mp),i.look=$.subVec3(Mp,Hp,xp)):this._flyingLook&&(i.look=$.lerpVec3(r,0,1,this._look1,this._look2,xp),i.up=$.lerpVec3(r,0,1,this._up1,this._up2,Fp)):this._flyingEyeLookUp&&(i.eye=$.lerpVec3(r,0,1,this._eye1,this._eye2,Mp),i.look=$.lerpVec3(r,0,1,this._look1,this._look2,xp),i.up=$.lerpVec3(r,0,1,this._up1,this._up2,Fp)),this._projection2){var a="ortho"===this._projection2?n._easeOutExpo(e,0,1,1):n._easeInCubic(e,0,1,1);i.customProjection.matrix=$.lerpMat4(a,0,1,this._projMatrix1,this._projMatrix2)}else i.ortho.scale=this._orthoScale1+e*(this._orthoScale2-this._orthoScale1);if(t)return i.ortho.scale=this._orthoScale2,void this.stop();he.scheduleTask(this._update,this)}}},{key:"stop",value:function(){if(this._flying){this._flying=!1,this._time1=null,this._time2=null,this._projection2&&(this.scene.camera.projection=this._projection2);var e=this._callback;e&&(this._callback=null,this._callbackScope?e.call(this._callbackScope):e()),this.fire("stopped",!0,!0)}}},{key:"cancel",value:function(){this._flying&&(this._flying=!1,this._time1=null,this._time2=null,this._callback&&(this._callback=null),this.fire("canceled",!0,!0))}},{key:"duration",get:function(){return this._duration/1e3},set:function(e){this._duration=e?1e3*e:500,this.stop()}},{key:"fit",get:function(){return this._fit},set:function(e){this._fit=!1!==e}},{key:"fitFOV",get:function(){return this._fitFOV},set:function(e){this._fitFOV=e||45}},{key:"trail",get:function(){return this._trail},set:function(e){this._trail=!!e}},{key:"destroy",value:function(){this.stop(),d(g(n.prototype),"destroy",this).call(this)}}],[{key:"_ease",value:function(e,t,n,r){return-n*(e/=r)*(e-2)+t}},{key:"_easeInCubic",value:function(e,t,n,r){return n*(e/=r)*e*e+t}},{key:"_easeOutExpo",value:function(e,t,n,r){return n*(1-Math.pow(2,-10*e/r))+t}}]),n}(),Gp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._cameraFlightAnimation=new Up(w(r)),r._t=0,r.state=n.SCRUBBING,r._playingFromT=0,r._playingToT=0,r._playingRate=i.playingRate||1,r._playingDir=1,r._lastTime=null,r.cameraPath=i.cameraPath,r._tick=r.scene.on("tick",r._updateT,w(r)),r}return P(n,[{key:"type",get:function(){return"CameraPathAnimation"}},{key:"_updateT",value:function(){var e=this._cameraPath;if(e){var t,r,i=performance.now(),a=this._lastTime?.001*(i-this._lastTime):0;if(this._lastTime=i,0!==a)switch(this.state){case n.SCRUBBING:return;case n.PLAYING:if(this._t+=this._playingRate*a,0===(t=this._cameraPath.frames.length)||this._playingDir<0&&this._t<=0||this._playingDir>0&&this._t>=this._cameraPath.frames[t-1].t)return this.state=n.SCRUBBING,this._t=this._cameraPath.frames[t-1].t,void this.fire("stopped");e.loadFrame(this._t);break;case n.PLAYING_TO:r=this._t+this._playingRate*a*this._playingDir,(this._playingDir<0&&r<=this._playingToT||this._playingDir>0&&r>=this._playingToT)&&(r=this._playingToT,this.state=n.SCRUBBING,this.fire("stopped")),this._t=r,e.loadFrame(this._t)}}}},{key:"_ease",value:function(e,t,n,r){return-n*(e/=r)*(e-2)+t}},{key:"cameraPath",get:function(){return this._cameraPath},set:function(e){this._cameraPath=e}},{key:"rate",get:function(){return this._playingRate},set:function(e){this._playingRate=e}},{key:"play",value:function(){this._cameraPath&&(this._lastTime=null,this.state=n.PLAYING)}},{key:"playToT",value:function(e){this._cameraPath&&(this._playingFromT=this._t,this._playingToT=e,this._playingDir=this._playingToT-this._playingFromT<0?-1:1,this._lastTime=null,this.state=n.PLAYING_TO)}},{key:"playToFrame",value:function(e){var t=this._cameraPath;if(t){var n=t.frames[e];n?this.playToT(n.t):this.error("playToFrame - frame index out of range: "+e)}}},{key:"flyToFrame",value:function(e,t){var r=this._cameraPath;if(r){var i=r.frames[e];i?(this.state=n.SCRUBBING,this._cameraFlightAnimation.flyTo(i,t)):this.error("flyToFrame - frame index out of range: "+e)}}},{key:"scrubToT",value:function(e){var t=this._cameraPath;t&&(this.scene.camera&&(this._t=e,t.loadFrame(this._t),this.state=n.SCRUBBING))}},{key:"scrubToFrame",value:function(e){var t=this._cameraPath;t&&(this.scene.camera&&(t.frames[e]?(t.loadFrame(this._t),this.state=n.SCRUBBING):this.error("playToFrame - frame index out of range: "+e)))}},{key:"stop",value:function(){this.state=n.SCRUBBING,this.fire("stopped")}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene.off(this._tick)}}]),n}();Gp.STOPPED=0,Gp.SCRUBBING=1,Gp.PLAYING=2,Gp.PLAYING_TO=3;var kp=$.vec3(),jp=$.vec3();$.vec3();var Vp=$.vec3([0,-1,0]),Qp=$.vec4([0,0,0,1]),Wp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._src=null,r._image=null,r._pos=$.vec3(),r._origin=$.vec3(),r._rtcPos=$.vec3(),r._dir=$.vec3(),r._size=1,r._imageSize=$.vec2(),r._texture=new Oa(w(r)),r._plane=new Zi(w(r),{geometry:new Rn(w(r),ja({center:[0,0,0],xSize:1,zSize:1,xSegments:10,zSegments:10})),material:new Ln(w(r),{diffuse:[0,0,0],ambient:[0,0,0],specular:[0,0,0],diffuseMap:r._texture,emissiveMap:r._texture,backfaces:!0}),clippable:i.clippable}),r._grid=new Zi(w(r),{geometry:new Rn(w(r),ka({size:1,divisions:10})),material:new Ln(w(r),{diffuse:[0,0,0],ambient:[0,0,0],emissive:[.2,.8,.2]}),position:[0,.001,0],clippable:i.clippable}),r._node=new va(w(r),{rotation:[0,0,0],position:[0,0,0],scale:[1,1,1],clippable:!1,children:[r._plane,r._grid]}),r._gridVisible=!1,r.visible=!0,r.gridVisible=i.gridVisible,r.position=i.position,r.rotation=i.rotation,r.dir=i.dir,r.size=i.size,r.collidable=i.collidable,r.clippable=i.clippable,r.pickable=i.pickable,r.opacity=i.opacity,i.image?r.image=i.image:r.src=i.src,r}return P(n,[{key:"visible",get:function(){return this._plane.visible},set:function(e){this._plane.visible=e,this._grid.visible=this._gridVisible&&e}},{key:"gridVisible",get:function(){return this._gridVisible},set:function(e){e=!1!==e,this._gridVisible=e,this._grid.visible=this._gridVisible&&this.visible}},{key:"image",get:function(){return this._image},set:function(e){this._image=e,this._image&&(this._imageSize[0]=e.width,this._imageSize[1]=e.height,this._updatePlaneSizeFromImage(),this._src=null,this._texture.image=this._image)}},{key:"src",get:function(){return this._src},set:function(e){var t=this;if(this._src=e,this._src){this._image=null;var n=new Image;n.onload=function(){t._texture.image=n,t._imageSize[0]=n.width,t._imageSize[1]=n.height,t._updatePlaneSizeFromImage()},n.src=this._src}}},{key:"position",get:function(){return this._pos},set:function(e){this._pos.set(e||[0,0,0]),Se(this._pos,this._origin,this._rtcPos),this._node.origin=this._origin,this._node.position=this._rtcPos}},{key:"rotation",get:function(){return this._node.rotation},set:function(e){this._node.rotation=e}},{key:"size",get:function(){return this._size},set:function(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}},{key:"dir",get:function(){return this._dir},set:function(e){if(this._dir.set(e||[0,0,-1]),e){var t=this.scene.center,n=[-this._dir[0],-this._dir[1],-this._dir[2]];$.subVec3(t,this.position,kp);var r=-$.dotVec3(n,kp);$.normalizeVec3(n),$.mulVec3Scalar(n,r,jp),$.vec3PairToQuaternion(Vp,e,Qp),this._node.quaternion=Qp}}},{key:"collidable",get:function(){return this._node.collidable},set:function(e){this._node.collidable=!1!==e}},{key:"clippable",get:function(){return this._node.clippable},set:function(e){this._node.clippable=!1!==e}},{key:"pickable",get:function(){return this._node.pickable},set:function(e){this._node.pickable=!1!==e}},{key:"opacity",get:function(){return this._node.opacity},set:function(e){this._node.opacity=e}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this)}},{key:"_updatePlaneSizeFromImage",value:function(){var e=this._size,t=this._imageSize[0],n=this._imageSize[1];if(t>n){var r=n/t;this._node.scale=[e,1,e*r]}else{var i=t/n;this._node.scale=[e*i,1,e]}}}]),n}(),zp=function(e){h(n,vn);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n);var a=w(r=t.call(this,e,i));r._shadowRenderBuf=null,r._shadowViewMatrix=null,r._shadowProjMatrix=null,r._shadowViewMatrixDirty=!0,r._shadowProjMatrixDirty=!0;var s=r.scene.camera,o=r.scene.canvas;return r._onCameraViewMatrix=s.on("viewMatrix",(function(){r._shadowViewMatrixDirty=!0})),r._onCameraProjMatrix=s.on("projMatrix",(function(){r._shadowProjMatrixDirty=!0})),r._onCanvasBoundary=o.on("boundary",(function(){r._shadowProjMatrixDirty=!0})),r._state=new zt({type:"point",pos:$.vec3([1,1,1]),color:$.vec3([.7,.7,.8]),intensity:1,attenuation:[0,0,0],space:i.space||"view",castsShadow:!1,getShadowViewMatrix:function(){if(a._shadowViewMatrixDirty){a._shadowViewMatrix||(a._shadowViewMatrix=$.identityMat4());var e=a._state.pos,t=s.look,n=s.up;$.lookAtMat4v(e,t,n,a._shadowViewMatrix),a._shadowViewMatrixDirty=!1}return a._shadowViewMatrix},getShadowProjMatrix:function(){if(a._shadowProjMatrixDirty){a._shadowProjMatrix||(a._shadowProjMatrix=$.identityMat4());var e=a.scene.canvas.canvas;$.perspectiveMat4(Math.PI/180*70,e.clientWidth/e.clientHeight,.1,500,a._shadowProjMatrix),a._shadowProjMatrixDirty=!1}return a._shadowProjMatrix},getShadowRenderBuf:function(){return a._shadowRenderBuf||(a._shadowRenderBuf=new Gt(a.scene.canvas.canvas,a.scene.canvas.gl,{size:[1024,1024]})),a._shadowRenderBuf}}),r.pos=i.pos,r.color=i.color,r.intensity=i.intensity,r.constantAttenuation=i.constantAttenuation,r.linearAttenuation=i.linearAttenuation,r.quadraticAttenuation=i.quadraticAttenuation,r.castsShadow=i.castsShadow,r.scene._lightCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"PointLight"}},{key:"pos",get:function(){return this._state.pos},set:function(e){this._state.pos.set(e||[1,1,1]),this._shadowViewMatrixDirty=!0,this.glRedraw()}},{key:"color",get:function(){return this._state.color},set:function(e){this._state.color.set(e||[.7,.7,.8]),this.glRedraw()}},{key:"intensity",get:function(){return this._state.intensity},set:function(e){e=void 0!==e?e:1,this._state.intensity=e,this.glRedraw()}},{key:"constantAttenuation",get:function(){return this._state.attenuation[0]},set:function(e){this._state.attenuation[0]=e||0,this.glRedraw()}},{key:"linearAttenuation",get:function(){return this._state.attenuation[1]},set:function(e){this._state.attenuation[1]=e||0,this.glRedraw()}},{key:"quadraticAttenuation",get:function(){return this._state.attenuation[2]},set:function(e){this._state.attenuation[2]=e||0,this.glRedraw()}},{key:"castsShadow",get:function(){return this._state.castsShadow},set:function(e){e=!!e,this._state.castsShadow!==e&&(this._state.castsShadow=e,this._shadowViewMatrixDirty=!0,this.glRedraw())}},{key:"destroy",value:function(){var e=this.scene.camera,t=this.scene.canvas;e.off(this._onCameraViewMatrix),e.off(this._onCameraProjMatrix),t.off(this._onCanvasBoundary),d(g(n.prototype),"destroy",this).call(this),this._state.destroy(),this._shadowRenderBuf&&this._shadowRenderBuf.destroy(),this.scene._lightDestroyed(this),this.glRedraw()}}]),n}();function Kp(e){return 0==(e&e-1)}function Yp(e){--e;for(var t=1;t<32;t<<=1)e|=e>>t;return e+1}var Xp=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,n);var a=(r=t.call(this,e,i)).scene.canvas.gl;return r._state=new zt({texture:new Da({gl:a,target:a.TEXTURE_CUBE_MAP}),flipY:r._checkFlipY(i.minFilter),encoding:r._checkEncoding(i.encoding),minFilter:1008,magFilter:1006,wrapS:1001,wrapT:1001,mipmaps:!0}),r._src=i.src,r._images=[],r._loadSrc(i.src),re.memory.textures++,r}return P(n,[{key:"type",get:function(){return"CubeTexture"}},{key:"_checkFlipY",value:function(e){return!!e}},{key:"_checkEncoding",value:function(e){return 3e3!==(e=e||3e3)&&3001!==e&&(this.error("Unsupported value for 'encoding' - supported values are LinearEncoding and sRGBEncoding. Defaulting to LinearEncoding."),e=3e3),e}},{key:"_webglContextRestored",value:function(){this.scene.canvas.gl,this._state.texture=null,this._src&&this._loadSrc(this._src)}},{key:"_loadSrc",value:function(e){var t=this,n=this.scene.canvas.gl;this._images=[];for(var r=!1,i=0,a=function(a){var s,o,l=new Image;l.onload=(s=l,o=a,function(){if(!r&&(s=function(e){if(!Kp(e.width)||!Kp(e.height)){var t=document.createElement("canvas");t.width=Yp(e.width),t.height=Yp(e.height),t.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t.width,t.height),e=t}return e}(s),t._images[o]=s,6==++i)){var e=t._state.texture;e||(e=new Da({gl:n,target:n.TEXTURE_CUBE_MAP}),t._state.texture=e),e.setImage(t._images,t._state),t.fire("loaded",t._src,!1),t.glRedraw()}}),l.onerror=function(){r=!0},l.src=e[a]},s=0;s1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).scene._lightsState.addReflectionMap(r._state),r.scene._reflectionMapCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"ReflectionMap"}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._reflectionMapDestroyed(this)}}]),n}(),Jp=function(e){h(n,Xp);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).scene._lightMapCreated(w(r)),r}return P(n,[{key:"type",get:function(){return"LightMap"}},{key:"destroy",value:function(){d(g(n.prototype),"destroy",this).call(this),this.scene._lightMapDestroyed(this)}}]),n}(),Zp=function(e){h(n,qe);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,{entity:i.entity,occludable:i.occludable,worldPos:i.worldPos}))._occluded=!1,r._visible=!0,r._src=null,r._image=null,r._pos=$.vec3(),r._origin=$.vec3(),r._rtcPos=$.vec3(),r._dir=$.vec3(),r._size=1,r._imageSize=$.vec2(),r._texture=new Oa(w(r),{src:i.src}),r._geometry=new Rn(w(r),{primitive:"triangles",positions:[3,3,0,-3,3,0,-3,-3,0,3,-3,0],normals:[-1,0,0,-1,0,0,-1,0,0,-1,0,0],uv:[1,-1,0,-1,0,0,1,0],indices:[0,1,2,0,2,3]}),r._mesh=new Zi(w(r),{geometry:r._geometry,material:new Ln(w(r),{ambient:[.9,.3,.9],shininess:30,diffuseMap:r._texture,backfaces:!0}),scale:[1,1,1],position:i.worldPos,rotation:[90,0,0],billboard:"spherical",occluder:!1}),r.visible=!0,r.collidable=i.collidable,r.clippable=i.clippable,r.pickable=i.pickable,r.opacity=i.opacity,r.size=i.size,i.image?r.image=i.image:r.src=i.src,r}return P(n,[{key:"_setVisible",value:function(e){this._occluded=!e,this._mesh.visible=this._visible&&!this._occluded,d(g(n.prototype),"_setVisible",this).call(this,e)}},{key:"visible",get:function(){return this._visible},set:function(e){this._visible=null==e||e,this._mesh.visible=this._visible&&!this._occluded}},{key:"image",get:function(){return this._image},set:function(e){this._image=e,this._image&&(this._imageSize[0]=this._image.width,this._imageSize[1]=this._image.height,this._updatePlaneSizeFromImage(),this._src=null,this._texture.image=this._image)}},{key:"src",get:function(){return this._src},set:function(e){var t=this;if(this._src=e,this._src){this._image=null;var n=new Image;n.onload=function(){t._texture.image=n,t._imageSize[0]=n.width,t._imageSize[1]=n.height,t._updatePlaneSizeFromImage()},n.src=this._src}}},{key:"size",get:function(){return this._size},set:function(e){this._size=null==e?1:e,this._image&&this._updatePlaneSizeFromImage()}},{key:"collidable",get:function(){return this._mesh.collidable},set:function(e){this._mesh.collidable=!1!==e}},{key:"clippable",get:function(){return this._mesh.clippable},set:function(e){this._mesh.clippable=!1!==e}},{key:"pickable",get:function(){return this._mesh.pickable},set:function(e){this._mesh.pickable=!1!==e}},{key:"opacity",get:function(){return this._mesh.opacity},set:function(e){this._mesh.opacity=e}},{key:"_updatePlaneSizeFromImage",value:function(){var e=.5*this._size,t=this._imageSize[0],n=this._imageSize[1],r=n/t;this._geometry.positions=t>n?[e,e*r,0,-e,e*r,0,-e,-e*r,0,e,-e*r,0]:[e/r,e,0,-e/r,e,0,-e/r,-e,0,e/r,-e,0]}}]),n}(),$p=function(){function e(t){b(this,e),this._eye=$.vec3(),this._look=$.vec3(),this._up=$.vec3(),this._projection={},t&&this.saveCamera(t)}return P(e,[{key:"saveCamera",value:function(e){var t=e.camera,n=t.project;switch(this._eye.set(t.eye),this._look.set(t.look),this._up.set(t.up),t.projection){case"perspective":this._projection={projection:"perspective",fov:n.fov,fovAxis:n.fovAxis,near:n.near,far:n.far};break;case"ortho":this._projection={projection:"ortho",scale:n.scale,near:n.near,far:n.far};break;case"frustum":this._projection={projection:"frustum",left:n.left,right:n.right,top:n.top,bottom:n.bottom,near:n.near,far:n.far};break;case"custom":this._projection={projection:"custom",matrix:n.matrix.slice()}}}},{key:"restoreCamera",value:function(e,t){var n=e.camera,r=this._projection;function i(){switch(r.type){case"perspective":n.perspective.fov=r.fov,n.perspective.fovAxis=r.fovAxis,n.perspective.near=r.near,n.perspective.far=r.far;break;case"ortho":n.ortho.scale=r.scale,n.ortho.near=r.near,n.ortho.far=r.far;break;case"frustum":n.frustum.left=r.left,n.frustum.right=r.right,n.frustum.top=r.top,n.frustum.bottom=r.bottom,n.frustum.near=r.near,n.frustum.far=r.far;break;case"custom":n.customProjection.matrix=r.matrix}}t?e.viewer.cameraFlight.flyTo({eye:this._eye,look:this._look,up:this._up,orthoScale:r.scale,projection:r.projection},(function(){i(),t()})):(n.eye=this._eye,n.look=this._look,n.up=this._up,i(),n.projection=r.projection)}}]),e}(),eA=$.vec3(),tA=function(){function e(t){if(b(this,e),this.objectsVisible=[],this.objectsEdges=[],this.objectsXrayed=[],this.objectsHighlighted=[],this.objectsSelected=[],this.objectsClippable=[],this.objectsPickable=[],this.objectsColorize=[],this.objectsOpacity=[],this.numObjects=0,t){var n=t.metaScene.scene;this.saveObjects(n,t)}}return P(e,[{key:"saveObjects",value:function(e,t,n){this.numObjects=0,this._mask=n?le.apply(n,{}):null;for(var r=!n||n.visible,i=!n||n.edges,a=!n||n.xrayed,s=!n||n.highlighted,o=!n||n.selected,l=!n||n.clippable,u=!n||n.pickable,c=!n||n.colorize,f=!n||n.opacity,p=t.metaObjects,A=e.objects,d=0,v=p.length;d1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).v0=i.v0,r.v1=i.v1,r.v2=i.v2,r.v3=i.v3,r.t=i.t,r}return P(n,[{key:"v0",get:function(){return this._v0},set:function(e){this._v0=e||$.vec3([0,0,0])}},{key:"v1",get:function(){return this._v1},set:function(e){this._v1=e||$.vec3([0,0,0])}},{key:"v2",get:function(){return this._v2},set:function(e){this._v2=e||$.vec3([0,0,0])}},{key:"v3",get:function(){return this._v3},set:function(e){this.fire("v3",this._v3=e||$.vec3([0,0,0]))}},{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"getPoint",value:function(e){var t=$.vec3();return t[0]=$.b3(e,this._v0[0],this._v1[0],this._v2[0],this._v3[0]),t[1]=$.b3(e,this._v0[1],this._v1[1],this._v2[1],this._v3[1]),t[2]=$.b3(e,this._v0[2],this._v1[2],this._v2[2],this._v3[2]),t}},{key:"getJSON",value:function(){return{v0:this._v0,v1:this._v1,v2:this._v2,v3:this._v3,t:this._t}}}]),n}(),aA=function(e){h(n,Bp);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._cachedLengths=[],r._dirty=!0,r._curves=[],r._t=0,r._dirtySubs=[],r._destroyedSubs=[],r.curves=i.curves||[],r.t=i.t,r}return P(n,[{key:"addCurve",value:function(e){this._curves.push(e),this._dirty=!0}},{key:"curves",get:function(){return this._curves},set:function(e){var t,n,r;for(e=e||[],n=0,r=this._curves.length;n1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"length",get:function(){var e=this._getCurveLengths();return e[e.length-1]}},{key:"getPoint",value:function(e){for(var t,n=e*this.length,r=this._getCurveLengths(),i=0;i=n){var a=1-(r[i]-n)/(t=this._curves[i]).length;return t.getPointAt(a)}i++}return null}},{key:"_getCurveLengths",value:function(){if(!this._dirty)return this._cachedLengths;var e,t=[],n=0,r=this._curves.length;for(e=0;e1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i)).v0=i.v0,r.v1=i.v1,r.v2=i.v2,r.t=i.t,r}return P(n,[{key:"v0",get:function(){return this._v0},set:function(e){this._v0=e||$.vec3([0,0,0])}},{key:"v1",get:function(){return this._v1},set:function(e){this._v1=e||$.vec3([0,0,0])}},{key:"v2",get:function(){return this._v2},set:function(e){this._v2=e||$.vec3([0,0,0])}},{key:"t",get:function(){return this._t},set:function(e){e=e||0,this._t=e<0?0:e>1?1:e}},{key:"point",get:function(){return this.getPoint(this._t)}},{key:"getPoint",value:function(e){var t=$.vec3();return t[0]=$.b2(e,this._v0[0],this._v1[0],this._v2[0]),t[1]=$.b2(e,this._v0[1],this._v1[1],this._v2[1]),t[2]=$.b2(e,this._v0[2],this._v1[2],this._v2[2]),t}},{key:"getJSON",value:function(){return{v0:this._v0,v1:this._v1,v2:this._v2,t:this._t}}}]),n}(),oA=function(e){h(n,sp);var t=y(n);function n(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),t.call(this,e,r)}return P(n)}(),lA=function(e){h(n,me);var t=y(n);function n(e){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return b(this,n),(r=t.call(this,e,i))._skyboxMesh=new Zi(w(r),{geometry:new Rn(w(r),{primitive:"triangles",positions:[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1],uv:[.5,.6666,.25,.6666,.25,.3333,.5,.3333,.5,.6666,.5,.3333,.75,.3333,.75,.6666,.5,.6666,.5,1,.25,1,.25,.6666,.25,.6666,0,.6666,0,.3333,.25,.3333,.25,0,.5,0,.5,.3333,.25,.3333,.75,.3333,1,.3333,1,.6666,.75,.6666],indices:[0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]}),background:!0,scale:[2e3,2e3,2e3],rotation:[0,-90,0],material:new Ln(w(r),{ambient:[0,0,0],diffuse:[0,0,0],specular:[0,0,0],emissive:[1,1,1],emissiveMap:new Oa(w(r),{src:i.src,flipY:!0,wrapS:"clampToEdge",wrapT:"clampToEdge",encoding:i.encoding||"sRGB"}),backfaces:!0}),visible:!1,pickable:!1,clippable:!1,collidable:!1}),r.size=i.size,r.active=i.active,r}return P(n,[{key:"size",get:function(){return this._size},set:function(e){this._size=e||1e3,this._skyboxMesh.scale=[this._size,this._size,this._size]}},{key:"active",get:function(){return this._skyboxMesh.visible},set:function(e){this._skyboxMesh.visible=e}}]),n}(),uA=function(){function e(){b(this,e)}return P(e,[{key:"transcode",value:function(e,t){}},{key:"destroy",value:function(){}}]),e}(),cA=$.vec4(),fA=$.vec4(),pA=$.vec3(),AA=$.vec3(),dA=$.vec3(),vA=$.vec4(),hA=$.vec4(),IA=$.vec4(),yA=function(){function e(t){b(this,e),this._scene=t}return P(e,[{key:"dollyToCanvasPos",value:function(e,t,n){var r=!1,i=this._scene.camera;if(e){var a=$.subVec3(e,i.eye,pA);r=$.lenVec3(a)0&&void 0!==arguments[0]?arguments[0]:{};this.destroyPivotSphere(),this._pivotSphereEnabled=!0,e.size&&(this._pivotSphereSize=e.size);var t=e.color||[1,0,0];this._pivotSphereMaterial=new Ln(this._scene,{emissive:t,ambient:t,specular:[0,0,0],diffuse:[0,0,0]})}},{key:"disablePivotSphere",value:function(){this.destroyPivotSphere(),this._pivotSphereEnabled=!1}},{key:"startPivot",value:function(){if(this._cameraLookingDownwards())return this._pivoting=!1,!1;var e=this._scene.camera,t=$.lookAtMat4v(e.eye,e.look,e.worldUp);$.transformPoint3(t,this.getPivotPos(),this._cameraOffset);var n=this.getPivotPos();this._cameraOffset[2]+=$.distVec3(e.eye,n),t=$.inverseMat4(t);var r=$.transformVec3(t,this._cameraOffset),i=$.vec3();if($.subVec3(e.eye,n,i),$.addVec3(i,r),e.zUp){var a=i[1];i[1]=i[2],i[2]=a}this._radius=$.lenVec3(i),this._polar=Math.acos(i[1]/this._radius),this._azimuth=Math.atan2(i[0],i[2]),this._pivoting=!0}},{key:"_cameraLookingDownwards",value:function(){var e=this._scene.camera,t=$.normalizeVec3($.subVec3(e.look,e.eye,mA)),n=$.cross3Vec3(t,e.worldUp,wA);return $.sqLenVec3(n)<=1e-4}},{key:"getPivoting",value:function(){return this._pivoting}},{key:"setPivotPos",value:function(e){this._pivotWorldPos.set(e),this._pivotPosSet=!0}},{key:"setCanvasPivotPos",value:function(e){var t=this._scene.camera,n=Math.abs($.distVec3(this._scene.center,t.eye)),r=t.project.transposedMatrix,i=r.subarray(8,12),a=r.subarray(12),s=[0,0,-1,1],o=$.dotVec4(s,i)/$.dotVec4(s,a),l=EA;t.project.unproject(e,o,TA,bA,l);var u=$.normalizeVec3($.subVec3(l,t.eye,mA)),c=$.addVec3(t.eye,$.mulVec3Scalar(u,n,wA),gA);this.setPivotPos(c)}},{key:"getPivotPos",value:function(){return this._pivotPosSet?this._pivotWorldPos:this._scene.camera.look}},{key:"continuePivot",value:function(e,t){if(this._pivoting&&(0!==e||0!==t)){var n=this._scene.camera,r=-e,i=-t;1===n.worldUp[2]&&(r=-r),this._azimuth+=.01*-r,this._polar+=.01*i,this._polar=$.clamp(this._polar,.001,Math.PI-.001);var a=[this._radius*Math.sin(this._polar)*Math.sin(this._azimuth),this._radius*Math.cos(this._polar),this._radius*Math.sin(this._polar)*Math.cos(this._azimuth)];if(1===n.worldUp[2]){var s=a[1];a[1]=a[2],a[2]=s}var o=$.lenVec3($.subVec3(n.look,n.eye,$.vec3())),l=this.getPivotPos();$.addVec3(a,l);var u=$.lookAtMat4v(a,l,n.worldUp);u=$.inverseMat4(u);var c=$.transformVec3(u,this._cameraOffset);u[12]-=c[0],u[13]-=c[1],u[14]-=c[2];var f=[u[8],u[9],u[10]];n.eye=[u[12],u[13],u[14]],$.subVec3(n.eye,$.mulVec3Scalar(f,o),n.look),n.up=[u[4],u[5],u[6]],this.showPivot()}}},{key:"showPivot",value:function(){this._shown||(this._pivotElement&&(this.updatePivotElement(),this._pivotElement.style.visibility="visible"),this._pivotSphereEnabled&&(this.destroyPivotSphere(),this.createPivotSphere()),this._shown=!0)}},{key:"hidePivot",value:function(){this._shown&&(this._pivotElement&&(this._pivotElement.style.visibility="hidden"),this._pivotSphereEnabled&&this.destroyPivotSphere(),this._shown=!1)}},{key:"endPivot",value:function(){this._pivoting=!1}},{key:"destroy",value:function(){this.destroyPivotSphere(),this._scene.camera.off(this._onViewMatrix),this._scene.camera.off(this._onProjMatrix),this._scene.off(this._onTick)}}]),e}(),PA=function(){function e(t,n){b(this,e),this._scene=t.scene,this._cameraControl=t,this._scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},this._configs=n,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick=!1,this.pickCursorPos=$.vec2(),this.picked=!1,this.pickedSurface=!1,this.pickResult=null,this._lastPickedEntityId=null,this._lastHash=null,this._needFireEvents=0}return P(e,[{key:"update",value:function(){if(this._configs.pointerEnabled&&(this.schedulePickEntity||this.schedulePickSurface)){var e="".concat(~~this.pickCursorPos[0],"-").concat(~~this.pickCursorPos[1],"-").concat(this.scheduleSnapOrPick,"-").concat(this.schedulePickSurface,"-").concat(this.schedulePickEntity);if(this._lastHash!==e){this.picked=!1,this.pickedSurface=!1,this.snappedOrPicked=!1,this.hoveredSnappedOrSurfaceOff=!1;var t=this._cameraControl.hasSubs("hoverSurface");if(this.scheduleSnapOrPick){var n=this._scene.pick({canvasPos:this.pickCursorPos,snapRadius:this._configs.snapRadius,snapToVertex:this._configs.snapToVertex,snapToEdge:this._configs.snapToEdge});n&&(n.snappedToEdge||n.snappedToVertex)?(this.snapPickResult=n,this.snappedOrPicked=!0,this._needFireEvents++):(this.schedulePickSurface=!0,this.snapPickResult=null)}if(this.schedulePickSurface&&this.pickResult&&this.pickResult.worldPos){var r=this.pickResult.canvasPos;if(r[0]===this.pickCursorPos[0]&&r[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!0,this._needFireEvents+=t?1:0,this.schedulePickEntity=!1,this.schedulePickSurface=!1,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.hoveredSnappedOrSurfaceOff=!0,void(this.scheduleSnapOrPick=!1)}if(this.schedulePickEntity&&this.pickResult&&(this.pickResult.canvasPos||this.pickResult.snappedCanvasPos)){var i=this.pickResult.canvasPos||this.pickResult.snappedCanvasPos;if(i[0]===this.pickCursorPos[0]&&i[1]===this.pickCursorPos[1])return this.picked=!0,this.pickedSurface=!1,this.schedulePickEntity=!1,void(this.schedulePickSurface=!1)}this.schedulePickSurface||this.scheduleSnapOrPick&&!this.snapPickResult?(this.pickResult=this._scene.pick({pickSurface:!0,pickSurfaceNormal:!1,canvasPos:this.pickCursorPos}),this.pickResult?(this.picked=!0,this.scheduleSnapOrPick?this.snappedOrPicked=!0:this.pickedSurface=!0,this._needFireEvents++):this.scheduleSnapOrPick&&(this.hoveredSnappedOrSurfaceOff=!0,this._needFireEvents++)):(this.pickResult=this._scene.pick({canvasPos:this.pickCursorPos}),this.pickResult&&(this.picked=!0,this.pickedSurface=!1,this._needFireEvents++)),this.scheduleSnapOrPick=!1,this.schedulePickEntity=!1,this.schedulePickSurface=!1}}}},{key:"fireEvents",value:function(){if(0!==this._needFireEvents){if(this.hoveredSnappedOrSurfaceOff&&this._cameraControl.fire("hoverSnapOrSurfaceOff",{canvasPos:this.pickCursorPos,pointerPos:this.pickCursorPos},!0),this.snappedOrPicked)if(this.snapPickResult){var e=new yt;e.snappedToVertex=this.snapPickResult.snappedToVertex,e.snappedToEdge=this.snapPickResult.snappedToEdge,e.worldPos=this.snapPickResult.worldPos,e.canvasPos=this.pickCursorPos,e.snappedCanvasPos=this.snapPickResult.snappedCanvasPos,this._cameraControl.fire("hoverSnapOrSurface",e,!0),this.snapPickResult=null}else this._cameraControl.fire("hoverSnapOrSurface",this.pickResult,!0);if(this.picked&&this.pickResult&&(this.pickResult.entity||this.pickResult.worldPos)){if(this.pickResult.entity){var t=this.pickResult.entity.id;this._lastPickedEntityId!==t&&(void 0!==this._lastPickedEntityId&&this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._cameraControl.fire("hoverEnter",this.pickResult,!0),this._lastPickedEntityId=t)}this._cameraControl.fire("hover",this.pickResult,!0),this.pickResult.worldPos&&(this.pickedSurface=!0,this._cameraControl.fire("hoverSurface",this.pickResult,!0))}else void 0!==this._lastPickedEntityId&&(this._cameraControl.fire("hoverOut",{entity:this._scene.objects[this._lastPickedEntityId]},!0),this._lastPickedEntityId=void 0),this._cameraControl.fire("hoverOff",{canvasPos:this.pickCursorPos},!0);this.pickResult=null,this._needFireEvents=0}}}]),e}(),CA=$.vec2(),_A=function(){function e(t,n,r,i,a){b(this,e),this._scene=t;var s,o,l,u=n.pickController,c=0,f=0,p=0,A=0,d=!1,v=$.vec3(),h=!0,I=this._scene.canvas.canvas,y=[];function m(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];I.style.cursor="move",w(),e&&g()}function w(){c=i.pointerCanvasPos[0],f=i.pointerCanvasPos[1],p=i.pointerCanvasPos[0],A=i.pointerCanvasPos[1]}function g(){u.pickCursorPos=i.pointerCanvasPos,u.schedulePickSurface=!0,u.update(),u.picked&&u.pickedSurface&&u.pickResult&&u.pickResult.worldPos?(d=!0,v.set(u.pickResult.worldPos)):d=!1}document.addEventListener("keydown",this._documentKeyDownHandler=function(e){if(r.active&&r.pointerEnabled&&t.input.keyboardEnabled){var n=e.keyCode;y[n]=!0}}),document.addEventListener("keyup",this._documentKeyUpHandler=function(e){if(r.active&&r.pointerEnabled&&t.input.keyboardEnabled){var n=e.keyCode;y[n]=!1}}),I.addEventListener("mousedown",this._mouseDownHandler=function(e){if(r.active&&r.pointerEnabled)switch(e.which){case 1:y[t.input.KEY_SHIFT]||r.planView?(s=!0,m()):(s=!0,m(!1));break;case 2:o=!0,m();break;case 3:l=!0,r.panRightClick&&m()}}),document.addEventListener("mousemove",this._documentMouseMoveHandler=function(){if(r.active&&r.pointerEnabled&&(s||o||l)){var e=t.canvas.boundary,n=e[2],u=e[3],p=i.pointerCanvasPos[0],A=i.pointerCanvasPos[1];if(y[t.input.KEY_SHIFT]||r.planView||!r.panRightClick&&o||r.panRightClick&&l){var h=p-c,I=A-f,m=t.camera;if("perspective"===m.projection){var w=Math.abs(d?$.lenVec3($.subVec3(v,t.camera.eye,[])):t.camera.eyeLookDist)*Math.tan(m.perspective.fov/2*Math.PI/180);a.panDeltaX+=1.5*h*w/u,a.panDeltaY+=1.5*I*w/u}else a.panDeltaX+=.5*m.ortho.scale*(h/u),a.panDeltaY+=.5*m.ortho.scale*(I/u)}else!s||o||l||r.planView||(r.firstPerson?(a.rotateDeltaY-=(p-c)/n*r.dragRotationRate/2,a.rotateDeltaX+=(A-f)/u*(r.dragRotationRate/4)):(a.rotateDeltaY-=(p-c)/n*(1.5*r.dragRotationRate),a.rotateDeltaX+=(A-f)/u*(1.5*r.dragRotationRate)));c=p,f=A}}),I.addEventListener("mousemove",this._canvasMouseMoveHandler=function(e){r.active&&r.pointerEnabled&&i.mouseover&&(h=!0)}),document.addEventListener("mouseup",this._documentMouseUpHandler=function(e){if(r.active&&r.pointerEnabled)switch(e.which){case 1:case 2:case 3:s=!1,o=!1,l=!1}}),I.addEventListener("mouseup",this._mouseUpHandler=function(e){if(r.active&&r.pointerEnabled){if(3===e.which){!function(e,t){if(e){for(var n=e.target,r=0,i=0,a=0,s=0;n.offsetParent;)r+=n.offsetLeft,i+=n.offsetTop,a+=n.scrollLeft,s+=n.scrollTop,n=n.offsetParent;t[0]=e.pageX+a-r,t[1]=e.pageY+s-i}else e=window.event,t[0]=e.x,t[1]=e.y}(e,CA);var t=CA[0],i=CA[1];Math.abs(t-p)<3&&Math.abs(i-A)<3&&n.cameraControl.fire("rightClick",{pagePos:[Math.round(e.pageX),Math.round(e.pageY)],canvasPos:CA,event:e},!0)}I.style.removeProperty("cursor")}}),I.addEventListener("mouseenter",this._mouseEnterHandler=function(){r.active&&r.pointerEnabled});var E=1/60,T=null;I.addEventListener("wheel",this._mouseWheelHandler=function(e){if(r.active&&r.pointerEnabled){var t=performance.now()/1e3,n=null!==T?t-T:0;T=t,n>.05&&(n=.05),n0?n.cameraFlight.flyTo(LA,(function(){n.pivotController.getPivoting()&&r.followPointer&&n.pivotController.showPivot()})):(n.cameraFlight.jumpTo(LA),n.pivotController.getPivoting()&&r.followPointer&&n.pivotController.showPivot())}}}))}return P(e,[{key:"reset",value:function(){}},{key:"destroy",value:function(){this._scene.input.off(this._onSceneKeyDown)}}]),e}(),MA=function(){function e(t,n,r,i,a){var s=this;b(this,e),this._scene=t;var o=n.pickController,l=n.pivotController,u=n.cameraControl;this._clicks=0,this._timeout=null,this._lastPickedEntityId=null;var c=!1,f=!1,p=this._scene.canvas.canvas,A=function(e){var r;e&&e.worldPos&&(r=e.worldPos);var i=e&&e.entity?e.entity.aabb:t.aabb;if(r){var a=t.camera;$.subVec3(a.eye,a.look,[]),n.cameraFlight.flyTo({aabb:i})}else n.cameraFlight.flyTo({aabb:i})},d=t.tickify(this._canvasMouseMoveHandler=function(e){if(r.active&&r.pointerEnabled&&!c&&!f){var n=u.hasSubs("hover"),a=u.hasSubs("hoverEnter"),l=u.hasSubs("hoverOut"),p=u.hasSubs("hoverOff"),A=u.hasSubs("hoverSurface"),d=u.hasSubs("hoverSnapOrSurface");if(n||a||l||p||A||d)if(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=A,o.scheduleSnapOrPick=d,o.update(),o.pickResult){if(o.pickResult.entity){var v=o.pickResult.entity.id;s._lastPickedEntityId!==v&&(void 0!==s._lastPickedEntityId&&u.fire("hoverOut",{entity:t.objects[s._lastPickedEntityId]},!0),u.fire("hoverEnter",o.pickResult,!0),s._lastPickedEntityId=v)}u.fire("hover",o.pickResult,!0),(o.pickResult.worldPos||o.pickResult.snappedWorldPos)&&u.fire("hoverSurface",o.pickResult,!0)}else void 0!==s._lastPickedEntityId&&(u.fire("hoverOut",{entity:t.objects[s._lastPickedEntityId]},!0),s._lastPickedEntityId=void 0),u.fire("hoverOff",{canvasPos:o.pickCursorPos},!0)}});p.addEventListener("mousemove",d),p.addEventListener("mousedown",this._canvasMouseDownHandler=function(e){if(1===e.which&&(c=!0),3===e.which&&(f=!0),1===e.which&&r.active&&r.pointerEnabled&&(i.mouseDownClientX=e.clientX,i.mouseDownClientY=e.clientY,i.mouseDownCursorX=i.pointerCanvasPos[0],i.mouseDownCursorY=i.pointerCanvasPos[1],!r.firstPerson&&r.followPointer&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),1===e.which))){var n=o.pickResult;n&&n.worldPos?(l.setPivotPos(n.worldPos),l.startPivot()):(r.smartPivot?l.setCanvasPivotPos(i.pointerCanvasPos):l.setPivotPos(t.camera.look),l.startPivot())}}),document.addEventListener("mouseup",this._documentMouseUpHandler=function(e){1===e.which&&(c=!1),3===e.which&&(f=!1),l.getPivoting()&&l.endPivot()}),p.addEventListener("mouseup",this._canvasMouseUpHandler=function(e){if(r.active&&r.pointerEnabled&&(1===e.which&&(l.hidePivot(),!(Math.abs(e.clientX-i.mouseDownClientX)>3||Math.abs(e.clientY-i.mouseDownClientY)>3)))){var a=u.hasSubs("picked"),c=u.hasSubs("pickedNothing"),f=u.hasSubs("pickedSurface"),p=u.hasSubs("doublePicked"),d=u.hasSubs("doublePickedSurface"),v=u.hasSubs("doublePickedNothing");if(!(r.doublePickFlyTo||p||d||v))return(a||c||f)&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=!0,o.schedulePickSurface=f,o.update(),o.pickResult?(u.fire("picked",o.pickResult,!0),o.pickedSurface&&u.fire("pickedSurface",o.pickResult,!0)):u.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0)),void(s._clicks=0);if(s._clicks++,1===s._clicks){o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=r.doublePickFlyTo,o.schedulePickSurface=f,o.update();var h=o.pickResult,I=o.pickedSurface;s._timeout=setTimeout((function(){h?(u.fire("picked",h,!0),I&&(u.fire("pickedSurface",h,!0),!r.firstPerson&&r.followPointer&&(n.pivotController.setPivotPos(h.worldPos),n.pivotController.startPivot()&&n.pivotController.showPivot()))):u.fire("pickedNothing",{canvasPos:i.pointerCanvasPos},!0),s._clicks=0}),r.doubleClickTimeFrame)}else{if(null!==s._timeout&&(window.clearTimeout(s._timeout),s._timeout=null),o.pickCursorPos=i.pointerCanvasPos,o.schedulePickEntity=r.doublePickFlyTo||p||d,o.schedulePickSurface=o.schedulePickEntity&&d,o.update(),o.pickResult){if(u.fire("doublePicked",o.pickResult,!0),o.pickedSurface&&u.fire("doublePickedSurface",o.pickResult,!0),r.doublePickFlyTo&&(A(o.pickResult),!r.firstPerson&&r.followPointer)){var y=o.pickResult.entity.aabb,m=$.getAABB3Center(y);n.pivotController.setPivotPos(m),n.pivotController.startPivot()&&n.pivotController.showPivot()}}else if(u.fire("doublePickedNothing",{canvasPos:i.pointerCanvasPos},!0),r.doublePickFlyTo&&(A(),!r.firstPerson&&r.followPointer)){var w=t.aabb,g=$.getAABB3Center(w);n.pivotController.setPivotPos(g),n.pivotController.startPivot()&&n.pivotController.showPivot()}s._clicks=0}}},!1)}return P(e,[{key:"reset",value:function(){this._clicks=0,this._lastPickedEntityId=null,this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}},{key:"destroy",value:function(){var e=this._scene.canvas.canvas;e.removeEventListener("mousemove",this._canvasMouseMoveHandler),e.removeEventListener("mousedown",this._canvasMouseDownHandler),document.removeEventListener("mouseup",this._documentMouseUpHandler),e.removeEventListener("mouseup",this._canvasMouseUpHandler),this._timeout&&(window.clearTimeout(this._timeout),this._timeout=null)}}]),e}(),FA=function(){function e(t,n,r,i,a){b(this,e),this._scene=t;var s=t.input,o=[],l=t.canvas.canvas,u=!0;this._onSceneMouseMove=s.on("mousemove",(function(){u=!0})),this._onSceneKeyDown=s.on("keydown",(function(e){r.active&&r.pointerEnabled&&t.input.keyboardEnabled&&i.mouseover&&(o[e]=!0,e===s.KEY_SHIFT&&(l.style.cursor="move"))})),this._onSceneKeyUp=s.on("keyup",(function(e){r.active&&r.pointerEnabled&&t.input.keyboardEnabled&&(o[e]=!1,e===s.KEY_SHIFT&&(l.style.cursor=null),n.pivotController.getPivoting()&&n.pivotController.endPivot())})),this._onTick=t.on("tick",(function(e){if(r.active&&r.pointerEnabled&&t.input.keyboardEnabled&&i.mouseover){var l=n.cameraControl,c=e.deltaTime/1e3;if(!r.planView){var f=l._isKeyDownForAction(l.ROTATE_Y_POS,o),p=l._isKeyDownForAction(l.ROTATE_Y_NEG,o),A=l._isKeyDownForAction(l.ROTATE_X_POS,o),d=l._isKeyDownForAction(l.ROTATE_X_NEG,o),v=c*r.keyboardRotationRate;(f||p||A||d)&&(!r.firstPerson&&r.followPointer&&n.pivotController.startPivot(),f?a.rotateDeltaY+=v:p&&(a.rotateDeltaY-=v),A?a.rotateDeltaX+=v:d&&(a.rotateDeltaX-=v),!r.firstPerson&&r.followPointer&&n.pivotController.startPivot())}if(!o[s.KEY_CTRL]&&!o[s.KEY_ALT]){var h=l._isKeyDownForAction(l.DOLLY_BACKWARDS,o),I=l._isKeyDownForAction(l.DOLLY_FORWARDS,o);if(h||I){var y=c*r.keyboardDollyRate;!r.firstPerson&&r.followPointer&&n.pivotController.startPivot(),I?a.dollyDelta-=y:h&&(a.dollyDelta+=y),u&&(i.followPointerDirty=!0,u=!1)}}var m=l._isKeyDownForAction(l.PAN_FORWARDS,o),w=l._isKeyDownForAction(l.PAN_BACKWARDS,o),g=l._isKeyDownForAction(l.PAN_LEFT,o),E=l._isKeyDownForAction(l.PAN_RIGHT,o),T=l._isKeyDownForAction(l.PAN_UP,o),b=l._isKeyDownForAction(l.PAN_DOWN,o),D=(o[s.KEY_ALT]?.3:1)*c*r.keyboardPanRate;(m||w||g||E||T||b)&&(!r.firstPerson&&r.followPointer&&n.pivotController.startPivot(),b?a.panDeltaY+=D:T&&(a.panDeltaY+=-D),E?a.panDeltaX+=-D:g&&(a.panDeltaX+=D),w?a.panDeltaZ+=D:m&&(a.panDeltaZ+=-D))}}))}return P(e,[{key:"reset",value:function(){}},{key:"destroy",value:function(){this._scene.off(this._onTick),this._scene.input.off(this._onSceneMouseMove),this._scene.input.off(this._onSceneKeyDown),this._scene.input.off(this._onSceneKeyUp)}}]),e}(),HA=$.vec3(),UA=function(){function e(t,n,r,i,a){b(this,e),this._scene=t;var s=t.camera,o=n.pickController,l=n.pivotController,u=n.panController,c=1,f=1,p=null;this._onTick=t.on("tick",(function(){if(r.active&&r.pointerEnabled){var e="default";if(Math.abs(a.dollyDelta)<.001&&(a.dollyDelta=0),Math.abs(a.rotateDeltaX)<.001&&(a.rotateDeltaX=0),Math.abs(a.rotateDeltaY)<.001&&(a.rotateDeltaY=0),0===a.rotateDeltaX&&0===a.rotateDeltaY||(a.dollyDelta=0),r.followPointer&&--c<=0&&(c=1,0!==a.dollyDelta)){if(0===a.rotateDeltaY&&0===a.rotateDeltaX&&r.followPointer&&i.followPointerDirty&&(o.pickCursorPos=i.pointerCanvasPos,o.schedulePickSurface=!0,o.update(),o.pickResult&&o.pickResult.worldPos?p=o.pickResult.worldPos:(f=1,p=null),i.followPointerDirty=!1),p){var n=Math.abs($.lenVec3($.subVec3(p,t.camera.eye,HA)));f=n/r.dollyProximityThreshold}fr.longTapRadius||Math.abs(I)>r.longTapRadius)&&(clearTimeout(i.longTouchTimeout),i.longTouchTimeout=null),r.planView){var y=t.camera;if("perspective"===y.projection){var m=Math.abs(t.camera.eyeLookDist)*Math.tan(y.perspective.fov/2*Math.PI/180);a.panDeltaX+=h*m/l*r.touchPanRate,a.panDeltaY+=I*m/l*r.touchPanRate}else a.panDeltaX+=.5*y.ortho.scale*(h/l)*r.touchPanRate,a.panDeltaY+=.5*y.ortho.scale*(I/l)*r.touchPanRate}else a.rotateDeltaY-=h/o*(1*r.dragRotationRate),a.rotateDeltaX+=I/l*(1.5*r.dragRotationRate)}else if(2===d){var w=A[0],g=A[1];jA(w,u),jA(g,c);var E=$.geometricMeanVec2(p[0],p[1]),T=$.geometricMeanVec2(u,c),b=$.vec2();$.subVec2(E,T,b);var D=b[0],P=b[1],C=t.camera,_=$.distVec2([w.pageX,w.pageY],[g.pageX,g.pageY]),R=($.distVec2(p[0],p[1])-_)*r.touchDollyRate;if(a.dollyDelta=R,Math.abs(R)<1)if("perspective"===C.projection){var B=s.pickResult?s.pickResult.worldPos:t.center,O=Math.abs($.lenVec3($.subVec3(B,t.camera.eye,[])))*Math.tan(C.perspective.fov/2*Math.PI/180);a.panDeltaX-=D*O/l*r.touchPanRate,a.panDeltaY-=P*O/l*r.touchPanRate}else a.panDeltaX-=.5*C.ortho.scale*(D/l)*r.touchPanRate,a.panDeltaY-=.5*C.ortho.scale*(P/l)*r.touchPanRate;i.pointerCanvasPos=T}for(var S=0;S-1&&t-f<150&&(p>-1&&f-p<325?(QA(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=s,o.update(),o.pickResult?(o.pickResult.touchInput=!0,l.fire("doublePicked",o.pickResult),o.pickedSurface&&l.fire("doublePickedSurface",o.pickResult),r.doublePickFlyTo&&d(o.pickResult)):(l.fire("doublePickedNothing"),r.doublePickFlyTo&&d()),p=-1):$.distVec2(u[0],c)<4&&(QA(a[0],o.pickCursorPos),o.schedulePickEntity=!0,o.schedulePickSurface=s,o.update(),o.pickResult?(o.pickResult.touchInput=!0,l.fire("picked",o.pickResult),o.pickedSurface&&l.fire("pickedSurface",o.pickResult)):l.fire("pickedNothing"),p=t),f=-1),u.length=n.length;for(var A=0,v=n.length;A1&&void 0!==arguments[1]?arguments[1]:{};b(this,n),(r=t.call(this,e,i)).PAN_LEFT=0,r.PAN_RIGHT=1,r.PAN_UP=2,r.PAN_DOWN=3,r.PAN_FORWARDS=4,r.PAN_BACKWARDS=5,r.ROTATE_X_POS=6,r.ROTATE_X_NEG=7,r.ROTATE_Y_POS=8,r.ROTATE_Y_NEG=9,r.DOLLY_FORWARDS=10,r.DOLLY_BACKWARDS=11,r.AXIS_VIEW_RIGHT=12,r.AXIS_VIEW_BACK=13,r.AXIS_VIEW_LEFT=14,r.AXIS_VIEW_FRONT=15,r.AXIS_VIEW_TOP=16,r.AXIS_VIEW_BOTTOM=17,r._keyMap={},r.scene.canvas.canvas.oncontextmenu=function(e){e.preventDefault()},r._configs={longTapTimeout:600,longTapRadius:5,active:!0,keyboardLayout:"qwerty",navMode:"orbit",planView:!1,firstPerson:!1,followPointer:!0,doublePickFlyTo:!0,panRightClick:!0,showPivot:!1,pointerEnabled:!0,constrainVertical:!1,smartPivot:!1,doubleClickTimeFrame:250,snapToVertex:true,snapToEdge:true,snapRadius:30,dragRotationRate:360,keyboardRotationRate:90,rotationInertia:0,keyboardPanRate:1,touchPanRate:1,panInertia:.5,keyboardDollyRate:10,mouseWheelDollyRate:100,touchDollyRate:.2,dollyInertia:0,dollyProximityThreshold:30,dollyMinSpeed:.04},r._states={pointerCanvasPos:$.vec2(),mouseover:!1,followPointerDirty:!0,mouseDownClientX:0,mouseDownClientY:0,mouseDownCursorX:0,mouseDownCursorY:0,touchStartTime:null,activeTouches:[],tapStartPos:$.vec2(),tapStartTime:-1,lastTapTime:-1,longTouchTimeout:null},r._updates={rotateDeltaX:0,rotateDeltaY:0,panDeltaX:0,panDeltaY:0,panDeltaZ:0,dollyDelta:0};var a=r.scene;return r._controllers={cameraControl:w(r),pickController:new PA(w(r),r._configs),pivotController:new DA(a,r._configs),panController:new yA(a),cameraFlight:new Up(w(r),{duration:.5})},r._handlers=[new GA(r.scene,r._controllers,r._configs,r._states,r._updates),new VA(r.scene,r._controllers,r._configs,r._states,r._updates),new _A(r.scene,r._controllers,r._configs,r._states,r._updates),new xA(r.scene,r._controllers,r._configs,r._states,r._updates),new MA(r.scene,r._controllers,r._configs,r._states,r._updates),new WA(r.scene,r._controllers,r._configs,r._states,r._updates),new FA(r.scene,r._controllers,r._configs,r._states,r._updates)],r._cameraUpdater=new UA(r.scene,r._controllers,r._configs,r._states,r._updates),r.navMode=i.navMode,i.planView&&(r.planView=i.planView),r.constrainVertical=i.constrainVertical,i.keyboardLayout?r.keyboardLayout=i.keyboardLayout:r.keyMap=i.keyMap,r.doublePickFlyTo=i.doublePickFlyTo,r.panRightClick=i.panRightClick,r.active=i.active,r.followPointer=i.followPointer,r.rotationInertia=i.rotationInertia,r.keyboardPanRate=i.keyboardPanRate,r.touchPanRate=i.touchPanRate,r.keyboardRotationRate=i.keyboardRotationRate,r.dragRotationRate=i.dragRotationRate,r.touchDollyRate=i.touchDollyRate,r.dollyInertia=i.dollyInertia,r.dollyProximityThreshold=i.dollyProximityThreshold,r.dollyMinSpeed=i.dollyMinSpeed,r.panInertia=i.panInertia,r.pointerEnabled=!0,r.keyboardDollyRate=i.keyboardDollyRate,r.mouseWheelDollyRate=i.mouseWheelDollyRate,r}return P(n,[{key:"keyMap",get:function(){return this._keyMap},set:function(e){if(e=e||"qwerty",le.isString(e)){var t=this.scene.input,n={};switch(e){default:this.error("Unsupported value for 'keyMap': "+e+" defaulting to 'qwerty'");case"qwerty":n[this.PAN_LEFT]=[t.KEY_A],n[this.PAN_RIGHT]=[t.KEY_D],n[this.PAN_UP]=[t.KEY_Z],n[this.PAN_DOWN]=[t.KEY_X],n[this.PAN_BACKWARDS]=[],n[this.PAN_FORWARDS]=[],n[this.DOLLY_FORWARDS]=[t.KEY_W,t.KEY_ADD],n[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],n[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],n[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],n[this.ROTATE_Y_POS]=[t.KEY_Q,t.KEY_LEFT_ARROW],n[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],n[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],n[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],n[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],n[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],n[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],n[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6];break;case"azerty":n[this.PAN_LEFT]=[t.KEY_Q],n[this.PAN_RIGHT]=[t.KEY_D],n[this.PAN_UP]=[t.KEY_W],n[this.PAN_DOWN]=[t.KEY_X],n[this.PAN_BACKWARDS]=[],n[this.PAN_FORWARDS]=[],n[this.DOLLY_FORWARDS]=[t.KEY_Z,t.KEY_ADD],n[this.DOLLY_BACKWARDS]=[t.KEY_S,t.KEY_SUBTRACT],n[this.ROTATE_X_POS]=[t.KEY_DOWN_ARROW],n[this.ROTATE_X_NEG]=[t.KEY_UP_ARROW],n[this.ROTATE_Y_POS]=[t.KEY_A,t.KEY_LEFT_ARROW],n[this.ROTATE_Y_NEG]=[t.KEY_E,t.KEY_RIGHT_ARROW],n[this.AXIS_VIEW_RIGHT]=[t.KEY_NUM_1],n[this.AXIS_VIEW_BACK]=[t.KEY_NUM_2],n[this.AXIS_VIEW_LEFT]=[t.KEY_NUM_3],n[this.AXIS_VIEW_FRONT]=[t.KEY_NUM_4],n[this.AXIS_VIEW_TOP]=[t.KEY_NUM_5],n[this.AXIS_VIEW_BOTTOM]=[t.KEY_NUM_6]}this._keyMap=n}else{var r=e;this._keyMap=r}}},{key:"_isKeyDownForAction",value:function(e,t){var n=this._keyMap[e];if(!n)return!1;t||(t=this.scene.input.keyDown);for(var r=0,i=n.length;r0&&void 0!==arguments[0]?arguments[0]:{};this._controllers.pivotController.enablePivotSphere(e)}},{key:"disablePivotSphere",value:function(){this._controllers.pivotController.disablePivotSphere()}},{key:"smartPivot",get:function(){return this._configs.smartPivot},set:function(e){this._configs.smartPivot=!1!==e}},{key:"doubleClickTimeFrame",get:function(){return this._configs.doubleClickTimeFrame},set:function(e){this._configs.doubleClickTimeFrame=null!=e?e:250}},{key:"destroy",value:function(){this._destroyHandlers(),this._destroyControllers(),this._cameraUpdater.destroy(),d(g(n.prototype),"destroy",this).call(this)}},{key:"_destroyHandlers",value:function(){for(var e=0,t=this._handlers.length;e1&&void 0!==arguments[1]?arguments[1]:{};if(this.finalized)throw"MetaScene already finalized - can't add more data";this._globalizeIDs(e,t);var n=this.metaScene,r=e.properties;if(e.propertySets)for(var i=0,a=e.propertySets.length;i0?ZA(t):null,s=n&&n.length>0?ZA(n):null;return function e(t){if(t){var n=!0;(s&&s[t.type]||a&&!a[t.type])&&(n=!1),n&&r.push(t.id);var i=t.children;if(i)for(var o=0,l=i.length;o * Copyright (c) 2022 Niklas von Hertzen